From 9703e28ac17058bdd0aa59515fec05aaee4f75be Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 22 Jun 2006 22:12:02 +0000 Subject: [PATCH] Big work : a new module is added and the document is really improved it is done with doxygen --- INSTALL-fr.txt | 39 +- doc/FAQ-fr.sgml | 5 + doc/developper/account_repository.html | 987 ++ doc/developper/create_doc.sh | 3 + doc/developper/dossier1.dia | 10532 ++++++++++++++++ doc/developper/dossier1.html | 7509 +++++++++++ .../html/ac__common_8php-source.html | 441 +- doc/developper/html/ac__common_8php.html | 178 +- .../html/action_8inc_8php-source.html | 339 +- doc/developper/html/action_8inc_8php.html | 91 +- .../html/admin__repo_8php-source.html | 569 +- doc/developper/html/admin__repo_8php.html | 63 +- doc/developper/html/annotated.html | 40 +- .../html/annulation_8php-source.html | 536 +- doc/developper/html/annulation_8php.html | 37 +- doc/developper/html/bal__csv_8php-source.html | 90 +- doc/developper/html/bal__csv_8php.html | 25 +- doc/developper/html/balance_8php-source.html | 213 +- doc/developper/html/balance_8php.html | 59 +- doc/developper/html/bilan_8php-source.html | 233 +- doc/developper/html/bilan_8php.html | 49 +- .../html/cbc__be_8inc_8php-source.html | 78 +- doc/developper/html/cbc__be_8inc_8php.html | 19 +- doc/developper/html/central_8php-source.html | 126 +- doc/developper/html/central_8php.html | 21 +- .../html/central__inc_8php-source.html | 44 +- doc/developper/html/central__inc_8php.html | 39 +- .../html/check__priv_8php-source.html | 294 +- doc/developper/html/check__priv_8php.html | 82 +- doc/developper/html/classAttribut.html | 23 +- doc/developper/html/classBalance.html | 37 +- doc/developper/html/classCezpdf.html | 44 +- doc/developper/html/classCpdf.html | 106 +- doc/developper/html/classCreport.html | 8 +- doc/developper/html/classCustomer.html | 237 +- .../html/classDocument__modele.html | 195 +- doc/developper/html/classInvoice.html | 47 +- doc/developper/html/classOwn.html | 38 +- .../html/class_8ezpdf_8php-source.html | 42 +- doc/developper/html/class_8ezpdf_8php.html | 4 +- .../html/class_8pdf_8php-source.html | 178 +- doc/developper/html/class_8pdf_8php.html | 4 +- .../html/class__attribut_8php-source.html | 64 +- doc/developper/html/class__attribut_8php.html | 31 +- .../html/class__balance_8php-source.html | 148 +- doc/developper/html/class__balance_8php.html | 14 +- .../html/class__customer_8php-source.html | 472 +- doc/developper/html/class__customer_8php.html | 14 +- .../class__document__modele_8php-source.html | 382 +- .../html/class__document__modele_8php.html | 14 +- .../html/class__fiche_8php-source.html | 1277 +- doc/developper/html/class__fiche_8php.html | 15 +- .../html/class__fiche__def_8php-source.html | 209 +- .../html/class__fiche__def_8php.html | 14 +- .../html/class__invoice_8php-source.html | 245 +- doc/developper/html/class__invoice_8php.html | 15 +- .../html/class__jrn_8php-source.html | 562 +- doc/developper/html/class__jrn_8php.html | 5 +- .../html/class__operation_8php-source.html | 180 +- .../html/class__operation_8php.html | 48 +- .../html/class__own_8php-source.html | 88 +- doc/developper/html/class__own_8php.html | 14 +- .../html/class__parm__code_8php-source.html | 237 +- .../html/class__parm__code_8php.html | 14 +- .../html/class__poste_8php-source.html | 217 +- doc/developper/html/class__poste_8php.html | 14 +- .../html/class__rapport_8php-source.html | 94 +- doc/developper/html/class__rapport_8php.html | 14 +- .../html/class__user_8php-source.html | 504 +- doc/developper/html/class__user_8php.html | 14 +- .../html/class__widget_8php-source.html | 669 +- doc/developper/html/class__widget_8php.html | 14 +- doc/developper/html/classcl__user.html | 149 +- doc/developper/html/classfiche.html | 451 +- doc/developper/html/classfiche.png | Bin 312 -> 418 bytes doc/developper/html/classfiche__def.html | 77 +- doc/developper/html/classfiche__def__ref.html | 81 +- doc/developper/html/classjrn.html | 106 +- doc/developper/html/classparm__code.html | 81 +- doc/developper/html/classposte.html | 60 +- doc/developper/html/classrapport.html | 52 +- doc/developper/html/classwidget.html | 97 +- .../html/client_8inc_8php-source.html | 284 +- doc/developper/html/client_8inc_8php.html | 51 +- .../html/commercial_8php-source.html | 174 +- doc/developper/html/commercial_8php.html | 27 +- doc/developper/html/constant_8php-source.html | 694 +- doc/developper/html/constant_8php.html | 533 +- doc/developper/html/debug_8php-source.html | 23 +- doc/developper/html/debug_8php.html | 29 +- .../html/decla_8BE_8inc_8php-source.html | 118 +- doc/developper/html/decla_8BE_8inc_8php.html | 13 +- doc/developper/html/demo_8php-source.html | 181 +- doc/developper/html/demo_8php.html | 8 +- doc/developper/html/dir_000000.html | 4 +- doc/developper/html/dir_000001.html | 4 +- doc/developper/html/dir_000002.html | 4 +- doc/developper/html/dir_000003.html | 180 +- doc/developper/html/dir_000004.html | 4 +- doc/developper/html/dir_000005.html | 4 +- doc/developper/html/dir_000006.html | 195 +- doc/developper/html/dirs.html | 4 +- .../document__modele_8inc_8php-source.html | 74 +- .../html/document__modele_8inc_8php.html | 135 +- .../html/ecrit__ouv_8php-source.html | 278 +- doc/developper/html/ecrit__ouv_8php.html | 37 +- doc/developper/html/error_8php-source.html | 86 +- doc/developper/html/error_8php.html | 25 +- .../html/eub__be_8inc_8php-source.html | 107 +- doc/developper/html/eub__be_8inc_8php.html | 37 +- .../html/export__ouv_8php-source.html | 116 +- doc/developper/html/export__ouv_8php.html | 35 +- .../html/facturation_8php-source.html | 164 +- doc/developper/html/facturation_8php.html | 30 +- doc/developper/html/fiche_8php-source.html | 315 +- doc/developper/html/fiche_8php.html | 19 +- .../html/fiche__csv_8php-source.html | 156 +- doc/developper/html/fiche__csv_8php.html | 31 +- .../html/fiche__def_8inc_8php-source.html | 109 +- doc/developper/html/fiche__def_8inc_8php.html | 41 +- .../html/fiche__inc_8php-source.html | 2662 ++-- doc/developper/html/fiche__inc_8php.html | 664 +- .../html/fiche__new_8php-source.html | 339 +- doc/developper/html/fiche__new_8php.html | 39 +- .../html/fiche__search_8php-source.html | 313 +- doc/developper/html/fiche__search_8php.html | 33 +- doc/developper/html/files.html | 234 +- doc/developper/html/form_8php-source.html | 179 +- doc/developper/html/form_8php.html | 23 +- .../html/form__csv_8php-source.html | 154 +- doc/developper/html/form__csv_8php.html | 21 +- .../html/form__inc_8php-source.html | 528 +- doc/developper/html/form__inc_8php.html | 121 +- .../html/form__pdf_8php-source.html | 169 +- doc/developper/html/form__pdf_8php.html | 19 +- .../html/fortis__be_8inc_8php-source.html | 175 +- doc/developper/html/fortis__be_8inc_8php.html | 43 +- doc/developper/html/functions.html | 52 +- doc/developper/html/functions_0x61.html | 10 +- doc/developper/html/functions_0x62.html | 6 +- doc/developper/html/functions_0x63.html | 10 +- doc/developper/html/functions_0x64.html | 10 +- doc/developper/html/functions_0x65.html | 4 +- doc/developper/html/functions_0x66.html | 11 +- doc/developper/html/functions_0x67.html | 25 +- doc/developper/html/functions_0x68.html | 4 +- doc/developper/html/functions_0x69.html | 6 +- doc/developper/html/functions_0x6a.html | 4 +- doc/developper/html/functions_0x6c.html | 4 +- doc/developper/html/functions_0x6d.html | 6 +- doc/developper/html/functions_0x6e.html | 4 +- doc/developper/html/functions_0x6f.html | 4 +- doc/developper/html/functions_0x70.html | 7 +- doc/developper/html/functions_0x72.html | 9 +- doc/developper/html/functions_0x73.html | 17 +- doc/developper/html/functions_0x74.html | 4 +- doc/developper/html/functions_0x75.html | 9 +- doc/developper/html/functions_0x76.html | 4 +- doc/developper/html/functions_0x77.html | 4 +- doc/developper/html/functions_func.html | 82 +- doc/developper/html/functions_vars.html | 52 +- doc/developper/html/globals.html | 108 +- doc/developper/html/globals_0x5f.html | 4 +- doc/developper/html/globals_0x61.html | 32 +- doc/developper/html/globals_0x62.html | 4 +- doc/developper/html/globals_0x63.html | 4 +- doc/developper/html/globals_0x64.html | 11 +- doc/developper/html/globals_0x65.html | 16 +- doc/developper/html/globals_0x66.html | 18 +- doc/developper/html/globals_0x67.html | 41 +- doc/developper/html/globals_0x68.html | 4 +- doc/developper/html/globals_0x69.html | 8 +- doc/developper/html/globals_0x6a.html | 24 +- doc/developper/html/globals_0x6c.html | 4 +- doc/developper/html/globals_0x6d.html | 21 +- doc/developper/html/globals_0x6e.html | 6 +- doc/developper/html/globals_0x6f.html | 4 +- doc/developper/html/globals_0x70.html | 4 +- doc/developper/html/globals_0x72.html | 8 +- doc/developper/html/globals_0x73.html | 21 +- doc/developper/html/globals_0x74.html | 6 +- doc/developper/html/globals_0x75.html | 8 +- doc/developper/html/globals_0x76.html | 14 +- doc/developper/html/globals_0x77.html | 4 +- doc/developper/html/globals_0x79.html | 4 +- doc/developper/html/globals_enum.html | 64 +- doc/developper/html/globals_func.html | 82 +- doc/developper/html/globals_vars.html | 110 +- doc/developper/html/globals_vars_0x5f.html | 6 +- doc/developper/html/globals_vars_0x62.html | 6 +- doc/developper/html/globals_vars_0x63.html | 6 +- doc/developper/html/globals_vars_0x64.html | 6 +- doc/developper/html/globals_vars_0x65.html | 12 +- doc/developper/html/globals_vars_0x66.html | 9 +- doc/developper/html/globals_vars_0x68.html | 6 +- doc/developper/html/globals_vars_0x69.html | 6 +- doc/developper/html/globals_vars_0x6c.html | 6 +- doc/developper/html/globals_vars_0x6d.html | 23 +- doc/developper/html/globals_vars_0x6e.html | 8 +- doc/developper/html/globals_vars_0x70.html | 6 +- doc/developper/html/globals_vars_0x72.html | 8 +- doc/developper/html/globals_vars_0x73.html | 11 +- doc/developper/html/globals_vars_0x74.html | 8 +- doc/developper/html/globals_vars_0x76.html | 8 +- doc/developper/html/globals_vars_0x77.html | 6 +- doc/developper/html/hierarchy.html | 8 +- doc/developper/html/import_8php-source.html | 149 +- doc/developper/html/import_8php.html | 19 +- .../html/import__inc_8php-source.html | 306 +- doc/developper/html/import__inc_8php.html | 50 +- .../html/impress__bilan_8php-source.html | 60 +- doc/developper/html/impress__bilan_8php.html | 29 +- .../html/impress__fiche_8php-source.html | 8 +- doc/developper/html/impress__fiche_8php.html | 24 +- .../html/impress__inc_8php-source.html | 182 +- doc/developper/html/impress__inc_8php.html | 106 +- .../html/impress__jrn_8php-source.html | 404 +- doc/developper/html/impress__jrn_8php.html | 49 +- .../impress__listing__client_8php-source.html | 118 +- .../html/impress__listing__client_8php.html | 35 +- .../html/impress__poste_8php-source.html | 225 +- doc/developper/html/impress__poste_8php.html | 45 +- .../html/impress__rapport_8php-source.html | 297 +- .../html/impress__rapport_8php.html | 45 +- doc/developper/html/index.html | 4 +- doc/developper/html/index_8php-source.html | 139 +- doc/developper/html/index_8php.html | 13 +- .../html/ing__be_8inc_8php-source.html | 189 +- doc/developper/html/ing__be_8inc_8php.html | 37 +- doc/developper/html/jrn_8php-source.html | 1761 ++- doc/developper/html/jrn_8php.html | 236 +- doc/developper/html/jrn__add_8php-source.html | 362 +- doc/developper/html/jrn__add_8php.html | 53 +- doc/developper/html/jrn__csv_8php-source.html | 196 +- doc/developper/html/jrn__csv_8php.html | 29 +- .../html/jrn__detail_8php-source.html | 440 +- doc/developper/html/jrn__detail_8php.html | 55 +- .../html/jrn__op__detail_8php-source.html | 147 +- doc/developper/html/jrn__op__detail_8php.html | 23 +- doc/developper/html/jrn__pdf_8php-source.html | 271 +- doc/developper/html/jrn__pdf_8php.html | 61 +- .../html/jrn__search_8php-source.html | 410 +- doc/developper/html/jrn__search_8php.html | 73 +- .../html/jrn__update_8php-source.html | 76 +- doc/developper/html/jrn__update_8php.html | 23 +- .../html/line__update_8php-source.html | 194 +- doc/developper/html/line__update_8php.html | 43 +- .../html/listing__client_8php-source.html | 63 +- doc/developper/html/listing__client_8php.html | 27 +- doc/developper/html/login_8php-source.html | 71 +- doc/developper/html/login_8php.html | 25 +- doc/developper/html/logout_8php-source.html | 22 +- doc/developper/html/logout_8php.html | 13 +- .../html/modify__op_8php-source.html | 250 +- doc/developper/html/modify__op_8php.html | 33 +- doc/developper/html/namespaceCpdf.html | 4 +- doc/developper/html/namespaces.html | 4 +- .../html/not__implemented_8php-source.html | 4 +- .../html/not__implemented_8php.html | 4 +- .../html/parametre_8php-source.html | 308 +- doc/developper/html/parametre_8php.html | 67 +- .../html/pcmn__update_8php-source.html | 323 +- doc/developper/html/pcmn__update_8php.html | 41 +- .../html/periode_8inc_8php-source.html | 174 +- doc/developper/html/periode_8inc_8php.html | 28 +- .../html/poste_8inc_8php-source.html | 110 +- doc/developper/html/poste_8inc_8php.html | 39 +- doc/developper/html/poste_8php-source.html | 176 +- doc/developper/html/poste_8php.html | 67 +- .../html/poste__csv_8php-source.html | 102 +- doc/developper/html/poste__csv_8php.html | 29 +- .../html/poste__pdf_8php-source.html | 145 +- doc/developper/html/poste__pdf_8php.html | 27 +- .../html/poste__search_8php-source.html | 323 +- doc/developper/html/poste__search_8php.html | 31 +- doc/developper/html/postgres_8php-source.html | 371 +- doc/developper/html/postgres_8php.html | 199 +- .../html/pref_8inc_8php-source.html | 6 +- doc/developper/html/pref_8inc_8php.html | 12 +- .../html/preference_8php-source.html | 411 +- doc/developper/html/preference_8php.html | 116 +- .../html/print__balance_8php-source.html | 134 +- doc/developper/html/print__balance_8php.html | 48 +- .../html/print__invoice_8php-source.html | 240 +- doc/developper/html/print__invoice_8php.html | 63 +- .../html/priv__user_8php-source.html | 426 +- doc/developper/html/priv__user_8php.html | 45 +- doc/developper/html/readme_8php-source.html | 32 +- doc/developper/html/readme_8php.html | 12 +- .../html/recherche_8php-source.html | 100 +- doc/developper/html/recherche_8php.html | 29 +- doc/developper/html/sec__pdf_8php-source.html | 202 +- doc/developper/html/sec__pdf_8php.html | 35 +- .../html/send__jrn__pdf_8php-source.html | 259 +- doc/developper/html/send__jrn__pdf_8php.html | 51 +- .../html/send__poste__pdf_8php-source.html | 153 +- .../html/send__poste__pdf_8php.html | 35 +- doc/developper/html/setup_8php-source.html | 22 +- doc/developper/html/setup_8php.html | 18 +- .../html/show__document_8php-source.html | 69 +- doc/developper/html/show__document_8php.html | 251 +- .../html/show__tva_8php-source.html | 95 +- doc/developper/html/show__tva_8php.html | 31 +- doc/developper/html/stock_8php-source.html | 306 +- doc/developper/html/stock_8php.html | 35 +- .../html/stock__inc_8php-source.html | 451 +- doc/developper/html/stock__inc_8php.html | 82 +- doc/developper/html/test_8php-source.html | 4 +- doc/developper/html/test_8php.html | 4 +- .../html/test__smarty_8php-source.html | 4 +- doc/developper/html/test__smarty_8php.html | 4 +- doc/developper/html/tva_8inc_8php-source.html | 459 +- doc/developper/html/tva_8inc_8php.html | 63 +- .../html/user__action__ach_8php-source.html | 578 +- .../html/user__action__ach_8php.html | 85 +- .../html/user__action__fin_8php-source.html | 430 +- .../html/user__action__fin_8php.html | 69 +- .../html/user__action__gl_8php-source.html | 109 +- .../html/user__action__gl_8php.html | 45 +- .../html/user__action__ods_8php-source.html | 380 +- .../html/user__action__ods_8php.html | 61 +- .../html/user__action__ven_8php-source.html | 572 +- .../html/user__action__ven_8php.html | 63 +- .../html/user__advanced_8php-source.html | 81 +- doc/developper/html/user__advanced_8php.html | 20 +- .../html/user__common_8php-source.html | 1570 +-- doc/developper/html/user__common_8php.html | 307 +- .../html/user__compta_8php-source.html | 85 +- doc/developper/html/user__compta_8php.html | 23 +- .../html/user__form__ach_8php-source.html | 1107 +- doc/developper/html/user__form__ach_8php.html | 78 +- .../html/user__form__fin_8php-source.html | 724 +- doc/developper/html/user__form__fin_8php.html | 53 +- .../html/user__form__ods_8php-source.html | 492 +- doc/developper/html/user__form__ods_8php.html | 52 +- .../html/user__form__ven_8php-source.html | 1347 +- doc/developper/html/user__form__ven_8php.html | 84 +- .../html/user__impress_8php-source.html | 156 +- doc/developper/html/user__impress_8php.html | 47 +- .../html/user__jrn_8php-source.html | 218 +- doc/developper/html/user__jrn_8php.html | 29 +- .../html/user__login_8php-source.html | 56 +- doc/developper/html/user__login_8php.html | 23 +- .../html/user__menu_8php-source.html | 1202 +- doc/developper/html/user__menu_8php.html | 366 +- .../html/user__pref_8php-source.html | 78 +- doc/developper/html/user__pref_8php.html | 23 +- .../html/user__sec_8php-source.html | 477 +- doc/developper/html/user__sec_8php.html | 53 +- .../html/user__update_8php-source.html | 65 +- doc/developper/html/user__update_8php.html | 23 +- doc/header-file.txt | 8 + doc/mod_function | 17 +- html/admin/sql/patch/upgrade8.sql | 2 +- html/admin_repo.php | 4 + html/annulation.php | 3 + html/bal_csv.php | 3 + html/bilan.php | 4 +- html/central.php | 7 +- html/commercial.php | 41 +- html/ecrit_ouv.php | 14 +- html/export_ouv.php | 4 + html/facturation.php | 4 + html/fiche.php | 28 +- html/fiche_csv.php | 4 + html/fiche_new.php | 5 + html/fiche_search.php | 5 +- html/form.php | 22 +- html/form_csv.php | 3 + html/form_pdf.php | 3 + html/images/bgcolor.gif | Bin 0 -> 148 bytes html/images/blackdot.gif | Bin 0 -> 807 bytes html/images/bold.gif | Bin 0 -> 81 bytes html/images/centre.gif | Bin 0 -> 76 bytes html/images/copy.gif | Bin 0 -> 118 bytes html/images/cut.gif | Bin 0 -> 100 bytes html/images/email.gif | Bin 0 -> 374 bytes html/images/hr.gif | Bin 0 -> 77 bytes html/images/hyperlink.gif | Bin 0 -> 196 bytes html/images/image.gif | Bin 0 -> 203 bytes html/images/indent.gif | Bin 0 -> 96 bytes html/images/insert_table.gif | Bin 0 -> 923 bytes html/images/italic.gif | Bin 0 -> 84 bytes html/images/justifyfull.gif | Bin 0 -> 76 bytes html/images/left_just.gif | Bin 0 -> 76 bytes html/images/list.gif | Bin 0 -> 88 bytes html/images/numbered_list.gif | Bin 0 -> 90 bytes html/images/outdent.gif | Bin 0 -> 96 bytes html/images/paste.gif | Bin 0 -> 152 bytes html/images/redo.gif | Bin 0 -> 88 bytes html/images/right_just.gif | Bin 0 -> 76 bytes html/images/smiley.gif | Bin 0 -> 310 bytes html/images/spellcheck.gif | Bin 0 -> 107 bytes html/images/textcolor.gif | Bin 0 -> 109 bytes html/images/underline.gif | Bin 0 -> 93 bytes html/images/undo.gif | Bin 0 -> 89 bytes html/import.php | 19 +- html/index.php | 5 + html/jrn_add.php | 19 +- html/jrn_csv.php | 4 + html/jrn_detail.php | 17 +- html/jrn_op_detail.php | 5 +- html/jrn_pdf.php | 3 + html/jrn_search.php | 4 + html/jrn_update.php | 12 +- html/line_update.php | 3 + html/listing_client.php | 3 + html/login.php | 4 +- html/logout.php | 3 + html/modify_op.php | 3 + html/parametre.php | 42 +- html/pcmn_update.php | 8 +- html/poste_csv.php | 3 + html/poste_pdf.php | 4 +- html/poste_search.php | 4 +- html/print_balance.php | 22 +- html/print_invoice.php | 22 +- html/priv_user.php | 3 + html/recherche.php | 17 +- html/richtext.js | 608 + html/sec_pdf.php | 4 +- html/send_jrn_pdf.php | 3 + html/send_poste_pdf.php | 3 + html/show_document.php | 57 +- html/show_document_modele.php | 68 + html/show_tva.php | 3 + html/stock.php | 6 +- html/style-light.css | 194 +- html/user_advanced.php | 8 +- html/user_compta.php | 8 +- html/user_impress.php | 8 +- html/user_jrn.php | 160 +- html/user_login.php | 4 + html/user_pref.php | 9 +- html/user_sec.php | 3 + include/ac_common.php | 209 +- include/action.inc.php | 264 + include/balance.php | 7 +- include/cbc_be.inc.php | 3 + include/central_inc.php | 22 +- include/check_priv.php | 53 +- include/class_attribut.php | 29 +- include/class_balance.php | 27 +- include/class_customer.php | 150 +- include/class_document.php | 590 + include/class_document_modele.php | 283 + include/class_fiche.php | 581 +- include/class_fiche_def.php | 64 +- include/class_jrn.php | 41 +- include/class_operation.php | 4 + include/class_own.php | 31 +- include/class_parm_code.php | 70 +- include/class_poste.php | 52 +- include/class_rapport.php | 24 +- include/class_user.php | 124 +- include/class_widget.php | 65 +- include/client.inc.php | 142 +- include/constant.php | 15 +- include/debug.php | 23 +- include/decla.BE.inc.php | 7 +- include/document_modele.inc.php | 78 + include/error.php | 15 +- include/eub_be.inc.php | 4 + include/fiche_def.inc.php | 3 + include/fiche_inc.php | 179 +- include/form_inc.php | 116 +- include/fortis_be.inc.php | 4 + include/import_inc.php | 35 +- include/impress_bilan.php | 3 + include/impress_fiche.php | 2 +- include/impress_inc.php | 46 +- include/impress_jrn.php | 12 +- include/impress_listing_client.php | 3 + include/impress_poste.php | 8 +- include/impress_rapport.php | 18 +- include/ing_be.inc.php | 4 + include/jrn.php | 73 +- include/periode.inc.php | 5 + include/poste.inc.php | 6 +- include/poste.php | 66 +- include/postgres.php | 146 +- include/pref.inc.php | 5 +- include/preference.php | 126 +- include/stock_inc.php | 54 +- include/tva.inc.php | 3 + include/user_action_ach.php | 89 +- include/user_action_fin.php | 10 + include/user_action_gl.php | 7 +- include/user_action_ods.php | 39 +- include/user_action_ven.php | 118 +- include/user_common.php | 172 +- include/user_form_ach.php | 80 +- include/user_form_fin.php | 23 +- include/user_form_ods.php | 44 +- include/user_form_ven.php | 191 +- include/user_menu.php | 461 +- include/user_update.php | 3 + scripts/cleanup.sh | 2 +- sql/upgrade.sql | 272 +- 499 files changed, 48688 insertions(+), 25513 deletions(-) create mode 100644 doc/developper/account_repository.html create mode 100755 doc/developper/create_doc.sh create mode 100644 doc/developper/dossier1.dia create mode 100644 doc/developper/dossier1.html create mode 100644 html/images/bgcolor.gif create mode 100644 html/images/blackdot.gif create mode 100644 html/images/bold.gif create mode 100644 html/images/centre.gif create mode 100644 html/images/copy.gif create mode 100644 html/images/cut.gif create mode 100644 html/images/email.gif create mode 100644 html/images/hr.gif create mode 100644 html/images/hyperlink.gif create mode 100644 html/images/image.gif create mode 100644 html/images/indent.gif create mode 100644 html/images/insert_table.gif create mode 100644 html/images/italic.gif create mode 100644 html/images/justifyfull.gif create mode 100644 html/images/left_just.gif create mode 100644 html/images/list.gif create mode 100644 html/images/numbered_list.gif create mode 100644 html/images/outdent.gif create mode 100644 html/images/paste.gif create mode 100644 html/images/redo.gif create mode 100644 html/images/right_just.gif create mode 100644 html/images/smiley.gif create mode 100644 html/images/spellcheck.gif create mode 100644 html/images/textcolor.gif create mode 100644 html/images/underline.gif create mode 100644 html/images/undo.gif create mode 100644 html/richtext.js create mode 100644 html/show_document_modele.php create mode 100644 include/action.inc.php create mode 100644 include/class_document.php create mode 100644 include/class_document_modele.php create mode 100644 include/document_modele.inc.php diff --git a/INSTALL-fr.txt b/INSTALL-fr.txt index 1ef7f255f..bc0c6b212 100644 --- a/INSTALL-fr.txt +++ b/INSTALL-fr.txt @@ -26,6 +26,7 @@ 4. PHP 4.1 Installation de PHP 4.3.1 4.2 Configuration de PHP : Fichier php.ini + 4.3 configuration de .htaccess 5. Installation de PhpCompta 5.1 Première installation @@ -63,7 +64,6 @@ Le plus simple est d'utiliser les binaires de votre distribution, ne compiler ces programmes que si vraiment vous devez le faire ou que vous préfèrez avoir la dernière version disponible. - Si vous décidez de le compiler vous-même, les options suivantes fonctionnent @@ -211,6 +211,24 @@ + Note certains ont fait ceci pour configurer Apache + + + ServerAdmin webmaster@dummy-host.example.com + DocumentRoot /www/phpcompta/html/ + ServerName phpcompta + php_flag session.auto_start 1 + php_flag magic_quotes_gpc 0 + php_flag session.use_trans_sid 1 + php_value include_path ".:../include:../addon" + + + + Actuellement, le répertoire html, contient un fichier .htaccess qui + contient le nécessaire pour que les variables php soient correctes + (voir ``configuration de .htaccess''). + + Apache se démarre avec apachectl start Remarque : Pour plus d'information, voir le manuel d'Apache. @@ -248,7 +266,6 @@ suivantes - magic_quotes_gpc = Off magic_quotes_runtime = Off magic_quotes_sybase = Off @@ -277,6 +294,23 @@ + 4.3. configuration de .htaccess + + Dans le cas où vous ne pouvez pas changer le fichier php.ini, il faut + simplement modifier ls fichier PHPCOMPTA/html/.htaccess qui contient. + + + php_value include_path ".:../include:addon" + php_value session.use_trans_sid true + php_value session.auto_start true + php_value max_execution_time 120 + php_value magic_quotes_gpc 0 + + + Note:Normalement, vous ne devez pas changer ce fichier. + + + 5. Installation de PhpCompta 5.1. Première installation @@ -286,6 +320,7 @@ Etape + · Se connecter en tant que postgres et taper les commandes diff --git a/doc/FAQ-fr.sgml b/doc/FAQ-fr.sgml index d86adc1f5..9a4fe8262 100644 --- a/doc/FAQ-fr.sgml +++ b/doc/FAQ-fr.sgml @@ -296,5 +296,10 @@ allez simplement dans le r scripts sql soit grâce à pgAdmin soit en commande en ligne soit avec l'outil PhpPgAdmin. + +Developpeur +

Les développeurs trouveront toutes la documentation dans doc/developper. +Pour la base de données, j'utilise postgresql_autodoc et pour php, doxygen. + diff --git a/doc/developper/account_repository.html b/doc/developper/account_repository.html new file mode 100644 index 000000000..554f787b7 --- /dev/null +++ b/doc/developper/account_repository.html @@ -0,0 +1,987 @@ + + + + + + Index for account_repository + + + + + + + + + +



Dumped on 2006-06-21

+

Index of database - account_repository

+ + + + + + + +
+

Table: + ac_dossier +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ac_dossier Structure
F-KeyNameTypeDescription
+ + + + dos_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('dossier_id'::text) + + +
+ + + + dos_nametext + + + + + UNIQUE + + + + NOT NULL + + + +
+ + dos_descriptiontext + + + + + + +
+ + dos_jnt_userinteger + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + ac_users +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ac_users Structure
F-KeyNameTypeDescription
+ + + + use_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('users_id'::text) + + +
+ + use_first_nametext + + + + + + +
+ + use_nametext + + + + + + +
+ + + + use_logintext + + + + + UNIQUE + + + + NOT NULL + + + +
+ + use_activeinteger + + + + + + +
+ + use_passtext + + + + + + +
+ + use_admininteger + + + + + + +
+ + + + + + + +

 

+ + + + + + + + + + + + +
ac_users Constraints
NameConstraint
ac_users_use_active_checkCHECK (((use_active = 0) OR (use_active = 1)))
+ + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + jnt_use_dos +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
jnt_use_dos Structure
F-KeyNameTypeDescription
+ + jnt_idinteger + + + NOT NULL + DEFAULT nextval('seq_jnt_use_dos'::text) + + +
+ + + + use_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + + + dos_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + modeledef +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
modeledef Structure
F-KeyNameTypeDescription
+ + + + mod_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_modid'::text) + + +
+ + mod_nametext + + + NOT NULL + + + +
+ + mod_desctext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + priv_user +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
priv_user Structure
F-KeyNameTypeDescription
+ + priv_idinteger + + + NOT NULL + DEFAULT nextval('seq_priv_user'::text) + + +
+ + priv_jntinteger + + + NOT NULL + + + +
+ + priv_privtext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + theme +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
theme Structure
F-KeyNameTypeDescription
+ + the_nametext + + + NOT NULL + + + +
+ + the_filestyletext + + + + + + +
+ + the_filebuttontext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + user_global_pref +

+ +

The user's global parameter

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
user_global_pref Structure
F-KeyNameTypeDescription
+ + + ac_users.use_login + + + + + user_idtext + + + + + + PRIMARY KEY + + + + + + + + +

user's login +
+ + + + parameter_typetext + + PRIMARY KEY + + + + + + + + +

the type of parameter +
+ + parameter_valuetext + + + + + +

the value of parameter +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + version +

+ + + + + + + + + + + + + + + + + + + +
version Structure
F-KeyNameTypeDescription
+ + valinteger + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ + + + +
+

Function: + plpgsql_validator( oid ) +

+

Returns: void

+

Language: C

+ +
plpgsql_validator
+ + + +

Generated by PostgreSQL Autodoc

+

W3C HTML 4.01 Strict

+ diff --git a/doc/developper/create_doc.sh b/doc/developper/create_doc.sh new file mode 100755 index 000000000..bf6a75c01 --- /dev/null +++ b/doc/developper/create_doc.sh @@ -0,0 +1,3 @@ +doxygen +postgresql_autodoc -d dossier1 +postgresql_autodoc -d account_repository diff --git a/doc/developper/dossier1.dia b/doc/developper/dossier1.dia new file mode 100644 index 000000000..e0a533977 --- /dev/null +++ b/doc/developper/dossier1.dia @@ -0,0 +1,10532 @@ + + + + + + + + + + + + + + + + + + + + + + + + #action# + + + + #The different privileges# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # ac_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # ac_description# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #action_gestion# + + + + #Action for Managing# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # ag_id# + + + #serial# + + + + + + + + + + + + + + + + + + + + # ag_type# + + + #integer# + + + + + + + + + + + + + + + + + + + + # f_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # ag_timestamp# + + + #timestamp without time zone# + + + + #now()# + + + + + + + + + + + + + + + + # ag_cal# + + + #character(1)# + + + + #'C'::bpchar# + + + + + + + + + + + + + + + + # ag_comment# + + + #text# + + + + + + + + + + + + + + + + + + + + # ag_title# + + + #character varying(60)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #attr_def# + + + + #The available attributs for the cards# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # ad_id# + + + #integer# + + + + #nextval('s_attr_d ... text)# + + + + + + + + + + + + + + + + # ad_text# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #attr_min# + + + + #The value of attributs for the cards# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # frd_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # ad_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #attr_value# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # jft_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # av_text# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #centralized# + + + + #The centralized journal# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # c_id# + + + #integer# + + + + #nextval('s_centra ... text)# + + + + + + + + + + + + + + + + # c_j_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # c_date# + + + #date# + + + + + + + + + + + + + + + + + + + + # c_internal# + + + #text# + + + + + + + + + + + + + + + + + + + + # c_montant# + + + #numeric(20,4)# + + + + + + + + + + + + + + + + + + + + # c_debit# + + + #boolean# + + + + #true# + + + + + + + + + + + + + + + + # c_jrn_def# + + + #integer# + + + + + + + + + + + + + + + + + + + + # c_poste# + + + #poste_comptable# + + + + + + + + + + + + + + + + + + + + # c_description# + + + #text# + + + + + + + + + + + + + + + + + + + + # c_grp# + + + #integer# + + + + + + + + + + + + + + + + + + + + # c_comment# + + + #text# + + + + + + + + + + + + + + + + + + + + # c_rapt# + + + #text# + + + + + + + + + + + + + + + + + + + + # c_periode# + + + #integer# + + + + + + + + + + + + + + + + + + + + # c_order# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #document# + + + + #This table contains all the documen ... files# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # d_id# + + + #serial# + + + + + + + + + + + + + + + + + + + + # d_lob# + + + #oid# + + + + + + + + + + + + + + + + + + + + # d_number# + + + #bigint# + + + + + + + + + + + + + + + + + + + + # d_filename# + + + #text# + + + + + + + + + + + + + + + + + + + + # d_mimetype# + + + #text# + + + + + + + + + + + + + + + + + + + + # ag_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #document_modele# + + + + # contains all the template for the ... ments# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # md_id# + + + #serial# + + + + + + + + + + + + + + + + + + + + # md_name# + + + #text# + + + + + + + + + + + + + + + + + + + + # md_lob# + + + #oid# + + + + + + + + + + + + + + + + + + + + # md_type# + + + #integer# + + + + + + + + + + + + + + + + + + + + # md_filename# + + + #text# + + + + + + + + + + + + + + + + + + + + # md_mimetype# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #document_state# + + + + #State of the document# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # s_id# + + + #serial# + + + + + + + + + + + + + + + + + + + + # s_value# + + + #character varying(50)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #document_type# + + + + #Type of document : meeting, invoice,...# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # dt_id# + + + #serial# + + + + + + + + + + + + + + + + + + + + # dt_value# + + + #character varying(80)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #fiche# + + + + #Cards# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # f_id# + + + #integer# + + + + #nextval('s_fiche'::text)# + + + + + + + + + + + + + + + + # fd_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #fiche_def# + + + + #Cards definition# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # fd_id# + + + #integer# + + + + #nextval('s_fdef'::text)# + + + + + + + + + + + + + + + + # fd_class_base# + + + #poste_comptable# + + + + + + + + + + + + + + + + + + + + # fd_label# + + + #text# + + + + + + + + + + + + + + + + + + + + # fd_create_account# + + + #boolean# + + + + #false# + + + + + + + + + + + + + + + + # frd_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #fiche_def_ref# + + + + #Family Cards definition# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # frd_id# + + + #integer# + + + + #nextval('s_fiche_ ... text)# + + + + + + + + + + + + + + + + # frd_text# + + + #text# + + + + + + + + + + + + + + + + + + + + # frd_class_base# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #form# + + + + #Forms content# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # fo_id# + + + #integer# + + + + #nextval('s_form'::text)# + + + + + + + + + + + + + + + + # fo_fr_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # fo_pos# + + + #integer# + + + + + + + + + + + + + + + + + + + + # fo_label# + + + #text# + + + + + + + + + + + + + + + + + + + + # fo_formula# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #format_csv_banque# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # name# + + + #text# + + + + + + + + + + + + + + + + + + + + # include_file# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #formdef# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # fr_id# + + + #integer# + + + + #nextval('s_formdef'::text)# + + + + + + + + + + + + + + + + # fr_label# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #import_tmp# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # code# + + + #text# + + + + + + + + + + + + + + + + + + + + # date_exec# + + + #date# + + + + + + + + + + + + + + + + + + + + # date_valeur# + + + #date# + + + + + + + + + + + + + + + + + + + + # montant# + + + #text# + + + + + + + + + + + + + + + + + + + + # devise# + + + #text# + + + + + + + + + + + + + + + + + + + + # compte_ordre# + + + #text# + + + + + + + + + + + + + + + + + + + + # detail# + + + #text# + + + + + + + + + + + + + + + + + + + + # num_compte# + + + #text# + + + + + + + + + + + + + + + + + + + + # poste_comptable# + + + #text# + + + + + + + + + + + + + + + + + + + + # ok# + + + #boolean# + + + + #false# + + + + + + + + + + + + + + + + # bq_account# + + + #integer# + + + + + + + + + + + + + + + + + + + + # jrn# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #invoice# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # iv_id# + + + #integer# + + + + #nextval('s_invoice'::text)# + + + + + + + + + + + + + + + + # iv_name# + + + #text# + + + + + + + + + + + + + + + + + + + + # iv_file# + + + #oid# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #jnt_fic_att_value# + + + + #join between the card and the attri ... ition# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # jft_id# + + + #integer# + + + + #nextval('s_jnt_fi ... text)# + + + + + + + + + + + + + + + + # f_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # ad_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #jnt_fic_attr# + + + + #join between the family card and th ... ition# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # fd_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # ad_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #jrn# + + + + #Journal: content one line for a gro ... iting# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # jr_id# + + + #integer# + + + + #nextval('s_jrn'::text)# + + + + + + + + + + + + + + + + # jr_def_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # jr_montant# + + + #numeric(20,4)# + + + + + + + + + + + + + + + + + + + + # jr_comment# + + + #text# + + + + + + + + + + + + + + + + + + + + # jr_date# + + + #date# + + + + + + + + + + + + + + + + + + + + # jr_grpt_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # jr_internal# + + + #text# + + + + + + + + + + + + + + + + + + + + # jr_tech_date# + + + #timestamp without time zone# + + + + #now()# + + + + + + + + + + + + + + + + # jr_tech_per# + + + #integer# + + + + + + + + + + + + + + + + + + + + # jrn_ech# + + + #date# + + + + + + + + + + + + + + + + + + + + # jr_ech# + + + #date# + + + + + + + + + + + + + + + + + + + + # jr_rapt# + + + #text# + + + + + + + + + + + + + + + + + + + + # jr_valid# + + + #boolean# + + + + #true# + + + + + + + + + + + + + + + + # jr_opid# + + + #integer# + + + + + + + + + + + + + + + + + + + + # jr_c_opid# + + + #integer# + + + + + + + + + + + + + + + + + + + + # jr_pj# + + + #oid# + + + + + + + + + + + + + + + + + + + + # jr_pj_name# + + + #text# + + + + + + + + + + + + + + + + + + + + # jr_pj_type# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #jrn_action# + + + + #Possible action when we are in jour ... menu)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # ja_id# + + + #integer# + + + + #nextval('s_jrnact ... text)# + + + + + + + + + + + + + + + + # ja_name# + + + #text# + + + + + + + + + + + + + + + + + + + + # ja_desc# + + + #text# + + + + + + + + + + + + + + + + + + + + # ja_url# + + + #text# + + + + + + + + + + + + + + + + + + + + # ja_action# + + + #text# + + + + + + + + + + + + + + + + + + + + # ja_lang# + + + #text# + + + + #'FR'::text# + + + + + + + + + + + + + + + + # ja_jrn_type# + + + #character(3)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #jrn_def# + + + + #Definition of a journal, his properties# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # jrn_def_id# + + + #integer# + + + + #nextval('s_jrn_def'::text)# + + + + + + + + + + + + + + + + # jrn_def_name# + + + #text# + + + + + + + + + + + + + + + + + + + + # jrn_def_class_deb# + + + #text# + + + + + + + + + + + + + + + + + + + + # jrn_def_class_cred# + + + #text# + + + + + + + + + + + + + + + + + + + + # jrn_def_fiche_deb# + + + #text# + + + + + + + + + + + + + + + + + + + + # jrn_def_fiche_cred# + + + #text# + + + + + + + + + + + + + + + + + + + + # jrn_deb_max_line# + + + #integer# + + + + #1# + + + + + + + + + + + + + + + + # jrn_cred_max_line# + + + #integer# + + + + #1# + + + + + + + + + + + + + + + + # jrn_def_ech# + + + #boolean# + + + + #false# + + + + + + + + + + + + + + + + # jrn_def_ech_lib# + + + #text# + + + + + + + + + + + + + + + + + + + + # jrn_def_type# + + + #character(3)# + + + + + + + + + + + + + + + + + + + + # jrn_def_code# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #jrn_rapt# + + + + #Rapprochement between operation# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # jra_id# + + + #integer# + + + + #nextval('s_jrn_ra ... text)# + + + + + + + + + + + + + + + + # jr_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # jra_concerned# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #jrn_type# + + + + #Type of journal (Sell, Buy, Financial...)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # jrn_type_id# + + + #character(3)# + + + + + + + + + + + + + + + + + + + + # jrn_desc# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #jrnx# + + + + #Journal: content one line for each ... iting# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # j_id# + + + #integer# + + + + #nextval('s_jrn_op'::text)# + + + + + + + + + + + + + + + + # j_date# + + + #date# + + + + #now()# + + + + + + + + + + + + + + + + # j_montant# + + + #numeric(20,4)# + + + + + + + + + + + + + + + + + + + + # j_poste# + + + #poste_comptable# + + + + + + + + + + + + + + + + + + + + # j_grpt# + + + #integer# + + + + + + + + + + + + + + + + + + + + # j_rapt# + + + #text# + + + + + + + + + + + + + + + + + + + + # j_jrn_def# + + + #integer# + + + + + + + + + + + + + + + + + + + + # j_debit# + + + #boolean# + + + + #true# + + + + + + + + + + + + + + + + # j_text# + + + #text# + + + + + + + + + + + + + + + + + + + + # j_centralized# + + + #boolean# + + + + #false# + + + + + + + + + + + + + + + + # j_internal# + + + #text# + + + + + + + + + + + + + + + + + + + + # j_tech_user# + + + #text# + + + + + + + + + + + + + + + + + + + + # j_tech_date# + + + #timestamp without time zone# + + + + #now()# + + + + + + + + + + + + + + + + # j_tech_per# + + + #integer# + + + + + + + + + + + + + + + + + + + + # j_qcode# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #parameter# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # pr_id# + + + #text# + + + + + + + + + + + + + + + + + + + + # pr_value# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #parm_code# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # p_code# + + + #text# + + + + + + + + + + + + + + + + + + + + # p_value# + + + #text# + + + + + + + + + + + + + + + + + + + + # p_comment# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #parm_money# + + + + #Currency conversion# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # pm_id# + + + #integer# + + + + #nextval('s_curren ... text)# + + + + + + + + + + + + + + + + # pm_code# + + + #character(3)# + + + + + + + + + + + + + + + + + + + + # pm_rate# + + + #numeric(20,4)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #parm_periode# + + + + #Periode definition# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # p_id# + + + #integer# + + + + #nextval('s_periode'::text)# + + + + + + + + + + + + + + + + # p_start# + + + #date# + + + + + + + + + + + + + + + + + + + + # p_end# + + + #date# + + + + + + + + + + + + + + + + + + + + # p_exercice# + + + #text# + + + + #to_char(now(), 'Y ... text)# + + + + + + + + + + + + + + + + # p_closed# + + + #boolean# + + + + #false# + + + + + + + + + + + + + + + + # p_central# + + + #boolean# + + + + #false# + + + + + + + + + + + + + + + + + + + + + + + #parm_periode_check# + + + + + + + + + + + + + + #CHECK ((p_end >= p_start))# + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #quant_sold# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # qs_id# + + + #integer# + + + + #nextval('s_quanti ... text)# + + + + + + + + + + + + + + + + # qs_internal# + + + #text# + + + + + + + + + + + + + + + + + + + + # qs_fiche# + + + #integer# + + + + + + + + + + + + + + + + + + + + # qs_quantite# + + + #integer# + + + + + + + + + + + + + + + + + + + + # qs_price# + + + #numeric(20,4)# + + + + + + + + + + + + + + + + + + + + # qs_vat# + + + #numeric(20,4)# + + + + + + + + + + + + + + + + + + + + # qs_vat_code# + + + #integer# + + + + + + + + + + + + + + + + + + + + # qs_client# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #stock_goods# + + + + #About the goods# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # sg_id# + + + #integer# + + + + #nextval('s_stock_ ... text)# + + + + + + + + + + + + + + + + # j_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # f_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # sg_code# + + + #text# + + + + + + + + + + + + + + + + + + + + # sg_quantity# + + + #integer# + + + + + + + + + + + + + + + + + + + + # sg_type# + + + #character(1)# + + + + #'c'::bpchar# + + + + + + + + + + + + + + + + # sg_date# + + + #date# + + + + + + + + + + + + + + + + + + + + # sg_tech_date# + + + #date# + + + + #now()# + + + + + + + + + + + + + + + + # sg_tech_user# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + #stock_goods_sg_type# + + + + + + + + + + + + + + #CHECK (((sg_type = 'c'::bpchar ... ar)))# + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #tmp_pcmn# + + + + #Plan comptable minimum normalisé# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # pcm_val# + + + #poste_comptable# + + + + + + + + + + + + + + + + + + + + # pcm_lib# + + + #text# + + + + + + + + + + + + + + + + + + + + # pcm_val_parent# + + + #poste_comptable# + + + + + + + + + + + + + + + + + + + + # pcm_country# + + + #character(2)# + + + + #'BE'::bpchar# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #tva_rate# + + + + #Rate of vat# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # tva_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # tva_label# + + + #text# + + + + + + + + + + + + + + + + + + + + # tva_rate# + + + #numeric(8,4)# + + + + #0.0# + + + + + + + + + + + + + + + + # tva_comment# + + + #text# + + + + + + + + + + + + + + + + + + + + # tva_poste# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #user_local_pref# + + + + #The user's local parameter # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # user_id# + + + #text# + + + + + + + + + + + + + + + + + + + + # parameter_type# + + + #text# + + + + + + + + + + + + + + + + + + + + # parameter_value# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #user_pref# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # pref_user# + + + #text# + + + + + + + + + + + + + + + + + + + + # pref_periode# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #user_sec_act# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # ua_id# + + + #integer# + + + + #nextval('s_user_a ... text)# + + + + + + + + + + + + + + + + # ua_login# + + + #text# + + + + + + + + + + + + + + + + + + + + # ua_act_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #user_sec_jrn# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # uj_id# + + + #integer# + + + + #nextval('s_user_j ... text)# + + + + + + + + + + + + + + + + # uj_login# + + + #text# + + + + + + + + + + + + + + + + + + + + # uj_jrn_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # uj_priv# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #version# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # val# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #vw_client# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # f_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # name# + + + #text# + + + + + + + + + + + + + + + + + + + + # quick_code# + + + #text# + + + + + + + + + + + + + + + + + + + + # tva_num# + + + #text# + + + + + + + + + + + + + + + + + + + + # poste_comptable# + + + #text# + + + + + + + + + + + + + + + + + + + + # rue# + + + #text# + + + + + + + + + + + + + + + + + + + + # code_postal# + + + #text# + + + + + + + + + + + + + + + + + + + + # pays# + + + #text# + + + + + + + + + + + + + + + + + + + + # telephone# + + + #text# + + + + + + + + + + + + + + + + + + + + # email# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #vw_fiche_attr# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # f_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # fd_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # vw_name# + + + #text# + + + + + + + + + + + + + + + + + + + + # vw_sell# + + + #text# + + + + + + + + + + + + + + + + + + + + # vw_buy# + + + #text# + + + + + + + + + + + + + + + + + + + + # tva_code# + + + #text# + + + + + + + + + + + + + + + + + + + + # tva_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # tva_rate# + + + #numeric(8,4)# + + + + + + + + + + + + + + + + + + + + # tva_label# + + + #text# + + + + + + + + + + + + + + + + + + + + # vw_addr# + + + #text# + + + + + + + + + + + + + + + + + + + + # vw_cp# + + + #text# + + + + + + + + + + + + + + + + + + + + # quick_code# + + + #text# + + + + + + + + + + + + + + + + + + + + # frd_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #vw_fiche_def# + + + + #all the attributs for card family# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # fd_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # ad_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # ad_text# + + + #text# + + + + + + + + + + + + + + + + + + + + # av_text# + + + #text# + + + + + + + + + + + + + + + + + + + + # fd_class_base# + + + #poste_comptable# + + + + + + + + + + + + + + + + + + + + # fd_label# + + + #text# + + + + + + + + + + + + + + + + + + + + # fd_create_account# + + + #boolean# + + + + + + + + + + + + + + + + + + + + # frd_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #vw_fiche_min# + + + + #minimum attribut for reference card# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # frd_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # ad_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # ad_text# + + + #text# + + + + + + + + + + + + + + + + + + + + # frd_text# + + + #text# + + + + + + + + + + + + + + + + + + + + # frd_class_base# + + + #integer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #vw_poste_qcode# + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # f_id# + + + #integer# + + + + + + + + + + + + + + + + + + + + # j_poste# + + + #text# + + + + + + + + + + + + + + + + + + + + # j_qcode# + + + #text# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + #md_type# + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + diff --git a/doc/developper/dossier1.html b/doc/developper/dossier1.html new file mode 100644 index 000000000..1454b9088 --- /dev/null +++ b/doc/developper/dossier1.html @@ -0,0 +1,7509 @@ + + + + + + Index for dossier1 + + + + + + + + + +



Dumped on 2006-06-21

+

Index of database - dossier1

+ + + + + + + +
+

Table: + action +

+ +

The different privileges

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
action Structure
F-KeyNameTypeDescription
+ + + + ac_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + ac_descriptiontext + + + NOT NULL + + + +
+ + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + action_gestion +

+ +

Action for Managing

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
action_gestion Structure
F-KeyNameTypeDescription
+ + + + ag_idserial + + PRIMARY KEY + + + + + + + + + +
+ + ag_typeinteger + + + + + + +
+ + f_idinteger + + + NOT NULL + + + +
+ + ag_timestamptimestamp without time zone + + + + DEFAULT now() + + +
+ + ag_calcharacter(1) + + + + DEFAULT 'C'::bpchar + + +
+ + ag_commenttext + + + + + + +
+ + ag_titlecharacter varying(60) + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + attr_def +

+ +

The available attributs for the cards

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
attr_def Structure
F-KeyNameTypeDescription
+ + + + ad_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_attr_def'::text) + + +
+ + ad_texttext + + + + + + +
+ + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + attr_min +

+ +

The value of attributs for the cards

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
attr_min Structure
F-KeyNameTypeDescription
+ + + fiche_def_ref.frd_id + + + frd_idinteger + + + + + + + + + + +
+ + + attr_def.ad_id + + + ad_idinteger + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + attr_value +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
attr_value Structure
F-KeyNameTypeDescription
+ + + jnt_fic_att_value.jft_id + + + jft_idinteger + + + + + + + + + + +
+ + av_texttext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + centralized +

+ +

The centralized journal

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
centralized Structure
F-KeyNameTypeDescription
+ + + + c_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_centralized'::text) + + +
+ + c_j_idinteger + + + + + + +
+ + c_datedate + + + NOT NULL + + + +
+ + c_internaltext + + + NOT NULL + + + +
+ + c_montantnumeric(20,4) + + + NOT NULL + + + +
+ + c_debitboolean + + + + DEFAULT true + + +
+ + + jrn_def.jrn_def_id + + + c_jrn_definteger + + + + + + + NOT NULL + + + +
+ + + tmp_pcmn.pcm_val + + + c_posteposte_comptable + + + + + + + + + + +
+ + c_descriptiontext + + + + + + +
+ + c_grpinteger + + + NOT NULL + + + +
+ + c_commenttext + + + + + + +
+ + c_rapttext + + + + + + +
+ + c_periodeinteger + + + + + + +
+ + c_orderinteger + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + document +

+ +

This table contains all the documents : summary and lob files

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
document Structure
F-KeyNameTypeDescription
+ + + + d_idserial + + PRIMARY KEY + + + + + + + + + +
+ + d_loboid + + + + + + +
+ + d_numberbigint + + + NOT NULL + + + +
+ + d_filenametext + + + + + + +
+ + d_mimetypetext + + + + + + +
+ + ag_idinteger + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + document_modele +

+ +

contains all the template for the documents

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
document_modele Structure
F-KeyNameTypeDescription
+ + + + md_idserial + + PRIMARY KEY + + + + + + + + + +
+ + md_nametext + + + NOT NULL + + + +
+ + md_loboid + + + + + + +
+ + + document_type.dt_id + + + md_typeinteger + + + + + + + NOT NULL + + + +
+ + md_filenametext + + + + + + +
+ + md_mimetypetext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + document_state +

+ +

State of the document

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
document_state Structure
F-KeyNameTypeDescription
+ + + + s_idserial + + PRIMARY KEY + + + + + + + + + +
+ + s_valuecharacter varying(50) + + + NOT NULL + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + document_type +

+ +

Type of document : meeting, invoice,...

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
document_type Structure
F-KeyNameTypeDescription
+ + + + dt_idserial + + PRIMARY KEY + + + + + + + + + +
+ + dt_valuecharacter varying(80) + + + + + + +
+ + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + fiche +

+ +

Cards

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
fiche Structure
F-KeyNameTypeDescription
+ + + + f_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_fiche'::text) + + +
+ + + fiche_def.fd_id + + + fd_idinteger + + + + + + + + + + +
+ + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + fiche_def +

+ +

Cards definition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fiche_def Structure
F-KeyNameTypeDescription
+ + + + fd_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_fdef'::text) + + +
+ + fd_class_baseposte_comptable + + + + + + +
+ + fd_labeltext + + + NOT NULL + + + +
+ + fd_create_accountboolean + + + + DEFAULT false + + +
+ + + fiche_def_ref.frd_id + + + frd_idinteger + + + + + + + NOT NULL + + + +
+ + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + fiche_def_ref +

+ +

Family Cards definition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fiche_def_ref Structure
F-KeyNameTypeDescription
+ + + + frd_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_fiche_def_ref'::text) + + +
+ + frd_texttext + + + + + + +
+ + frd_class_baseinteger + + + + + + +
+ + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + form +

+ +

Forms content

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
form Structure
F-KeyNameTypeDescription
+ + + + fo_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_form'::text) + + +
+ + + formdef.fr_id + + + fo_fr_idinteger + + + + + + + + + + +
+ + fo_posinteger + + + + + + +
+ + fo_labeltext + + + + + + +
+ + fo_formulatext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + format_csv_banque +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
format_csv_banque Structure
F-KeyNameTypeDescription
+ + + + nametext + + PRIMARY KEY + + + + + + + + + +
+ + include_filetext + + + NOT NULL + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + formdef +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
formdef Structure
F-KeyNameTypeDescription
+ + + + fr_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_formdef'::text) + + +
+ + fr_labeltext + + + + + + +
+ + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + import_tmp +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
import_tmp Structure
F-KeyNameTypeDescription
+ + codetext + + + + + + +
+ + date_execdate + + + + + + +
+ + date_valeurdate + + + + + + +
+ + montanttext + + + + + + +
+ + devisetext + + + + + + +
+ + compte_ordretext + + + + + + +
+ + detailtext + + + + + + +
+ + num_comptetext + + + + + + +
+ + poste_comptabletext + + + + + + +
+ + okboolean + + + + DEFAULT false + + +
+ + bq_accountinteger + + + NOT NULL + + + +
+ + jrninteger + + + NOT NULL + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + invoice +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
invoice Structure
F-KeyNameTypeDescription
+ + + + iv_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_invoice'::text) + + +
+ + iv_nametext + + + NOT NULL + + + +
+ + iv_fileoid + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + jnt_fic_att_value +

+ +

join between the card and the attribut definition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
jnt_fic_att_value Structure
F-KeyNameTypeDescription
+ + + + jft_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_jnt_fic_att_value'::text) + + +
+ + + fiche.f_id + + + f_idinteger + + + + + + + + + + +
+ + + attr_def.ad_id + + + ad_idinteger + + + + + + + + + + +
+ + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + jnt_fic_attr +

+ +

join between the family card and the attribut definition

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
jnt_fic_attr Structure
F-KeyNameTypeDescription
+ + + fiche_def.fd_id + + + fd_idinteger + + + + + + + + + + +
+ + + attr_def.ad_id + + + ad_idinteger + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + jrn +

+ +

Journal: content one line for a group of accountancy writing

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
jrn Structure
F-KeyNameTypeDescription
+ + + + jr_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_jrn'::text) + + +
+ + + jrn_def.jrn_def_id + + + + + jr_def_idinteger + + + + + + PRIMARY KEY + + + + + + + + + +
+ + jr_montantnumeric(20,4) + + + NOT NULL + + + +
+ + jr_commenttext + + + + + + +
+ + jr_datedate + + + + + + +
+ + jr_grpt_idinteger + + + NOT NULL + + + +
+ + jr_internaltext + + + + + + +
+ + jr_tech_datetimestamp without time zone + + + NOT NULL + DEFAULT now() + + +
+ + jr_tech_perinteger + + + NOT NULL + + + +
+ + jrn_echdate + + + + + + +
+ + jr_echdate + + + + + + +
+ + jr_rapttext + + + + + + +
+ + jr_validboolean + + + + DEFAULT true + + +
+ + jr_opidinteger + + + + + + +
+ + jr_c_opidinteger + + + + + + +
+ + jr_pjoid + + + + + + +
+ + jr_pj_nametext + + + + + + +
+ + jr_pj_typetext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + jrn_action +

+ +

Possible action when we are in journal (menu)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
jrn_action Structure
F-KeyNameTypeDescription
+ + + + ja_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_jrnaction'::text) + + +
+ + ja_nametext + + + NOT NULL + + + +
+ + ja_desctext + + + + + + +
+ + ja_urltext + + + NOT NULL + + + +
+ + ja_actiontext + + + NOT NULL + + + +
+ + ja_langtext + + + + DEFAULT 'FR'::text + + +
+ + + jrn_type.jrn_type_id + + + ja_jrn_typecharacter(3) + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + jrn_def +

+ +

Definition of a journal, his properties

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
jrn_def Structure
F-KeyNameTypeDescription
+ + + + jrn_def_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_jrn_def'::text) + + +
+ + + + jrn_def_nametext + + + + + UNIQUE + + + + NOT NULL + + + +
+ + jrn_def_class_debtext + + + + + + +
+ + jrn_def_class_credtext + + + + + + +
+ + jrn_def_fiche_debtext + + + + + + +
+ + jrn_def_fiche_credtext + + + + + + +
+ + jrn_deb_max_lineinteger + + + + DEFAULT 1 + + +
+ + jrn_cred_max_lineinteger + + + + DEFAULT 1 + + +
+ + jrn_def_echboolean + + + + DEFAULT false + + +
+ + jrn_def_ech_libtext + + + + + + +
+ + + jrn_type.jrn_type_id + + + jrn_def_typecharacter(3) + + + + + + + NOT NULL + + + +
+ + jrn_def_codetext + + + NOT NULL + + + +
+ + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + jrn_rapt +

+ +

Rapprochement between operation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
jrn_rapt Structure
F-KeyNameTypeDescription
+ + + + jra_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_jrn_rapt'::text) + + +
+ + jr_idinteger + + + NOT NULL + + + +
+ + jra_concernedinteger + + + NOT NULL + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + jrn_type +

+ +

Type of journal (Sell, Buy, Financial...)

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
jrn_type Structure
F-KeyNameTypeDescription
+ + + + jrn_type_idcharacter(3) + + PRIMARY KEY + + + + + + + + + +
+ + jrn_desctext + + + + + + +
+ + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + jrnx +

+ +

Journal: content one line for each accountancy writing

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
jrnx Structure
F-KeyNameTypeDescription
+ + + + j_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_jrn_op'::text) + + +
+ + j_datedate + + + + DEFAULT now() + + +
+ + j_montantnumeric(20,4) + + + + + + +
+ + + tmp_pcmn.pcm_val + + + j_posteposte_comptable + + + + + + + NOT NULL + + + +
+ + j_grptinteger + + + NOT NULL + + + +
+ + j_rapttext + + + + + + +
+ + + jrn_def.jrn_def_id + + + j_jrn_definteger + + + + + + + NOT NULL + + + +
+ + j_debitboolean + + + + DEFAULT true + + +
+ + j_texttext + + + + + + +
+ + j_centralizedboolean + + + + DEFAULT false + + +
+ + j_internaltext + + + + + + +
+ + j_tech_usertext + + + NOT NULL + + + +
+ + j_tech_datetimestamp without time zone + + + NOT NULL + DEFAULT now() + + +
+ + j_tech_perinteger + + + NOT NULL + + + +
+ + j_qcodetext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + parameter +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
parameter Structure
F-KeyNameTypeDescription
+ + + + pr_idtext + + PRIMARY KEY + + + + + + + + + +
+ + pr_valuetext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + parm_code +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parm_code Structure
F-KeyNameTypeDescription
+ + + + p_codetext + + PRIMARY KEY + + + + + + + + + +
+ + p_valuetext + + + + + + +
+ + p_commenttext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + parm_money +

+ +

Currency conversion

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parm_money Structure
F-KeyNameTypeDescription
+ + pm_idinteger + + + + DEFAULT nextval('s_currency'::text) + + +
+ + + + pm_codecharacter(3) + + PRIMARY KEY + + + + + + + + + +
+ + pm_ratenumeric(20,4) + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + parm_periode +

+ +

Periode definition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parm_periode Structure
F-KeyNameTypeDescription
+ + + + p_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_periode'::text) + + +
+ + + + p_startdate + + + + + UNIQUE + + + + NOT NULL + + + +
+ + p_enddate + + + + + + +
+ + p_exercicetext + + + NOT NULL + DEFAULT to_char(now(), 'YYYY'::text) + + +
+ + p_closedboolean + + + + DEFAULT false + + +
+ + p_centralboolean + + + + DEFAULT false + + +
+ + + + + + + +

 

+ + + + + + + + + + + + +
parm_periode Constraints
NameConstraint
parm_periode_checkCHECK ((p_end >= p_start))
+ + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + quant_sold +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
quant_sold Structure
F-KeyNameTypeDescription
+ + qs_idinteger + + + + DEFAULT nextval('s_quantity'::text) + + +
+ + qs_internaltext + + + NOT NULL + + + +
+ + qs_ficheinteger + + + NOT NULL + + + +
+ + qs_quantiteinteger + + + NOT NULL + + + +
+ + qs_pricenumeric(20,4) + + + + + + +
+ + qs_vatnumeric(20,4) + + + + + + +
+ + qs_vat_codeinteger + + + + + + +
+ + qs_clientinteger + + + NOT NULL + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + stock_goods +

+ +

About the goods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stock_goods Structure
F-KeyNameTypeDescription
+ + + + sg_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_stock_goods'::text) + + +
+ + j_idinteger + + + + + + +
+ + f_idinteger + + + NOT NULL + + + +
+ + sg_codetext + + + + + + +
+ + sg_quantityinteger + + + + + + +
+ + sg_typecharacter(1) + + + NOT NULL + DEFAULT 'c'::bpchar + + +
+ + sg_datedate + + + + + + +
+ + sg_tech_datedate + + + + DEFAULT now() + + +
+ + sg_tech_usertext + + + + + + +
+ + + + + + + +

 

+ + + + + + + + + + + + +
stock_goods Constraints
NameConstraint
stock_goods_sg_typeCHECK (((sg_type = 'c'::bpchar) OR (sg_type = 'd'::bpchar)))
+ + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + tmp_pcmn +

+ +

Plan comptable minimum normalisé

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
tmp_pcmn Structure
F-KeyNameTypeDescription
+ + + + pcm_valposte_comptable + + PRIMARY KEY + + + + + + + + + +
+ + pcm_libtext + + + + + + +
+ + pcm_val_parentposte_comptable + + + + + + +
+ + pcm_countrycharacter(2) + + + NOT NULL + DEFAULT 'BE'::bpchar + + +
+ + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + tva_rate +

+ +

Rate of vat

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
tva_rate Structure
F-KeyNameTypeDescription
+ + tva_idinteger + + + NOT NULL + + + +
+ + tva_labeltext + + + NOT NULL + + + +
+ + tva_ratenumeric(8,4) + + + NOT NULL + DEFAULT 0.0 + + +
+ + tva_commenttext + + + + + + +
+ + tva_postetext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + user_local_pref +

+ +

The user's local parameter

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
user_local_pref Structure
F-KeyNameTypeDescription
+ + + + user_idtext + + PRIMARY KEY + + + + + + + + +

user's login +
+ + + + parameter_typetext + + PRIMARY KEY + + + + + + + + +

the type of parameter +
+ + parameter_valuetext + + + + + +

the value of parameter +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + user_pref +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
user_pref Structure
F-KeyNameTypeDescription
+ + + + pref_usertext + + PRIMARY KEY + + + + + + + + + +
+ + pref_periodeinteger + + + NOT NULL + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + user_sec_act +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
user_sec_act Structure
F-KeyNameTypeDescription
+ + + + ua_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_user_act'::text) + + +
+ + ua_logintext + + + + + + +
+ + + action.ac_id + + + ua_act_idinteger + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + user_sec_jrn +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
user_sec_jrn Structure
F-KeyNameTypeDescription
+ + + + uj_idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('s_user_jrn'::text) + + +
+ + uj_logintext + + + + + + +
+ + + jrn_def.jrn_def_id + + + uj_jrn_idinteger + + + + + + + + + + +
+ + uj_privtext + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + version +

+ + + + + + + + + + + + + + + + + + + +
version Structure
F-KeyNameTypeDescription
+ + valinteger + + + + + + +
+ + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

View: + vw_client +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
vw_client Structure
F-KeyNameTypeDescription
+ + f_idinteger + + + + + + +
+ + nametext + + + + + + +
+ + quick_codetext + + + + + + +
+ + tva_numtext + + + + + + +
+ + poste_comptabletext + + + + + + +
+ + ruetext + + + + + + +
+ + code_postaltext + + + + + + +
+ + paystext + + + + + + +
+ + telephonetext + + + + + + +
+ + emailtext + + + + + + +
+ + + + + + + + + + + +
+SELECT a.f_id
+, a.av_text AS name
+, a1.av_text AS quick_code
+, b.av_text AS tva_num
+, c.av_text AS poste_comptable
+, d.av_text AS rue
+, e.av_text AS code_postal
+, f.av_text AS pays
+, g.av_text AS telephone
+, h.av_text AS email 
+FROM (
+     (
+           (
+                 (
+                       (
+                             (
+                                   (
+                                         (
+                                               (
+                                                SELECT jnt_fic_att_value.jft_id
+                                                     , fiche.f_id
+                                                     , fiche_def.frd_id
+                                                     , fiche.fd_id
+                                                     , fiche_def.fd_class_base
+                                                     , fiche_def.fd_label
+                                                     , fiche_def.fd_create_account
+                                                     , fiche_def_ref.frd_text
+                                                     , fiche_def_ref.frd_class_base
+                                                     , jnt_fic_att_value.ad_id
+                                                     , attr_value.av_text 
+                                                  FROM (
+                                                           (
+                                                                 (
+                                                                       (fiche 
+                                                                          JOIN fiche_def 
+                                                                         USING (fd_id)
+                                                                       )
+                                                                    JOIN fiche_def_ref 
+                                                                   USING (frd_id)
+                                                                 )
+                                                              JOIN jnt_fic_att_value 
+                                                             USING (f_id)
+                                                           )
+                                                        JOIN attr_value 
+                                                       USING (jft_id)
+                                                     )
+                                                 WHERE (jnt_fic_att_value.ad_id = 1)
+                                               ) a 
+                                            JOIN (
+                                                SELECT jnt_fic_att_value.jft_id
+                                                     , fiche.f_id
+                                                     , fiche_def.frd_id
+                                                     , fiche.fd_id
+                                                     , fiche_def.fd_class_base
+                                                     , fiche_def.fd_label
+                                                     , fiche_def.fd_create_account
+                                                     , fiche_def_ref.frd_text
+                                                     , fiche_def_ref.frd_class_base
+                                                     , jnt_fic_att_value.ad_id
+                                                     , attr_value.av_text 
+                                                  FROM (
+                                                           (
+                                                                 (
+                                                                       (fiche 
+                                                                          JOIN fiche_def 
+                                                                         USING (fd_id)
+                                                                       )
+                                                                    JOIN fiche_def_ref 
+                                                                   USING (frd_id)
+                                                                 )
+                                                              JOIN jnt_fic_att_value 
+                                                             USING (f_id)
+                                                           )
+                                                        JOIN attr_value 
+                                                       USING (jft_id)
+                                                     )
+                                                 WHERE (jnt_fic_att_value.ad_id = 13)
+                                               ) b 
+                                           USING (f_id)
+                                         )
+                                      JOIN (
+                                          SELECT jnt_fic_att_value.jft_id
+                                               , fiche.f_id
+                                               , fiche_def.frd_id
+                                               , fiche.fd_id
+                                               , fiche_def.fd_class_base
+                                               , fiche_def.fd_label
+                                               , fiche_def.fd_create_account
+                                               , fiche_def_ref.frd_text
+                                               , fiche_def_ref.frd_class_base
+                                               , jnt_fic_att_value.ad_id
+                                               , attr_value.av_text 
+                                            FROM (
+                                                     (
+                                                           (
+                                                                 (fiche 
+                                                                    JOIN fiche_def 
+                                                                   USING (fd_id)
+                                                                 )
+                                                              JOIN fiche_def_ref 
+                                                             USING (frd_id)
+                                                           )
+                                                        JOIN jnt_fic_att_value 
+                                                       USING (f_id)
+                                                     )
+                                                  JOIN attr_value 
+                                                 USING (jft_id)
+                                               )
+                                           WHERE (jnt_fic_att_value.ad_id = 23)
+                                         ) a1 
+                                     USING (f_id)
+                                   )
+                                JOIN (
+                                    SELECT jnt_fic_att_value.jft_id
+                                         , fiche.f_id
+                                         , fiche_def.frd_id
+                                         , fiche.fd_id
+                                         , fiche_def.fd_class_base
+                                         , fiche_def.fd_label
+                                         , fiche_def.fd_create_account
+                                         , fiche_def_ref.frd_text
+                                         , fiche_def_ref.frd_class_base
+                                         , jnt_fic_att_value.ad_id
+                                         , attr_value.av_text 
+                                      FROM (
+                                               (
+                                                     (
+                                                           (fiche 
+                                                              JOIN fiche_def 
+                                                             USING (fd_id)
+                                                           )
+                                                        JOIN fiche_def_ref 
+                                                       USING (frd_id)
+                                                     )
+                                                  JOIN jnt_fic_att_value 
+                                                 USING (f_id)
+                                               )
+                                            JOIN attr_value 
+                                           USING (jft_id)
+                                         )
+                                     WHERE (jnt_fic_att_value.ad_id = 5)
+                                   ) c 
+                               USING (f_id)
+                             )
+                          JOIN (
+                              SELECT jnt_fic_att_value.jft_id
+                                   , fiche.f_id
+                                   , fiche_def.frd_id
+                                   , fiche.fd_id
+                                   , fiche_def.fd_class_base
+                                   , fiche_def.fd_label
+                                   , fiche_def.fd_create_account
+                                   , fiche_def_ref.frd_text
+                                   , fiche_def_ref.frd_class_base
+                                   , jnt_fic_att_value.ad_id
+                                   , attr_value.av_text 
+                                FROM (
+                                         (
+                                               (
+                                                     (fiche 
+                                                        JOIN fiche_def 
+                                                       USING (fd_id)
+                                                     )
+                                                  JOIN fiche_def_ref 
+                                                 USING (frd_id)
+                                               )
+                                            JOIN jnt_fic_att_value 
+                                           USING (f_id)
+                                         )
+                                      JOIN attr_value 
+                                     USING (jft_id)
+                                   )
+                               WHERE (jnt_fic_att_value.ad_id = 14)
+                             ) d 
+                         USING (f_id)
+                       )
+                    JOIN (
+                        SELECT jnt_fic_att_value.jft_id
+                             , fiche.f_id
+                             , fiche_def.frd_id
+                             , fiche.fd_id
+                             , fiche_def.fd_class_base
+                             , fiche_def.fd_label
+                             , fiche_def.fd_create_account
+                             , fiche_def_ref.frd_text
+                             , fiche_def_ref.frd_class_base
+                             , jnt_fic_att_value.ad_id
+                             , attr_value.av_text 
+                          FROM (
+                                   (
+                                         (
+                                               (fiche 
+                                                  JOIN fiche_def 
+                                                 USING (fd_id)
+                                               )
+                                            JOIN fiche_def_ref 
+                                           USING (frd_id)
+                                         )
+                                      JOIN jnt_fic_att_value 
+                                     USING (f_id)
+                                   )
+                                JOIN attr_value 
+                               USING (jft_id)
+                             )
+                         WHERE (jnt_fic_att_value.ad_id = 15)
+                       ) e 
+                   USING (f_id)
+                 )
+              JOIN (
+                  SELECT jnt_fic_att_value.jft_id
+                       , fiche.f_id
+                       , fiche_def.frd_id
+                       , fiche.fd_id
+                       , fiche_def.fd_class_base
+                       , fiche_def.fd_label
+                       , fiche_def.fd_create_account
+                       , fiche_def_ref.frd_text
+                       , fiche_def_ref.frd_class_base
+                       , jnt_fic_att_value.ad_id
+                       , attr_value.av_text 
+                    FROM (
+                             (
+                                   (
+                                         (fiche 
+                                            JOIN fiche_def 
+                                           USING (fd_id)
+                                         )
+                                      JOIN fiche_def_ref 
+                                     USING (frd_id)
+                                   )
+                                JOIN jnt_fic_att_value 
+                               USING (f_id)
+                             )
+                          JOIN attr_value 
+                         USING (jft_id)
+                       )
+                   WHERE (jnt_fic_att_value.ad_id = 16)
+                 ) f 
+             USING (f_id)
+           )
+        JOIN (
+            SELECT jnt_fic_att_value.jft_id
+                 , fiche.f_id
+                 , fiche_def.frd_id
+                 , fiche.fd_id
+                 , fiche_def.fd_class_base
+                 , fiche_def.fd_label
+                 , fiche_def.fd_create_account
+                 , fiche_def_ref.frd_text
+                 , fiche_def_ref.frd_class_base
+                 , jnt_fic_att_value.ad_id
+                 , attr_value.av_text 
+              FROM (
+                       (
+                             (
+                                   (fiche 
+                                      JOIN fiche_def 
+                                     USING (fd_id)
+                                   )
+                                JOIN fiche_def_ref 
+                               USING (frd_id)
+                             )
+                          JOIN jnt_fic_att_value 
+                         USING (f_id)
+                       )
+                    JOIN attr_value 
+                   USING (jft_id)
+                 )
+             WHERE (jnt_fic_att_value.ad_id = 17)
+           ) g 
+       USING (f_id)
+     )
+LEFT JOIN (
+      SELECT jnt_fic_att_value.jft_id
+           , fiche.f_id
+           , fiche_def.frd_id
+           , fiche.fd_id
+           , fiche_def.fd_class_base
+           , fiche_def.fd_label
+           , fiche_def.fd_create_account
+           , fiche_def_ref.frd_text
+           , fiche_def_ref.frd_class_base
+           , jnt_fic_att_value.ad_id
+           , attr_value.av_text 
+        FROM (
+                 (
+                       (
+                             (fiche 
+                                JOIN fiche_def 
+                               USING (fd_id)
+                             )
+                          JOIN fiche_def_ref 
+                         USING (frd_id)
+                       )
+                    JOIN jnt_fic_att_value 
+                   USING (f_id)
+                 )
+              JOIN attr_value 
+             USING (jft_id)
+           )
+       WHERE (jnt_fic_att_value.ad_id = 18)
+     ) h 
+ USING (f_id)
+)
+WHERE (a.frd_id = 9);
+ + + + + +

+ Index - + Schema public +

+ +
+

View: + vw_fiche_attr +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
vw_fiche_attr Structure
F-KeyNameTypeDescription
+ + f_idinteger + + + + + + +
+ + fd_idinteger + + + + + + +
+ + vw_nametext + + + + + + +
+ + vw_selltext + + + + + + +
+ + vw_buytext + + + + + + +
+ + tva_codetext + + + + + + +
+ + tva_idinteger + + + + + + +
+ + tva_ratenumeric(8,4) + + + + + + +
+ + tva_labeltext + + + + + + +
+ + vw_addrtext + + + + + + +
+ + vw_cptext + + + + + + +
+ + quick_codetext + + + + + + +
+ + frd_idinteger + + + + + + +
+ + + + + + + + + + + +
+SELECT a.f_id
+, a.fd_id
+, a.av_text AS vw_name
+, b.av_text AS vw_sell
+, c.av_text AS vw_buy
+, d.av_text AS tva_code
+, tva_rate.tva_id
+, tva_rate.tva_rate
+, tva_rate.tva_label
+, e.av_text AS vw_addr
+, f.av_text AS vw_cp
+, j.av_text AS quick_code
+, fiche_def.frd_id 
+FROM (
+     (
+           (
+                 (
+                       (
+                             (
+                                   (
+                                         (
+                                               (
+                                                SELECT fiche.f_id
+                                                     , fiche.fd_id
+                                                     , attr_value.av_text 
+                                                  FROM (
+                                                           (
+                                                                 (fiche 
+                                                                    JOIN jnt_fic_att_value 
+                                                                   USING (f_id)
+                                                                 )
+                                                              JOIN attr_value 
+                                                             USING (jft_id)
+                                                           )
+                                                        JOIN attr_def 
+                                                       USING (ad_id)
+                                                     )
+                                                 WHERE (jnt_fic_att_value.ad_id = 1)
+                                               ) a 
+                                       LEFT JOIN (
+                                                SELECT fiche.f_id
+                                                     , attr_value.av_text 
+                                                  FROM (
+                                                           (
+                                                                 (fiche 
+                                                                    JOIN jnt_fic_att_value 
+                                                                   USING (f_id)
+                                                                 )
+                                                              JOIN attr_value 
+                                                             USING (jft_id)
+                                                           )
+                                                        JOIN attr_def 
+                                                       USING (ad_id)
+                                                     )
+                                                 WHERE (jnt_fic_att_value.ad_id = 6)
+                                               ) b 
+                                              ON (
+                                                     (a.f_id = b.f_id)
+                                               )
+                                         )
+                                 LEFT JOIN (
+                                          SELECT fiche.f_id
+                                               , attr_value.av_text 
+                                            FROM (
+                                                     (
+                                                           (fiche 
+                                                              JOIN jnt_fic_att_value 
+                                                             USING (f_id)
+                                                           )
+                                                        JOIN attr_value 
+                                                       USING (jft_id)
+                                                     )
+                                                  JOIN attr_def 
+                                                 USING (ad_id)
+                                               )
+                                           WHERE (jnt_fic_att_value.ad_id = 7)
+                                         ) c 
+                                        ON (
+                                               (a.f_id = c.f_id)
+                                         )
+                                   )
+                           LEFT JOIN (
+                                    SELECT fiche.f_id
+                                         , attr_value.av_text 
+                                      FROM (
+                                               (
+                                                     (fiche 
+                                                        JOIN jnt_fic_att_value 
+                                                       USING (f_id)
+                                                     )
+                                                  JOIN attr_value 
+                                                 USING (jft_id)
+                                               )
+                                            JOIN attr_def 
+                                           USING (ad_id)
+                                         )
+                                     WHERE (jnt_fic_att_value.ad_id = 2)
+                                   ) d 
+                                  ON (
+                                         (a.f_id = d.f_id)
+                                   )
+                             )
+                     LEFT JOIN (
+                              SELECT fiche.f_id
+                                   , attr_value.av_text 
+                                FROM (
+                                         (
+                                               (fiche 
+                                                  JOIN jnt_fic_att_value 
+                                                 USING (f_id)
+                                               )
+                                            JOIN attr_value 
+                                           USING (jft_id)
+                                         )
+                                      JOIN attr_def 
+                                     USING (ad_id)
+                                   )
+                               WHERE (jnt_fic_att_value.ad_id = 14)
+                             ) e 
+                            ON (
+                                   (a.f_id = e.f_id)
+                             )
+                       )
+               LEFT JOIN (
+                        SELECT fiche.f_id
+                             , attr_value.av_text 
+                          FROM (
+                                   (
+                                         (fiche 
+                                            JOIN jnt_fic_att_value 
+                                           USING (f_id)
+                                         )
+                                      JOIN attr_value 
+                                     USING (jft_id)
+                                   )
+                                JOIN attr_def 
+                               USING (ad_id)
+                             )
+                         WHERE (jnt_fic_att_value.ad_id = 15)
+                       ) f 
+                      ON (
+                             (a.f_id = f.f_id)
+                       )
+                 )
+         LEFT JOIN (
+                  SELECT fiche.f_id
+                       , attr_value.av_text 
+                    FROM (
+                             (
+                                   (fiche 
+                                      JOIN jnt_fic_att_value 
+                                     USING (f_id)
+                                   )
+                                JOIN attr_value 
+                               USING (jft_id)
+                             )
+                          JOIN attr_def 
+                         USING (ad_id)
+                       )
+                   WHERE (jnt_fic_att_value.ad_id = 23)
+                 ) j 
+                ON (
+                       (a.f_id = j.f_id)
+                 )
+           )
+   LEFT JOIN tva_rate 
+          ON (
+                 (d.av_text = 
+                       (tva_rate.tva_id)::text
+                 )
+           )
+     )
+  JOIN fiche_def 
+ USING (fd_id)
+);
+ + + + + +

+ Index - + Schema public +

+ +
+

View: + vw_fiche_def +

+ +

all the attributs for card family

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
vw_fiche_def Structure
F-KeyNameTypeDescription
+ + fd_idinteger + + + + + + +
+ + ad_idinteger + + + + + + +
+ + ad_texttext + + + + + + +
+ + av_texttext + + + + + + +
+ + fd_class_baseposte_comptable + + + + + + +
+ + fd_labeltext + + + + + + +
+ + fd_create_accountboolean + + + + + + +
+ + frd_idinteger + + + + + + +
+ + + + + + + + + + + +
+SELECT jnt_fic_attr.fd_id
+, jnt_fic_attr.ad_id
+, attr_def.ad_text
+, attr_value.av_text
+, fiche_def.fd_class_base
+, fiche_def.fd_label
+, fiche_def.fd_create_account
+, fiche_def.frd_id 
+FROM (
+     (
+           (
+                 (
+                       (jnt_fic_att_value 
+                          JOIN attr_value 
+                         USING (jft_id)
+                       )
+                    JOIN fiche 
+                   USING (f_id)
+                 )
+              JOIN jnt_fic_attr 
+             USING (fd_id)
+           )
+        JOIN attr_def 
+          ON (
+                 (attr_def.ad_id = jnt_fic_attr.ad_id)
+           )
+     )
+  JOIN fiche_def 
+ USING (fd_id)
+);
+ + + + + +

+ Index - + Schema public +

+ +
+

View: + vw_fiche_min +

+ +

minimum attribut for reference card

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
vw_fiche_min Structure
F-KeyNameTypeDescription
+ + frd_idinteger + + + + + + +
+ + ad_idinteger + + + + + + +
+ + ad_texttext + + + + + + +
+ + frd_texttext + + + + + + +
+ + frd_class_baseinteger + + + + + + +
+ + + + + + + + + + + +
+SELECT attr_min.frd_id
+, attr_min.ad_id
+, attr_def.ad_text
+, fiche_def_ref.frd_text
+, fiche_def_ref.frd_class_base 
+FROM (
+     (attr_min 
+        JOIN attr_def 
+       USING (ad_id)
+     )
+  JOIN fiche_def_ref 
+ USING (frd_id)
+);
+ + + + + +

+ Index - + Schema public +

+ +
+

View: + vw_poste_qcode +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
vw_poste_qcode Structure
F-KeyNameTypeDescription
+ + f_idinteger + + + + + + +
+ + j_postetext + + + + + + +
+ + j_qcodetext + + + + + + +
+ + + + + + + + + + + +
+SELECT a.f_id
+, a.av_text AS j_poste
+, b.av_text AS j_qcode 
+FROM (
+     (
+      SELECT jnt_fic_att_value.f_id
+           , attr_value.av_text 
+        FROM (attr_value 
+              JOIN jnt_fic_att_value 
+             USING (jft_id)
+           )
+       WHERE (jnt_fic_att_value.ad_id = 5)
+     ) a 
+  JOIN (
+      SELECT jnt_fic_att_value.f_id
+           , attr_value.av_text 
+        FROM (attr_value 
+              JOIN jnt_fic_att_value 
+             USING (jft_id)
+           )
+       WHERE (jnt_fic_att_value.ad_id = 23)
+     ) b 
+ USING (f_id)
+);
+ + + + + +

+ Index - + Schema public +

+ + + + +
+

Function: + account_add( p_id public.poste_comptable, p_name character varying ) +

+

Returns: void

+

Language: PLPGSQL

+ +
+-- account_add (p_id tmp_pcmn.pcm_val%type,p_name varchar)
+-- parameter 
+-- p_id id of the account
+-- name account's name
+-- purpose insert a new account if it doesn't exist yet
+declare
+	nParent tmp_pcmn.pcm_val_parent%type;
+	nCount integer;
+begin
+	select count(*) into nCount from tmp_pcmn where pcm_val=p_id;
+	if nCount != 0 then
+		nParent=account_parent(p_id);
+		insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent)
+			values (p_id, p_name,nParent);
+	end if;
+return;
+end ;
+
+ +
+

Function: + account_auto( p_fd_id integer ) +

+

Returns: boolean

+

Language: PLPGSQL

+ +
+-- account_auto
+-- param fd_id
+-- return true if the card generate automatically an account
+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;
+	end if;
+	return l_auto;
+end;
+
+ +
+

Function: + account_compute( p_f_id integer ) +

+

Returns: poste_comptable

+

Language: PLPGSQL

+ +
+-- account_compute
+-- param f_id
+-- compute the next account
+-- return new account
+declare
+	class_base poste_comptable;
+	maxcode int8;
+begin
+ -- Get the class base
+	select fd_class_base into class_base 
+	from
+		fiche_def join fiche using (fd_id)
+	where 
+		f_id=p_f_id;
+	raise notice 'class base %',class_base;
+	select max(pcm_val) into maxcode from tmp_pcmn where pcm_val = class_base;
+	if maxcode = class_base then
+		maxcode=class_base*1000+1;
+	end if;
+	raise notice 'Max code %',maxcode;
+return maxcode+1;
+end;
+
+ +
+

Function: + account_insert( p_f_id integer, p_account public.poste_comptable ) +

+

Returns: integer

+

Language: PLPGSQL

+ +
+declare
+-- account_insert
+-- parameter f_id,p_account label of account
+-- purpose : create a new account for a card
+-- check if the accound needs to be created automatically
+-- if p_account is empty or null
+-- into tables attr_value
+nParent tmp_pcmn.pcm_val_parent%type;
+sName varchar;
+nNew tmp_pcmn.pcm_val%type;
+bAuto bool;
+nFd_id integer;
+nCount integer;
+begin
+	
+	-- if p_value empty
+	if length(trim(p_account)) != 0 then
+	-- does the account exist ?
+		select *  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:=account_parent(p_account);
+			-- 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);
+			-- insert as card's attribute
+			attribut_insert(p_f_id,5,to_char(nNew,'999999999999'));
+	
+		end if;		
+	else 
+		select fd_id into nFd_id from fiche where f_id=p_f_id;
+		bAuto:= account_auto(nFd_id);
+
+		if bAuto = true then
+			-- create automatically the account
+			-- compute the next account
+			nNew:=account_compute(p_f_id);
+raise debug 'nNew %', nNew;
+			-- 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:=account_parent(nNew);
+			-- account doesn't exist we need to add id
+			perform account_add  (nNew,sName);
+			-- insert as card's attribute
+			perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999'));
+	
+		else 
+			 perform attribut_insert(p_f_id,5,null);
+		end if;
+
+	end if;
+		
+return 0;
+end;
+
+ +
+

Function: + account_parent( p_account public.poste_comptable ) +

+

Returns: poste_comptable

+

Language: PLPGSQL

+ +
+declare
+	nParent tmp_pcmn.pcm_val_parent%type;
+	sParent varchar;
+	nCount integer;
+begin
+	sParent:=to_char(p_account,'9999999999999999');
+	sParent:=trim(sParent);
+	nParent:=0;
+	while nParent = 0 loop
+		select count(*) into nCount
+		from tmp_pcmn
+		where
+		pcm_val = to_number(sParent,'9999999999999999');
+		if nCount != 0 then
+			nParent:=to_number(sParent,'9999999999999999');
+		end if;
+		sParent:= substr(sParent,1,length(sParent)-1);
+		if length(sParent) <= 0 then	
+			raise exception 'Impossible de trouver le compte parent pour %',p_account;
+		end if;
+
+	end loop;
+
+	return nParent;
+end;
+
+ +
+

Function: + account_update( p_f_id integer, p_account public.poste_comptable ) +

+

Returns: integer

+

Language: PLPGSQL

+ +
+-- account_update
+-- parameter f_id, pcm_val
+-- purpose update the account of a card and create it into PCMN if it doesn't exist yet
+-- 
+declare
+nMax fiche.f_id%type;
+nCount integer;
+nParent tmp_pcmn.pcm_val_parent%type;
+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;
+end;
+
+ +
+

Function: + attribut_insert( p_f_id integer, p_ad_id integer, p_value character varying ) +

+

Returns: void

+

Language: PLPGSQL

+ +
+-- attribut_integer
+-- parameter : f_id, ad_id, p_value
+-- purpose add an attribute to a card
+-- it inserts a row into jnt_fic_att_value and attr_value
+declare 
+	n_jft_id integer;
+begin
+	select nextval('s_jnt_fic_att_value') into n_jft_id;
+	 insert into jnt_fic_att_value (jft_id,f_id,ad_id) values (n_jft_id,p_f_id,p_ad_id);
+	 insert into attr_value (jft_id,av_text) values (n_jft_id,p_value);
+return;
+end;
+
+ +
+

Function: + card_class_base( p_f_id integer ) +

+

Returns: poste_comptable

+

Language: PLPGSQL

+ +
+
+declare
+	n_poste fiche_def.fd_class_base%type;
+begin
+-- card_class_base (integer)
+-- param: $1 fiche.f_id
+-- purpose : retrieve the class of a card
+-- 
+
+	select fd_class_base into n_poste from fiche_def join fiche using (fd_id)
+	where f_id=p_f_id;
+	if not FOUND then 
+		raise exception 'Invalid fiche card_class_base(%)',p_f_id;
+	end if;
+return;
+end;
+
+ +
+

Function: + check_balance( p_grpt integer ) +

+

Returns: numeric

+

Language: PLPGSQL

+ +
+declare 
+	amount_jrnx_debit numeric;
+	amount_jrnx_credit numeric;
+	amount_jrn numeric;
+begin
+	select sum (j_montant) into amount_jrnx_credit 
+	from jrnx 
+		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);
+		end if;
+	if ( amount_jrn != amount_jrnx_credit)
+		then
+		return -1*abs(amount_jrn - amount_jrnx_credit);
+		end if;
+	return 0;
+end;
+
+ +
+

Function: + fiche_account_parent( p_f_id integer ) +

+

Returns: poste_comptable

+

Language: PLPGSQL

+ +
+declare
+-- fiche_account_parent returns the fd_class_base
+-- parameter f_id (from fiche)
+ret poste_comptable;
+begin
+	select fd_class_base into ret from fiche_def join fiche using (fd_id) where f_id=p_f_id;
+	if not FOUND then
+		raise exception '% N''existe pas',p_f_id;
+	end if;
+	return ret;
+end;
+
+ +
+

Function: + fiche_delete( p_f_id integer ) +

+

Returns: void

+

Language: PLPGSQL

+ +
+begin
+	delete from attr_value where jft_id in (select jft_id from jnt_fic_att_value where f_id=p_f_id);
+	delete from jnt_fic_att_value where f_id = p_f_id;
+	delete from fiche where f_id=p_f_id;
+return;
+end;
+
+ +
+

Function: + fiche_used( p_f_id integer ) +

+

Returns: integer

+

Language: PLPGSQL

+ +
+declare
+-- parameter f_id
+	nCount integer;
+	qcode varchar;
+begin
+	-- first retrive quick_code
+	select av_text into qcode from attr_value join jnt_fic_att_value using (jft_id)
+		where
+		ad_id=23
+		and f_id=p_f_id;
+	raise notice 'Quick code =%',qcode;
+
+	select count(*) into nCount from jrnx where j_qcode=qcode;
+	return nCount;
+end;
+
+ +
+

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 ) +

+

Returns: void

+

Language: PLPGSQL

+ +
+declare
+	sCode varchar;
+	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;
+		else 
+		 sCode=NULL;
+		end if;
+		
+	end if;
+	if p_montant = 0.0 then 
+		return;	
+	end if;
+	insert into jrnx 
+	(
+		j_date,
+		j_montant, 	
+		j_poste,
+		j_grpt, 
+		j_jrn_def,
+		j_debit,
+		j_tech_user,
+		j_tech_per,
+		j_qcode	
+	) values 
+	(
+		to_date(p_date,'DD.MM.YYYY'),
+		p_montant,
+		p_poste,	
+		p_grpt,
+		p_jrn_def,
+		p_debit,
+		p_tech_user,
+		p_tech_per,
+		sCode
+	);
+
+return;
+end;
+
+ +
+

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 ) +

+

Returns: void

+

Language: PLPGSQL

+ +
+declare 
+	fid_client integer;
+	fid_good   integer;
+begin
+	select f_id into fid_client from 
+		attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=p_client;
+
+	select f_id into fid_good from 
+		attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=p_fiche;
+
+
+	insert into quant_sold
+		(qs_internal,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client) 
+	values
+		(p_internal,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client);
+	return;
+end;	
+
+ +
+

Function: + insert_quick_code( nf_id integer, tav_text text ) +

+

Returns: integer

+

Language: PLPGSQL

+ +
+	declare
+	ns integer;
+	nExist integer;
+	tText text;
+	begin
+	tText := upper(trim(tav_text));
+	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;
+
+ +
+

Function: + plpgsql_validator( oid ) +

+

Returns: void

+

Language: C

+ +
plpgsql_validator
+ +
+

Function: + proc_check_balance( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+declare 
+	diff numeric;
+	tt integer;
+begin
+	if TG_OP = 'INSERT' then
+	tt=NEW.jr_grpt_id;
+	diff:=check_balance(tt);
+	if diff != 0 then
+		raise exception 'balance error %',diff ;
+	end if;
+	return NEW;
+	end if;
+end;
+
+ +
+

Function: + t_document_type_insert( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+    BEGIN
+        execute  'create sequence seq_doc_type_'||NEW.dt_id;
+raise notice 'Creating sequence seq_doc_type_%',NEW.dt_id;
+        RETURN NEW;
+    END;
+
+ +
+

Function: + trim_cvs_quote( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+declare
+        modified import_tmp%ROWTYPE;
+begin
+		modified.code=new.code;
+		modified.montant=new.montant;
+		modified.date_exec=new.date_exec;
+		modified.date_valeur=new.date_valeur;
+		modified.devise=replace(new.devise,'"','');
+		modified.poste_comptable=replace(new.poste_comptable,'"','');
+        modified.compte_ordre=replace(NEW.COMPTE_ORDRE,'"','');
+        modified.detail=replace(NEW.DETAIL,'"','');
+        modified.num_compte=replace(NEW.NUM_COMPTE,'"','');
+		modified.bq_account=NEW.bq_account;
+		modified.jrn=NEW.jrn;
+		modified.ok=new.ok;
+        return modified;
+end;
+
+ +
+

Function: + trim_space_format_csv_banque( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+declare
+        modified format_csv_banque%ROWTYPE;
+begin
+        modified.name=trim(NEW.NAME);
+        modified.include_file=trim(new.include_file);
+		if ( length(modified.name) = 0 ) then
+			modified.name=null;
+		end if;
+		if ( length(modified.include_file) = 0 ) then
+			modified.include_file=null;
+		end if;
+
+        return modified;
+end;
+
+ +
+

Function: + tva_delete( integer ) +

+

Returns: void

+

Language: PLPGSQL

+ +
 
+declare
+	p_tva_id alias for $1;
+	nCount integer;
+begin
+	nCount=0;
+	select count(*) into nCount from quant_sold where qs_vat_code=p_tva_id;
+	if nCount = 0 then
+		delete from tva_rate where tva_id=p_tva_id;
+	end if;
+	return;
+end;
+
+ +
+

Function: + tva_insert( integer, text, numeric, text, text ) +

+

Returns: integer

+

Language: PLPGSQL

+ +
+declare
+p_tva_id alias for $1;
+p_tva_label alias for $2;
+p_tva_rate alias for $3;
+p_tva_comment alias for $4;
+p_tva_poste alias for $5;
+debit text;
+credit text;
+nCount integer;
+begin
+if length(trim(p_tva_label)) = 0 then
+	return 3;
+end if;
+select count(*) into nCount from tva_rate 
+	where tva_id=p_tva_id;
+if nCount != 0 then
+	return 5;
+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);
+	credit  = split_part(p_tva_poste,',',2);
+	select count(*) into nCount from tmp_pcmn where pcm_val=debit;
+	if nCount = 0 then return 4; end if;
+	select count(*) into nCount from tmp_pcmn where pcm_val=credit;
+	if nCount = 0 then return 4; end if;
+ 
+end if;
+insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste)
+	values (p_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste);
+return 0;
+end;
+
+ +
+

Function: + tva_modify( integer, text, numeric, text, text ) +

+

Returns: integer

+

Language: PLPGSQL

+ +
declare
+p_tva_id alias for $1;
+p_tva_label alias for $2;
+p_tva_rate alias for $3;
+p_tva_comment alias for $4;
+p_tva_poste alias for $5;
+debit text;
+credit text;
+nCount integer;
+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);
+	credit  = split_part(p_tva_poste,',',2);
+	select count(*) into nCount from tmp_pcmn where pcm_val=debit;
+	if nCount = 0 then return 4; end if;
+	select count(*) into nCount from tmp_pcmn where pcm_val=credit;
+	if nCount = 0 then return 4; end if;
+ 
+end if;
+update tva_rate set tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_comment,tva_poste=p_tva_poste
+	where tva_id=p_tva_id;
+return 0;
+end;
+
+ +
+

Function: + update_quick_code( njft_id integer, tav_text text ) +

+

Returns: integer

+

Language: PLPGSQL

+ +
+	declare
+	ns integer;
+	nExist integer;
+	tText text;
+	old_qcode varchar;
+	begin
+	-- get current value
+	select av_text into old_qcode from attr_value where jft_id=njft_id;
+	-- av_text didn't change so no update
+	if tav_text = upper( trim(old_qcode)) then
+		return 0;
+	end if;
+	
+	tText := trim(upper(tav_text));
+	tText := replace(tText,' ','');
+	if length ( tText) = 0 or tText is null then
+		return 0;
+	end if;
+		
+	ns := njft_id;
+
+	loop
+		-- 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;	
+		if tText = 'FID'||ns then
+			-- take the next sequence
+			select nextval('s_jnt_fic_att_value') into ns;
+		end if;
+		tText  :='FID'||ns;
+		
+	end loop;
+	update attr_value set av_text = tText where jft_id=njft_id;
+	update jrnx set j_qcode=tText where j_qcode = old_qcode;
+	return ns;
+	end;
+
+ + + +

Generated by PostgreSQL Autodoc

+

W3C HTML 4.01 Strict

+ diff --git a/doc/developper/html/ac__common_8php-source.html b/doc/developper/html/ac__common_8php-source.html index 0a96153e5..ddf76fc06 100644 --- a/doc/developper/html/ac__common_8php-source.html +++ b/doc/developper/html/ac__common_8php-source.html @@ -4,7 +4,7 @@ - +

ac_common.php

Go to the documentation of this file.
00001 <?
@@ -28,227 +28,226 @@
 00019 */
 00020 
 00021 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00022 
-00023 include_once("debug.php");
-00024 include_once("constant.php");
-00034 function echo_error      ($p_log) {
-00035         $fdebug=fopen("/tmp/phpcompta_error.log","a+");
-00036         fwrite($fdebug,date("Ymd H:i:s").$p_log."\n");
-00037         fclose($fdebug);
-00038         echo_debug($p_log);
-00039 }
-00040 
-00051 function cmpDate ($p_date,$p_date_oth) {
-00052   $l_date=isDate($p_date);
-00053   $l2_date=isDate($p_date_oth);
-00054   if ($l_date == null || $l2_date == null ) {
-00055     echo "erreur date";
-00056     return null;
-00057   }
-00058   $l_adate=explode(".",$l_date);
-00059   $l2_adate=explode(".",$l2_date);
-00060   $l_mkdate=mktime(0,0,0,$l_adate[1],$l_adate[0],$l_adate[2]);
-00061   $l2_mkdate=mktime(0,0,0,$l2_adate[1],$l2_adate[0],$l2_adate[2]);
-00062   // si $p_date > $p_date_oth return > 0
-00063   return $l_mkdate-$l2_mkdate;
-00064 }
-00065 /* \function IsNumber
-00066  * \brief check if the argument is a number
-00067  *
-00068  * \parm : $p_int
+00026 include_once("debug.php");
+00027 include_once("constant.php");
+00036 function echo_error      ($p_log) {
+00037         $fdebug=fopen("/tmp/phpcompta_error.log","a+");
+00038         fwrite($fdebug,date("Ymd H:i:s").$p_log."\n");
+00039         fclose($fdebug);
+00040         echo_debug($p_log);
+00041 }
+00042 
+00053 function cmpDate ($p_date,$p_date_oth) {
+00054   $l_date=isDate($p_date);
+00055   $l2_date=isDate($p_date_oth);
+00056   if ($l_date == null || $l2_date == null ) {
+00057     echo "erreur date";
+00058     return null;
+00059   }
+00060   $l_adate=explode(".",$l_date);
+00061   $l2_adate=explode(".",$l2_date);
+00062   $l_mkdate=mktime(0,0,0,$l_adate[1],$l_adate[0],$l_adate[2]);
+00063   $l2_mkdate=mktime(0,0,0,$l2_adate[1],$l2_adate[0],$l2_adate[2]);
+00064   // si $p_date > $p_date_oth return > 0
+00065   return $l_mkdate-$l2_mkdate;
+00066 }
+00067 /* 
+00068  * \brief check if the argument is a number
 00069  *
-00070  * \return 1 it's a number
-00071  *        0 it is not
-00072  */
-00073 function isNumber($p_int) {
-00074   if ( strlen (trim($p_int)) == 0 ) return 0;
-00075   $p_int=trim($p_int);
-00076   if (! ereg ("^-{0,1}[0-9]+.{0,1}[0-9]*$",$p_int) ) {
-00077     return 0;
-00078   } else {
-00079     return 1;
-00080   }// !ereg
-00081 }
-00082 
-00096 function isDate ( $p_date) {
-00097   if ( strlen (trim($p_date)) == 0 ) return null;
-00098   if (! ereg ("^[0-9]{1,2}\.[0-9]{1,2}\.20[0-9]{2}",$p_date) ) {
-00099 
-00100     return null;
-00101   } else {
-00102     $l_date=explode(".",$p_date);
-00103     if ( $l_date[2] > 2020 ) {
-00104       return null;
-00105     }
-00106     if ( checkdate ($l_date[1],$l_date[0],$l_date[2]) == false) {
-00107       return null;
-00108     }
-00109 
-00110   }// !ereg
-00111   return $p_date;
-00112 }
-00118 function formatDate($p_date) {
-00119   if ( isDate($p_date)== null) return "null";
-00120   return "'".$p_date."'";
-00121 }
-00134 function html_page_start($p_theme="",$p_script="",$p_script2="")
-00135 {       
-00136   include_once ("postgres.php");
-00137  ini_set('magic_quotes_gpc','Off');
-00138 
-00139  $cn=DbConnect();
-00140  if ( $p_theme != "") {
-00141    $Res=ExecSql($cn,"select the_filestyle from theme
-00142                    where the_name='".$p_theme."'");
-00143     if (pg_NumRows($Res)==0) 
-00144       $style="style.css";
-00145     else {
-00146       $s=pg_fetch_array($Res,0);
-00147       $style=$s['the_filestyle'];
-00148     }
-00149  }else {
-00150    $style="style.css";
-00151  } // end if
-00152  echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN">';
-00153  echo "<HTML>";
-00154 
-00155  if ( $p_script2 != "" )
-00156    $p_script2='<script src="'.$p_script2.'" type="text/javascript"></script>';
-00157 
-00158  echo "<HEAD> 
-00159       <TITLE>PhpCompta</TITLE>
-00160       <META http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">
-00161       <LINK REL=\"stylesheet\" type=\"text/css\" href=\"$style\" media=\"screen\">
-00162       <link rel=\"stylesheet\" type=\"text/css\" href=\"style-print.css\" media=\"print\">".
-00163    $p_script2. "
-00164         </HEAD><script src=\"scripts.js\" type=\"text/javascript\"></script>";
-00165  echo "<BODY $p_script>";
-00166 }
-00171 function html_page_stop()
-00172 {
-00173         echo "</BODY>";
-00174         echo "</HTML>";
-00175 }
-00186 function html_button_logout() {
-00187         echo "<A class=\"mtitle\" HREF=logout.php> Logout </A>";
-00188 }
-00200 function NoAccess() {
-00201   echo "<BR><BR><BR><BR><BR><BR>";
-00202   echo "<P ALIGN=center><BLINK>
-00203         <FONT size=+12 COLOR=RED>
-00204         You haven't access
-00205         </FONT></BLINK></P></BODY></HTML>";
-00206                 
-00207   exit -1;
-00208 }
-00218 function FormatString($p_string) 
-00219 {
-00220   if ( !isset ($p_string) ) {
-00221     echo_error("ac_common.php FormatString p_string empty");
-00222     return null;
-00223   }
-00224   $p_string=trim($p_string);
-00225   if (strlen($p_string) == 0 ) return null;
-00226   $p_string=str_replace("\'","'",$p_string);
-00227   $p_string=str_replace("''","'",$p_string);
-00228   $p_string=str_replace("'","\'",$p_string);
-00229   return $p_string;
-00230 }
-00231 
-00233 /* \brief store the string which print */
-00234 /*           the content of p_array in a table */
-00235 /*           used to display the menu */
-00236 /* parameter : array */
-00237 /* \return : string */
-00238 function ShowItem($p_array,$p_dir='V',$class="mtitle",$class_ref="mtitle",$default="",$p_extra="")
-00239 {
-00240   $ret="<TABLE $p_extra>";
-00241   // direction Vertical
-00242   if ( $p_dir == 'V') {
-00243     foreach ($p_array as $all=>$href){
-00244       $title="";
-00245       if ( isset ($href[2] )) 
-00246         $title=$href[2];
-00247       $ret.='<TR><TD CLASS="'.$class.'"><A class="'.$class_ref.'" HREF="'.$href[0].'" title="'.$title.'">'.$href[1].'</A></TD></TR>';
-00248     }
-00249   }
-00250       //direction Horizontal
-00251   else if ( $p_dir == 'H' ) {
-00252     $ret.="<TR>";
-00253     foreach ($p_array as $all=>$href){
-00254       $title="";
-00255       if ( isset ($href[2] )) 
-00256         $title=$href[2];
-00257       if ( $default== $href[0]) {
-00258       $ret.='<TD CLASS="selectedcell">'.$href[1].'</TD>';
-00259 
-00260       } else {
-00261       $ret.='<TD CLASS="'.$class.'"><A class="'.$class_ref.'" HREF="'.$href[0].'" title="'.$title.'">'.$href[1].'</A></TD>';
-00262       }
-00263     }
-00264     $ret.="</TR>";
-00265   }
-00266     $ret.="</TABLE>";
-00267   return $ret;
-00268 }
-00279 function echo_warning($p_string) 
-00280 {
-00281   echo '<H2 class="info">'.$p_string."</H2>";
-00282 }
-00293 function make_array($p_cn,$p_sql,$p_null=0) {
-00294 
-00295   $a=pg_exec($p_cn,$p_sql);
-00296   $max=pg_NumRows($a);
-00297   if ( $max==0) return null;
-00298   for ($i=0;$i<$max;$i++) {
-00299     $row=pg_fetch_row($a);
-00300     $r[$i]['value']=$row[0];
-00301     $r[$i]['label']=$row[1];
-00302   }
-00303   // add a blank item ?
-00304   if ( $p_null == 1 ) {
-00305   for ($i=$max;$i!=0;$i--) {
-00306     $r[$i]['value']=    $r[$i-1]['value'];
-00307     $r[$i]['label']=    $r[$i-1]['label'];
-00308   }
-00309   $r[0]['value']=-1;
-00310   $r[0]['label']=" ";
-00311   } //   if ( $p_null == 1 ) 
-00312 
-00313   return $r;
-00314 }
-00327 function getPeriodeName($p_cn,$p_id,$pos='p_start') {
-00328   if ( $pos != 'p_start' and 
-00329        $pos != 'p_end')
-00330     echo_error('ac_common.php'."-".__LINE__.'  UNDEFINED PERIODE');
-00331   $ret=execSql($p_cn,"select to_char($pos,'Mon YYYY') as t from parm_periode where p_id=$p_id");
-00332   if (pg_NumRows($ret) == 0) return null;
-00333   $a=pg_fetch_array($ret,0);
-00334   return $a['t'];
-00335 }
-00349 function getPeriodeFromMonth($p_cn,$p_date) {
-00350   $R=ExecSql($p_cn,"select p_id from parm_periode where
-00351               to_char(p_start,'DD.MM.YYYY') = '01.$p_date'");
-00352   if ( pg_NumRows($R) == 0 ) 
-00353     return -1;
-00354   $a=pg_fetch_array($R,0);
-00355 
-00356   return $a['p_id'];
-00357 }
-00369 function getPeriodeFromDate($p_cn,$p_date) {
-00370   $R=ExecSql($p_cn,"select p_id from parm_periode where
-00371               p_start <= to_date('$p_date','DD.MM.YYYY')
-00372            and p_end  >= to_date('$p_date','DD.MM.YYYY')
-00373            ");
-00374   if ( pg_NumRows($R) == 0 ) 
-00375     return -1;
-00376   $a=pg_fetch_array($R,0);
-00377 
-00378   return $a['p_id'];
-00379 }
-00380 
-00381 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00070 * \param $p_int +00071 * +00072 * \return +00073 * - 1 it's a number +00074 * - 0 it is not +00075 */ +00076 function isNumber($p_int) { +00077 if ( strlen (trim($p_int)) == 0 ) return 0; +00078 $p_int=trim($p_int); +00079 if (! ereg ("^-{0,1}[0-9]+.{0,1}[0-9]*$",$p_int) ) { +00080 return 0; +00081 } else { +00082 return 1; +00083 }// !ereg +00084 } +00085 +00097 function isDate ( $p_date) { +00098 if ( strlen (trim($p_date)) == 0 ) return null; +00099 if (! ereg ("^[0-9]{1,2}\.[0-9]{1,2}\.20[0-9]{2}",$p_date) ) { +00100 +00101 return null; +00102 } else { +00103 $l_date=explode(".",$p_date); +00104 if ( $l_date[2] > 2020 ) { +00105 return null; +00106 } +00107 if ( checkdate ($l_date[1],$l_date[0],$l_date[2]) == false) { +00108 return null; +00109 } +00110 +00111 }// !ereg +00112 return $p_date; +00113 } +00119 function formatDate($p_date) { +00120 if ( isDate($p_date)== null) return "null"; +00121 return "'".$p_date."'"; +00122 } +00132 function html_page_start($p_theme="",$p_script="",$p_script2="") +00133 { +00134 include_once ("postgres.php"); +00135 ini_set('magic_quotes_gpc','Off'); +00136 +00137 $cn=DbConnect(); +00138 if ( $p_theme != "") { +00139 $Res=ExecSql($cn,"select the_filestyle from theme +00140 where the_name='".$p_theme."'"); +00141 if (pg_NumRows($Res)==0) +00142 $style="style.css"; +00143 else { +00144 $s=pg_fetch_array($Res,0); +00145 $style=$s['the_filestyle']; +00146 } +00147 }else { +00148 $style="style.css"; +00149 } // end if +00150 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN">'; +00151 echo "<HTML>"; +00152 +00153 if ( $p_script2 != "" ) +00154 $p_script2='<script src="'.$p_script2.'" type="text/javascript"></script>'; +00155 +00156 echo "<HEAD> +00157 <TITLE>PhpCompta</TITLE> +00158 <META http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\"> +00159 <LINK REL=\"stylesheet\" type=\"text/css\" href=\"$style\" media=\"screen\"> +00160 <link rel=\"stylesheet\" type=\"text/css\" href=\"style-print.css\" media=\"print\">". +00161 $p_script2. " +00162 </HEAD><script src=\"scripts.js\" type=\"text/javascript\"></script>"; +00163 echo "<BODY $p_script>"; +00164 } +00169 function html_page_stop() +00170 { +00171 echo "</BODY>"; +00172 echo "</HTML>"; +00173 } +00181 function html_button_logout() { +00182 echo "<A class=\"mtitle\" HREF=logout.php> Logout </A>"; +00183 } +00191 function NoAccess() { +00192 echo "<BR><BR><BR><BR><BR><BR>"; +00193 echo "<P ALIGN=center><BLINK> +00194 <FONT size=+12 COLOR=RED> +00195 You haven't access +00196 </FONT></BLINK></P></BODY></HTML>"; +00197 +00198 exit -1; +00199 } +00207 function FormatString($p_string) +00208 { +00209 if ( !isset ($p_string) ) { +00210 echo_error("ac_common.php FormatString p_string empty"); +00211 return null; +00212 } +00213 $p_string=trim($p_string); +00214 if (strlen($p_string) == 0 ) return null; +00215 $p_string=str_replace("\'","'",$p_string); +00216 $p_string=str_replace("''","'",$p_string); +00217 $p_string=str_replace("'","\'",$p_string); +00218 return $p_string; +00219 } +00220 +00223 /* the content of p_array in a table */ +00224 /* used to display the menu */ +00225 /* \param array */ +00226 /* \return : string */ +00227 function ShowItem($p_array,$p_dir='V',$class="mtitle",$class_ref="mtitle",$default="",$p_extra="") +00228 { +00229 $ret="<TABLE $p_extra>"; +00230 // direction Vertical +00231 if ( $p_dir == 'V') { +00232 foreach ($p_array as $all=>$href){ +00233 $title=""; +00234 if ( isset ($href[2] )) +00235 $title=$href[2]; +00236 $ret.='<TR><TD CLASS="'.$class.'"><A class="'.$class_ref.'" HREF="'.$href[0].'" title="'.$title.'">'.$href[1].'</A></TD></TR>'; +00237 } +00238 } +00239 //direction Horizontal +00240 else if ( $p_dir == 'H' ) { +00241 $ret.="<TR>"; +00242 foreach ($p_array as $all=>$href){ +00243 $title=""; +00244 if ( isset ($href[2] )) +00245 $title=$href[2]; +00246 if ( $default== $href[0]) { +00247 $ret.='<TD CLASS="selectedcell">'.$href[1].'</TD>'; +00248 +00249 } else { +00250 $ret.='<TD CLASS="'.$class.'"><A class="'.$class_ref.'" HREF="'.$href[0].'" title="'.$title.'">'.$href[1].'</A></TD>'; +00251 } +00252 } +00253 $ret.="</TR>"; +00254 } +00255 $ret.="</TABLE>"; +00256 return $ret; +00257 } +00268 function echo_warning($p_string) +00269 { +00270 echo '<H2 class="info">'.$p_string."</H2>"; +00271 } +00281 function make_array($p_cn,$p_sql,$p_null=0) { +00282 +00283 $a=pg_exec($p_cn,$p_sql); +00284 $max=pg_NumRows($a); +00285 if ( $max==0) return null; +00286 for ($i=0;$i<$max;$i++) { +00287 $row=pg_fetch_row($a); +00288 $r[$i]['value']=$row[0]; +00289 $r[$i]['label']=$row[1]; +00290 } +00291 // add a blank item ? +00292 if ( $p_null == 1 ) { +00293 for ($i=$max;$i!=0;$i--) { +00294 $r[$i]['value']= $r[$i-1]['value']; +00295 $r[$i]['label']= $r[$i-1]['label']; +00296 } +00297 $r[0]['value']=-1; +00298 $r[0]['label']=" "; +00299 } // if ( $p_null == 1 ) +00300 +00301 return $r; +00302 } +00314 function getPeriodeName($p_cn,$p_id,$pos='p_start') { +00315 if ( $pos != 'p_start' and +00316 $pos != 'p_end') +00317 echo_error('ac_common.php'."-".__LINE__.' UNDEFINED PERIODE'); +00318 $ret=execSql($p_cn,"select to_char($pos,'Mon YYYY') as t from parm_periode where p_id=$p_id"); +00319 if (pg_NumRows($ret) == 0) return null; +00320 $a=pg_fetch_array($ret,0); +00321 return $a['t']; +00322 } +00334 function getPeriodeFromMonth($p_cn,$p_date) { +00335 $R=ExecSql($p_cn,"select p_id from parm_periode where +00336 to_char(p_start,'DD.MM.YYYY') = '01.$p_date'"); +00337 if ( pg_NumRows($R) == 0 ) +00338 return -1; +00339 $a=pg_fetch_array($R,0); +00340 +00341 return $a['p_id']; +00342 } +00354 function getPeriodeFromDate($p_cn,$p_date) { +00355 $R=ExecSql($p_cn,"select p_id from parm_periode where +00356 p_start <= to_date('$p_date','DD.MM.YYYY') +00357 and p_end >= to_date('$p_date','DD.MM.YYYY') +00358 "); +00359 if ( pg_NumRows($R) == 0 ) +00360 return -1; +00361 $a=pg_fetch_array($R,0); +00362 +00363 return $a['p_id']; +00364 } +00365 +00366 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/ac__common_8php.html b/doc/developper/html/ac__common_8php.html index 956dab70d..cac6ea714 100644 --- a/doc/developper/html/ac__common_8php.html +++ b/doc/developper/html/ac__common_8php.html @@ -4,10 +4,12 @@ - + -

ac_common.php File Reference

+

ac_common.php File Reference

common utilities for a lot of procedure, classe More... +

+

Go to the source code of this file. @@ -34,13 +36,16 @@ + + - + + @@ -57,7 +62,12 @@
 end tag
 html_button_logout ()
 Button logout.
 NoAccess ()
 Echo no access and stop.
 FormatString ($p_string)
 Fix the problem with the ' char.
 Fix the problem with the quote char for the database.
 ShowItem ($p_array, $p_dir='V', $class="mtitle", $class_ref="mtitle", $default="", $p_extra="")
 store the string which print
 echo_warning ($p_string)
 warns
 Return the period corresponding to the date.
-


Function Documentation

+

Detailed Description

+common utilities for a lot of procedure, classe +

+ +

+Definition in file ac_common.php.


Function Documentation

@@ -94,22 +104,22 @@

Compare 2 dates.

-cmpDate

Parameters:
+
Parameters:
date 
date2 
-

Returns:
- == 0 les dates sont identiques
    -
  • > 0 date1 > date2
  • < 0 date1 < date2
+
Returns:
    +
  • == 0 les dates sont identiques
  • > 0 date1 > date2
  • < 0 date1 < date2

-Definition at line 51 of file ac_common.php. +Definition at line 53 of file ac_common.php.

-References isDate(). +References isDate().

-Referenced by VerifData(), and VerifyOperationDate(). +Referenced by VerifData(), and VerifyOperationDate().

@@ -139,7 +149,7 @@ Referenced by VerifData(),

log error into the /tmp/phpcompta_error.log it doesn't work on windows

-echo_error

Parameters:
+
Parameters:
log message
@@ -147,11 +157,11 @@ echo_error
Parameters:
Returns:
nothing

-Definition at line 34 of file ac_common.php. +Definition at line 36 of file ac_common.php.

-References echo_debug(). +References echo_debug().

-Referenced by AddFiche(), AddForm(), AddModele(), DeleteRapt(), ExecSql(), form_verify_input(), FormAchInput(), FormatString(), FormODS(), FormVenInput(), GetFicheJrn(), getPeriodeName(), GetSqlFiche(), GetTvaPoste(), Imp(), InsertRapt(), isValid(), RecordFin(), Remove(), Invoice::Save(), Document_modele::Save(), save_upload_document(), fiche::update(), UpdateFiche(), UpdateJrn(), UpdateModele(), VerifData(), and VerifyOperationDate(). +Referenced by AddFiche(), AddForm(), AddModele(), DeleteRapt(), ExecSql(), form_verify_input(), FormAchInput(), FormatString(), FormODS(), FormVenInput(), FormVenteView(), GetFicheJrn(), getPeriodeName(), GetTvaPoste(), Imp(), InsertRapt(), isValid(), RecordFin(), Remove(), Invoice::Save(), Document_modele::Save(), save_upload_document(), fiche::update(), UpdateFiche(), UpdateJrn(), UpdateModele(), VerifData(), and VerifyOperationDate().

@@ -181,7 +191,6 @@ Referenced by AddFiche()

warns

-echo_warning

Parameters:
+Referenced by GetFicheJrn(), and IsFicheOfJrn().
: 

@@ -226,13 +235,12 @@ Referenced by GetFicheJr

call cmpDate

-formatDate($p_date)

-

Returns:
: the date or the quoted string null
+
Returns:
the date or the quoted string null

-Definition at line 118 of file ac_common.php. +Definition at line 119 of file ac_common.php.

-References isDate(). +References isDate().

@@ -260,24 +268,21 @@ References isDate().

-Fix the problem with the ' char. +Fix the problem with the quote char for the database.

-FormatString($p_string)

Parameters:
- +
: 
    -
  • gen :
-
$p_string 
-
Returns:
:
+
Returns:
a string which won't let strange char for the database

-Definition at line 218 of file ac_common.php. +Definition at line 207 of file ac_common.php.

-References echo_error(). +References echo_error().

-Referenced by AddFiche(), AddForm(), AddModele(), fiche::CountByDef(), fiche::insert(), InsertJrn(), ListJrn(), RecordFin(), RecordInvoice(), RecordSell(), Remove(), parm_code::Save(), Document_modele::Save(), Customer::Summary(), fiche::update(), UpdateComment(), UpdateFiche(), UpdateForm(), Own::UpdateRow(), and ViewJrn(). +Referenced by AddFiche(), AddForm(), AddModele(), action::Confirm(), fiche::CountByDef(), action::Display(), fiche::GetByQCode(), fiche::insert(), InsertJrn(), ListJrn(), RecordFin(), RecordInvoice(), RecordSell(), Remove(), parm_code::Save(), Document_modele::Save(), action::SaveStage2(), Customer::Summary(), contact::Summary(), fiche::update(), UpdateComment(), UpdateFiche(), UpdateForm(), Own::UpdateRow(), and ViewJrn().

@@ -316,7 +321,6 @@ Referenced by AddFiche()

Return the period corresponding to the date.

-getPeriodeFromDate

Parameters:
+References $a, and ExecSql().
: 
    @@ -329,9 +333,9 @@ getPeriodeFromDate

-Definition at line 369 of file ac_common.php. +Definition at line 354 of file ac_common.php.

-References $a, and ExecSql().

@@ -370,21 +374,18 @@ References $a, and Return the period corresponding to the date.

-getPeriodeFromMonth

Parameters:
- +
p_cn database connection
the month + year 'MM.YYYY' gen :
    -
  • none
-
the month + year 'MM.YYYY'
Returns:
: parm_periode.p_id

-Definition at line 349 of file ac_common.php. +Definition at line 334 of file ac_common.php.

-References $a, and ExecSql(). +References $a, and ExecSql().

Referenced by ParseFormula(). @@ -431,22 +432,19 @@ Referenced by ParseFor

Show the periode which found thanks its id.

-getPeriodeName

Parameters:
- +
$p_cn database connection
p_id 
Start or end gen :
    -
-
Start or end
Returns:
: string

-Definition at line 327 of file ac_common.php. +Definition at line 314 of file ac_common.php.

-References $a, $ret, and echo_error(). +References $a, $ret, and echo_error().

@@ -473,19 +471,14 @@ References $a,

-html_button_logout

Parameters:
- - -
: 
    -
  • gen :
-
-
-
Returns:
:
+Button logout. +

+

Returns:
nothing

-Definition at line 186 of file ac_common.php. +Definition at line 181 of file ac_common.php.

-Referenced by u_ShowMenu(). +Referenced by u_ShowMenu().

@@ -530,24 +523,19 @@ Referenced by u_ShowMenu

Default page header for each page.

-html_page_start

Parameters:
- + + +
: 
    -
  • default theme
      -
    • $p_script
    -
  • p_script2 another js script gen :
      -
    • none
    -
-
default theme
$p_script 
$p_script2 another js script
-
Returns:
: none
+
Returns:
none

-Definition at line 134 of file ac_common.php. +Definition at line 132 of file ac_common.php.

-References $cn, $Res, $style, DbConnect(), and ExecSql(). +References $cn, $Res, $style, DbConnect(), and ExecSql().

@@ -576,9 +564,9 @@ References $cn,

end tag

-html_page_stop() +

-Definition at line 171 of file ac_common.php. +Definition at line 169 of file ac_common.php.

@@ -608,23 +596,21 @@ Definition at line 171 Verifie qu'une date est bien formaté en d.m.y et est valable.

-isDate

Parameters:
+
Parameters:
- +
: 
    -
  • $p_date gen :
  • rien
-
$p_date 
-
Returns:
:

-Definition at line 144 of file class_document_modele.php. +Definition at line 203 of file class_document_modele.php.

-References $file, $ret, $row, $tmp, Commit(), ExecSql(), and StartSql(). +References $file, $ret, $row, $tmp, Commit(), ExecSql(), and StartSql().

@@ -236,11 +242,14 @@ References $file

+: show all the stored document_modele. return a string containing all the data separate by TD & TR tag +

+

Returns:
table in HTML Code

-Definition at line 44 of file class_document_modele.php. +Definition at line 49 of file class_document_modele.php.

-References $all, $Res, $sql, and ExecSql(). +References $a, $all, $c, $r, $Res, $row, $sql, ExecSql(), form(), md_id, and md_name.

@@ -267,11 +276,17 @@ References $all

- +: Save a document_modele in the database, if the document_modele doesn't exist yet it will be first created (-> insert into document_modele) in that case the name and the type must be set set before calling Save, the name will be modified with FormatString

-Definition at line 69 of file class_document_modele.php. +Save

+parm :

    +
  • none gen :
  • none return:

-References $old_oid, $r, $ret, $Ret, $sql, echo_debug(), echo_error(), ExecSql(), exit, FormatString(), name, NextSequence(), Rollback(), and StartSql(). +none +

+Definition at line 103 of file class_document_modele.php. +

+References $old_oid, $r, $ret, $Ret, $sql, Commit(), echo_debug(), echo_error(), ExecSql(), exit, FormatString(), isNumber(), md_id, name, NextSequence(), Rollback(), start, and StartSql().


Field Documentation

@@ -295,9 +310,9 @@ References $old_oid,

- +database connection

-Definition at line 22 of file class_document_modele.php. +Definition at line 29 of file class_document_modele.php.

@@ -306,7 +321,7 @@ Definition at line - +
Document_modele::$md_id Document_modele::$md_id
@@ -320,9 +335,9 @@ Definition at line
23 of file class_document_modele.php. +Definition at line 30 of file class_document_modele.php.

@@ -345,9 +360,9 @@ Definition at line Document file

-Definition at line 26 of file class_document_modele.php. +Definition at line 33 of file class_document_modele.php.

@@ -356,7 +371,7 @@ Definition at line - +
Document_modele::$md_name Document_modele::$md_name
@@ -370,9 +385,34 @@ Definition at line
31 of file class_document_modele.php. + + +

+ + + + +
+ + + + +
Document_modele::$md_sequence
+
+ + + + +sequence name (autogenerate) +

+Definition at line 34 of file class_document_modele.php.

+   +

-Definition at line 24 of file class_document_modele.php.

@@ -381,7 +421,7 @@ Definition at line - +
Document_modele::$md_type Document_modele::$md_type
@@ -395,14 +435,39 @@ Definition at line
32 of file class_document_modele.php. + + +

+ + + + +
+ + + + +
Document_modele::$sequence
+
+ + + + +sequence number used by the create sequence start with +

+Definition at line 35 of file class_document_modele.php.

+   +

-Definition at line 25 of file class_document_modele.php.


The documentation for this class was generated from the following file: -
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/classInvoice.html b/doc/developper/html/classInvoice.html index a4afef7be..ff6fb6601 100644 --- a/doc/developper/html/classInvoice.html +++ b/doc/developper/html/classInvoice.html @@ -4,8 +4,11 @@ - -

Invoice Class Reference

+ +

Invoice Class Reference

Class invoice to manage the customer invoice. +More... +

+

@@ -31,11 +34,11 @@

Public Member Functions

 Invoice ($p_cn)

Detailed Description

- +Class invoice to manage the customer invoice.

-Definition at line 21 of file class_invoice.php.


Constructor & Destructor Documentation

+Definition at line 30 of file class_invoice.php.

Constructor & Destructor Documentation

@@ -63,7 +66,7 @@ Definition at line 2

-Definition at line 27 of file class_invoice.php. +Definition at line 36 of file class_invoice.php.


Member Function Documentation

@@ -93,7 +96,7 @@ Definition at line 2

-Definition at line 84 of file class_invoice.php. +Definition at line 93 of file class_invoice.php.

@@ -122,9 +125,9 @@ Definition at line 8

-Definition at line 88 of file class_invoice.php. +Definition at line 97 of file class_invoice.php.

-References $r, and METHOD. +References $r, and METHOD.

@@ -153,7 +156,7 @@ References $r

-Definition at line 96 of file class_invoice.php. +Definition at line 105 of file class_invoice.php.

@@ -192,9 +195,9 @@ Definition at line 9

-Definition at line 102 of file class_invoice.php. +Definition at line 111 of file class_invoice.php.

-References $file, $ret, $row, $tmp, Commit(), ExecSql(), and StartSql(). +References $file, $ret, $row, $tmp, Commit(), ExecSql(), and StartSql().

@@ -223,9 +226,9 @@ References $file

-Definition at line 31 of file class_invoice.php. +Definition at line 40 of file class_invoice.php.

-References $all, $Res, $sql, and ExecSql(). +References $all, $Res, $sql, and ExecSql().

@@ -254,9 +257,9 @@ References $all

-Definition at line 41 of file class_invoice.php. +Definition at line 50 of file class_invoice.php.

-References $old_oid, $r, $ret, echo_debug(), echo_error(), ExecSql(), exit, Rollback(), and StartSql(). +References $old_oid, $r, $ret, echo_debug(), echo_error(), ExecSql(), exit, Rollback(), and StartSql().


Field Documentation

@@ -280,9 +283,9 @@ References $old_oid,

- +database conx

-Definition at line 22 of file class_invoice.php. +Definition at line 31 of file class_invoice.php.

@@ -305,9 +308,9 @@ Definition at line 2

- +iv_id

-Definition at line 23 of file class_invoice.php. +Definition at line 32 of file class_invoice.php.

@@ -330,14 +333,14 @@ Definition at line 2

- +template's name

-Definition at line 24 of file class_invoice.php. +Definition at line 33 of file class_invoice.php.


The documentation for this class was generated from the following file: -
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/classOwn.html b/doc/developper/html/classOwn.html index ca0c68029..2b77fe4d3 100644 --- a/doc/developper/html/classOwn.html +++ b/doc/developper/html/classOwn.html @@ -4,26 +4,31 @@ - -

Own Class Reference

+ +

Own Class Reference

Class to manage the company parameter (address, name...). +More... +

+

+ +

Public Member Functions

 Own ($p_cn)
 UpdateRow ($p_attr)
 Update a row.
 Save ()
 save data

Data Fields

 $db

Detailed Description

- +Class to manage the company parameter (address, name...).

-Definition at line 21 of file class_own.php.


Constructor & Destructor Documentation

+Definition at line 28 of file class_own.php.

Constructor & Destructor Documentation

@@ -51,9 +56,9 @@ Definition at line 21

-Definition at line 24 of file class_own.php. +Definition at line 31 of file class_own.php.

-References $Res, $row, and ExecSql(). +References $Res, $row, and ExecSql().


Member Function Documentation

@@ -81,11 +86,13 @@ References $Res, <

+save data +

-Definition at line 63 of file class_own.php. +Definition at line 62 of file class_own.php.

-References MY_COMMUNE, MY_CP, MY_NAME, MY_NUMBER, MY_STREET, and MY_TVA. +References MY_COMMUNE, MY_CP, MY_NAME, MY_NUMBER, MY_STREET, and MY_TVA.

@@ -113,11 +120,18 @@ References MY_COMMUN

+Update a row. +

+

Parameters:
+ + +
give the attribut name
+

-Definition at line 47 of file class_own.php. +Definition at line 51 of file class_own.php.

-References FormatString(). +References FormatString().


Field Documentation

@@ -143,12 +157,12 @@ References FormatString(

-Definition at line 22 of file class_own.php. +Definition at line 29 of file class_own.php.


The documentation for this class was generated from the following file:
  • /home/dany/developpement/phpcompta-dev/phpcompta/include/class_own.php
-
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class_8ezpdf_8php-source.html b/doc/developper/html/class_8ezpdf_8php-source.html index b72f1c8f5..85aca9d85 100644 --- a/doc/developper/html/class_8ezpdf_8php-source.html +++ b/doc/developper/html/class_8ezpdf_8php-source.html @@ -4,7 +4,7 @@ - +

class.ezpdf.php

Go to the documentation of this file.
00001 <?php
@@ -396,9 +396,9 @@
 00387       if ($k && $k>0){
 00388         $totalPages = $k-1;
 00389       } else {
-00390         $l = $this->ezPRVTpageNumberSearch('stoptn',$tmp);
+00390         $l = $this->ezPRVTpageNumberSearch('stoptn',$tmp);
 00391         if ($l && $l>0){
-00392           $totalPages = $l;
+00392           $totalPages = $l;
 00393         } else {
 00394           $totalPages = $totalPages1;
 00395         }
@@ -408,7 +408,7 @@
 00399           if (is_array($tmp[$pageNum])){
 00400             // then this must be starting page numbers
 00401             $status=1;
-00402             $info = $tmp[$pageNum];
+00402             $info = $tmp[$pageNum];
 00403             $info['dnum']=$info['num']-$pageNum;
 00404             // also check for the special case of the numbering stopping and starting on the same page
 00405             if (isset($info['stopn']) || isset($info['stoptn']) ){
@@ -554,7 +554,7 @@
 00545   // to be the postion of the bottom line
 00546   
 00547   // begin the transaction
-00548   $this->transaction('start');
+00548   $this->transaction('start');
 00549   $ok=0;
 00550 //  $y-=$gap-$decender;
 00551   $y-=$gap;
@@ -876,7 +876,7 @@
 00867 
 00868   // start a transaction which will be used to regress the table, if there are not enough rows protected
 00869   if ($options['protectRows']>0){
-00870     $this->transaction('start');
+00870     $this->transaction('start');
 00871     $movedOnce=0;
 00872   }
 00873   $abortTable = 1;
@@ -969,7 +969,7 @@
 00960       if (isset($this->ez['columns']) && $this->ez['columns']['on']==1){
 00961         $columnStart = $this->ez['columns']['colNum'];
 00962       }
-00963       $this->transaction('start');
+00963       $this->transaction('start');
 00964       $row_orig = $row;
 00965       $y_orig = $y;
 00966       $y0_orig = $y0;
@@ -1066,7 +1066,7 @@
 01057           $line = $this->ezProcessText($line);
 01058           $start=1;
 01059 
-01060           while (strlen($line) || $start){
+01060           while (strlen($line) || $start){
 01061             $start=0;
 01062             if (!$colNewPage){
 01063               $this->y=$this->y-$height;
@@ -1272,7 +1272,7 @@
 01263   $lines = explode("\n",$text);
 01264   foreach ($lines as $line){
 01265     $start=1;
-01266     while (strlen($line) || $start){
+01266     while (strlen($line) || $start){
 01267       $start=0;
 01268       $this->y=$this->y-$height;
 01269       if ($this->y < $this->ez['bottomMargin']){
@@ -1377,17 +1377,17 @@
 01368                 //center if justification=center
 01369                 if ($just == 'center')
 01370                 {
-01371                         $offset = ($bigwidth - $width) / 2;
+01371                         $offset = ($bigwidth - $width) / 2;
 01372                 }
 01373                 //move to right if justification=right
 01374                 if ($just == 'right')
 01375                 {
-01376                         $offset = ($bigwidth - $width);
+01376                         $offset = ($bigwidth - $width);
 01377                 }
 01378                 //leave at left if justification=left
 01379                 if ($just == 'left')
 01380                 {
-01381                         $offset = 0;
+01381                         $offset = 0;
 01382                 }
 01383         }
 01384 
@@ -1483,7 +1483,7 @@
 01474   // a callback function to support the formation of clickable links within the document
 01475   $lineFactor=0.05; // the thickness of the line as a proportion of the height. also the drop of the line.
 01476   switch($info['status']){
-01477     case 'start':
+01477     case 'start':
 01478     case 'sol':
 01479       // the beginning of the link
 01480       // this should contain the URl for the link as the 'p' entry, and will also contain the value of 'nCallback'
@@ -1508,14 +1508,14 @@
 01499       $start = $this->ez['links'][$i];
 01500       // add underlining
 01501       if ($internal){
-01502         $this->addInternalLink($start['url'],$start['x'],$start['y']+$start['decender'],$info['x'],$start['y']+$start['decender']+$start['height']);
+01502         $this->addInternalLink($start['url'],$start['x'],$start['y']+$start['decender'],$info['x'],$start['y']+$start['decender']+$start['height']);
 01503       } else {
-01504         $a = deg2rad((float)$start['angle']-90.0);
+01504         $a = deg2rad((float)$start['angle']-90.0);
 01505         $drop = $start['height']*$lineFactor*1.5;
 01506         $dropx = cos($a)*$drop;
 01507         $dropy = -sin($a)*$drop;
-01508         $this->line($start['x']-$dropx,$start['y']-$dropy,$info['x']-$dropx,$info['y']-$dropy);
-01509         $this->addLink($start['url'],$start['x'],$start['y']+$start['decender'],$info['x'],$start['y']+$start['decender']+$start['height']);
+01508         $this->line($start['x']-$dropx,$start['y']-$dropy,$info['x']-$dropx,$info['y']-$dropy);
+01509         $this->addLink($start['url'],$start['x'],$start['y']+$start['decender'],$info['x'],$start['y']+$start['decender']+$start['height']);
 01510         $this->restoreState();
 01511       }
 01512       break;
@@ -1528,7 +1528,7 @@
 01519   // a callback function to support underlining
 01520   $lineFactor=0.05; // the thickness of the line as a proportion of the height. also the drop of the line.
 01521   switch($info['status']){
-01522     case 'start':
+01522     case 'start':
 01523     case 'sol':
 01524     
 01525       // the beginning of the underline zone
@@ -1548,11 +1548,11 @@
 01539       $i = $info['nCallback'];
 01540       $start = $this->ez['links'][$i];
 01541       // add underlining
-01542       $a = deg2rad((float)$start['angle']-90.0);
+01542       $a = deg2rad((float)$start['angle']-90.0);
 01543       $drop = $start['height']*$lineFactor*1.5;
 01544       $dropx = cos($a)*$drop;
 01545       $dropy = -sin($a)*$drop;
-01546       $this->line($start['x']-$dropx,$start['y']-$dropy,$info['x']-$dropx,$info['y']-$dropy);
+01546       $this->line($start['x']-$dropx,$start['y']-$dropy,$info['x']-$dropx,$info['y']-$dropy);
 01547       $this->restoreState();
 01548       break;
 01549   }
@@ -1562,7 +1562,7 @@
 01553 
 01554 }
 01555 ?>
-

Generated on Wed May 31 21:39:14 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class_8ezpdf_8php.html b/doc/developper/html/class_8ezpdf_8php.html index 9f6a6fee6..583ae9df4 100644 --- a/doc/developper/html/class_8ezpdf_8php.html +++ b/doc/developper/html/class_8ezpdf_8php.html @@ -4,7 +4,7 @@ - +

class.ezpdf.php File Reference

@@ -15,7 +15,7 @@ class  Cezpdf -
Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class_8pdf_8php-source.html b/doc/developper/html/class_8pdf_8php-source.html index f90a95ffb..fce95fc54 100644 --- a/doc/developper/html/class_8pdf_8php-source.html +++ b/doc/developper/html/class_8pdf_8php-source.html @@ -4,7 +4,7 @@ - +

class.pdf.php

Go to the documentation of this file.
00001 <?php
@@ -58,43 +58,43 @@
 00203 
 00204 }
 00205 
-00224 function o_destination($id,$action,$options=''){
-00225   if ($action!='new'){
+00224 function o_destination($id,$action,$options=''){
+00225   if ($action!='new'){
 00226     $o =& $this->objects[$id];
 00227   }
 00228   switch($action){
 00229     case 'new':
 00230       $this->objects[$id]=array('t'=>'destination','info'=>array());
-00231       $tmp = '';
+00231       $tmp = '';
 00232       switch ($options['type']){
 00233         case 'XYZ':
 00234         case 'FitR':
-00235           $tmp =  ' '.$options['p3'].$tmp;
+00235           $tmp =  ' '.$options['p3'].$tmp;
 00236         case 'FitH':
 00237         case 'FitV':
 00238         case 'FitBH':
 00239         case 'FitBV':
-00240           $tmp =  ' '.$options['p1'].' '.$options['p2'].$tmp;
+00240           $tmp =  ' '.$options['p1'].' '.$options['p2'].$tmp;
 00241         case 'Fit':
 00242         case 'FitB':
-00243           $tmp =  $options['type'].$tmp;
-00244           $this->objects[$id]['info']['string']=$tmp;
+00243           $tmp =  $options['type'].$tmp;
+00244           $this->objects[$id]['info']['string']=$tmp;
 00245           $this->objects[$id]['info']['page']=$options['page'];
 00246       }
 00247       break;
 00248     case 'out':
-00249       $tmp = $o['info'];
+00249       $tmp = $o['info'];
 00250       $res="\n".$id." 0 obj\n".'['.$tmp['page'].' 0 R /'.$tmp['string']."]\nendobj\n";
 00251       return $res;
 00252       break;
 00253   }
 00254 }
 00255 
-00259 function o_viewerPreferences($id,$action,$options=''){
-00260   if ($action!='new'){
+00259 function o_viewerPreferences($id,$action,$options=''){
+00260   if ($action!='new'){
 00261     $o =& $this->objects[$id];
 00262   }
-00263   switch ($action){
+00263   switch ($action){
 00264     case 'new':
 00265       $this->objects[$id]=array('t'=>'viewerPreferences','info'=>array());
 00266       break;
@@ -125,11 +125,11 @@
 00291   }
 00292 }
 00293 
-00297 function o_catalog($id,$action,$options=''){
-00298   if ($action!='new'){
+00297 function o_catalog($id,$action,$options=''){
+00298   if ($action!='new'){
 00299     $o =& $this->objects[$id];
 00300   }
-00301   switch ($action){
+00301   switch ($action){
 00302     case 'new':
 00303       $this->objects[$id]=array('t'=>'catalog','info'=>array());
 00304       $this->catalogId=$id;
@@ -172,11 +172,11 @@
 00341   }
 00342 }
 00343 
-00347 function o_pages($id,$action,$options=''){
-00348   if ($action!='new'){
+00347 function o_pages($id,$action,$options=''){
+00348   if ($action!='new'){
 00349     $o =& $this->objects[$id];
 00350   }
-00351   switch ($action){
+00351   switch ($action){
 00352     case 'new':
 00353       $this->objects[$id]=array('t'=>'pages','info'=>array());
 00354       $this->o_catalog($this->catalogId,'pages',$id);
@@ -254,7 +254,7 @@
 00426           }
 00427           $res.="\n>>";
 00428           if (isset($o['info']['mediaBox'])){
-00429             $tmp=$o['info']['mediaBox'];
+00429             $tmp=$o['info']['mediaBox'];
 00430             $res.="\n/MediaBox [".sprintf('%.3f',$tmp[0]).' '.sprintf('%.3f',$tmp[1]).' '.sprintf('%.3f',$tmp[2]).' '.sprintf('%.3f',$tmp[3]).']';
 00431           }
 00432         }
@@ -267,11 +267,11 @@
 00439   }
 00440 }
 00441 
-00445 function o_outlines($id,$action,$options=''){
-00446   if ($action!='new'){
+00445 function o_outlines($id,$action,$options=''){
+00446   if ($action!='new'){
 00447     $o =& $this->objects[$id];
 00448   }
-00449   switch ($action){
+00449   switch ($action){
 00450     case 'new':
 00451       $this->objects[$id]=array('t'=>'outlines','info'=>array('outlines'=>array()));
 00452       $this->o_catalog($this->catalogId,'outlines',$id);
@@ -294,11 +294,11 @@
 00469   }
 00470 }
 00471 
-00475 function o_font($id,$action,$options=''){
-00476   if ($action!='new'){
+00475 function o_font($id,$action,$options=''){
+00476   if ($action!='new'){
 00477     $o =& $this->objects[$id];
 00478   }
-00479   switch ($action){
+00479   switch ($action){
 00480     case 'new':
 00481       $this->objects[$id]=array('t'=>'font','info'=>array('name'=>$options['name'],'SubType'=>'Type1'));
 00482       $fontNum=$this->numFonts;
@@ -375,11 +375,11 @@
 00553   }
 00554 }
 00555 
-00559 function o_fontDescriptor($id,$action,$options=''){
-00560   if ($action!='new'){
+00559 function o_fontDescriptor($id,$action,$options=''){
+00560   if ($action!='new'){
 00561     $o =& $this->objects[$id];
 00562   }
-00563   switch ($action){
+00563   switch ($action){
 00564     case 'new':
 00565       $this->objects[$id]=array('t'=>'fontDescriptor','info'=>$options);
 00566       break;
@@ -423,11 +423,11 @@
 00604   }
 00605 }
 00606 
-00610 function o_fontEncoding($id,$action,$options=''){
-00611   if ($action!='new'){
+00610 function o_fontEncoding($id,$action,$options=''){
+00611   if ($action!='new'){
 00612     $o =& $this->objects[$id];
 00613   }
-00614   switch ($action){
+00614   switch ($action){
 00615     case 'new':
 00616       // the options array should contain 'differences' and maybe 'encoding'
 00617       $this->objects[$id]=array('t'=>'fontEncoding','info'=>$options);
@@ -457,11 +457,11 @@
 00641   }
 00642 }
 00643 
-00647 function o_procset($id,$action,$options=''){
-00648   if ($action!='new'){
+00647 function o_procset($id,$action,$options=''){
+00648   if ($action!='new'){
 00649     $o =& $this->objects[$id];
 00650   }
-00651   switch ($action){
+00651   switch ($action){
 00652     case 'new':
 00653       $this->objects[$id]=array('t'=>'procset','info'=>array('PDF'=>1,'Text'=>1));
 00654       $this->o_pages($this->currentNode,'procset',$id);
@@ -489,11 +489,11 @@
 00676   }
 00677 }
 00678 
-00682 function o_info($id,$action,$options=''){
-00683   if ($action!='new'){
+00682 function o_info($id,$action,$options=''){
+00683   if ($action!='new'){
 00684     $o =& $this->objects[$id];
 00685   }
-00686   switch ($action){
+00686   switch ($action){
 00687     case 'new':
 00688       $this->infoObject=$id;
 00689       $date='D:'.date('Ymd');
@@ -508,7 +508,7 @@
 00698     case 'CreationDate':
 00699     case 'ModDate':
 00700     case 'Trapped':
-00701       $o['info'][$action]=$options;
+00701       $o['info'][$action]=$options;
 00702       break;
 00703     case 'out':
 00704       if ($this->encrypted){
@@ -530,17 +530,17 @@
 00720   }
 00721 }
 00722 
-00726 function o_action($id,$action,$options=''){
-00727   if ($action!='new'){
+00726 function o_action($id,$action,$options=''){
+00727   if ($action!='new'){
 00728     $o =& $this->objects[$id];
 00729   }
-00730   switch ($action){
+00730   switch ($action){
 00731     case 'new':
 00732       if (is_array($options)){
-00733         $this->objects[$id]=array('t'=>'action','info'=>$options,'type'=>$options['type']);
+00733         $this->objects[$id]=array('t'=>'action','info'=>$options,'type'=>$options['type']);
 00734       } else {
 00735         // then assume a URI action
-00736         $this->objects[$id]=array('t'=>'action','info'=>$options,'type'=>'URI');
+00736         $this->objects[$id]=array('t'=>'action','info'=>$options,'type'=>'URI');
 00737       }
 00738       break;
 00739     case 'out':
@@ -569,11 +569,11 @@
 00762   }
 00763 }
 00764 
-00769 function o_annotation($id,$action,$options=''){
-00770   if ($action!='new'){
+00769 function o_annotation($id,$action,$options=''){
+00770   if ($action!='new'){
 00771     $o =& $this->objects[$id];
 00772   }
-00773   switch ($action){
+00773   switch ($action){
 00774     case 'new':
 00775       // add the annotation to the current page
 00776       $pageId = $this->currentPage;
@@ -618,11 +618,11 @@
 00815   }
 00816 }
 00817 
-00821 function o_page($id,$action,$options=''){
-00822   if ($action!='new'){
+00821 function o_page($id,$action,$options=''){
+00822   if ($action!='new'){
 00823     $o =& $this->objects[$id];
 00824   }
-00825   switch ($action){
+00825   switch ($action){
 00826     case 'new':
 00827       $this->numPages++;
 00828       $this->objects[$id]=array('t'=>'page','info'=>array('parent'=>$this->currentNode,'pageNum'=>$this->numPages));
@@ -684,11 +684,11 @@
 00884   }
 00885 }
 00886 
-00890 function o_contents($id,$action,$options=''){
-00891   if ($action!='new'){
+00890 function o_contents($id,$action,$options=''){
+00891   if ($action!='new'){
 00892     $o =& $this->objects[$id];
 00893   }
-00894   switch ($action){
+00894   switch ($action){
 00895     case 'new':
 00896       $this->objects[$id]=array('t'=>'contents','c'=>'','info'=>array());
 00897       if (strlen($options) && intval($options)){
@@ -705,25 +705,25 @@
 00908         $o['info'][$k]=$v;
 00909       }
 00910     case 'out':
-00911       $tmp=$o['c'];
+00911       $tmp=$o['c'];
 00912       $res= "\n".$id." 0 obj\n";
 00913       if (isset($this->objects[$id]['raw'])){
-00914         $res.=$tmp;
+00914         $res.=$tmp;
 00915       } else {
 00916         $res.= "<<";
 00917         if (function_exists('gzcompress') && $this->options['compression']){
 00918           // then implement ZLIB based compression on this content stream
 00919           $res.=" /Filter /FlateDecode";
-00920           $tmp = gzcompress($tmp);
+00920           $tmp = gzcompress($tmp);
 00921         }
 00922         if ($this->encrypted){
 00923           $this->encryptInit($id);
-00924           $tmp = $this->ARC4($tmp);
+00924           $tmp = $this->ARC4($tmp);
 00925         }
 00926         foreach($o['info'] as $k=>$v){
 00927           $res .= "\n/".$k.' '.$v;
 00928         }
-00929         $res.="\n/Length ".strlen($tmp)." >>\nstream\n".$tmp."\nendstream";
+00929         $res.="\n/Length ".strlen($tmp)." >>\nstream\n".$tmp."\nendstream";
 00930       }
 00931       $res.="\nendobj\n";
 00932       return $res;
@@ -731,8 +731,8 @@
 00934   }
 00935 }
 00936 
-00940 function o_image($id,$action,$options=''){
-00941   if ($action!='new'){
+00940 function o_image($id,$action,$options=''){
+00941   if ($action!='new'){
 00942     $o =& $this->objects[$id];
 00943   }
 00944   switch($action){
@@ -761,18 +761,18 @@
 00967         $this->objects[$id]['info']['Filter']='/FlateDecode';
 00968         $this->objects[$id]['info']['DecodeParms']='<< /Predictor 15 /Colors '.$options['ncolor'].' /Columns '.$options['iw'].' /BitsPerComponent '.$options['bitsPerComponent'].'>>';
 00969         if (strlen($options['pdata'])){
-00970           $tmp = ' [ /Indexed /DeviceRGB '.(strlen($options['pdata'])/3-1).' ';
+00970           $tmp = ' [ /Indexed /DeviceRGB '.(strlen($options['pdata'])/3-1).' ';
 00971           $this->numObj++;
 00972           $this->o_contents($this->numObj,'new');
 00973           $this->objects[$this->numObj]['c']=$options['pdata'];
-00974           $tmp.=$this->numObj.' 0 R';
-00975           $tmp .=' ]';
-00976           $this->objects[$id]['info']['ColorSpace'] = $tmp;
+00974           $tmp.=$this->numObj.' 0 R';
+00975           $tmp .=' ]';
+00976           $this->objects[$id]['info']['ColorSpace'] = $tmp;
 00977           if (isset($options['transparency'])){
 00978             switch($options['transparency']['type']){
 00979               case 'indexed':
-00980                 $tmp=' [ '.$options['transparency']['data'].' '.$options['transparency']['data'].'] ';
-00981                 $this->objects[$id]['info']['Mask'] = $tmp;
+00980                 $tmp=' [ '.$options['transparency']['data'].' '.$options['transparency']['data'].'] ';
+00981                 $this->objects[$id]['info']['Mask'] = $tmp;
 00982                 break;
 00983             }
 00984           }
@@ -788,23 +788,23 @@
 00994       $this->o_procset($this->procsetObjectId,'add','ImageC');
 00995       break;
 00996     case 'out':
-00997       $tmp=$o['data'];
+00997       $tmp=$o['data'];
 00998       $res= "\n".$id." 0 obj\n<<";
 00999       foreach($o['info'] as $k=>$v){
 01000         $res.="\n/".$k.' '.$v;
 01001       }
 01002       if ($this->encrypted){
 01003         $this->encryptInit($id);
-01004         $tmp = $this->ARC4($tmp);
+01004         $tmp = $this->ARC4($tmp);
 01005       }
-01006       $res.="\n/Length ".strlen($tmp)." >>\nstream\n".$tmp."\nendstream\nendobj\n";
+01006       $res.="\n/Length ".strlen($tmp)." >>\nstream\n".$tmp."\nendstream\nendobj\n";
 01007       return $res;
 01008       break;
 01009   }
 01010 }
 01011 
-01015 function o_encryption($id,$action,$options=''){
-01016   if ($action!='new'){
+01015 function o_encryption($id,$action,$options=''){
+01016   if ($action!='new'){
 01017     $o =& $this->objects[$id];
 01018   }
 01019   switch($action){
@@ -830,13 +830,13 @@
 01039       } else {
 01040         $user = $options['user'];
 01041       }
-01042       $tmp = $this->md5_16($owner);
+01042       $tmp = $this->md5_16($owner);
 01043       $okey = substr($tmp,0,5);
 01044       $this->ARC4_init($okey);
 01045       $ovalue=$this->ARC4($user);
 01046       $this->objects[$id]['info']['O']=$ovalue;
 01047       // now make the u value, phew.
-01048       $tmp = $this->md5_16($user.$ovalue.chr($options['p']).chr(255).chr(255).chr(255).$this->fileIdentifier);
+01048       $tmp = $this->md5_16($user.$ovalue.chr($options['p']).chr(255).chr(255).chr(255).$this->fileIdentifier);
 01049       $ukey = substr($tmp,0,5);
 01050 
 01051       $this->ARC4_init($ukey);
@@ -867,7 +867,7 @@
 01076 }
 01077       
 01086 function md5_16($string){
-01087   $tmp = md5($string);
+01087   $tmp = md5($string);
 01088   $out='';
 01089   for ($i=0;$i<=30;$i=$i+2){
 01090     $out.=chr(hexdec(substr($tmp,$i,2)));
@@ -876,12 +876,12 @@
 01093 }
 01094 
 01098 function encryptInit($id){
-01099   $tmp = $this->encryptionKey;
+01099   $tmp = $this->encryptionKey;
 01100   $hex = dechex($id);
 01101   if (strlen($hex)<6){
 01102     $hex = substr('000000',0,6-strlen($hex)).$hex;
 01103   }
-01104   $tmp.= chr(hexdec(substr($hex,4,2))).chr(hexdec(substr($hex,2,2))).chr(hexdec(substr($hex,0,2))).chr(0).chr(0);
+01104   $tmp.= chr(hexdec(substr($hex,4,2))).chr(hexdec(substr($hex,2,2))).chr(hexdec(substr($hex,0,2))).chr(0).chr(0);
 01105   $key = $this->md5_16($tmp);
 01106   $this->ARC4_init(substr($key,0,10));
 01107 }
@@ -988,8 +988,8 @@
 01235 //  $content="%PDF-1.3\n";
 01236   $pos=strlen($content);
 01237   foreach($this->objects as $k=>$v){
-01238     $tmp='o_'.$v['t'];
-01239     $cont=$this->$tmp($k,'out');
+01238     $tmp='o_'.$v['t'];
+01239     $cont=$this->$tmp($k,'out');
 01240     $content.=$cont;
 01241     $xref[]=$pos;
 01242     $pos+=strlen($cont);
@@ -1057,7 +1057,7 @@
 01320   $this->addMessage('openFont: '.$font.' - '.$name);
 01321   if (file_exists($dir.'php_'.$name.'.afm')){
 01322     $this->addMessage('openFont: php file exists '.$dir.'php_'.$name.'.afm');
-01323     $tmp = file($dir.'php_'.$name.'.afm');
+01323     $tmp = file($dir.'php_'.$name.'.afm');
 01324     $this->fonts[$font]=unserialize($tmp[0]);
 01325     if (!isset($this->fonts[$font]['_version_']) || $this->fonts[$font]['_version_']<1){
 01326       // if the font file is old, then clear it out and prepare for re-creation
@@ -1069,7 +1069,7 @@
 01332     // then rebuild the php_<font>.afm file from the <font>.afm file
 01333     $this->addMessage('openFont: build php file from '.$dir.$name.'.afm');
 01334     $data = array();
-01335     $file = file($dir.$name.'.afm');
+01335     $file = file($dir.$name.'.afm');
 01336     foreach ($file as $rowA){
 01337       $row=trim($rowA);
 01338       $pos=strpos($row,' ');
@@ -1239,7 +1239,7 @@
 01510         // note that pdf supports only binary format type 1 font files, though there is a 
 01511         // simple utility to convert them from pfa to pfb.
 01512         $fp = fopen($fbfile,'rb');
-01513         $tmp = get_magic_quotes_runtime();
+01513         $tmp = get_magic_quotes_runtime();
 01514         set_magic_quotes_runtime(0);
 01515         $data = fread($fp,filesize($fbfile));
 01516         set_magic_quotes_runtime($tmp);
@@ -1291,11 +1291,11 @@
 01562 
 01563 
 01564         // tell the font object about all this new stuff
-01565         $tmp = array('BaseFont'=>$adobeFontName,'Widths'=>$widthid
+01565         $tmp = array('BaseFont'=>$adobeFontName,'Widths'=>$widthid
 01566                                       ,'FirstChar'=>$firstChar,'LastChar'=>$lastChar
 01567                                       ,'FontDescriptor'=>$fontDescriptorId);
 01568         if ($fbtype=='ttf'){
-01569           $tmp['SubType']='TrueType';
+01569           $tmp['SubType']='TrueType';
 01570         }
 01571         $this->addMessage('adding extra info to font.('.$fontObj.')');
 01572         foreach($tmp as $fk=>$fv){
@@ -1410,10 +1410,10 @@
 01730 
 01731   if ($angle != 0){
 01732     $a = -1*deg2rad((float)$angle);
-01733     $tmp = "\n q ";
-01734     $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' ';
-01735     $tmp .= sprintf('%.3f',$x0).' '.sprintf('%.3f',$y0).' cm';
-01736     $this->objects[$this->currentContents]['c'].= $tmp;
+01733     $tmp = "\n q ";
+01734     $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' ';
+01735     $tmp .= sprintf('%.3f',$x0).' '.sprintf('%.3f',$y0).' cm';
+01736     $this->objects[$this->currentContents]['c'].= $tmp;
 01737     $x0=0;
 01738     $y0=0;
 01739   }
@@ -1557,9 +1557,9 @@
 01909     $options=array();
 01910   }
 01911   if ( isset($options['compress']) && $options['compress']==0){
-01912     $tmp = $this->output(1);
+01912     $tmp = $this->output(1);
 01913   } else {
-01914     $tmp = $this->output();
+01914     $tmp = $this->output();
 01915   }
 01916   header("Content-type: application/pdf");
 01917   header("Content-Length: ".strlen(ltrim($tmp)));
@@ -2597,7 +2597,7 @@
 03073 } // end of class
 03074 
 03075 ?>
-

Generated on Wed May 31 21:39:14 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class_8pdf_8php.html b/doc/developper/html/class_8pdf_8php.html index 55358c24c..3a563b8a4 100644 --- a/doc/developper/html/class_8pdf_8php.html +++ b/doc/developper/html/class_8pdf_8php.html @@ -4,7 +4,7 @@ - +

class.pdf.php File Reference

@@ -18,7 +18,7 @@ class  Cpdf -
Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__attribut_8php-source.html b/doc/developper/html/class__attribut_8php-source.html index ea42e0dda..09eebe60d 100644 --- a/doc/developper/html/class__attribut_8php-source.html +++ b/doc/developper/html/class__attribut_8php-source.html @@ -4,7 +4,7 @@ - +

class_attribut.php

Go to the documentation of this file.
00001 <?
@@ -27,42 +27,32 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 class Attribut {
-00022   var $ad_id;                   // pk for attribut
-00023   var $ad_text;                 // type of content
-00024   var $av_text;                 // Description (content)
-00025   var $cn;                      // database connection
-00026   function Attribut($p_ad_id) {
-00027     $this->ad_id=$p_ad_id;
-00028     $this->cn=-1;
-00029   }
-00030 
-00031 }
-00032 
-00033 /* function       SortAttributeById
-00034  **************************************************
-00035  * Purpose : Sort an array of object attribut thx the
-00036  *        ad_id
-00037  * parm : 
-00038  *      - array of Attribut objects
-00039  * gen :
-00040  *      -
-00041  * return: the ordered array
-00042  */
-00043 function SortAttributeById($p_attribut) {
-00044   for ($i=0;$i< sizeof($p_attribut)-1;$i++) {
-00045       if ( $p_attribut[$i]->ad_id > $p_attribut[$i+1]->ad_id ) {
-00046         // then swap them
-00047         $t=$p_attribut[$i];
-00048         $p_attribut[$i]=$p_attribut[$i+1];
-00049         $p_attribut[$i+1] = $t;
-00050         $i=0;
-00051       }
-00052     }
-00053   
-00054   return $p_attribut;
-00055 }
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00028 class Attribut { +00029 var $ad_id; +00030 var $ad_text; +00031 var $av_text; +00032 var $cn; +00033 function Attribut($p_ad_id) { +00034 $this->ad_id=$p_ad_id; +00035 $this->cn=-1; +00036 } +00037 +00038 } +00039 +00050 function SortAttributeById($p_attribut) { +00051 for ($i=0;$i< sizeof($p_attribut)-1;$i++) { +00052 if ( $p_attribut[$i]->ad_id > $p_attribut[$i+1]->ad_id ) { +00053 // then swap them +00054 $t=$p_attribut[$i]; +00055 $p_attribut[$i]=$p_attribut[$i+1]; +00056 $p_attribut[$i+1] = $t; +00057 $i=0; +00058 } +00059 } +00060 +00061 return $p_attribut; +00062 } +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__attribut_8php.html b/doc/developper/html/class__attribut_8php.html index 408159eda..5b5801136 100644 --- a/doc/developper/html/class__attribut_8php.html +++ b/doc/developper/html/class__attribut_8php.html @@ -4,21 +4,30 @@ - + -

class_attribut.php File Reference

+

class_attribut.php File Reference

Manage the attribut of the card. More... +

+

Go to the source code of this file. + +

Data Structures

class  Attribut
 Manage the attribut of the card. More...

Functions

 SortAttributeById ($p_attribut)
 Sort an array of object attribut thx the ad_id.
-


Function Documentation

+

Detailed Description

+Manage the attribut of the card. +

+ +

+Definition in file class_attribut.php.


Function Documentation

@@ -44,16 +53,24 @@ +Referenced by fiche::getAttribut().

+Sort an array of object attribut thx the ad_id. +

+

Parameters:
+ + +
array of Attribut objects
+
+
Returns:
the ordered array

-Definition at line 43 of file class_attribut.php. +Definition at line 50 of file class_attribut.php.

-References $i, and $t. +References $i, and $t.

-Referenced by fiche::getAttribut().

-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__balance_8php-source.html b/doc/developper/html/class__balance_8php-source.html index 327a7a199..557896ed5 100644 --- a/doc/developper/html/class__balance_8php-source.html +++ b/doc/developper/html/class__balance_8php-source.html @@ -4,7 +4,7 @@ - +

class_balance.php

Go to the documentation of this file.
00001 <?
@@ -28,79 +28,79 @@
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00021 include_once("poste.php");
-00022 
-00023 class Balance {
-00024   var $db; // database connection
-00025   var $central; 
-00026   var $row;
-00027   function Balance($p_cn) {
-00028     $this->db=$p_cn;
-00029     $this->central='N';
-00030   }
-00031 
-00032   function GetRow($p_from_periode,$p_to_periode) {
-00033     // compute periode
-00034     if ( $p_from_periode==$p_to_periode ) {
-00035       $per_sql=" j_tech_per = $p_from_periode ";
-00036     } else {
-00037       $per_sql = "j_tech_per >=  $p_from_periode and j_tech_per <= $p_to_periode ";
-00038     }
-00039 
-00040 
-00041     // if centralized
-00042     $cent="";
-00043 
-00044     if ( $this->central=='Y' ) { $cent="j_centralized = true and "; }
-00045 
-00046     // build query
-00047     $sql="select j_poste,sum(deb) as sum_deb, sum(cred) as sum_cred from 
-00048           ( select j_poste,
-00049              case when j_debit='t' then j_montant else 0 end as deb,
-00050              case when j_debit='f' then j_montant else 0 end as cred
-00051           from jrnx join tmp_pcmn on j_poste=pcm_val
-00052               where 
-00053              $cent
-00054             $per_sql ) as m group by j_poste order by j_poste::text";
-00055 
-00056     $Res=ExecSql($this->db,$sql);
-00057 
-00058     $tot_cred=  0.0;
-00059     $tot_deb=  0.0;
-00060     $tot_deb_saldo=0.0;
-00061     $tot_cred_saldo=0.0;
-00062     $M=pg_NumRows($Res);
-00063     // Load the array
-00064     for ($i=0; $i <$M;$i++) {
-00065       $r=pg_fetch_array($Res,$i);
-00066       $a['poste']=$r['j_poste'];
-00067       $a['label']=substr(GetPosteLibelle($this->db,$r['j_poste'],1),0,40);
-00068       $a['sum_deb']=round($r['sum_deb'],2);
-00069       $a['sum_cred']=round($r['sum_cred'],2);
-00070       $a['solde_deb']=round(( $a['sum_deb']  >=  $a['sum_cred'] )? $a['sum_deb']- $a['sum_cred']:0,2);
-00071       $a['solde_cred']=round(( $a['sum_deb'] <=  $a['sum_cred'] )?$a['sum_cred']-$a['sum_deb']:0,2);
-00072       $array[$i]=$a;
-00073       $tot_cred+=  $a['sum_cred'];
-00074       $tot_deb+= $a['sum_deb']; 
-00075       $tot_deb_saldo+= $a['solde_deb'];
-00076       $tot_cred_saldo+= $a['solde_cred'];
-00077       
-00078       
-00079     }//for i
-00080     // Add the saldo
-00081     $i+=1;
-00082     $a['poste']="";
-00083     $a['label']="<b> Totaux </b>";
-00084     $a['sum_deb']=$tot_deb;
-00085     $a['sum_cred']=$tot_cred;
-00086     $a['solde_deb']=$tot_deb_saldo;
-00087     $a['solde_cred']=$tot_cred_saldo;
-00088     $array[$i]=$a;
-00089     $this->row=$array;
-00090     return $array;
-00091 
-00092   }
-00093 }
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00029 class Balance { +00030 var $db; +00031 var $central; +00032 var $row; +00033 function Balance($p_cn) { +00034 $this->db=$p_cn; +00035 $this->central='N'; +00036 } +00037 +00038 +00053 function GetRow($p_from_periode,$p_to_periode) { +00054 // compute periode +00055 if ( $p_from_periode==$p_to_periode ) { +00056 $per_sql=" j_tech_per = $p_from_periode "; +00057 } else { +00058 $per_sql = "j_tech_per >= $p_from_periode and j_tech_per <= $p_to_periode "; +00059 } +00060 +00061 +00062 // if centralized +00063 $cent=""; +00064 +00065 if ( $this->central=='Y' ) { $cent="j_centralized = true and "; } +00066 +00067 // build query +00068 $sql="select j_poste,sum(deb) as sum_deb, sum(cred) as sum_cred from +00069 ( select j_poste, +00070 case when j_debit='t' then j_montant else 0 end as deb, +00071 case when j_debit='f' then j_montant else 0 end as cred +00072 from jrnx join tmp_pcmn on j_poste=pcm_val +00073 where +00074 $cent +00075 $per_sql ) as m group by j_poste order by j_poste::text"; +00076 +00077 $Res=ExecSql($this->db,$sql); +00078 +00079 $tot_cred= 0.0; +00080 $tot_deb= 0.0; +00081 $tot_deb_saldo=0.0; +00082 $tot_cred_saldo=0.0; +00083 $M=pg_NumRows($Res); +00084 // Load the array +00085 for ($i=0; $i <$M;$i++) { +00086 $r=pg_fetch_array($Res,$i); +00087 $a['poste']=$r['j_poste']; +00088 $a['label']=substr(GetPosteLibelle($this->db,$r['j_poste'],1),0,40); +00089 $a['sum_deb']=round($r['sum_deb'],2); +00090 $a['sum_cred']=round($r['sum_cred'],2); +00091 $a['solde_deb']=round(( $a['sum_deb'] >= $a['sum_cred'] )? $a['sum_deb']- $a['sum_cred']:0,2); +00092 $a['solde_cred']=round(( $a['sum_deb'] <= $a['sum_cred'] )?$a['sum_cred']-$a['sum_deb']:0,2); +00093 $array[$i]=$a; +00094 $tot_cred+= $a['sum_cred']; +00095 $tot_deb+= $a['sum_deb']; +00096 $tot_deb_saldo+= $a['solde_deb']; +00097 $tot_cred_saldo+= $a['solde_cred']; +00098 +00099 +00100 }//for i +00101 // Add the saldo +00102 $i+=1; +00103 $a['poste']=""; +00104 $a['label']="<b> Totaux </b>"; +00105 $a['sum_deb']=$tot_deb; +00106 $a['sum_cred']=$tot_cred; +00107 $a['solde_deb']=$tot_deb_saldo; +00108 $a['solde_cred']=$tot_cred_saldo; +00109 $array[$i]=$a; +00110 $this->row=$array; +00111 return $array; +00112 +00113 } +00114 } +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__balance_8php.html b/doc/developper/html/class__balance_8php.html index 4e2a90b59..acfbf47b5 100644 --- a/doc/developper/html/class__balance_8php.html +++ b/doc/developper/html/class__balance_8php.html @@ -4,18 +4,26 @@ - + -

class_balance.php File Reference

+

class_balance.php File Reference

Class for manipulating data to print the balance of account. More... +

+

Go to the source code of this file. +

Data Structures

class  Balance
 Class for manipulating data to print the balance of account. More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+Class for manipulating data to print the balance of account. +

+ +

+Definition in file class_balance.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__customer_8php-source.html b/doc/developper/html/class__customer_8php-source.html index c6e4b36b1..191f7aa81 100644 --- a/doc/developper/html/class__customer_8php-source.html +++ b/doc/developper/html/class__customer_8php-source.html @@ -4,7 +4,7 @@ - +

class_customer.php

Go to the documentation of this file.
00001 <?
@@ -35,268 +35,214 @@
 00026 require_once('class_fiche.php');
 00027 require_once('class_poste.php');
 00028 require_once('user_common.php');
-00029 
-00030 // Use the view vw_customer
-00031 // 
-00032 class Customer extends fiche{
-00033   var $id;         // f_id
-00034   var $poste;      // poste comptable
-00035   var $name;
-00036   var $street;
-00037   var $country;
-00038   var $cp;
-00039   var $vat_number;
-00040   var $fiche_def_ref;  // fiche_def_ref.frd_id
-00041   // Constructor
-00042   // only a db connection is needed
-00043   function Customer($p_cn,$p_id=0) {
-00044       $this->fiche_def_ref=FICHE_TYPE_CLIENT;
-00045       fiche::fiche($p_cn,$p_id) ;
-00046 
-00047   }
-00048   // Get all info contains in the view
-00049   // thanks to the poste elt
-00050   function GetFromPoste($p_poste=0) {
-00051     $this->poste=($p_poste==0)?$this->poste:$p_poste;
-00052     $sql="select * from vw_client where poste_comptable=".$this->poste;
-00053     $Res=ExecSql($this->cn,$sql);
-00054     if ( pg_NumRows($Res) == 0) return null;
-00055     // There is only _one_ row by customer
-00056     $row=pg_fetch_array($Res,0);
-00057     $this->name=$row['name'];
-00058     $this->id=$row['f_id'];    
-00059     $this->street=$row['rue'];    
-00060     $this->cp=$row['code_postal'];
-00061     $this->country=$row['pays'];
-00062     $this->vat_number=$row['tva_num'];
-00063 
-00064   }
-00065 /* function ListingVat
-00066  **************************************************
-00067  * Purpose : Get all the info for making a vat listing
-00068  *           for the vat administration
-00069  *        TODO : optimize SQL
-00070  * parm : 
-00071  *      - periode
-00072  * 
-00073  * return:
-00074  * 
-00075  *      - array
-00076  */
-00077   function VatListing($p_year) {
-00078     $cond_sql=" and A.j_date = B.j_date 
-00079       and extract(year from A.j_date) ='$p_year'";
-00080     
-00081     // BASE ACCOUNT
-00082     // for belgium
-00083     $s=new parm_code($this->cn,'VENTE');
-00084     $s->Get();
-00085     $SOLD=$s->p_value;
-00086 
-00087     $c=new parm_code($this->cn,'CUSTOMER');
-00088     $c->Get();
-00089     $CUSTOMER=$c->p_value;
-00090 
-00091     $t=new parm_code($this->cn,'COMPTE_TVA');
-00092     $t->Get();
-00093     $TVA=$t->p_value;
-00094     // Get all the sell operation
-00095     //----
-00096     $sql="select  j_grpt 
-00097       from
-00098 jrnx as A
-00099  join jrnx as B using (j_grpt)
-00100 where
-00101        A.j_poste like '".$CUSTOMER."%' and
-00102        B.j_poste like '".$SOLD."%' 
-00103       $cond_sql
-00104 ";
-00105 
-00106     $Res=ExecSql($this->cn,$sql);
-00107     // Foreach operation 
-00108     // where 7% or tva account are involved
-00109     // and store the result in an array (a_Res)
-00110     //---
-00111     $a_Res=array();
-00112     for ($i=0; $i < pg_NumRows($Res);$i++) {
-00113       // Get each row
-00114       //---
-00115       $row1=pg_fetch_array($Res,$i);
-00116   
-00117       // select the operation
-00118       //----
-00119       $Res2=ExecSql($this->cn,"select j_poste,j_montant,j_debit from jrnx where j_grpt=".$row1['j_grpt']); 
-00120       $a_row=array();
-00121       // Store the result in the array 
-00122       //---
-00123       for ($e=0;$e < pg_NumRows($Res2);$e++) {
-00124         $a_row[]=pg_fetch_array($Res2,$e);
-00125       }
-00126       
-00127       // Seek the customer
-00128       //---
-00129       foreach ($a_row as $e) {
-00130         if ( substr($e['j_poste'],0, strlen($CUSTOMER))==$CUSTOMER) {
-00131           $customer=$e['j_poste'];
-00132           // Retrieve name and vat number
-00133           $this->GetFromPoste($customer);
-00134           $a_Res[$customer]['name']=$this->name;
-00135           $a_Res[$customer]['vat_number']=$this->vat_number;
-00136           break;
-00137           
-00138         }
-00139       }// foreach $a
-00140       // Store the amount in the array
-00141       //---
-00142       foreach ($a_row as $e) {
-00143         $amount=0;
-00144         $tva=0;
-00145         if ( substr($e['j_poste'],0, strlen($SOLD))==$SOLD) {
-00146           $amount=($e['j_debit']=='f')?$e['j_montant']:$e['j_montant']*-1;
-00147         }
-00148         if ( substr($e['j_poste'],0, strlen($TVA))==$TVA) {
-00149           $tva=($e['j_debit']=='f')?$e['j_montant']:$e['j_montant']*-1;
-00150         }
-00151         // store sold
-00152         //---
-00153         $a_Res[$customer]['amount']=(isset($a_Res[$customer]['amount']))?$a_Res[$customer]['amount']:0;         
-00154   $a_Res[$customer]['amount']+=$amount;
-00155 
-00156         // store vat
-00157         //---
-00158         $a_Res[$customer]['tva']=(isset($a_Res[$customer]['tva']))?$a_Res[$customer]['tva']:0;
-00159         $a_Res[$customer]['tva']+=$tva;  
-00160   
-00161         // store customef info
-00162         //---
-00163         $a_Res[$customer]['customer']=$customer;
-00164 
-00165   //if not submitted to VAT, remove from list:
-00166   //STAN: currently commented out because I don't know if it is really what we need.
-00167   //Dany : yes we need it because the decla. concerns only the registered customer at the VAT 
-00168         if (!isset($a_Res[$customer]['vat_number']) || strcmp($a_Res[$customer]['vat_number'], "") == 0)
-00169           {
-00170             unset($a_Res[$customer]);
-00171           }
-00172         
-00173       }// foreach $a
-00174 
-00175     }
-00176     return $a_Res;
-00177   }
-00178 /* function Get
-00179  **************************************************
-00180  * Purpose : Get Attribute of client
-00181  *        
-00182  * parm : 
-00183  *      -
-00184  * gen :
-00185  *      -
-00186  * return:
-00187  */
-00188   function Get() 
-00189     {
-00190       echo_debug('class_client',__LINE__,'Get');
-00191       fiche::getAttribut();
-00192     }
-00193 /* function GetAll
-00194  **************************************************
-00195  * Purpose : Get array of fiche with all attribute
-00196  *        
-00197  * parm : 
-00198  *      - none
-00199  * gen :
-00200  *      -
-00201  * return: array of fiche with all attribute
-00202  */
-00203   function GetAll($p_offset=-1,$p_search="") 
-00204     {
-00205       return fiche::GetByDef($this->fiche_def_ref,$p_offset,$p_search);
-00206     }
-00207 /* function Summary
-00208  **************************************************
-00209  * Purpose : show the default screen
-00210  *        
-00211  * parm : 
-00212  *      - p_search (filter)
-00213  * gen :
-00214  *      -
-00215  * return: string to display
-00216  */
-00217   function Summary($p_search) 
-00218     {
-00219       $p_search=FormatString($p_search);
-00220       $url=urlencode($_SERVER['REQUEST_URI']);
-00221       $script=$_SERVER['SCRIPT_NAME'];
-00222       // Creation of the nav bar
-00223       // Get the max numberRow
-00224       $all_client=$this->CountByDef($this->fiche_def_ref,$p_search); 
-00225       // Get offset and page variable
-00226       $offset=( isset ($_REQUEST['offset'] )) ?$_REQUEST['offset']:0;
-00227       $page=(isset($_REQUEST['page']))?$_REQUEST['page']:1;
-00228       $bar=jrn_navigation_bar($offset,$all_client,$_SESSION['g_pagesize'],$page);
-00229       // set a filter ?
-00230       $search="";
-00231       if ( trim($p_search) != "" )
-00232         {
-00233           $search=" and f_id in
-00234 (select f_id from jnt_fic_att_value 
-00235                   join fiche using (f_id) 
-00236                   join attr_value using (jft_id)
-00237                 where
-00238                 ad_id=1 and av_text ~* '$p_search')";
-00239         }
-00240       // Get The result Array
-00241       $step_client=$this->GetAll($offset,$search);
-00242       if ( $all_client == 0 ) return "";
-00243       $r=$bar;
-00244       $r.='<table style="width:100%;border:solid blue 2px ;border-style:outset;">
-00245 <TR style="background-color:lightgrey;">
-00246 <TH>Quick Code</TH>
-00247 <th>Nom</th>
-00248 <th>Adresse</th>
-00249 <th>Solde</th>
-00250 <th>Action </th>
-00251 </TR>';
-00252       if ( sizeof ($step_client ) == 0 )
-00253         return $r;
-00254       foreach ($step_client as $client ) {
-00255         $r.="<TR>";
-00256         $r.="<TD>".$client->strAttribut(ATTR_DEF_QUICKCODE)."</TD>";
-00257         $r.="<TD>".$client->strAttribut(ATTR_DEF_NAME)."</TD>";
-00258         $r.="<TD>".$client->strAttribut(ATTR_DEF_ADRESS).
-00259           " ".$client->strAttribut(ATTR_DEF_CP).
-00260           " ".$client->strAttribut(ATTR_DEF_PAYS).
-00261           "</TD>";
-00262         $post=new poste($this->cn,$client->strAttribut(ATTR_DEF_ACCOUNT));
-00263         $a=$post->GetSoldeDetail();
-00264         $r.=sprintf('<TD align="right"> %10.2f&euro;</TD>',$a['solde']);
-00265         $r.="<TD>";
-00266         $r.=sprintf('<A HREF="%s?p_action=client&sa=detail&f_id=%d&url=%s" title="Détail">D</A> - ',
-00267                     $script,$client->id,$url);
-00268 
-00269         $r.='<A HREF="#" title="Contact">C</A> - ';
-00270         $r.=sprintf('<A HREF="%s?p_action=suivi_courrier&sa=list&f_id=%d&url=%s" title="Action">A</A> - ',
-00271                     $script,$client->id,$url);
-00272 
-00273 
-00274 
-00275         $r.='<A HREF="#" title="Historique Facture">F</A> -';
-00276         $r.='<A HREF="#" title="Historique Courrier">FC</A>';
-00277         $r.='</TD>';
-00278 
-00279         $r.="</TR>";
-00280 
-00281       }
-00282       $r.="</TABLE>";
-00283       $r.=$bar;
-00284       return $r;
-00285     }
-00286 
-00287 }
-00288 
-00289 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00036 // Use the view vw_customer +00037 // +00038 class Customer extends fiche{ +00039 +00040 var $poste; +00041 var $name; +00042 var $street; +00043 var $country; +00044 var $cp; +00045 var $vat_number; +00049 function Customer($p_cn,$p_id=0) { +00050 $this->fiche_def_ref=FICHE_TYPE_CLIENT; +00051 fiche::fiche($p_cn,$p_id) ; +00052 +00053 } +00057 function GetFromPoste($p_poste=0) { +00058 $this->poste=($p_poste==0)?$this->poste:$p_poste; +00059 $sql="select * from vw_client where poste_comptable=".$this->poste; +00060 $Res=ExecSql($this->cn,$sql); +00061 if ( pg_NumRows($Res) == 0) return null; +00062 // There is only _one_ row by customer +00063 $row=pg_fetch_array($Res,0); +00064 $this->name=$row['name']; +00065 $this->id=$row['f_id']; +00066 $this->street=$row['rue']; +00067 $this->cp=$row['code_postal']; +00068 $this->country=$row['pays']; +00069 $this->vat_number=$row['tva_num']; +00070 +00071 } +00084 function VatListing($p_year) { +00085 $cond_sql=" and A.j_date = B.j_date +00086 and extract(year from A.j_date) ='$p_year'"; +00087 +00088 // BASE ACCOUNT +00089 // for belgium +00090 $s=new parm_code($this->cn,'VENTE'); +00091 $s->Get(); +00092 $SOLD=$s->p_value; +00093 +00094 $c=new parm_code($this->cn,'CUSTOMER'); +00095 $c->Get(); +00096 $CUSTOMER=$c->p_value; +00097 +00098 $t=new parm_code($this->cn,'COMPTE_TVA'); +00099 $t->Get(); +00100 $TVA=$t->p_value; +00101 // Get all the sell operation +00102 //---- +00103 $sql="select j_grpt +00104 from +00105 jrnx as A +00106 join jrnx as B using (j_grpt) +00107 where +00108 A.j_poste like '".$CUSTOMER."%' and +00109 B.j_poste like '".$SOLD."%' +00110 $cond_sql +00111 "; +00112 +00113 $Res=ExecSql($this->cn,$sql); +00114 // Foreach operation +00115 // where 7% or tva account are involved +00116 // and store the result in an array (a_Res) +00117 //--- +00118 $a_Res=array(); +00119 for ($i=0; $i < pg_NumRows($Res);$i++) { +00120 // Get each row +00121 //--- +00122 $row1=pg_fetch_array($Res,$i); +00123 +00124 // select the operation +00125 //---- +00126 $Res2=ExecSql($this->cn,"select j_poste,j_montant,j_debit from jrnx where j_grpt=".$row1['j_grpt']); +00127 $a_row=array(); +00128 // Store the result in the array +00129 //--- +00130 for ($e=0;$e < pg_NumRows($Res2);$e++) { +00131 $a_row[]=pg_fetch_array($Res2,$e); +00132 } +00133 +00134 // Seek the customer +00135 //--- +00136 foreach ($a_row as $e) { +00137 if ( substr($e['j_poste'],0, strlen($CUSTOMER))==$CUSTOMER) { +00138 $customer=$e['j_poste']; +00139 // Retrieve name and vat number +00140 $this->GetFromPoste($customer); +00141 $a_Res[$customer]['name']=$this->name; +00142 $a_Res[$customer]['vat_number']=$this->vat_number; +00143 break; +00144 +00145 } +00146 }// foreach $a +00147 // Store the amount in the array +00148 //--- +00149 foreach ($a_row as $e) { +00150 $amount=0; +00151 $tva=0; +00152 if ( substr($e['j_poste'],0, strlen($SOLD))==$SOLD) { +00153 $amount=($e['j_debit']=='f')?$e['j_montant']:$e['j_montant']*-1; +00154 } +00155 if ( substr($e['j_poste'],0, strlen($TVA))==$TVA) { +00156 $tva=($e['j_debit']=='f')?$e['j_montant']:$e['j_montant']*-1; +00157 } +00158 // store sold +00159 //--- +00160 $a_Res[$customer]['amount']=(isset($a_Res[$customer]['amount']))?$a_Res[$customer]['amount']:0; +00161 $a_Res[$customer]['amount']+=$amount; +00162 +00163 // store vat +00164 //--- +00165 $a_Res[$customer]['tva']=(isset($a_Res[$customer]['tva']))?$a_Res[$customer]['tva']:0; +00166 $a_Res[$customer]['tva']+=$tva; +00167 +00168 // store customef info +00169 //--- +00170 $a_Res[$customer]['customer']=$customer; +00171 +00172 //if not submitted to VAT, remove from list: +00173 //STAN: currently commented out because I don't know if it is really what we need. +00174 //Dany : yes we need it because the decla. concerns only the registered customer at the VAT +00175 if (!isset($a_Res[$customer]['vat_number']) || strcmp($a_Res[$customer]['vat_number'], "") == 0) +00176 { +00177 unset($a_Res[$customer]); +00178 } +00179 +00180 }// foreach $a +00181 +00182 } +00183 return $a_Res; +00184 } +00195 function Summary($p_search) +00196 { +00197 $p_search=FormatString($p_search); +00198 $url=urlencode($_SERVER['REQUEST_URI']); +00199 $script=$_SERVER['SCRIPT_NAME']; +00200 // Creation of the nav bar +00201 // Get the max numberRow +00202 $all_client=$this->CountByDef($this->fiche_def_ref,$p_search); +00203 // Get offset and page variable +00204 $offset=( isset ($_REQUEST['offset'] )) ?$_REQUEST['offset']:0; +00205 $page=(isset($_REQUEST['page']))?$_REQUEST['page']:1; +00206 $bar=jrn_navigation_bar($offset,$all_client,$_SESSION['g_pagesize'],$page); +00207 // set a filter ? +00208 $search=""; +00209 if ( trim($p_search) != "" ) +00210 { +00211 $search=" and f_id in +00212 (select f_id from jnt_fic_att_value +00213 join fiche using (f_id) +00214 join attr_value using (jft_id) +00215 where +00216 ad_id=1 and av_text ~* '$p_search')"; +00217 } +00218 // Get The result Array +00219 $step_client=$this->GetAll($offset,$search); +00220 if ( $all_client == 0 ) return ""; +00221 $r=$bar; +00222 $r.='<table> +00223 <TR style="background-color:lightgrey;"> +00224 <TH>Quick Code</TH> +00225 <th>Nom</th> +00226 <th>Adresse</th> +00227 <th>Solde</th> +00228 <th>Action </th> +00229 </TR>'; +00230 if ( sizeof ($step_client ) == 0 ) +00231 return $r; +00232 foreach ($step_client as $client ) { +00233 $r.="<TR>"; +00234 $e=sprintf('<A HREF="%s?p_action=client&sa=detail&f_id=%d&url=%s" title="Détail"> ', +00235 $script,$client->id,$url); +00236 +00237 $r.="<TD> $e".$client->strAttribut(ATTR_DEF_QUICKCODE)."</A></TD>"; +00238 $r.="<TD>".$client->strAttribut(ATTR_DEF_NAME)."</TD>"; +00239 $r.="<TD>".$client->strAttribut(ATTR_DEF_ADRESS). +00240 " ".$client->strAttribut(ATTR_DEF_CP). +00241 " ".$client->strAttribut(ATTR_DEF_PAYS). +00242 "</TD>"; +00243 +00244 $post=new poste($this->cn,$client->strAttribut(ATTR_DEF_ACCOUNT)); +00245 $a=$post->GetSoldeDetail(); +00246 $r.=sprintf('<TD align="right"> %15.2f&euro;</TD>',$a['solde']); +00247 $r.="<TD>"; +00248 +00249 $r.=sprintf('<A HREF="%s?p_action=contact&qcode=%s&url=%s" title="Contact">C</A> - ', +00250 $script,$client->strAttribut(ATTR_DEF_QUICKCODE),$url); +00251 $r.=sprintf('<A HREF="%s?p_action=suivi_courrier&sa=list&qcode=%s&url=%s" title="Action">A</A> - ', +00252 $script,$client->strAttribut(ATTR_DEF_QUICKCODE) ,$url); +00253 +00254 +00255 +00256 $r.='<A HREF="commercial.php?p_action=facture&sa=list&qcode='.$client->strAttribut(ATTR_DEF_QUICKCODE).'&url='.$url.'" title="Historique Facture">F</A> -'; +00257 +00258 $r.='</TD>'; +00259 +00260 $r.="</TR>"; +00261 +00262 } +00263 $r.="</TABLE>"; +00264 $r.=$bar; +00265 return $r; +00266 } +00267 +00268 } +00269 +00270 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__customer_8php.html b/doc/developper/html/class__customer_8php.html index 961949205..296414476 100644 --- a/doc/developper/html/class__customer_8php.html +++ b/doc/developper/html/class__customer_8php.html @@ -4,18 +4,26 @@ - + -

class_customer.php File Reference

+

class_customer.php File Reference

Derived from class fiche Customer are a specific kind of card. More... +

+

Go to the source code of this file. +

Data Structures

class  Customer
 class Customer are a specific kind of card More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+Derived from class fiche Customer are a specific kind of card. +

+ +

+Definition in file class_customer.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__document__modele_8php-source.html b/doc/developper/html/class__document__modele_8php-source.html index 0916d5dd8..e84c48036 100644 --- a/doc/developper/html/class__document__modele_8php-source.html +++ b/doc/developper/html/class__document__modele_8php-source.html @@ -4,7 +4,7 @@ - +

class_document_modele.php

Go to the documentation of this file.
00001 <?
@@ -27,171 +27,221 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 class Document_modele {
-00022         var $cn;        // database conx
-00023         var $md_id;     // md_id
-00024         var $md_name;   // template's name
-00025         var $md_type;   // template's type (letter, invoice, order...)
-00026         var $md_lob;    //Document file
-00027         //Constructor parameter = database connexion
-00028         function Document_modele($p_cn,$p_id=-1) {
-00029                 $this->cn=$p_cn;        
-00030                 $this->md_id=$p_id;
-00031         }
-00032 
-00033  /* function 
-00034  **************************************************
-00035  * Purpose : show all the stored document_modele.
-00036  *        return a string containing all the data
-00037  *        separate by TD & TR tag
-00038  * parm : 
-00039  *      - 
-00040  * gen :
-00041  *      -
-00042  * return:
-00043  */
-00044         function myList() { 
-00045           $sql="select md_id,md_name from document_modele";
-00046           $Res=ExecSql($this->cn,$sql);
-00047           $all=pg_fetch_all($Res);
-00048           if ( pg_NumRows($Res) == 0 ) return "";
-00049           foreach ( $all as $row) {
-00050             var_dump($row);
-00051           } 
-00052         }
-00053 /* function Save
-00054  **************************************************
-00055  * Purpose :  Save a document_modele in the database, 
-00056  *       if the document_modele doesn't exist yet it will be
-00057  *       first created (-> insert into document_modele)
-00058  *       in that case the name and the type must be set
-00059  *       set before calling Save, the name will be modified
-00060  *       with FormatString
-00061  *        
-00062  * parm : 
-00063  *      - none
-00064  * gen :
-00065  *      - none
-00066  * return:
-00067  *     - none
-00068  */
-00069         function Save() 
-00070           {
-00071             // Values are in $_POST
-00072             StartSql($this->cn);
-00073             // Save data into the table invoice
-00074             // if $this->md_id == -1 it means it is a new document model
-00075             // so first we have to insert it
-00076             // the name and the type must be set before calling save
-00077             if ( $this->md_id == -1) 
-00078               {
-00079                 $this->name=FormatString($this->name);
-00080                 $this->md_id=NextSequence('document_modele_md_id_seq');
-00081                 $sql=sprintf("insert into document_modele(md_id,md_name,md_type) 
-00082                               values (%d,'%s',%d)",
-00083                              $this->md_id,$this->name,$this->md_type);
-00084                 $Ret=ExecSql($this->cn,$sql);
-00085               }
-00086             // Save the file
-00087             $new_name=tempnam('/tmp','document_');
-00088             echo_debug('class_document_modele.php',__LINE__,"new name=".$new_name);
-00089             if ( strlen ($_FILES['doc']['tmp_name']) != 0 ) 
-00090               {
-00091                 if (move_uploaded_file($_FILES['doc']['tmp_name'],
-00092                                        $new_name)) 
-00093                   {
-00094                     // echo "Image saved";
-00095                     $oid= pg_lo_import($this->cn,$new_name);
-00096                     if ( $oid == false ) 
-00097                       {
-00098                         echo_error('class_document_modele.php',__LINE__,"cannot upload document");
-00099                         Rollback($cn);
-00100                         return;
-00101                       }
-00102                     echo_debug('class_document_modele.php',__LINE__,"Loading document");
-00103                     // Remove old document
-00104                     $ret=ExecSql($this->cn,"select md_file from invoice where md_id=".$this->md_id);
-00105                     if (pg_num_rows($ret) != 0) 
-00106                         {
-00107                           $r=pg_fetch_array($ret,0);
-00108                           $old_oid=$r['iv_file'];
-00109                           if (strlen($old_oid) != 0) 
-00110                             pg_lo_unlink($this->cn,$old_oid);
-00111                         }
-00112                     // Load new document
-00113                     ExecSql($this->cn,"update document_modele set md_lob where md_id=".$this->md_id);
-00114                   }
-00115                 else 
-00116                   {
-00117                     echo "<H1>Error</H1>";
-00118                     Rollback($this->cn);
-00119                     exit;
-00120                   }
-00121               }
-00122           }
-00123         // Remove a template 
-00124         function Delete() 
-00125           {
-00126           }
-00127         // return the string containing the form for
-00128         // adding a template
-00129         function FormAdd() 
-00130           {
-00131                 $r="";
-00132                 $r='<FORM METHOD="POST" ACTION="dossier_prefs.php">';
-00133                 $r.="</FORM>";
-00134                 return $r;
-00135           }
-00136         // return the string containing the form for
-00137         // removing a template
-00138         function FormDelete() {
-00139         }
-00140         // Parse and remplace the tag in the invoice 
-00141         // By the value found in quant_sold
-00142         // p_id is the id of the invoice
-00143         // p_internal reference (quant_sold qs_internal)
-00144         function Get($p_id,$p_internal) 
-00145         {
-00146         // retrieve info from the table invoice
-00147                 
-00148         // retrieve the template and generate document
-00149                 StartSql($this->cn);
-00150                 $ret=ExecSql($cn,"select iv_name,iv_file from invoice where iv_id".$this->iv_id);
-00151                 if ( pg_num_rows ($ret) == 0 )
-00152                         return;
-00153                 $row=pg_fetch_array($ret,0);
-00154                 //the template is saved into file $tmp
-00155                 $tmp=tempnam('/tmp/','invoice_');
-00156                 pg_lo_export($cn,$row['iv_file'],$tmp);
-00157                 // Parse the file 
-00158 
-00159 
-00160 
-00161 
-00162                 // send it to stdout
-00163                 ini_set('zlib.output_compression','Off');
-00164                 header("Pragma: public");
-00165                 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
-00166                 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
-00167                 header("Cache-Control: must-revalidate");
-00168                 header('Content-type: rtf/x-application');
-00169                 header('Content-Disposition: attachment;filename="invoice'.$p_internal.'.rtf"',FALSE);
-00170                 header("Accept-Ranges: bytes");
-00171                 $file=fopen($tmp,'r');
-00172                 while ( !feof ($file) )
-00173                 {
-00174                         echo fread($file,8192);
-00175                 }
-00176                 fclose($file);
-00177                 
-00178                 unlink ($tmp);
-00179                 
-00180                 Commit($cn);
-00181 
-00182         }
-00183 }
-00184 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00028 class Document_modele { +00029 var $cn; +00030 var $md_id; +00031 var $md_name; +00032 var $md_type; +00033 var $md_lob; +00034 var $md_sequence; +00035 var $sequence; +00036 //Constructor parameter = database connexion +00037 function Document_modele($p_cn,$p_id=-1) { +00038 $this->cn=$p_cn; +00039 $this->md_id=$p_id; +00040 } +00041 +00049 function myList() { +00050 $sql="select md_id,md_name,dt_value from document_modele join document_type on(dt_id=md_type)"; +00051 $Res=ExecSql($this->cn,$sql); +00052 $all=pg_fetch_all($Res); +00053 if ( pg_NumRows($Res) == 0 ) return ""; +00054 $r='<p><form method="post">'; +00055 $r.="<table>"; +00056 $r.="<tr> <th> Nom </th> <th>Type</Th><th>Fichier</th><th> Effacer</th>"; +00057 $r.="</tr>"; +00058 foreach ( $all as $row) { +00059 $r.="<tr>"; +00060 $r.="<td>"; +00061 $r.=$row['md_name']; +00062 $r.="</td>"; +00063 $r.="<td>"; +00064 $r.=$row['dt_value']; +00065 $r.="</td>"; +00066 $r.="<td>"; +00067 $r.='<A HREF="show_document_modele.php?md_id='.$row['md_id'].'">Document</a>'; +00068 $r.="</td>"; +00069 $r.="<TD>"; +00070 $c=new widget("checkbox"); +00071 $c->name="dm_remove_".$row['md_id']; +00072 $r.=$c->IOValue(); +00073 $r.="</td>"; +00074 $r.="</tr>"; +00075 } +00076 $r.="</table>"; +00077 +00078 // need hidden parameter for subaction +00079 $a=new widget("hidden"); +00080 $a->name="sa"; +00081 $a->value="rm_template"; +00082 $r.=$a->IOValue(); +00083 $r.=$a->Submit("rm_template","Effacer la sélection"); +00084 $r.="</form></p>"; +00085 return $r; +00086 } +00103 function Save() +00104 { +00105 // if name is empty return immediately +00106 if ( trim(strlen($this->md_name))==0) +00107 return; +00108 // Start transaction +00109 StartSql($this->cn); +00110 // Save data into the table invoice +00111 // if $this->md_id == -1 it means it is a new document model +00112 // so first we have to insert it +00113 // the name and the type must be set before calling save +00114 if ( $this->md_id == -1) +00115 { +00116 +00117 // insert into the table document_modele +00118 $this->name=FormatString($this->md_name); +00119 $this->md_id=NextSequence($this->cn,'document_modele_md_id_seq'); +00120 $sql=sprintf("insert into document_modele(md_id,md_name,md_type) +00121 values (%d,'%s',%d)", +00122 $this->md_id,$this->name,$this->md_type); +00123 $Ret=ExecSql($this->cn,$sql); +00124 // create the sequence for this modele of document +00125 $this->md_sequence="document_".NextSequence($this->cn,"document_seq"); +00126 // if start is not equal to 0 and he's a number than the user +00127 // request a number change +00128 if ( $this->start != 0 && isNumber($this->start) == 1 ) +00129 { +00130 $sql="alter sequence seq_doc_type_".$this->md_type." start with ".$this->start; +00131 ExecSql($this->cn,$sql); +00132 } +00133 +00134 } +00135 // Save the file +00136 $new_name=tempnam('/tmp','document_'); +00137 echo_debug('class_document_modele.php',__LINE__,"new name=".$new_name); +00138 if ( strlen ($_FILES['doc']['tmp_name']) != 0 ) +00139 { +00140 if (move_uploaded_file($_FILES['doc']['tmp_name'], +00141 $new_name)) +00142 { +00143 // echo "Image saved"; +00144 $oid= pg_lo_import($this->cn,$new_name); +00145 if ( $oid == false ) +00146 { +00147 echo_error('class_document_modele.php',__LINE__,"cannot upload document"); +00148 Rollback($cn); +00149 return; +00150 } +00151 echo_debug('class_document_modele.php',__LINE__,"Loading document"); +00152 // Remove old document +00153 $ret=ExecSql($this->cn,"select md_lob from document_modele where md_id=".$this->md_id); +00154 if (pg_num_rows($ret) != 0) +00155 { +00156 $r=pg_fetch_array($ret,0); +00157 $old_oid=$r['md_lob']; +00158 if (strlen($old_oid) != 0) +00159 pg_lo_unlink($this->cn,$old_oid); +00160 } +00161 // Load new document +00162 var_dump($_FILES); +00163 ExecSql($this->cn,"update document_modele set md_lob=".$oid.", md_mimetype='".$_FILES['doc']['type']."' ,md_filename='".$_FILES['doc']['name']."' where md_id=".$this->md_id); +00164 Commit($this->cn); +00165 } +00166 else +00167 { +00168 echo "<H1>Error</H1>"; +00169 Rollback($this->cn); +00170 exit; +00171 } +00172 } +00173 } +00178 function Delete() +00179 { +00180 StartSql($this->cn); +00181 // first we unlink the document +00182 $sql="select md_lob from document_modele where md_id=".$this->md_id; +00183 $res=ExecSql($this->cn,$sql); +00184 $r=pg_fetch_array($res,0); +00185 // if a lob is found +00186 if ( strlen ($r['md_lob']) != 0 ) +00187 { +00188 // we remove it first +00189 pg_lo_unlink($r['md_lob']); +00190 } +00191 // now we can delete the row +00192 $sql="delete from document_modele where md_id =".$this->md_id; +00193 $sql=ExecSql($this->cn,$sql); +00194 Commit($this->cn); +00195 } +00196 +00203 function Get($p_id,$p_internal) +00204 { +00205 // retrieve info from the table invoice +00206 +00207 // retrieve the template and generate document +00208 StartSql($this->cn); +00209 $ret=ExecSql($cn,"select iv_name,iv_file from invoice where iv_id".$this->iv_id); +00210 if ( pg_num_rows ($ret) == 0 ) +00211 return; +00212 $row=pg_fetch_array($ret,0); +00213 //the template is saved into file $tmp +00214 $tmp=tempnam('/tmp/','invoice_'); +00215 pg_lo_export($cn,$row['iv_file'],$tmp); +00216 // Parse the file +00217 +00218 +00219 +00220 +00221 // send it to stdout +00222 ini_set('zlib.output_compression','Off'); +00223 header("Pragma: public"); +00224 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +00225 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); +00226 header("Cache-Control: must-revalidate"); +00227 header('Content-type: rtf/x-application'); +00228 header('Content-Disposition: attachment;filename="invoice'.$p_internal.'.rtf"',FALSE); +00229 header("Accept-Ranges: bytes"); +00230 $file=fopen($tmp,'r'); +00231 while ( !feof ($file) ) +00232 { +00233 echo fread($file,8192); +00234 } +00235 fclose($file); +00236 +00237 unlink ($tmp); +00238 +00239 Commit($cn); +00240 +00241 } +00251 function form($p_action) +00252 { +00253 $r="<p>"; +00254 $r.='<form enctype="multipart/form-data" action="'.$p_action.'" method="post">'; +00255 $t=new widget("text"); +00256 $t->name="md_name"; +00257 $r.=" Nom ".$t->IOValue().""; +00258 $r.="Type de document "; +00259 $w=new widget("select"); +00260 $w->name="md_type"; +00261 $w->value=make_array($this->cn,'select dt_id,dt_value from document_type'); +00262 $r.=$w->IOValue(); +00263 $r.="</p><p>"; +00264 $f=new widget("file"); +00265 $f->name="doc"; +00266 $r.="fichier ".$f->IOValue().""; +00267 // we need to add the sub action as hidden +00268 $h=new widget("hidden"); +00269 $h->name="sa"; +00270 $h->value="add_document"; +00271 $r.=$h->IOValue(); +00272 $start=new widget("text"); +00273 $start->name="start_seq"; +00274 $start->size=9; +00275 $start->value="0"; +00276 $r.=" Numerotation commence a ".$start->IOValue().""; +00277 $r.=$w->Submit('add_document','Ajout'); +00278 $r.="</form></p>"; +00279 return $r; +00280 } +00281 +00282 } +00283 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__document__modele_8php.html b/doc/developper/html/class__document__modele_8php.html index 29249b803..f3f9cac8e 100644 --- a/doc/developper/html/class__document__modele_8php.html +++ b/doc/developper/html/class__document__modele_8php.html @@ -4,18 +4,26 @@ - + -

class_document_modele.php File Reference

+

class_document_modele.php File Reference

Class for the document template. More... +

+

Go to the source code of this file. +

Data Structures

class  Document_modele
 Class for the document template. More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+Class for the document template. +

+ +

+Definition in file class_document_modele.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__fiche_8php-source.html b/doc/developper/html/class__fiche_8php-source.html index 9ef32383e..dde6b99fc 100644 --- a/doc/developper/html/class__fiche_8php-source.html +++ b/doc/developper/html/class__fiche_8php-source.html @@ -4,7 +4,7 @@ - +

class_fiche.php

Go to the documentation of this file.
00001 <?
@@ -28,675 +28,618 @@
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00021 include_once("class_attribut.php");
-00022 
-00023 class fiche_def {
-00024   var $cn;           // database connection
-00025   var $id;                      // id (fiche_def.fd_id
-00026   var $label;                   // fiche_def.fd_label
-00027   var $class_base;              // fiche_def.fd_class_base
-00028   var $fiche_def;               // fiche_def.frd_id = fiche_def_ref.frd_id
-00029   var $create_account;          // fd_create_account: flag
-00030   var $all;
-00031   var $attribut;                // get from attr_xxx tables
-00032   function fiche_def($p_cn,$p_id = 0) {
-00033     $this->cn=$p_cn;
-00034     $this->id=$p_id;
-00035   }
-00036 
-00037 /* function GetAttribut
-00038  **************************************************
-00039  * Purpose : Get attribut of a fiche_def
-00040  *        
-00041  * parm : 
-00042  *      - none
-00043  * gen :
-00044  *      - none
-00045  * return:
-00046  * none
-00047  */
-00048   function GetAttribut() {
-00049     $sql="select * from jnt_fic_attr ".
-00050       " natural join attr_def where fd_id=".$this->id.
-00051       " order by ad_id";
-00052 
-00053     $Ret=ExecSql($this->cn,$sql);
-00054 
-00055     if ( ($Max=pg_NumRows($Ret)) == 0 )
-00056       return ;
-00057     for ($i=0;$i < $Max;$i++) {
-00058       $row=pg_fetch_array($Ret,$i);
-00059       $t = new Attribut($row['ad_id']);
-00060       $t->ad_text=$row['ad_text'];
-00061       $this->attribut[$i]=$t;
-00062     }
-00063     return $this->attribut;
-00064   }
-00065 
-00066  /* function Get
-00067  **************************************************
-00068  * Purpose : Get attribut of the fiche_def
-00069  *        
-00070  * parm : 
-00071  *      - none
-00072  * gen :
-00073  *      - none
-00074  * return:
-00075  *       none
-00076  */
-00077   function Get() {
-00078     if ( $this->id == 0 ) 
-00079       return 0;
-00080     $sql="select * from fiche_def ".
-00081       " where fd_id=".$this->id;
-00082     $Ret=ExecSql($this->cn,$sql);
-00083     if ( ($Max=pg_NumRows($Ret)) == 0 )
-00084       return ;
-00085     $row=pg_fetch_array($Ret,0);
-00086     $this->label=$row['fd_label'];
-00087     $this->class_base=$row['fd_class_base'];
-00088     $this->fiche_def=$row['frd_id'];
-00089     $this->create_account=$row['fd_create_account'];
-00090   }
-00091 /* function GetAll
-00092  **************************************************
-00093  * Purpose : Get all the fiche_def
-00094  *        
-00095  * parm : 
-00096  *      - none
-00097  * gen :
-00098  *      - none
-00099  * return: an array of fiche_def object 
-00100  */
-00101  function GetAll() {
-00102    $sql="select * from fiche_def ";
-00103 
-00104     $Ret=ExecSql($this->cn,$sql);
-00105     if ( ($Max=pg_NumRows($Ret)) == 0 )
-00106       return ;
-00107 
-00108     for ( $i = 0; $i < $Max;$i++) {
-00109       $row=pg_fetch_array($Ret,$i);
-00110       $this->all[$i]=new fiche_def($this->cn,$row['fd_id']);
-00111       $this->all[$i]->label=$row['fd_label'];
-00112       $this->all[$i]->class_base=$row['fd_class_base'];
-00113       $this->all[$i]->fiche_def=$row['frd_id'];
-00114       $this->all[$i]->create_account=$row['fd_create_account'];
-00115     }
-00116   }
-00117 /* function HasAttribute
-00118  **************************************************
-00119  * Purpose : Check in vw_fiche_def if a fiche has 
-00120  *           a attribut X
-00121  *        
-00122  * parm : 
-00123  *      - attribut to check
-00124  * gen :
-00125  *      - none
-00126  * return:  true or false
-00127  */
-00128  function HasAttribute($p_attr) {
-00129    return (CountSql($this->cn,"select * from vw_fiche_def where ad_id=$p_attr and fd_id=".$this->id)>0)?true:false;
-00130 
-00131  }
-00132 /* function Display
-00133  **************************************************
-00134  * Purpose : Display a fiche_def object into a table
-00135  *        
-00136  * parm : 
-00137  *      - none
-00138  * gen :
-00139  *      -
-00140  * return: string
-00141  */
-00142  function Display() 
-00143    {
-00144 
-00145      $r=sprintf("<TD>%s</TD>",$this->id);
-00146      $r.=sprintf("<TD>%s</TD>",$this->label);
-00147      $r.=sprintf("<TD>%s</TD>",$this->class_base);
-00148      $r.=sprintf("<TD>%s</TD>",$this->fiche_def);
-00149      return $r;
-00150    }
-00151 
-00152 }
-00153 
-00155 // class fiche
-00157 class fiche {
-00158   var $cn;// database connection
-00159   var $id; // fiche.f_id
-00160   var $fiche_def;               // fd_id
-00161   var $attribut;                // array of attribut object
-00162   function fiche($p_cn,$p_id=0) {
-00163     $this->cn=$p_cn;
-00164     $this->id=$p_id;
-00165   }
-00166 
-00167 /* function getAttribute
-00168  **************************************************
-00169  * Purpose : get all the attribute of a card, add missing ones
-00170  *         and sort the array ($this->attribut) by ad_id
-00171  * parm : 
-00172  *      -
-00173  * gen :
-00174  *      -
-00175  * return:
-00176  */
-00177   function getAttribut() {
-00178     if ( $this->id == 0){
-00179       return;
-00180     }
-00181      $sql="select * 
-00182            from jnt_fic_att_value 
-00183                natural join fiche 
-00184                natural join attr_value
-00185                left join attr_def using (ad_id) where f_id=".$this->id.
-00186        " order by ad_id";
-00187 
-00188     $Ret=ExecSql($this->cn,$sql);
-00189     if ( ($Max=pg_NumRows($Ret)) == 0 )
-00190       return ;
-00191     for ($i=0;$i<$Max;$i++) {
-00192       $row=pg_fetch_array($Ret,$i);
-00193       $this->fiche_def=$row['fd_id'];
-00194       $t=new Attribut ($row['ad_id']);
-00195       $t->ad_text=$row['ad_text'];
-00196       $t->av_text=$row['av_text'];
-00197       $this->attribut[$i]=$t;
-00198     }
-00199     $e=new Fiche_def($this->cn,$this->fiche_def);
-00200     $e->GetAttribut();
-00201 
-00202     if ( sizeof($this->attribut) != sizeof($e->attribut ) ) {
-00203 
-00204       // !!! Missing attribute
-00205       foreach ($e->attribut as $f ) {
-00206         $flag=0;
-00207         foreach ($this->attribut as $g ) {
-00208           if ( $g->ad_id == $f->ad_id ) 
-00209             $flag=1;
-00210         }
-00211         if ( $flag == 0 ) { 
-00212           // there's a missing one, we insert it
-00213           $t=new Attribut ($f->ad_id);
-00214           $t->av_text="";
-00215           $t->ad_text=$f->ad_text;
-00216           $this->attribut[$Max]=$t;
-00217           $Max++;
-00218         } // if flag == 0
-00219 
-00220       }// foreach 
-00221       $this->attribut=SortAttributeById($this->attribut);
-00222 
-00223 
-00224     }//missing attribut
-00225   }
-00226 
-00227   function size() {
-00228     if ( isset ($this->ad_id))
-00229       return sizeof($this->ad_id);
-00230     else
-00231       return 0;
-00232   }
-00233   function GetByType($p_fd_id) {
-00234      $sql="select * 
-00235            from
-00236                fiche 
-00237             where fd_id=".$p_fd_id;
+00030 class fiche_def {
+00031   var $cn;           // database connection
+00032   var $id;                      // id (fiche_def.fd_id
+00033   var $label;                   // fiche_def.fd_label
+00034   var $class_base;              // fiche_def.fd_class_base
+00035   var $fiche_def;               // fiche_def.frd_id = fiche_def_ref.frd_id
+00036   var $create_account;          // fd_create_account: flag
+00037   var $all;
+00038   var $attribut;                // get from attr_xxx tables
+00039   function fiche_def($p_cn,$p_id = 0) {
+00040     $this->cn=$p_cn;
+00041     $this->id=$p_id;
+00042   }
+00043 
+00051   function GetAttribut() {
+00052     $sql="select * from jnt_fic_attr ".
+00053       " natural join attr_def where fd_id=".$this->id.
+00054       " order by ad_id";
+00055 
+00056     $Ret=ExecSql($this->cn,$sql);
+00057 
+00058     if ( ($Max=pg_NumRows($Ret)) == 0 )
+00059       return ;
+00060     for ($i=0;$i < $Max;$i++) {
+00061       $row=pg_fetch_array($Ret,$i);
+00062       $t = new Attribut($row['ad_id']);
+00063       $t->ad_text=$row['ad_text'];
+00064       $this->attribut[$i]=$t;
+00065     }
+00066     return $this->attribut;
+00067   }
+00068 
+00074   function Get() {
+00075     if ( $this->id == 0 ) 
+00076       return 0;
+00077     $sql="select * from fiche_def ".
+00078       " where fd_id=".$this->id;
+00079     $Ret=ExecSql($this->cn,$sql);
+00080     if ( ($Max=pg_NumRows($Ret)) == 0 )
+00081       return ;
+00082     $row=pg_fetch_array($Ret,0);
+00083     $this->label=$row['fd_label'];
+00084     $this->class_base=$row['fd_class_base'];
+00085     $this->fiche_def=$row['frd_id'];
+00086     $this->create_account=$row['fd_create_account'];
+00087   }
+00094  function GetAll() {
+00095    $sql="select * from fiche_def ";
+00096 
+00097     $Ret=ExecSql($this->cn,$sql);
+00098     if ( ($Max=pg_NumRows($Ret)) == 0 )
+00099       return ;
+00100 
+00101     for ( $i = 0; $i < $Max;$i++) {
+00102       $row=pg_fetch_array($Ret,$i);
+00103       $this->all[$i]=new fiche_def($this->cn,$row['fd_id']);
+00104       $this->all[$i]->label=$row['fd_label'];
+00105       $this->all[$i]->class_base=$row['fd_class_base'];
+00106       $this->all[$i]->fiche_def=$row['frd_id'];
+00107       $this->all[$i]->create_account=$row['fd_create_account'];
+00108     }
+00109   }
+00119  function HasAttribute($p_attr) {
+00120    return (CountSql($this->cn,"select * from vw_fiche_def where ad_id=$p_attr and fd_id=".$this->id)>0)?true:false;
+00121 
+00122  }
+00129  function Display() 
+00130    {
+00131 
+00132      $r=sprintf("<TD>%s</TD>",$this->id);
+00133      $r.=sprintf("<TD>%s</TD>",$this->label);
+00134      $r.=sprintf("<TD>%s</TD>",$this->class_base);
+00135      $r.=sprintf("<TD>%s</TD>",$this->fiche_def);
+00136      return $r;
+00137    }
+00138 
+00139 }
+00145 
+00146 // class fiche
+00148 class fiche {
+00149   var $cn;           
+00150   var $id;           
+00151   var $fiche_def;    
+00152   var $attribut;     
+00153   var $fiche_def_ref; 
+00155   function fiche($p_cn,$p_id=0) {
+00156     $this->cn=$p_cn;
+00157     $this->id=$p_id;
+00158   }
+00167   function GetByQCode($p_qcode,$p_all=true)
+00168     {
+00169       $p_qcode=FormatString($p_qcode);
+00170       $sql="select f_id from jnt_fic_att_value join attr_value 
+00171            using (jft_id)  where ad_id=23 and av_text='".$p_qcode."'";
+00172       $Res=ExecSql($this->cn,$sql);
+00173       $r=pg_fetch_all($Res);
+00174       if ( sizeof($r) == 0 ) 
+00175         return 1;
+00176       $this->id=$r[0]['f_id'];
+00177       echo_debug('class_fiche',__LINE__,'f_id = '.$this->id);
+00178 
+00179       if ( $p_all )
+00180         $this->getAttribut();
+00181       return 0;
+00182     }
+00188   function getAttribut() {
+00189     if ( $this->id == 0){
+00190       return;
+00191     }
+00192      $sql="select * 
+00193            from jnt_fic_att_value 
+00194                natural join fiche 
+00195                natural join attr_value
+00196                left join attr_def using (ad_id) where f_id=".$this->id.
+00197        " order by ad_id";
+00198 
+00199     $Ret=ExecSql($this->cn,$sql);
+00200     if ( ($Max=pg_NumRows($Ret)) == 0 )
+00201       return ;
+00202     for ($i=0;$i<$Max;$i++) {
+00203       $row=pg_fetch_array($Ret,$i);
+00204       $this->fiche_def=$row['fd_id'];
+00205       $t=new Attribut ($row['ad_id']);
+00206       $t->ad_text=$row['ad_text'];
+00207       $t->av_text=$row['av_text'];
+00208       $this->attribut[$i]=$t;
+00209     }
+00210     $e=new Fiche_def($this->cn,$this->fiche_def);
+00211     $e->GetAttribut();
+00212 
+00213     if ( sizeof($this->attribut) != sizeof($e->attribut ) ) {
+00214 
+00215       // !!! Missing attribute
+00216       foreach ($e->attribut as $f ) {
+00217         $flag=0;
+00218         foreach ($this->attribut as $g ) {
+00219           if ( $g->ad_id == $f->ad_id ) 
+00220             $flag=1;
+00221         }
+00222         if ( $flag == 0 ) { 
+00223           // there's a missing one, we insert it
+00224           $t=new Attribut ($f->ad_id);
+00225           $t->av_text="";
+00226           $t->ad_text=$f->ad_text;
+00227           $this->attribut[$Max]=$t;
+00228           $Max++;
+00229         } // if flag == 0
+00230 
+00231       }// foreach 
+00232       $this->attribut=SortAttributeById($this->attribut);
+00233 
+00234 
+00235     }//missing attribut
+00236   }
+00237 
 00238 
-00239 
-00240     $Ret=ExecSql($this->cn,$sql);
-00241     if ( ($Max=pg_NumRows($Ret)) == 0 )
-00242       return ;
-00243     $all[0]=new fiche($this->cn);
-00244 
-00245     for ($i=0;$i<$Max;$i++) {
-00246       $row=pg_fetch_array($Ret,$i);
-00247       $t=new fiche($this->cn,$row['f_id']);
-00248       $t->getAttribut();
-00249       $all[$i]=$t;
+00244   function size() {
+00245     if ( isset ($this->ad_id))
+00246       return sizeof($this->ad_id);
+00247     else
+00248       return 0;
+00249   }
 00250 
-00251     }
-00252     return $all;
-00253   }
-00254 /* function CountGetByDef
-00255  **************************************************
-00256  * Purpose : Return array of card from the frd family
-00257  *        
-00258  * parm : 
-00259  *      - the fiche_def_ref.frd_id
-00260  *      - p_search is a filter on the name
-00261  * gen :
-00262  *      -
-00263  * return: array of fiche object
-00264  */
-00265   function CountByDef($p_frd_id,$p_search="") {
-00266      $sql="select * 
-00267            from
-00268                fiche join fiche_Def using (fd_id)
-00269             where frd_id=".$p_frd_id;
-00270      if ( $p_search != "" ) 
-00271        {
-00272          $a=FormatString($p_search);
-00273          $sql="select * from vw_fiche_attr where frd_id=".$p_frd_id.
-00274            " and vw_name ~* '$p_search'";
-00275        }
-00276 
-00277     $Ret=ExecSql($this->cn,$sql);
-00278     
-00279     return pg_NumRows($Ret) ;
-00280   }
-00281 /* function GetByDef
-00282  **************************************************
-00283  * Purpose : Return array of card from the frd family
-00284  *        
-00285  * parm : 
-00286  *      - the fiche_def_ref.frd_id
-00287  *      - p_search is an optional filter
-00288  * gen :
-00289  *      -
-00290  * return: array of fiche object
-00291  */
-00292   function GetByDef($p_frd_id,$p_offset=-1,$p_search="") {
-00293     if ( $p_offset == -1 ) 
-00294       {
-00295         $sql="select * 
-00296            from
-00297                fiche join fiche_Def using (fd_id)
-00298             where frd_id=".$p_frd_id." $p_search order by f_id";
-00299       } 
-00300     else 
-00301       {
-00302         $limit=$_SESSION['g_pagesize'];
-00303         $sql="select * 
-00304            from
-00305                fiche join fiche_Def using (fd_id)
-00306             where frd_id=".$p_frd_id." $p_search order by f_id
-00307            limit ".$limit." offset ".$p_offset;
-00308 
-00309       }
-00310 
-00311     $Ret=ExecSql($this->cn,$sql);
-00312     if ( ($Max=pg_NumRows($Ret)) == 0 )
-00313       return ;
-00314     $all[0]=new fiche($this->cn);
-00315 
-00316     for ($i=0;$i<$Max;$i++) {
-00317       $row=pg_fetch_array($Ret,$i);
-00318       $t=new fiche($this->cn,$row['f_id']);
-00319       $t->getAttribut();
-00320       $all[$i]=$t;
-00321 
-00322     }
-00323     return $all;
-00324   }
-00325   function ShowTable() {
-00326     echo "<TR><TD> ".
-00327       $this->id."</TD>".
-00328       "<TR> <TD>".
-00329       $this->attribut_value."</TD>".
-00330       "<TR> <TD>".
-00331       $this->attribut_def."</TD></TR>";
-00332   }
-00333 /* function strAttribut
-00334  **************************************************
-00335  * Purpose : return the string of the given attribute
-00336  *        (attr_def.ad_id)
-00337  * parm : 
-00338  *      -
-00339  * gen :
-00340  *      -
-00341  * return:
-00342  */
-00343   function strAttribut($p_ad_id) 
-00344     {
-00345       if ( sizeof ($this->attribut) == 0 )
-00346         return '- ERROR -';
-00347       foreach ($this->attribut as $e)
-00348         {
-00349           if ( $e->ad_id == $p_ad_id ) 
-00350             return $e->av_text;
-00351         }
-00352         return '- ERROR -';
-00353     }
-00354 /* function Blank
-00355  **************************************************
-00356  * Purpose : insert a new record
-00357  *        
-00358  * parm : 
-00359  *      - show a blank card to be filled
-00360  * gen :
-00361  *      -
-00362  * return:
-00363  */
-00364   function blank($p_fiche_def) 
+00251 
+00258   function GetByType($p_fd_id) {
+00259      $sql="select * 
+00260            from
+00261                fiche 
+00262             where fd_id=".$p_fd_id;
+00263 
+00264 
+00265     $Ret=ExecSql($this->cn,$sql);
+00266     if ( ($Max=pg_NumRows($Ret)) == 0 )
+00267       return ;
+00268     $all[0]=new fiche($this->cn);
+00269 
+00270     for ($i=0;$i<$Max;$i++) {
+00271       $row=pg_fetch_array($Ret,$i);
+00272       $t=new fiche($this->cn,$row['f_id']);
+00273       $t->getAttribut();
+00274       $all[$i]=$t;
+00275 
+00276     }
+00277     return $all;
+00278   }
+00289   function CountByDef($p_frd_id,$p_search="",$p_sql="") {
+00290      $sql="select * 
+00291            from
+00292                fiche join fiche_Def using (fd_id)
+00293             where frd_id=".$p_frd_id;
+00294      if ( $p_search != "" ) 
+00295        {
+00296          $a=FormatString($p_search);
+00297          $sql="select * from vw_fiche_attr where frd_id=".$p_frd_id.
+00298            " and vw_name ~* '$p_search'";
+00299        }
+00300 
+00301     $Ret=ExecSql($this->cn,$sql.$p_sql);
+00302     
+00303     return pg_NumRows($Ret) ;
+00304   }
+00315   function GetByDef($p_frd_id,$p_offset=-1,$p_search="") {
+00316     if ( $p_offset == -1 ) 
+00317       {
+00318         $sql="select * 
+00319            from
+00320                fiche join fiche_Def using (fd_id)
+00321             where frd_id=".$p_frd_id." $p_search order by f_id";
+00322       } 
+00323     else 
+00324       {
+00325         $limit=$_SESSION['g_pagesize'];
+00326         $sql="select * 
+00327            from
+00328                fiche join fiche_Def using (fd_id)
+00329             where frd_id=".$p_frd_id." $p_search order by f_id
+00330            limit ".$limit." offset ".$p_offset;
+00331 
+00332       }
+00333 
+00334     $Ret=ExecSql($this->cn,$sql);
+00335     if ( ($Max=pg_NumRows($Ret)) == 0 )
+00336       return ;
+00337     $all[0]=new fiche($this->cn);
+00338 
+00339     for ($i=0;$i<$Max;$i++) {
+00340       $row=pg_fetch_array($Ret,$i);
+00341       $t=new fiche($this->cn,$row['f_id']);
+00342       $t->getAttribut();
+00343       $all[$i]=$t;
+00344 
+00345     }
+00346     return $all;
+00347   }
+00348   function ShowTable() {
+00349     echo "<TR><TD> ".
+00350       $this->id."</TD>".
+00351       "<TR> <TD>".
+00352       $this->attribut_value."</TD>".
+00353       "<TR> <TD>".
+00354       $this->attribut_def."</TD></TR>";
+00355   }
+00364   function strAttribut($p_ad_id) 
 00365     {
-00366       // array = array of attribute object sorted on ad_id
-00367       $f=new fiche_def($this->cn,$p_fiche_def);
-00368       $array=$f->getAttribut();
-00369       $r='<table>';
-00370       foreach ($array as $attr)
-00371         {
-00372           $msg="";
-00373           if ( $attr->ad_id == ATTR_DEF_ACCOUNT) 
-00374             {
-00375               $r.=JS_SEARCH_POSTE;
-00376               $w=new widget("js_search_poste");
-00377               //  account created automatically
-00378               $sql="select account_auto($p_fiche_def)";
-00379               echo_debug("class_fiche",__LINE__,$sql);
-00380               $ret_sql=ExecSql($this->cn,$sql);
-00381               $a=pg_fetch_array($ret_sql,0);
-00382               if ( $a['account_auto'] == 't' )
-00383                 $msg="<TD> <font color=\"red\">Rappel: Poste créé automatiquement !</font></TD> ";
-00384 
-00385              }
-00386           elseif ( $attr->ad_id == ATTR_DEF_TVA) 
-00387             {
-00388               $r.=JS_TVA;
-00389               $w=new widget("js_tva");
-00390             }
-00391           else 
-00392             {
-00393               $w=new widget("text");
-00394             }
-00395           $w->table=1;
-00396           $w->label=$attr->ad_text;
-00397           $w->name="av_text".$attr->ad_id;
-00398 
-00399           $r.="<TR>".$w->IOValue()."$msg </TR>";
-00400         }
-00401       $r.= '</table>';
-00402       return $r;
-00403     }
-00404 
-00405   
-00406 /* function Display
-00407  **************************************************
-00408  * Purpose : Display object instance, getAttribute
-00409  *        sort the attribute and add missing ones
-00410  * parm : 
-00411  *      -
-00412  * gen :
-00413  *      -
-00414  * return: string to display
-00415  */
-00416   function Display($p_readonly) 
-00417     {
-00418       $this->GetAttribut();
-00419       $attr=$this->attribut;
-00420 
-00421       $ret="<table>";
-00422       
-00423       foreach ( $attr as $r) 
-00424         {
-00425           $msg="";
-00426           if ( $r->ad_id == ATTR_DEF_ACCOUNT) 
-00427             {
-00428               $ret.=JS_SEARCH_POSTE;
-00429               $w=new widget("js_search_poste");
-00430               //  account created automatically
-00431               $sql="select account_auto($this->fiche_def)";
-00432               echo_debug("class_fiche",__LINE__,$sql);
-00433               $ret_sql=ExecSql($this->cn,$sql);
-00434               $a=pg_fetch_array($ret_sql,0);
-00435 //            if ( $a['account_auto'] == 't' )
-00436 //              $msg="<TD> <font color=\"red\">si vide le Poste sera créer automatiquement</font></TD> ";
-00437              }
-00438           elseif ( $r->ad_id == ATTR_DEF_TVA) 
-00439             {
-00440               $ret.=JS_TVA;
-00441               $w=new widget("js_tva");
-00442             }
-00443           else 
-00444             {
-00445               $w=new widget("text");
-00446             }
-00447 
-00448           $w->label=$r->ad_text;
-00449           $w->value=$r->av_text;
-00450           $w->name="av_text".$r->ad_id;
-00451           $w->readonly=$p_readonly;
-00452           $w->table=1;
-00453 
-00454           $ret.="<TR>".$w->IOValue()."</TR>";
-00455         }
-00456       $ret.="</table>";
-00457       return $ret;
-00458     }
-00459   /* function Save
-00460  **************************************************
-00461  * Purpose : Save a card
-00462  *        
-00463  * parm : 
-00464  *      - none
-00465  * gen :
-00466  *      -
-00467  * return:
-00468  */
-00469   function Save($p_fiche_def=0) 
-00470     {
-00471       // new card or only a update ?
-00472       if ( $this->id == 0 ) 
-00473         $this->insert($p_fiche_def);
-00474       else
-00475         $this->update();
-00476     }
-00477 /* function insert
-00478  **************************************************
-00479  * Purpose : insert a new record
-00480  *        
-00481  * parm : 
-00482  *      -
-00483  * gen :
-00484  *      -
-00485  * return:
-00486  */
-00487   function insert($p_fiche_def) 
-00488     {
-00489       $fiche_id=NextSequence($this->cn,'s_fiche');
-00490       $this->id=$fiche_id;
-00491       // first we create the card
-00492       $sql=sprintf("insert into fiche(f_id,fd_id)". 
-00493                    " values (%d,%d)",
-00494                    $fiche_id,$p_fiche_def);
-00495       $Ret=ExecSql($this->cn,$sql);
-00496       // parse the $_POST array
-00497       foreach ($_POST as $name=>$value ) 
-00498         {
-00499           echo_debug ("class_fiche",__LINE__,"Name = $name value $value") ;
-00500           list ($id) = sscanf ($name,"av_text%d");
-00501           if ( $id == null ) continue;
-00502           echo_debug("class_fiche",__LINE__,"add $id");
-00503           
-00504           // Special traitement
-00505           // quickcode
-00506           if ( $id == ATTR_DEF_QUICKCODE) 
-00507             {
-00508               echo_debug("Modify ATTR_DEF_QUICKCODE");
-00509               $sql=sprintf("select insert_quick_code(%d,'%s')",
-00510                            $fiche_id,FormatString($value));
-00511               ExecSql($this->cn,$sql);
-00512               continue;
-00513             }
-00514           // name
-00515           if ( $id == ATTR_DEF_NAME ) 
-00516             {
-00517               echo_debug("Modify ATTR_DEF_NAME");
-00518               if ( strlen(trim($value)) == 0 )
-00519                 $value="pas de nom";
-00520               
-00521             }
-00522           // account
-00523           if ( $id == ATTR_DEF_ACCOUNT ) 
-00524             {
-00525               echo_debug("Modify ATTR_DEF_ACCOUNT");
-00526               $v=FormatString($value);
-00527               if ( isNumber($v) == 1 )
-00528                 {
-00529                   $sql=sprintf("select account_insert(%d,%d)",
-00530                                $this->id,$v);
-00531                   $Ret=ExecSql($this->cn,$sql);
-00532                 }
-00533               if ( strlen(trim($v))==0  )
-00534                 {
-00535                   $sql=sprintf("select account_insert(%d,null)",
-00536                                $this->id);
-00537                   $Ret=ExecSql($this->cn,$sql);
-00538                 }
-00539               
-00540               continue;
-00541             }
-00542         // TVA
-00543           if ( $id == ATTR_DEF_TVA ) 
-00544             {
-00545               echo_debug("Modify ATTR_DEF_TVA");
-00546               // Verify if the rate exists, if not then do not update
-00547               if ( strlen(trim($value)) != 0 ) 
-00548                 {
-00549                   if ( CountSql($this->cn,"select * from tva_rate where tva_id=".$value) == 0) 
-00550                     {
-00551                       echo_debug("class_fiche",__LINE__,"Tva invalide $value");
-00552                       continue;
-00553                     }
-00554                 }
-00555             }
-00556           
-00557           // Normal traitement
-00558           $value2=FormatString($value);
-00559 
-00560           $sql=sprintf("select attribut_insert(%d,%d,'%s')",
-00561                        $fiche_id,$id,$value2);
-00562           ExecSql($this->cn,$sql);
-00563         }
-00564       return;
-00565       
-00566 
-00567     }
-00568 
-00569 /* function update
-00570  **************************************************
-00571  * Purpose : update a card
-00572  *        
-00573  * parm : 
-00574  *      -
-00575  * gen :
-00576  *      -
-00577  * return:
-00578  */
-00579   function update() 
-00580     {
-00581       // parse the $_POST array
-00582       foreach ($_POST as $name=>$value ) 
-00583         {
-00584           echo_debug ("class_fiche",__LINE__,"Name = $name value $value") ;
-00585           list ($id) = sscanf ($name,"av_text%d");
-00586           if ( $id == null ) continue;
-00587           echo_debug("class_fiche",__LINE__,"modify $id");
-00588           
-00589           // retrieve jft_id to update table attr_value
-00590           $sql=" select jft_id from jnt_fic_att_value where ad_id=$id and f_id=$this->id";
-00591           $Ret=ExecSql($this->cn,$sql);
-00592           if ( pg_NumRows($Ret) != 1 ) {
-00593             echo_error ("class_fiche ".__LINE__." INVALID ID !!! ");
-00594             return;
-00595           }
-00596           $tmp=pg_fetch_array($Ret,0);
-00597           $jft_id=$tmp['jft_id'];
-00598           
-00599           // Special traitement
-00600           // quickcode
-00601           if ( $id == ATTR_DEF_QUICKCODE) 
-00602             {
-00603               echo_debug("Modify ATTR_DEF_QUICKCODE");
-00604               $sql=sprintf("select update_quick_code(%d,'%s')",
-00605                            $jft_id,FormatString($value));
-00606               ExecSql($this->cn,$sql);
-00607               continue;
-00608             }
-00609           // name
-00610           if ( $id == ATTR_DEF_NAME ) 
-00611             {
-00612               echo_debug("Modify ATTR_DEF_NAME");
-00613               if ( strlen(trim($value)) == 0 )
-00614                 continue;
-00615               
-00616             }
-00617           // account
-00618           if ( $id == ATTR_DEF_ACCOUNT ) 
-00619             {
-00620               echo_debug("Modify ATTR_DEF_ACCOUNT");
-00621               $v=FormatString($value);
-00622               if ( isNumber($v) == 1 )
-00623                 {
-00624                   $sql=sprintf("select account_update(%d,%d)",
-00625                                $this->id,$v);
-00626                   $Ret=ExecSql($this->cn,$sql);
-00627                 }
-00628               if ( strlen (trim($v)) == 0 ) 
-00629                 {
-00630                   $sql=sprintf("select account_update(%d,null)",
-00631                                $this->id);
-00632                   $Ret=ExecSql($this->cn,$sql);
-00633                   continue;
-00634                 }
-00635             }
-00636         // TVA
-00637           if ( $id == ATTR_DEF_TVA ) 
-00638             {
-00639               echo_debug("Modify ATTR_DEF_TVA");
-00640               // Verify if the rate exists, if not then do not update
-00641               if ( strlen(trim($value)) != 0 ) 
-00642                 {
-00643                   if ( CountSql($this->cn,"select * from tva_rate where tva_id=".$value) == 0) 
-00644                     {
-00645                       echo_debug("class_fiche",__LINE__,"Tva invalide $value");
-00646                       continue;
-00647                     }
-00648                 }
-00649             }
-00650           
-00651           // Normal traitement
-00652           $value2=FormatString($value);
-00653           $sql=sprintf("update attr_value set av_text='%s' where jft_id=%d",
-00654                        $value2,$jft_id);
-00655           ExecSql($this->cn,$sql);
-00656         }
-00657       return;
-00658       
-00659     }
-00660 /* function remove
-00661  **************************************************
-00662  * Purpose : remove a card
-00663  *        
-00664  * parm : 
-00665  *      - none
-00666  * gen :
-00667  *      - none
-00668  * return: 0 if the card is removed otherwise 1
-00669  */
-00670   function remove() 
-00671     {
-00672       if ( $this->id==0 ) return;
-00673       // verify if that card has not been used is a ledger
-00674       $sql="select fiche_used(".$this->id.") as result";
-00675       $Res=ExecSql($this->cn,$sql);
-00676       
-00677       // fetch the result
-00678       list($result)=pg_fetch_row($Res,0);
-00679 
-00680       if ( $result == 0 ) 
-00681         {
-00682           $sql="select fiche_delete (".$this->id.")";
-00683           $Res=ExecSql($this->cn,$sql);
-00684           return 0;
-00685         }
-00686       return 1;
-00687     }
-00688 
-00689 
-00690 }
-00691 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00366 if ( sizeof ($this->attribut) == 0 ) +00367 { +00368 if ($this->id==0) return '- ERROR -'; +00369 // object is not in memory we need to look into the database +00370 $sql="select av_text from attr_value join jnt_fic_att_value using(jft_id) +00371 where f_id=".$this->id." and ad_id=".$p_ad_id; +00372 $Res=ExecSql($this->cn,$sql); +00373 $row=pg_fetch_all($Res); +00374 // if not found return error +00375 if ( $row == false ) +00376 return ' - ERROR -'; +00377 +00378 return $row[0]['av_text']; +00379 } +00380 +00381 foreach ($this->attribut as $e) +00382 { +00383 if ( $e->ad_id == $p_ad_id ) +00384 return $e->av_text; +00385 } +00386 return '- ERROR -'; +00387 } +00397 function blank($p_fiche_def) +00398 { +00399 // array = array of attribute object sorted on ad_id +00400 $f=new fiche_def($this->cn,$p_fiche_def); +00401 $array=$f->getAttribut(); +00402 $r='<table>'; +00403 foreach ($array as $attr) +00404 { +00405 $msg=""; +00406 if ( $attr->ad_id == ATTR_DEF_ACCOUNT) +00407 { +00408 $r.=JS_SEARCH_POSTE; +00409 $w=new widget("js_search_poste"); +00410 // account created automatically +00411 $sql="select account_auto($p_fiche_def)"; +00412 echo_debug("class_fiche",__LINE__,$sql); +00413 $ret_sql=ExecSql($this->cn,$sql); +00414 $a=pg_fetch_array($ret_sql,0); +00415 if ( $a['account_auto'] == 't' ) +00416 $msg="<TD> <font color=\"red\">Rappel: Poste créé automatiquement !</font></TD> "; +00417 +00418 } +00419 elseif ( $attr->ad_id == ATTR_DEF_TVA) +00420 { +00421 $r.=JS_TVA; +00422 $w=new widget("js_tva"); +00423 } +00424 elseif ( $attr->ad_id == ATTR_DEF_COMPANY ) +00425 { +00426 $r.=JS_SEARCH_CARD; +00427 $w=new widget("js_search"); +00428 // filter on frd_id +00429 $w->extra=FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX; +00430 $w->extra2=0; // jrn = 0 +00431 $label=new widget("span"); +00432 $label->name="av_text".$attr->ad_id."_label"; +00433 $msg=$label->IOValue(); +00434 } +00435 else +00436 { +00437 $w=new widget("text"); +00438 } +00439 $w->table=1; +00440 $w->label=$attr->ad_text; +00441 $w->name="av_text".$attr->ad_id; +00442 +00443 $r.="<TR>".$w->IOValue()."$msg </TR>"; +00444 } +00445 $r.= '</table>'; +00446 return $r; +00447 } +00448 +00449 +00459 function Display($p_readonly) +00460 { +00461 $this->GetAttribut(); +00462 $attr=$this->attribut; +00463 +00464 $ret="<table>"; +00465 +00466 foreach ( $attr as $r) +00467 { +00468 $msg=""; +00469 if ( $r->ad_id == ATTR_DEF_ACCOUNT) +00470 { +00471 $ret.=JS_SEARCH_POSTE; +00472 $w=new widget("js_search_poste"); +00473 // account created automatically +00474 $sql="select account_auto($this->fiche_def)"; +00475 echo_debug("class_fiche",__LINE__,$sql); +00476 $ret_sql=ExecSql($this->cn,$sql); +00477 $a=pg_fetch_array($ret_sql,0); +00478 // if ( $a['account_auto'] == 't' ) +00479 // $msg="<TD> <font color=\"red\">si vide le Poste sera créer automatiquement</font></TD> "; +00480 } +00481 elseif ( $r->ad_id == ATTR_DEF_TVA) +00482 { +00483 $ret.=JS_TVA; +00484 $w=new widget("js_tva"); +00485 } +00486 elseif ( $r->ad_id == ATTR_DEF_COMPANY ) +00487 { +00488 $ret.=JS_SEARCH_CARD; +00489 $w=new widget("js_search"); +00490 // filter on frd_id +00491 $w->extra=FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX; +00492 $w->extra2=0; // jrn = 0 +00493 $label=new widget("span"); +00494 $label->name="av_text".$r->ad_id."_label"; +00495 $msg=$label->IOValue(); +00496 } +00497 else +00498 { +00499 $w=new widget("text"); +00500 } +00501 +00502 $w->label=$r->ad_text; +00503 $w->value=$r->av_text; +00504 $w->name="av_text".$r->ad_id; +00505 $w->readonly=$p_readonly; +00506 $w->table=1; +00507 +00508 $ret.="<TR>".$w->IOValue()."$msg </TR>"; +00509 } +00510 $ret.="</table>"; +00511 return $ret; +00512 } +00519 function Save($p_fiche_def=0) +00520 { +00521 // new card or only a update ? +00522 if ( $this->id == 0 ) +00523 $this->insert($p_fiche_def); +00524 else +00525 $this->update(); +00526 } +00533 function insert($p_fiche_def) +00534 { +00535 $fiche_id=NextSequence($this->cn,'s_fiche'); +00536 $this->id=$fiche_id; +00537 // first we create the card +00538 StartSql($this->cn); +00539 $sql=sprintf("insert into fiche(f_id,fd_id)". +00540 " values (%d,%d)", +00541 $fiche_id,$p_fiche_def); +00542 $Ret=ExecSql($this->cn,$sql); +00543 // parse the $_POST array +00544 foreach ($_POST as $name=>$value ) +00545 { +00546 echo_debug ("class_fiche",__LINE__,"Name = $name value $value") ; +00547 list ($id) = sscanf ($name,"av_text%d"); +00548 if ( $id == null ) continue; +00549 echo_debug("class_fiche",__LINE__,"add $id"); +00550 +00551 // Special traitement +00552 // quickcode +00553 if ( $id == ATTR_DEF_QUICKCODE) +00554 { +00555 echo_debug("Modify ATTR_DEF_QUICKCODE"); +00556 $sql=sprintf("select insert_quick_code(%d,'%s')", +00557 $fiche_id,FormatString($value)); +00558 ExecSql($this->cn,$sql); +00559 continue; +00560 } +00561 // name +00562 if ( $id == ATTR_DEF_NAME ) +00563 { +00564 echo_debug("Modify ATTR_DEF_NAME"); +00565 if ( strlen(trim($value)) == 0 ) +00566 $value="pas de nom"; +00567 +00568 } +00569 // account +00570 if ( $id == ATTR_DEF_ACCOUNT ) +00571 { +00572 echo_debug("Modify ATTR_DEF_ACCOUNT"); +00573 $v=FormatString($value); +00574 if ( isNumber($v) == 1 ) +00575 { +00576 $sql=sprintf("select account_insert(%d,%d)", +00577 $this->id,$v); +00578 $Ret=ExecSql($this->cn,$sql); +00579 } +00580 if ( strlen(trim($v))==0 ) +00581 { +00582 $sql=sprintf("select account_insert(%d,null)", +00583 $this->id); +00584 $Ret=ExecSql($this->cn,$sql); +00585 } +00586 +00587 continue; +00588 } +00589 // TVA +00590 if ( $id == ATTR_DEF_TVA ) +00591 { +00592 echo_debug("Modify ATTR_DEF_TVA"); +00593 // Verify if the rate exists, if not then do not update +00594 if ( strlen(trim($value)) != 0 ) +00595 { +00596 if ( CountSql($this->cn,"select * from tva_rate where tva_id=".$value) == 0) +00597 { +00598 echo_debug("class_fiche",__LINE__,"Tva invalide $value"); +00599 continue; +00600 } +00601 } +00602 } +00603 // The contact has a company attribut +00604 if ( $id == ATTR_DEF_COMPANY ) +00605 { +00606 $exist=CountSql($this->cn,"select f_id from fiche join fiche_def using (fd_id) ". +00607 " join jnt_fic_att_value using (f_id) join attr_value using (jft_id) ". +00608 " where frd_id in (8,9,14) and ad_id=".ATTR_DEF_QUICKCODE. +00609 " and av_text='".FormatString($value)."'"); +00610 if ( $exist == 0 ) +00611 { +00612 $value="Attention : pas de société "; +00613 } +00614 } +00615 // Normal traitement +00616 $value2=FormatString($value); +00617 +00618 $sql=sprintf("select attribut_insert(%d,%d,'%s')", +00619 $fiche_id,$id,$value2); +00620 ExecSql($this->cn,$sql); +00621 } +00622 Commit($this->cn); +00623 return; +00624 +00625 +00626 } +00627 +00628 +00629 +00633 function update() +00634 { +00635 // parse the $_POST array +00636 foreach ($_POST as $name=>$value ) +00637 { +00638 echo_debug ("class_fiche",__LINE__,"Name = $name value $value") ; +00639 list ($id) = sscanf ($name,"av_text%d"); +00640 if ( $id == null ) continue; +00641 echo_debug("class_fiche",__LINE__,"modify $id"); +00642 +00643 // retrieve jft_id to update table attr_value +00644 $sql=" select jft_id from jnt_fic_att_value where ad_id=$id and f_id=$this->id"; +00645 $Ret=ExecSql($this->cn,$sql); +00646 if ( pg_NumRows($Ret) != 1 ) { +00647 echo_error ("class_fiche ".__LINE__." INVALID ID !!! "); +00648 return; +00649 } +00650 $tmp=pg_fetch_array($Ret,0); +00651 $jft_id=$tmp['jft_id']; +00652 +00653 // Special traitement +00654 // quickcode +00655 if ( $id == ATTR_DEF_QUICKCODE) +00656 { +00657 echo_debug("Modify ATTR_DEF_QUICKCODE"); +00658 $sql=sprintf("select update_quick_code(%d,'%s')", +00659 $jft_id,FormatString($value)); +00660 ExecSql($this->cn,$sql); +00661 continue; +00662 } +00663 // name +00664 if ( $id == ATTR_DEF_NAME ) +00665 { +00666 echo_debug("Modify ATTR_DEF_NAME"); +00667 if ( strlen(trim($value)) == 0 ) +00668 continue; +00669 +00670 } +00671 // account +00672 if ( $id == ATTR_DEF_ACCOUNT ) +00673 { +00674 echo_debug("Modify ATTR_DEF_ACCOUNT"); +00675 $v=FormatString($value); +00676 if ( isNumber($v) == 1 ) +00677 { +00678 $sql=sprintf("select account_update(%d,%d)", +00679 $this->id,$v); +00680 $Ret=ExecSql($this->cn,$sql); +00681 } +00682 if ( strlen (trim($v)) == 0 ) +00683 { +00684 $sql=sprintf("select account_update(%d,null)", +00685 $this->id); +00686 $Ret=ExecSql($this->cn,$sql); +00687 continue; +00688 } +00689 } +00690 // TVA +00691 if ( $id == ATTR_DEF_TVA ) +00692 { +00693 echo_debug("Modify ATTR_DEF_TVA"); +00694 // Verify if the rate exists, if not then do not update +00695 if ( strlen(trim($value)) != 0 ) +00696 { +00697 if ( CountSql($this->cn,"select * from tva_rate where tva_id=".$value) == 0) +00698 { +00699 echo_debug("class_fiche",__LINE__,"Tva invalide $value"); +00700 continue; +00701 } +00702 } +00703 } +00704 if ( $id == ATTR_DEF_COMPANY ) +00705 { +00706 $exist=CountSql($this->cn,"select f_id from fiche join fiche_def using (fd_id) ". +00707 " join jnt_fic_att_value using (f_id) join attr_value using (jft_id) ". +00708 " where frd_id in (8,9,14) and ad_id=".ATTR_DEF_QUICKCODE. +00709 " and av_text='".FormatString($value)."'"); +00710 +00711 +00712 if ( $exist == 0 ) +00713 { +00714 $value="Attention : pas de société "; +00715 } +00716 } +00717 +00718 // Normal traitement +00719 $value2=FormatString($value); +00720 $sql=sprintf("update attr_value set av_text='%s' where jft_id=%d", +00721 $value2,$jft_id); +00722 ExecSql($this->cn,$sql); +00723 } +00724 return; +00725 +00726 } +00729 function remove() +00730 { +00731 if ( $this->id==0 ) return; +00732 // verify if that card has not been used is a ledger +00733 $sql="select fiche_used(".$this->id.") as result"; +00734 $Res=ExecSql($this->cn,$sql); +00735 +00736 // fetch the result +00737 list($result)=pg_fetch_row($Res,0); +00738 +00739 if ( $result == 0 ) +00740 { +00741 $sql="select fiche_delete (".$this->id.")"; +00742 $Res=ExecSql($this->cn,$sql); +00743 return 0; +00744 } +00745 return 1; +00746 } +00749 function getName() +00750 { +00751 $sql="select av_text from jnt_fic_att_value join attr_value +00752 using (jft_id) where ad_id=1 and f_id=".$this->id; +00753 $Res=ExecSql($this->cn,$sql); +00754 $r=pg_fetch_all($Res); +00755 if ( sizeof($r) == 0 ) +00756 return 1; +00757 return $r[0]['av_text']; +00758 } +00761 function Get() +00762 { +00763 echo_debug('class_client',__LINE__,'Get'); +00764 fiche::getAttribut(); +00765 } +00771 function GetAll($p_offset=-1,$p_search="") +00772 { +00773 return fiche::GetByDef($this->fiche_def_ref,$p_offset,$p_search); +00774 } +00775 } +00776 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__fiche_8php.html b/doc/developper/html/class__fiche_8php.html index 673c0af0d..213580777 100644 --- a/doc/developper/html/class__fiche_8php.html +++ b/doc/developper/html/class__fiche_8php.html @@ -4,20 +4,29 @@ - + -

class_fiche.php File Reference

+

class_fiche.php File Reference

define Class fiche and fiche def, those class are using class attribut More... +

+

Go to the source code of this file. + +

Data Structures

class  fiche_def
 define Class fiche and fiche def, those class are using class attribut More...
class  fiche
 define Class fiche and fiche def, those class are using class attribut More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+define Class fiche and fiche def, those class are using class attribut +

+ +

+Definition in file class_fiche.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__fiche__def_8php-source.html b/doc/developper/html/class__fiche__def_8php-source.html index bf8a5d239..74bb880d5 100644 --- a/doc/developper/html/class__fiche__def_8php-source.html +++ b/doc/developper/html/class__fiche__def_8php-source.html @@ -4,7 +4,7 @@ - +

class_fiche_def.php

Go to the documentation of this file.
00001 <?
@@ -27,136 +27,83 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 
-00022 class fiche_def_ref 
-00023 {
-00024   var $frd_id;      // fiche_def_ref.frd_id
-00025   var $frd_text;      // fiche_def_ref.frd_tex
-00026   var $frd_class_base;      // fiche_def_ref.frd_class_base
-00027   var $attribut;            // array which containing list of attr.
-00028                             // it is used with dynamic variables
-00029   function fiche_def_ref($p_cn,$p_frd_id=-1)
-00030     {
-00031       $this->db=$p_cn;
-00032       $this->frd_id=$p_frd_id;
-00033       $this->attribut=array('frd_id','frd_text','frd_class_base');
-00034     }
-00035 /* function LoadAll
-00036  **************************************************
-00037  * Purpose : Load all the fiche_def_ref data and
-00038  *           return an array of  fiche_def_ref objects
-00039  *        
-00040  * parm : 
-00041  *      - none
-00042  * gen :
-00043  *      - none
-00044  * return: array
-00045  */
-00046   function LoadAll()
-00047     {
-00048       $sql="select * from fiche_def_ref order by frd_id";
-00049       $Res=ExecSql($this->db,$sql);
-00050       $all=pg_fetch_all($Res);
-00051       if ( $Res == false ) return array();
-00052       $idx=0;
-00053       $array=array();
-00054       foreach ($all as $row) 
-00055         {
-00056           $o=new fiche_def_ref($this->db);
-00057 
-00058           foreach (  $this->attribut as  $value)
-00059             {
-00060               $o->$value=$row[$value];
-00061             }
-00062           $array[$idx]=$o;
-00063           $idx++;
-00064         }
-00065       return $array;
-00066     }
-00067 /* function Display
-00068  **************************************************
-00069  * Purpose : Display data between <TD> tag
-00070  *        
-00071  * parm : 
-00072  *      - none
-00073  * gen :
-00074  *      -
-00075  * return: string
-00076  */
-00077   function Display() 
-00078     {
-00079       $r="";
-00080       foreach ( $this->attribut as $value) 
-00081         {
-00082           $r.="<TD>".$this->$value.'</TD>';
-00083         }
-00084       return $r;
-00085     }
-00086 /* function Input
-00087  **************************************************
-00088  * Purpose : Input Data between <td> tag
-00089  *        
-00090  * parm : 
-00091  *      - none
-00092  * gen :
-00093  *      -
-00094  * return: string
-00095  */
-00096   function Input()
-00097     {
-00098       $r="";
-00099       $h=new widget('hidden');
-00100       $r.='<li>Id          :'.$h->IOValue('frd_id',$this->frd_id).$this->frd_id."</li>";
-00101       $w=new widget("text");
-00102       $r.='<li>Commentaire  :'.$w->IOValue('frd_text',$this->frd_text)."</li>";
-00103       $t=new widget('text');
-00104       $r.='<li>Poste de base:'.$t->IOValue('frd_class_base',$this->frd_class_base)."</li>";
-00105 
-00106       return $r;
-00107     }
-00108 /* function Save
-00109  **************************************************
-00110  * Purpose : Store data into the database: update the 
-00111  *           record
-00112  *        
-00113  * parm : 
-00114  *      - none
-00115  * gen :
-00116  *      -
-00117  * return: none
-00118  */
-00119   function Save()
-00120     {
-00121       $sql="update fiche_def_ref set frd_text='".
-00122         $this->frd_text."' ,  frd_class_base='".$this->frd_class_base."'".
-00123         " where frd_id=".$this->frd_id;
-00124       $Res=ExecSql($this->db,$sql);
-00125     }
-00126 /* function Get
-00127  **************************************************
-00128  * Purpose : Get the data with the p_code and complete
-00129  *           the current object
-00130  *        
-00131  * parm : 
-00132  *      - none
-00133  * gen :
-00134  *      -
-00135  * return: none
-00136  */
-00137   function Get()
-00138     {
-00139       $sql="select * from  fiche_def_ref ".
-00140         " where frd_id=".$this->frd_id;
-00141       $Res=ExecSql($this->db,$sql);
-00142       if ( pg_NumRows($Res) == 0 ) return null;
-00143       $r=pg_fetch_array($Res,0);
-00144       $this->frd_text=$r['frd_text'];
-00145       $this->frd_class_base=$r['frd_class_base'];
-00146     }
-00147 
-00148 }
-00149 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00030 class fiche_def_ref +00031 { +00032 var $frd_id; +00033 var $frd_text; +00034 var $frd_class_base; +00035 var $attribut; +00036 /* it is used with dynamic variables */ +00037 +00038 function fiche_def_ref($p_cn,$p_frd_id=-1) +00039 { +00040 $this->db=$p_cn; +00041 $this->frd_id=$p_frd_id; +00042 $this->attribut=array('frd_id','frd_text','frd_class_base'); +00043 } +00051 function LoadAll() +00052 { +00053 $sql="select * from fiche_def_ref order by frd_id"; +00054 $Res=ExecSql($this->db,$sql); +00055 $all=pg_fetch_all($Res); +00056 if ( $Res == false ) return array(); +00057 $idx=0; +00058 $array=array(); +00059 foreach ($all as $row) +00060 { +00061 $o=new fiche_def_ref($this->db); +00062 +00063 foreach ( $this->attribut as $value) +00064 { +00065 $o->$value=$row[$value]; +00066 } +00067 $array[$idx]=$o; +00068 $idx++; +00069 } +00070 return $array; +00071 } +00078 function Display() +00079 { +00080 $r=""; +00081 foreach ( $this->attribut as $value) +00082 { +00083 $r.="<TD>".$this->$value.'</TD>'; +00084 } +00085 return $r; +00086 } +00097 function Input() +00098 { +00099 $r=""; +00100 $h=new widget('hidden'); +00101 $r.='<li>Id :'.$h->IOValue('frd_id',$this->frd_id).$this->frd_id."</li>"; +00102 $w=new widget("text"); +00103 $r.='<li>Commentaire :'.$w->IOValue('frd_text',$this->frd_text)."</li>"; +00104 $t=new widget('text'); +00105 $r.='<li>Poste de base:'.$t->IOValue('frd_class_base',$this->frd_class_base)."</li>"; +00106 +00107 return $r; +00108 } +00117 function Save() +00118 { +00119 $sql="update fiche_def_ref set frd_text='". +00120 $this->frd_text."' , frd_class_base='".$this->frd_class_base."'". +00121 " where frd_id=".$this->frd_id; +00122 $Res=ExecSql($this->db,$sql); +00123 } +00131 function Get() +00132 { +00133 $sql="select * from fiche_def_ref ". +00134 " where frd_id=".$this->frd_id; +00135 $Res=ExecSql($this->db,$sql); +00136 if ( pg_NumRows($Res) == 0 ) return null; +00137 $r=pg_fetch_array($Res,0); +00138 $this->frd_text=$r['frd_text']; +00139 $this->frd_class_base=$r['frd_class_base']; +00140 } +00141 +00142 } +00143 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__fiche__def_8php.html b/doc/developper/html/class__fiche__def_8php.html index 8b9b2a155..814cb93c0 100644 --- a/doc/developper/html/class__fiche__def_8php.html +++ b/doc/developper/html/class__fiche__def_8php.html @@ -4,18 +4,26 @@ - + -

class_fiche_def.php File Reference

+

class_fiche_def.php File Reference

fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref More... +

+

Go to the source code of this file. +

Data Structures

class  fiche_def_ref
 fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref +

+ +

+Definition in file class_fiche_def.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__invoice_8php-source.html b/doc/developper/html/class__invoice_8php-source.html index d3b537313..a1de1b221 100644 --- a/doc/developper/html/class__invoice_8php-source.html +++ b/doc/developper/html/class__invoice_8php-source.html @@ -4,7 +4,7 @@ - +

class_invoice.php

Go to the documentation of this file.
00001 <?
@@ -27,129 +27,128 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 class Invoice {
-00022         var $cn;        // database conx
-00023         var $id;        // iv_id
-00024         var $template;  // template's name
-00025 
-00026         //Constructor parameter = database connexion
-00027         function Invoice($p_cn) {
-00028                 $this->cn=$p_cn;        
-00029         }
-00030         // show the stored invoice template
-00031         function myList() { 
-00032                 $sql="select iv_id,iv_name from invoice";
-00033                 $Res=ExecSql($this->cn,$sql);
-00034                 $all=pg_fetch_all($Res);
-00035                 if ( pg_NumRows($Res) == 0 ) return "";
-00036                 foreach ( $all as $row) {
-00037                         var_dump($row);
-00038                 } 
-00039         }
-00040         // Save a template in the database
-00041         function Save() {
-00042         // Values are in $_POST
-00043         StartSql($this->cn);
-00044         // Save data into the table invoice
-00045 
-00046         // Save the file
-00047         $new_name=tempnam('/tmp','invoice_');
-00048         echo_debug('class_invoice.php',__LINE__,"new name=".$new_name);
-00049         if ( strlen ($_FILES['pj']['tmp_name']) != 0 ) 
-00050                 {
-00051                 if (move_uploaded_file($_FILES['invoice']['tmp_name'],
-00052                                         $new_name)) 
-00053                         {
-00054                         // echo "Image saved";
-00055                         $oid= pg_lo_import($this->cn,$new_name);
-00056                         if ( $oid == false ) 
-00057                         {
-00058                         echo_error('class_invoice.php',__LINE__,"cannot upload document");
-00059                         Rollback($cn);
-00060                         return;
-00061                         }
-00062                         echo_debug('class_invoice.php',__LINE__,"Loading document");
-00063                         // Remove old document
-00064                         $ret=ExecSql($this->cn,"select iv_file from invoice where iv_id=".$this->id);
-00065                         if (pg_num_rows($ret) != 0) 
+00030 class Invoice {
+00031   var $cn;          
+00032   var $id;          
+00033   var $template;    
+00035         //Constructor parameter = database connexion
+00036         function Invoice($p_cn) {
+00037                 $this->cn=$p_cn;        
+00038         }
+00039         // show the stored invoice template
+00040         function myList() { 
+00041                 $sql="select iv_id,iv_name from invoice";
+00042                 $Res=ExecSql($this->cn,$sql);
+00043                 $all=pg_fetch_all($Res);
+00044                 if ( pg_NumRows($Res) == 0 ) return "";
+00045                 foreach ( $all as $row) {
+00046                         var_dump($row);
+00047                 } 
+00048         }
+00049         // Save a template in the database
+00050         function Save() {
+00051         // Values are in $_POST
+00052         StartSql($this->cn);
+00053         // Save data into the table invoice
+00054 
+00055         // Save the file
+00056         $new_name=tempnam('/tmp','invoice_');
+00057         echo_debug('class_invoice.php',__LINE__,"new name=".$new_name);
+00058         if ( strlen ($_FILES['pj']['tmp_name']) != 0 ) 
+00059                 {
+00060                 if (move_uploaded_file($_FILES['invoice']['tmp_name'],
+00061                                         $new_name)) 
+00062                         {
+00063                         // echo "Image saved";
+00064                         $oid= pg_lo_import($this->cn,$new_name);
+00065                         if ( $oid == false ) 
 00066                         {
-00067                                 $r=pg_fetch_array($ret,0);
-00068                                 $old_oid=$r['iv_file'];
-00069                                 if (strlen($old_oid) != 0) 
-00070                                         pg_lo_unlink($this->cn,$old_oid);
-00071                         }
-00072                                 // Load new document
-00073                                 ExecSql($this->cn,"update invoice set iv_file where iv_id=".$this->id);
-00074                 }
-00075                 else 
-00076                 {
-00077                         echo "<H1>Error</H1>";
-00078                         Rollback($this->cn);
-00079                         exit;
-00080                 }
-00081         }
-00082         }
-00083         // Remove a template 
-00084         function Delete() {
-00085         }
-00086         // return the string containing the form for
-00087         // adding a template
-00088         function FormAdd() {
-00089                 $r="";
-00090                 $r='<FORM METHOD="POST" ACTION="dossier_prefs.php">';
-00091                 $r.="</FORM>";
-00092                 return $r;
-00093         }
-00094         // return the string containing the form for
-00095         // removing a template
-00096         function FormDelete() {
-00097         }
-00098         // Parse and remplace the tag in the invoice 
-00099         // By the value found in quant_sold
-00100         // p_id is the id of the invoice
-00101         // p_internal reference (quant_sold qs_internal)
-00102         function Get($p_id,$p_internal) 
-00103         {
-00104         // retrieve info from the table invoice
-00105                 
-00106         // retrieve the template and generate document
-00107                 StartSql($this->cn);
-00108                 $ret=ExecSql($cn,"select iv_name,iv_file from invoice where iv_id".$this->iv_id);
-00109                 if ( pg_num_rows ($ret) == 0 )
-00110                         return;
-00111                 $row=pg_fetch_array($ret,0);
-00112                 //the template is saved into file $tmp
-00113                 $tmp=tempnam('/tmp/','invoice_');
-00114                 pg_lo_export($cn,$row['iv_file'],$tmp);
-00115                 // Parse the file 
-00116 
-00117 
-00118 
-00119 
-00120                 // send it to stdout
-00121                 ini_set('zlib.output_compression','Off');
-00122                 header("Pragma: public");
-00123                 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
-00124                 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
-00125                 header("Cache-Control: must-revalidate");
-00126                 header('Content-type: rtf/x-application');
-00127                 header('Content-Disposition: attachment;filename="invoice'.$p_internal.'.rtf"',FALSE);
-00128                 header("Accept-Ranges: bytes");
-00129                 $file=fopen($tmp,'r');
-00130                 while ( !feof ($file) )
-00131                 {
-00132                         echo fread($file,8192);
-00133                 }
-00134                 fclose($file);
-00135                 
-00136                 unlink ($tmp);
-00137                 
-00138                 Commit($cn);
-00139 
-00140         }
-00141 }
-00142 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00067 echo_error('class_invoice.php',__LINE__,"cannot upload document"); +00068 Rollback($cn); +00069 return; +00070 } +00071 echo_debug('class_invoice.php',__LINE__,"Loading document"); +00072 // Remove old document +00073 $ret=ExecSql($this->cn,"select iv_file from invoice where iv_id=".$this->id); +00074 if (pg_num_rows($ret) != 0) +00075 { +00076 $r=pg_fetch_array($ret,0); +00077 $old_oid=$r['iv_file']; +00078 if (strlen($old_oid) != 0) +00079 pg_lo_unlink($this->cn,$old_oid); +00080 } +00081 // Load new document +00082 ExecSql($this->cn,"update invoice set iv_file where iv_id=".$this->id); +00083 } +00084 else +00085 { +00086 echo "<H1>Error</H1>"; +00087 Rollback($this->cn); +00088 exit; +00089 } +00090 } +00091 } +00092 // Remove a template +00093 function Delete() { +00094 } +00095 // return the string containing the form for +00096 // adding a template +00097 function FormAdd() { +00098 $r=""; +00099 $r='<FORM METHOD="POST" ACTION="dossier_prefs.php">'; +00100 $r.="</FORM>"; +00101 return $r; +00102 } +00103 // return the string containing the form for +00104 // removing a template +00105 function FormDelete() { +00106 } +00107 // Parse and remplace the tag in the invoice +00108 // By the value found in quant_sold +00109 // p_id is the id of the invoice +00110 // p_internal reference (quant_sold qs_internal) +00111 function Get($p_id,$p_internal) +00112 { +00113 // retrieve info from the table invoice +00114 +00115 // retrieve the template and generate document +00116 StartSql($this->cn); +00117 $ret=ExecSql($cn,"select iv_name,iv_file from invoice where iv_id".$this->iv_id); +00118 if ( pg_num_rows ($ret) == 0 ) +00119 return; +00120 $row=pg_fetch_array($ret,0); +00121 //the template is saved into file $tmp +00122 $tmp=tempnam('/tmp/','invoice_'); +00123 pg_lo_export($cn,$row['iv_file'],$tmp); +00124 // Parse the file +00125 +00126 +00127 +00128 +00129 // send it to stdout +00130 ini_set('zlib.output_compression','Off'); +00131 header("Pragma: public"); +00132 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +00133 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); +00134 header("Cache-Control: must-revalidate"); +00135 header('Content-type: rtf/x-application'); +00136 header('Content-Disposition: attachment;filename="invoice'.$p_internal.'.rtf"',FALSE); +00137 header("Accept-Ranges: bytes"); +00138 $file=fopen($tmp,'r'); +00139 while ( !feof ($file) ) +00140 { +00141 echo fread($file,8192); +00142 } +00143 fclose($file); +00144 +00145 unlink ($tmp); +00146 +00147 Commit($cn); +00148 +00149 } +00150 } +00151 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__invoice_8php.html b/doc/developper/html/class__invoice_8php.html index df9ea8219..bd7a192c9 100644 --- a/doc/developper/html/class__invoice_8php.html +++ b/doc/developper/html/class__invoice_8php.html @@ -4,18 +4,27 @@ - + -

class_invoice.php File Reference

+

class_invoice.php File Reference

Class invoice to manage the customer invoice. More... +

+

Go to the source code of this file. +

Data Structures

class  Invoice
 Class invoice to manage the customer invoice. More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+Class invoice to manage the customer invoice. +

+

Todo:
obsolete ? then delete it
+ +

+Definition in file class_invoice.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__jrn_8php-source.html b/doc/developper/html/class__jrn_8php-source.html index 39c1cbbf1..bf0628ed0 100644 --- a/doc/developper/html/class__jrn_8php-source.html +++ b/doc/developper/html/class__jrn_8php-source.html @@ -4,7 +4,7 @@ - +

class_jrn.php

Go to the documentation of this file.
00001 <?
@@ -27,299 +27,277 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 
-00022 class jrn {
-00023   var $id;
-00024   var $name;
-00025   var $db;
-00026   var $row;
-00027   function jrn ($p_cn,$p_id){
-00028     $this->id=$p_id;
-00029     $this->db=$p_cn;
-00030     $this->row=null;
-00031   }
-00032   function GetName() {
-00033     if ( $this->id==0 ) {
-00034       $this->name=" Grand Livre ";
-00035       return $this->name;
-00036     }
-00037 
-00038     $Res=ExecSql($this->db,"select jrn_def_name from ".
-00039                " jrn_def where jrn_def_id=".
-00040                $this->id);
-00041     $Max=pg_NumRows($Res);
-00042     if ($Max==0) return null;
-00043     $ret=pg_fetch_array($Res,0);
-00044     $this->name=$ret['jrn_def_name'];
-00045     return $ret['jrn_def_name'];
-00046   }
-00047 
-00048 /* function GetRow
-00049  * Purpose : Get The data 
-00050  * 
-00051  * parm : 
-00052  *      - connection
-00053  *      - array
-00054  *      - p_limit starting line
-00055  *      - p_offset number of lines
-00056  *
-00057  * gen :
-00058  *      - none
-00059  * return:
-00060  *      - Array with the asked data
-00061  *
-00062  */ 
-00063   function GetRow($p_from,$p_to,$cent='off',$p_limit=-1,$p_offset=-1) {
-00064 
-00065   echo_debug('class_jrn.php',__LINE__,"GetRow ( $p_from,$p_to,$cent,$p_limit,$p_offset)");
+00024 class jrn {
+00025   var $id;
+00026   var $name;
+00027   var $db;
+00028   var $row;
+00029   function jrn ($p_cn,$p_id){
+00030     $this->id=$p_id;
+00031     $this->db=$p_cn;
+00032     $this->row=null;
+00033   }
+00034   function GetName() {
+00035     if ( $this->id==0 ) {
+00036       $this->name=" Grand Livre ";
+00037       return $this->name;
+00038     }
+00039 
+00040     $Res=ExecSql($this->db,"select jrn_def_name from ".
+00041                " jrn_def where jrn_def_id=".
+00042                $this->id);
+00043     $Max=pg_NumRows($Res);
+00044     if ($Max==0) return null;
+00045     $ret=pg_fetch_array($Res,0);
+00046     $this->name=$ret['jrn_def_name'];
+00047     return $ret['jrn_def_name'];
+00048   }
+00049 
+00065   function GetRow($p_from,$p_to,$cent='off',$p_limit=-1,$p_offset=-1) {
 00066 
-00067     if ( $p_from == $p_to ) 
-00068       $periode=" jr_tech_per = $p_from ";
-00069     else
-00070       $periode = "(jr_tech_per >= $p_from and jr_tech_per <= $p_to) ";
-00071     $cond_limite=($p_limit!=-1)?" limit ".$p_limit." offset ".$p_offset:"";
-00072 
-00073     // Grand livre == 0
-00074     if ( $this->id != 0 ) {
-00075 
-00076       if ( $cent=='off' ) {
-00077         echo_debug('class_jrn.php',__LINE__,"journaux non  centralisé");
-00078         // Journaux non centralisés
-00079         $Res=ExecSql($this->db,"select j_id,j_id as int_j_id,to_char(j_date,'DD.MM.YYYY') as j_date,
-00080                       jr_internal,
-00081                 case j_debit when 't' then j_montant::text else '   ' end as deb_montant,
-00082                 case j_debit when 'f' then j_montant::text else '   ' end as cred_montant,
-00083                 j_debit as debit,j_poste as poste,jr_montant , ".
-00084                "pcm_lib as description,j_grpt as grp,jr_comment||' ('||jr_internal||')' as jr_comment ,
-00085                 jr_rapt as oc, j_tech_per as periode from jrnx left join jrn on ".
-00086                  "jr_grpt_id=j_grpt ".
-00087                  " left join tmp_pcmn on pcm_val=j_poste ".
-00088                  " where j_jrn_def=".$this->id.
-00089                " and ".$periode." order by j_date::date asc,jr_internal,j_debit desc ".
-00090                  $cond_limite);
-00091     }else {
-00092       // Journaux centralisés
-00093       echo_debug('class_jrn.php',__LINE__,"journaux centralisé");
-00094       $Sql="select jr_opid as j_id,
-00095                     c_order as int_j_id,
-00096             to_char (c_date,'DD.MM.YYYY') as j_date ,
-00097             c_internal as jr_internal,
-00098             case c_debit when 't' then c_montant::text else '   ' end as deb_montant,
-00099             case c_debit when 'f' then c_montant::text else '   ' end as cred_montant,
-00100             c_debit as j_debit,
-00101             c_poste as poste,
-00102             pcm_lib as description,
-00103             jr_comment||' ('||c_internal||')' as jr_comment,
-00104             jr_montant,
-00105             c_grp as grp,
-00106             c_comment as comment,
-00107             c_rapt as oc,
-00108             c_periode as periode 
-00109             from centralized left join jrn on ".
-00110                 "jr_grpt_id=c_grp left join tmp_pcmn on pcm_val=c_poste where ".
-00111                 " c_jrn_def=".$this->id." and ".
-00112                 $periode." order by c_order ";
-00113       $Res=ExecSql($this->db,$Sql.$cond_limite);
-00114 
-00115     }
-00116   } else {
-00117     // Grand Livre
-00118     if ( $cent == 'off') {
-00119       echo_debug('class_jrn.php',__LINE__,"Grand livre non centralisé");
-00120       // Non centralisé
-00121       $Res=ExecSql($this->db,"select j_id,j_id as int_j_id,to_char(j_date,'DD.MM.YYYY') as j_date,
-00122                       jr_internal,
-00123                 case j_debit when 't' then j_montant::text else '   ' end as deb_montant,
-00124                 case j_debit when 'f' then j_montant::text else '   ' end as cred_montant,
-00125                 j_debit as debit,j_poste as poste,".
-00126                "pcm_lib as description,j_grpt as grp,
-00127                 jr_comment||' ('||jr_internal||')' as jr_comment,
-00128                 jr_montant,
-00129                 jr_rapt as oc, j_tech_per as periode from jrnx left join jrn on ".
-00130                  "jr_grpt_id=j_grpt left join tmp_pcmn on pcm_val=j_poste where ".
-00131                "  ".$periode." order by j_date::date,j_grpt,j_debit desc   ".
-00132                $cond_limite);
-00133 
-00134     } else {
-00135       echo_debug('class_jrn.php',__LINE__,"Grand livre  centralisé");
-00136       // Centralisé
-00137       $Sql="select jr_c_opid as j_id,
-00138                    c_order as int_j_id,
-00139 
-00140             c_j_id,
-00141             to_char (c_date,'DD.MM.YYYY') as j_date ,
-00142             c_internal as jr_internal,
-00143             case c_debit when 't' then c_montant::text else '   ' end as deb_montant,
-00144             case c_debit when 'f' then c_montant::text else '   ' end as cred_montant,
-00145             c_debit as j_debit,
-00146             c_poste as poste,
-00147             pcm_lib as description,
-00148             jr_comment||' ('||c_internal||')' as jr_comment,
-00149             jr_montant,
-00150             c_grp as grp,
-00151             c_comment||' ('||c_internal||')' as comment,
-00152             c_rapt as oc,
-00153             c_periode as periode 
-00154             from centralized left join jrn on ".
-00155                 "jr_grpt_id=c_grp left join tmp_pcmn on pcm_val=c_poste where ".
-00156                 $periode." order by c_order ";
-00157     $Res=ExecSql($this->db,$Sql.$cond_limite);
-00158     } // Grand Livre
-00159   }
-00160 
-00161 
-00162   $array=array();
-00163   $Max=pg_NumRows($Res);
-00164   if ($Max==0) return null;
-00165   $case="";
-00166   $tot_deb=0;
-00167   $tot_cred=0;
-00168   for ($i=0;$i<$Max;$i++) {
-00169     $line=pg_fetch_array($Res,$i);
-00170     $mont_deb=($line['deb_montant']!=0)?sprintf("% 8.2f",$line['deb_montant']):"";
-00171     $mont_cred=($line['cred_montant']!=0)?sprintf("% 8.2f",$line['cred_montant']):"";
-00172     $jr_montant=($line['jr_montant']!=0)?sprintf("% 8.2f",$line['jr_montant']):"";
-00173     $tot_deb+=$line['deb_montant'];
-00174     $tot_cred+=$line['cred_montant'];
-00175     echo_debug('class_jrn.php',__LINE__," GetRow : mont_Deb ".$mont_deb);
-00176     echo_debug('class_jrn.php',__LINE__," GetRow : mont_cred ".$mont_cred);
-00177 
-00178     if ( $case != $line['grp'] ) {
-00179       $case=$line['grp'];
-00180       $array[]=array (
-00181                       'int_j_id' => $line['int_j_id'],
-00182                       'j_id'=>$line['j_id'],
-00183                       'j_date' => $line['j_date'],
-00184                       'internal'=>$line['jr_internal'],
-00185                       'deb_montant'=>'',
-00186                       'cred_montant'=>'<b><i>'.$jr_montant.'</i></b>',
-00187                       'description'=>'<b><i>'.$line['jr_comment'].'</i></b>',
-00188                       'poste' => $line['oc'],
-00189                       'periode' =>$line['periode'] );
-00190 
-00191       $array[]=array (
-00192                       'int_j_id' => $line['int_j_id'],
-00193                       'j_id'=>'', 
-00194                       'j_date' => '',
-00195                       'internal'=>'',
-00196                       'deb_montant'=>$mont_deb,
-00197                       'cred_montant'=>$mont_cred,
-00198                       'description'=>$line['description'],
-00199                       'poste' => $line['poste'],
-00200                       'periode' => $line['periode']
-00201                       );
-00202     
-00203     }else {
-00204       $array[]=array (
-00205                       'int_j_id' => $line['int_j_id'],
-00206                       'j_id'=>'',
-00207                       'j_date' => '',
-00208                       'internal'=>'',
-00209                       'deb_montant'=>$mont_deb,
-00210                       'cred_montant'=>$mont_cred,
-00211                       'description'=>$line['description'],
-00212                       'poste' => $line['poste'],
-00213                       'periode' => $line['periode']);
-00214 
-00215     }
-00216       
-00217 
-00218   }
-00219   echo_debug('class_jrn.php',__LINE__,"Total debit $tot_deb,credit $tot_cred");
-00220   $this->row=$array;
-00221   $a=array($array,$tot_deb,$tot_cred);
-00222   return $a;
-00223   }
-00224  /* function GetRowSimple
-00225  **************************************************
-00226  * Purpose : Get simplified row
-00227  *        
-00228  * parm : 
-00229  *      - connection
-00230  *      - array
-00231  *      - p_limit starting line
-00232  *      - p_offset number of lines
-00233  *
-00234  * gen :
-00235  *      - none
-00236  * return:
-00237  *      - Array with the asked data
-00238  *
-00239  */ 
-00240 
-00241   function GetRowSimple($p_from,$p_to,$cent='off',$p_limit=-1,$p_offset=-1) 
-00242   {
-00243     
-00244     echo_debug('class_jrn.php',__LINE__,"GetRowSimple ( $p_from,$p_to,$cent,$p_limit,$p_offset)");
-00245     // Periode check
-00246     //---
-00247     if ( $p_from == $p_to ) 
-00248       $periode=" jr_tech_per = $p_from ";
-00249     else
-00250       $periode = "(jr_tech_per >= $p_from and jr_tech_per <= $p_to) ";
-00251     $cond_limite=($p_limit!=-1)?" limit ".$p_limit." offset ".$p_offset:"";
-00252     // Grand-livre : id= 0
-00253     //---
-00254     $jrn=($this->id == 0 )?"":"and jrn_def_id = ".$this->id;
-00255     // Non Centralise si cent=off
-00256     //--
-00257     if ($cent=='off') 
-00258       {// Non centralisé
-00259         //---
-00260         $sql=" 
-00261     SELECT jrn.jr_id as jr_id ,
-00262            jrn.jr_id as num , 
-00263            jrn.jr_def_id as jr_def_id, 
-00264            jrn.jr_montant as montant, 
-00265            jrn.jr_comment as comment, 
-00266            to_char(jrn.jr_date,'DD-MM-YYYY') as date, 
-00267            jr_internal,
-00268            jrn.jr_grpt_id as grpt_id, 
-00269            jrn.jr_pj_name as pj,
-00270             jrn_def_type
-00271    FROM jrn join jrn_def on (jrn_def_id=jr_def_id)
-00272 where $periode $jrn order by jr_date";
-00273 
-00274 
-00275         
-00276       } 
-00277     else 
-00278       {
-00279         //Centralisé
-00280         //---
-00281         $id=($this->id == 0 ) ?"jr_c_opid as num":"jr_opid as num";
-00282         $sql="
-00283     SELECT jrn.jr_id as jr_id ,
-00284            $id , 
-00285            jrn.jr_def_id as jr_def_id, 
-00286            jrn.jr_montant as montant, 
-00287            jrn.jr_comment as comment, 
-00288            to_char(jrn.jr_date,'DD-MM-YYYY') as date, 
-00289            jr_internal,
-00290            jrn.jr_grpt_id as grpt_id, 
-00291            jrn.jr_pj_name as pj,
-00292             jrn_def_type
-00293    FROM jrn join jrn_def on (jrn_def_id=jr_def_id)
-00294        where 
-00295          $periode $jrn and 
-00296          jr_opid is not null
-00297          order by jr_date";
-00298       }// end else $cent=='off'
-00299     //load all data into an array
-00300     //---
-00301     $Res=ExecSql($this->db,$sql);
-00302     if ( pg_NumRows($Res) == 0 ) 
-00303       {
-00304         return null;
-00305       } 
-00306 
-00307 
-00308     $array=pg_fetch_all($Res); 
+00067   echo_debug('class_jrn.php',__LINE__,"GetRow ( $p_from,$p_to,$cent,$p_limit,$p_offset)");
+00068 
+00069     if ( $p_from == $p_to ) 
+00070       $periode=" jr_tech_per = $p_from ";
+00071     else
+00072       $periode = "(jr_tech_per >= $p_from and jr_tech_per <= $p_to) ";
+00073     $cond_limite=($p_limit!=-1)?" limit ".$p_limit." offset ".$p_offset:"";
+00074 
+00075     // Grand livre == 0
+00076     if ( $this->id != 0 ) {
+00077 
+00078       if ( $cent=='off' ) {
+00079         echo_debug('class_jrn.php',__LINE__,"journaux non  centralisé");
+00080         // Journaux non centralisés
+00081         $Res=ExecSql($this->db,"select j_id,j_id as int_j_id,to_char(j_date,'DD.MM.YYYY') as j_date,
+00082                       jr_internal,
+00083                 case j_debit when 't' then j_montant::text else '   ' end as deb_montant,
+00084                 case j_debit when 'f' then j_montant::text else '   ' end as cred_montant,
+00085                 j_debit as debit,j_poste as poste,jr_montant , ".
+00086                "pcm_lib as description,j_grpt as grp,jr_comment||' ('||jr_internal||')' as jr_comment ,
+00087                 jr_rapt as oc, j_tech_per as periode from jrnx left join jrn on ".
+00088                  "jr_grpt_id=j_grpt ".
+00089                  " left join tmp_pcmn on pcm_val=j_poste ".
+00090                  " where j_jrn_def=".$this->id.
+00091                " and ".$periode." order by j_date::date asc,jr_internal,j_debit desc ".
+00092                  $cond_limite);
+00093     }else {
+00094       // Journaux centralisés
+00095       echo_debug('class_jrn.php',__LINE__,"journaux centralisé");
+00096       $Sql="select jr_opid as j_id,
+00097                     c_order as int_j_id,
+00098             to_char (c_date,'DD.MM.YYYY') as j_date ,
+00099             c_internal as jr_internal,
+00100             case c_debit when 't' then c_montant::text else '   ' end as deb_montant,
+00101             case c_debit when 'f' then c_montant::text else '   ' end as cred_montant,
+00102             c_debit as j_debit,
+00103             c_poste as poste,
+00104             pcm_lib as description,
+00105             jr_comment||' ('||c_internal||')' as jr_comment,
+00106             jr_montant,
+00107             c_grp as grp,
+00108             c_comment as comment,
+00109             c_rapt as oc,
+00110             c_periode as periode 
+00111             from centralized left join jrn on ".
+00112                 "jr_grpt_id=c_grp left join tmp_pcmn on pcm_val=c_poste where ".
+00113                 " c_jrn_def=".$this->id." and ".
+00114                 $periode." order by c_order ";
+00115       $Res=ExecSql($this->db,$Sql.$cond_limite);
+00116 
+00117     }
+00118   } else {
+00119     // Grand Livre
+00120     if ( $cent == 'off') {
+00121       echo_debug('class_jrn.php',__LINE__,"Grand livre non centralisé");
+00122       // Non centralisé
+00123       $Res=ExecSql($this->db,"select j_id,j_id as int_j_id,to_char(j_date,'DD.MM.YYYY') as j_date,
+00124                       jr_internal,
+00125                 case j_debit when 't' then j_montant::text else '   ' end as deb_montant,
+00126                 case j_debit when 'f' then j_montant::text else '   ' end as cred_montant,
+00127                 j_debit as debit,j_poste as poste,".
+00128                "pcm_lib as description,j_grpt as grp,
+00129                 jr_comment||' ('||jr_internal||')' as jr_comment,
+00130                 jr_montant,
+00131                 jr_rapt as oc, j_tech_per as periode from jrnx left join jrn on ".
+00132                  "jr_grpt_id=j_grpt left join tmp_pcmn on pcm_val=j_poste where ".
+00133                "  ".$periode." order by j_date::date,j_grpt,j_debit desc   ".
+00134                $cond_limite);
+00135 
+00136     } else {
+00137       echo_debug('class_jrn.php',__LINE__,"Grand livre  centralisé");
+00138       // Centralisé
+00139       $Sql="select jr_c_opid as j_id,
+00140                    c_order as int_j_id,
+00141 
+00142             c_j_id,
+00143             to_char (c_date,'DD.MM.YYYY') as j_date ,
+00144             c_internal as jr_internal,
+00145             case c_debit when 't' then c_montant::text else '   ' end as deb_montant,
+00146             case c_debit when 'f' then c_montant::text else '   ' end as cred_montant,
+00147             c_debit as j_debit,
+00148             c_poste as poste,
+00149             pcm_lib as description,
+00150             jr_comment||' ('||c_internal||')' as jr_comment,
+00151             jr_montant,
+00152             c_grp as grp,
+00153             c_comment||' ('||c_internal||')' as comment,
+00154             c_rapt as oc,
+00155             c_periode as periode 
+00156             from centralized left join jrn on ".
+00157                 "jr_grpt_id=c_grp left join tmp_pcmn on pcm_val=c_poste where ".
+00158                 $periode." order by c_order ";
+00159     $Res=ExecSql($this->db,$Sql.$cond_limite);
+00160     } // Grand Livre
+00161   }
+00162 
+00163 
+00164   $array=array();
+00165   $Max=pg_NumRows($Res);
+00166   if ($Max==0) return null;
+00167   $case="";
+00168   $tot_deb=0;
+00169   $tot_cred=0;
+00170   for ($i=0;$i<$Max;$i++) {
+00171     $line=pg_fetch_array($Res,$i);
+00172     $mont_deb=($line['deb_montant']!=0)?sprintf("% 8.2f",$line['deb_montant']):"";
+00173     $mont_cred=($line['cred_montant']!=0)?sprintf("% 8.2f",$line['cred_montant']):"";
+00174     $jr_montant=($line['jr_montant']!=0)?sprintf("% 8.2f",$line['jr_montant']):"";
+00175     $tot_deb+=$line['deb_montant'];
+00176     $tot_cred+=$line['cred_montant'];
+00177     echo_debug('class_jrn.php',__LINE__," GetRow : mont_Deb ".$mont_deb);
+00178     echo_debug('class_jrn.php',__LINE__," GetRow : mont_cred ".$mont_cred);
+00179 
+00180     if ( $case != $line['grp'] ) {
+00181       $case=$line['grp'];
+00182       $array[]=array (
+00183                       'int_j_id' => $line['int_j_id'],
+00184                       'j_id'=>$line['j_id'],
+00185                       'j_date' => $line['j_date'],
+00186                       'internal'=>$line['jr_internal'],
+00187                       'deb_montant'=>'',
+00188                       'cred_montant'=>'<b><i>'.$jr_montant.'</i></b>',
+00189                       'description'=>'<b><i>'.$line['jr_comment'].'</i></b>',
+00190                       'poste' => $line['oc'],
+00191                       'periode' =>$line['periode'] );
+00192 
+00193       $array[]=array (
+00194                       'int_j_id' => $line['int_j_id'],
+00195                       'j_id'=>'', 
+00196                       'j_date' => '',
+00197                       'internal'=>'',
+00198                       'deb_montant'=>$mont_deb,
+00199                       'cred_montant'=>$mont_cred,
+00200                       'description'=>$line['description'],
+00201                       'poste' => $line['poste'],
+00202                       'periode' => $line['periode']
+00203                       );
+00204     
+00205     }else {
+00206       $array[]=array (
+00207                       'int_j_id' => $line['int_j_id'],
+00208                       'j_id'=>'',
+00209                       'j_date' => '',
+00210                       'internal'=>'',
+00211                       'deb_montant'=>$mont_deb,
+00212                       'cred_montant'=>$mont_cred,
+00213                       'description'=>$line['description'],
+00214                       'poste' => $line['poste'],
+00215                       'periode' => $line['periode']);
+00216 
+00217     }
+00218       
+00219 
+00220   }
+00221   echo_debug('class_jrn.php',__LINE__,"Total debit $tot_deb,credit $tot_cred");
+00222   $this->row=$array;
+00223   $a=array($array,$tot_deb,$tot_cred);
+00224   return $a;
+00225   }
+00243   function GetRowSimple($p_from,$p_to,$cent='off',$p_limit=-1,$p_offset=-1) 
+00244   {
+00245     
+00246     echo_debug('class_jrn.php',__LINE__,"GetRowSimple ( $p_from,$p_to,$cent,$p_limit,$p_offset)");
+00247     // Periode check
+00248     //---
+00249     if ( $p_from == $p_to ) 
+00250       $periode=" jr_tech_per = $p_from ";
+00251     else
+00252       $periode = "(jr_tech_per >= $p_from and jr_tech_per <= $p_to) ";
+00253     $cond_limite=($p_limit!=-1)?" limit ".$p_limit." offset ".$p_offset:"";
+00254     // Grand-livre : id= 0
+00255     //---
+00256     $jrn=($this->id == 0 )?"":"and jrn_def_id = ".$this->id;
+00257     // Non Centralise si cent=off
+00258     //--
+00259     if ($cent=='off') 
+00260       {// Non centralisé
+00261         //---
+00262         $sql=" 
+00263     SELECT jrn.jr_id as jr_id ,
+00264            jrn.jr_id as num , 
+00265            jrn.jr_def_id as jr_def_id, 
+00266            jrn.jr_montant as montant, 
+00267            jrn.jr_comment as comment, 
+00268            to_char(jrn.jr_date,'DD-MM-YYYY') as date, 
+00269            jr_internal,
+00270            jrn.jr_grpt_id as grpt_id, 
+00271            jrn.jr_pj_name as pj,
+00272             jrn_def_type
+00273    FROM jrn join jrn_def on (jrn_def_id=jr_def_id)
+00274 where $periode $jrn order by jr_date";
+00275 
+00276 
+00277         
+00278       } 
+00279     else 
+00280       {
+00281         //Centralisé
+00282         //---
+00283         $id=($this->id == 0 ) ?"jr_c_opid as num":"jr_opid as num";
+00284         $sql="
+00285     SELECT jrn.jr_id as jr_id ,
+00286            $id , 
+00287            jrn.jr_def_id as jr_def_id, 
+00288            jrn.jr_montant as montant, 
+00289            jrn.jr_comment as comment, 
+00290            to_char(jrn.jr_date,'DD-MM-YYYY') as date, 
+00291            jr_internal,
+00292            jrn.jr_grpt_id as grpt_id, 
+00293            jrn.jr_pj_name as pj,
+00294             jrn_def_type
+00295    FROM jrn join jrn_def on (jrn_def_id=jr_def_id)
+00296        where 
+00297          $periode $jrn and 
+00298          jr_opid is not null
+00299          order by jr_date";
+00300       }// end else $cent=='off'
+00301     //load all data into an array
+00302     //---
+00303     $Res=ExecSql($this->db,$sql);
+00304     if ( pg_NumRows($Res) == 0 ) 
+00305       {
+00306         return null;
+00307       } 
+00308 
 00309 
-00310     return $array;  
-00311   }// end function GetRowSimple
-00312 }
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00310 $array=pg_fetch_all($Res); +00311 +00312 return $array; +00313 }// end function GetRowSimple +00314 +00321 function GetDefLine($p_cred) +00322 { +00323 $sql_cred=($p_cred=='cred')?'jrn_cred_max_line':'jrn_deb_max_line'; +00324 $sql="select $sql_cred as value from jrn_def where jrn_def_id=".$this->id; +00325 $r=ExecSql($this->db,$sql); +00326 $Res=pg_fetch_all($r); +00327 echo_debug('class_jrn',__LINE__,$Res); +00328 if ( sizeof($Res) == 0 ) return 1; +00329 return $Res[0]['value']; +00330 } +00331 } +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__jrn_8php.html b/doc/developper/html/class__jrn_8php.html index 6499a9924..2ce4d97e4 100644 --- a/doc/developper/html/class__jrn_8php.html +++ b/doc/developper/html/class__jrn_8php.html @@ -4,7 +4,7 @@ - +

class_jrn.php File Reference

@@ -14,8 +14,9 @@

Data Structures

class  jrn + Class for jrn. More...
-
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__operation_8php-source.html b/doc/developper/html/class__operation_8php-source.html index 0e50fe3f1..08b614098 100644 --- a/doc/developper/html/class__operation_8php-source.html +++ b/doc/developper/html/class__operation_8php-source.html @@ -4,7 +4,7 @@ - +

class_operation.php

Go to the documentation of this file.
00001 <?
@@ -27,98 +27,98 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 
-00023 // If print is asked
-00024 // First time in html
-00025 // after in pdf or cvs
-00027 if ( isset( $_POST['bt_html'] ) ) {
-00028 include("jrn.php");
-00029  $p_cent=( isset ( $_POST['cent']) )?'on':'off';
-00030   // $POST=from_periode, to_periode, jrn_id, cent
-00031   echo_debug('class_operation.php',__LINE__," jrn sql = $sql");
-00032   $Jrn=new jrn($cn,$_POST['jrn_id']);
-00033   $Jrn->GetName();
-00034   $Jrn->GetRow( $_POST['from_periode'],
-00035                 $_POST['to_periode'],
-00036                 $p_cent);
-00037   foreach ($Jrn->row as $op) {
-00038     $a=new operation ($cn,$op);
-00039     $a->cent=$p_cent;
-00040 
-00041 
-00042   }
-00043 
-00044  }
+00026 
+00027 // If print is asked
+00028 // First time in html
+00029 // after in pdf or cvs
+00031 if ( isset( $_POST['bt_html'] ) ) {
+00032 include("jrn.php");
+00033  $p_cent=( isset ( $_POST['cent']) )?'on':'off';
+00034   // $POST=from_periode, to_periode, jrn_id, cent
+00035   echo_debug('class_operation.php',__LINE__," jrn sql = $sql");
+00036   $Jrn=new jrn($cn,$_POST['jrn_id']);
+00037   $Jrn->GetName();
+00038   $Jrn->GetRow( $_POST['from_periode'],
+00039                 $_POST['to_periode'],
+00040                 $p_cent);
+00041   foreach ($Jrn->row as $op) {
+00042     $a=new operation ($cn,$op);
+00043     $a->cent=$p_cent;
+00044 
 00045 
-00047 // Show the jrn and date
-00049 include_once('form_input.php');
-00050 include_once("postgres.php");
-00051 include_once("class_widget.php");
-00052 if ( $User->Admin() ==0) {
-00053   $ret=make_array($cn,"select jrn_def_id,jrn_def_name
-00054                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id
-00055                              join user_sec_jrn on uj_jrn_id=jrn_def_id 
-00056                              where
-00057                              uj_login='$User->id'
-00058                              and uj_priv !='X'
-00059                              ");
-00060     } else {
-00061   $ret=make_array("select jrn_def_id,jrn_def_name
-00062                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id");
-00063 
-00064  } 
-00065 
-00066 //    include_once("check_priv.php");
-00067 // printf ('<TR><TD class="cell"><a class="mtitle"
-00068 //        href="user_impress.php?type=jrn&action=print&p_id=%d">%s</a></TD></TR>',$l_line['jrn_def_id'],$l_line['jrn_def_name']);
+00046   }
+00047 
+00048  }
+00049 
+00051 // Show the jrn and date
+00053 include_once('form_input.php');
+00054 include_once("postgres.php");
+00055 include_once("class_widget.php");
+00056 if ( $User->Admin() ==0) {
+00057   $ret=make_array($cn,"select jrn_def_id,jrn_def_name
+00058                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id
+00059                              join user_sec_jrn on uj_jrn_id=jrn_def_id 
+00060                              where
+00061                              uj_login='$User->id'
+00062                              and uj_priv !='X'
+00063                              ");
+00064     } else {
+00065   $ret=make_array("select jrn_def_id,jrn_def_name
+00066                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id");
+00067 
+00068  } 
 00069 
-00070 // Count the forbidden journaux
-00071     $NoPriv=CountSql($cn,"select jrn_def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv,
-00072                                 jrn_deb_max_line,jrn_cred_max_line
-00073                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id
-00074                              join  user_sec_jrn on uj_jrn_id=jrn_def_id 
-00075                              where  
-00076                              uj_login='$User->id'
-00077                              and uj_priv ='X'
-00078                    ");
-00079     // Pour voir tout les journal ?
-00080     if ( $NoPriv == 0 ) {
-00081       $a=count($ret);
-00082       $all=array('value'=>0,'label'=>'All');
-00083       $ret[$a]=$all;
-00084    }
-00085 if ( count($ret) < 1 ) 
-00086   NoAccess();
-00088 // Form
-00090 echo '<div class="u_redcontent">';
-00091 echo '<FORM ACTION="?type=jrn" METHOD="POST">';
-00092 echo '<TABLE><TR>';
-00093 $w=new widget("select");
-00094 $w->table=1;
-00095 $w->label="Choississez le journal";
-00096 print $w->IOValue("jrn_id",$ret);
-00097 print '</TR>';
-00098 print '<TR>';
-00099 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
-00100 $w->label="Depuis";
-00101 print $w->IOValue('from_periode',$periode_start);
-00102 $w->label=" jusqu'à ";
-00103 $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id");
-00104 print $w->IOValue('to_periode',$periode_end);
-00105 print "</TR><TR>";
-00106 $centralise=new widget("checkbox");
-00107 $centralise->label="Depuis les journaux centralisés";
-00108 $centralise->table=1;
-00109 print $centralise->IOValue('cent');
-00110 
-00111 print "</TR>";
-00112 echo '</TABLE>';
-00113 print $w->Submit('bt_html','Impression');
+00070 //    include_once("check_priv.php");
+00071 // printf ('<TR><TD class="cell"><a class="mtitle"
+00072 //        href="user_impress.php?type=jrn&action=print&p_id=%d">%s</a></TD></TR>',$l_line['jrn_def_id'],$l_line['jrn_def_name']);
+00073 
+00074 // Count the forbidden journaux
+00075     $NoPriv=CountSql($cn,"select jrn_def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv,
+00076                                 jrn_deb_max_line,jrn_cred_max_line
+00077                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id
+00078                              join  user_sec_jrn on uj_jrn_id=jrn_def_id 
+00079                              where  
+00080                              uj_login='$User->id'
+00081                              and uj_priv ='X'
+00082                    ");
+00083     // Pour voir tout les journal ?
+00084     if ( $NoPriv == 0 ) {
+00085       $a=count($ret);
+00086       $all=array('value'=>0,'label'=>'All');
+00087       $ret[$a]=$all;
+00088    }
+00089 if ( count($ret) < 1 ) 
+00090   NoAccess();
+00092 // Form
+00094 echo '<div class="u_redcontent">';
+00095 echo '<FORM ACTION="?type=jrn" METHOD="POST">';
+00096 echo '<TABLE><TR>';
+00097 $w=new widget("select");
+00098 $w->table=1;
+00099 $w->label="Choississez le journal";
+00100 print $w->IOValue("jrn_id",$ret);
+00101 print '</TR>';
+00102 print '<TR>';
+00103 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
+00104 $w->label="Depuis";
+00105 print $w->IOValue('from_periode',$periode_start);
+00106 $w->label=" jusqu'à ";
+00107 $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id");
+00108 print $w->IOValue('to_periode',$periode_end);
+00109 print "</TR><TR>";
+00110 $centralise=new widget("checkbox");
+00111 $centralise->label="Depuis les journaux centralisés";
+00112 $centralise->table=1;
+00113 print $centralise->IOValue('cent');
 00114 
-00115 echo '</FORM>';
-00116 echo '</div>';
-00117 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00115 print "</TR>"; +00116 echo '</TABLE>'; +00117 print $w->Submit('bt_html','Impression'); +00118 +00119 echo '</FORM>'; +00120 echo '</div>'; +00121 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__operation_8php.html b/doc/developper/html/class__operation_8php.html index 33e0de1cb..9c1335226 100644 --- a/doc/developper/html/class__operation_8php.html +++ b/doc/developper/html/class__operation_8php.html @@ -4,10 +4,12 @@ - + -

class_operation.php File Reference

+

class_operation.php File Reference

To remove ? More... +

+

Go to the source code of this file. @@ -37,7 +39,13 @@
print</TR >< TR > $centralise = new widget("checkbox")
-


Variable Documentation

+

Detailed Description

+To remove ? +

+

Todo:
obsolete ? then remove
+ +

+Definition in file class_operation.php.


Variable Documentation

@@ -60,9 +68,9 @@

-Definition at line 82 of file class_operation.php. +Definition at line 86 of file class_operation.php.

-Referenced by fiche::GetByDef(), fiche::GetByType(), fiche_def_ref::LoadAll(), Invoice::myList(), and Document_modele::myList(). +Referenced by fiche::GetByDef(), fiche::GetByType(), fiche_def_ref::LoadAll(), Invoice::myList(), and Document_modele::myList().

@@ -87,7 +95,7 @@ Referenced by fiche::G

-Definition at line 106 of file class_operation.php. +Definition at line 110 of file class_operation.php.

@@ -112,7 +120,7 @@ Definition at line

-Definition at line 32 of file class_operation.php. +Definition at line 36 of file class_operation.php.

@@ -137,7 +145,7 @@ Definition at line

-Definition at line 29 of file class_operation.php. +Definition at line 33 of file class_operation.php.

@@ -162,7 +170,7 @@ Definition at line

-Definition at line 103 of file class_operation.php. +Definition at line 107 of file class_operation.php.

@@ -187,7 +195,7 @@ Definition at line

-Definition at line 99 of file class_operation.php. +Definition at line 103 of file class_operation.php.

@@ -212,9 +220,9 @@ Definition at line

-Definition at line 83 of file class_operation.php. +Definition at line 87 of file class_operation.php.

-Referenced by cl_user::Check(), fiche::Display(), ExecSql(), FormPeriode(), FormPeriodeMult(), Invoice::Get(), Document_modele::Get(), GetJrnName(), rapport::GetName(), poste::GetName(), jrn::GetName(), GetNextFiche(), getPeriodeName(), ImpHtml(), PosteForm(), Invoice::Save(), Document_modele::Save(), save_upload_document(), ShowItem(), and ShowMenuJrn(). +Referenced by cl_user::Check(), fiche::Display(), ExecSql(), FormPeriode(), FormPeriodeMult(), Document::Generate(), Invoice::Get(), Document_modele::Get(), Document::Get(), GetJrnName(), rapport::GetName(), poste::GetName(), jrn::GetName(), GetNextFiche(), getPeriodeName(), ImpHtml(), PosteForm(), Invoice::Save(), Document_modele::Save(), save_upload_document(), ShowItem(), ShowMenuJrn(), and Document::Upload().

@@ -239,7 +247,7 @@ Referenced by cl_user::

-Definition at line 93 of file class_operation.php. +Definition at line 97 of file class_operation.php.

@@ -264,9 +272,9 @@ Definition at line

-Definition at line 39 of file class_operation.php. +Definition at line 43 of file class_operation.php.

-Referenced by jrn::GetRow(), and jrn::GetRowSimple(). +Referenced by jrn::GetRow(), and jrn::GetRowSimple().

@@ -291,7 +299,7 @@ Referenced by jrn::GetRo

-Definition at line 95 of file class_operation.php. +Definition at line 99 of file class_operation.php.

@@ -316,9 +324,9 @@ Definition at line

-Definition at line 97 of file class_operation.php. +Definition at line 101 of file class_operation.php.

-Referenced by ExecuteScript(), ImportCSV(), and Cpdf::setEncryption(). +Referenced by ExecuteScript(), ImportCSV(), and Cpdf::setEncryption().

@@ -343,10 +351,10 @@ Referenced by ExecuteScript()

-Definition at line 94 of file class_operation.php. +Definition at line 98 of file class_operation.php. -


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__own_8php-source.html b/doc/developper/html/class__own_8php-source.html index ba70d237f..9687d7e3d 100644 --- a/doc/developper/html/class__own_8php-source.html +++ b/doc/developper/html/class__own_8php-source.html @@ -4,7 +4,7 @@ - +

class_own.php

Go to the documentation of this file.
00001 <?
@@ -27,60 +27,38 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 class Own {
-00022   var $db;
-00023   // constructor 
-00024   function Own($p_cn) {
-00025     $this->db=$p_cn;
-00026     $Res=ExecSql($p_cn,"select * from parameter where pr_id like 'MY_%'");
-00027     for ($i = 0;$i < pg_NumRows($Res);$i++) {
-00028       $row=pg_fetch_array($Res,$i);
-00029       $key=$row['pr_id'];
-00030       $elt=$row['pr_value'];
-00031       // store value here
-00032       $this->{"$key"}=$elt;
-00033     }
-00034 
-00035   }
-00036 /* function UpdateRow
-00037  **************************************************
-00038  * Purpose : Update a row
-00039  *        
-00040  * parm : 
-00041  *      - give the attribut name
-00042  * gen :
-00043  *      - none
-00044  * return:
-00045  *      -none
-00046  */
-00047   function UpdateRow($p_attr) {
-00048     $value=FormatString($this->{"$p_attr"});
-00049     $Res=ExecSql($this->db,"update parameter set pr_value='$value' where pr_id='$p_attr'");
-00050   }
-00051 
-00052 /* function Save
-00053  **************************************************
-00054  * Purpose : save data
-00055  *        
-00056  * parm : 
-00057  *      - none
-00058  * gen :
-00059  *      - none
-00060  * return:
-00061  *    - nothing
-00062  */
-00063   function Save() {
-00064     $this->UpdateRow('MY_NAME');
-00065     $this->UpdateRow('MY_TVA');
-00066     $this->UpdateRow('MY_STREET');
-00067     $this->UpdateRow('MY_NUMBER');
-00068     $this->UpdateRow('MY_CP');
-00069     $this->UpdateRow('MY_COMMUNE');
-00070 
-00071   }
-00072 
-00073 }
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00028 class Own { +00029 var $db; +00030 // constructor +00031 function Own($p_cn) { +00032 $this->db=$p_cn; +00033 $Res=ExecSql($p_cn,"select * from parameter where pr_id like 'MY_%'"); +00034 for ($i = 0;$i < pg_NumRows($Res);$i++) { +00035 $row=pg_fetch_array($Res,$i); +00036 $key=$row['pr_id']; +00037 $elt=$row['pr_value']; +00038 // store value here +00039 $this->{"$key"}=$elt; +00040 } +00041 +00042 } +00051 function UpdateRow($p_attr) { +00052 $value=FormatString($this->{"$p_attr"}); +00053 $Res=ExecSql($this->db,"update parameter set pr_value='$value' where pr_id='$p_attr'"); +00054 } +00055 +00062 function Save() { +00063 $this->UpdateRow('MY_NAME'); +00064 $this->UpdateRow('MY_TVA'); +00065 $this->UpdateRow('MY_STREET'); +00066 $this->UpdateRow('MY_NUMBER'); +00067 $this->UpdateRow('MY_CP'); +00068 $this->UpdateRow('MY_COMMUNE'); +00069 +00070 } +00071 +00072 } +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__own_8php.html b/doc/developper/html/class__own_8php.html index c7b0c3db4..7db14745e 100644 --- a/doc/developper/html/class__own_8php.html +++ b/doc/developper/html/class__own_8php.html @@ -4,18 +4,26 @@ - + -

class_own.php File Reference

+

class_own.php File Reference

Class to manage the company parameter (address, name...). More... +

+

Go to the source code of this file. +

Data Structures

class  Own
 Class to manage the company parameter (address, name...). More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+Class to manage the company parameter (address, name...). +

+ +

+Definition in file class_own.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__parm__code_8php-source.html b/doc/developper/html/class__parm__code_8php-source.html index 6c3ea59a8..748af1f99 100644 --- a/doc/developper/html/class__parm__code_8php-source.html +++ b/doc/developper/html/class__parm__code_8php-source.html @@ -4,7 +4,7 @@ - +

class_parm_code.php

Go to the documentation of this file.
00001 <?
@@ -27,153 +27,94 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 class parm_code {
-00022   var $db; // database connection
-00023   var $p_code; // parm_code.p_code primary key
-00024   var $p_value; // parm_code.p_value 
-00025   var $p_comment; // parm_code.p_comment
-00026  // constructor
-00027   function parm_code($p_cn,$p_id=-1) 
-00028     {
-00029       $this->db=$p_cn;
-00030       $this->p_code=$p_id;
-00031       if ( $p_id != -1 )
-00032         $this->Get();
-00033     }
-00034 /* function LoadAll
-00035  **************************************************
-00036  * Purpose : 
-00037  *  Load all parmCode
-00038  *  return an array of parm_code object
-00039  *        
-00040  * parm : 
-00041  *      - none
-00042  * gen :
-00043  *      -
-00044  * return: array
-00045  */
-00046 
-00047   function LoadAll() {
-00048     $sql="select * from parm_code order by p_code";
-00049     $Res=ExecSql($this->db,$sql);
-00050     $r= pg_fetch_all($Res);
-00051     $idx=0;
-00052     $array=array();
-00053 
-00054     if ( $r === false ) return null;
-00055     foreach ($r as $row )
-00056       {
-00057         $o=new parm_code($this->db,$row['p_code']);
-00058         $array[$idx]=$o;
-00059         $idx++;
-00060       }
-00061     
-00062     return $array;
-00063   }
-00064   /* function Save
-00065  **************************************************
-00066  * Purpose : update a parm_object into the database
-00067  *        p_code is _not_ updatable
-00068  * parm : 
-00069  *      - none
-00070  * gen :
-00071  *      - none
-00072  * return:
-00073  *     nothing
-00074  */
-00075   function Save() 
-00076     {
-00077       // if p_code=="" nothing to save
-00078       if ( $this->p_code== -1) return;
-00079       $this->p_comment=FormatString($this->p_comment);
-00080       $this->p_value=FormatString($this->p_value);
-00081       $this->p_code=FormatString($this->p_code);
-00082       $sql="update parm_code set ".
-00083         "p_comment='".$this->p_comment."'  ".
-00084         ",p_value='".$this->p_value."'  ".
-00085         "where p_code='".$this->p_code."'";
-00086       $Res=ExecSql($this->db,$sql);
-00087     }
-00088 /* function Display
-00089  **************************************************
-00090  * Purpose : Display an object, with the <TD> tag
-00091  *        
-00092  * parm : 
-00093  *      - none
-00094  * gen :
-00095  *      - none
-00096  * return:
-00097  *     string
-00098  */
-00099   function Display() 
-00100     {
-00101       $r="";
-00102       $r.= '<TD>'.$this->p_code.'</TD>';
-00103       $r.= '<TD>'.$this->p_comment.'</TD>';
-00104       $r.= '<TD>'.$this->p_value.'</TD>';
-00105 
-00106       return $r;
-00107     }
-00108 /* function Input
-00109  **************************************************
-00110  * Purpose : Display a form to enter info about
-00111  *        a parm_code object with the <TD> tag
-00112  *    
-00113  * parm : 
-00114  *      - none
-00115  * gen :
-00116  *      - none
-00117  * return: string
-00118  */
-00119   function Input() 
-00120     {
-00121       $comment=new widget("text");
-00122       $comment->name='p_comment';
-00123       $comment->value=$this->p_comment;
-00124       $value=new widget("text");
-00125       $value->name='p_value';
-00126       $value->value=$this->p_value;
-00127       $poste=new widget("text");
-00128       $poste->SetReadOnly(true);
-00129       $poste->name='p_code';
-00130       $poste->value=$this->p_code;
-00131       $r="";
-00132       $r.= '<TD>'.$poste->IOValue().'</TD>';
-00133       $r.= '<TD>'.$comment->IOValue().'</TD>';
-00134       $r.= '<TD>'.$value->IOValue().'</TD>';
-00135 
-00136       return $r;
-00137       
-00138     }
-00139 
-00140 /* function Get
-00141  **************************************************
-00142  * Purpose : 
-00143  * Complete a parm_code object thanks the p_code 
-00144 
-00145  *        
-00146  * parm : 
-00147  *      - none
-00148  * gen :
-00149  *      -
-00150  * return: array
-00151  */
-00152 
-00153   function Get() {
-00154     if ( $this->p_code == -1 ) return "p_code non initialisé";
-00155     $sql=sprintf("select * from parm_code where p_code='%s' ",
-00156                  $this->p_code);
-00157     $Res=ExecSql($this->db,$sql);
-00158 
-00159     if ( pg_NumRows($Res) == 0 ) return 'INCONNU';
-00160     $row= pg_fetch_array($Res,0);
-00161     $this->p_value=$row['p_value'];
-00162     $this->p_comment=$row['p_comment'];
-00163 
-00164   }
-00165 
-00166 }
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00030 class parm_code { +00031 var $db; +00032 var $p_code; +00033 var $p_value; +00034 var $p_comment; +00035 // constructor +00036 function parm_code($p_cn,$p_id=-1) +00037 { +00038 $this->db=$p_cn; +00039 $this->p_code=$p_id; +00040 if ( $p_id != -1 ) +00041 $this->Get(); +00042 } +00052 function LoadAll() { +00053 $sql="select * from parm_code order by p_code"; +00054 $Res=ExecSql($this->db,$sql); +00055 $r= pg_fetch_all($Res); +00056 $idx=0; +00057 $array=array(); +00058 +00059 if ( $r === false ) return null; +00060 foreach ($r as $row ) +00061 { +00062 $o=new parm_code($this->db,$row['p_code']); +00063 $array[$idx]=$o; +00064 $idx++; +00065 } +00066 +00067 return $array; +00068 } +00076 function Save() +00077 { +00078 // if p_code=="" nothing to save +00079 if ( $this->p_code== -1) return; +00080 $this->p_comment=FormatString($this->p_comment); +00081 $this->p_value=FormatString($this->p_value); +00082 $this->p_code=FormatString($this->p_code); +00083 $sql="update parm_code set ". +00084 "p_comment='".$this->p_comment."' ". +00085 ",p_value='".$this->p_value."' ". +00086 "where p_code='".$this->p_code."'"; +00087 $Res=ExecSql($this->db,$sql); +00088 } +00096 function Display() +00097 { +00098 $r=""; +00099 $r.= '<TD>'.$this->p_code.'</TD>'; +00100 $r.= '<TD>'.$this->p_comment.'</TD>'; +00101 $r.= '<TD>'.$this->p_value.'</TD>'; +00102 +00103 return $r; +00104 } +00112 function Input() +00113 { +00114 $comment=new widget("text"); +00115 $comment->name='p_comment'; +00116 $comment->value=$this->p_comment; +00117 $value=new widget("text"); +00118 $value->name='p_value'; +00119 $value->value=$this->p_value; +00120 $poste=new widget("text"); +00121 $poste->SetReadOnly(true); +00122 $poste->name='p_code'; +00123 $poste->value=$this->p_code; +00124 $r=""; +00125 $r.= '<TD>'.$poste->IOValue().'</TD>'; +00126 $r.= '<TD>'.$comment->IOValue().'</TD>'; +00127 $r.= '<TD>'.$value->IOValue().'</TD>'; +00128 +00129 return $r; +00130 +00131 } +00132 +00141 function Get() { +00142 if ( $this->p_code == -1 ) return "p_code non initialisé"; +00143 $sql=sprintf("select * from parm_code where p_code='%s' ", +00144 $this->p_code); +00145 $Res=ExecSql($this->db,$sql); +00146 +00147 if ( pg_NumRows($Res) == 0 ) return 'INCONNU'; +00148 $row= pg_fetch_array($Res,0); +00149 $this->p_value=$row['p_value']; +00150 $this->p_comment=$row['p_comment']; +00151 +00152 } +00153 +00154 } +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__parm__code_8php.html b/doc/developper/html/class__parm__code_8php.html index 9e979c12a..2075effda 100644 --- a/doc/developper/html/class__parm__code_8php.html +++ b/doc/developper/html/class__parm__code_8php.html @@ -4,18 +4,26 @@ - + -

class_parm_code.php File Reference

+

class_parm_code.php File Reference

Manage the table parm_code which contains the custom parameter for the module accountancy. More... +

+

Go to the source code of this file. +

Data Structures

class  parm_code
 Manage the table parm_code which contains the custom parameter for the module accountancy. More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+Manage the table parm_code which contains the custom parameter for the module accountancy. +

+ +

+Definition in file class_parm_code.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__poste_8php-source.html b/doc/developper/html/class__poste_8php-source.html index 4318b5feb..c05164470 100644 --- a/doc/developper/html/class__poste_8php-source.html +++ b/doc/developper/html/class__poste_8php-source.html @@ -4,7 +4,7 @@ - +

class_poste.php

Go to the documentation of this file.
00001 <?
@@ -27,131 +27,96 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 class poste {
-00022   var $db;
-00023   var $id;
-00024   var $row;
-00025   function poste($p_cn,$p_id) {
-00026     $this->db=$p_cn;
-00027     $this->id=$p_id;
-00028   }
-00029 
-00030   /* function GetRow
-00031    * Purpose : Get dat for poste 
-00032    * 
-00033    * parm : 
-00034    *      - connection
-00035    *    - condition
-00036    *      -. position
-00037    * gen :
-00038    *    - none
-00039    * return:
-00040    *    - none
-00041    *
-00042    */ 
-00043   function GetRow($p_from,$p_to)
-00044 {
-00045     if ( $p_from == $p_to ) 
-00046       $periode=" jr_tech_per = $p_from ";
-00047     else
-00048       $periode = "(jr_tech_per >= $p_from and jr_tech_per <= $p_to) ";
-00049 
-00050   $Res=ExecSql($this->db,"select to_char(j_date,'DD.MM.YYYY') as j_date,".
-00051                "case when j_debit='t' then j_montant else 0 end as deb_montant,".
-00052                "case when j_debit='f' then j_montant else 0 end as cred_montant,".
-00053                " jr_comment as description,jrn_def_name as jrn_name,".
-00054                "j_debit, jr_internal ".
-00055                " from jrnx left join jrn_def on jrn_def_id=j_jrn_def ".
-00056                " left join jrn on jr_grpt_id=j_grpt".
-00057                " where j_poste=".$this->id." and ".$periode.
-00058                " order by j_date::date");
-00059   $array=array();
-00060   $tot_cred=0.0;
-00061   $tot_deb=0.0;
-00062   $Max=pg_NumRows($Res);
-00063   if ( $Max == 0 ) return null;
-00064   for ($i=0;$i<$Max;$i++) {
-00065     $array[]=pg_fetch_array($Res,$i);
-00066     if ($array[$i]['j_debit']=='t') {
-00067       $tot_deb+=$array[$i]['deb_montant'] ;
-00068     } else {
-00069       $tot_cred+=$array[$i]['cred_montant'] ;
-00070     }
-00071   }
-00072   $this->row=$array;
-00073   return array($array,$tot_deb,$tot_cred);
-00074 }
-00075   function GetName() {
-00076     $ret=pg_exec($this->db,
-00077                  "select pcm_lib from tmp_pcmn where
-00078                   pcm_val=".$this->id);
-00079       if ( pg_NumRows($ret) != 0) {
-00080         $r=pg_fetch_array($ret);
-00081         $this->name=$r['pcm_lib'];
-00082       } else {
-00083         $this->name="Poste inconnu";
-00084       }
-00085     return $this->name;
-00086   }
-00087   /* function GetSolde
-00088    * Purpose : give the balance of an account
-00089    * 
-00090    * parm : 
-00091    *      - cond
-00092    * gen :
-00093    *    - none
-00094    * return:
-00095    *      - balance of the account
-00096    *
-00097    */ 
-00098 function GetSolde($p_cond="") {
-00099   $Res=ExecSql($this->db,"select sum(deb) as sum_deb, sum(cred) as sum_cred from 
-00100           ( select j_poste, 
-00101              case when j_debit='t' then j_montant else 0 end as deb, 
-00102              case when j_debit='f' then j_montant else 0 end as cred 
-00103           from jrnx join tmp_pcmn on j_poste=pcm_val 
-00104               where  
-00105             j_poste like ('$this->id'::text) and
-00106             $p_cond
-00107           ) as m  ");
-00108   $Max=pg_NumRows($Res);
-00109   if ($Max==0) return 0;
-00110   $r=pg_fetch_array($Res,0);
-00111   
-00112   return abs($r['sum_deb']-$r['sum_cred']);
-00113 }
-00114   /* function GetSoldeDetail
-00115    * Purpose : give the balance of an account
-00116    * 
-00117    * parm : 
-00118    *      - cond
-00119    * gen :
-00120    *    - none
-00121    * return:
-00122    *      - balance of the account
-00123    *
-00124    */ 
-00125 function GetSoldeDetail($p_cond="") {
-00126         if ( $p_cond != "") $p_cond.=" and ";
-00127   $Res=ExecSql($this->db,"select sum(deb) as sum_deb, sum(cred) as sum_cred from 
-00128           ( select j_poste, 
-00129              case when j_debit='t' then j_montant else 0 end as deb, 
-00130              case when j_debit='f' then j_montant else 0 end as cred 
-00131           from jrnx join tmp_pcmn on j_poste=pcm_val 
-00132               where  
-00133             j_poste like ('$this->id'::text)
-00134             $p_cond
-00135           ) as m  ");
-00136   $Max=pg_NumRows($Res);
-00137   if ($Max==0) return 0;
-00138   $r=pg_fetch_array($Res,0);
-00139   
-00140   return array('debit'=>$r['sum_deb'],
-00141                'credit'=>$r['sum_cred'],
-00142                'solde'=>abs($r['sum_deb']-$r['sum_cred']));
-00143 }
-00144 }
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00028 class poste { +00029 var $db; +00030 var $id; +00031 var $row; +00032 function poste($p_cn,$p_id) { +00033 $this->db=$p_cn; +00034 $this->id=$p_id; +00035 } +00036 +00046 function GetRow($p_from,$p_to) +00047 { +00048 if ( $p_from == $p_to ) +00049 $periode=" jr_tech_per = $p_from "; +00050 else +00051 $periode = "(jr_tech_per >= $p_from and jr_tech_per <= $p_to) "; +00052 +00053 $Res=ExecSql($this->db,"select to_char(j_date,'DD.MM.YYYY') as j_date,". +00054 "case when j_debit='t' then j_montant else 0 end as deb_montant,". +00055 "case when j_debit='f' then j_montant else 0 end as cred_montant,". +00056 " jr_comment as description,jrn_def_name as jrn_name,". +00057 "j_debit, jr_internal ". +00058 " from jrnx left join jrn_def on jrn_def_id=j_jrn_def ". +00059 " left join jrn on jr_grpt_id=j_grpt". +00060 " where j_poste=".$this->id." and ".$periode. +00061 " order by j_date::date"); +00062 $array=array(); +00063 $tot_cred=0.0; +00064 $tot_deb=0.0; +00065 $Max=pg_NumRows($Res); +00066 if ( $Max == 0 ) return null; +00067 for ($i=0;$i<$Max;$i++) { +00068 $array[]=pg_fetch_array($Res,$i); +00069 if ($array[$i]['j_debit']=='t') { +00070 $tot_deb+=$array[$i]['deb_montant'] ; +00071 } else { +00072 $tot_cred+=$array[$i]['cred_montant'] ; +00073 } +00074 } +00075 $this->row=$array; +00076 return array($array,$tot_deb,$tot_cred); +00077 } +00080 function GetName() { +00081 $ret=pg_exec($this->db, +00082 "select pcm_lib from tmp_pcmn where +00083 pcm_val=".$this->id); +00084 if ( pg_NumRows($ret) != 0) { +00085 $r=pg_fetch_array($ret); +00086 $this->name=$r['pcm_lib']; +00087 } else { +00088 $this->name="Poste inconnu"; +00089 } +00090 return $this->name; +00091 } +00099 function GetSolde($p_cond="") { +00100 $Res=ExecSql($this->db,"select sum(deb) as sum_deb, sum(cred) as sum_cred from +00101 ( select j_poste, +00102 case when j_debit='t' then j_montant else 0 end as deb, +00103 case when j_debit='f' then j_montant else 0 end as cred +00104 from jrnx join tmp_pcmn on j_poste=pcm_val +00105 where +00106 j_poste like ('$this->id'::text) and +00107 $p_cond +00108 ) as m "); +00109 $Max=pg_NumRows($Res); +00110 if ($Max==0) return 0; +00111 $r=pg_fetch_array($Res,0); +00112 +00113 return abs($r['sum_deb']-$r['sum_cred']); +00114 } +00121 function GetSoldeDetail($p_cond="") { +00122 if ( $p_cond != "") $p_cond.=" and "; +00123 $Res=ExecSql($this->db,"select sum(deb) as sum_deb, sum(cred) as sum_cred from +00124 ( select j_poste, +00125 case when j_debit='t' then j_montant else 0 end as deb, +00126 case when j_debit='f' then j_montant else 0 end as cred +00127 from jrnx join tmp_pcmn on j_poste=pcm_val +00128 where +00129 j_poste like ('$this->id'::text) +00130 $p_cond +00131 ) as m "); +00132 $Max=pg_NumRows($Res); +00133 if ($Max==0) return 0; +00134 $r=pg_fetch_array($Res,0); +00135 +00136 return array('debit'=>$r['sum_deb'], +00137 'credit'=>$r['sum_cred'], +00138 'solde'=>abs($r['sum_deb']-$r['sum_cred'])); +00139 } +00140 } +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__poste_8php.html b/doc/developper/html/class__poste_8php.html index 7431f7517..edb107bdb 100644 --- a/doc/developper/html/class__poste_8php.html +++ b/doc/developper/html/class__poste_8php.html @@ -4,18 +4,26 @@ - + -

class_poste.php File Reference

+

class_poste.php File Reference

Manage the account. More... +

+

Go to the source code of this file. +

Data Structures

class  poste
 Manage the account. More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+Manage the account. +

+ +

+Definition in file class_poste.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__rapport_8php-source.html b/doc/developper/html/class__rapport_8php-source.html index 6d8209cab..c49cf3ae5 100644 --- a/doc/developper/html/class__rapport_8php-source.html +++ b/doc/developper/html/class__rapport_8php-source.html @@ -4,7 +4,7 @@ - +

class_rapport.php

Go to the documentation of this file.
00001 <?
@@ -27,52 +27,52 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 class rapport {
-00022   var $db;
-00023   var $id;
-00024   var $name;
-00025   function rapport($p_cn,$p_id) {
-00026     $this->db=$p_cn;
-00027     $this->id=$p_id;
-00028     $this->name='UNDEF';
-00029   }
-00030   function GetName() {
-00031     $ret=execSql($this->db,"select fr_label from formdef where fr_id=".$this->id);
-00032     if (pg_NumRows($ret) == 0) return $this->name;
-00033     $a=pg_fetch_array($ret,0);
-00034     $this->name=$a['fr_label'];
-00035     return $this->name;
-00036   }
-00037   function GetRow($p_start,$p_end) {
-00038 
-00039    $Res=ExecSql($this->db,"select fo_id ,
-00040                      fo_fr_id,
-00041                      fo_pos,
-00042                      fo_label,
-00043                      fo_formula,
-00044                      fr_label from form
-00045                       inner join formdef on fr_id=fo_fr_id
-00046                      where fr_id =".$this->id.
-00047                      "order by fo_pos");
-00048     $Max=pg_NumRows($Res);
-00049     if ($Max==0) {      $this->row=0;return null;}
-00050     $col=array();
-00051     for ($i=0;$i<$Max;$i++) {
-00052       $l_line=pg_fetch_array($Res,$i);
-00053         $col[]=ParseFormula($this->db,
-00054                             $l_line['fo_label'],
-00055                             $l_line['fo_formula'],
-00056                             $p_start,
-00057                             $p_end
-00058                             );
-00059      
-00060     } //for ($i
-00061     $this->row=$col;
-00062     return $col;
-00063   }
-00064 }
-00065 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00028 class rapport { +00029 var $db; +00030 var $id; +00031 var $name; +00033 function rapport($p_cn,$p_id) { +00034 $this->db=$p_cn; +00035 $this->id=$p_id; +00036 $this->name='UNDEF'; +00037 } +00040 function GetName() { +00041 $ret=execSql($this->db,"select fr_label from formdef where fr_id=".$this->id); +00042 if (pg_NumRows($ret) == 0) return $this->name; +00043 $a=pg_fetch_array($ret,0); +00044 $this->name=$a['fr_label']; +00045 return $this->name; +00046 } +00053 function GetRow($p_start,$p_end) { +00054 +00055 $Res=ExecSql($this->db,"select fo_id , +00056 fo_fr_id, +00057 fo_pos, +00058 fo_label, +00059 fo_formula, +00060 fr_label from form +00061 inner join formdef on fr_id=fo_fr_id +00062 where fr_id =".$this->id. +00063 "order by fo_pos"); +00064 $Max=pg_NumRows($Res); +00065 if ($Max==0) { $this->row=0;return null;} +00066 $col=array(); +00067 for ($i=0;$i<$Max;$i++) { +00068 $l_line=pg_fetch_array($Res,$i); +00069 $col[]=ParseFormula($this->db, +00070 $l_line['fo_label'], +00071 $l_line['fo_formula'], +00072 $p_start, +00073 $p_end +00074 ); +00075 +00076 } //for ($i +00077 $this->row=$col; +00078 return $col; +00079 } +00080 } +00081 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__rapport_8php.html b/doc/developper/html/class__rapport_8php.html index 89c18bbdf..94b7e034d 100644 --- a/doc/developper/html/class__rapport_8php.html +++ b/doc/developper/html/class__rapport_8php.html @@ -4,18 +4,26 @@ - + -

class_rapport.php File Reference

+

class_rapport.php File Reference

Create, view, modify and parse report. More... +

+

Go to the source code of this file. +

Data Structures

class  rapport
 Class rapport Create, view, modify and parse report. More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+Create, view, modify and parse report. +

+ +

+Definition in file class_rapport.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__user_8php-source.html b/doc/developper/html/class__user_8php-source.html index 8cad4eb5c..902d5916e 100644 --- a/doc/developper/html/class__user_8php-source.html +++ b/doc/developper/html/class__user_8php-source.html @@ -4,7 +4,7 @@ - +

class_user.php

Go to the documentation of this file.
00001 <?
@@ -27,70 +27,55 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 /* Class user 
-00022  **************************************************
-00023  * Purpose : 
-00024  *   Data & function about connected users
-00025  */
-00026 include_once("constant.php");
-00027 
-00028 class cl_user {
-00029   var $id;
-00030   var $pass;
-00031   var $db;
-00032   var $admin;
-00033   var $valid;
-00034 
-00035   function cl_user ($p_cn,$p_id=-1){
-00036     // if p_id is not set then check the connected user
-00037     if ( $p_id == -1 ) {
-00038           echo_debug('class_user.php',__LINE__," g_user = ".$_SESSION['g_user']);
-00039     $this->id=$_SESSION['g_user'];
-00040     $this->pass=$_SESSION['g_pass'];
-00041     $this->valid=(isset ($_SESSION['isValid']))?1:0;
-00042     $this->db=$p_cn;
-00043     if ( isset($_SESSION['g_theme']) )
-00044       $this->theme=$_SESSION['g_theme'];
-00045     
-00046     $this->admin=( isset($_SESSION['use_admin']) )?$_SESSION['use_admin']:0;
-00047     
-00048     if ( isset($_SESSION['use_name']) )
-00049       $this->name=$_SESSION['use_name'];
-00050     if ( isset($_SESSION['use_first_name']) )
-00051       $this->first_name=$_SESSION['use_first_name'];
-00052     } 
-00053     else // if p_id is set get data of another user
-00054       {
-00055       $this->id=$p_id;
-00056       $this->db=$p_cn;
-00057       $Sql="select use_first_name,
-00058              use_name,
-00059              use_login,
-00060              use_active,
-00061              use_admin,
-00062                      from ac_users
-00063              where use_id=$p_id";
-00064       $cn=DbConnect(); 
-00065       $Res=pg_exec($cn,$Sql);
-00066       if (($Max=pg_NumRows($Res)) == 0 ) return -1;
-00067       $row=pg_fetch_array($Res,0);
-00068       $this->first_name=$row['use_first_name'];
-00069       $this->name=$row['use_name'];
-00070       $this->active=$row['use_active'];
-00071       $this->login=$row['use_login'];
-00072       $this->admin=$row['use_admin'];
-00073     } 
-00074   }
-00075   /*++ 
-00076    * function : CheckUser
-00077    * Parameter : none
-00078    * return    : not use
-00079    * Description :
-00080    * Check if user is active and exists in the
-00081    * repository
-00082    * Automatically redirect
-00083    * 
-00084    ++*/
+00031 include_once("constant.php");
+00032 
+00033 class cl_user {
+00034   var $id;
+00035   var $pass;
+00036   var $db;
+00037   var $admin;
+00038   var $valid;
+00039 
+00040   function cl_user ($p_cn,$p_id=-1){
+00041     // if p_id is not set then check the connected user
+00042     if ( $p_id == -1 ) {
+00043           echo_debug('class_user.php',__LINE__," g_user = ".$_SESSION['g_user']);
+00044     $this->id=$_SESSION['g_user'];
+00045     $this->pass=$_SESSION['g_pass'];
+00046     $this->valid=(isset ($_SESSION['isValid']))?1:0;
+00047     $this->db=$p_cn;
+00048     if ( isset($_SESSION['g_theme']) )
+00049       $this->theme=$_SESSION['g_theme'];
+00050     
+00051     $this->admin=( isset($_SESSION['use_admin']) )?$_SESSION['use_admin']:0;
+00052     
+00053     if ( isset($_SESSION['use_name']) )
+00054       $this->name=$_SESSION['use_name'];
+00055     if ( isset($_SESSION['use_first_name']) )
+00056       $this->first_name=$_SESSION['use_first_name'];
+00057     } 
+00058     else // if p_id is set get data of another user
+00059       {
+00060       $this->id=$p_id;
+00061       $this->db=$p_cn;
+00062       $Sql="select use_first_name,
+00063              use_name,
+00064              use_login,
+00065              use_active,
+00066              use_admin,
+00067                      from ac_users
+00068              where use_id=$p_id";
+00069       $cn=DbConnect(); 
+00070       $Res=pg_exec($cn,$Sql);
+00071       if (($Max=pg_NumRows($Res)) == 0 ) return -1;
+00072       $row=pg_fetch_array($Res,0);
+00073       $this->first_name=$row['use_first_name'];
+00074       $this->name=$row['use_name'];
+00075       $this->active=$row['use_active'];
+00076       $this->login=$row['use_login'];
+00077       $this->admin=$row['use_admin'];
+00078     } 
+00079   }
 00085   function Check()
 00086   {
 00087         
@@ -99,7 +84,7 @@
 00090         if  ( $this->valid == 1 ) { return; }
 00091         $cn=DbConnect();
 00092         if ( $cn != false ) {
-00093           $sql="select ac_users.use_login,ac_users.use_active, ac_users.use_pass,
+00093           $sql="select ac_users.use_login,ac_users.use_active, ac_users.use_pass,
 00094                     use_admin,use_first_name,use_name
 00095                                 from ac_users  
 00096                                  where ac_users.use_login='$this->id' 
@@ -110,10 +95,10 @@
 00101             $res=pg_NumRows($ret);
 00102             echo_debug('class_user.php',__LINE__,"Number of found rows : $res");
 00103             if ( $res >0 ) {
-00104               $r=pg_fetch_array($ret,0);
-00105               $_SESSION['use_admin']=$r['use_admin'];
-00106               $_SESSION['use_name']=$r['use_name'];
-00107               $_SESSION['use_first_name']=$r['use_first_name'];
+00104               $r=pg_fetch_array($ret,0);
+00105               $_SESSION['use_admin']=$r['use_admin'];
+00106               $_SESSION['use_name']=$r['use_name'];
+00107               $_SESSION['use_first_name']=$r['use_first_name'];
 00108               
 00109               $this->admin=$_SESSION['use_admin'];
 00110               $this->name=$_SESSION['use_name'];
@@ -143,245 +128,148 @@
 00134 
 00135   function getJrn() {
 00136   }
-00137 /* function Admin
-00138  **************************************************
-00139  * Purpose : Check if an user is an admin
-00140  *        
-00141  * parm : 
-00142  *      - none
-00143  * gen : 
-00144  *      - none 
-00145  * return: 1 for yes 0 for no
-00146  */
-00147   function Admin() {
-00148     $res=0;
-00149     
-00150     if ( $this->id != 'phpcompta') {
-00151       $pass5=md5($this->pass);
-00152       $sql="select use_id from ac_users where use_login='$this->id'
-00153                 and use_active=1 and use_admin=1 and use_pass='$pass5'";
-00154       
-00155       $cn=DbConnect();
-00156       
-00157       $this->admin=CountSql($cn,$sql);
-00158     } else $this->admin=1;
-00159     
-00160     return $this->admin;
-00161   }
-00162   function AccessJrn($p_cn,$p_jrn_id) {
-00163     $this->Admin();
-00164     if ( $this->admin==1) return true;
-00165     $sql=CountSql($p_cn,"select uj_id 
-00166                              from user_sec_jrn 
-00167                              where
-00168                              uj_priv in ('R','W')
-00169                              and uj_jrn_id=".$p_jrn_id.
-00170                   "  and uj_login = '".$this->id."'");
-00171     if ( $sql != 0 ) return true;
-00172     return false;
-00173         
-00174   }
-00175 /* function SetPeriode
-00176  * Purpose : Set the selected periode in the user's preferences
-00177  * 
-00178  * parm : 
-00179  
-00180  *      - $p_periode 
-00181  *      - $p_user
-00182  * gen :
-00183  *      - none
-00184  * return:
-00185  *      - none
-00186  *
-00187  */ 
-00188 function SetPeriode($p_periode) {
-00189   $sql="update user_local_pref set parameter_value='$p_periode' where user_id='$this->id' and parameter_type='PERIODE'";
-00190   $Res=ExecSql($this->db,$sql);
-00191 }
-00192 /* function GetPeriode
-00193  * Purpose : Get the default periode from the user's preferences
-00194  * 
-00195  * parm : 
-00196  *      - $p_cn connexion 
-00197  *      - $p_user
-00198  * gen :
-00199  *      - none
-00200  * return:
-00201  *      - the default periode
-00202  *
-00203  */ 
-00204 
-00205 function GetPeriode() {
-00206   $array=$this->GetPreferences();
-00207   return $array['PERIODE'];
-00208 }
-00209 /* function GetPreferences
-00210  * Purpose : Get the default user's preferences
-00211  * 
-00212  * parm : 
-00213  *      - $p_cn connexion 
-00214  *      - $p_user
-00215  * gen :
-00216  *      - none
-00217  * return:
-00218  *      - none
-00219  *
-00220  */ 
-00221 function GetPreferences ()
-00222 {
-00223   // si preference n'existe pas, les créer
-00224   $sql="select parameter_type,parameter_value from user_local_pref where user_id='".$this->id."'";
-00225   $Res=ExecSql($this->db,$sql);
-00226   if (pg_NumRows($Res) == 0 ) {
-00227     // default periode
-00228     $sql=sprintf("insert into user_local_pref (user_id,parameter_value,parameter_type) 
-00229                  select '%s',min(p_id),'PERIODE' from parm_periode where p_closed=false",
-00230                  $this->id);
-00231     $Res=ExecSql($this->db,$sql);
-00232 
-00233     $l_array=$this->GetPreferences();
-00234   } else {
-00235     for ( $i =0;$i < pg_NumRows($Res);$i++) {
-00236       $row= pg_fetch_array($Res,0);
-00237       $type=$row['parameter_type'];
-00238       $l_array[$type]=$row['parameter_value'];
-00239     }
-00240   }
-00241   return $l_array;
-00242 }
-00243 /* function CheckAction
-00244  * Purpose : Check if an user is allowed to do an action
-00245  * 
-00246  * parm : 
-00247  *      - p_dossier dossier id
-00248  *      - p_login   user's login
-00249  *      - p_action_id 
-00250  * gen :
-00251  *      -
-00252  * return:
-00253  *      - 0 no priv
-00254  *      - 1 priv granted
-00255  *
-00256  */ 
-00257  function CheckAction ( $p_cn,$p_action_id)
+00143   function Admin() {
+00144     $res=0;
+00145     
+00146     if ( $this->id != 'phpcompta') {
+00147       $pass5=md5($this->pass);
+00148       $sql="select use_id from ac_users where use_login='$this->id'
+00149                 and use_active=1 and use_admin=1 and use_pass='$pass5'";
+00150       
+00151       $cn=DbConnect();
+00152       
+00153       $this->admin=CountSql($cn,$sql);
+00154     } else $this->admin=1;
+00155     
+00156     return $this->admin;
+00157   }
+00158   function AccessJrn($p_cn,$p_jrn_id) {
+00159     $this->Admin();
+00160     if ( $this->admin==1) return true;
+00161     $sql=CountSql($p_cn,"select uj_id 
+00162                              from user_sec_jrn 
+00163                              where
+00164                              uj_priv in ('R','W')
+00165                              and uj_jrn_id=".$p_jrn_id.
+00166                   "  and uj_login = '".$this->id."'");
+00167     if ( $sql != 0 ) return true;
+00168     return false;
+00169         
+00170   }
+00178 function SetPeriode($p_periode) {
+00179   $sql="update user_local_pref set parameter_value='$p_periode' where user_id='$this->id' and parameter_type='PERIODE'";
+00180   $Res=ExecSql($this->db,$sql);
+00181 }
+00192 function GetPeriode() {
+00193   $array=$this->GetPreferences();
+00194   return $array['PERIODE'];
+00195 }
+00204 function GetPreferences ()
+00205 {
+00206   // si preference n'existe pas, les créer
+00207   $sql="select parameter_type,parameter_value from user_local_pref where user_id='".$this->id."'";
+00208   $Res=ExecSql($this->db,$sql);
+00209   if (pg_NumRows($Res) == 0 ) {
+00210     // default periode
+00211     $sql=sprintf("insert into user_local_pref (user_id,parameter_value,parameter_type) 
+00212                  select '%s',min(p_id),'PERIODE' from parm_periode where p_closed=false",
+00213                  $this->id);
+00214     $Res=ExecSql($this->db,$sql);
+00215 
+00216     $l_array=$this->GetPreferences();
+00217   } else {
+00218     for ( $i =0;$i < pg_NumRows($Res);$i++) {
+00219       $row= pg_fetch_array($Res,0);
+00220       $type=$row['parameter_type'];
+00221       $l_array[$type]=$row['parameter_value'];
+00222     }
+00223   }
+00224   return $l_array;
+00225 }
+00237  function CheckAction ( $p_cn,$p_action_id)
+00238 {
+00239 
+00240   if ( $this->admin==1 ) return 1;
+00241 
+00242   $Res=ExecSql($p_cn,"select * from user_sec_act where ua_login='".$this->id."' and ua_act_id=$p_action_id");
+00243   $Count=pg_NumRows($Res);
+00244   if ( $Count == 0 ) return 0;
+00245   if ( $Count == 1 ) return 1;
+00246   echo "<H2 class=\"error\"> Invalid action !!! $Count select * from user_sec_act where ua_login='$p_login' and ua_act_id=$p_action_id </H2>";
+00247 }
+00257 function GetGlobalPref() 
 00258 {
-00259 
-00260   if ( $this->admin==1 ) return 1;
-00261 
-00262   $Res=ExecSql($p_cn,"select * from user_sec_act where ua_login='".$this->id."' and ua_act_id=$p_action_id");
-00263   $Count=pg_NumRows($Res);
-00264   if ( $Count == 0 ) return 0;
-00265   if ( $Count == 1 ) return 1;
-00266   echo "<H2 class=\"error\"> Invalid action !!! $Count select * from user_sec_act where ua_login='$p_login' and ua_act_id=$p_action_id </H2>";
-00267 }
-00268 /* function GetGlobalPref
-00269  **************************************************
-00270  * Purpose : Get the global preferences from user_global_pref
-00271  *        in the account_repository db
-00272  * parm : 
-00273  *      - set g_variable
-00274  * gen :
-00275  *      - none
-00276  * return:
-00277  *     - none
-00278  */
-00279 
-00280 
-00281 function GetGlobalPref() 
-00282 {
-00283         echo_debug('class_user.php',__LINE__,"function GetGlobalPref");
-00284   $cn=Dbconnect();
-00285   // Load everything in an array
-00286   $Res=ExecSql ($cn,"select parameter_type,parameter_value from 
-00287                   user_global_pref
-00288                   where user_id='".$this->id."'");
-00289   $Max=pg_NumRows($Res);
-00290   if (  $Max == 0 ) {
-00291           $this->insert_default_global_pref();
-00292           $this->GetGlobalPref();
-00293           return;
-00294           }
-00295   // Load value into array
-00296   $line=array();
-00297   for ($i=0;$i<$Max;$i++) {
-00298     $row=pg_fetch_array($Res,$i);
-00299     $type=$row['parameter_type']; 
-00300     $line[$type]=$row['parameter_value'];;
-00301   }
-00302   // save array into g_ variable
-00303   $array_pref=array ('g_theme'=>'THEME','g_pagesize'=>'PAGESIZE');
-00304   foreach ($array_pref as $name=>$parameter ) {
-00305           if ( ! isset ($line[$parameter]) ) {
-00306                   echo_debug("Missing pref : ".$parameter);
-00307                   $this->insert_default_global_pref($parameter);
-00308                 $this->GetGlobalPref();
-00309                 return;
-00310                 }       
-00311     $_SESSION[$name]=$line[$parameter];
-00312   }
-00313 }
-00314 
-00315 /* function insert_default_global_pref
-00316  **************************************************
-00317  * Purpose : insert default pref
-00318  *        if no parameter are given insert all the existing 
-00319  *        parameter otherwise only the requested
-00320  * parm : 
-00321  *      - parameter's type or nothing
-00322  * gen :
-00323  *      - none
-00324  * return: nothing
-00325  */
-00326 function insert_default_global_pref($p_type="",$p_value="") {
-00327         echo_debug('class_user.php',__LINE__,"function insert_default_global_pref");
-00328         echo_debug('class_user.php',__LINE__,"parameter p_type $p_type p_value  $p_value");
-00329 
-00330         $default_parameter= array("THEME"=>"Light",
-00331                 "PAGESIZE"=>"50");
-00332         $cn=Dbconnect();
-00333         $Sql="insert into user_global_pref(user_id,parameter_type,parameter_value) 
-00334                                 values ('%s','%s','%s')";
-00335         if ( $p_type == "" ) {
-00336                 foreach ( $default_parameter as $name=>$value) {
-00337                         $Insert=sprintf($Sql,$this->id,$name,$value);
-00338                         ExecSql($cn,$Insert);
-00339                 }
-00340         }
-00341         else {
-00342                 $value=($p_value=="")?$default_parameter[$p_type]:$p_value;
-00343                 $Insert=sprintf($Sql,$this->id,$p_type,$value);
-00344                 ExecSql($cn,$Insert);
-00345         }
-00346 
-00347 
-00348 }
-00349 
-00350 /* function update_global_pref
-00351  **************************************************
-00352  * Purpose : update default pref
-00353  *           if value is not given then use the default value
-00354  * parm : 
-00355  *      - parameter's type 
-00356  *      - parameter's value value of the type
-00357  * gen :
-00358  *      - none
-00359  * return: nothing
-00360  */
-00361 function update_global_pref($p_type,$p_value="") {
-00362         $default_parameter= array("THEME"=>"Light",
-00363                 "PAGESIZE"=>"50");
-00364         $cn=Dbconnect();
-00365         $Sql="update user_global_pref set parameter_value='%s' 
-00366                         where parameter_type='%s' and 
-00367                                 user_id='%s'";
-00368         $value=($p_value=="")?$default_parameter[$p_type]:$p_value;
-00369         $Update=sprintf($Sql,$value,$p_type,$this->id);
-00370         ExecSql($cn,$Update);
-00371 
-00372  }//end function
-00373 }
-00374 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00259 echo_debug('class_user.php',__LINE__,"function GetGlobalPref"); +00260 $cn=Dbconnect(); +00261 // Load everything in an array +00262 $Res=ExecSql ($cn,"select parameter_type,parameter_value from +00263 user_global_pref +00264 where user_id='".$this->id."'"); +00265 $Max=pg_NumRows($Res); +00266 if ( $Max == 0 ) { +00267 $this->insert_default_global_pref(); +00268 $this->GetGlobalPref(); +00269 return; +00270 } +00271 // Load value into array +00272 $line=array(); +00273 for ($i=0;$i<$Max;$i++) { +00274 $row=pg_fetch_array($Res,$i); +00275 $type=$row['parameter_type']; +00276 $line[$type]=$row['parameter_value'];; +00277 } +00278 // save array into g_ variable +00279 $array_pref=array ('g_theme'=>'THEME','g_pagesize'=>'PAGESIZE'); +00280 foreach ($array_pref as $name=>$parameter ) { +00281 if ( ! isset ($line[$parameter]) ) { +00282 echo_debug("Missing pref : ".$parameter); +00283 $this->insert_default_global_pref($parameter); +00284 $this->GetGlobalPref(); +00285 return; +00286 } +00287 $_SESSION[$name]=$line[$parameter]; +00288 } +00289 } +00290 +00299 function insert_default_global_pref($p_type="",$p_value="") { +00300 echo_debug('class_user.php',__LINE__,"function insert_default_global_pref"); +00301 echo_debug('class_user.php',__LINE__,"parameter p_type $p_type p_value $p_value"); +00302 +00303 $default_parameter= array("THEME"=>"Light", +00304 "PAGESIZE"=>"50"); +00305 $cn=Dbconnect(); +00306 $Sql="insert into user_global_pref(user_id,parameter_type,parameter_value) +00307 values ('%s','%s','%s')"; +00308 if ( $p_type == "" ) { +00309 foreach ( $default_parameter as $name=>$value) { +00310 $Insert=sprintf($Sql,$this->id,$name,$value); +00311 ExecSql($cn,$Insert); +00312 } +00313 } +00314 else { +00315 $value=($p_value=="")?$default_parameter[$p_type]:$p_value; +00316 $Insert=sprintf($Sql,$this->id,$p_type,$value); +00317 ExecSql($cn,$Insert); +00318 } +00319 +00320 +00321 } +00322 +00331 function update_global_pref($p_type,$p_value="") { +00332 $default_parameter= array("THEME"=>"Light", +00333 "PAGESIZE"=>"50"); +00334 $cn=Dbconnect(); +00335 $Sql="update user_global_pref set parameter_value='%s' +00336 where parameter_type='%s' and +00337 user_id='%s'"; +00338 $value=($p_value=="")?$default_parameter[$p_type]:$p_value; +00339 $Update=sprintf($Sql,$value,$p_type,$this->id); +00340 ExecSql($cn,$Update); +00341 +00342 }//end function +00343 } +00344 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__user_8php.html b/doc/developper/html/class__user_8php.html index 24d088c28..827cf385a 100644 --- a/doc/developper/html/class__user_8php.html +++ b/doc/developper/html/class__user_8php.html @@ -4,18 +4,26 @@ - + -

class_user.php File Reference

+

class_user.php File Reference

Data & function about connected users. More... +

+

Go to the source code of this file. +

Data Structures

class  cl_user
 Data & function about connected users. More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+Data & function about connected users. +

+ +

+Definition in file class_user.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__widget_8php-source.html b/doc/developper/html/class__widget_8php-source.html index 610bc1259..4b48fff8b 100644 --- a/doc/developper/html/class__widget_8php-source.html +++ b/doc/developper/html/class__widget_8php-source.html @@ -4,7 +4,7 @@ - +

class_widget.php

Go to the documentation of this file.
00001 <?
@@ -27,349 +27,338 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 /*+++
-00022 function    widget
-00023 purpose     create the widget
-00024 parameters  p_type the type of the widget
-00025             p_name     name of widget
-00026             value      widget's value
-00027             readonly   true or false
-00028 +++*/
-00029 class widget {
-00030   var $type;
-00031   var $name;
-00032   var $value;
-00033   var $readonly;
-00034   var $size;
-00035   var $selected;
-00036   var $table;
-00037   var $label;
-00038   var $disabled;
-00039   var $extra;
-00040   var $extra2;
-00041   var $tabindex;
-00042   function widget($p_type="") {
-00043     $this->type=$p_type;
-00044     $this->readonly=false;
-00045     $this->size=20;
-00046     $this->width=50;
-00047     $this->heigh=20;
-00048     $this->value="";
-00049     $this->selected="";
-00050     $this->table=0;
-00051     $this->label="";
-00052     $this->disabled=false;
-00053     $this->tabindex=32767;
-00054   }
-00055   function SetReadOnly($p_read) {
-00056     $this->readonly=$p_read;
-00057   }
-00058   /*  function IOValue($p_name,$p_value="",$p_label="") 
-00059    *****************************************************
-00060    *  purpose : create the corresponding INPUT tag 
-00061    *        
-00062    *  parameters: $p_name is the INPUT NAME
-00063    *          $p_value is the INPUT VALUE or an array for select
-00064    *          $p_label is the label of the INPUT
-00065    *  return : string containing the tag
-00066    */
-00067   function IOValue($p_name=null,$p_value=null,$p_label="") {
-00068     
-00069     if ( $p_name != null)
-00070       $this->name=$p_name;
-00071     $this->value=($p_value===null)?$this->value:$p_value;
-00072     $this->label=($p_label == "")?$this->label:$p_label;
-00073     
-00074     // Input text type
-00075     $disabled = $this->disabled ? "DISABLED" : "";
-00076     if (strtoupper($this->type)=="TEXT") {
-00077       if ( $this->readonly==false) {
-00078         $r="<INPUT TYPE=\"TEXT\" NAME=\"$this->name\" VALUE=\"$this->value\" TABINDEX=\"$this->tabindex\" SIZE=\"$this->size\" ".$disabled.">";} else {
-00079             $r=sprintf('<span>%s</span><input type="hidden" name="%s" value="%s">', $this->value,$this->name,$this->value);
-00080         }
-00081         
-00082       if ($this->table==1) {
-00083         if ( $this->label != "") {
-00084           $r="<TD>".$this->label."</TD><TD>".$r."</TD>";
-00085         }else {
-00086           $r="<TD>".$r."</TD>";
-00087         }
-00088       }
-00089       return $r;
-00090     }
-00091     // Hidden field
-00092     if (strtoupper($this->type)=="HIDDEN") {
-00093       $r='<INPUT TYPE="HIDDEN" name="'.$this->name.'" value="'.$this->value.'">';
-00094       if ( $this->readonly==true) return "";
-00095       return $r;
-00096     }
-00097     // Select value
-00098     if ( strtoupper($this->type) == "SELECT") {
-00099       if ($this->readonly==false ){
-00100               //echo "<b>Selected <b>".$this->selected;
-00101       $r="<SELECT NAME=\"$this->name\">";
-00102       for ( $i=0;$i<sizeof($this->value);$i++) {
-00103         $checked=($this->selected==$this->value[$i]['value'])?"SELECTED":"";
-00104         $r.='<OPTION VALUE="'.$this->value[$i]['value'].'" '.$checked.'>';
-00105         $r.=$this->value[$i]['label'];
-00106       }
-00107       $r.="</SELECT>";
-00108       } else {
-00109         echo_debug('class_widget.php',__LINE__,"this->selected = ".$this->selected); 
-00110         for ( $i=0;$i<sizeof($this->value);$i++) {
-00111           echo_debug('class_widget.php',__LINE__,"check for ".$this->value[$i]['value']);
-00112           if ($this->selected==$this->value[$i]['value'] ) {
-00113             $r=$this->value[$i]['label'];
-00114         
-00115           }
-00116         }
-00117       }
-00118       if ( $this->table==1) {
-00119         $r="<TD> $r </TD>";
-00120         if ( $this->label != "") $r="<TD> $this->label</TD>".$r;
-00121       }
-00122       return $r;
-00123     }
-00124     // Password
-00125     if (strtoupper($this->type)=="PASSWORD") {
-00126       if ( $this->readonly==true) return "";
-00127       $r='<input type="password" name="'.$this->name;
-00128       $r.='">';
-00129       if ($this->table==1) {
-00130         $r="<TD> $this->label </TD><TD> $r </TD>";
-00131       }
-00132       return $r;
-00133     }
-00134 
-00135     // Checkbox
-00136     if (strtoupper($this->type)=="CHECKBOX") {
-00137       if ( $this->readonly == true) {
-00138         $check=( $this->selected==true )?"checked":"unchecked";
-00139         $r='<input type="CHECKBOX" name="'.$this->name.'"';
-00140         $r.="  $check";
-00141         $r.=' disabled>';
-00142 
-00143       } else {
-00144         $check=( $this->selected==true )?"checked":"unchecked";
-00145         $r='<input type="CHECKBOX" name="'.$this->name.'"';
-00146         $r.="  $check";
-00147         $r.=' '.$disabled.'>';
+00021 
+00032 class widget {
+00047   var $type;
+00048   var $name;
+00049   var $value;
+00050   var $readonly;
+00051   var $size;
+00052   var $selected;
+00053   var $table;
+00054   var $label;
+00055   var $disabled;
+00056   var $extra;
+00057   var $extra2;
+00058   var $tabindex;
+00059   function widget($p_type="") {
+00060     $this->type=$p_type;
+00061     $this->readonly=false;
+00062     $this->size=20;
+00063     $this->width=50;
+00064     $this->heigh=20;
+00065     $this->value="";
+00066     $this->selected="";
+00067     $this->table=0;
+00068     $this->label="";
+00069     $this->disabled=false;
+00070     $this->tabindex=32767;
+00071   }
+00072   function SetReadOnly($p_read) {
+00073     $this->readonly=$p_read;
+00074   }
+00084   function IOValue($p_name=null,$p_value=null,$p_label="") {
+00085     
+00086     if ( $p_name != null)
+00087       $this->name=$p_name;
+00088     $this->value=($p_value===null)?$this->value:$p_value;
+00089     $this->label=($p_label == "")?$this->label:$p_label;
+00090     
+00091     // Input text type
+00092     $disabled = $this->disabled ? "DISABLED" : "";
+00093     if (strtoupper($this->type)=="TEXT") {
+00094       if ( $this->readonly==false) {
+00095         $r="<INPUT TYPE=\"TEXT\" NAME=\"$this->name\" VALUE=\"$this->value\" TABINDEX=\"$this->tabindex\" SIZE=\"$this->size\" ".$disabled.">";} else {
+00096             $r=sprintf('<span>%s</span><input type="hidden" name="%s" value="%s">', $this->value,$this->name,$this->value);
+00097         }
+00098         
+00099       if ($this->table==1) {
+00100         if ( $this->label != "") {
+00101           $r="<TD>".$this->label."</TD><TD>".$r."</TD>";
+00102         }else {
+00103           $r="<TD>".$r."</TD>";
+00104         }
+00105       }
+00106       return $r;
+00107     }
+00108     // Hidden field
+00109     if (strtoupper($this->type)=="HIDDEN") {
+00110       $r='<INPUT TYPE="HIDDEN" name="'.$this->name.'" value="'.$this->value.'">';
+00111       if ( $this->readonly==true) return "";
+00112       return $r;
+00113     }
+00114     // Select value
+00115     if ( strtoupper($this->type) == "SELECT") {
+00116       if ($this->readonly==false ){
+00117               //echo "<b>Selected <b>".$this->selected;
+00118       $r="<SELECT NAME=\"$this->name\">";
+00119       for ( $i=0;$i<sizeof($this->value);$i++) {
+00120         $checked=($this->selected==$this->value[$i]['value'])?"SELECTED":"";
+00121         $r.='<OPTION VALUE="'.$this->value[$i]['value'].'" '.$checked.'>';
+00122         $r.=$this->value[$i]['label'];
+00123       }
+00124       $r.="</SELECT>";
+00125       } else {
+00126         echo_debug('class_widget.php',__LINE__,"this->selected = ".$this->selected); 
+00127         for ( $i=0;$i<sizeof($this->value);$i++) {
+00128           echo_debug('class_widget.php',__LINE__,"check for ".$this->value[$i]['value']);
+00129           if ($this->selected==$this->value[$i]['value'] ) {
+00130             $r=$this->value[$i]['label'];
+00131         
+00132           }
+00133         }
+00134       }
+00135       if ( $this->table==1) {
+00136         $r="<TD> $r </TD>";
+00137         if ( $this->label != "") $r="<TD> $this->label</TD>".$r;
+00138       }
+00139       return $r;
+00140     }
+00141     // Password
+00142     if (strtoupper($this->type)=="PASSWORD") {
+00143       if ( $this->readonly==true) return "";
+00144       $r='<input type="password" name="'.$this->name;
+00145       $r.='">';
+00146       if ($this->table==1) {
+00147         $r="<TD> $this->label </TD><TD> $r </TD>";
 00148       }
-00149       if ($this->table==1) {
-00150         $r="<TD> $this->label </TD><TD> $r </TD>";
-00151       } else {
-00152         $r=$r." $this->label";
-00153       }
-00154       return $r;
-00155     }
-00156 
-00157     //radio
-00158     if (strtoupper($this->type)=="RADIO") {
-00159       if ( $this->readonly == true) {
-00160         $check=( $this->selected==true || $this->selected=='t' )?"Yes":"no";
-00161         $r=$check;
-00162       } else {
-00163         $check=( $this->selected==true||$this->selected=='t' )?"checked":"unchecked";
-00164         $r='<input type="RADIO" name="'.$this->name.'"';
-00165         $r.=" VALUE=\"$this->value\"";
-00166         $r.="  $check";
-00167         $r.=' '.$disabled.'>';
-00168       }
-00169       if ($this->table==1) {
-00170         $r="<TD> $this->label </TD><TD> $r </TD>";
-00171       } else {
-00172         $r=$this->label.$r;
-00173       }
-00174       return $r;
-00175     }
-00176 
-00177     //textarea
-00178     if (strtoupper($this->type)=="TEXTAREA") {
-00179       if ( $this->readonly == false ) {
-00180         $r='<TEXTAREA name="'.$this->name.'"';
-00181         $r.=" rows=\"$this->heigh\" ";
-00182         $r.=" cols=\"$this->width\" ";
-00183         $r.=' '.$disabled.'>';
-00184         $r.=$this->value;
-00185 
-00186         $r.="</TEXTAREA>";
-00187       } else {
-00188         $r='<p>';
-00189         $r.=$this->value;
-00190         $r.='</p>';
-00191       }
-00192       if ($this->table==1) {
-00193         $r="<TD> $this->label </TD><TD> $r </TD>";
-00194       }
-00195       return $r;
-00196     }
-00197 
-00198     //file
-00199     if (strtoupper($this->type)=="FILE") {
-00200       if ( $this->readonly == false ) {
-00201         $r='<INPUT TYPE="file" name="'.$this->name.'" VALUE="'.$this->value.'">';
+00149       return $r;
+00150     }
+00151 
+00152     // Checkbox
+00153     if (strtoupper($this->type)=="CHECKBOX") {
+00154       if ( $this->readonly == true) {
+00155         $check=( $this->selected==true )?"checked":"unchecked";
+00156         $r='<input type="CHECKBOX" name="'.$this->name.'"';
+00157         $r.="  $check";
+00158         $r.=' disabled>';
+00159 
+00160       } else {
+00161         $check=( $this->selected==true )?"checked":"unchecked";
+00162         $r='<input type="CHECKBOX" name="'.$this->name.'"';
+00163         $r.="  $check";
+00164         $r.=' '.$disabled.'>';
+00165       }
+00166       if ($this->table==1) {
+00167         $r="<TD> $this->label </TD><TD> $r </TD>";
+00168       } else {
+00169         $r=$r." $this->label";
+00170       }
+00171       return $r;
+00172     }
+00173 
+00174     //radio
+00175     if (strtoupper($this->type)=="RADIO") {
+00176       if ( $this->readonly == true) {
+00177         $check=( $this->selected==true || $this->selected=='t' )?"Yes":"no";
+00178         $r=$check;
+00179       } else {
+00180         $check=( $this->selected==true||$this->selected=='t' )?"checked":"unchecked";
+00181         $r='<input type="RADIO" name="'.$this->name.'"';
+00182         $r.=" VALUE=\"$this->value\"";
+00183         $r.="  $check";
+00184         $r.=' '.$disabled.'>';
+00185       }
+00186       if ($this->table==1) {
+00187         $r="<TD> $this->label </TD><TD> $r </TD>";
+00188       } else {
+00189         $r=$this->label.$r;
+00190       }
+00191       return $r;
+00192     }
+00193 
+00194     //textarea
+00195     if (strtoupper($this->type)=="TEXTAREA") {
+00196       if ( $this->readonly == false ) {
+00197         $r.='<TEXTAREA name="'.$this->name.'"';
+00198         $r.=" rows=\"$this->heigh\" ";
+00199         $r.=" cols=\"$this->width\" ";
+00200         $r.=' '.$disabled.'>';
+00201         $r.=$this->value;
 00202 
-00203       }
-00204       if ( $this->table==1) $r="<TD>$this->label</TD><TD>$r</TD>"; 
-00205       return $r;
-00206     }
-00207   // input type == js_search_poste => button search for the account
-00208     if ( strtolower($this->type)=="js_search_poste") {
-00209      
-00210       $l_sessid=$_REQUEST['PHPSESSID'];
-00211       if ( $this->readonly == false ) {
-00212       // Do we need to filter ??
-00213       if ( $this->extra2 == null ) {
-00214       $r=sprintf('<TD>
-00215          <INPUT TYPE="button" onClick=SearchPoste(\'%s\',\'%s\',\'%s\') value="Search">
-00216             %s</TD><TD> 
+00203         $r.="</TEXTAREA>";
+00204       } else {
+00205         $r='<p>';
+00206         $r.=$this->value;
+00207         $r.=sprintf('<input type="hidden" name="%s" value="%s">',
+00208                     $this->name,urlencode($this->value));
+00209         $r.='</p>';
+00210 
+00211       }
+00212       if ($this->table==1) {
+00213         $r="<TD> $this->label </TD><TD> $r </TD>";
+00214       }
+00215       return $r;
+00216     }
 00217 
-00218              <INPUT TYPE="Text" NAME="%s" VALUE="%s" SIZE="8">
-00219                  </TD>',
-00220                  $l_sessid,
-00221                  $this->name,
-00222                  $this->extra,
-00223                  $this->label,
-00224                  $this->name,
-00225                  $this->value 
-00226                  );
-00227 
-00228     } else { // $p_list is not null, so we have a filter
-00229       $r=sprintf('<TD>
-00230          <INPUT TYPE="button" onClick=SearchPosteFilter(\'%s\',\'%s\',\'%s\',\'%s\') value="Search">
-00231             %s</TD><TD> 
-00232 
-00233              <INPUT TYPE="Text" NAME="%s" VALUE="%s" SIZE="8">
-00234                  </TD>',
-00235                  $l_sessid,
-00236                  $this->name,
-00237                  $this->extra2,
-00238                  $this->extra,
-00239                  $this->label,
-00240                  $this->name,
-00241                  $this->value 
-00242                  );
-00243 
-00244       } //else
-00245       } else {
-00246       $r=sprintf('<TD><input type="hidden" name="%s" value="%s">
-00247                   %s
-00248 
-00249                  </TD>',
-00250                  $this->name, 
-00251                  $this->value ,
-00252                  $this->value 
-00253                  );
-00254 
-00255       } //else if readonly == true
-00256       return $r;
-00257 
-00258     } // end js_search_poste
-00259 
-00260   // input type == js_search => button search for card
-00261   if ( strtolower($this->type)=="js_search") {
-00262     $l_sessid=$_REQUEST['PHPSESSID'];
-00263     if  ( $this->readonly == false ) {
-00264       $r=sprintf('<TD>
-00265          <INPUT TYPE="button" onClick=NewCard(\'%s\',\'%s\',\'%s\',\'%s\') value="New">
-00266          <INPUT TYPE="button" onClick=SearchCard(\'%s\',\'%s\',\'%s\',\'%s\') value="Search">
-00267             %s</TD><TD> <INPUT TYPE="Text" NAME="%s" VALUE="%s" SIZE="8" TABINDEX="%s">
-00268                  ',
-00269                $l_sessid,
-00270                $this->extra, // deb or cred
-00271                $this->name,
-00272                $this->extra2, //jrn
-00273                $l_sessid,
-00274                $this->extra,
-00275                $this->name,
-00276                $this->extra2,
-00277                $this->label,
-00278                $this->name,
-00279                $this->value, 
-00280          $this->tabindex
-00281                );
-00282     } else {
-00283       // readonly == true
-00284       $r=sprintf('<TD>            %s</TD>
-00285                  <TD> 
-00286                  <INPUT TYPE="hidden" NAME="%s" VALUE="%s" SIZE="8">
-00287                  </TD>',
-00288                $this->label,
-00289                $this->name,
-00290                $this->value 
-00291                  );
-00292 
-00293     }
-00294     return $r;
-00295   }// poste==js_search
-00296   // type=span
-00297   if ( strtolower($this->type)=="span") {
-00298     $r=sprintf('<span id="%s">%s</span>',
-00299                $this->name,
-00300                $this->value);
-00301     return $r;
-00302   }// end type = span
-00303 
-00304    // input type == js_tva
-00305    if ( strtolower($this->type)=="js_tva") {
-00306      $id=sprintf("<span id=%s></span>",$this->label);
-00307         $r=sprintf('%s<TD> <INPUT TYPE="Text" NAME="%s" VALUE="%s" SIZE="3" onChange="ChangeTVA(\'%s\',\'%s\');">',
-00308                   $id,
+00218     //file
+00219     if (strtoupper($this->type)=="FILE") {
+00220       if ( $this->readonly == false ) {
+00221         $r='<INPUT TYPE="file" name="'.$this->name.'" VALUE="'.$this->value.'">';
+00222 
+00223       }
+00224       if ( $this->table==1) $r="<TD>$this->label</TD><TD>$r</TD>"; 
+00225       return $r;
+00226     }
+00227   // input type == js_search_poste => button search for the account
+00228     if ( strtolower($this->type)=="js_search_poste") {
+00229      
+00230       $l_sessid=$_REQUEST['PHPSESSID'];
+00231       if ( $this->readonly == false ) {
+00232       // Do we need to filter ??
+00233       if ( $this->extra2 == null ) {
+00234       $r=sprintf('<TD>
+00235          <INPUT TYPE="button" onClick=SearchPoste(\'%s\',\'%s\',\'%s\') value="Search">
+00236             %s</TD><TD> 
+00237 
+00238              <INPUT TYPE="Text" NAME="%s" VALUE="%s" SIZE="8">
+00239                  </TD>',
+00240                  $l_sessid,
+00241                  $this->name,
+00242                  $this->extra,
+00243                  $this->label,
+00244                  $this->name,
+00245                  $this->value 
+00246                  );
+00247 
+00248     } else { // $p_list is not null, so we have a filter
+00249       $r=sprintf('<TD>
+00250          <INPUT TYPE="button" onClick=SearchPosteFilter(\'%s\',\'%s\',\'%s\',\'%s\') value="Search">
+00251             %s</TD><TD> 
+00252 
+00253              <INPUT TYPE="Text" NAME="%s" VALUE="%s" SIZE="8">
+00254                  </TD>',
+00255                  $l_sessid,
+00256                  $this->name,
+00257                  $this->extra2,
+00258                  $this->extra,
+00259                  $this->label,
+00260                  $this->name,
+00261                  $this->value 
+00262                  );
+00263 
+00264       } //else
+00265       } else {
+00266       $r=sprintf('<TD><input type="hidden" name="%s" value="%s">
+00267                   %s
+00268 
+00269                  </TD>',
+00270                  $this->name, 
+00271                  $this->value ,
+00272                  $this->value 
+00273                  );
+00274 
+00275       } //else if readonly == true
+00276       return $r;
+00277 
+00278     } // end js_search_poste
+00279 
+00280   // input type == js_search => button search for card
+00281   if ( strtolower($this->type)=="js_search") {
+00282     $l_sessid=$_REQUEST['PHPSESSID'];
+00283     if  ( $this->readonly == false ) {
+00284       $r=sprintf('<TD>
+00285          <INPUT TYPE="button" onClick=NewCard(\'%s\',\'%s\',\'%s\',\'%s\') value="New">
+00286          <INPUT TYPE="button" onClick=SearchCard(\'%s\',\'%s\',\'%s\',\'%s\') value="Search">
+00287             %s</TD><TD> <INPUT TYPE="Text" NAME="%s" VALUE="%s" SIZE="8" TABINDEX="%s">
+00288                  ',
+00289                $l_sessid,
+00290                $this->extra, // deb or cred
+00291                $this->name,
+00292                $this->extra2, //jrn
+00293                $l_sessid,
+00294                $this->extra,
+00295                $this->name,
+00296                $this->extra2,
+00297                $this->label,
+00298                $this->name,
+00299                $this->value, 
+00300          $this->tabindex
+00301                );
+00302     } else {
+00303       // readonly == true
+00304       $r=sprintf('<TD>            %s</TD>
+00305                  <TD> 
+00306                  <INPUT TYPE="hidden" NAME="%s" VALUE="%s" SIZE="8">
+00307                  </TD>',
+00308                $this->label,
 00309                $this->name,
-00310                $this->value,
-00311                $this->label,
-00312                $this->name);
-00313      $l_sessid=$_REQUEST['PHPSESSID'];
-00314      $r.=sprintf("<input type=\"button\" value=\"Tva\" 
-00315         onClick=\"
-00316                            ShowTva('%s','%s');\"></TD>",
-00317                 $l_sessid,$this->name);
-00318      return $r;
-00319    }
-00320 
-00321   // input type == js_concerned => button search for the concerned operations
-00322   if ( strtolower($this->type)=="js_concerned") {
-00323     if ( $this->readonly == false) {
-00324       $l_sessid=$_REQUEST['PHPSESSID'];
-00325       $r=sprintf('<TD>
-00326          <INPUT TYPE="button" onClick=SearchJrn(\'%s\',\'%s\') value="Search">
-00327             %s</TD><TD> 
-00328 
-00329              <INPUT TYPE="Text" NAME="%s" VALUE="%s" SIZE="8">
-00330                  </TD>',
-00331                  $l_sessid,
-00332                  $this->name,
-00333                  $this->label,
-00334                  $this->name,
-00335                  $this->value 
-00336                  );
-00337     } else {
-00338       $r=sprintf("<TD><span>%s</span>",$this->value);
-00339       $r.=sprintf('<input type="hidden" name="%s" value="%s"></TD>', $this->name,$this->value);
-00340     }
-00341 
-00342     return $r;
-00343   }// end js_concerned
-00344   return "INVALID WIDGET ";
-00345   } //end function
-00346   /* Debug
-00347    */
-00348   function debug() {
-00349     echo "Type ".$this->type."<br>";
-00350     echo "name ".$this->name."<br>";
-00351     echo "value". $this->value."<br>";
-00352     $readonly=($this->readonly==false)?"false":"true";
-00353     echo "read only".$readonly."<br>";
-00354   }
-00355   function Submit ($p_name,$p_value) {
-00356     return '<INPUT TYPE="SUBMIT" NAME="'.$p_name.'" VALUE="'.$p_value.'">';
-00357   }
-00358   function Reset ($p_value) {
-00359     return '<INPUT TYPE="SUBMIT"  VALUE="'.$p_value.'">';
-00360   }
-00361 
-00362 }
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00310 $this->value +00311 ); +00312 +00313 } +00314 return $r; +00315 }// poste==js_search +00316 +00317 +00318 // type=span +00319 if ( strtolower($this->type)=="span") { +00320 $r=sprintf('<span id="%s" >%s</span>', +00321 $this->name, +00322 $this->value); +00323 return $r; +00324 }// end type = span +00325 +00326 // input type == js_tva +00327 if ( strtolower($this->type)=="js_tva") { +00328 $id=sprintf("<span id=%s></span>",$this->label); +00329 $r=sprintf('%s<TD> <INPUT TYPE="Text" NAME="%s" VALUE="%s" SIZE="3" onChange="ChangeTVA(\'%s\',\'%s\');">', +00330 $id, +00331 $this->name, +00332 $this->value, +00333 $this->label, +00334 $this->name); +00335 $l_sessid=$_REQUEST['PHPSESSID']; +00336 $r.=sprintf("<input type=\"button\" value=\"Tva\" +00337 onClick=\" +00338 ShowTva('%s','%s');\"></TD>", +00339 $l_sessid,$this->name); +00340 return $r; +00341 } +00342 +00343 // input type == js_concerned => button search for the concerned operations +00344 if ( strtolower($this->type)=="js_concerned") { +00345 if ( $this->readonly == false) { +00346 $l_sessid=$_REQUEST['PHPSESSID']; +00347 $r=sprintf('<TD> +00348 <INPUT TYPE="button" onClick=SearchJrn(\'%s\',\'%s\') value="Search"> +00349 %s</TD><TD> +00350 +00351 <INPUT TYPE="Text" NAME="%s" VALUE="%s" SIZE="8"> +00352 </TD>', +00353 $l_sessid, +00354 $this->name, +00355 $this->label, +00356 $this->name, +00357 $this->value +00358 ); +00359 } else { +00360 $r=sprintf("<TD><span>%s</span>",$this->value); +00361 $r.=sprintf('<input type="hidden" name="%s" value="%s"></TD>', $this->name,$this->value); +00362 } +00363 +00364 return $r; +00365 }// end js_concerned +00366 return "INVALID WIDGET "; +00367 } //end function +00368 /* Debug +00369 */ +00370 function debug() { +00371 echo "Type ".$this->type."<br>"; +00372 echo "name ".$this->name."<br>"; +00373 echo "value". $this->value."<br>"; +00374 $readonly=($this->readonly==false)?"false":"true"; +00375 echo "read only".$readonly."<br>"; +00376 } +00377 function Submit ($p_name,$p_value) { +00378 return '<INPUT TYPE="SUBMIT" NAME="'.$p_name.'" VALUE="'.$p_value.'">'; +00379 } +00380 function Reset ($p_value) { +00381 return '<INPUT TYPE="SUBMIT" VALUE="'.$p_value.'">'; +00382 } +00383 +00384 } +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/class__widget_8php.html b/doc/developper/html/class__widget_8php.html index 756900d90..10dcd60f7 100644 --- a/doc/developper/html/class__widget_8php.html +++ b/doc/developper/html/class__widget_8php.html @@ -4,18 +4,26 @@ - + -

class_widget.php File Reference

+

class_widget.php File Reference

This class is used to create all the HTML INPUT TYPE. More... +

+

Go to the source code of this file. +

Data Structures

class  widget
 class widget This class is used to create all the HTML INPUT TYPE and some specials which works with javascript like js_search More...
-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

Detailed Description

+This class is used to create all the HTML INPUT TYPE. +

+ +

+Definition in file class_widget.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/classcl__user.html b/doc/developper/html/classcl__user.html index fdfdb4747..457b86dca 100644 --- a/doc/developper/html/classcl__user.html +++ b/doc/developper/html/classcl__user.html @@ -4,34 +4,46 @@ - -

cl_user Class Reference

+ +

cl_user Class Reference

Data & function about connected users. +More... +

+

+ + + + + + + + + @@ -45,11 +57,11 @@

Public Member Functions

 cl_user ($p_cn, $p_id=-1)
 Check ()
 Check if user is active and exists in therepository Automatically redirect.
 getJrn ()
 Admin ()
 Check if an user is an admin.
 AccessJrn ($p_cn, $p_jrn_id)
 SetPeriode ($p_periode)
 Set the selected periode in the user's preferences.
 GetPeriode ()
 Get the default periode from the user's preferences.
 GetPreferences ()
 Get the default user's preferences.
 CheckAction ($p_cn, $p_action_id)
 Check if an user is allowed to do an action.
 GetGlobalPref ()
 Get the global preferences from user_global_pref in the account_repository db.
 insert_default_global_pref ($p_type="", $p_value="")
 insert default pref if no parameter are given insert all the existing parameter otherwise only the requested
 update_global_pref ($p_type, $p_value="")
 update default pref if value is not given then use the default value

Data Fields

 $id

Detailed Description

- +Data & function about connected users.

-Definition at line 28 of file class_user.php.


Constructor & Destructor Documentation

+Definition at line 33 of file class_user.php.

Constructor & Destructor Documentation

@@ -86,9 +98,9 @@ Definition at line 28

-Definition at line 35 of file class_user.php. +Definition at line 40 of file class_user.php.

-References $_SESSION, $cn, $p_id, $Res, $row, $Sql, DbConnect(), echo_debug(), isValid(), name, and theme. +References $_SESSION, $cn, $p_id, $Res, $row, $Sql, DbConnect(), echo_debug(), isValid(), name, and theme.


Member Function Documentation

@@ -128,9 +140,9 @@ References $_SESSION

-Definition at line 162 of file class_user.php. +Definition at line 158 of file class_user.php.

-References $sql, Admin(), and CountSql(). +References $sql, Admin(), and CountSql().

@@ -157,13 +169,16 @@ References $sql

+Check if an user is an admin. +

+

Returns:
1 for yes 0 for no

-Definition at line 147 of file class_user.php. +Definition at line 143 of file class_user.php.

-References $cn, $pass5, $res, $sql, CountSql(), and DbConnect(). +References $cn, $pass5, $res, $sql, CountSql(), and DbConnect().

-Referenced by AccessJrn(). +Referenced by AccessJrn().

@@ -190,11 +205,13 @@ Referenced by AccessJrn

- +Check if user is active and exists in therepository Automatically redirect. +

+++

Definition at line 85 of file class_user.php.

-References $_SESSION, $cn, $pass5, $r, $res, $ret, $sql, DbConnect(), echo_debug(), exit, GetGlobalPref(), and name. +References $_SESSION, $cn, $pass5, $r, $res, $ret, $sql, DbConnect(), echo_debug(), exit, GetGlobalPref(), and name.

@@ -231,11 +248,25 @@ References $_SESSION

+Check if an user is allowed to do an action. +

+

Parameters:
+ + + + +
p_dossier dossier id
p_login user's login
p_action_id 
+
+
Returns:
    +
  • 0 no priv
+
+
    +
  • 1 priv granted

-Definition at line 257 of file class_user.php. +Definition at line 237 of file class_user.php.

-References $Res, and ExecSql(). +References $Res, and ExecSql().

@@ -262,11 +293,18 @@ References $Res, a

+Get the global preferences from user_global_pref in the account_repository db. +

+

Parameters:
+ + +
set g_variable
+

-Definition at line 281 of file class_user.php. +Definition at line 257 of file class_user.php.

-References $_SESSION, $cn, $Max, $Res, $row, echo_debug(), ExecSql(), insert_default_global_pref(), and name. +References $_SESSION, $cn, $Max, $Res, $row, echo_debug(), ExecSql(), insert_default_global_pref(), and name.

Referenced by Check(). @@ -324,11 +362,20 @@ Definition at line 135<

+Get the default periode from the user's preferences. +

+

Parameters:
+ + + +
$p_cn connexion
$p_user 
+
+
Returns:
the default periode

-Definition at line 205 of file class_user.php. +Definition at line 192 of file class_user.php.

-References $array, and GetPreferences(). +References $array, and GetPreferences().

@@ -355,13 +402,22 @@ References $array, an

+Get the default user's preferences. +

+

Parameters:
+ + + +
$p_cn connexion
$p_user 
+
+
Returns:
array of (parameter_type => parameter_value)

-Definition at line 221 of file class_user.php. +Definition at line 204 of file class_user.php.

-References $Res, $row, $sql, and ExecSql(). +References $Res, $row, $sql, and ExecSql().

-Referenced by GetPeriode(). +Referenced by GetPeriode().

@@ -398,13 +454,20 @@ Referenced by GetPeriod

+insert default pref if no parameter are given insert all the existing parameter otherwise only the requested +

+

Parameters:
+ + +
parameter's type or nothing
+

-Definition at line 326 of file class_user.php. +Definition at line 299 of file class_user.php.

-References $cn, $Sql, echo_debug(), ExecSql(), name, and value. +References $cn, $Sql, echo_debug(), ExecSql(), name, and value.

-Referenced by GetGlobalPref(). +Referenced by GetGlobalPref().

@@ -432,11 +495,19 @@ Referenced by GetGlobal

+Set the selected periode in the user's preferences. +

+

Parameters:
+ + + +
$p_periode periode
- $p_user
+

-Definition at line 188 of file class_user.php. +Definition at line 178 of file class_user.php.

-References $Res, $sql, and ExecSql(). +References $Res, $sql, and ExecSql().

@@ -473,11 +544,19 @@ References $Res, <

+update default pref if value is not given then use the default value +

+

Parameters:
+ + + +
parameter's type
parameter's value value of the type
+

-Definition at line 361 of file class_user.php. +Definition at line 331 of file class_user.php.

-References $cn, $Sql, ExecSql(), and value. +References $cn, $Sql, ExecSql(), and value.


Field Documentation

@@ -503,7 +582,7 @@ References $cn,

-Definition at line 32 of file class_user.php. +Definition at line 37 of file class_user.php.

@@ -528,7 +607,7 @@ Definition at line 32

-Definition at line 31 of file class_user.php. +Definition at line 36 of file class_user.php.

@@ -553,7 +632,7 @@ Definition at line 31

-Definition at line 29 of file class_user.php. +Definition at line 34 of file class_user.php.

@@ -578,7 +657,7 @@ Definition at line 29

-Definition at line 30 of file class_user.php. +Definition at line 35 of file class_user.php.

@@ -603,12 +682,12 @@ Definition at line 30

-Definition at line 33 of file class_user.php. +Definition at line 38 of file class_user.php.


The documentation for this class was generated from the following file:
  • /home/dany/developpement/phpcompta-dev/phpcompta/include/class_user.php
-
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/classfiche.html b/doc/developper/html/classfiche.html index 76036e878..8fa1671d9 100644 --- a/doc/developper/html/classfiche.html +++ b/doc/developper/html/classfiche.html @@ -4,43 +4,71 @@ - -

fiche Class Reference

Inheritance diagram for fiche: +

+

fiche Class Reference

define Class fiche and fiche def, those class are using class attribut +More... +

+

Inheritance diagram for fiche:

-Customer +contact +Customer - + - + + - + + - + + - + + - + + - + + - + - + + - + + - + + - + + - + + + + + + + + + + + + + + + @@ -50,13 +78,15 @@ + +

Public Member Functions

 fiche ($p_cn, $p_id=0)
 getAttribut ()
 GetByQCode ($p_qcode, $p_all=true)
 size ()
 Retrieve a card thx his quick_code complete the object.
 getAttribut ()
 GetByType ($p_fd_id)
 get all the attribute of a card, add missing ones and sort the array ($this->attribut) by ad_id
 size ()
 CountByDef ($p_frd_id, $p_search="")
 give the size of a card object
 GetByType ($p_fd_id)
 GetByDef ($p_frd_id, $p_offset=-1, $p_search="")
 Get all the card where the fiche_def.fd_id is given in parameter.
 CountByDef ($p_frd_id, $p_search="", $p_sql="")
 ShowTable ()
 Return array of card from the frd family.
 GetByDef ($p_frd_id, $p_offset=-1, $p_search="")
 strAttribut ($p_ad_id)
 Return array of card from the frd family.
 ShowTable ()
 blank ($p_fiche_def)
 strAttribut ($p_ad_id)
 Display ($p_readonly)
 return the string of the given attribute (attr_def.ad_id)
 blank ($p_fiche_def)
 Save ($p_fiche_def=0)
 insert a new record show a blank card to be filled
 Display ($p_readonly)
 insert ($p_fiche_def)
 Display object instance, getAttribute sort the attribute and add missing ones.
 Save ($p_fiche_def=0)
 update ()
 Save a card, call insert or update.
 insert ($p_fiche_def)
 remove ()
 insert a new record
 update ()
 update a card
 remove ()
 remove a card
 getName ()
 return the name of a card
 Get ()
 Synonum of fiche::getAttribut.
 GetAll ($p_offset=-1, $p_search="")
 get all the card thanks the fiche_def_ref

Data Fields

 $cn
 $attribut
 $fiche_def_ref

Detailed Description

- +define Class fiche and fiche def, those class are using class attribut

-Definition at line 157 of file class_fiche.php.


Constructor & Destructor Documentation

+Definition at line 148 of file class_fiche.php.

Constructor & Destructor Documentation

@@ -93,15 +123,15 @@ Definition at line 157

-Definition at line 162 of file class_fiche.php. +Definition at line 155 of file class_fiche.php.

-References $p_id. +References $p_id.

-Referenced by Customer::Customer(), GetByDef(), and GetByType(). +Referenced by contact::contact(), Customer::Customer(), GetByDef(), GetByType(), and contact::Summary().


Member Function Documentation

-

+

+References $a, $array, $label, $r, $ret_sql, $sql, $w, echo_debug(), ExecSql(), and table.
@@ -126,14 +156,22 @@ Referenced by Custo

+insert a new record show a blank card to be filled +

+

Parameters:
+ + +
$p_fiche_def is the fiche_def.fd_id
+
+
Returns:
HTML Code

-Definition at line 364 of file class_fiche.php. +Definition at line 397 of file class_fiche.php.

-References $a, $array, $r, $ret_sql, $sql, $w, echo_debug(), ExecSql(), and table.

-

+

- + + + + + + + @@ -167,16 +211,26 @@ References $a,

+Return array of card from the frd family. +

+

Parameters:
+
@@ -148,7 +186,13 @@ References $a, p_search = "" p_search = "",
p_sql = ""
+ + + +
the fiche_def_ref.frd_id
p_search is a filter on the name
p_sql extra sql condition
+

+
Returns:
array of fiche object

-Definition at line 265 of file class_fiche.php. +Definition at line 289 of file class_fiche.php.

-References $a, $Ret, $sql, ExecSql(), and FormatString(). +References $a, $Ret, $sql, ExecSql(), and FormatString().

-Referenced by Customer::Summary(). +Referenced by Customer::Summary(), and contact::Summary(). -

+

+References $a, $label, $r, $ret, $ret_sql, $sql, $w, echo_debug(), and ExecSql().
@@ -201,14 +255,107 @@ Referenced by Custo

+Display object instance, getAttribute sort the attribute and add missing ones. +

+

Parameters:
+ + +
$p_readonly true= if can not modify, otherwise false
+
+
Returns:
string to display

-Definition at line 416 of file class_fiche.php. +Definition at line 459 of file class_fiche.php.

-References $a, $r, $ret, $ret_sql, $sql, $w, echo_debug(), and ExecSql().

-

+

+ + + + +
+ + + + + + + + +
fiche::Get  ) 
+
+ + + + + +
+   + + +

+Synonum of fiche::getAttribut. +

+ +

+Definition at line 761 of file class_fiche.php. +

+References echo_debug(), and getAttribut().

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
fiche::GetAll p_offset = -1,
p_search = ""
+
+ + + + + +
+   + + +

+get all the card thanks the fiche_def_ref +

+

Parameters:
+ + + +
$p_offset (default =-1)
$p_search sql condition
+
+
Returns:
fiche::GetByDef
+ +

+Definition at line 771 of file class_fiche.php. +

+References GetByDef(). +

+Referenced by Customer::Summary(), and contact::Summary().

+

+Referenced by Get(), and GetByQCode().
@@ -232,16 +379,18 @@ References $a,

+get all the attribute of a card, add missing ones and sort the array ($this->attribut) by ad_id +

-Definition at line 177 of file class_fiche.php. +Definition at line 188 of file class_fiche.php.

-References $e, $flag, $i, $Max, $Ret, $row, $sql, $t, ExecSql(), return, and SortAttributeById(). +References $e, $flag, $i, $Max, $Ret, $row, $sql, $t, ExecSql(), return, and SortAttributeById().

-Referenced by Customer::Get().

-

+

+Referenced by GetAll().
@@ -281,16 +430,75 @@ Referenced by Custo

+Return array of card from the frd family. +

+

Parameters:
+ + + +
the fiche_def_ref.frd_id
p_search is an optional filter
+
+
Returns:
array of fiche object

-Definition at line 292 of file class_fiche.php. +Definition at line 315 of file class_fiche.php.

-References $_SESSION, $all, $i, $limit, $Ret, $row, $sql, $t, ExecSql(), fiche(), and return. +References $_SESSION, $all, $i, $limit, $Ret, $row, $sql, $t, ExecSql(), f_id, fiche(), and return.

-Referenced by Customer::GetAll().

-

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
fiche::GetByQCode p_qcode,
p_all = true
+
+ + + + + +
+   + + +

+Retrieve a card thx his quick_code complete the object. +

+GetByQCode($p_qcode)

Parameters:
+ + + +
$p_qcode quick_code (ad_id=23)
$p_all retrieve all the attribut of the card, possible value are true false
+
+
Returns:
0 success 1 error not found
+ +

+Definition at line 167 of file class_fiche.php. +

+References $r, $Res, $sql, echo_debug(), ExecSql(), f_id, FormatString(), and getAttribut().

+

+References $all, $i, $Ret, $row, $sql, $t, ExecSql(), f_id, fiche(), and return.
@@ -315,14 +523,55 @@ Referenced by Custo

+Get all the card where the fiche_def.fd_id is given in parameter. +

+

Parameters:
+ + +
$p_fd_id = fiche_def.fd_id
+
+
Returns:
double array (f_id,fd_id)

-Definition at line 233 of file class_fiche.php. +Definition at line 258 of file class_fiche.php.

-References $all, $i, $Ret, $row, $sql, $t, ExecSql(), fiche(), and return.

-

+

+ + + + +
+ + + + + + + + +
fiche::getName  ) 
+
+ + + + + +
+   + + +

+return the name of a card +

+ +

+Definition at line 749 of file class_fiche.php. +

+References $r, $Res, $sql, and ExecSql().

+

+Referenced by Save().
@@ -347,16 +596,23 @@ References $all

+insert a new record +

+

Parameters:
+ + +
p_fiche_def fiche_def.fd_id
+

-Definition at line 487 of file class_fiche.php. +Definition at line 533 of file class_fiche.php.

-References $fiche_id, $Ret, $sql, CountSql(), echo_debug(), ExecSql(), FormatString(), isNumber(), name, NextSequence(), and value. +References $fiche_id, $Ret, $sql, Commit(), CountSql(), echo_debug(), ExecSql(), FormatString(), isNumber(), name, NextSequence(), StartSql(), and value.

-Referenced by Save().

-

+

+References $Res, $sql, and ExecSql().
@@ -380,14 +636,16 @@ Referenced by Save()

+remove a card +

-Definition at line 670 of file class_fiche.php. +Definition at line 729 of file class_fiche.php.

-References $Res, $sql, and ExecSql().

-

+

+References insert(), and update().
@@ -412,14 +670,21 @@ References $Res, <

+Save a card, call insert or update. +

+

Parameters:
+ + +
p_fiche_def (default 0)
+

-Definition at line 469 of file class_fiche.php. +Definition at line 519 of file class_fiche.php.

-References insert(), and update().

-

+

+Definition at line 348 of file class_fiche.php.
@@ -445,10 +710,10 @@ References insert()

-Definition at line 325 of file class_fiche.php.

-

+

+Definition at line 244 of file class_fiche.php.
@@ -472,12 +737,15 @@ Definition at line 325

+give the size of a card object +

+

Returns:
size

-Definition at line 227 of file class_fiche.php.

-

+

+References $e, $Res, $row, $sql, and ExecSql().
@@ -502,14 +770,23 @@ Definition at line 227

+return the string of the given attribute (attr_def.ad_id) +

+

Parameters:
+ + +
the AD_ID from attr_def.ad_id
+
+
See also:
constant.php
+
Returns:
string

-Definition at line 343 of file class_fiche.php. +Definition at line 364 of file class_fiche.php.

-References $e.

-

+

+Referenced by Save().
@@ -533,13 +810,16 @@ References $e.

+update a card +

+

Todo:
add a check to return an error and rollback operation

-Definition at line 579 of file class_fiche.php. +Definition at line 633 of file class_fiche.php.

-References $Ret, $sql, $tmp, CountSql(), echo_debug(), echo_error(), ExecSql(), FormatString(), isNumber(), name, and value. +References $Ret, $sql, $tmp, CountSql(), echo_debug(), echo_error(), ExecSql(), FormatString(), isNumber(), name, and value.

-Referenced by Save().


Field Documentation

@@ -563,9 +843,9 @@ Referenced by Save()

- +array of attribut object

-Definition at line 161 of file class_fiche.php. +Definition at line 152 of file class_fiche.php.

@@ -588,9 +868,9 @@ Definition at line 161

- +database connection

-Definition at line 158 of file class_fiche.php. +Definition at line 149 of file class_fiche.php.

@@ -613,9 +893,34 @@ Definition at line 158

+fd_id +

+Definition at line 151 of file class_fiche.php. + + +

+ + + + +
+ + + + +
fiche::$fiche_def_ref
+
+ + + + +Type of the card here always FICHE_TYPE_CONTACT +

+Definition at line 153 of file class_fiche.php.

+   +

-Definition at line 160 of file class_fiche.php.

@@ -638,16 +943,14 @@ Definition at line 160

- +fiche.f_id

-Reimplemented in Customer. -

-Definition at line 159 of file class_fiche.php. +Definition at line 150 of file class_fiche.php.


The documentation for this class was generated from the following file: -
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/classfiche.png b/doc/developper/html/classfiche.png index 0ee24d60ece20c57117a20413a54f1cd095f9f46..0de9b0019cbbbe2b50c1e74c4e9cd07137d6b4e3 100644 GIT binary patch delta 378 zcmV-=0fqj!0-^&UiBL{Q4GJ0x0000DNk~Le0001t0000`1Oos7067wXS&<<#e*rj2 zL_t(|obA>9YJ@Nh0C3CT{%-OH>0V%Lu;)1#`2LTu^g~b6R?pgj+>!&Um-I(t6^9`U z13QsVDTO(iSLOg?to4IE$=KD<${1h)>|psx0h{NaUyU_<32`{b%vuj-@d}(;O(}nb zF+G|JI~9j!rY*0`KV|xSU}W6df2RErGu|)6+{W=j%*A#}8D;ikd@6RCd!Gd=ql_}I z#C(bP5!WBS=uQ0jEoTj%ZaX5gQ}nLP5eCypk^ztD-l>sRRfyvP;Irsa}{46~?8y#F48od@nZ`!Ue;nP&J0OS2LGT zY<$g-V6uBdp&6K)DK$0il)rU+?l*(PPKD=K Y3-}Q91@XNtxc~qF07*qoM6N<$f>@NN!~g&Q delta 271 zcmV+q0r38!1GoYqiBL{Q4GJ0x0000DNk~Le0000%0000`1Oos70JKvDNRc5ke*n%& zL_t(|ob8iQ4uc>JhUv?mX>U+YV73b_S>pYVFj{pA0yUWrX5-h;6hHdgCO9I5XAM4$%;=m5Ngat)9aJS5&bVgU_8W^L7I{zuzIdYM9rsOaAa`!?iy8Z{3P zxAA*o94#B0IHQ+NbfOat;*sfdn;JR~CUwzXgwS42o%*j3`EAHGyaCRD Vf@ahr;Hdxr002ovPDHLkV1nVwZ36%R diff --git a/doc/developper/html/classfiche__def.html b/doc/developper/html/classfiche__def.html index 2be5245df..440e6b2ac 100644 --- a/doc/developper/html/classfiche__def.html +++ b/doc/developper/html/classfiche__def.html @@ -4,22 +4,30 @@ - -

fiche_def Class Reference

+ +

fiche_def Class Reference

define Class fiche and fiche def, those class are using class attribut +More... +

+

+ + + + + @@ -39,11 +47,11 @@

Public Member Functions

 fiche_def ($p_cn, $p_id=0)
 GetAttribut ()
 Get attribut of a fiche_def.
 Get ()
 Get attribut of the fiche_def.
 GetAll ()
 Get all the fiche_def.
 HasAttribute ($p_attr)
 Check in vw_fiche_def if a fiche has a attribut X.
 Display ()
 Display a fiche_def object into a table.

Data Fields

 $cn

Detailed Description

- +define Class fiche and fiche def, those class are using class attribut

-Definition at line 23 of file class_fiche.php.


Constructor & Destructor Documentation

+Definition at line 30 of file class_fiche.php.

Constructor & Destructor Documentation

@@ -80,11 +88,11 @@ Definition at line 23<

-Definition at line 32 of file class_fiche.php. +Definition at line 39 of file class_fiche.php.

-References $p_id. +References $p_id.

-Referenced by GetAll(). +Referenced by GetAll().


Member Function Documentation

@@ -112,11 +120,14 @@ Referenced by GetAll()

+Display a fiche_def object into a table. +

+

Returns:
HTML row

-Definition at line 142 of file class_fiche.php. +Definition at line 129 of file class_fiche.php.

-References $r. +References $r.

@@ -143,11 +154,13 @@ References $r

+Get attribut of the fiche_def. +

-Definition at line 77 of file class_fiche.php. +Definition at line 74 of file class_fiche.php.

-References $Ret, $row, $sql, ExecSql(), frd_id, label, and return. +References $Ret, $row, $sql, ExecSql(), frd_id, label, and return.

@@ -174,11 +187,14 @@ References $Ret, <

+Get all the fiche_def. +

+

Returns:
an array of fiche_def object

-Definition at line 101 of file class_fiche.php. +Definition at line 94 of file class_fiche.php.

-References $i, $Ret, $row, $sql, ExecSql(), fiche_def(), frd_id, and return. +References $i, $Ret, $row, $sql, ExecSql(), fiche_def(), frd_id, and return.

@@ -205,11 +221,14 @@ References $i,

+Get attribut of a fiche_def. +

+

Returns:
string value of the attribute none

-Definition at line 48 of file class_fiche.php. +Definition at line 51 of file class_fiche.php.

-References $i, $Ret, $row, $sql, $t, ExecSql(), and return. +References $i, $Ret, $row, $sql, $t, ExecSql(), and return.

@@ -237,9 +256,17 @@ References $i,

+Check in vw_fiche_def if a fiche has a attribut X. +

+

Parameters:
+ + +
$p_attr attribut to check
+
+
Returns:
true or false

-Definition at line 128 of file class_fiche.php. +Definition at line 119 of file class_fiche.php.

References CountSql(). @@ -267,7 +294,7 @@ References CountSql().

-Definition at line 30 of file class_fiche.php. +Definition at line 37 of file class_fiche.php.

@@ -292,7 +319,7 @@ Definition at line 30<

-Definition at line 31 of file class_fiche.php. +Definition at line 38 of file class_fiche.php.

@@ -317,7 +344,7 @@ Definition at line 31<

-Definition at line 27 of file class_fiche.php. +Definition at line 34 of file class_fiche.php.

@@ -342,7 +369,7 @@ Definition at line 27<

-Definition at line 24 of file class_fiche.php. +Definition at line 31 of file class_fiche.php.

@@ -367,7 +394,7 @@ Definition at line 24<

-Definition at line 29 of file class_fiche.php. +Definition at line 36 of file class_fiche.php.

@@ -392,7 +419,7 @@ Definition at line 29<

-Definition at line 28 of file class_fiche.php. +Definition at line 35 of file class_fiche.php.

@@ -417,7 +444,7 @@ Definition at line 28<

-Definition at line 25 of file class_fiche.php. +Definition at line 32 of file class_fiche.php.

@@ -442,12 +469,12 @@ Definition at line 25<

-Definition at line 26 of file class_fiche.php. +Definition at line 33 of file class_fiche.php.


The documentation for this class was generated from the following file: -
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/classfiche__def__ref.html b/doc/developper/html/classfiche__def__ref.html index 07e06b773..bf72fa26a 100644 --- a/doc/developper/html/classfiche__def__ref.html +++ b/doc/developper/html/classfiche__def__ref.html @@ -4,22 +4,32 @@ - -

fiche_def_ref Class Reference

+ +

fiche_def_ref Class Reference

fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref +More... +

+

+ + + + + @@ -31,11 +41,11 @@

Public Member Functions

 fiche_def_ref ($p_cn, $p_frd_id=-1)
 LoadAll ()
 Load all the fiche_def_ref data and return an array of fiche_def_ref objects.
 Display ()
 Display data between

+tag.

 Input ()
 Input Data between

+tag.

 Save ()
 Store data into the database: update the record.
 Get ()
 Get the data with the p_code and complete the current object.

Data Fields

 $frd_id

Detailed Description

- +fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref

-Definition at line 22 of file class_fiche_def.php.


Constructor & Destructor Documentation

+Definition at line 30 of file class_fiche_def.php.

Constructor & Destructor Documentation

@@ -70,13 +80,13 @@ Definition at line 29 of file class_fiche_def.php. +Definition at line 38 of file class_fiche_def.php.

-References frd_class_base, frd_id, and frd_text. +References frd_class_base, frd_id, and frd_text.

-Referenced by LoadAll(). +Referenced by LoadAll().


Member Function Documentation

@@ -104,11 +114,15 @@ Referenced by Loa

+Display data between

+tag. +

+

Returns:
string

-Definition at line 77 of file class_fiche_def.php. +Definition at line 78 of file class_fiche_def.php.

-References $r, and value. +References $r, and value.

@@ -135,11 +149,14 @@ References $r

+Get the data with the p_code and complete the current object. +

+

Returns:
none

-Definition at line 137 of file class_fiche_def.php. +Definition at line 131 of file class_fiche_def.php.

-References $r, $Res, $sql, ExecSql(), frd_class_base, and frd_text. +References $r, $Res, $sql, ExecSql(), frd_class_base, and frd_text.

@@ -166,11 +183,17 @@ References $r

+Input Data between

+tag. +

+parm :

    +
  • none gen :
  • Returns:
    string
    +

-Definition at line 96 of file class_fiche_def.php. +Definition at line 97 of file class_fiche_def.php.

-References $h, $r, $t, $w, frd_class_base, frd_id, and frd_text. +References $h, $r, $t, $w, frd_class_base, frd_id, and frd_text.

@@ -197,11 +220,14 @@ References $h,

+Load all the fiche_def_ref data and return an array of fiche_def_ref objects. +

+

Returns:
array

-Definition at line 46 of file class_fiche_def.php. +Definition at line 51 of file class_fiche_def.php.

-References $all, $array, $idx, $o, $Res, $row, $sql, ExecSql(), fiche_def_ref(), and value. +References $all, $array, $idx, $o, $Res, $row, $sql, ExecSql(), fiche_def_ref(), and value.

@@ -228,11 +254,16 @@ References $all

+Store data into the database: update the record. +

+

    +
  • Returns:
    none
    +

-Definition at line 119 of file class_fiche_def.php. +Definition at line 117 of file class_fiche_def.php.

-References $Res, $sql, ExecSql(), frd_class_base, and frd_text. +References $Res, $sql, ExecSql(), frd_class_base, and frd_text.


Field Documentation

@@ -258,7 +289,7 @@ References $Res, <

-Definition at line 27 of file class_fiche_def.php. +Definition at line 35 of file class_fiche_def.php.

@@ -283,7 +314,7 @@ Definition at line 26 of file class_fiche_def.php. +Definition at line 34 of file class_fiche_def.php.

@@ -306,9 +337,9 @@ Definition at line fiche_def_ref.frd_id

-Definition at line 24 of file class_fiche_def.php. +Definition at line 32 of file class_fiche_def.php.

@@ -331,14 +362,14 @@ Definition at line 25 of file class_fiche_def.php. +Definition at line 33 of file class_fiche_def.php.


The documentation for this class was generated from the following file: -
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/classjrn.html b/doc/developper/html/classjrn.html index d7c738a8d..4ff4af0ed 100644 --- a/doc/developper/html/classjrn.html +++ b/doc/developper/html/classjrn.html @@ -4,8 +4,11 @@ - -

jrn Class Reference

+ +

jrn Class Reference

Class for jrn. +More... +

+

@@ -16,6 +19,8 @@ + + @@ -27,11 +32,11 @@

Public Member Functions

 jrn ($p_cn, $p_id)
 GetRowSimple ($p_from, $p_to, $cent='off', $p_limit=-1, $p_offset=-1)
 GetDefLine ($p_cred)

Data Fields

 $id

Detailed Description

- +Class for jrn.

-Definition at line 22 of file class_jrn.php.


Constructor & Destructor Documentation

+Definition at line 24 of file class_jrn.php.

Constructor & Destructor Documentation

@@ -68,12 +73,50 @@ Definition at line 22

-Definition at line 27 of file class_jrn.php. +Definition at line 29 of file class_jrn.php.

-References $p_id. +References $p_id.


Member Function Documentation

+

+ + + + +
+ + + + + + + + + +
jrn::GetDefLine p_cred  ) 
+
+ + + + + +
+   + + +

+GetDefLine Get the number of lines of a journal

Parameters:
+ + +
$p_cred deb or cred
+
+
Returns:
an integer
+ +

+Definition at line 321 of file class_jrn.php. +

+References $r, $Res, $sql, echo_debug(), ExecSql(), and value.

@@ -100,9 +143,9 @@ References $p_id.

-Definition at line 32 of file class_jrn.php. +Definition at line 34 of file class_jrn.php.

-References $Max, $Res, $ret, ExecSql(), and name. +References $Max, $Res, $ret, ExecSql(), and name.

@@ -157,11 +200,24 @@ References $Max,

+GetRow Get The data

+

Parameters:
+ + +
: 
    +
  • connection
+
+
+
    +
  • an array
  • p_limit starting line
  • p_offset number of lines
+

+gen :

    +
  • none return:
  • Array with the asked data

-Definition at line 63 of file class_jrn.php. +Definition at line 65 of file class_jrn.php.

-References $a, $array, $Max, $Res, $Sql, cent, echo_debug(), and ExecSql(). +References $a, $array, $Max, $Res, $Sql, cent, echo_debug(), and ExecSql().

@@ -216,11 +272,25 @@ References $a,

+GetRowSimple

+Get simplified row

+

Parameters:
+ + +
: 
    +
  • connection
+
+
+
    +
  • an array
  • p_limit starting line
  • p_offset number of lines
+

+gen :

    +
  • none return:
  • an Array with the asked data

-Definition at line 241 of file class_jrn.php. +Definition at line 243 of file class_jrn.php.

-References $array, $id, $jrn, $Res, $sql, cent, echo_debug(), and ExecSql(). +References $array, $id, $jrn, $Res, $sql, cent, echo_debug(), and ExecSql().


Field Documentation

@@ -246,7 +316,7 @@ References $array,

-Definition at line 25 of file class_jrn.php. +Definition at line 27 of file class_jrn.php.

@@ -271,9 +341,9 @@ Definition at line 25

-Definition at line 23 of file class_jrn.php. +Definition at line 25 of file class_jrn.php.

-Referenced by GetRowSimple(). +Referenced by GetRowSimple().

@@ -298,7 +368,7 @@ Referenced by GetRowSimp

-Definition at line 24 of file class_jrn.php. +Definition at line 26 of file class_jrn.php.

@@ -323,12 +393,12 @@ Definition at line 24

-Definition at line 26 of file class_jrn.php. +Definition at line 28 of file class_jrn.php.


The documentation for this class was generated from the following file:
  • /home/dany/developpement/phpcompta-dev/phpcompta/include/class_jrn.php
-
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/classparm__code.html b/doc/developper/html/classparm__code.html index 5e483809f..375b99567 100644 --- a/doc/developper/html/classparm__code.html +++ b/doc/developper/html/classparm__code.html @@ -4,22 +4,32 @@ - -

parm_code Class Reference

+ +

parm_code Class Reference

Manage the table parm_code which contains the custom parameter for the module accountancy. +More... +

+

+ + + + + @@ -31,11 +41,11 @@

Public Member Functions

 parm_code ($p_cn, $p_id=-1)
 LoadAll ()
 Load all parmCode return an array of parm_code object.
 Save ()
 update a parm_object into the database p_code is _not_ updatable
 Display ()
 Display an object, with the

+tag.

 Input ()
 Display a form to enter info about a parm_code object with the

+tag.

 Get ()
 Complete a parm_code object thanks the p_code.

Data Fields

 $db

Detailed Description

- +Manage the table parm_code which contains the custom parameter for the module accountancy.

-Definition at line 21 of file class_parm_code.php.


Constructor & Destructor Documentation

+Definition at line 30 of file class_parm_code.php.

Constructor & Destructor Documentation

@@ -72,11 +82,11 @@ Definition at line 27 of file class_parm_code.php. +Definition at line 36 of file class_parm_code.php.

-References $p_id, and Get(). +References $p_id, and Get().

-Referenced by LoadAll(). +Referenced by LoadAll().


Member Function Documentation

@@ -104,11 +114,15 @@ Referenced by Loa

+Display an object, with the

+tag. +

+

Returns:
string

-Definition at line 99 of file class_parm_code.php. +Definition at line 96 of file class_parm_code.php.

-References $r. +References $r.

@@ -135,13 +149,16 @@ References $r

+Complete a parm_code object thanks the p_code. +

+

Returns:
array

-Definition at line 153 of file class_parm_code.php. +Definition at line 141 of file class_parm_code.php.

-References $Res, $row, $sql, ExecSql(), p_comment, and p_value. +References $Res, $row, $sql, ExecSql(), p_comment, and p_value.

-Referenced by parm_code(). +Referenced by parm_code().

@@ -168,11 +185,15 @@ Referenced by par

+Display a form to enter info about a parm_code object with the

+tag. +

+

Returns:
string

-Definition at line 119 of file class_parm_code.php. +Definition at line 112 of file class_parm_code.php.

-References $comment, $poste, $r, p_comment, and p_value. +References $comment, $poste, $r, p_comment, and p_value.

@@ -199,11 +220,14 @@ References $comme

+Load all parmCode return an array of parm_code object. +

+

Returns:
array

-Definition at line 47 of file class_parm_code.php. +Definition at line 52 of file class_parm_code.php.

-References $array, $idx, $o, $r, $Res, $sql, ExecSql(), and parm_code(). +References $array, $idx, $o, $r, $Res, $sql, ExecSql(), and parm_code().

@@ -230,11 +254,14 @@ References $array,

+update a parm_object into the database p_code is _not_ updatable +

+

Returns:
nothing

-Definition at line 75 of file class_parm_code.php. +Definition at line 76 of file class_parm_code.php.

-References $Res, $sql, ExecSql(), FormatString(), p_comment, and p_value. +References $Res, $sql, ExecSql(), FormatString(), p_comment, and p_value.


Field Documentation

@@ -258,9 +285,9 @@ References $Res, <

- +database connection

-Definition at line 22 of file class_parm_code.php. +Definition at line 31 of file class_parm_code.php.

@@ -283,9 +310,9 @@ Definition at line 23 of file class_parm_code.php. +Definition at line 32 of file class_parm_code.php.

@@ -308,9 +335,9 @@ Definition at line parm_code.p_comment

-Definition at line 25 of file class_parm_code.php. +Definition at line 34 of file class_parm_code.php.

@@ -333,14 +360,14 @@ Definition at line parm_code.p_value

-Definition at line 24 of file class_parm_code.php. +Definition at line 33 of file class_parm_code.php.


The documentation for this class was generated from the following file: -
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/classposte.html b/doc/developper/html/classposte.html index 39e38d5da..c1b4208e8 100644 --- a/doc/developper/html/classposte.html +++ b/doc/developper/html/classposte.html @@ -4,20 +4,27 @@ - -

poste Class Reference

+ +

poste Class Reference

Manage the account. +More... +

+

+ + + + @@ -27,11 +34,11 @@

Public Member Functions

 poste ($p_cn, $p_id)
 GetRow ($p_from, $p_to)
 Get dat for poste.
 GetName ()
 Return the name of a account.
 GetSolde ($p_cond="")
 give the balance of an account
 GetSoldeDetail ($p_cond="")
 give the balance of an account

Data Fields

 $db

Detailed Description

- +Manage the account.

-Definition at line 21 of file class_poste.php.


Constructor & Destructor Documentation

+Definition at line 28 of file class_poste.php.

Constructor & Destructor Documentation

@@ -68,9 +75,9 @@ Definition at line 21<

-Definition at line 25 of file class_poste.php. +Definition at line 32 of file class_poste.php.

-References $p_id. +References $p_id.


Member Function Documentation

@@ -98,11 +105,13 @@ References $p_id.

+Return the name of a account. +

-Definition at line 75 of file class_poste.php. +Definition at line 80 of file class_poste.php.

-References $r, $ret, and name. +References $r, $ret, and name.

@@ -139,11 +148,20 @@ References $r

+Get dat for poste. +

+

Parameters:
+ + + +
$p_from periode from
$p_to end periode
+
+
Returns:
double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal) (tot_deb,tot_credit

-Definition at line 43 of file class_poste.php. +Definition at line 46 of file class_poste.php.

-References $array, $i, $Max, $Res, and ExecSql(). +References $array, $i, $Max, $Res, and ExecSql().

@@ -171,11 +189,14 @@ References $array,

+give the balance of an account +

+

Returns:
balance of the account

-Definition at line 98 of file class_poste.php. +Definition at line 99 of file class_poste.php.

-References $Max, $r, $Res, and ExecSql(). +References $Max, $r, $Res, and ExecSql().

@@ -203,11 +224,14 @@ References $Max,

+give the balance of an account +

+

Returns:
balance of the account

-Definition at line 125 of file class_poste.php. +Definition at line 121 of file class_poste.php.

-References $Max, $r, $Res, and ExecSql(). +References $Max, $r, $Res, and ExecSql().


Field Documentation

@@ -233,7 +257,7 @@ References $Max,

-Definition at line 22 of file class_poste.php. +Definition at line 29 of file class_poste.php.

@@ -258,7 +282,7 @@ Definition at line 22<

-Definition at line 23 of file class_poste.php. +Definition at line 30 of file class_poste.php.

@@ -283,12 +307,12 @@ Definition at line 23<

-Definition at line 24 of file class_poste.php. +Definition at line 31 of file class_poste.php.


The documentation for this class was generated from the following file: -
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/classrapport.html b/doc/developper/html/classrapport.html index 15e7ee6c1..fa589a169 100644 --- a/doc/developper/html/classrapport.html +++ b/doc/developper/html/classrapport.html @@ -4,16 +4,22 @@ - -

rapport Class Reference

+ +

rapport Class Reference

Class rapport Create, view, modify and parse report. +More... +

+

+ + + @@ -23,11 +29,11 @@

Public Member Functions

 rapport ($p_cn, $p_id)
 Constructor.
 GetName ()
 Return the report's name.
 GetRow ($p_start, $p_end)
 return all the row and parse formula from a report

Data Fields

 $db

Detailed Description

- +Class rapport Create, view, modify and parse report.

-Definition at line 21 of file class_rapport.php.


Constructor & Destructor Documentation

+Definition at line 28 of file class_rapport.php.

Constructor & Destructor Documentation

@@ -62,11 +68,13 @@ Definition at line 2 +References $p_id, and name.

+Constructor. +

-Definition at line 25 of file class_rapport.php. +Definition at line 33 of file class_rapport.php.

-References $p_id, and name.


Member Function Documentation

@@ -94,11 +102,13 @@ References $p_id,

+Return the report's name. +

-Definition at line 30 of file class_rapport.php. +Definition at line 40 of file class_rapport.php.

-References $a, $ret, and name. +References $a, $ret, and name.

@@ -135,11 +145,19 @@ References $a,

+return all the row and parse formula from a report +

+

Parameters:
+ + + +
$p_start start periode
$p_end end periode
+

-Definition at line 37 of file class_rapport.php. +Definition at line 53 of file class_rapport.php.

-References $col, $l_line, $Max, $Res, ExecSql(), and ParseFormula(). +References $col, $l_line, $Max, $Res, ExecSql(), and ParseFormula().


Field Documentation

@@ -163,9 +181,9 @@ References $col,

- +database connx

-Definition at line 22 of file class_rapport.php. +Definition at line 29 of file class_rapport.php.

@@ -188,9 +206,9 @@ Definition at line 2

- +formdef.fr_id

-Definition at line 23 of file class_rapport.php. +Definition at line 30 of file class_rapport.php.

@@ -213,14 +231,14 @@ Definition at line 2

- +report's name

-Definition at line 24 of file class_rapport.php. +Definition at line 31 of file class_rapport.php.


The documentation for this class was generated from the following file: -
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/classwidget.html b/doc/developper/html/classwidget.html index 9a87de820..e046a5500 100644 --- a/doc/developper/html/classwidget.html +++ b/doc/developper/html/classwidget.html @@ -4,8 +4,11 @@ - -

widget Class Reference

+ +

widget Class Reference

class widget This class is used to create all the HTML INPUT TYPE and some specials which works with javascript like js_search +More... +

+

@@ -14,6 +17,7 @@ + @@ -47,11 +51,11 @@

Public Member Functions

 widget ($p_type="")
 IOValue ($p_name=null, $p_value=null, $p_label="")
 create the corresponding INPUT tag
 debug ()
 Submit ($p_name, $p_value)

Detailed Description

- +class widget This class is used to create all the HTML INPUT TYPE and some specials which works with javascript like js_search

-Definition at line 29 of file class_widget.php.


Constructor & Destructor Documentation

+Definition at line 32 of file class_widget.php.

Constructor & Destructor Documentation

@@ -79,9 +83,9 @@ Definition at line 29

-Definition at line 42 of file class_widget.php. +Definition at line 59 of file class_widget.php.

-References disabled, heigh, label, readonly, selected, size, table, value, and width. +References disabled, heigh, label, readonly, selected, size, table, value, and width.


Member Function Documentation

@@ -111,9 +115,9 @@ References disabled<

-Definition at line 348 of file class_widget.php. +Definition at line 370 of file class_widget.php.

-References $readonly, readonly, and value. +References $readonly, readonly, and value.

@@ -156,11 +160,22 @@ References $readonly<

+create the corresponding INPUT tag +

+function IOValue($p_name,$p_value="",$p_label="")

+

Parameters:
+ + + + +
$p_name is the INPUT NAME
$p_value is the INPUT VALUE or an array for select
$p_label is the label of the INPUT
+
+
Returns:
string containing the tag

-Definition at line 67 of file class_widget.php. +Definition at line 84 of file class_widget.php.

-References $check, $disabled, $i, $r, disabled, echo_debug(), label, name, selected, and value. +References $check, $disabled, $i, $r, disabled, echo_debug(), label, name, selected, and value.

@@ -190,7 +205,7 @@ References $check

-Definition at line 358 of file class_widget.php. +Definition at line 380 of file class_widget.php.

@@ -220,9 +235,9 @@ Definition at line 35

-Definition at line 55 of file class_widget.php. +Definition at line 72 of file class_widget.php.

-References readonly. +References readonly.

@@ -261,7 +276,7 @@ References readonly.

-Definition at line 355 of file class_widget.php. +Definition at line 377 of file class_widget.php.


Field Documentation

@@ -285,11 +300,11 @@ Definition at line 35

- +to disable the type

-Definition at line 38 of file class_widget.php. +Definition at line 55 of file class_widget.php.

-Referenced by IOValue(). +Referenced by IOValue().

@@ -312,9 +327,9 @@ Referenced by IOValue

- +depends of the input type

-Definition at line 39 of file class_widget.php. +Definition at line 56 of file class_widget.php.

@@ -337,9 +352,9 @@ Definition at line 39

- +depends of the input type

-Definition at line 40 of file class_widget.php. +Definition at line 57 of file class_widget.php.

@@ -362,9 +377,9 @@ Definition at line 40

- +text before the input tag

-Definition at line 37 of file class_widget.php. +Definition at line 54 of file class_widget.php.

@@ -387,9 +402,9 @@ Definition at line 37

- +name of the input tag

-Definition at line 31 of file class_widget.php. +Definition at line 48 of file class_widget.php.

@@ -412,11 +427,11 @@ Definition at line 31

- +if set to false cannot modify

-Definition at line 33 of file class_widget.php. +Definition at line 50 of file class_widget.php.

-Referenced by debug(). +Referenced by debug().

@@ -439,9 +454,9 @@ Referenced by debug()

- +selected value for the radio or select

-Definition at line 35 of file class_widget.php. +Definition at line 52 of file class_widget.php.

@@ -464,9 +479,9 @@ Definition at line 35

- +size for the text type

-Definition at line 34 of file class_widget.php. +Definition at line 51 of file class_widget.php.

@@ -489,9 +504,9 @@ Definition at line 34

- +the tabindex

-Definition at line 41 of file class_widget.php. +Definition at line 58 of file class_widget.php.

@@ -514,9 +529,9 @@ Definition at line 41

- +if we want to make a HTML table row

-Definition at line 36 of file class_widget.php. +Definition at line 53 of file class_widget.php.

@@ -539,9 +554,9 @@ Definition at line 36

- +type of the input tag (text, select, files, js_search,...)

-Definition at line 30 of file class_widget.php. +Definition at line 47 of file class_widget.php.

@@ -564,14 +579,14 @@ Definition at line 30

- +value

-Definition at line 32 of file class_widget.php. +Definition at line 49 of file class_widget.php.


The documentation for this class was generated from the following file: -
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/client_8inc_8php-source.html b/doc/developper/html/client_8inc_8php-source.html index 47d5193af..3cbf662c5 100644 --- a/doc/developper/html/client_8inc_8php-source.html +++ b/doc/developper/html/client_8inc_8php-source.html @@ -4,7 +4,7 @@ - +

client.inc.php

Go to the documentation of this file.
00001 <?
@@ -30,146 +30,148 @@
 00021 require_once("class_customer.php");
 00022 $sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"";
 00023 var_dump($_REQUEST);
-00024 
-00025 ?>
-00026 
-00027 <?
-00028 // Menu
-00029 // Remove a card
-00030 if ( isset ($_POST['delete']) ) 
-00031 {
-00032   echo 'delete';
-00033   $f_id=$_REQUEST['f_id'];
-00034 
-00035   $fiche=new Customer($cn,$f_id);
-00036   $fiche->remove();
-00037 }
-00039 // Add card
-00040 if ( $sub_action=="insert" )
-00041 {
-00042   $retour=sprintf('<A class="two" HREF="%s">Retour</A>',
-00043                   urldecode($_REQUEST['url']));
-00044 
-00045   $customer=new Customer($cn);
-00046   $customer->Save($_REQUEST['fd_id']);
-00047   echo $retour;
-00048   echo "<table>";
-00049   echo $customer->Display(true);
-00050   echo "</table>";
-00051   echo $retour;
-00052 
-00053 }
-00055 // Save modification
-00056 if ( isset ($_POST['mod'])) 
-00057 {
-00058   // modification is asked
-00059   $f_id=$_REQUEST['f_id'];
-00060 
-00061   $client=new Customer($cn,$f_id);
-00062   $client->Save();
-00063 }
-00064 // by default open liste
-00065 if ( $sub_action  == "" ) 
-00066       $sub_action="list";
-00068 //Display a blank card 
-00069 if ( $sub_action=="blank") 
-00070 {
-00071   $retour=sprintf('<A class="two" HREF="%s">Retour</A>',
-00072                   "commercial.php?p_action=client");
-00073   echo '<div class="u_redcontent">';
-00074 
-00075   echo $retour;
-00076   $c=new Customer($cn);
-00077   echo '<form method="post" action="commercial.php"';
-00078   echo '<input type="hidden" name="p_action" value="client">';
-00079   echo '<input type="hidden" name="sa" value="insert">';
-00080   echo '<input type="hidden" name="fd_id" value="'.$_GET['fd_id'].'">';
-00081   echo '<input type="hidden" name="url" value="'.$_GET['url'].'">';
-00082   echo $c->blank($_GET['fd_id']);
-00083   echo '<input type="Submit" value="Sauve">';
-00084   echo '</form>';
-00085   echo $retour;
-00086   echo '</div>';
-00087 }
-00089 // list
-00090 if ( $sub_action == "list" )
-00091 {
-00092 ?>
-00093 <div class="u_content">
-00094 <form method="get" action="commercial.php">
-00095 <?
-00096    $a=(isset($_GET['query']))?$_GET['query']:"";
-00097    printf ('<input type="text" name="query" value="%s">',
-00098            $a);
-00099 ?>
-00100 <input type="submit" name="submit_query" value="recherche">
-00101 <input type="hidden" name="p_action" value="client">
-00102 </form>
-00103 <form method="get" action="commercial.php">
-00104 <input type="submit" name="submit_query" value="Ajout Client">
-00105 <input type="hidden" name="url" <?      $url=urlencode($_SERVER['REQUEST_URI']);echo 'value="'.$url.'"'; ?>
-00106 <input type="hidden" name="p_action" value="client">
-00107 
-00108 <?
-00109  $w=new widget("select");
-00110  $w->name="fd_id";
-00111  $w->value= make_array($cn,"select fd_id,fd_label from fiche_def where ".
-00112              " frd_id=".FICHE_TYPE_CLIENT);
-00113  echo $w->IOValue();
-00114 ?>
-00115 <input type="hidden" name="sa" value="blank">
-00116 </form>
-00117 
-00118 <?
-00119    $client=new Customer($cn);
-00120  $search=(isset($_GET['query']))?$_GET['query']:"";
-00121  // echo '<div style="position:absolute;left:15%;width:67%;margin-top:20px;">';
-00122  echo '<div class="u_redcontent">';
-00123  echo $client->Summary($search);
-00124  echo '</div>';
-00125  echo '<div style="position:absolute;right:1%;width:10%;color:blue;background-color:lightgrey;margin-top:10px;">';
-00126  echo "<strong>Action :</strong> Ajout, mise à jour ou effacement";
-00127  echo " <ul>";
-00128  echo "<li>D  - Detail</li>";
-00129  echo "<li>C  - Contact</li>";
-00130  echo "<li>A  - Action </li>";
-00131  echo "<li>F  - Facture</li>";
-00132  echo "<li>FC - Courrier</li>";
-00133  echo "</ul>";
-00134 
-00135  echo '</div>';
-00136  echo '</div>';
-00137 
-00138 }
-00140 // Show Detail
-00141 if ( $sub_action == 'detail' )
-00142 {
-00143   $f_id=$_REQUEST['f_id'];
-00144   echo '<div class="u_redcontent">';
-00145   $client=new Customer($cn,$f_id);
-00146   $retour=sprintf('<A class="two" HREF="%s">Retour</A>',
-00147                   urldecode($_REQUEST['url']));
-00148   echo $retour;
-00149   echo '<form action="'.$_REQUEST['url'].'" method="post">'; 
-00150   echo $client->Display(false);
-00151   $w=new widget("hidden");
-00152   $w->name="p_action";
-00153   $w->value="client";
-00154   echo $w->IOValue();
-00155   $w->name="f_id";
-00156   $w->value=$f_id;
-00157   echo $w->IOValue();
-00158 
-00159   echo $w->Submit('mod','Sauver les modifications');
-00160   echo $w->Reset("Annuler");
-00161   echo $w->Submit('delete','Effacer cette fiche');
-00162   echo '</form>';
-00163   echo $retour;
-00164   echo '<div>';
-00165 }
-00166 html_page_stop();
-00167 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00028 ?> +00029 +00030 <? +00031 // Menu +00032 // Remove a card +00033 if ( isset ($_POST['delete']) ) +00034 { +00035 echo 'delete'; +00036 $f_id=$_REQUEST['f_id']; +00037 +00038 $fiche=new Customer($cn,$f_id); +00039 $fiche->remove(); +00040 $sub_action="list"; +00041 } +00043 // Add card +00044 if ( $sub_action=="insert" ) +00045 { +00046 $retour=sprintf('<A class="two" HREF="%s"><input type="button" value="Retour"></A>', +00047 urldecode($_REQUEST['url'])); +00048 +00049 $customer=new Customer($cn); +00050 $customer->Save($_REQUEST['fd_id']); +00051 echo $retour; +00052 echo "<table>"; +00053 echo $customer->Display(true); +00054 echo "</table>"; +00055 echo $retour; +00056 +00057 } +00059 // Save modification +00060 if ( isset ($_POST['mod'])) +00061 { +00062 // modification is asked +00063 $f_id=$_REQUEST['f_id']; +00064 +00065 $client=new Customer($cn,$f_id); +00066 $client->Save(); +00067 } +00068 // by default open liste +00069 if ( $sub_action == "" ) +00070 $sub_action="list"; +00072 //Display a blank card +00073 if ( $sub_action=="blank") +00074 { +00075 $retour=sprintf('<A class="two" HREF="%s"><input type="button" value="Retour"></A>', +00076 "commercial.php?p_action=client"); +00077 echo '<div class="u_redcontent">'; +00078 +00079 echo $retour; +00080 $c=new Customer($cn); +00081 echo '<form method="post" action="commercial.php"'; +00082 echo '<input type="hidden" name="p_action" value="client">'; +00083 echo '<input type="hidden" name="sa" value="insert">'; +00084 echo '<input type="hidden" name="fd_id" value="'.$_GET['fd_id'].'">'; +00085 echo '<input type="hidden" name="url" value="'.$_GET['url'].'">'; +00086 echo $c->blank($_GET['fd_id']); +00087 echo '<input type="Submit" value="Sauve">'; +00088 echo '</form>'; +00089 echo $retour; +00090 echo '</div>'; +00091 } +00093 // list +00094 if ( $sub_action == "list" ) +00095 { +00096 ?> +00097 <div class="u_content"> +00098 <span> +00099 <form method="get" action="commercial.php"> +00100 <? +00101 $a=(isset($_GET['query']))?$_GET['query']:""; +00102 printf ('<input type="text" name="query" value="%s">', +00103 $a); +00104 ?> +00105 <input type="submit" name="submit_query" value="recherche"> +00106 <input type="hidden" name="p_action" value="client"> +00107 </form> +00108 </span> +00109 <span> +00110 <form method="get" action="commercial.php"> +00111 <input type="hidden" name="url" <? $url=urlencode($_SERVER['REQUEST_URI']);echo 'value="'.$url.'"'; ?> +00112 <input type="hidden" name="p_action" value="client"> +00113 +00114 <? +00115 $w=new widget("select"); +00116 $w->name="fd_id"; +00117 $w->value= make_array($cn,"select fd_id,fd_label from fiche_def where ". +00118 " frd_id=".FICHE_TYPE_CLIENT); +00119 echo $w->IOValue(); +00120 ?> +00121 <input type="hidden" name="sa" value="blank"> +00122 <input type="submit" name="submit_query" value="Ajout Client"> +00123 +00124 </form> +00125 </span> +00126 <? +00127 $client=new Customer($cn); +00128 $search=(isset($_GET['query']))?$_GET['query']:""; +00129 // echo '<div style="position:absolute;left:15%;width:67%;margin-top:20px;">'; +00130 echo '<div class="u_redcontent">'; +00131 echo $client->Summary($search); +00132 echo '</div>'; +00133 echo '<div style="position:absolute;right:1%;width:10%;color:blue;background-color:lightgrey;margin-top:10px;">'; +00134 echo "<strong>Action :</strong> Ajout, mise à jour ou effacement"; +00135 echo " <ul>"; +00136 echo "<li>C - Contact</li>"; +00137 echo "<li>F - Facture</li>"; +00138 echo "<li>FC - Courrier</li>"; +00139 echo "</ul>"; +00140 +00141 echo '</div>'; +00142 echo '</div>'; +00143 +00144 } +00146 // Show Detail +00147 if ( $sub_action == 'detail' ) +00148 { +00149 $f_id=$_REQUEST['f_id']; +00150 echo '<div class="u_redcontent">'; +00151 $client=new Customer($cn,$f_id); +00152 $retour=sprintf('<A class="two" HREF="%s"><input type="button" value="Retour"></A>', +00153 urldecode($_REQUEST['url'])); +00154 echo $retour; +00155 echo '<form action="'.$_REQUEST['url'].'" method="post">'; +00156 echo $client->Display(false); +00157 $w=new widget("hidden"); +00158 $w->name="p_action"; +00159 $w->value="client"; +00160 echo $w->IOValue(); +00161 $w->name="f_id"; +00162 $w->value=$f_id; +00163 echo $w->IOValue(); +00164 +00165 echo $w->Submit('mod','Sauver les modifications'); +00166 echo $w->Reset("Annuler"); +00167 echo $w->Submit('delete','Effacer cette fiche'); +00168 echo '</form>'; +00169 echo $retour; +00170 echo '<div>'; +00171 } +00172 html_page_stop(); +00173 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/client_8inc_8php.html b/doc/developper/html/client_8inc_8php.html index db790da2f..4213a825c 100644 --- a/doc/developper/html/client_8inc_8php.html +++ b/doc/developper/html/client_8inc_8php.html @@ -4,10 +4,12 @@ - + -

client.inc.php File Reference

+

client.inc.php File Reference

Called from the module "Gestion" to manage the customer. More... +

+

Go to the source code of this file. @@ -33,7 +35,12 @@
 $retour
-


Variable Documentation

+

Detailed Description

+Called from the module "Gestion" to manage the customer. +

+ +

+Definition in file client.inc.php.


Variable Documentation

@@ -56,7 +63,7 @@

-Definition at line 76 of file client.inc.php. +Definition at line 80 of file client.inc.php.

@@ -81,9 +88,9 @@ Definition at line 76

-Definition at line 119 of file client.inc.php. +Definition at line 127 of file client.inc.php.

-Referenced by MakeListingVat(). +Referenced by MakeListingVat().

@@ -108,9 +115,9 @@ Referenced by MakeLi

-Definition at line 45 of file client.inc.php. +Definition at line 49 of file client.inc.php.

-Referenced by Customer::VatListing(). +Referenced by Customer::VatListing().

@@ -133,11 +140,13 @@ Referenced by Custo

-Initial value:

sprintf('<A class="two" HREF="%s">Retour</A>',
+Initial value:
sprintf('<A class="two" HREF="%s"><input type="button" value="Retour"></A>',
                   urldecode($_REQUEST['url']))
 

-Definition at line 146 of file client.inc.php. +Definition at line 152 of file client.inc.php. +

+Referenced by action::Confirm().

@@ -162,9 +171,9 @@ Definition at line 146<

-Definition at line 120 of file client.inc.php. +Definition at line 128 of file client.inc.php.

-Referenced by EncodeForm(), Cezpdf::ezProcessText(), RecordJrn(), Customer::Summary(), and UpdateJrn(). +Referenced by EncodeForm(), Cezpdf::ezProcessText(), RecordJrn(), Customer::Summary(), contact::Summary(), and UpdateJrn().

@@ -214,9 +223,9 @@ Definition at line 22

-Definition at line 105 of file client.inc.php. +Definition at line 111 of file client.inc.php.

-Referenced by jrn_navigation_bar(), and Customer::Summary(). +Referenced by jrn_navigation_bar(), Customer::Summary(), and contact::Summary().

@@ -241,7 +250,7 @@ Referenced by jrn_navi

-Definition at line 109 of file client.inc.php. +Definition at line 115 of file client.inc.php.

@@ -266,9 +275,9 @@ Definition at line 109<

-Definition at line 110 of file client.inc.php. +Definition at line 116 of file client.inc.php.

-Referenced by ChangeStock(), cl_user::Check(), cl_user::cl_user(), EncodeFiche(), EncodeForm(), EncodeModele(), form_verify_input(), FormAchView(), FormFin(), FormODS(), FormVenteView(), Customer::GetFromPoste(), cl_user::GetGlobalPref(), rapport::GetName(), poste::GetName(), jrn::GetName(), fiche::insert(), cl_user::insert_default_global_pref(), widget::IOValue(), jrn_navigation_bar(), MakeListingVat(), new_fiche(), Cpdf::o_font(), Cpdf::openFont(), rapport::rapport(), RecordJrn(), Document_modele::Save(), save_upload_document(), Cpdf::selectFont(), ShowFormTransfert(), u_ShowMenuRecherche(), fiche::update(), UpdateJrn(), Customer::VatListing(), VerifData(), VerifImport(), ViewFiche(), and ViewImp(). +Referenced by ChangeStock(), cl_user::Check(), cl_user::cl_user(), action::Confirm(), EncodeFiche(), EncodeForm(), EncodeModele(), form_verify_input(), FormAchView(), FormFin(), FormODS(), FormVenteView(), Customer::GetFromPoste(), cl_user::GetGlobalPref(), rapport::GetName(), poste::GetName(), jrn::GetName(), fiche::insert(), cl_user::insert_default_global_pref(), widget::IOValue(), jrn_navigation_bar(), MakeListingVat(), new_fiche(), Cpdf::o_font(), Cpdf::openFont(), rapport::rapport(), RecordJrn(), Document_modele::Save(), save_upload_document(), action::SaveStage2(), Cpdf::selectFont(), ShowFormTransfert(), contact::Summary(), u_ShowMenuRecherche(), fiche::update(), UpdateJrn(), Document::Upload(), Customer::VatListing(), VerifData(), VerifImport(), ViewFiche(), and ViewImp().

@@ -292,15 +301,15 @@ Referenced by ChangeStoc

Initial value:

 make_array($cn,"select fd_id,fd_label from fiche_def where ".
-             " frd_id=".FICHE_TYPE_CLIENT)
+             " frd_id=".FICHE_TYPE_CLIENT)
 

-Definition at line 111 of file client.inc.php. +Definition at line 117 of file client.inc.php.

-Referenced by ChangeStock(), widget::debug(), fiche_def_ref::Display(), DisplayDetailModele(), EncodeFiche(), EncodeForm(), Cezpdf::ezTable(), FormFin(), FormODS(), FormVenteView(), fiche::insert(), cl_user::insert_default_global_pref(), widget::IOValue(), jrn_navigation_bar(), fiche_def_ref::LoadAll(), make_array(), new_fiche(), Cpdf::o_fontDescriptor(), RecordJrn(), u_ShowMenuRecherche(), fiche::update(), cl_user::update_global_pref(), UpdateJrn(), VerifImport(), ViewFiche(), ViewImp(), and widget::widget(). +Referenced by ChangeStock(), action::Confirm(), widget::debug(), fiche_def_ref::Display(), DisplayDetailModele(), EncodeFiche(), EncodeForm(), Cezpdf::ezTable(), FormFin(), FormODS(), FormVenteView(), jrn::GetDefLine(), fiche::insert(), cl_user::insert_default_global_pref(), widget::IOValue(), jrn_navigation_bar(), fiche_def_ref::LoadAll(), make_array(), new_fiche(), Cpdf::o_fontDescriptor(), Document::ParseDocument(), RecordJrn(), action::SaveStage2(), contact::Summary(), u_ShowMenuRecherche(), fiche::update(), cl_user::update_global_pref(), UpdateJrn(), VerifImport(), ViewFiche(), ViewImp(), and widget::widget(). -


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/commercial_8php-source.html b/doc/developper/html/commercial_8php-source.html index 5035097cd..4542109ec 100644 --- a/doc/developper/html/commercial_8php-source.html +++ b/doc/developper/html/commercial_8php-source.html @@ -4,7 +4,7 @@ - +

commercial.php

Go to the documentation of this file.
00001 <?
@@ -27,89 +27,101 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 include_once ("ac_common.php");
-00022 require_once("constant.php");
-00023 include_once ("postgres.php");
-00024 
-00025 
-00026 if ( isset ($_REQUEST['dos'] ) ) {
-00027   $_SESSION['g_dossier']=$_REQUEST['dos'];
-00028   $g_name=GetDossierName($_SESSION['g_dossier']);
-00029   $_SESSION["g_name"]=$g_name;
+00027 include_once ("ac_common.php");
+00028 require_once("constant.php");
+00029 include_once ("postgres.php");
 00030 
-00031 }
-00032 
-00033 include_once ("postgres.php");
-00034 /* Admin. Dossier */
-00035 $rep=DbConnect($_SESSION['g_dossier']);
-00036 require_once ("class_user.php");
-00037 $User=new cl_user($rep);
-00038 $User->Check();
-00040 // update preference
-00042 if ( isset ( $_POST['style_user']) ) {
-00043         $User->update_global_pref('THEME',$_POST['style_user']);
-00044       $_SESSION['g_theme']=$_POST['style_user'];
-00045 
-00046 }
-00047 // Met a jour le pagesize
-00048 if ( isset ( $_POST['p_size']) ) {
-00049         $User->update_global_pref('PAGESIZE',$_POST['p_size']);
-00050       $_SESSION['g_pagesize']=$_POST['p_size'];
+00031 
+00032 if ( isset ($_REQUEST['dos'] ) ) {
+00033   $_SESSION['g_dossier']=$_REQUEST['dos'];
+00034   $g_name=GetDossierName($_SESSION['g_dossier']);
+00035   $_SESSION["g_name"]=$g_name;
+00036 
+00037 }
+00038 
+00039 include_once ("postgres.php");
+00040 /* Admin. Dossier */
+00041 $rep=DbConnect($_SESSION['g_dossier']);
+00042 require_once ("class_user.php");
+00043 $User=new cl_user($rep);
+00044 $User->Check();
+00046 // update preference
+00048 if ( isset ( $_POST['style_user']) ) {
+00049         $User->update_global_pref('THEME',$_POST['style_user']);
+00050       $_SESSION['g_theme']=$_POST['style_user'];
 00051 
 00052 }
-00053 
-00055 html_page_start($_SESSION['g_theme'],"","richtext.js");
-00056 
-00057 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
-00058   echo "You must choose a Dossier ";
-00059   exit -2;
-00060 }
-00061 
-00062 include("preference.php");
-00063 include_once("user_menu.php");
-00064 echo '<div class="u_tmenu">';
-00065 echo "<H2 class=\"info\">Commercial ".$_SESSION['g_name']." </H2>";
-00066 
-00067 $p_action=(isset ($_REQUEST['p_action']))?$_REQUEST['p_action']:"";
-00068 // TODO Menu with all the customer
-00069 echo ShowItem(array(
-00070                     array('?p_action=client','Client'),
-00071                     array('?p_action=fournisseur','Fournisseur'),
-00072                     array('?p_action=contact','Contact'),
-00073                     array('?p_action=suivi_courrier','Suivi courrier'),
-00074                     array('?p_action=mbre','Membre'),
-00075                     array('?p_action=pref','Préférence'),
-00076                     array('login.php','Accueil',"Accueil"),
-00077                     array('logout.php','logout',"Sortie")
-00078                     ),
-00079               'H',"mtitle","mtitle","?p_action=$p_action",' width="100%"');
-00080 
-00081 
-00082                     //
-00083 echo '</div>';
-00084 
-00085 $cn=DbConnect($_SESSION['g_dossier']);
-00087 // p_action == pref
-00089 if ( $p_action == "pref" ) 
-00090 {
-00091   require_once("pref.inc.php");
-00092 }
-00094 // p_action == client
-00096 if ( $p_action == "client" ) 
-00097 {
-00098   require_once("client.inc.php");
-00099 }// $p_action == fournisseur
-00101 // Fournisseur
-00102 if ( $p_action == 'fournisseur') 
-00103 {
-00104   require_once("fournisseur.inc.php");
-00105 }
-00107 // action
-00108 if ( $p_action == 'suivi_courrier') 
-00109 {
-00110   require_once("action.inc.php");
-00111 }
-

Generated on Wed May 31 21:39:14 2006 for phpcompta by  +00053 // Met a jour le pagesize +00054 if ( isset ( $_POST['p_size']) ) { +00055 $User->update_global_pref('PAGESIZE',$_POST['p_size']); +00056 $_SESSION['g_pagesize']=$_POST['p_size']; +00057 +00058 } +00059 +00061 html_page_start($_SESSION['g_theme'],"","richtext.js"); +00062 +00063 if ( ! isset ( $_SESSION['g_dossier'] ) ) { +00064 echo "You must choose a Dossier "; +00065 exit -2; +00066 } +00067 +00068 include("preference.php"); +00069 include_once("user_menu.php"); +00070 echo '<div class="u_tmenu">'; +00071 echo "<H2 class=\"info\">Commercial ".$_SESSION['g_name']." </H2>"; +00072 +00073 $p_action=(isset ($_REQUEST['p_action']))?$_REQUEST['p_action']:""; +00074 // TODO Menu with all the customer +00075 echo ShowItem(array( +00076 array('?p_action=client','Client'), +00077 array('?p_action=facture','Facture'), +00078 array('?p_action=fournisseur','Fournisseur'), +00079 array('?p_action=contact','Contact'), +00080 array('?p_action=suivi_courrier','Suivi courrier'), +00081 array('?p_action=pref','Préférence'), +00082 array('parametre.php?dos='.$_SESSION['g_dossier'],"Paramètre"), +00083 array('user_compta.php?dos='.$_SESSION['g_dossier'],"Comptabilité"), +00084 array('login.php','Accueil',"Accueil"), +00085 array('logout.php','logout',"Sortie") +00086 ), +00087 'H',"mtitle","mtitle","?p_action=$p_action",' width="100%"'); +00088 +00089 +00090 // +00091 echo '</div>'; +00092 +00093 $cn=DbConnect($_SESSION['g_dossier']); +00095 // p_action == pref +00097 if ( $p_action == "pref" ) +00098 { +00099 require_once("pref.inc.php"); +00100 } +00102 // p_action == client +00104 if ( $p_action == "client" ) +00105 { +00106 require_once("client.inc.php"); +00107 }// $p_action == fournisseur +00109 // Fournisseur +00110 if ( $p_action == 'fournisseur') +00111 { +00112 require_once("fournisseur.inc.php"); +00113 } +00115 // action +00116 if ( $p_action == 'suivi_courrier') +00117 { +00118 require_once("action.inc.php"); +00119 } +00121 // p_action == facture +00123 if ( $p_action == "facture" ) +00124 { +00125 require_once("facture.inc.php"); +00126 } +00128 // Contact +00129 if ( $p_action == 'contact') +00130 { +00131 require_once("contact.inc.php"); +00132 } +

Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/commercial_8php.html b/doc/developper/html/commercial_8php.html index 2f3797762..320f960c4 100644 --- a/doc/developper/html/commercial_8php.html +++ b/doc/developper/html/commercial_8php.html @@ -4,10 +4,12 @@ - + -

commercial.php File Reference

+

commercial.php File Reference

Base of the module "Gestion", the p_action indicates what file must included and this file will manage the request (customer, supplier, contact,...). More... +

+

Go to the source code of this file. @@ -23,7 +25,12 @@
 $cn = DbConnect($_SESSION['g_dossier'])
-


Variable Documentation

+

Detailed Description

+Base of the module "Gestion", the p_action indicates what file must included and this file will manage the request (customer, supplier, contact,...). +

+ +

+Definition in file commercial.php.


Variable Documentation

@@ -46,9 +53,9 @@

-Definition at line 29 of file commercial.php. +Definition at line 35 of file commercial.php.

-Referenced by cl_user::Check(), cl_user::cl_user(), fiche::GetByDef(), cl_user::GetGlobalPref(), jrn_navigation_bar(), ListJrn(), ShowDossier(), TransferCSV(), and ViewFiche(). +Referenced by cl_user::Check(), cl_user::cl_user(), fiche::GetByDef(), cl_user::GetGlobalPref(), jrn_navigation_bar(), ListJrn(), action::myList(), ShowDossier(), TransferCSV(), and ViewFiche().

@@ -73,7 +80,7 @@ Referenced by cl_user::

-Definition at line 85 of file commercial.php. +Definition at line 93 of file commercial.php.

@@ -98,7 +105,7 @@ Definition at line 85

-Definition at line 67 of file commercial.php. +Definition at line 73 of file commercial.php.

@@ -123,7 +130,7 @@ Definition at line 67

-Definition at line 35 of file commercial.php. +Definition at line 41 of file commercial.php.

@@ -148,10 +155,10 @@ Definition at line 35

-Definition at line 37 of file commercial.php. +Definition at line 43 of file commercial.php. -


Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/constant_8php-source.html b/doc/developper/html/constant_8php-source.html index 73d8e9705..a3001287f 100644 --- a/doc/developper/html/constant_8php-source.html +++ b/doc/developper/html/constant_8php-source.html @@ -4,7 +4,7 @@ - +

constant.php

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

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00343 </form> +00344 <SCRIPT language=\"javascript\"> +00345 +00346 function cal() +00347 { +00348 document.getElementById(\"name\").innerHTML= +00349 eval(document.calc_line.calculator.value) +00350 } +00351 </script> +00352 +00353 +00354 +00355 " +00356 ); +00357 +00358 define ("JS_TVA","<script language=\"javascript\"> +00359 +00360 function ChangeTVA(p_ctl,p_value) { +00361 if (document.getElementById(p_ctl) ) { +00362 var f=document.getElementsByName(p_value); +00363 for ( var i=0; i < f.length ; i++) { +00364 document.getElementById(p_ctl).innerHTML=f[i].value; +00365 } +00366 } +00367 } +00368 +00369 </script>"); +00370 // Sql string +00371 define ("SQL_LIST_ALL_INVOICE",""); +00372 +00373 define ("SQL_LIST_UNPAID_INVOICE"," where (jr_rapt is null or jr_rapt = '') and jr_valid = true "); +00374 define ("SQL_LIST_UNPAID_INVOICE_DATE_LIMIT" ," where (jr_rapt is null or jr_rapt = '') +00375 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" ); +00376 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/constant_8php.html b/doc/developper/html/constant_8php.html index c429aacf1..4859a7067 100644 --- a/doc/developper/html/constant_8php.html +++ b/doc/developper/html/constant_8php.html @@ -4,10 +4,12 @@ - + -

constant.php File Reference

+

constant.php File Reference

Contains all the variable + the javascript and some parameter. More... +

+

Go to the source code of this file. @@ -118,60 +120,77 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + +
enum  ATTR_DEF_TVA
enum  ATTR_DEF_ADRESS
enum  ATTR_DEF_NUMTVA
enum  ATTR_DEF_CP
enum  ATTR_DEF_ADRESS
enum  ATTR_DEF_PAYS
enum  ATTR_DEF_CP
enum  ATTR_DEF_STOCK
enum  ATTR_DEF_PAYS
enum  FICHE_TYPE_CLIENT
enum  ATTR_DEF_STOCK
enum  FICHE_TYPE_VENTE
enum  ATTR_DEF_TEL
enum  FICHE_TYPE_FOURNISSEUR
enum  ATTR_DEF_EMAIL
enum  FICHE_TYPE_FIN
enum  ATTR_DEF_COMPANY
enum  FICHE_TYPE_ADM_TAX
enum  ATTR_DEF_FAX
enum  ATTR_DEF_DEPENSE_NON_DEDUCTIBLE
enum  FICHE_TYPE_CLIENT
enum  ATTR_DEF_TVA_NON_DEDUCTIBLE
enum  FICHE_TYPE_VENTE
enum  ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP
enum  FICHE_TYPE_FOURNISSEUR
enum  ATTR_DEF_QUICKCODE
enum  FICHE_TYPE_FIN
enum  JS_SEARCH_POSTE
enum  FICHE_TYPE_CONTACT
enum  JS_SHOW_TVA
enum  FICHE_TYPE_ADM_TAX
enum  JS_VIEW_JRN_DETAIL
enum  ATTR_DEF_DEPENSE_NON_DEDUCTIBLE
enum  JS_VIEW_JRN_CANCEL
enum  ATTR_DEF_TVA_NON_DEDUCTIBLE
enum  JS_VIEW_JRN_MODIFY
enum  ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP
enum  JS_UPDATE_PCMN
enum  ATTR_DEF_QUICKCODE
enum  JS_SEARCH_CARD
enum  JS_SEARCH_POSTE
enum  JS_CONCERNED_OP
enum  JS_SHOW_TVA
enum  JS_CALC_LINE
enum  JS_VIEW_JRN_DETAIL
enum  JS_TVA
enum  JS_VIEW_JRN_CANCEL
enum  SQL_LIST_ALL_INVOICE
enum  JS_VIEW_JRN_MODIFY
enum  SQL_LIST_UNPAID_INVOICE
enum  JS_UPDATE_PCMN
enum  SQL_LIST_UNPAID_INVOICE_DATE_LIMIT
enum  JS_SEARCH_CARD
enum  JS_CONCERNED_OP
enum  JS_CALC_LINE
enum  JS_TVA
enum  SQL_LIST_ALL_INVOICE
enum  SQL_LIST_UNPAID_INVOICE
enum  SQL_LIST_UNPAID_INVOICE_DATE_LIMIT
-


Enumeration Type Documentation

+

Detailed Description

+Contains all the variable + the javascript and some parameter. +

+ +

+Definition in file constant.php.


Enumeration Type Documentation

@@ -194,7 +213,7 @@

-Definition at line 94 of file constant.php. +Definition at line 98 of file constant.php.

@@ -219,16 +238,16 @@ Definition at line 94

-Definition at line 97 of file constant.php. +Definition at line 101 of file constant.php. -

+

@@ -244,41 +263,16 @@ Definition at line 97

-Definition at line 103 of file constant.php. +Definition at line 107 of file constant.php.

- +
enum ATTR_DEF_ADRESS enum ATTR_DEF_ADRESS
-

+

- -
- - -
enum ATTR_DEF_CP
-
- - - - - -
-   - - -

- -

-Definition at line 104 of file constant.php.

-

- - - @@ -297,6 +291,106 @@ Definition at line 104 Definition at line 113 of file constant.php.
- - - +
enum ATTR_DEF_DEPENSE_NON_DEDUCTIBLE enum ATTR_DEF_COMPANY
+

+ + + + +
+ + + + +
enum ATTR_DEF_CP
+
+ + + + + +
+   + + +

+ +

+Definition at line 108 of file constant.php.

+

+ + + + +
+ + + + +
enum ATTR_DEF_DEPENSE_NON_DEDUCTIBLE
+
+ + + + + +
+   + + +

+ +

+Definition at line 123 of file constant.php.

+

+ + + + +
+ + + + +
enum ATTR_DEF_EMAIL
+
+ + + + + +
+   + + +

+ +

+Definition at line 112 of file constant.php.

+

+ + + + +
+ + + + +
enum ATTR_DEF_FAX
+
+ + + + + +
+   + + +

+ +

+Definition at line 114 of file constant.php.

@@ -319,16 +413,16 @@ Definition at line 113

-Definition at line 98 of file constant.php. +Definition at line 102 of file constant.php.

-

+

@@ -344,7 +438,32 @@ Definition at line 98

-Definition at line 105 of file constant.php. +Definition at line 106 of file constant.php. +

+
- +
enum ATTR_DEF_PAYS enum ATTR_DEF_NUMTVA
+

+ + + + +
+ + + + +
enum ATTR_DEF_PAYS
+
+ + + +
+   + + +

+ +

+Definition at line 109 of file constant.php.

@@ -369,7 +488,7 @@ Definition at line 105

-Definition at line 100 of file constant.php. +Definition at line 103 of file constant.php.

@@ -394,16 +513,16 @@ Definition at line 100

-Definition at line 101 of file constant.php. +Definition at line 104 of file constant.php. -

+

@@ -419,16 +538,16 @@ Definition at line 101

-Definition at line 116 of file constant.php. +Definition at line 126 of file constant.php.

- +
enum ATTR_DEF_QUICKCODE enum ATTR_DEF_QUICKCODE
-

+

@@ -444,7 +563,32 @@ Definition at line 116

-Definition at line 106 of file constant.php. +Definition at line 110 of file constant.php. +

+
- +
enum ATTR_DEF_STOCK enum ATTR_DEF_STOCK
+

+ + + + +
+ + + + +
enum ATTR_DEF_TEL
+
+ + + +
+   + + +

+ +

+Definition at line 111 of file constant.php.

@@ -469,16 +613,16 @@ Definition at line 106

-Definition at line 102 of file constant.php. +Definition at line 105 of file constant.php. -

+

@@ -494,16 +638,16 @@ Definition at line 102

-Definition at line 114 of file constant.php. +Definition at line 124 of file constant.php.

- +
enum ATTR_DEF_TVA_NON_DEDUCTIBLE enum ATTR_DEF_TVA_NON_DEDUCTIBLE
-

+

@@ -519,7 +663,7 @@ Definition at line 114

-Definition at line 115 of file constant.php. +Definition at line 125 of file constant.php.

- +
enum ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP enum ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP

@@ -544,7 +688,7 @@ Definition at line 115

-Definition at line 67 of file constant.php. +Definition at line 71 of file constant.php.

@@ -569,7 +713,7 @@ Definition at line 67

-Definition at line 66 of file constant.php. +Definition at line 70 of file constant.php.

@@ -594,7 +738,7 @@ Definition at line 66

-Definition at line 52 of file constant.php. +Definition at line 56 of file constant.php.

@@ -619,7 +763,7 @@ Definition at line 52

-Definition at line 56 of file constant.php. +Definition at line 60 of file constant.php.

@@ -644,7 +788,7 @@ Definition at line 56

-Definition at line 54 of file constant.php. +Definition at line 58 of file constant.php.

@@ -669,7 +813,7 @@ Definition at line 54

-Definition at line 85 of file constant.php. +Definition at line 89 of file constant.php.

@@ -694,7 +838,7 @@ Definition at line 85

-Definition at line 25 of file constant.php. +Definition at line 29 of file constant.php.

@@ -719,7 +863,7 @@ Definition at line 25

-Definition at line 48 of file constant.php. +Definition at line 52 of file constant.php.

@@ -744,7 +888,7 @@ Definition at line 48

-Definition at line 73 of file constant.php. +Definition at line 77 of file constant.php.

@@ -769,7 +913,7 @@ Definition at line 73

-Definition at line 23 of file constant.php. +Definition at line 27 of file constant.php.

@@ -794,7 +938,7 @@ Definition at line 23

-Definition at line 30 of file constant.php. +Definition at line 34 of file constant.php.

@@ -819,7 +963,7 @@ Definition at line 30

-Definition at line 79 of file constant.php. +Definition at line 83 of file constant.php.

@@ -844,7 +988,7 @@ Definition at line 79

-Definition at line 62 of file constant.php. +Definition at line 66 of file constant.php.

@@ -869,7 +1013,7 @@ Definition at line 62

-Definition at line 32 of file constant.php. +Definition at line 36 of file constant.php.

@@ -894,16 +1038,16 @@ Definition at line 32

-Definition at line 34 of file constant.php. +Definition at line 38 of file constant.php. -

+

@@ -919,16 +1063,16 @@ Definition at line 34

-Definition at line 112 of file constant.php. +Definition at line 122 of file constant.php.

- +
enum FICHE_TYPE_ADM_TAX enum FICHE_TYPE_ADM_TAX
-

+

@@ -944,16 +1088,16 @@ Definition at line 112

-Definition at line 108 of file constant.php. +Definition at line 117 of file constant.php.

- +
enum FICHE_TYPE_CLIENT enum FICHE_TYPE_CLIENT
-

+

@@ -969,16 +1113,16 @@ Definition at line 108

-Definition at line 111 of file constant.php. +Definition at line 121 of file constant.php.

- +
enum FICHE_TYPE_FIN enum FICHE_TYPE_CONTACT
-

+

@@ -994,16 +1138,16 @@ Definition at line 111

-Definition at line 110 of file constant.php. +Definition at line 120 of file constant.php.

- +
enum FICHE_TYPE_FOURNISSEUR enum FICHE_TYPE_FIN
-

+

@@ -1019,7 +1163,32 @@ Definition at line 110

-Definition at line 109 of file constant.php. +Definition at line 119 of file constant.php. +

+
- +
enum FICHE_TYPE_VENTE enum FICHE_TYPE_FOURNISSEUR
+

+ + + + +
+ + + + +
enum FICHE_TYPE_VENTE
+
+ + + +
+   + + +

+ +

+Definition at line 118 of file constant.php.

@@ -1044,7 +1213,7 @@ Definition at line 109

-Definition at line 59 of file constant.php. +Definition at line 63 of file constant.php.

@@ -1069,7 +1238,7 @@ Definition at line 59

-Definition at line 78 of file constant.php. +Definition at line 82 of file constant.php.

@@ -1094,7 +1263,7 @@ Definition at line 78

-Definition at line 38 of file constant.php. +Definition at line 42 of file constant.php.

@@ -1119,7 +1288,7 @@ Definition at line 38

-Definition at line 42 of file constant.php. +Definition at line 46 of file constant.php.

@@ -1144,7 +1313,7 @@ Definition at line 42

-Definition at line 36 of file constant.php. +Definition at line 40 of file constant.php.

@@ -1169,7 +1338,7 @@ Definition at line 36

-Definition at line 63 of file constant.php. +Definition at line 67 of file constant.php.

@@ -1194,16 +1363,16 @@ Definition at line 63

-Definition at line 70 of file constant.php. +Definition at line 74 of file constant.php. -

+

@@ -1219,16 +1388,16 @@ Definition at line 70

-Definition at line 321 of file constant.php. +Definition at line 331 of file constant.php.

- +
enum JS_CALC_LINE enum JS_CALC_LINE
-

+

@@ -1244,16 +1413,16 @@ Definition at line 321

-Definition at line 292 of file constant.php. +Definition at line 302 of file constant.php.

- +
enum JS_CONCERNED_OP enum JS_CONCERNED_OP
-

+

@@ -1269,16 +1438,16 @@ Definition at line 292

-Definition at line 207 of file constant.php. +Definition at line 217 of file constant.php.

- +
enum JS_SEARCH_CARD enum JS_SEARCH_CARD
-

+

@@ -1294,16 +1463,16 @@ Definition at line 207

-Definition at line 117 of file constant.php. +Definition at line 127 of file constant.php.

- +
enum JS_SEARCH_POSTE enum JS_SEARCH_POSTE
-

+

@@ -1319,16 +1488,16 @@ Definition at line 117

-Definition at line 156 of file constant.php. +Definition at line 166 of file constant.php.

- +
enum JS_SHOW_TVA enum JS_SHOW_TVA
-

+

@@ -1344,16 +1513,16 @@ Definition at line 156

-Definition at line 348 of file constant.php. +Definition at line 358 of file constant.php.

- +
enum JS_TVA enum JS_TVA
-

+

@@ -1369,16 +1538,16 @@ Definition at line 348

-Definition at line 196 of file constant.php. +Definition at line 206 of file constant.php.

- +
enum JS_UPDATE_PCMN enum JS_UPDATE_PCMN
-

+

@@ -1394,16 +1563,16 @@ Definition at line 196

-Definition at line 175 of file constant.php. +Definition at line 185 of file constant.php.

- +
enum JS_VIEW_JRN_CANCEL enum JS_VIEW_JRN_CANCEL
-

+

@@ -1419,16 +1588,16 @@ Definition at line 175

-Definition at line 169 of file constant.php. +Definition at line 179 of file constant.php.

- +
enum JS_VIEW_JRN_DETAIL enum JS_VIEW_JRN_DETAIL
-

+

@@ -1444,7 +1613,7 @@ Definition at line 169

-Definition at line 183 of file constant.php. +Definition at line 193 of file constant.php.

- +
enum JS_VIEW_JRN_MODIFY enum JS_VIEW_JRN_MODIFY

@@ -1469,7 +1638,7 @@ Definition at line 183

-Definition at line 77 of file constant.php. +Definition at line 81 of file constant.php.

@@ -1494,7 +1663,7 @@ Definition at line 77

-Definition at line 89 of file constant.php. +Definition at line 93 of file constant.php.

@@ -1519,7 +1688,7 @@ Definition at line 89

-Definition at line 90 of file constant.php. +Definition at line 94 of file constant.php.

@@ -1544,7 +1713,7 @@ Definition at line 90

-Definition at line 91 of file constant.php. +Definition at line 95 of file constant.php.

@@ -1569,7 +1738,7 @@ Definition at line 91

-Definition at line 40 of file constant.php. +Definition at line 44 of file constant.php.

@@ -1594,7 +1763,7 @@ Definition at line 40

-Definition at line 83 of file constant.php. +Definition at line 87 of file constant.php.

@@ -1619,7 +1788,7 @@ Definition at line 83

-Definition at line 75 of file constant.php. +Definition at line 79 of file constant.php.

@@ -1644,7 +1813,7 @@ Definition at line 75

-Definition at line 76 of file constant.php. +Definition at line 80 of file constant.php.

@@ -1669,7 +1838,7 @@ Definition at line 76

-Definition at line 65 of file constant.php. +Definition at line 69 of file constant.php.

@@ -1694,7 +1863,7 @@ Definition at line 65

-Definition at line 86 of file constant.php. +Definition at line 90 of file constant.php.

@@ -1719,7 +1888,7 @@ Definition at line 86

-Definition at line 68 of file constant.php. +Definition at line 72 of file constant.php.

@@ -1744,7 +1913,7 @@ Definition at line 68

-Definition at line 57 of file constant.php. +Definition at line 61 of file constant.php.

@@ -1769,7 +1938,7 @@ Definition at line 57

-Definition at line 84 of file constant.php. +Definition at line 88 of file constant.php.

@@ -1794,7 +1963,7 @@ Definition at line 84

-Definition at line 44 of file constant.php. +Definition at line 48 of file constant.php.

@@ -1819,7 +1988,7 @@ Definition at line 44

-Definition at line 69 of file constant.php. +Definition at line 73 of file constant.php.

@@ -1844,7 +2013,7 @@ Definition at line 69

-Definition at line 50 of file constant.php. +Definition at line 54 of file constant.php.

@@ -1869,7 +2038,7 @@ Definition at line 50

-Definition at line 22 of file constant.php. +Definition at line 26 of file constant.php.

@@ -1894,7 +2063,7 @@ Definition at line 22

-Definition at line 71 of file constant.php. +Definition at line 75 of file constant.php.

@@ -1919,7 +2088,7 @@ Definition at line 71

-Definition at line 74 of file constant.php. +Definition at line 78 of file constant.php.

@@ -1944,7 +2113,7 @@ Definition at line 74

-Definition at line 72 of file constant.php. +Definition at line 76 of file constant.php.

@@ -1969,16 +2138,16 @@ Definition at line 72

-Definition at line 46 of file constant.php. +Definition at line 50 of file constant.php. -

+

@@ -1994,16 +2163,16 @@ Definition at line 46

-Definition at line 361 of file constant.php. +Definition at line 371 of file constant.php.

- +
enum SQL_LIST_ALL_INVOICE enum SQL_LIST_ALL_INVOICE
-

+

@@ -2019,16 +2188,16 @@ Definition at line 361

-Definition at line 362 of file constant.php. +Definition at line 373 of file constant.php.

- +
enum SQL_LIST_UNPAID_INVOICE enum SQL_LIST_UNPAID_INVOICE
-

+

@@ -2044,7 +2213,7 @@ Definition at line 362

-Definition at line 363 of file constant.php. +Definition at line 374 of file constant.php.

- +
enum SQL_LIST_UNPAID_INVOICE_DATE_LIMIT enum SQL_LIST_UNPAID_INVOICE_DATE_LIMIT

@@ -2069,7 +2238,7 @@ Definition at line 363

-Definition at line 61 of file constant.php. +Definition at line 65 of file constant.php.

@@ -2094,7 +2263,7 @@ Definition at line 61

-Definition at line 60 of file constant.php. +Definition at line 64 of file constant.php.

@@ -2119,7 +2288,7 @@ Definition at line 60

-Definition at line 55 of file constant.php. +Definition at line 59 of file constant.php.

@@ -2144,10 +2313,10 @@ Definition at line 55

-Definition at line 82 of file constant.php. +Definition at line 86 of file constant.php. -


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/debug_8php-source.html b/doc/developper/html/debug_8php-source.html index 79a7d2823..dd507ec35 100644 --- a/doc/developper/html/debug_8php-source.html +++ b/doc/developper/html/debug_8php-source.html @@ -4,7 +4,7 @@ - +

debug.php

Go to the documentation of this file.
00001 <?
@@ -31,17 +31,16 @@
 00022 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00023 //include_once ("postgres.php");
 00024 include_once("constant.php");
-00025 
-00026 function echo_debug      ($file,$line="",$msg="") {
-00027   if ( DEBUG=='true' ) {
-00028     $f=fopen ("/tmp/phpcompta.log","a+");
-00029     fwrite($f,"$file $line $msg\n");
-00030     fclose ($f);
-00031   }
-00032 }
-00033 
-00034 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00034 function echo_debug ($file,$line="",$msg="") { +00035 if ( DEBUG=='true' ) { +00036 $f=fopen ("/tmp/phpcompta.log","a+"); +00037 fwrite($f,"$file $line $msg\n"); +00038 fclose ($f); +00039 } +00040 } +00041 +00042 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/debug_8php.html b/doc/developper/html/debug_8php.html index 402acd672..94525931c 100644 --- a/doc/developper/html/debug_8php.html +++ b/doc/developper/html/debug_8php.html @@ -4,18 +4,26 @@ - + -

debug.php File Reference

+

debug.php File Reference

Debug procedure. More... +

+

Go to the source code of this file. +

Functions

 echo_debug ($file, $line="", $msg="")
 print debug
-


Function Documentation

+

Detailed Description

+Debug procedure. +

+ +

+Definition in file debug.php.


Function Documentation

@@ -56,14 +64,23 @@ +Referenced by AddFiche(), AddForm(), AddModele(), fiche::blank(), cl_user::Check(), CheckJrn(), cl_user::cl_user(), ComputeTotalVat(), ComputeVat(), DbConnect(), DefModele(), DeleteRapt(), fiche::Display(), DisplayDetailModele(), echo_error(), EncodeFiche(), EncodeForm(), ExecSql(), form_verify_input(), FormAchInput(), FormVenInput(), Document::Generate(), fiche::Get(), get_quick_key(), GetAllUser(), GetArray(), fiche::GetByQCode(), GetClass(), GetCreateAccount(), GetData(), GetDataJrnJrId(), GetDataJrnPdf(), jrn::GetDefLine(), cl_user::GetGlobalPref(), GetNextFiche(), GetParent(), GetPriv(), GetRappel(), jrn::GetRow(), jrn::GetRowSimple(), ImpHtml(), fiche::insert(), cl_user::insert_default_global_pref(), InsertJrn(), InsertJrnx(), InsertRapt(), InsertStockGoods(), widget::IOValue(), new_fiche(), Document::ParseDocument(), ParseFormula(), RecordFin(), RecordInvoice(), RecordJrn(), RecordSell(), Invoice::Save(), Document_modele::Save(), save_upload_document(), Document::SaveGenerated(), action::SaveStage2(), ShowDossier(), ShowMenuCompta(), ShowMenuJrnUser(), ShowPeriode(), u_ShowMenuRecherche(), fiche::update(), UpdateFiche(), UpdateForm(), UpdateJrn(), UpdateModele(), VerifData(), VerifyOperationDate(), ViewImp(), ViewJrn(), ViewRec(), and ViewRecord().

+print debug +

+

Parameters:
+ + + + +
$file file name
what line
debugging msg
+

-Definition at line 26 of file debug.php. +Definition at line 34 of file debug.php.

-Referenced by AddFiche(), AddForm(), AddModele(), fiche::blank(), cl_user::Check(), CheckJrn(), cl_user::cl_user(), ComputeTotalVat(), ComputeVat(), DbConnect(), DefModele(), DeleteRapt(), fiche::Display(), DisplayDetailModele(), echo_error(), EncodeFiche(), EncodeForm(), ExecSql(), form_verify_input(), FormAchInput(), FormVenInput(), Customer::Get(), get_quick_key(), GetAllUser(), GetArray(), GetClass(), GetCreateAccount(), GetData(), GetDataJrnJrId(), GetDataJrnPdf(), cl_user::GetGlobalPref(), GetNextFiche(), GetParent(), GetPriv(), GetRappel(), jrn::GetRow(), jrn::GetRowSimple(), ImpHtml(), fiche::insert(), cl_user::insert_default_global_pref(), InsertJrn(), InsertJrnx(), InsertRapt(), InsertStockGoods(), widget::IOValue(), new_fiche(), ParseFormula(), RecordFin(), RecordInvoice(), RecordJrn(), RecordSell(), Invoice::Save(), Document_modele::Save(), save_upload_document(), ShowDossier(), ShowMenuJrnUser(), ShowPeriode(), u_ShowMenuRecherche(), fiche::update(), UpdateFiche(), UpdateForm(), UpdateJrn(), UpdateModele(), VerifData(), VerifyOperationDate(), ViewImp(), ViewJrn(), ViewRec(), and ViewRecord().

-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/decla_8BE_8inc_8php-source.html b/doc/developper/html/decla_8BE_8inc_8php-source.html index fe4f402cf..dcf3778f1 100644 --- a/doc/developper/html/decla_8BE_8inc_8php-source.html +++ b/doc/developper/html/decla_8BE_8inc_8php-source.html @@ -4,7 +4,7 @@ - +

decla.BE.inc.php

Go to the documentation of this file.
00001 <?
@@ -27,70 +27,58 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 /* function MakeListingVat
-00022  **************************************************
-00023  * Purpose : Créer le fichier à déposer pour la TVA
-00024  *           voir le fichier BE_fr_list_client_nonpapier.pdf
-00025  *        
-00026  * parm : 
-00027  *      -array
-00028  * gen :
-00029  *      -none
-00030  * return:
-00031  *     - none
-00032  */
-00033 function MakeListingVat($p_cn,$p_array,$p_year) {
-00034   // declarant
-00035   //--
-00036   require_once("class_own.php");
-00037   // load the data
-00038   $my=new Own($p_cn);
-00039   //Make the first record
-00040   $a="000000";
-00041   $a.=sprintf("% 32s",$my->MY_NAME);
-00042   $b=$my->MY_STREET.",".$my->MY_NUMBER;
-00043   $a.=sprintf("% 24s",$b);
-00044   $b=$my->MY_CP." ".$my->MY_COMMUNE;
-00045   $a.=sprintf("% 27s",$b);
-00046   $a.="BE";
-00047   $a.=sprintf("%9s",$my->MY_TVA);
-00048   // special zone
-00049   $a.=sprintf("% 20s",' ');
-00050   //
-00051   $a.="E";
-00052   $a.=$p_year;
-00053   $a.="\n";
-00054   // customer record
-00055   $rec_id=0;
-00056   $tot_amount=0;
-00057   $tot_tva=0;
-00058   foreach ($p_array as $client) {
-00059     if ( strlen(trim($client['tva'])) != 0 ) {
-00060       $rec_id++;
-00061       $a.=sprintf("%06d",$rec_id);
-00062       $a.=sprintf("% 32s",$client['name']);
-00063       $a.=str_repeat(" ",51);
-00064       $a.=sprintf("BE%s",$client['vat_number']);
-00065       $a.=sprintf("%010d",$client['amount']*100);
-00066       $a.=sprintf("%010d",$client['tva']*100);
-00067       $a.=str_repeat(" ",10);
-00068       $a.="\n";
-00069       $tot_amount=+$client['amount']*100;
-00070       $tot_tva+=$client['tva']*100;
-00071     }
-00072   }
-00073     //Last Record
-00074   $a.="999999";
-00075   $a.=sprintf("%016d",$tot_amount);
-00076   $a.=sprintf("%016d",$tot_tva);
-00077   $a.=str_repeat(" ",51);
-00078   $a.="BE";
-00079   $a.=$my->MY_TVA;
-00080   $a.=str_repeat(" ",28);
-00081   $a.="\r\n";
-00082   return $a;
-00083 }
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00036 function MakeListingVat($p_cn,$p_array,$p_year) { +00037 // declarant +00038 //-- +00039 require_once("class_own.php"); +00040 // load the data +00041 $my=new Own($p_cn); +00042 //Make the first record +00043 $a="000000"; +00044 $a.=sprintf("% 32s",$my->MY_NAME); +00045 $b=$my->MY_STREET.",".$my->MY_NUMBER; +00046 $a.=sprintf("% 24s",$b); +00047 $b=$my->MY_CP." ".$my->MY_COMMUNE; +00048 $a.=sprintf("% 27s",$b); +00049 $a.="BE"; +00050 $a.=sprintf("%9s",$my->MY_TVA); +00051 // special zone +00052 $a.=sprintf("% 20s",' '); +00053 // +00054 $a.="E"; +00055 $a.=$p_year; +00056 $a.="\n"; +00057 // customer record +00058 $rec_id=0; +00059 $tot_amount=0; +00060 $tot_tva=0; +00061 foreach ($p_array as $client) { +00062 if ( strlen(trim($client['tva'])) != 0 ) { +00063 $rec_id++; +00064 $a.=sprintf("%06d",$rec_id); +00065 $a.=sprintf("% 32s",$client['name']); +00066 $a.=str_repeat(" ",51); +00067 $a.=sprintf("BE%s",$client['vat_number']); +00068 $a.=sprintf("%010d",$client['amount']*100); +00069 $a.=sprintf("%010d",$client['tva']*100); +00070 $a.=str_repeat(" ",10); +00071 $a.="\n"; +00072 $tot_amount=+$client['amount']*100; +00073 $tot_tva+=$client['tva']*100; +00074 } +00075 } +00076 //Last Record +00077 $a.="999999"; +00078 $a.=sprintf("%016d",$tot_amount); +00079 $a.=sprintf("%016d",$tot_tva); +00080 $a.=str_repeat(" ",51); +00081 $a.="BE"; +00082 $a.=$my->MY_TVA; +00083 $a.=str_repeat(" ",28); +00084 $a.="\r\n"; +00085 return $a; +00086 } +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/decla_8BE_8inc_8php.html b/doc/developper/html/decla_8BE_8inc_8php.html index 55fcf0cdd..d38e5c9c3 100644 --- a/doc/developper/html/decla_8BE_8inc_8php.html +++ b/doc/developper/html/decla_8BE_8inc_8php.html @@ -4,7 +4,7 @@ - +

decla.BE.inc.php File Reference

@@ -14,6 +14,7 @@

Functions

 MakeListingVat ($p_cn, $p_array, $p_year) + Créer le fichier à déposer pour la TVA voir le fichier BE_fr_list_client_nonpapier.pdf.

Function Documentation

@@ -56,14 +57,18 @@

+Créer le fichier à déposer pour la TVA voir le fichier BE_fr_list_client_nonpapier.pdf. +

+parm : -array gen : -none return:

    +
  • none

-Definition at line 33 of file decla.BE.inc.php. +Definition at line 36 of file decla.BE.inc.php.

-References $a, $b, $client, $my, and name. +References $a, $b, $client, $my, and name. -


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/demo_8php-source.html b/doc/developper/html/demo_8php-source.html index 4747a986f..dc569f6b0 100644 --- a/doc/developper/html/demo_8php-source.html +++ b/doc/developper/html/demo_8php-source.html @@ -4,100 +4,101 @@ - + -

demo.php

Go to the documentation of this file.
00001 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-00002 
-00003 <html>
-00004 <head>
-00005         <title>Cross-Browser Rich Text Editor</title>
-00006         <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-00007         <meta name="PageURL" content="http://www.kevinroth.com/rte/demo.htm" />
-00008         <meta name="PageTitle" content="Cross-Browser Rich Text Editor" />
-00009         <!-- To decrease bandwidth, change the src to richtext_compressed.js //-->
-00010         <script language="JavaScript" type="text/javascript" src="richtext.js"></script>
-00011 </head>
-00012 <body>
-00013 
-00014 <h2>Cross-Browser Rich Text Editor</h2>
-00015 <p><a href="http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=3508&amp;lngWId=2" target="_blank"><img src="/images/PscContestWinner.jpg" height="88" width="409" alt="PscContestWinner" border="0"></a></p>
-00016 <p>The cross-browser rich-text editor implements the <a href="http://www.mozilla.org/editor/midas-spec.html" target="_blank">Mozilla Rich Text Editing API</a> included with Mozilla 1.3+.  There is <b>NO LICENSE</b>, so just take the code and use it for any purpose.  This code is 100% free.  Enjoy!</p>
-00017 <p>For frequently asked question and support, please visit <a href="http://www.kevinroth.com/forums/index.php?c=2">http://www.kevinroth.com/forums/index.php?c=2</a></p>
-00018 <p><b>Requires:</b> IE5+/<a href="http://www.mozilla.org/products/mozilla1.x/">Mozilla</a> 1.3+/<a href="http://www.mozilla.org/products/firefox/" target="_blank">Mozilla Firebird/Firefox</a> 0.6.1+/<a href="http://channels.netscape.com/ns/browsers/download.jsp" target="_blank">Netscape</a> 7.1+ for all rich-text features to function properly.  If browser does not support rich-text, it should display a standard textarea box.</p>
-00019 <p><b>Source:</b> <a href="rte.zip">rte.zip</a>, <a href="rte.tar.gz">rte.tar.gz</a><br>
-00020 Included in the zip are <a href="demo.htm">HTML</a>, <a href="demo.asp">ASP</a>, and <a href="demo.php">PHP</a> demos.  Also, here is an html demo showing <a href="multi.htm">multiple RTEs</a> on one page.</p>
-00021 <p><b>Change Log:</b> <a href="changelog.txt">changelog.txt</a></p>
-00022 
-00023 <p><b>If you feel that the work I've done has value to you,</b> I would greatly appreciate a paypal donation (click button below).  Another way you can help me out is to <a href="http://www.FreeFlatScreens.com/default.aspx?referer=11055453" target="_blank">sign up for a free flat screen</a>, to help me get mine.  Again, I am very grateful for any and all contributions.</p>
-00024 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
-00025 <input type="hidden" name="cmd" value="_xclick">
-00026 <input type="hidden" name="business" value="kevin@kevinroth.com">
-00027 <input type="hidden" name="no_note" value="1">
-00028 <input type="hidden" name="currency_code" value="USD">
-00029 <input type="hidden" name="tax" value="0">
-00030 <input type="hidden" name="lc" value="US">
-00031 <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
-00032 </form>
-00033 
-00034 <form name="RTEDemo" action="demo.htm" method="post" onsubmit="return submitForm();">
-00035 
-00036 <script language="JavaScript" type="text/javascript">
-00037 <!--
-00038 function submitForm() {
-00039         //make sure hidden and iframe values are in sync before submitting form
-00040         //to sync only 1 rte, use updateRTE(rte)
-00041         //to sync all rtes, use updateRTEs
-00042         //updateRTE('rte1');
-00043         updateRTEs();
-00044         alert("rte1 = " + document.RTEDemo.rte1.value);
-00045         alert("rte2 = " + document.RTEDemo.rte2.value);
-00046         alert("rte3 = " + document.RTEDemo.rte3.value);
-00047         
-00048         //change the following line to true to submit form
-00049         return false;
-00050 }
-00051 
-00052 //Usage: initRTE(imagesPath, includesPath, cssFile)
-00053 initRTE("images/", "", "");
-00054 //-->
-00055 </script>
-00056 <noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>
-00057 
-00058 <script language="JavaScript" type="text/javascript">
-00059 <!--
-00060 //Usage: writeRichText(fieldname, html, width, height, buttons, readOnly)
-00061 writeRichText('rte1', 'here&#39;s the "<em>preloaded</em> <b>content</b>"', 520, 200, true, false);
-00062 
-00063 document.writeln('<br><br>');
-00064 writeRichText('rte2', 'preloaded <b>text</b>', 560, 100, true, false);
-00065 
-00066 document.writeln('<br><br>');
-00067 writeRichText('rte3', 'preloaded <b>text</b>', 450, 100, true, true);
-00068 //-->
-00069 </script>
-00070 
-00071 <p>Click submit to show the value of the text box.</p>
-00072 <p><input type="submit" name="submit" value="Submit"></p>
-00073 </form>
+

demo.php

Go to the documentation of this file.
00001 <? 
+00005 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+00006 
+00007 <html>
+00008 <head>
+00009         <title>Cross-Browser Rich Text Editor</title>
+00010         <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+00011         <meta name="PageURL" content="http://www.kevinroth.com/rte/demo.htm" />
+00012         <meta name="PageTitle" content="Cross-Browser Rich Text Editor" />
+00013         <!-- To decrease bandwidth, change the src to richtext_compressed.js //-->
+00014         <script language="JavaScript" type="text/javascript" src="richtext.js"></script>
+00015 </head>
+00016 <body>
+00017 
+00018 <h2>Cross-Browser Rich Text Editor</h2>
+00019 <p><a href="http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=3508&amp;lngWId=2" target="_blank"><img src="/images/PscContestWinner.jpg" height="88" width="409" alt="PscContestWinner" border="0"></a></p>
+00020 <p>The cross-browser rich-text editor implements the <a href="http://www.mozilla.org/editor/midas-spec.html" target="_blank">Mozilla Rich Text Editing API</a> included with Mozilla 1.3+.  There is <b>NO LICENSE</b>, so just take the code and use it for any purpose.  This code is 100% free.  Enjoy!</p>
+00021 <p>For frequently asked question and support, please visit <a href="http://www.kevinroth.com/forums/index.php?c=2">http://www.kevinroth.com/forums/index.php?c=2</a></p>
+00022 <p><b>Requires:</b> IE5+/<a href="http://www.mozilla.org/products/mozilla1.x/">Mozilla</a> 1.3+/<a href="http://www.mozilla.org/products/firefox/" target="_blank">Mozilla Firebird/Firefox</a> 0.6.1+/<a href="http://channels.netscape.com/ns/browsers/download.jsp" target="_blank">Netscape</a> 7.1+ for all rich-text features to function properly.  If browser does not support rich-text, it should display a standard textarea box.</p>
+00023 <p><b>Source:</b> <a href="rte.zip">rte.zip</a>, <a href="rte.tar.gz">rte.tar.gz</a><br>
+00024 Included in the zip are <a href="demo.htm">HTML</a>, <a href="demo.asp">ASP</a>, and <a href="demo.php">PHP</a> demos.  Also, here is an html demo showing <a href="multi.htm">multiple RTEs</a> on one page.</p>
+00025 <p><b>Change Log:</b> <a href="changelog.txt">changelog.txt</a></p>
+00026 
+00027 <p><b>If you feel that the work I've done has value to you,</b> I would greatly appreciate a paypal donation (click button below).  Another way you can help me out is to <a href="http://www.FreeFlatScreens.com/default.aspx?referer=11055453" target="_blank">sign up for a free flat screen</a>, to help me get mine.  Again, I am very grateful for any and all contributions.</p>
+00028 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+00029 <input type="hidden" name="cmd" value="_xclick">
+00030 <input type="hidden" name="business" value="kevin@kevinroth.com">
+00031 <input type="hidden" name="no_note" value="1">
+00032 <input type="hidden" name="currency_code" value="USD">
+00033 <input type="hidden" name="tax" value="0">
+00034 <input type="hidden" name="lc" value="US">
+00035 <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
+00036 </form>
+00037 
+00038 <form name="RTEDemo" action="demo.htm" method="post" onsubmit="return submitForm();">
+00039 
+00040 <script language="JavaScript" type="text/javascript">
+00041 <!--
+00042 function submitForm() {
+00043         //make sure hidden and iframe values are in sync before submitting form
+00044         //to sync only 1 rte, use updateRTE(rte)
+00045         //to sync all rtes, use updateRTEs
+00046         //updateRTE('rte1');
+00047         updateRTEs();
+00048         alert("rte1 = " + document.RTEDemo.rte1.value);
+00049         alert("rte2 = " + document.RTEDemo.rte2.value);
+00050         alert("rte3 = " + document.RTEDemo.rte3.value);
+00051         
+00052         //change the following line to true to submit form
+00053         return false;
+00054 }
+00055 
+00056 //Usage: initRTE(imagesPath, includesPath, cssFile)
+00057 initRTE("images/", "", "");
+00058 //-->
+00059 </script>
+00060 <noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>
+00061 
+00062 <script language="JavaScript" type="text/javascript">
+00063 <!--
+00064 //Usage: writeRichText(fieldname, html, width, height, buttons, readOnly)
+00065 writeRichText('rte1', 'here&#39;s the "<em>preloaded</em> <b>content</b>"', 520, 200, true, false);
+00066 
+00067 document.writeln('<br><br>');
+00068 writeRichText('rte2', 'preloaded <b>text</b>', 560, 100, true, false);
+00069 
+00070 document.writeln('<br><br>');
+00071 writeRichText('rte3', 'preloaded <b>text</b>', 450, 100, true, true);
+00072 //-->
+00073 </script>
 00074 
-00075 </body>
-00076 </html>ing = str_replace(chr(146), chr(39), $tmpString);
-00077         $tmpString = str_replace("'", "&#39;", $tmpString);
-00078         
-00079         //convert all types of double quotes
-00080         $tmpString = str_replace(chr(147), chr(34), $tmpString);
-00081         $tmpString = str_replace(chr(148), chr(34), $tmpString);
-00082 //      $tmpString = str_replace("\"", "\"", $tmpString);
-00083         
-00084         //replace carriage returns & line feeds
-00085         $tmpString = str_replace(chr(10), " ", $tmpString);
-00086         $tmpString = str_replace(chr(13), " ", $tmpString);
+00075 <p>Click submit to show the value of the text box.</p>
+00076 <p><input type="submit" name="submit" value="Submit"></p>
+00077 </form>
+00078 
+00079 </body>
+00080 </html>ing = str_replace(chr(146), chr(39), $tmpString);
+00081         $tmpString = str_replace("'", "&#39;", $tmpString);
+00082         
+00083         //convert all types of double quotes
+00084         $tmpString = str_replace(chr(147), chr(34), $tmpString);
+00085         $tmpString = str_replace(chr(148), chr(34), $tmpString);
+00086 //      $tmpString = str_replace("\"", "\"", $tmpString);
 00087         
-00088         return $tmpString;
-00089 }
-00090 ?>
-

Generated on Wed May 31 21:39:14 2006 for phpcompta by  +00088 //replace carriage returns & line feeds +00089 $tmpString = str_replace(chr(10), " ", $tmpString); +00090 $tmpString = str_replace(chr(13), " ", $tmpString); +00091 +00092 return $tmpString; +00093 } +00094 ?> +

Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/demo_8php.html b/doc/developper/html/demo_8php.html index ba099ec4c..7f1dd5859 100644 --- a/doc/developper/html/demo_8php.html +++ b/doc/developper/html/demo_8php.html @@ -4,7 +4,7 @@ - +

demo.php File Reference

@@ -12,7 +12,11 @@ Go to the source code of this file.
-
Generated on Wed May 31 21:39:15 2006 for phpcompta by  +

Detailed Description

+
Todo:
to remove
+ +

+Definition in file demo.php.


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/dir_000000.html b/doc/developper/html/dir_000000.html index cafdef7f3..301cfc56b 100644 --- a/doc/developper/html/dir_000000.html +++ b/doc/developper/html/dir_000000.html @@ -4,7 +4,7 @@ - +

developpement Directory Reference

@@ -13,7 +13,7 @@
directory  phpcompta-dev
-
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/dir_000001.html b/doc/developper/html/dir_000001.html index ab7540890..77ad747e3 100644 --- a/doc/developper/html/dir_000001.html +++ b/doc/developper/html/dir_000001.html @@ -4,7 +4,7 @@ - +

phpcompta-dev Directory Reference

@@ -13,7 +13,7 @@
directory  phpcompta
-
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/dir_000002.html b/doc/developper/html/dir_000002.html index e7f615668..c5f5dec61 100644 --- a/doc/developper/html/dir_000002.html +++ b/doc/developper/html/dir_000002.html @@ -4,7 +4,7 @@ - +

phpcompta Directory Reference

@@ -15,7 +15,7 @@
directory  include
-
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/dir_000003.html b/doc/developper/html/dir_000003.html index 14532a047..2f7c1581d 100644 --- a/doc/developper/html/dir_000003.html +++ b/doc/developper/html/dir_000003.html @@ -4,7 +4,7 @@ - +

html Directory Reference

@@ -15,130 +15,290 @@ - - + + +

- + +

+ + +

+ + +

+ + +

- + - +

+

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+

+ + + +

+ + +

+ + +

+

+ + + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

- + - +

+

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+

+ + + +

+

+ + + +

- + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

directory  admin

Files

file  a.php [code]
file  admin_repo.php [code]
 Administration of the repository : creation of user, folder, security, templates... Accessible only by the administrator.
file  annulation.php [code]
file  b.php [code]
 in a popup window manage the deletion of the operations
file  bal_csv.php [code]
 Return the balance in CSV format.
file  bilan.php [code]
 send a Bilan in RTF format
file  central.php [code]
 concerns the centralisation of the operations
file  commercial.php [code]
file  demo.php [code]
 Base of the module "Gestion", the p_action indicates what file must included and this file will manage the request (customer, supplier, contact,...).
file  dossier_prefs.php [code]
file  demo.php [code]
file  ecrit_ouv.php [code]
 for reporting the saldo of account to the next year.
file  export_ouv.php [code]
 Send the final balance in CSV this balance is used to open an exercice.
file  facturation.php [code]
 obsolete
file  fiche.php [code]
 module to manage the card (removing, listing, creating, modify attribut)
file  fiche_csv.php [code]
 Send a CSV file with card.
file  fiche_new.php [code]
 Create a new card in a popup window.
file  fiche_search.php [code]
 Search a card in a popup window.
file  form.php [code]
 handle your own report: create or view report
file  form_csv.php [code]
 Send a report in CSV format.
file  form_pdf.php [code]
 Send a report in PDF.
file  gestion_fiche_search.php [code]
 Obsolete.
file  import.php [code]
 for importing Bank operations
file  index.php [code]
 default page where user access
file  info.php [code]
file  jrn_add.php [code]
 To add a ledger.
file  jrn_csv.php [code]
 Send a ledger in CSV format.
file  jrn_detail.php [code]
 Show and let modify ledger parameter.
file  jrn_op_detail.php [code]
 Show the detail of a operation in a popup windows.
file  jrn_pdf.php [code]
 Send a ledger in a pdf format.
file  jrn_search.php [code]
 Search a operation from a ledger into a popup window, used for the "rapprochement".
file  jrn_update.php [code]
 create, modify parameter ledger
file  line_update.php [code]
 Modify the "Plan Comptable".
file  listing_client.php [code]
 Electronic declaration for VAT BELGIUM --> experimental.
file  login.php [code]
 Login page.
file  logout.php [code]
 Logout.
file  modify_op.php [code]
file  not_implemented.php [code]
 Update a operation in a popup window : add a document.
file  p.php [code]
file  not_implemented.php [code]
file  parametre.php [code]
 Parametre module.
file  pcmn_update.php [code]
 concerns the management of the "Plan Comptable"
file  poste_csv.php [code]
 Send the poste list in csv.
file  poste_pdf.php [code]
 send the account list in PDF
file  poste_search.php [code]
 Search a account in a popup window.
file  print_balance.php [code]
 Print the balance in pdf format.
file  print_invoice.php [code]
 Print invoice.
file  priv_user.php [code]
 Users Security.
file  recherche.php [code]
 Search module.
file  sec_pdf.php [code]
 Print the user security in pdf.
file  send_jrn_pdf.php [code]
 Print the ledger in pdf.
file  send_poste_pdf.php [code]
 Print the account in pdf.
file  show_document.php [code]
 retrieve a document
file  show_document_modele.php [code]
 send the document template
file  show_pj.php [code]
file  show_tva.php [code]
 Popup window to let the user choose the vat.
file  stock.php [code]
file  t.php [code]
 Manage the stock by year.
file  test.php [code]
file  test_smarty.php [code]
file  user_advanced.php [code]
 Obsolete.
file  user_compta.php [code]
 main page of the accountancy module
file  user_impress.php [code]
 Main page for the printing.
file  user_jrn.php [code]
 Main page for encoding in the ledger.
file  user_login.php [code]
 Welcome page where the folder and module are choosen.
file  user_pref.php [code]
 Page for the personal preference (theme, password,...).
file  user_sec.php [code]
 Set the security for an user.
-
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/dir_000004.html b/doc/developper/html/dir_000004.html index 3fc4abeba..a20d23aca 100644 --- a/doc/developper/html/dir_000004.html +++ b/doc/developper/html/dir_000004.html @@ -4,7 +4,7 @@ - +

addon Directory Reference

@@ -17,7 +17,7 @@
file  readme.php [code]
-
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/dir_000005.html b/doc/developper/html/dir_000005.html index 07b6862d6..284971d3a 100644 --- a/doc/developper/html/dir_000005.html +++ b/doc/developper/html/dir_000005.html @@ -4,7 +4,7 @@ - +

admin Directory Reference

@@ -13,7 +13,7 @@
file  setup.php [code]
-
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/dir_000006.html b/doc/developper/html/dir_000006.html index 9a7b6faca..49e179f71 100644 --- a/doc/developper/html/dir_000006.html +++ b/doc/developper/html/dir_000006.html @@ -4,7 +4,7 @@ - +

include Directory Reference

@@ -12,132 +12,321 @@ + + +

+ + +

+ + +

+ + +

+ + +

+ + +

+

+ + + +

+ + +

+ + +

+

+ + + +

+ + +

+

+ + + +

+ + +

+

+ + + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+

+ + + +

+ + +

+ + +

+ + +

- + + +

+

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +


Files

file  ac_common.php [code]
 common utilities for a lot of procedure, classe
file  action.inc.php [code]
 Page who manage the different action (meeting, letter).
file  balance.php [code]
 Show the balance and let you print it or export to PDF.
file  cbc_be.inc.php [code]
 This file must be included to parse the CVS from the CBC Bank.
file  central_inc.php [code]
 Concerns the centralization operations.
file  check_priv.php [code]
 Tools for checking the security.
file  class_action.php [code]
 class_action for manipulating actions action can be :
    +
  • an invoice
  • a meeting
  • an order
  • a letter
+
file  class_attribut.php [code]
 Manage the attribut of the card.
file  class_balance.php [code]
 Class for manipulating data to print the balance of account.
file  class_contact.php [code]
 class for the contact, contact are derived from ficheContact are a card which are own by a another card (customer, supplier...)
file  class_customer.php [code]
 Derived from class fiche Customer are a specific kind of card.
file  class_document.php [code]
 Class Document corresponds to the table document.
file  class_document_modele.php [code]
 Class for the document template.
file  class_document_type.php [code]
 class for the table document_type
file  class_fiche.php [code]
 define Class fiche and fiche def, those class are using class attribut
file  class_fiche_def.php [code]
 fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref
file  class_invoice.php [code]
 Class invoice to manage the customer invoice.
file  class_jrn.php [code]
file  class_operation.php [code]
 To remove ?
file  class_own.php [code]
 Class to manage the company parameter (address, name...).
file  class_parm_code.php [code]
 Manage the table parm_code which contains the custom parameter for the module accountancy.
file  class_poste.php [code]
 Manage the account.
file  class_rapport.php [code]
 Create, view, modify and parse report.
file  class_user.php [code]
 Data & function about connected users.
file  class_widget.php [code]
 This class is used to create all the HTML INPUT TYPE.
file  client.inc.php [code]
 Called from the module "Gestion" to manage the customer.
file  constant.php [code]
 Contains all the variable + the javascript and some parameter.
file  contact.inc.php [code]
 File for adding contact, contact is a kind of fichethe contact class is derived from the class fiche the contact is in fact a card but more specific This file is included from the module "Gestion".
file  debug.php [code]
 Debug procedure.
file  decla.BE.inc.php [code]
file  document_modele.inc.php [code]
 Manage the document template.
file  error.php [code]
 Obsolete ?
file  eub_be.inc.php [code]
file  facture_inc.php [code]
 File included to parse CSV from EUB Bank.
file  facture.inc.php [code]
file  fiche_def.inc.php [code]
 Let customise the fiche_def_ref for the user.
file  fiche_inc.php [code]
 Function for managing card, redundant with the class fiche.
file  form_inc.php [code]
file  fortis_be.inc.php [code]
 File to include : parse the CSV file from fortis Bank Belgium.
file  import_inc.php [code]
file  impress_bilan.php [code]
 form who call the printing of the bilan in RTF
file  impress_fiche.php [code]
file  impress_inc.php [code]
file  impress_jrn.php [code]
 ask for Printing the ledger (pdf,html)
file  impress_listing_client.php [code]
 print the listing of customer for vat
file  impress_poste.php [code]
 Print account (html or pdf).
file  impress_rapport.php [code]
 print first the report in html and propose to print it in pdf
file  ing_be.inc.php [code]
 File to be included to parse CSV from ING Belgium.
file  jrn.php [code]
 work with the ledger
file  periode.inc.php [code]
 Still used ?
file  poste.inc.php [code]
 p_action contains the main action (always poste here) action contains the sub action
file  poste.php [code]
file  postgres.php [code]
 Contains the procedure for connecting to postgresql.
file  pref.inc.php [code]
file  preference.php [code]
 include file for the periode form, currency,...
file  stock_inc.php [code]
 Function for managing the stock.
file  tva.inc.php [code]
 included file for customizing with the vat (account,rate...)
file  user_action_ach.php [code]
 included file for the ledger of expenses
file  user_action_fin.php [code]
 included file for the financial ledger
file  user_action_gl.php [code]
 included file for the great ledger
file  user_action_ods.php [code]
 included file for the miscellaneous operation ledger
file  user_action_ven.php [code]
 Manage the ledger of type VEN.
file  user_common.php [code]
 Common functions.
file  user_form_ach.php [code]
 Functions for the ledger of expenses.
file  user_form_fin.php [code]
 Functions for the financial ledger.
file  user_form_ods.php [code]
 Functions for the ledger of misc. operation.
file  user_form_ven.php [code]
 Functions for the ledger of sold.
file  user_menu.php [code]
 Nearly all the menu are here, some of them returns a HTML string, others echo directly the result.
file  user_update.php [code]
 Check if still used.
-
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/dirs.html b/doc/developper/html/dirs.html index 912d3e9a4..84f7b3a00 100644 --- a/doc/developper/html/dirs.html +++ b/doc/developper/html/dirs.html @@ -4,7 +4,7 @@ - +

phpcompta Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically: -
Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/document__modele_8inc_8php-source.html b/doc/developper/html/document__modele_8inc_8php-source.html index 55fe238a0..03cb3a64e 100644 --- a/doc/developper/html/document__modele_8inc_8php-source.html +++ b/doc/developper/html/document__modele_8inc_8php-source.html @@ -4,7 +4,7 @@ - +

document_modele.inc.php

Go to the documentation of this file.
00001 <?
@@ -27,37 +27,55 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 require_once("class_document_modele.php");
-00022 $sub_action=(isset ($_REQUEST['sa']))?$_REQUEST['sa']:"";
-00023 
-00024 echo ShowMenuInvoice();
-00025 if ( $sub_action == "") 
-00026      $sub_action="list";
-00028 // Show the list
-00030 if ( $sub_action == "list") 
-00031 {
-00032   $doc=new Document_modele($cn);
-00033   $doc->myList();
-00034   $doc->FormAdd();
-00035 }
+00025 require_once("class_document_modele.php");
+00026 $sub_action=(isset ($_REQUEST['sa']))?$_REQUEST['sa']:"";
+00027 var_dump($_REQUEST);
+00028 echo "<hr>";
+00029 // echo ShowMenuDocument();
+00030 
+00031 // show the form for adding a template
+00032 //
+00033 $doc=new Document_modele($cn);
+00034 
+00035 echo $doc->form('parametre.php?p_action=document');
 00036 
-00038 // Invoice      add a template
+00038 // Document     add a template
 00040 if ( $sub_action=='add_document') 
 00041 {
 00042   require_once("class_document_modele.php");
-00043   $doc=new Document_modele($cn);
-00044   $doc->Save();
-00045   $doc->myList();
-00046 }
-00048 // Invoice remove a template
-00050 if ( $p_action=='rm_template') {
-00051   require_once("class_document_modele.php");
-00052   $doc=new Document_modele($cn);
-00053   $doc->Delete();
-00054 }
-00055   
-00056 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00043 $doc=new Document_modele($cn); +00044 $doc->md_name=$_POST['md_name']; +00045 $doc->md_id=-1; // because it is a new model +00046 $doc->md_type=$_POST['md_type']; +00047 $doc->start=$_POST['start_seq']; +00048 $doc->Save(); +00049 } +00051 // Document remove a template +00053 if ( $sub_action=='rm_template') { +00054 echo_debug (__FILE__,__LINE__,'Remove some templates'); +00055 require_once("class_document_modele.php"); +00056 // Get all the document to remove +00057 +00058 foreach ( $_POST as $name=>$value ) +00059 { +00060 echo_debug(__FILE__,__LINE__,"name = ".$name); +00061 echo_debug(__FILE__,__LINE__,"value = ".$value); +00062 list ($id) = sscanf ($name,"dm_remove_%d"); +00063 echo_debug(__FILE__,__LINE__,"id = ".$id); +00064 if ( $id == null ) continue; +00065 // a document has to be removed +00066 $doc=new Document_modele($cn); +00067 $doc->md_id=$id; +00068 echo_debug (__FILE__,__LINE__,'Removing'); +00069 $doc->Delete(); +00070 } +00071 +00072 } +00073 +00075 // Default action : Show the list +00077 echo $doc->myList(); +00078 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/document__modele_8inc_8php.html b/doc/developper/html/document__modele_8inc_8php.html index 05d27945c..5cb269164 100644 --- a/doc/developper/html/document__modele_8inc_8php.html +++ b/doc/developper/html/document__modele_8inc_8php.html @@ -4,10 +4,12 @@ - + -

document_modele.inc.php File Reference

+

document_modele.inc.php File Reference

Manage the document template. More... +

+

Go to the source code of this file. @@ -16,8 +18,21 @@ + + + + + + + +
 $doc = new Document_modele($cn)
$doc md_name = $_POST['md_name']
$doc md_id = -1
$doc md_type = $_POST['md_type']
$doc start = $_POST['start_seq']
-


Variable Documentation

+

Detailed Description

+Manage the document template. +

+ +

+Definition in file document_modele.inc.php.


Variable Documentation

@@ -40,7 +55,9 @@

-Definition at line 43 of file document_modele.inc.php. +Definition at line 33 of file document_modele.inc.php. +

+Referenced by action::myList(), Document::SaveGenerated(), action::SaveStage2(), and action::SaveStage3().

@@ -65,10 +82,116 @@ Definition at line 22 of file document_modele.inc.php. +Definition at line 26 of file document_modele.inc.php. -


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +

+ + + + +
+ + + + +
doc md_id = -1
+
+ + + + + +
+   + + +

+ +

+Definition at line 45 of file document_modele.inc.php. +

+Referenced by Document_modele::Document_modele(), Document_modele::myList(), Document_modele::Save(), and action::SaveStage2().

+

+ + + + +
+ + + + +
$doc md_name = $_POST['md_name']
+
+ + + + + +
+   + + +

+ +

+Definition at line 44 of file document_modele.inc.php. +

+Referenced by Document_modele::myList().

+

+ + + + +
+ + + + +
$doc md_type = $_POST['md_type']
+
+ + + + + +
+   + + +

+ +

+Definition at line 46 of file document_modele.inc.php.

+

+ + + + +
+ + + + +
$doc start = $_POST['start_seq']
+
+ + + + + +
+   + + +

+ +

+Definition at line 47 of file document_modele.inc.php. +

+Referenced by Cezpdf::alink(), Cezpdf::ezPrvtTableColumnHeadings(), Cezpdf::ezTable(), Cezpdf::ezText(), Document_modele::Save(), and Cezpdf::uline().

+


Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/ecrit__ouv_8php-source.html b/doc/developper/html/ecrit__ouv_8php-source.html index 0d9118d1d..8d8cccc21 100644 --- a/doc/developper/html/ecrit__ouv_8php-source.html +++ b/doc/developper/html/ecrit__ouv_8php-source.html @@ -4,7 +4,7 @@ - +

ecrit_ouv.php

Go to the documentation of this file.
00001 <?
@@ -26,144 +26,144 @@
 00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 00018 */
 00019 /* $Revision$ */
-00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 include_once ("ac_common.php");
-00022 require_once('class_widget.php');
-00023 html_page_start($_SESSION['g_theme']);
-00024 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
-00025   echo "You must choose a Dossier ";
-00026   exit -2;
-00027 }
-00028 include_once ("postgres.php");
-00029 /* Admin. Dossier */
-00030 include_once ("class_user.php");
-00031 $cn=DbConnect($_SESSION['g_dossier']);
-00032 $User=new cl_user($cn);
-00033 $User->Check();
-00034 
-00035 include_once ("check_priv.php");
-00036 
-00037 include_once ("user_menu.php");
-00038 echo '<div class="u_tmenu">';
-00039 echo ShowMenuCompta($_SESSION['g_dossier']);
-00040 echo '</div>';
-00041 // TODO : add a check for permission
-00042 if ( $User->CheckAction($cn,EXP_IMP_ECR) == 0 ) {
-00043   /* Cannot Access */
-00044   NoAccess();
-00045   exit -1;                      
-00046  }
-00047 
-00048 echo ShowMenuAdvanced("ecrit_ouv.php");
-00049 echo '<div class="lmenu">';
-00050 
-00051 echo ShowItem ( array (
-00052                         array ("ecrit_ouv.php?export","Export"),
-00053                         array ("ecrit_ouv.php?import","Import")
-00054                         ),'V');
-00055 echo '</div>';
-00056 echo '<div class="redcontent">';
-00058 if ( isset ($_GET['export'])) {
-00059 // if the year is not set, ask it
-00060         // ask the exercice and do the export
-00061         $periode=make_array($cn,"select distinct p_exercice,p_exercice from parm_periode order by p_exercice");
-00062         echo '<form method="GET" ACTION="export_ouv.php">';
-00063         $w=new widget('select');
-00064         $w->table=0;
-00065         $w->label='Periode';
-00066         $w->readonly=false;
-00067         $w->value=$periode;
-00068         $w->name="p_periode";
-00069         echo 'P&eacute;riode : '.$w->IOValue();
-00070         echo $w->Submit('export','Export');
-00071         echo "</form>";
-00072         exit(0);
-00073 }
-00075 if ( isset ($_GET['import'])) {
-00076         // show a form to upload the file
-00077         // that form will parse the file, create an ods operation
-00078         // and ask you to validate it
-00079   // if no file is given
-00080   if ( ! isset ($_REQUEST['p_submit']) ) {
-00081 ?>
-00082 <FORM NAME="form_detail" enctype="multipart/form-data" ACTION="ecrit_ouv.php?import" METHOD="POST">
-00083 <?
-00084   // TODO propose  ODS ledger 
-00085   $ods=make_array($cn,"select jrn_def_id,jrn_def_name from jrn_def where jrn_def_type = 'OD'");
-00086   $x=new widget("select");
-00087   $x->name='p_jrn';
-00088   $x->value=$ods;
-00089   echo "Choississez votre journal ".$x->IOValue();
-00090 
-00091         $w=new widget("file");
-00092   $w->name='import_file';
-00093   $w->label='p_file';
-00094   echo $w->IOValue();
-00095   echo $w->Submit('p_submit','Charger le fichier');
-00096 ?>
-00097 </FORM>
-00098 <?
-00099         exit(0);
-00100   } else { 
-00101     require_once("user_form_ods.php");
-00102     require_once("jrn.php");
-00103     // a file is given, so we upload it
-00104     $new_name=tempnam('/tmp','import');
-00105     if ( strlen ( $_FILES['import_file']['tmp_name']) != 0 ) {
-00106       if ( move_uploaded_file($_FILES['import_file']['tmp_name'],$new_name) ) {
-00107         // upload succeed
-00108         $h_file=fopen($new_name,'r') ;
-00109         // test if the file is opened
-00110         if ( $h_file == false) { echo 'Je ne peux ouvrir pas ce fichier';exit(-1);}
-00111         // Analyze the file and store result into array
-00112         $valid=false;
-00113         $idx=0;
-00114         while ( !feof($h_file) ) {
-00115 
-00116           $line=fgets($h_file);
-00117           // check if the first line contains the signature
-00118           if ( $valid  ) {
-00119             // skip blank line
-00120             if (strlen (trim($line)) == 0 ) continue;
-00121             // put the line into an array
-00122             list($sign,$poste,$amount)=explode(";",$line);
-00123             $asign[$idx]=$sign; $aposte[$idx]=$poste;$aamount[$idx]=$amount;
-00124             $idx++;
-00125             }
-00126           $valid=(($line=="OUVERTURE\n" && $valid==false) || $valid)?true:false;
-00127           
-00128         } // read the file
-00129         // if valid is still false then there is nothing to do
-00130         if ( ! $valid) { echo 'Aucun enregistrement valide'; return ;}
-00131         // compose the array for the function FormODS
-00132         $array_ods['e_comm']='Ecriture d\'ouverture';
-00133         for ($i=0;$i<$idx;$i++) {
-00134                 $n="e_account$i";
-00135                 $array_ods[$n]=$aposte[$i];
-00136                 $n="e_account".$i."_type";
-00137                 $array_ods[$n]=$asign[$i];
-00138                 $n="e_account".$i."_amount";
-00139                 $array_ods[$n]=$aamount[$i];
-00140         }
-00141         
-00142         // submit button in the form    
-00143         $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">
-00144                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
-00145          $r=FormODS($cn,$_POST['p_jrn'],$User->GetPeriode(),$submit,
-00146                         $array_ods,false,$idx,$p_saved=false);
-00147         
-00148           echo $r;
-00149           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
-00150         
-00151       } 
-00152     }
-00153   } // else -> a file is given
-00154  }// if import
-00155 // IF import and export are not set then the choice is proposed
-00156 echo '</div>';
-00157 html_page_stop(); 
-00158 ?>
-

Generated on Wed May 31 21:39:14 2006 for phpcompta by  +00024 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +00025 include_once ("ac_common.php"); +00026 require_once('class_widget.php'); +00027 html_page_start($_SESSION['g_theme']); +00028 if ( ! isset ( $_SESSION['g_dossier'] ) ) { +00029 echo "You must choose a Dossier "; +00030 exit -2; +00031 } +00032 include_once ("postgres.php"); +00033 /* Admin. Dossier */ +00034 include_once ("class_user.php"); +00035 $cn=DbConnect($_SESSION['g_dossier']); +00036 $User=new cl_user($cn); +00037 $User->Check(); +00038 +00039 include_once ("check_priv.php"); +00040 +00041 include_once ("user_menu.php"); +00042 echo '<div class="u_tmenu">'; +00043 echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php"); +00044 echo '</div>'; +00045 // TODO : add a check for permission +00046 if ( $User->CheckAction($cn,EXP_IMP_ECR) == 0 ) { +00047 /* Cannot Access */ +00048 NoAccess(); +00049 exit -1; +00050 } +00051 +00052 echo ShowMenuAdvanced("ecrit_ouv.php"); +00053 echo '<div class="lmenu">'; +00054 +00055 echo ShowItem ( array ( +00056 array ("ecrit_ouv.php?export","Export"), +00057 array ("ecrit_ouv.php?import","Import") +00058 ),'V'); +00059 echo '</div>'; +00060 echo '<div class="redcontent">'; +00062 if ( isset ($_GET['export'])) { +00063 // if the year is not set, ask it +00064 // ask the exercice and do the export +00065 $periode=make_array($cn,"select distinct p_exercice,p_exercice from parm_periode order by p_exercice"); +00066 echo '<form method="GET" ACTION="export_ouv.php">'; +00067 $w=new widget('select'); +00068 $w->table=0; +00069 $w->label='Periode'; +00070 $w->readonly=false; +00071 $w->value=$periode; +00072 $w->name="p_periode"; +00073 echo 'P&eacute;riode : '.$w->IOValue(); +00074 echo $w->Submit('export','Export'); +00075 echo "</form>"; +00076 exit(0); +00077 } +00079 if ( isset ($_GET['import'])) { +00080 // show a form to upload the file +00081 // that form will parse the file, create an ods operation +00082 // and ask you to validate it +00083 // if no file is given +00084 if ( ! isset ($_REQUEST['p_submit']) ) { +00085 ?> +00086 <FORM NAME="form_detail" enctype="multipart/form-data" ACTION="ecrit_ouv.php?import" METHOD="POST"> +00087 <? +00088 // TODO propose ODS ledger +00089 $ods=make_array($cn,"select jrn_def_id,jrn_def_name from jrn_def where jrn_def_type = 'OD'"); +00090 $x=new widget("select"); +00091 $x->name='p_jrn'; +00092 $x->value=$ods; +00093 echo "Choississez votre journal ".$x->IOValue(); +00094 +00095 $w=new widget("file"); +00096 $w->name='import_file'; +00097 $w->label='p_file'; +00098 echo $w->IOValue(); +00099 echo $w->Submit('p_submit','Charger le fichier'); +00100 ?> +00101 </FORM> +00102 <? +00103 exit(0); +00104 } else { +00105 require_once("user_form_ods.php"); +00106 require_once("jrn.php"); +00107 // a file is given, so we upload it +00108 $new_name=tempnam('/tmp','import'); +00109 if ( strlen ( $_FILES['import_file']['tmp_name']) != 0 ) { +00110 if ( move_uploaded_file($_FILES['import_file']['tmp_name'],$new_name) ) { +00111 // upload succeed +00112 $h_file=fopen($new_name,'r') ; +00113 // test if the file is opened +00114 if ( $h_file == false) { echo 'Je ne peux ouvrir pas ce fichier';exit(-1);} +00115 // Analyze the file and store result into array +00116 $valid=false; +00117 $idx=0; +00118 while ( !feof($h_file) ) { +00119 +00120 $line=fgets($h_file); +00121 // check if the first line contains the signature +00122 if ( $valid ) { +00123 // skip blank line +00124 if (strlen (trim($line)) == 0 ) continue; +00125 // put the line into an array +00126 list($sign,$poste,$amount)=explode(";",$line); +00127 $asign[$idx]=$sign; $aposte[$idx]=$poste;$aamount[$idx]=$amount; +00128 $idx++; +00129 } +00130 $valid=(($line=="OUVERTURE\n" && $valid==false) || $valid)?true:false; +00131 +00132 } // read the file +00133 // if valid is still false then there is nothing to do +00134 if ( ! $valid) { echo 'Aucun enregistrement valide'; return ;} +00135 // compose the array for the function FormODS +00136 $array_ods['e_comm']='Ecriture d\'ouverture'; +00137 for ($i=0;$i<$idx;$i++) { +00138 $n="e_account$i"; +00139 $array_ods[$n]=$aposte[$i]; +00140 $n="e_account".$i."_type"; +00141 $array_ods[$n]=$asign[$i]; +00142 $n="e_account".$i."_amount"; +00143 $array_ods[$n]=$aamount[$i]; +00144 } +00145 +00146 // submit button in the form +00147 $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste"> +00148 <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">'; +00149 $r=FormODS($cn,$_POST['p_jrn'],$User->GetPeriode(),$submit, +00150 $array_ods,false,$idx,$p_saved=false); +00151 +00152 echo $r; +00153 echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>"; +00154 +00155 } +00156 } +00157 } // else -> a file is given +00158 }// if import +00159 // IF import and export are not set then the choice is proposed +00160 echo '</div>'; +00161 html_page_stop(); +00162 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/ecrit__ouv_8php.html b/doc/developper/html/ecrit__ouv_8php.html index 2c4c81d71..271d5593f 100644 --- a/doc/developper/html/ecrit__ouv_8php.html +++ b/doc/developper/html/ecrit__ouv_8php.html @@ -4,10 +4,12 @@ - + -

ecrit_ouv.php File Reference

+

ecrit_ouv.php File Reference

for reporting the saldo of account to the next year. More... +

+

Go to the source code of this file. @@ -33,7 +35,12 @@
 $x = new widget("select")
-


Variable Documentation

+

Detailed Description

+for reporting the saldo of account to the next year. +

+ +

+Definition in file ecrit_ouv.php.


Variable Documentation

@@ -56,7 +63,7 @@

-Definition at line 31 of file ecrit_ouv.php. +Definition at line 35 of file ecrit_ouv.php.

@@ -81,7 +88,7 @@ Definition at line 31

-Definition at line 32 of file ecrit_ouv.php. +Definition at line 36 of file ecrit_ouv.php.

@@ -106,7 +113,7 @@ Definition at line 32

-Definition at line 63 of file ecrit_ouv.php. +Definition at line 67 of file ecrit_ouv.php.

@@ -131,7 +138,7 @@ Definition at line 63

-Definition at line 86 of file ecrit_ouv.php. +Definition at line 90 of file ecrit_ouv.php.

Referenced by Cezpdf::ezPrvtTableDrawLines(), Cezpdf::ezTable(), and ParseFormula(). @@ -158,7 +165,7 @@ Referenced by Cezpdf::

-Definition at line 45 of file ecrit_ouv.php. +Definition at line 49 of file ecrit_ouv.php.

@@ -183,7 +190,7 @@ Definition at line 45

-Definition at line 65 of file ecrit_ouv.php. +Definition at line 69 of file ecrit_ouv.php.

@@ -208,7 +215,7 @@ Definition at line 65

-Definition at line 68 of file ecrit_ouv.php. +Definition at line 72 of file ecrit_ouv.php.

@@ -233,9 +240,9 @@ Definition at line 68

-Definition at line 66 of file ecrit_ouv.php. +Definition at line 70 of file ecrit_ouv.php.

-Referenced by widget::debug(), widget::SetReadOnly(), and widget::widget(). +Referenced by widget::debug(), widget::SetReadOnly(), and widget::widget().

@@ -260,7 +267,7 @@ Referenced by widget:

-Definition at line 64 of file ecrit_ouv.php. +Definition at line 68 of file ecrit_ouv.php.

@@ -285,10 +292,10 @@ Definition at line 64

-Definition at line 67 of file ecrit_ouv.php. +Definition at line 71 of file ecrit_ouv.php. -


Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/error_8php-source.html b/doc/developper/html/error_8php-source.html index 3439eda8f..6947bba5c 100644 --- a/doc/developper/html/error_8php-source.html +++ b/doc/developper/html/error_8php-source.html @@ -4,7 +4,7 @@ - +

error.php

Go to the documentation of this file.
00001 <?
@@ -27,53 +27,43 @@
 00018 */
 00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00020 // $Revision$
-00021 include_once("constant.php");
-00022 /* function AnalyzeError
-00023  * Purpose : Following the error code
-00024  *        show adialog box
-00025  * parm : 
-00026  *      - $p_result
-00027  * gen :
-00028  *      - none
-00029  * return: none
-00030  */
-00031 
-00032 function AnalyzeError( $p_result) {
-00033 
-00034     switch( $p_result) {
-00035       case NOERROR:
-00036         break;
-00037     case BADPARM:
-00038       break;
-00039     case BADDATE:
-00040       echo "<SCRIPT> alert('Invalid Date'); </SCRIPT>";
-00041       break;
-00042     case NOTPERIODE:
-00043         echo "<SCRIPT> alert('Date n\'est pas dans la période par défaut, changez vos préférences'); </SCRIPT>";
-00044         break;
-00045     case PERIODCLOSED:
-00046       echo "<SCRIPT> alert('La date est dans une période cloturé'); </SCRIPT>"; 
-00047       break;
-00048     case INVALID_ECH:
-00049         echo "<SCRIPT> alert('Invalid Echeance Date'); </SCRIPT>";
-00050         break;
-00051     case RAPPT_ALREADY_USED:
-00052       echo '<SCRIPT>alert("Ne peut enregister le rapprochement l\'opération '.$p_rapt. " est déjà utilisée\")</SCRIPT>";
-00053       break;
-00054     case RAPPT_NOT_EXIST:
-00055         echo '<SCRIPT>alert("Ne peut enregister le rapprochement l\'opération '.$p_rapt. " n\'existe pas \")</SCRIPT>";
-00056         break;
-00057     case DIFF_AMOUNT:
-00058       echo "<SCRIPT>alert(\"Le Montant au débit n'est pas égal au montant au crédit\"); </SCRIPT>";
-00059       break;
-00060     case RAPPT_NOMATCH_AMOUNT:
-00061         echo '<SCRIPT>alert("Ne peut enregister le rapprochement l\'opération '.$p_rapt. " les montants ne correspondent pas \")</SCRIPT>";
-00062         break;
-00063     }
-00064 }
-00065 
-00066 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00025 include_once("constant.php"); +00033 function AnalyzeError( $p_result) { +00034 +00035 switch( $p_result) { +00036 case NOERROR: +00037 break; +00038 case BADPARM: +00039 break; +00040 case BADDATE: +00041 echo "<SCRIPT> alert('Invalid Date'); </SCRIPT>"; +00042 break; +00043 case NOTPERIODE: +00044 echo "<SCRIPT> alert('Date n\'est pas dans la période par défaut, changez vos préférences'); </SCRIPT>"; +00045 break; +00046 case PERIODCLOSED: +00047 echo "<SCRIPT> alert('La date est dans une période cloturé'); </SCRIPT>"; +00048 break; +00049 case INVALID_ECH: +00050 echo "<SCRIPT> alert('Invalid Echeance Date'); </SCRIPT>"; +00051 break; +00052 case RAPPT_ALREADY_USED: +00053 echo '<SCRIPT>alert("Ne peut enregister le rapprochement l\'opération '.$p_rapt. " est déjà utilisée\")</SCRIPT>"; +00054 break; +00055 case RAPPT_NOT_EXIST: +00056 echo '<SCRIPT>alert("Ne peut enregister le rapprochement l\'opération '.$p_rapt. " n\'existe pas \")</SCRIPT>"; +00057 break; +00058 case DIFF_AMOUNT: +00059 echo "<SCRIPT>alert(\"Le Montant au débit n'est pas égal au montant au crédit\"); </SCRIPT>"; +00060 break; +00061 case RAPPT_NOMATCH_AMOUNT: +00062 echo '<SCRIPT>alert("Ne peut enregister le rapprochement l\'opération '.$p_rapt. " les montants ne correspondent pas \")</SCRIPT>"; +00063 break; +00064 } +00065 } +00066 +00067 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/error_8php.html b/doc/developper/html/error_8php.html index 2f09c0f44..2dd2cc8f5 100644 --- a/doc/developper/html/error_8php.html +++ b/doc/developper/html/error_8php.html @@ -4,18 +4,26 @@ - + -

error.php File Reference

+

error.php File Reference

Obsolete ? More... +

+

Go to the source code of this file. +

Functions

 AnalyzeError ($p_result)
 Following the error code show adialog box.
-


Function Documentation

+

Detailed Description

+Obsolete ? +

+ +

+Definition in file error.php.


Function Documentation

@@ -41,12 +49,19 @@ +Definition at line 33 of file error.php.

+Following the error code show adialog box. +

+

Parameters:
+ + +
$p_result 
+

-Definition at line 32 of file error.php.

-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/eub__be_8inc_8php-source.html b/doc/developper/html/eub__be_8inc_8php-source.html index c2fec242a..a13cba9f4 100644 --- a/doc/developper/html/eub__be_8inc_8php-source.html +++ b/doc/developper/html/eub__be_8inc_8php-source.html @@ -4,7 +4,7 @@ - +

eub_be.inc.php

Go to the documentation of this file.
00001 <?
@@ -28,60 +28,61 @@
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00021 // Author Olivier Dzwoniarkiewicz
-00023 // Bank type = eub
-00025 $row=1;
-00026 while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
-00027         $num = count($data);
-00028         for ($c=0; $c < $num; $c++) {
-00029 
-00030                 // first line is skipped
-00031                 if ( $row > 1) {
-00032                 $code=""; $date_exec=""; $detail=""; $montant=""; 
-00033                 list($code, $date_exec, $detail, $montant) = split(";", $data[$c]);
-00034                 
-00035                 $date_exec = str_replace("\t", "", $date_exec);
-00036                 $date_exec = str_replace(" ", "", $date_exec);
-00037                 
-00038                 list($annee,$mois,$jour) = explode("-", $date_exec);
-00039                 
-00040                 $montant = str_replace(".", "", $montant);
-00041                 $montant = str_replace(",", ".", $montant);
-00042                 $montant = str_replace("+", "", $montant);
+00026 
+00027 // Bank type = eub
+00029 $row=1;
+00030 while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
+00031         $num = count($data);
+00032         for ($c=0; $c < $num; $c++) {
+00033 
+00034                 // first line is skipped
+00035                 if ( $row > 1) {
+00036                 $code=""; $date_exec=""; $detail=""; $montant=""; 
+00037                 list($code, $date_exec, $detail, $montant) = split(";", $data[$c]);
+00038                 
+00039                 $date_exec = str_replace("\t", "", $date_exec);
+00040                 $date_exec = str_replace(" ", "", $date_exec);
+00041                 
+00042                 list($annee,$mois,$jour) = explode("-", $date_exec);
 00043                 
-00044                 if($code < 10) $code = "000".$code;
-00045                 if($code >= 10 and $code < 100) $code = "00".$code;
-00046                 if($code >= 100) $code = "0".$code;
+00044                 $montant = str_replace(".", "", $montant);
+00045                 $montant = str_replace(",", ".", $montant);
+00046                 $montant = str_replace("+", "", $montant);
 00047                 
-00048                 $code = $annee."-".$code;
-00049                 
-00050                 
-00051                 $Sql="insert into import_tmp (code, 
-00052                         date_exec ,
-00053                         date_valeur,
-00054                         montant,
-00055                         devise,
-00056                         detail,
-00057                         num_compte,
-00058                         bq_account      ,
-00059                         jrn,
-00060                         ok)
-00061                 values ('$code',
-00062                         '$date_exec',
-00063                         '$date_exec',
-00064                         '$montant',
-00065                         'EUR',
-00066                         '".addslashes($detail)."',
-00067                         '$p_bq_account',
-00068                         $p_jrn,
-00069                         false)";
-00070                 $Res=ExecSql($p_cn,$Sql);
-00071                 }
-00072         } // for ($c=0;$c<$num;$c++)
-00073                 $row++;
-00074 } // file is read
-00075 fclose($handle);
-00076 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00048 if($code < 10) $code = "000".$code; +00049 if($code >= 10 and $code < 100) $code = "00".$code; +00050 if($code >= 100) $code = "0".$code; +00051 +00052 $code = $annee."-".$code; +00053 +00054 +00055 $Sql="insert into import_tmp (code, +00056 date_exec , +00057 date_valeur, +00058 montant, +00059 devise, +00060 detail, +00061 num_compte, +00062 bq_account , +00063 jrn, +00064 ok) +00065 values ('$code', +00066 '$date_exec', +00067 '$date_exec', +00068 '$montant', +00069 'EUR', +00070 '".addslashes($detail)."', +00071 '$p_bq_account', +00072 $p_jrn, +00073 false)"; +00074 $Res=ExecSql($p_cn,$Sql); +00075 } +00076 } // for ($c=0;$c<$num;$c++) +00077 $row++; +00078 } // file is read +00079 fclose($handle); +00080 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/eub__be_8inc_8php.html b/doc/developper/html/eub__be_8inc_8php.html index a0aaf4b29..cb76c73c8 100644 --- a/doc/developper/html/eub__be_8inc_8php.html +++ b/doc/developper/html/eub__be_8inc_8php.html @@ -4,10 +4,12 @@ - + -

eub_be.inc.php File Reference

+

eub_be.inc.php File Reference

File included to parse CSV from EUB Bank. More... +

+

Go to the source code of this file. @@ -25,7 +27,12 @@
 $Res = ExecSql($p_cn,$Sql)
-


Variable Documentation

+

Detailed Description

+File included to parse CSV from EUB Bank. +

+ +

+Definition in file eub_be.inc.php.


Variable Documentation

@@ -48,9 +55,9 @@

-Definition at line 48 of file eub_be.inc.php. +Definition at line 52 of file eub_be.inc.php.

-Referenced by Cezpdf::loadTemplate(), TransferCSV(), and UpdateCSV(). +Referenced by Cezpdf::loadTemplate(), TransferCSV(), and UpdateCSV().

@@ -75,9 +82,9 @@ Referenced by Cezpdf::

-Definition at line 35 of file eub_be.inc.php. +Definition at line 39 of file eub_be.inc.php.

-Referenced by TransferCSV(). +Referenced by TransferCSV().

@@ -102,9 +109,9 @@ Referenced by TransferC

-Definition at line 40 of file eub_be.inc.php. +Definition at line 44 of file eub_be.inc.php.

-Referenced by TransferCSV(). +Referenced by TransferCSV().

@@ -129,9 +136,9 @@ Referenced by TransferC

-Definition at line 70 of file eub_be.inc.php. +Definition at line 74 of file eub_be.inc.php.

-Referenced by AddFiche(), AddForm(), AddModele(), AlterSequence(), Centralise(), cl_user::CheckAction(), CheckAction(), CheckJrn(), cl_user::cl_user(), Commit(), DeleteRapt(), DisplayDetailModele(), EncodeFiche(), EndSql(), ExisteJnt(), ExistePriv(), FormPeriode(), FormPeriodeMult(), parm_code::Get(), fiche_def_ref::Get(), Get_attr_def(), Get_attr_min(), Get_fiche_def_ref(), GetAllUser(), GetAmount(), GetAvailableFolder(), GetBaseFiche(), GetBaseFicheDefault(), GetClass(), GetConcerned(), GetCreateAccount(), GetData(), GetDataForm(), GetDataGrpt(), GetDataJrn(), GetDataJrnJrId(), GetDataJrnPdf(), GetDataModele(), GetDataPoste(), GetExercice(), getFicheAttribut(), GetFicheDef(), getFicheDefName(), GetFicheDefRef(), GetFicheJrn(), getFicheName(), getFicheNameById(), getFicheNameCode(), GetFormName(), GetFormulaValue(), Customer::GetFromPoste(), cl_user::GetGlobalPref(), GetGrpt(), GetInternal(), GetJnt(), GetJrnName(), GetJrnProp(), GetJrnProperty(), GetLogin(), GetModeleId(), jrn::GetName(), GetNextFiche(), GetNumberLine(), GetPeriode(), GetPosteLibelle(), cl_user::GetPreferences(), GetPriv(), GetQuantity(), GetRappel(), rapport::GetRow(), poste::GetRow(), jrn::GetRow(), Balance::GetRow(), jrn::GetRowSimple(), GetSequence(), GetSolde(), poste::GetSolde(), poste::GetSoldeDetail(), GetTvaPoste(), GetTvaRate(), GetUid(), GetVersion(), html_page_start(), ImpHtml(), InsertJrn(), InsertJrnx(), InsertModeleLine(), InsertRapt(), InsertStockGoods(), isCentralize(), IsFicheOfJrn(), isValid(), ListJrn(), parm_code::LoadAll(), fiche_def_ref::LoadAll(), Invoice::myList(), Document_modele::myList(), new_fiche(), NextSequence(), Own::Own(), PeriodeClosed(), PosteForm(), RecordInvoice(), RecordJrn(), RecordSell(), Remove(), fiche::remove(), Rollback(), parm_code::Save(), fiche_def_ref::Save(), SaveModeleName(), SetInternalCode(), cl_user::SetPeriode(), ShowDevise(), ShowMenuFiche(), ShowMenuJrn(), ShowPeriode(), StartSql(), SyncRight(), TransferCSV(), UpdateComment(), UpdateCSV(), UpdateFiche(), UpdateForm(), Customer::VatListing(), VerifImport(), ViewDetailStock(), ViewFiche(), ViewFicheDetail(), ViewJrn(), and ViewStock(). +Referenced by AddFiche(), AddForm(), AddModele(), AlterSequence(), Centralise(), cl_user::CheckAction(), CheckAction(), CheckJrn(), cl_user::cl_user(), Commit(), DeleteRapt(), DisplayDetailModele(), EncodeFiche(), EndSql(), ExisteJnt(), ExistePriv(), FormPeriode(), FormPeriodeMult(), Document::Generate(), parm_code::Get(), fiche_def_ref::Get(), Get_attr_def(), Get_attr_min(), Get_fiche_def_ref(), GetAllUser(), GetAmount(), GetAvailableFolder(), GetBaseFiche(), GetBaseFicheDefault(), fiche::GetByQCode(), GetClass(), GetConcerned(), GetCreateAccount(), GetData(), GetDataForm(), GetDataGrpt(), GetDataJrn(), GetDataJrnJrId(), GetDataJrnPdf(), GetDataModele(), GetDataPoste(), jrn::GetDefLine(), GetExercice(), getFicheAttribut(), GetFicheDef(), getFicheDefName(), GetFicheDefRef(), GetFicheJrn(), getFicheName(), getFicheNameById(), getFicheNameCode(), GetFormName(), GetFormulaValue(), Customer::GetFromPoste(), cl_user::GetGlobalPref(), GetGrpt(), GetInternal(), GetJnt(), GetJrnName(), GetJrnProp(), GetJrnProperty(), GetLogin(), GetModeleId(), jrn::GetName(), fiche::getName(), GetNextFiche(), GetNumberLine(), GetPeriode(), GetPosteLibelle(), cl_user::GetPreferences(), GetPriv(), GetQuantity(), GetRappel(), rapport::GetRow(), poste::GetRow(), jrn::GetRow(), Balance::GetRow(), jrn::GetRowSimple(), GetSequence(), GetSolde(), poste::GetSolde(), poste::GetSoldeDetail(), GetTvaPoste(), GetTvaRate(), GetUid(), GetVersion(), html_page_start(), ImpHtml(), InsertJrn(), InsertJrnx(), InsertModeleLine(), InsertRapt(), InsertStockGoods(), isCentralize(), IsFicheOfJrn(), isValid(), ListJrn(), parm_code::LoadAll(), fiche_def_ref::LoadAll(), Invoice::myList(), Document_modele::myList(), action::myList(), new_fiche(), NextSequence(), Own::Own(), PeriodeClosed(), PosteForm(), RecordInvoice(), RecordJrn(), RecordSell(), Remove(), fiche::remove(), Rollback(), parm_code::Save(), fiche_def_ref::Save(), SaveModeleName(), SetInternalCode(), cl_user::SetPeriode(), ShowDevise(), ShowMenuFiche(), ShowMenuJrn(), ShowPeriode(), StartSql(), fiche::strAttribut(), SyncRight(), TransferCSV(), UpdateComment(), UpdateCSV(), UpdateFiche(), UpdateForm(), Customer::VatListing(), VerifImport(), ViewDetailStock(), ViewFiche(), ViewFicheDetail(), ViewJrn(), and ViewStock().

@@ -156,7 +163,7 @@ Referenced by AddFiche()

-Definition at line 25 of file eub_be.inc.php. +Definition at line 29 of file eub_be.inc.php.

@@ -200,12 +207,12 @@ Definition at line 25< false)"

-Definition at line 51 of file eub_be.inc.php. +Definition at line 55 of file eub_be.inc.php.

-Referenced by AddFiche(), cl_user::cl_user(), Get_attr_def(), Get_attr_min(), GetCreateAccount(), GetDataJrnPdf(), jrn::GetRow(), cl_user::insert_default_global_pref(), RecordJrn(), and cl_user::update_global_pref(). +Referenced by AddFiche(), cl_user::cl_user(), Get_attr_def(), Get_attr_min(), GetCreateAccount(), GetDataJrnPdf(), jrn::GetRow(), cl_user::insert_default_global_pref(), RecordJrn(), and cl_user::update_global_pref(). -


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/export__ouv_8php-source.html b/doc/developper/html/export__ouv_8php-source.html index 2ca58a5d3..c41a98b51 100644 --- a/doc/developper/html/export__ouv_8php-source.html +++ b/doc/developper/html/export__ouv_8php-source.html @@ -4,7 +4,7 @@ - +

export_ouv.php

Go to the documentation of this file.
00001 <?
@@ -27,64 +27,64 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 include_once ("ac_common.php");
-00022 require_once("class_poste.php");
-00023 header('Content-type: application/csv');
-00024 header('Content-Disposition: attachment;filename="export_ouv.csv"',FALSE);
-00025 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
-00026   echo "You must choose a Dossier ";
-00027   exit -2;
-00028 }
-00029 include_once ("postgres.php");
-00030 /* Admin. Dossier */
-00031 $rep=DbConnect();
-00032 include_once ("class_user.php");
-00033 $User=new cl_user($rep);
-00034 $User->Check();
-00035 
-00036 include_once ("check_priv.php");
-00037 
-00038 include_once ("user_menu.php");
+00025 include_once ("ac_common.php");
+00026 require_once("class_poste.php");
+00027 header('Content-type: application/csv');
+00028 header('Content-Disposition: attachment;filename="export_ouv.csv"',FALSE);
+00029 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
+00030   echo "You must choose a Dossier ";
+00031   exit -2;
+00032 }
+00033 include_once ("postgres.php");
+00034 /* Admin. Dossier */
+00035 $rep=DbConnect();
+00036 include_once ("class_user.php");
+00037 $User=new cl_user($rep);
+00038 $User->Check();
 00039 
-00040 $cn=DbConnect($_SESSION['g_dossier']);
-00041 // TODO : add a check for permission
-00042 if ( $User->CheckAction($cn,EXP_IMP_ECR) == 0 ) {
-00043   /* Cannot Access */
-00044   NoAccess();
-00045   exit -1;                      
-00046  }
-00047 if ( !isset ($_GET['p_periode'])) {
-00048         echo 'Erreur : aucune periode demandée';
-00049         exit(0);
-00050 }
-00051 $sql_from=GetArray($cn,"select min(p_id) from parm_periode where p_exercice=".$_GET['p_periode']);
-00052 
-00053 $sql_to=GetArray($cn,"select max(p_id) from parm_periode where p_exercice=".$_GET['p_periode']);
-00054 
-00055 $ret=GetArray($cn,"select distinct j_poste::text 
-00056                 from jrnx inner join tmp_pcmn on (pcm_val=j_poste)
-00057                 where 
-00058                 j_tech_per >= ".$sql_from[0]['min']." and 
-00059                 j_tech_per <= ".$sql_to[0]['max']." and j_poste not like '7%'
-00060                 and j_poste not like '6%'
-00061                  order by j_poste::text");
-00062 if ( $ret == null ) {echo 'Rien à exporter'; exit();}
-00063 printf ("OUVERTURE\n");
-00064 foreach ($ret as $poste_id) {
-00065 //var_dump($poste_id); echo "<br>";
-00066         $Poste=new poste($cn,$poste_id['j_poste']);
-00067         $sql="j_tech_per >=". $sql_from[0]['min']." and j_tech_per <=".$sql_to[0]['max'];
-00068         $result=$Poste->GetSoldeDetail($sql );
-00069         if ( $result['solde'] == 0 ) continue;
-00070         if ( $result['debit'] > $result ['credit'] ) {
-00071                 printf ("d;%d;%12.4f\n",$Poste->id,$result['solde']);
-00072         } else {
-00073                 printf ("c;%d;%12.4f\n",$Poste->id,$result['solde']);
-00074         }
-00075 }
-00076 
-00077 ?>
-

Generated on Wed May 31 21:39:14 2006 for phpcompta by  +00040 include_once ("check_priv.php"); +00041 +00042 include_once ("user_menu.php"); +00043 +00044 $cn=DbConnect($_SESSION['g_dossier']); +00045 // TODO : add a check for permission +00046 if ( $User->CheckAction($cn,EXP_IMP_ECR) == 0 ) { +00047 /* Cannot Access */ +00048 NoAccess(); +00049 exit -1; +00050 } +00051 if ( !isset ($_GET['p_periode'])) { +00052 echo 'Erreur : aucune periode demandée'; +00053 exit(0); +00054 } +00055 $sql_from=GetArray($cn,"select min(p_id) from parm_periode where p_exercice=".$_GET['p_periode']); +00056 +00057 $sql_to=GetArray($cn,"select max(p_id) from parm_periode where p_exercice=".$_GET['p_periode']); +00058 +00059 $ret=GetArray($cn,"select distinct j_poste::text +00060 from jrnx inner join tmp_pcmn on (pcm_val=j_poste) +00061 where +00062 j_tech_per >= ".$sql_from[0]['min']." and +00063 j_tech_per <= ".$sql_to[0]['max']." and j_poste not like '7%' +00064 and j_poste not like '6%' +00065 order by j_poste::text"); +00066 if ( $ret == null ) {echo 'Rien à exporter'; exit();} +00067 printf ("OUVERTURE\n"); +00068 foreach ($ret as $poste_id) { +00069 //var_dump($poste_id); echo "<br>"; +00070 $Poste=new poste($cn,$poste_id['j_poste']); +00071 $sql="j_tech_per >=". $sql_from[0]['min']." and j_tech_per <=".$sql_to[0]['max']; +00072 $result=$Poste->GetSoldeDetail($sql ); +00073 if ( $result['solde'] == 0 ) continue; +00074 if ( $result['debit'] > $result ['credit'] ) { +00075 printf ("d;%d;%12.4f\n",$Poste->id,$result['solde']); +00076 } else { +00077 printf ("c;%d;%12.4f\n",$Poste->id,$result['solde']); +00078 } +00079 } +00080 +00081 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/export__ouv_8php.html b/doc/developper/html/export__ouv_8php.html index 7715ccf5a..5855ebfd0 100644 --- a/doc/developper/html/export__ouv_8php.html +++ b/doc/developper/html/export__ouv_8php.html @@ -4,10 +4,12 @@ - + -

export_ouv.php File Reference

+

export_ouv.php File Reference

Send the final balance in CSV this balance is used to open an exercice. More... +

+

Go to the source code of this file. @@ -31,7 +33,12 @@
 $result = $Poste->GetSoldeDetail($sql )
-


Variable Documentation

+

Detailed Description

+Send the final balance in CSV this balance is used to open an exercice. +

+ +

+Definition in file export_ouv.php.


Variable Documentation

@@ -54,7 +61,7 @@

-Definition at line 40 of file export_ouv.php. +Definition at line 44 of file export_ouv.php.

@@ -79,7 +86,7 @@ Definition at line 40

-Definition at line 31 of file export_ouv.php. +Definition at line 35 of file export_ouv.php.

@@ -104,9 +111,9 @@ Definition at line 31

-Definition at line 68 of file export_ouv.php. +Definition at line 72 of file export_ouv.php.

-Referenced by db_connect(), getFicheNameCode(), ShowJrn(), ShowMenuCompta(), u_ShowDossier(), and ViewStock(). +Referenced by getFicheNameCode(), ShowJrn(), ShowMenuCompta(), u_ShowDossier(), and ViewStock().

@@ -138,7 +145,7 @@ Referenced by db_connect(), < order by j_poste::text")

-Definition at line 55 of file export_ouv.php. +Definition at line 59 of file export_ouv.php.

@@ -163,7 +170,7 @@ Definition at line 55

-Definition at line 67 of file export_ouv.php. +Definition at line 71 of file export_ouv.php.

@@ -188,7 +195,7 @@ Definition at line 67

-Definition at line 51 of file export_ouv.php. +Definition at line 55 of file export_ouv.php.

@@ -213,7 +220,7 @@ Definition at line 51

-Definition at line 53 of file export_ouv.php. +Definition at line 57 of file export_ouv.php.

@@ -238,7 +245,7 @@ Definition at line 53

-Definition at line 33 of file export_ouv.php. +Definition at line 37 of file export_ouv.php.

@@ -263,10 +270,10 @@ Definition at line 33

-Definition at line 45 of file export_ouv.php. +Definition at line 49 of file export_ouv.php. -


Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/facturation_8php-source.html b/doc/developper/html/facturation_8php-source.html index a656c1caf..c257a9944 100644 --- a/doc/developper/html/facturation_8php-source.html +++ b/doc/developper/html/facturation_8php-source.html @@ -4,7 +4,7 @@ - +

facturation.php

Go to the documentation of this file.
00001 <?
@@ -27,91 +27,91 @@
 00018 */
 00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00020 /* $Revision$ */
-00021 include ("ac_common.php");
-00022 include ("check_priv.php");
-00023 include_once ("class_user.php");
-00024 include_once ("postgres.php");
-00025 include ("user_menu.php");
-00026 include_once("class_invoice.php");
-00027 if ( isset ($_REQUEST['dos'])) 
-00028 {
-00029   $_SESSION["g_dossier"]=$_REQUEST['dos'];
-00030 }
-00031 $g_dossier=(isset ($_SESSION['g_dossier']))?$_SESSION['g_dossier']:-1;
-00032 
-00033 // List of customer select * from fiche_def where frd_id=9;
-00034 if (  $g_dossier==-1  ) {
-00035   echo "You must choose a Dossier ";
-00036   exit -2;
-00037 }
-00038 // Check user
-00039 $rep=DbConnect($g_dossier);
-00040 $User=new cl_user($rep);
-00041 $User->Check();
-00042 
-00043 // Save Folder's name
-00044 $g_name=GetDossierName($g_dossier);
-00045 $_SESSION["g_name"]=$g_name;
+00025 include ("ac_common.php");
+00026 include ("check_priv.php");
+00027 include_once ("class_user.php");
+00028 include_once ("postgres.php");
+00029 include ("user_menu.php");
+00030 include_once("class_invoice.php");
+00031 if ( isset ($_REQUEST['dos'])) 
+00032 {
+00033   $_SESSION["g_dossier"]=$_REQUEST['dos'];
+00034 }
+00035 $g_dossier=(isset ($_SESSION['g_dossier']))?$_SESSION['g_dossier']:-1;
+00036 
+00037 // List of customer select * from fiche_def where frd_id=9;
+00038 if (  $g_dossier==-1  ) {
+00039   echo "You must choose a Dossier ";
+00040   exit -2;
+00041 }
+00042 // Check user
+00043 $rep=DbConnect($g_dossier);
+00044 $User=new cl_user($rep);
+00045 $User->Check();
 00046 
-00047 
-00048 if ( $User->CheckAction($g_dossier,FACT) == 0 ){
-00049     /* Cannot Access */
-00050      NoAccess();
-00051      exit -1;
-00052 }
-00054 // update preference
-00056 if ( isset ( $_POST['style_user']) ) {
-00057   $User->update_global_pref('THEME',$_POST['style_user']);
-00058   $_SESSION['g_theme']=$_POST['style_user'];
-00059   $User->theme=$_POST['style_user'];
-00060 }
-00061 // Met a jour le pagesize
-00062 if ( isset ( $_POST['p_size']) ) {
-00063   $User->update_global_pref('PAGESIZE',$_POST['p_size']);
-00064   $_SESSION['g_pagesize']=$_POST['p_size'];
-00065   
-00066 }
-00067 
-00069 html_page_start($User->theme);
-00070 
-00071 $cn=DbConnect($g_dossier);
-00072 
-00073 echo "<H2 class=\"info\"> Facturation ".$_SESSION['g_name']." </H2>";
+00047 // Save Folder's name
+00048 $g_name=GetDossierName($g_dossier);
+00049 $_SESSION["g_name"]=$g_name;
+00050 
+00051 
+00052 if ( $User->CheckAction($g_dossier,FACT) == 0 ){
+00053     /* Cannot Access */
+00054      NoAccess();
+00055      exit -1;
+00056 }
+00058 // update preference
+00060 if ( isset ( $_POST['style_user']) ) {
+00061   $User->update_global_pref('THEME',$_POST['style_user']);
+00062   $_SESSION['g_theme']=$_POST['style_user'];
+00063   $User->theme=$_POST['style_user'];
+00064 }
+00065 // Met a jour le pagesize
+00066 if ( isset ( $_POST['p_size']) ) {
+00067   $User->update_global_pref('PAGESIZE',$_POST['p_size']);
+00068   $_SESSION['g_pagesize']=$_POST['p_size'];
+00069   
+00070 }
+00071 
+00073 html_page_start($User->theme);
 00074 
-00075 // Show Menu
-00076 echo ShowItem(array(                      
-00077                array('?p_action=create_invoice&dos='.$g_dossier,'Nouvelle'),
-00078                array('?p_action=view_invoice&dos='.$g_dossier,'Voir'),
-00079                array('?p_action=pref','Préférence'),
-00080                array('parametre.php?p_action=invoice&dos='.$g_dossier,'Paramètre'),
-00081                array('login.php','Accueil',"Accueil"),
-00082                array('logout.php','logout',"Sortie")
-00083                ),
-00084          'H',"mtitle","mtitle");
-00086 // Action requested
-00087 //
-00089 if ( isset ($_REQUEST["p_action"] ))  {
-00090   $action=$_REQUEST["p_action"];
-00092   // p_action == pref
-00094   if ( $action == "pref" ) 
-00095     {
-00096       require_once("pref.inc.php");
-00097     }
-00098 
-00100   // See All invoices
-00101   if ($action == "create_invoice" ) {
-00102   }
-00104   // See only unpaid invoices
-00105   if ($action=="view_invoice") {
+00075 $cn=DbConnect($g_dossier);
+00076 
+00077 echo "<H2 class=\"info\"> Facturation ".$_SESSION['g_name']." </H2>";
+00078 
+00079 // Show Menu
+00080 echo ShowItem(array(                      
+00081                array('?p_action=create_invoice&dos='.$g_dossier,'Nouvelle'),
+00082                array('?p_action=view_invoice&dos='.$g_dossier,'Voir'),
+00083                array('?p_action=pref','Préférence'),
+00084                array('parametre.php?p_action=invoice&dos='.$g_dossier,'Paramètre'),
+00085                array('login.php','Accueil',"Accueil"),
+00086                array('logout.php','logout',"Sortie")
+00087                ),
+00088          'H',"mtitle","mtitle");
+00090 // Action requested
+00091 //
+00093 if ( isset ($_REQUEST["p_action"] ))  {
+00094   $action=$_REQUEST["p_action"];
+00096   // p_action == pref
+00098   if ( $action == "pref" ) 
+00099     {
+00100       require_once("pref.inc.php");
+00101     }
+00102 
+00104   // See All invoices
+00105   if ($action == "create_invoice" ) {
 00106   }
-00108   // Create an invoice
-00109 
-00110 }//get action
-00111 
-00112 html_page_stop();
+00108   // See only unpaid invoices
+00109   if ($action=="view_invoice") {
+00110   }
+00112   // Create an invoice
 00113 
-00114 ?>
-

Generated on Wed May 31 21:39:14 2006 for phpcompta by  +00114 }//get action +00115 +00116 html_page_stop(); +00117 +00118 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/facturation_8php.html b/doc/developper/html/facturation_8php.html index 6b9729b1f..f4d09b3ad 100644 --- a/doc/developper/html/facturation_8php.html +++ b/doc/developper/html/facturation_8php.html @@ -4,10 +4,12 @@ - + -

facturation.php File Reference

+

facturation.php File Reference

obsolete More... +

+

Go to the source code of this file. @@ -25,7 +27,13 @@
 $cn = DbConnect($g_dossier)
-


Variable Documentation

+

Detailed Description

+obsolete +

+

Todo:
to remove
+ +

+Definition in file facturation.php.


Variable Documentation

@@ -48,7 +56,7 @@

-Definition at line 45 of file facturation.php. +Definition at line 49 of file facturation.php.

@@ -73,7 +81,7 @@ Definition at line 45

-Definition at line 71 of file facturation.php. +Definition at line 75 of file facturation.php.

@@ -98,7 +106,7 @@ Definition at line 71

-Definition at line 44 of file facturation.php. +Definition at line 48 of file facturation.php.

@@ -123,7 +131,7 @@ Definition at line 44

-Definition at line 40 of file facturation.php. +Definition at line 44 of file facturation.php.

@@ -148,7 +156,7 @@ Definition at line 40

-Definition at line 51 of file facturation.php. +Definition at line 55 of file facturation.php.

@@ -173,12 +181,12 @@ Definition at line 51

-Definition at line 59 of file facturation.php. +Definition at line 63 of file facturation.php.

-Referenced by cl_user::cl_user(). +Referenced by cl_user::cl_user(). -


Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche_8php-source.html b/doc/developper/html/fiche_8php-source.html index 0121eb181..c21815002 100644 --- a/doc/developper/html/fiche_8php-source.html +++ b/doc/developper/html/fiche_8php-source.html @@ -4,7 +4,7 @@ - +

fiche.php

Go to the documentation of this file.
00001 <?
@@ -27,166 +27,165 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 
-00022 include_once ("ac_common.php");
-00023 html_page_start($_SESSION['g_theme']);
-00024 
-00025 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
-00026   echo "You must choose a Dossier ";
-00027   exit -2;
-00028 }
-00029 include_once ("postgres.php");
-00030 include_once ("user_menu.php");
-00031 
-00032 
-00033 $rep=DbConnect();
-00034 include_once ("class_user.php");
-00035 $User=new cl_user($rep);
-00036 $User->Check();
-00037 include ("check_priv.php");
-00038 echo '<div class="u_tmenu">';
-00039 echo ShowMenuCompta($_SESSION['g_dossier']);
-00040 echo '</div>';
-00041 echo JS_SEARCH_POSTE;
-00042 
-00043 if ( !isset($sessid)) 
-00044 {
-00045   $sessid=$_REQUEST["PHPSESSID"];
-00046 } 
-00047 $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$sessid."')\">";
-00048 
-00049 
-00050 include_once("fiche_inc.php");
+00024 include_once ("ac_common.php");
+00025 html_page_start($_SESSION['g_theme']);
+00026 
+00027 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
+00028   echo "You must choose a Dossier ";
+00029   exit -2;
+00030 }
+00031 include_once ("postgres.php");
+00032 include_once ("user_menu.php");
+00033 
+00034 
+00035 $rep=DbConnect();
+00036 include_once ("class_user.php");
+00037 $User=new cl_user($rep);
+00038 $User->Check();
+00039 include ("check_priv.php");
+00040 echo '<div class="u_tmenu">';
+00041 echo ShowMenuCompta($_SESSION['g_dossier']);
+00042 echo '</div>';
+00043 echo JS_SEARCH_POSTE;
+00044 
+00045 if ( !isset($sessid)) 
+00046 {
+00047   $sessid=$_REQUEST["PHPSESSID"];
+00048 } 
+00049 $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$sessid."')\">";
+00050 
 00051 
-00052 $cn=DbConnect($_SESSION['g_dossier']);
+00052 include_once("fiche_inc.php");
 00053 
-00054 // Security check
-00055 $read=$User->CheckAction($cn,FICHE_READ);
-00056 $write=$User->CheckAction($cn,FICHE_WRITE);
-00057 if ($read+$write == 0 ){
-00058   /* Cannot Access */
-00059   NoAccess();
-00060 }
-00061 
-00062 // Creation of a new model of card
-00063 // in the database
-00064 if ( isset($_POST['add_modele'])  and $write != 0) {
-00065   // insert the model of card in database
-00066   AddModele($cn,$HTTP_POST_VARS);
-00067 }
-00068 
-00069 ShowMenuFiche($_SESSION['g_dossier']);
+00054 $cn=DbConnect($_SESSION['g_dossier']);
+00055 
+00056 // Security check
+00057 $read=$User->CheckAction($cn,FICHE_READ);
+00058 $write=$User->CheckAction($cn,FICHE_WRITE);
+00059 if ($read+$write == 0 ){
+00060   /* Cannot Access */
+00061   NoAccess();
+00062 }
+00063 
+00064 // Creation of a new model of card
+00065 // in the database
+00066 if ( isset($_POST['add_modele'])  and $write != 0) {
+00067   // insert the model of card in database
+00068   AddModele($cn,$HTTP_POST_VARS);
+00069 }
 00070 
-00071 if ( isset ( $_GET["action"]) ) {
-00072   $action=$_GET["action"];
-00073   // View the details of the selected cat. of cards
-00074   if ( isset ($_GET["fiche"]) && $action=="vue" ) {
-00075     echo '<DIV class="u_redcontent">';
-00076     ViewFiche($cn,$_GET["fiche"]);
-00077     echo '</DIV>';
-00078   }// Display the detail of a card
-00079   if ($action== "detail" ) {
-00080     echo '<DIV class="u_redcontent">';
-00081     if ( $write == 0) echo '<H2 class="info"> Vos changements ne seront pas sauvés</h2>';
-00082     ViewFicheDetail($cn,$_GET["fiche_id"]);
-00083     echo '</DIV>';
-00084   }
-00085   // Display the form where you can enter
-00086   // the property of the card model
-00087   if ($action == "add_modele" and $write !=0) {
-00088     echo '<DIV class="u_redcontent">';
-00089     DefModele($cn,$search);
-00090     echo '</DIV>';
-00091   }
-00092   // Modify a card Model
-00093   if ($action == "modifier" ) {
-00094     echo '<DIV class="u_redcontent">';
-00095     if ( $write ==0)  
-00096       echo "<h2 class=\"error\"> Pas d'accès </h2>";
-00097     else
-00098       UpdateModele($cn,$_GET["fiche"],$search);
-00099     echo '</DIV>';
-00100   }
-00101   // delete a card
-00102   if ($action== "delete"  ) {
-00103     echo '<DIV class="u_redcontent">';
-00104     if ( $write ==0)  
-00105       echo "<h2 class=\"error\"> Pas d'accès </h2>";
-00106     else
-00107       {
-00108         Remove($cn,$_GET["fiche_id"]);
-00109         
-00110         ViewFiche($cn,$_GET["f_fd_id"]);
-00111       }
-00112     echo "</DIV>";
-00113   }  
-00114 }
-00115 // Add a line in the card model
-00116 if ( isset ($_GET["add_ligne"])  ) {
-00117   echo '<DIV class="u_redcontent">';
-00118     if ( $write ==0)  
-00119       echo "<h2 class=\"error\"> Pas d'accès </h2>";
-00120     else
-00121       {
-00122         SaveModeleName($cn,$_GET["fd_id"],$_GET["label"]);
-00123         InsertModeleLine($cn,$_GET["fd_id"],$_GET["ad_id"]);
-00124         UpdateModele($cn,$_GET["fd_id"],$search);
-00125       }
-00126   echo '</DIV>';
-00127 }
-00128 // Change the name of the card  model
-00129 if ( isset ($_GET["change_name"] )  ) {
-00130   echo '<DIV class="u_redcontent">';
-00131     if ( $write ==0)  
-00132       echo "<h2 class=\"error\"> Pas d'accès </h2>";
-00133     else
-00134       {
-00135         SaveModeleName($cn,$_GET["fd_id"],$_GET["label"]);
-00136         UpdateModele($cn,$_GET["fd_id"],$search);
-00137       }
-00138   echo '</DIV>';
-00139 }
-00140 
-00141 // Display a blank  card from the selected category
-00142 if ( isset ($_POST["fiche"]) && isset ($_POST["add"] ) ) {
-00143   echo '<DIV class="u_redcontent">';
-00144     if ( $write ==0)  
-00145       echo "<h2 class=\"error\"> Pas d'accès </h2>";
-00146     else
-00147       EncodeFiche($cn,$_POST["fiche"]);
-00148   echo '</DIV>';
-00149 }
-00150 // Add the data (attribute) of the card
-00151 if ( isset ($_POST["add_fiche"]) ) {
-00152   echo '<DIV class="u_redcontent">';
-00153   
-00154   if ( $write ==0)  
-00155     echo "<h2 class=\"error\"> Pas d'accès </h2>";
-00156   else
-00157     {
-00158       AddFiche($cn,$_POST["fiche"],$HTTP_POST_VARS);
-00159       ViewFiche($cn,$_POST["fiche"]);
-00160     }
-00161   echo '</DIV>';
-00162 }
-00163 // Update a card
-00164 if ( isset ($_POST["update_fiche"])  ) {
-00165   echo '<DIV class="u_redcontent">';
-00166       if ( $write ==0)  
-00167       echo "<h2 class=\"error\"> Pas d'accès </h2>";
-00168     else
-00169       {
-00170         $a=UpdateFiche($cn,$HTTP_POST_VARS);
-00171       }
-00172       $fd_id=GetFicheDef($cn,$_POST["f_id"]);
-00173       ViewFiche($cn,$fd_id);
-00174 
-00175 
-00176   echo '</DIV>';
-00177 }
-00178 html_page_stop();
-00179 ?>
-

Generated on Wed May 31 21:39:14 2006 for phpcompta by  +00071 ShowMenuFiche($_SESSION['g_dossier']); +00072 +00073 if ( isset ( $_GET["action"]) ) { +00074 $action=$_GET["action"]; +00075 // View the details of the selected cat. of cards +00076 if ( isset ($_GET["fiche"]) && $action=="vue" ) { +00077 echo '<DIV class="u_redcontent">'; +00078 ViewFiche($cn,$_GET["fiche"]); +00079 echo '</DIV>'; +00080 }// Display the detail of a card +00081 if ($action== "detail" ) { +00082 echo '<DIV class="u_redcontent">'; +00083 if ( $write == 0) echo '<H2 class="info"> Vos changements ne seront pas sauvés</h2>'; +00084 ViewFicheDetail($cn,$_GET["fiche_id"]); +00085 echo '</DIV>'; +00086 } +00087 // Display the form where you can enter +00088 // the property of the card model +00089 if ($action == "add_modele" and $write !=0) { +00090 echo '<DIV class="u_redcontent">'; +00091 DefModele($cn,$search); +00092 echo '</DIV>'; +00093 } +00094 // Modify a card Model +00095 if ($action == "modifier" ) { +00096 echo '<DIV class="u_redcontent">'; +00097 if ( $write ==0) +00098 echo "<h2 class=\"error\"> Pas d'accès </h2>"; +00099 else +00100 UpdateModele($cn,$_GET["fiche"],$search); +00101 echo '</DIV>'; +00102 } +00103 // delete a card +00104 if ($action== "delete" ) { +00105 echo '<DIV class="u_redcontent">'; +00106 if ( $write ==0) +00107 echo "<h2 class=\"error\"> Pas d'accès </h2>"; +00108 else +00109 { +00110 Remove($cn,$_GET["fiche_id"]); +00111 +00112 ViewFiche($cn,$_GET["f_fd_id"]); +00113 } +00114 echo "</DIV>"; +00115 } +00116 } +00117 // Add a line in the card model +00118 if ( isset ($_GET["add_ligne"]) ) { +00119 echo '<DIV class="u_redcontent">'; +00120 if ( $write ==0) +00121 echo "<h2 class=\"error\"> Pas d'accès </h2>"; +00122 else +00123 { +00124 SaveModeleName($cn,$_GET["fd_id"],$_GET["label"]); +00125 InsertModeleLine($cn,$_GET["fd_id"],$_GET["ad_id"]); +00126 UpdateModele($cn,$_GET["fd_id"],$search); +00127 } +00128 echo '</DIV>'; +00129 } +00130 // Change the name of the card model +00131 if ( isset ($_GET["change_name"] ) ) { +00132 echo '<DIV class="u_redcontent">'; +00133 if ( $write ==0) +00134 echo "<h2 class=\"error\"> Pas d'accès </h2>"; +00135 else +00136 { +00137 SaveModeleName($cn,$_GET["fd_id"],$_GET["label"]); +00138 UpdateModele($cn,$_GET["fd_id"],$search); +00139 } +00140 echo '</DIV>'; +00141 } +00142 +00143 // Display a blank card from the selected category +00144 if ( isset ($_POST["fiche"]) && isset ($_POST["add"] ) ) { +00145 echo '<DIV class="u_redcontent">'; +00146 if ( $write ==0) +00147 echo "<h2 class=\"error\"> Pas d'accès </h2>"; +00148 else +00149 EncodeFiche($cn,$_POST["fiche"]); +00150 echo '</DIV>'; +00151 } +00152 // Add the data (attribute) of the card +00153 if ( isset ($_POST["add_fiche"]) ) { +00154 echo '<DIV class="u_redcontent">'; +00155 +00156 if ( $write ==0) +00157 echo "<h2 class=\"error\"> Pas d'accès </h2>"; +00158 else +00159 { +00160 AddFiche($cn,$_POST["fiche"],$HTTP_POST_VARS); +00161 ViewFiche($cn,$_POST["fiche"]); +00162 } +00163 echo '</DIV>'; +00164 } +00165 // Update a card +00166 if ( isset ($_POST["update_fiche"]) ) { +00167 echo '<DIV class="u_redcontent">'; +00168 if ( $write ==0) +00169 echo "<h2 class=\"error\"> Pas d'accès </h2>"; +00170 else +00171 { +00172 $a=UpdateFiche($cn,$HTTP_POST_VARS); +00173 } +00174 $fd_id=GetFicheDef($cn,$_POST["f_id"]); +00175 ViewFiche($cn,$fd_id); +00176 +00177 +00178 echo '</DIV>'; +00179 } +00180 html_page_stop(); +00181 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche_8php.html b/doc/developper/html/fiche_8php.html index 9f25c4924..5c074a4ee 100644 --- a/doc/developper/html/fiche_8php.html +++ b/doc/developper/html/fiche_8php.html @@ -4,10 +4,12 @@ - + -

fiche.php File Reference

+

fiche.php File Reference

module to manage the card (removing, listing, creating, modify attribut) More... +

+

Go to the source code of this file. @@ -17,7 +19,12 @@
 $User = new cl_user($rep)
-


Variable Documentation

+

Detailed Description

+module to manage the card (removing, listing, creating, modify attribut) +

+ +

+Definition in file fiche.php.


Variable Documentation

@@ -40,7 +47,7 @@

-Definition at line 33 of file fiche.php. +Definition at line 35 of file fiche.php.

@@ -65,10 +72,10 @@ Definition at line 33 of

-Definition at line 35 of file fiche.php. +Definition at line 37 of file fiche.php. -


Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche__csv_8php-source.html b/doc/developper/html/fiche__csv_8php-source.html index e8edc2298..21324eb55 100644 --- a/doc/developper/html/fiche__csv_8php-source.html +++ b/doc/developper/html/fiche__csv_8php-source.html @@ -4,7 +4,7 @@ - +

fiche_csv.php

Go to the documentation of this file.
00001 <?
@@ -27,83 +27,83 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 header('Content-type: application/csv');
-00022 header('Content-Disposition: attachment;filename="fiche.csv"',FALSE);
-00023 include_once ("ac_common.php");
-00024 include_once('class_fiche.php');
-00025 include_once ("postgres.php");
-00026 include_once("check_priv.php");
-00027 if (  isset ($_REQUEST['with_amount']))  include_once("class_poste.php");
-00028 $cn=DbConnect($_SESSION['g_dossier']);
-00029 
-00030 $rep=DbConnect();
-00031 include ('class_user.php');
-00032 $User=new cl_user($rep);
-00033 $User->Check();
-00034 
-00035 if ($User->CheckAction($cn,FICHE_READ) == 0 )
-00036   {
-00037     /* Cannot Access */
-00038     NoAccess();
-00039   }
-00040 
-00041 if  ( isset ($_POST['fd_id'])) {
-00042   $fiche_def=new fiche_def($cn,$_POST['fd_id']);
-00043   $fiche=new fiche($cn);
-00044   $e=$fiche->GetByType($fiche_def->id);
-00045   $o=0;
-00046   //  Heading
-00047   $fiche_def->GetAttribut();
-00048   foreach ($fiche_def->attribut as $attribut) {
-00049           if ( $o == 0 ) {
-00050                 printf("%s",$attribut->ad_text);
-00051                 $o=1;
-00052           }else {
-00053             printf(";%s",$attribut->ad_text);
-00054             if ( $attribut->ad_id == ATTR_DEF_ACCOUNT 
-00055                  && isset ($_REQUEST['with_amount'])) 
-00056               echo ";debit;credit;solde";
-00057           }
-00058     }
-00059   printf("\n");
-00060   $o=0;
-00061   // Details
-00062   // Save the accounting 
-00063   foreach ($e as $detail) {
-00064     foreach ( $detail->attribut as $dattribut ) {
-00065           if ( $o == 0 ) {
-00066                 printf("%s",$dattribut->av_text);
-00067                 $o=1;
-00068           } else {
-00069             printf (";%s",$dattribut->av_text);
-00070             // if solde resquested
-00071             //--
-00072             if ( $dattribut->ad_id == ATTR_DEF_ACCOUNT 
-00073                  && isset ($_REQUEST['with_amount']))  {
-00074               $account=new poste ($cn,$dattribut->av_text);
-00075               $solde=$account->GetSoldeDetail("j_tech_per between ".$_REQUEST['from_periode'].
-00076                                         " and ".
-00077                                         $_REQUEST['to_periode']);
-00078               
-00079               printf(";% 10.2f;% 10.2f;% 10.2f",
-00080                      $solde['debit'],
-00081                      $solde['credit'],
-00082                      $solde['solde']
-00083                      );
-00084             
-00085 
-00086             }
-00087           }
-00088       }
-00089     printf("\n");
-00090     $o=0;
-00091     }
-00092 
-00093 
-00094  }
-00095   exit;
-00096 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00025 header('Content-type: application/csv'); +00026 header('Content-Disposition: attachment;filename="fiche.csv"',FALSE); +00027 include_once ("ac_common.php"); +00028 include_once('class_fiche.php'); +00029 include_once ("postgres.php"); +00030 include_once("check_priv.php"); +00031 if ( isset ($_REQUEST['with_amount'])) include_once("class_poste.php"); +00032 $cn=DbConnect($_SESSION['g_dossier']); +00033 +00034 $rep=DbConnect(); +00035 include ('class_user.php'); +00036 $User=new cl_user($rep); +00037 $User->Check(); +00038 +00039 if ($User->CheckAction($cn,FICHE_READ) == 0 ) +00040 { +00041 /* Cannot Access */ +00042 NoAccess(); +00043 } +00044 +00045 if ( isset ($_POST['fd_id'])) { +00046 $fiche_def=new fiche_def($cn,$_POST['fd_id']); +00047 $fiche=new fiche($cn); +00048 $e=$fiche->GetByType($fiche_def->id); +00049 $o=0; +00050 // Heading +00051 $fiche_def->GetAttribut(); +00052 foreach ($fiche_def->attribut as $attribut) { +00053 if ( $o == 0 ) { +00054 printf("%s",$attribut->ad_text); +00055 $o=1; +00056 }else { +00057 printf(";%s",$attribut->ad_text); +00058 if ( $attribut->ad_id == ATTR_DEF_ACCOUNT +00059 && isset ($_REQUEST['with_amount'])) +00060 echo ";debit;credit;solde"; +00061 } +00062 } +00063 printf("\n"); +00064 $o=0; +00065 // Details +00066 // Save the accounting +00067 foreach ($e as $detail) { +00068 foreach ( $detail->attribut as $dattribut ) { +00069 if ( $o == 0 ) { +00070 printf("%s",$dattribut->av_text); +00071 $o=1; +00072 } else { +00073 printf (";%s",$dattribut->av_text); +00074 // if solde resquested +00075 //-- +00076 if ( $dattribut->ad_id == ATTR_DEF_ACCOUNT +00077 && isset ($_REQUEST['with_amount'])) { +00078 $account=new poste ($cn,$dattribut->av_text); +00079 $solde=$account->GetSoldeDetail("j_tech_per between ".$_REQUEST['from_periode']. +00080 " and ". +00081 $_REQUEST['to_periode']); +00082 +00083 printf(";% 10.2f;% 10.2f;% 10.2f", +00084 $solde['debit'], +00085 $solde['credit'], +00086 $solde['solde'] +00087 ); +00088 +00089 +00090 } +00091 } +00092 } +00093 printf("\n"); +00094 $o=0; +00095 } +00096 +00097 +00098 } +00099 exit; +00100 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche__csv_8php.html b/doc/developper/html/fiche__csv_8php.html index cede644db..75f3dec3f 100644 --- a/doc/developper/html/fiche__csv_8php.html +++ b/doc/developper/html/fiche__csv_8php.html @@ -4,10 +4,12 @@ - + -

fiche_csv.php File Reference

+

fiche_csv.php File Reference

Send a CSV file with card. More... +

+

Go to the source code of this file. @@ -27,7 +29,12 @@
 exit
-


Variable Documentation

+

Detailed Description

+Send a CSV file with card. +

+ +

+Definition in file fiche_csv.php.


Variable Documentation

@@ -50,7 +57,7 @@

-Definition at line 28 of file fiche_csv.php. +Definition at line 32 of file fiche_csv.php.

@@ -75,7 +82,7 @@ Definition at line 28

-Definition at line 44 of file fiche_csv.php. +Definition at line 48 of file fiche_csv.php.

@@ -100,7 +107,7 @@ Definition at line 44

-Definition at line 43 of file fiche_csv.php. +Definition at line 47 of file fiche_csv.php.

@@ -125,9 +132,9 @@ Definition at line 43

-Definition at line 45 of file fiche_csv.php. +Definition at line 49 of file fiche_csv.php.

-Referenced by parm_code::LoadAll(), fiche_def_ref::LoadAll(), Cpdf::o_action(), Cpdf::o_annotation(), Cpdf::o_catalog(), Cpdf::o_contents(), Cpdf::o_destination(), Cpdf::o_encryption(), Cpdf::o_font(), Cpdf::o_fontDescriptor(), Cpdf::o_fontEncoding(), Cpdf::o_image(), Cpdf::o_info(), Cpdf::o_outlines(), Cpdf::o_page(), Cpdf::o_pages(), Cpdf::o_procset(), Cpdf::o_viewerPreferences(), and UpdateForm(). +Referenced by parm_code::LoadAll(), fiche_def_ref::LoadAll(), Cpdf::o_action(), Cpdf::o_annotation(), Cpdf::o_catalog(), Cpdf::o_contents(), Cpdf::o_destination(), Cpdf::o_encryption(), Cpdf::o_font(), Cpdf::o_fontDescriptor(), Cpdf::o_fontEncoding(), Cpdf::o_image(), Cpdf::o_info(), Cpdf::o_outlines(), Cpdf::o_page(), Cpdf::o_pages(), Cpdf::o_procset(), Cpdf::o_viewerPreferences(), and UpdateForm().

@@ -152,7 +159,7 @@ Referenced by par

-Definition at line 30 of file fiche_csv.php. +Definition at line 34 of file fiche_csv.php.

@@ -177,7 +184,7 @@ Definition at line 30

-Definition at line 32 of file fiche_csv.php. +Definition at line 36 of file fiche_csv.php.

@@ -202,10 +209,10 @@ Definition at line 32

-Definition at line 95 of file fiche_csv.php. +Definition at line 99 of file fiche_csv.php. -


Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche__def_8inc_8php-source.html b/doc/developper/html/fiche__def_8inc_8php-source.html index 90fa36484..4b223fc04 100644 --- a/doc/developper/html/fiche__def_8inc_8php-source.html +++ b/doc/developper/html/fiche__def_8inc_8php-source.html @@ -4,7 +4,7 @@ - +

fiche_def.inc.php

Go to the documentation of this file.
00001 <?
@@ -28,60 +28,59 @@
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00021 require_once("class_fiche_def.php");
-00022 
-00023 // record change
-00024 if ( isset ($_POST['confirm_mod'])) {
-00025   extract ($_POST);
-00026   $update=new fiche_def_ref($cn);
-00027   $update->frd_id=FormatString($frd_id);
-00028   $update->frd_text=FormatString($frd_text);
-00029   $update->frd_class_base=FormatString($frd_class_base);
-00030   $update->Save();
-00031 }
-00032 // Load All Fiche_def
-00033 $fiche_def=new fiche_def_ref($cn);
-00034 $all=$fiche_def->LoadAll();
-00035 // Display Them
-00036 echo '<table align="left">';
-00037 for ($i=0;$i<sizeof($all);$i++) 
-00038 {
-00039   echo '<TR>';
-00040   echo $all[$i]->Display();
-00041   echo "<TD>";
-00042   echo '<form method="post">';
-00043   $w=new widget('hidden');
-00044   echo $w->IOValue('idx',$i);
-00045   echo $w->Submit('mod','modifie');
-00046   echo $w->IOValue('fiche','p_action');
-00047   echo "</form>";
-00048   echo "</TD>";
-00049   echo '</TR>';
-00050 }
-00051 echo "</table>";
-00052 // modify input
-00053 if ( isset ($_POST['mod']) ) 
-00054 {
-00055   extract ($_POST);
-00056   echo '<div style="position:float;padding:2%">';
-00057   echo "Voulez-vous modifier ?<br><font color=\"red\"> Attention, ne changer pas la signification de ";
-00058   echo " ce poste, <i>par exemple ne pas changer Client par fournisseur</i>, <br>sinon le programme fonctionnera mal, utiliser uniquement des chiffres pour la classe de base ou rien</font>";
-00059   $idx=$_POST['idx'];
-00060   $mod=new fiche_def_ref($cn);
-00061   $mod->frd_id=$all[$idx]->frd_id;
-00062   $mod->frd_text=$all[$idx]->frd_text;
-00063   $mod->frd_class_base=$all[$idx]->frd_class_base;
-00064   echo '<form method="post">';
-00065   echo '<ul style="list-style-type:none"';
-00066   echo $mod->Input();
-00067   echo "</ul>";
-00068   $w=new widget("hidden");
-00069   echo $w->IOValue('p_action','fiche');
-00070   echo $w->Submit('confirm_mod' ,'Confirme');
-00071   echo $w->Submit('no','Cancel');
-00072   echo '</form>';
-00073   echo '</div>';
-00074 }
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00026 // record change +00027 if ( isset ($_POST['confirm_mod'])) { +00028 extract ($_POST); +00029 $update=new fiche_def_ref($cn); +00030 $update->frd_id=FormatString($frd_id); +00031 $update->frd_text=FormatString($frd_text); +00032 $update->frd_class_base=FormatString($frd_class_base); +00033 $update->Save(); +00034 } +00035 // Load All Fiche_def +00036 $fiche_def=new fiche_def_ref($cn); +00037 $all=$fiche_def->LoadAll(); +00038 // Display Them +00039 echo '<table align="left">'; +00040 for ($i=0;$i<sizeof($all);$i++) +00041 { +00042 echo '<TR>'; +00043 echo $all[$i]->Display(); +00044 echo "<TD>"; +00045 echo '<form method="post">'; +00046 $w=new widget('hidden'); +00047 echo $w->IOValue('idx',$i); +00048 echo $w->Submit('mod','modifie'); +00049 echo $w->IOValue('fiche','p_action'); +00050 echo "</form>"; +00051 echo "</TD>"; +00052 echo '</TR>'; +00053 } +00054 echo "</table>"; +00055 // modify input +00056 if ( isset ($_POST['mod']) ) +00057 { +00058 extract ($_POST); +00059 echo '<div style="position:float;padding:2%">'; +00060 echo "Voulez-vous modifier ?<br><font color=\"red\"> Attention, ne changer pas la signification de "; +00061 echo " ce poste, <i>par exemple ne pas changer Client par fournisseur</i>, <br>sinon le programme fonctionnera mal, utiliser uniquement des chiffres pour la classe de base ou rien</font>"; +00062 $idx=$_POST['idx']; +00063 $mod=new fiche_def_ref($cn); +00064 $mod->frd_id=$all[$idx]->frd_id; +00065 $mod->frd_text=$all[$idx]->frd_text; +00066 $mod->frd_class_base=$all[$idx]->frd_class_base; +00067 echo '<form method="post">'; +00068 echo '<ul style="list-style-type:none"'; +00069 echo $mod->Input(); +00070 echo "</ul>"; +00071 $w=new widget("hidden"); +00072 echo $w->IOValue('p_action','fiche'); +00073 echo $w->Submit('confirm_mod' ,'Confirme'); +00074 echo $w->Submit('no','Cancel'); +00075 echo '</form>'; +00076 echo '</div>'; +00077 } +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche__def_8inc_8php.html b/doc/developper/html/fiche__def_8inc_8php.html index 4f47dc4da..a69fc35db 100644 --- a/doc/developper/html/fiche__def_8inc_8php.html +++ b/doc/developper/html/fiche__def_8inc_8php.html @@ -4,10 +4,12 @@ - + -

fiche_def.inc.php File Reference

+

fiche_def.inc.php File Reference

Let customise the fiche_def_ref for the user. More... +

+

Go to the source code of this file. @@ -31,7 +33,12 @@
 $mod = new fiche_def_ref($cn)
-


Variable Documentation

+

Detailed Description

+Let customise the fiche_def_ref for the user. +

+ +

+Definition in file fiche_def.inc.php.


Variable Documentation

@@ -54,7 +61,7 @@

-Definition at line 34 of file fiche_def.inc.php. +Definition at line 37 of file fiche_def.inc.php.

@@ -79,7 +86,7 @@ Definition at line

-Definition at line 33 of file fiche_def.inc.php. +Definition at line 36 of file fiche_def.inc.php.

@@ -104,9 +111,9 @@ Definition at line

-Definition at line 59 of file fiche_def.inc.php. +Definition at line 62 of file fiche_def.inc.php.

-Referenced by ComputeTotalVat(), parm_code::LoadAll(), and fiche_def_ref::LoadAll(). +Referenced by ComputeTotalVat(), parm_code::LoadAll(), and fiche_def_ref::LoadAll().

@@ -131,7 +138,7 @@ Referenced by ComputeT

-Definition at line 60 of file fiche_def.inc.php. +Definition at line 63 of file fiche_def.inc.php.

@@ -156,7 +163,7 @@ Definition at line

-Definition at line 26 of file fiche_def.inc.php. +Definition at line 29 of file fiche_def.inc.php.

@@ -181,7 +188,7 @@ Definition at line

-Definition at line 43 of file fiche_def.inc.php. +Definition at line 46 of file fiche_def.inc.php.

@@ -206,9 +213,9 @@ Definition at line

-Definition at line 29 of file fiche_def.inc.php. +Definition at line 32 of file fiche_def.inc.php.

-Referenced by fiche_def_ref::fiche_def_ref(), fiche_def_ref::Get(), Get_fiche_def_ref(), GetBaseFicheDefault(), fiche_def_ref::Input(), and fiche_def_ref::Save(). +Referenced by fiche_def_ref::fiche_def_ref(), fiche_def_ref::Get(), Get_fiche_def_ref(), GetBaseFicheDefault(), fiche_def_ref::Input(), and fiche_def_ref::Save().

@@ -233,9 +240,9 @@ Referenced by fic

-Definition at line 27 of file fiche_def.inc.php. +Definition at line 30 of file fiche_def.inc.php.

-Referenced by fiche_def_ref::fiche_def_ref(), fiche_def::Get(), Get_fiche_def_ref(), fiche_def::GetAll(), GetFicheDefRef(), and fiche_def_ref::Input(). +Referenced by fiche_def_ref::fiche_def_ref(), fiche_def::Get(), Get_fiche_def_ref(), fiche_def::GetAll(), GetFicheDefRef(), and fiche_def_ref::Input().

@@ -260,12 +267,12 @@ Referenced by fic

-Definition at line 28 of file fiche_def.inc.php. +Definition at line 31 of file fiche_def.inc.php.

-Referenced by fiche_def_ref::fiche_def_ref(), fiche_def_ref::Get(), Get_fiche_def_ref(), fiche_def_ref::Input(), and fiche_def_ref::Save(). +Referenced by fiche_def_ref::fiche_def_ref(), fiche_def_ref::Get(), Get_fiche_def_ref(), fiche_def_ref::Input(), and fiche_def_ref::Save(). -


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche__inc_8php-source.html b/doc/developper/html/fiche__inc_8php-source.html index fcf3c3ff7..017834767 100644 --- a/doc/developper/html/fiche__inc_8php-source.html +++ b/doc/developper/html/fiche__inc_8php-source.html @@ -4,7 +4,7 @@ - +

fiche_inc.php

Go to the documentation of this file.
00001 <?
@@ -28,1565 +28,1125 @@
 00019 
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00021 // $Revision$
-00022 /* function GetSqlFiche 
-00023  ***************************************************
-00024  * purpose : return the sql string which match the p_type 
-00025  *           permit to have all the sql here
-00026  * param : $p_type what sql select command u want
-00027  * return : string
-00028  */
-00029 function GetSqlFiche($p_type) {
-00030   switch ($p_type ) {
-00031 
-00032     // return all the existing fiche_def_ref
-00033   case ALL_FICHE_DEF_REF:
-00034     return "select frd_id, frd text from fiche_def_ref";
-00035 
-00036   default:
-00037     echo_error("undefined type cannot return the corresponding select");
-00038     return null;
-00039   }
-00040 
-00041 }
-00042 
-00043 /* function addFiche
-00044  ***************************************************
-00045  * Purpose : ajoute une nouvelle fiche
-00046  * 
-00047  * parm : 
-00048  *      - connexion
-00049  *      - type de la fiche
-00050  *      - tableau
-00051  * gen :
-00052  *      - none
-00053  * return:
-00054  *      - none
-00055  *
-00056  */ 
-00057 function AddFiche($p_cn,$p_type,$p_array) {
-00058   // TODO ADD ROLLBACK !!!
-00059   echo_debug('fiche_inc.php',__LINE__," AddFiche($p_cn,$p_type,$p_array) ");
-00060   // Push the array in element starting with p
-00061   //
-00062   foreach ($p_array as $key=>$element){
-00063     ${"p_$key"}=$element;
-00064     echo_debug('fiche_inc.php',__LINE__,"p_$key=$element;");
-00065   }
-00066   // First verify that the name is not null
-00067   // av_text.ATTR_DEF_NAME
-00068   if ( strlen(trim($p_av_text0 )) ==0 )
-00069     return;
-00070 
-00071   // First Get the attr of the fiche
-00072   $field=Get_attr_def($p_cn,$p_fd_id);
-00073 
-00074   $flag=1;
-00075 
-00076   // Create the Fiche
-00077   $Sql="insert into fiche (fd_id) values (".$p_fd_id.")";
-00078   $Res=ExecSql($p_cn,$Sql);
-00079 
-00080   // Get is f_id (sequence)
-00081   $l_f_id=GetSequence($p_cn,'s_fiche');
-00082 
-00083   // Should we Create accounts for each cards
-00084   $create=GetCreateAccount($p_cn,$p_fd_id);
-00085 
-00086 
-00087   // Is a account given ?
-00088   for ( $i = 0; $i < $p_inc;$i++) {
-00089     //Except for the class base
-00090     if ( ${"p_ad_id$i"} == ATTR_DEF_ACCOUNT ) {
-00091       if (strlen (trim(${"p_av_text$i"})) == 0 or
-00092           isNumber(${"p_av_text$i"}) == 0 )
-00093         {
-00094           break;
-00095         }
-00096       // if account already exist do nothing in tmp_pcmn otherwise add it
-00097       if (CountSql($p_cn,"select pcm_val from tmp_pcmn where pcm_val=".${"p_av_text$i"}) == 0 )
-00098         {
-00099           $len=strlen(${"p_av_text$i"})-1;
-00100           // Mother account
-00101           $p_parent=substr(${"p_av_text$i"},0,$len);
-00102           while (CountSql($p_cn,"select pcm_val from tmp_pcmn where pcm_val=$p_parent") == 0 and
-00103                  $len > 0 ) {
-00104             $len--;
-00105             $p_parent=substr(${"p_av_text$i"},0,$len);
-00106           }
-00107           // If no parent found
-00108           if ( $len <= 0 ) {
-00109             echo_error ("No parent found");
-00110             exit("No parent found for ".${"p_av_text$i"});
-00111 
-00112           } // if $len == 0
-00113           $lib=FormatString($p_av_text0);
-00114           $sql=sprintf("insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) 
-00115                 values (%s,'%s',%d)",
-00116                        ${"p_av_text$i"},
-00117                        $lib,
-00118                        $p_parent);
-00119 
-00120           // Add if into tmp_pcmn
-00121           $Res=ExecSql($p_cn,$Sql);
-00122         }
-00123       // Add it the jnt table
-00124       // 5 is always for the account post
-00125       $Sql=sprintf("insert into jnt_fic_att_value (f_id,ad_id) values (%d,%d)",
-00126                    $l_f_id,ATTR_DEF_ACCOUNT);
-00127       $Res=ExecSql($p_cn,$Sql);
-00128       
-00129       // Get the jft_id sequence (s_jnt_fic_att_value)
-00130       $l_jft_id=GetSequence($p_cn,'s_jnt_fic_att_value');
-00131       
-00132       
-00133       // Add it the attr_value table
-00134       $Sql=sprintf("insert into attr_value(jft_id,av_text) values (%d,'%s')",
-00135                    $l_jft_id,${"p_av_text$i"});
-00136       $Res=ExecSql($p_cn,$Sql);
-00137       // If create == 0 we don't create automatically an account
-00138       $create=0;      
-00139     }
-00140 
-00141   } // for $i...
-00142 
-00143   echo_debug ( " create = $create ");
-00144   if ( $create == 1 ) {
-00145     // We create an account for each
-00146     // Get The Class Base
-00147     $base=GetBaseFiche($p_cn,$p_type);
-00148     
-00149     // If a specific post account is needed created it
-00150     
-00151     if ( $base !=null  ) {
-00152       // if the class base is not null, create it in the tmp_pcmn
-00153       $num=GetNextFiche($p_cn,$base);
-00154 
-00155       $lib=FormatString($p_av_text0);
-00156       $sql=sprintf("insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) 
-00157                 values (%s,'%s',%d)",
-00158                    $num,
-00159                    $lib,
-00160                    $base);
-00161       echo_debug($sql);
-00162       $Res=ExecSql($p_cn,$sql);
-00163       // Add it the jnt table
-00164       // 5 is always for the account post
-00165       $Sql=sprintf("insert into jnt_fic_att_value (f_id,ad_id) values (%d,%d)",
-00166                    $l_f_id,ATTR_DEF_ACCOUNT);
-00167       $Res=ExecSql($p_cn,$Sql);
-00168       
-00169       // Get the jft_id sequence (s_jnt_fic_att_value)
-00170       $l_jft_id=GetSequence($p_cn,'s_jnt_fic_att_value');
-00171       
-00172       
-00173       // Add it the attr_value table
-00174       $Sql=sprintf("insert into attr_value(jft_id,av_text) values (%d,'%s')",
-00175                    $l_jft_id,$num);
-00176       $Res=ExecSql($p_cn,$Sql);
-00177     }
-00178   }// end create accounts for each cards
-00179 
-00180 
-00181   // Add the others attribut in jnt_fic_att_value and after in attr_value
-00182   for ( $i = 0; $i < $p_inc;$i++) {
-00183     //Except for the class base
-00184        if ( ${"p_ad_id$i"} == ATTR_DEF_ACCOUNT ) continue;
-00185 
-00186     // Special treatment for QuickCode
-00187        if ( ${"p_ad_id$i"} == ATTR_DEF_QUICKCODE ) {
-00188          $sql=sprintf("select insert_quick_code(%d,'%s')",
-00189                       $l_f_id,FormatString(${"p_av_text$i"}));
-00190          $Res=ExecSql($p_cn,$sql);
-00191          continue;
-00192        }
-00193     // Add it the jnt table
-00194     $Sql=sprintf("insert into jnt_fic_att_value (f_id,ad_id) values (%d,%d)",
-00195                  $l_f_id,${"p_ad_id$i"});
-00196     $Res=ExecSql($p_cn,$Sql);
-00197 
-00198     // Get the jft_id sequence (s_jnt_fic_att_value)
-00199     $l_jft_id=GetSequence($p_cn,'s_jnt_fic_att_value');
-00200 
-00201     // test the vat rate
-00202     if (  ${"p_ad_id$i"} == ATTR_DEF_TVA ) {
-00203       // is a rate given 
-00204       if ( strlen(trim(${"p_av_text$i"})) != 0 and 
-00205            isNumber(${"p_av_text$i"}) == 1) {
-00206         // is a valid rate ?
-00207         if ( CountSql($p_cn,"select * from tva_rate where tva_id='".${"p_av_text$i"}."'") == 0 ) {
-00208           // the rate doesn't exist
-00209           ${"p_av_text$i"}=1;
-00210           // warning
-00211           echo_error('invalid rate') ;
-00212           echo '<script>
-00213                 alert("Attention tva invalid, valeur par défaut =1 ");
-00214               </script>';
-00215           
-00216         }
-00217       }// if a rate is given
-00218     }
-00219     $text=FormatString(${"p_av_text$i"});
-00220     // Add it the attr_value table
-00221     $Sql=sprintf("insert into attr_value(jft_id,av_text) values (%d,'%s')",
-00222                  $l_jft_id,$text);
-00223     $Res=ExecSql($p_cn,$Sql);
-00224 
-00225   }
-00226 
-00227 }
-00228 /* function EncodeFiche
-00229  ***************************************************
-00230  * Purpose : Affiche les détails d'une fiche et propose
-00231  *           de mettre à jour
-00232  *           ou si array est a null, permet d'ajouter une
-00233  *           fiche, to fill the attribute
-00234  * 
-00235  * parm : 
-00236  *      -  p_cn connexion
-00237  *      -  p_type id du modele fiche_def(fd_id) de la fiche SI array est null
-00238  *         sinon correspond au id d'une fiche fiche(f_id)
-00239  * gen :
-00240  *      - none
-00241  * return:
-00242  *      - none
-00243  *
-00244  * NOTE STAN: je ne trouve pas le nom "EncodeFiche" super claire pour une fonction qui affiche les détails d'une fiche...
-00245  * on ne changerait pas en "DisplayFiche" ?
-00246  * NOTE DANY: Oui je suis assez d'accord avec toi
-00247  *
-00248  */ 
-00249 function EncodeFiche($p_cn,$p_type,$p_array=null) {
-00250   echo_debug('fiche_inc.php',__LINE__,"function EncodeFiche($p_cn,$p_type) ");
-00251 
-00252   $ch_col="</TD><TD>";
-00253   $ch_li='</TR><TR>';
-00254   echo '<FORM action="fiche.php" method="post" name="fiche">';
-00255   echo '<INPUT TYPE="HIDDEN" name="fiche" value="'.$p_type.'">';
-00256   $l_sessid=$_REQUEST['PHPSESSID'];
-00257 
-00258   echo JS_SHOW_TVA;
-00259   echo JS_SEARCH_POSTE;
-00260   echo "<TABLE>";
-00261   if ($p_array == null) {
-00262     // Array is null so we display a blank form
-00263     //    echo '<H2 class="info">'.getFicheName($p_cn,$p_type).'</H2>';
-00264     echo '<H2 class="info">New </H2>';
-00265     $p_f_id="";
-00266     echo_debug('fiche_inc.php',__LINE__,"Array is null");
-00267     // Find all the attribute of the existing cards
-00268     // --> Get_attr_def 
-00269     $sql="select frd_id,ad_id,ad_text from  fiche_def join jnt_fic_attr using (fd_id)
-00270            join attr_def using (ad_id) where fd_id=".$p_type." order by ad_id";
-00271 
-00272     $Res=ExecSql($p_cn,$sql);
-00273     $Max=pg_NumRows($Res);
-00274     // Put the card modele id (fiche_def.fd_id)
-00275     echo '<INPUT TYPE="HIDDEN" name="fd_id" value="'.$p_type.'">';
-00276     for ($i=0;$i < $Max;$i++) {
-00277       $l_line=pg_fetch_array($Res,$i);
-00278 
-00279       // The number of the attribute
-00280       $Hid=sprintf('<INPUT TYPE="HIDDEN" name="ad_id%d" value="%s">',
-00281                    $i,$l_line['ad_id']);
-00282 
-00283       $but_search_poste="";
-00284       // Javascript for searching the account
-00285       if ( $l_line ['ad_id'] == ATTR_DEF_ACCOUNT ) {
-00286         $ctl_name="av_text$i";
-00287         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$l_sessid.'\',\''.$ctl_name.'\')">';
-00288       } 
-00289       // Javascript for showing the tva
-00290       if ( $l_line ['ad_id'] == ATTR_DEF_TVA ) {
-00291         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Montre" OnClick="ShowTva(\''.$l_sessid.'\', \'av_text'.$i.'\')">';
-00292       }
-00293       // content of the attribute
-00294       printf ('<TR><TD> %s </TD><TD><INPUT TYPE="TEXT" NAME="av_text%d">%s %s</TD></TR>',
-00295               $l_line['ad_text'], $i,$Hid,$but_search_poste);
-00296    }
-00297     echo '</TR>';
-00298     echo '</TABLE>';
-00299     echo '<INPUT TYPE="HIDDEN" name="inc" value="'.$Max.'">';
-00300     echo '<INPUT TYPE="SUBMIT" name="add_fiche" value="ajoute">';
-00301     echo '</FORM>';
-00302   }else {
-00303     // Array is not null so we have to find the card's data from the database
-00304     // and display them
-00305 
-00306     // Display the card name
-00307     $label=getFicheNameById($p_cn,$p_type);
-00308     echo '<H2 class="info">'.$label.'</H2>';
-00309 
-00310     // Find all the data related to the card
-00311     $sql="select av_text,ad_id,ad_text,jft_id from attr_value
-00312         natural join attr_def 
-00313         natural join jnt_fic_att_value 
-00314         natural join fiche where f_id=$p_type order by ad_id";
-00315 
-00316     $Res=ExecSql($p_cn,$sql);
-00317     $Max=pg_NumRows($Res);
-00318     echo_debug('fiche_inc.php',__LINE__,"Max ==== $Max");    
-00319 
-00320     echo '<INPUT TYPE="HIDDEN" name="f_id" value="'.$p_type.'">';
-00321     echo '<INPUT TYPE="HIDDEN" name="f_label" value="'.$label.'">';
-00322     echo '<INPUT TYPE="HIDDEN" name="max" value="'.$Max.'">';
-00323 
-00324     for ($i=0;$i < $Max;$i++) {
-00325       // fetch the data
-00326       $l_line=pg_fetch_array($Res,$i);
-00327 
-00328       // Put also the class in a special variable
-00329       // useful when we want to update the PCMN
-00330 
-00331       $but_search_poste="";
-00332       if ( $l_line['ad_id'] == ATTR_DEF_ACCOUNT ) {
-00333         printf('<INPUT TYPE="HIDDEN" name="class" value="%s">',
-00334                $l_line['av_text']);
-00335       // Javascript for searching the account
-00336         $ctl_name="av_text$i";
-00337         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$l_sessid.'\',\''.$ctl_name.'\')">';
-00338       } 
-00339         
-00340       // Javascript for showing the tva
-00341       if ( $l_line ['ad_id'] == ATTR_DEF_TVA ) {
-00342         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Montre" OnClick="ShowTva(\''.$l_sessid.'\',\'av_text'.$i.'\')">';
-00343       }
-00344       
-00345       // hide ad_id
-00346       $ad=sprintf('<input type="hidden" name="ad_id%d" value="%s">',
-00347                   $l_line['ad_id'],$l_line['av_text']);
-00348       
-00349       // in hidden we put the jft_id
-00350       $Hid=sprintf('<INPUT TYPE="HIDDEN" name="jft_id%d" value="%s">',
-00351                    $i,$l_line['jft_id']);
-00352       printf ('<TR><TD> %s </TD><TD><INPUT TYPE="TEXT" NAME="av_text%d" VALUE="%s">%s %s %s</TD></TR>',
-00353               $l_line['ad_text'], $i, $l_line['av_text'],$Hid,$but_search_poste,$ad);
-00354       
-00355     }
-00356     echo '</TR>';
-00357     echo '</TABLE>';
-00358     echo '<INPUT TYPE="SUBMIT" name="update_fiche" value="Mis à jour">';
-00359     echo '</FORM>';
-00360   }
-00361 }
-00362 
-00363 /* function GetBaseFiche
-00364  ***************************************************
-00365  * Purpose : donne la classe comptable de base d'une fiche
-00366  *  
-00367  * parm : 
-00368  *      - p_cn connexion
-00369  *      - p_type fiche id
-00370  * gen :
-00371  *      - none
-00372  * return:
-00373  *      - return la classe id ou rien
-00374  *
-00375  */ 
-00376 function GetBaseFiche($p_cn,$p_type) {
-00377   $base=null;
-00378   $Res=ExecSql($p_cn,"select fd_class_base from fiche_def where fd_id=".$p_type);
-00379   if ( pg_NumRows($Res) == 0 ) return null;
-00380   $base=pg_fetch_array($Res,0);
-00381   return $base['fd_class_base'];
-00382 }
-00383 
-00384 /* function GetBaseFicheDefault
-00385  ***************************************************
-00386  * Purpose : Give the default accounts of fiche_def
-00387  *
-00388  *  
-00389  * parm : 
-00390  *      - p_cn connexion
-00391  *      - p_type fiche id
-00392  * gen :
-00393  *      - none
-00394  * return:
-00395  *      - return la classe id ou rien
-00396  *
-00397  */ 
-00398 function GetBaseFicheDefault($p_cn,$p_type) {
-00399   $base=null;
-00400   $Res=ExecSql($p_cn,"select frd_class_base from fiche_def_ref where frd_id=".$p_type);
-00401   if ( pg_NumRows($Res) == 0 ) return null;
-00402   $base=pg_fetch_array($Res,0);
-00403   return $base['frd_class_base'];
-00404 }
-00405 /* function ViewFiche
-00406  ***************************************************
-00407  * Purpose : Montre les fiches d'une rubrique
-00408  * 
-00409  * parm : 
-00410  *      -  p_cn connexion
-00411  *      - $p_type fiche_def.fd_id catg of card
-00412  * gen :
-00413  *      - none
-00414  * return:
-00415  *      - none
-00416  *
-00417  */ 
-00418 function ViewFiche($p_cn,$p_type) {
-00419   require_once("user_common.php");
-00420   echo '<H2 class="info">'.getFicheDefName($p_cn,$p_type).'</H2>';
-00421 
-00422    $step=$_SESSION['g_pagesize'];
-00423    $sql_limit="";
-00424    $sql_offset="";
-00425    if ( $step != -1 ) {
-00426      $page=(isset($_GET['page']))?$_GET['page']:1;
-00427      $offset=(isset($_GET['offset']))?$_GET['offset']:0;
-00428      $max_line=CountSql($p_cn,"select f_id,av_text  from 
-00429                           fiche join jnt_fic_att_value using (f_id) 
-00430                                 join attr_value using (jft_id)
-00431                        where fd_id='".$p_type."' and ad_id=".ATTR_DEF_NAME." order by f_id");
-00432      $sql_limit=" limit ".$step;
-00433      $sql_offset=" offset ".$offset;
-00434      $bar=jrn_navigation_bar($offset,$max_line,$step,$page);
-00435    }
-00436    
-00437   // Get all name the cards of the select category
-00438   // 1 for attr_def.ad_id is always the name
-00439     $Res=ExecSql($p_cn,"select f_id,av_text,j_qcode  from 
-00440                           fiche join jnt_fic_att_value using (f_id) 
-00441                                 join attr_value using (jft_id)
-00442                                 join vw_poste_qcode using(f_id)
-00443                        where fd_id='".$p_type.
-00444                        "' and ad_id=".ATTR_DEF_NAME." order by f_id $sql_offset $sql_limit ");
-00445     $Max=pg_NumRows($Res);
-00446     echo $bar;
-00447 
-00448     for ( $i = 0; $i < $Max; $i++) {
-00449       $l_line=pg_fetch_array($Res,$i);
-00450       $div="<DIV>";
-00451       $span_mod='<span class="mtitle"><A class="mtitle2" href="fiche.php?action=detail&fiche_id='.$l_line['f_id'].'"> Modifie</A></SPAN>';
-00452       $span_del='<span class="mtitle2" ALIGN="left">'.
-00453         '<A class="mtitle2" href="fiche.php?f_fd_id='.$p_type.'&action=delete&fiche_id='.$l_line['f_id'].
-00454         '"> delete</A></SPAN>';
-00455       $span_id='<SPAN style="background-color:lightgrey;">'.$l_line['j_qcode']."</SPAN>";
-00456       if ( $i %2 == 0 ) 
-00457         $div='<DIV style="background-color:#DDE6FF;">';
-00458         echo $div.$span_del.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.
-00459           $span_mod."&nbsp;"."&nbsp;"."&nbsp;".$span_id."&nbsp;"."&nbsp;"."&nbsp;".$l_line['av_text']."</DIV>";
-00460     }
-00461     echo '<FORM METHOD="POST" action="fiche.php">';
-00462     echo '<INPUT TYPE="HIDDEN" name="fiche" value="'.$p_type.'">';
-00463     echo '<INPUT TYPE="SUBMIT" name="add" Value="Ajout fiche">';
-00464     echo '</FORM>';
-00465     echo $bar;
-00466 
-00467 }
-00468 /* function GetNextFiche
-00469  ***************************************************
-00470  * Purpose : Crée le poste suivant pour une fiche en fonction
-00471  *           de la classe de base (fichedef(fd_class_base))
-00472  * 
-00473  * parm : 
-00474  *      - p_cn connexion
-00475  *      - p_base 
-00476  * gen :
-00477  *      -
-00478  * return:
-00479  *      -
-00480  *
-00481  */ 
-00482 function GetNextFiche($p_cn,$p_base) {
-00483   $Res=ExecSql($p_cn,"select max(pcm_val) as maxcode from tmp_pcmn where pcm_val_parent = $p_base");
-00484  $Max=pg_NumRows($Res);
-00485  echo_debug('fiche_inc.php',__LINE__,"$Max=pg_NumRows");
-00486   $l_line=pg_fetch_array($Res,0);
-00487   $ret=$l_line['maxcode'];
-00488  if ( $ret == "" ) {
-00489    $ret=sprintf("%d%04d",$p_base,0);
-00490    return $ret+1;
-00491 
-00492  }
-00493 
-00494   echo_debug('fiche_inc.php',__LINE__,"ret $ret");
-00495   return $ret+1;
-00496 }
-00497 /* function ViewFicheDetail
-00498  ***************************************************
-00499  * Purpose : Montre  le detail d'une fiche
-00500  *           et ajoute les lignes manquantes
-00501  *           dans le cas où le modèle à changer
-00502  * 
-00503  * parm : 
-00504  *      -  p_cn
-00505  *      - id de la fiche fiche(f_id)
-00506  * gen :
-00507  *      -
-00508  * return:
-00509  *      -
-00510  *
-00511  */ 
-00512 function ViewFicheDetail($p_cn,$p_id) {
-00513   
-00514   // Retrieve the fiche_def.fd_id of the card
-00515   $fd_id=GetFicheDef($p_cn,$p_id);
-00516 
-00517   //Update the default attribute of a card if is model has changed
-00518   $sql="insert into jnt_fic_att_value (f_id,ad_id) 
-00519         select $p_id, ad_id 
-00520               from jnt_fic_attr 
-00521         where fd_id=$fd_id and 
-00522         ad_id not in (select ad_id from jnt_fic_att_value where
-00523         f_id=$p_id)";
-00524 
-00525  $Res=ExecSql($p_cn,$sql);
-00526 
-00527  // add a empty string to attr_value
-00528  $sql="insert into attr_value select jft_id,'' from jnt_fic_att_value
-00529          where f_id=$p_id and jft_id not in (select jft_id from attr_value natural join jnt_fic_att_value where 
-00530          f_id = $p_id)"; 
-00531  $Res=ExecSql($p_cn,$sql);
-00532 
-00533   EncodeFiche ($p_cn,$p_id,1);
-00534 }
-00535 /* function UpdateFiche
-00536  ***************************************************
-00537  * Purpose : Met a jour une fiche
-00538  *          change dans le plan comptable, fiche,et isupp
-00539  *          
-00540  * parm : 
-00541  *      - p_cn
-00542  *      - p_array
-00543  * gen :
-00544  *      - none
-00545  * return:
-00546  *      - nothing
-00547  *
-00548  */ 
-00549 
-00550 function UpdateFiche($p_cn,$p_array) {
-00551 
-00552   echo_debug ('fiche_inc.php',__LINE__,"UpdateFiche");
-00553   $tva_error=false;
-00554   foreach ( $p_array as $key=> $element) {
-00555     echo_debug('fiche_inc.php',__LINE__,"UF  $key => $element");
-00556     ${"$key"}=$element;
-00557     // Get the name
-00558     if ( $key == "ad_id".ATTR_DEF_NAME ) {
-00559       $label=$element;
-00560       if (strlen(trim($label))== 0  ) 
-00561         return;
-00562     }
-00563     // Get the class base
-00564     if ( $key=="ad_id".ATTR_DEF_ACCOUNT) {
-00565       $class=$element;
-00566     }
-00567     // Get the vat and
-00568     // test the vat rate
-00569     if ( $key == 'ad_id'.ATTR_DEF_TVA ) {
-00570       // is a valid rate ?
-00571       if ( strlen(trim($element)) == 0 ) continue;
-00572       if ( CountSql($p_cn,"select * from tva_rate where tva_id='".$element."'") == 0 ) {
-00573         // warning
-00574         echo_error('invalid rate') ;
-00575         echo '<script>
-00576                 alert("Attention tva invalid remis à sa valeur par défaut ");
-00577               </script>';
-00578         $tva_error=true;
+00038 function AddFiche($p_cn,$p_type,$p_array) {
+00039   // TODO ADD ROLLBACK !!!
+00040   echo_debug('fiche_inc.php',__LINE__," AddFiche($p_cn,$p_type,$p_array) ");
+00041   // Push the array in element starting with p
+00042   //
+00043   foreach ($p_array as $key=>$element){
+00044     ${"p_$key"}=$element;
+00045     echo_debug('fiche_inc.php',__LINE__,"p_$key=$element;");
+00046   }
+00047   // First verify that the name is not null
+00048   // av_text.ATTR_DEF_NAME
+00049   if ( strlen(trim($p_av_text0 )) ==0 )
+00050     return;
+00051 
+00052   // First Get the attr of the fiche
+00053   $field=Get_attr_def($p_cn,$p_fd_id);
+00054 
+00055   $flag=1;
+00056 
+00057   // Create the Fiche
+00058   $Sql="insert into fiche (fd_id) values (".$p_fd_id.")";
+00059   $Res=ExecSql($p_cn,$Sql);
+00060 
+00061   // Get is f_id (sequence)
+00062   $l_f_id=GetSequence($p_cn,'s_fiche');
+00063 
+00064   // Should we Create accounts for each cards
+00065   $create=GetCreateAccount($p_cn,$p_fd_id);
+00066 
+00067 
+00068   // Is a account given ?
+00069   for ( $i = 0; $i < $p_inc;$i++) {
+00070     //Except for the class base
+00071     if ( ${"p_ad_id$i"} == ATTR_DEF_ACCOUNT ) {
+00072       if (strlen (trim(${"p_av_text$i"})) == 0 or
+00073           isNumber(${"p_av_text$i"}) == 0 )
+00074         {
+00075           break;
+00076         }
+00077       // if account already exist do nothing in tmp_pcmn otherwise add it
+00078       if (CountSql($p_cn,"select pcm_val from tmp_pcmn where pcm_val=".${"p_av_text$i"}) == 0 )
+00079         {
+00080           $len=strlen(${"p_av_text$i"})-1;
+00081           // Mother account
+00082           $p_parent=substr(${"p_av_text$i"},0,$len);
+00083           while (CountSql($p_cn,"select pcm_val from tmp_pcmn where pcm_val=$p_parent") == 0 and
+00084                  $len > 0 ) {
+00085             $len--;
+00086             $p_parent=substr(${"p_av_text$i"},0,$len);
+00087           }
+00088           // If no parent found
+00089           if ( $len <= 0 ) {
+00090             echo_error ("No parent found");
+00091             exit("No parent found for ".${"p_av_text$i"});
+00092 
+00093           } // if $len == 0
+00094           $lib=FormatString($p_av_text0);
+00095           $sql=sprintf("insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) 
+00096                 values (%s,'%s',%d)",
+00097                        ${"p_av_text$i"},
+00098                        $lib,
+00099                        $p_parent);
+00100 
+00101           // Add if into tmp_pcmn
+00102           $Res=ExecSql($p_cn,$Sql);
+00103         }
+00104       // Add it the jnt table
+00105       // 5 is always for the account post
+00106       $Sql=sprintf("insert into jnt_fic_att_value (f_id,ad_id) values (%d,%d)",
+00107                    $l_f_id,ATTR_DEF_ACCOUNT);
+00108       $Res=ExecSql($p_cn,$Sql);
+00109       
+00110       // Get the jft_id sequence (s_jnt_fic_att_value)
+00111       $l_jft_id=GetSequence($p_cn,'s_jnt_fic_att_value');
+00112       
+00113       
+00114       // Add it the attr_value table
+00115       $Sql=sprintf("insert into attr_value(jft_id,av_text) values (%d,'%s')",
+00116                    $l_jft_id,${"p_av_text$i"});
+00117       $Res=ExecSql($p_cn,$Sql);
+00118       // If create == 0 we don't create automatically an account
+00119       $create=0;      
+00120     }
+00121 
+00122   } // for $i...
+00123 
+00124   echo_debug ( " create = $create ");
+00125   if ( $create == 1 ) {
+00126     // We create an account for each
+00127     // Get The Class Base
+00128     $base=GetBaseFiche($p_cn,$p_type);
+00129     
+00130     // If a specific post account is needed created it
+00131     
+00132     if ( $base !=null  ) {
+00133       // if the class base is not null, create it in the tmp_pcmn
+00134       $num=GetNextFiche($p_cn,$base);
+00135 
+00136       $lib=FormatString($p_av_text0);
+00137       $sql=sprintf("insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) 
+00138                 values (%s,'%s',%d)",
+00139                    $num,
+00140                    $lib,
+00141                    $base);
+00142       echo_debug($sql);
+00143       $Res=ExecSql($p_cn,$sql);
+00144       // Add it the jnt table
+00145       // 5 is always for the account post
+00146       $Sql=sprintf("insert into jnt_fic_att_value (f_id,ad_id) values (%d,%d)",
+00147                    $l_f_id,ATTR_DEF_ACCOUNT);
+00148       $Res=ExecSql($p_cn,$Sql);
+00149       
+00150       // Get the jft_id sequence (s_jnt_fic_att_value)
+00151       $l_jft_id=GetSequence($p_cn,'s_jnt_fic_att_value');
+00152       
+00153       
+00154       // Add it the attr_value table
+00155       $Sql=sprintf("insert into attr_value(jft_id,av_text) values (%d,'%s')",
+00156                    $l_jft_id,$num);
+00157       $Res=ExecSql($p_cn,$Sql);
+00158     }
+00159   }// end create accounts for each cards
+00160 
+00161 
+00162   // Add the others attribut in jnt_fic_att_value and after in attr_value
+00163   for ( $i = 0; $i < $p_inc;$i++) {
+00164     //Except for the class base
+00165        if ( ${"p_ad_id$i"} == ATTR_DEF_ACCOUNT ) continue;
+00166 
+00167     // Special treatment for QuickCode
+00168        if ( ${"p_ad_id$i"} == ATTR_DEF_QUICKCODE ) {
+00169          $sql=sprintf("select insert_quick_code(%d,'%s')",
+00170                       $l_f_id,FormatString(${"p_av_text$i"}));
+00171          $Res=ExecSql($p_cn,$sql);
+00172          continue;
+00173        }
+00174     // Add it the jnt table
+00175     $Sql=sprintf("insert into jnt_fic_att_value (f_id,ad_id) values (%d,%d)",
+00176                  $l_f_id,${"p_ad_id$i"});
+00177     $Res=ExecSql($p_cn,$Sql);
+00178 
+00179     // Get the jft_id sequence (s_jnt_fic_att_value)
+00180     $l_jft_id=GetSequence($p_cn,'s_jnt_fic_att_value');
+00181 
+00182     // test the vat rate
+00183     if (  ${"p_ad_id$i"} == ATTR_DEF_TVA ) {
+00184       // is a rate given 
+00185       if ( strlen(trim(${"p_av_text$i"})) != 0 and 
+00186            isNumber(${"p_av_text$i"}) == 1) {
+00187         // is a valid rate ?
+00188         if ( CountSql($p_cn,"select * from tva_rate where tva_id='".${"p_av_text$i"}."'") == 0 ) {
+00189           // the rate doesn't exist
+00190           ${"p_av_text$i"}=1;
+00191           // warning
+00192           echo_error('invalid rate') ;
+00193           echo '<script>
+00194                 alert("Attention tva invalid, valeur par défaut =1 ");
+00195               </script>';
+00196           
+00197         }
+00198       }// if a rate is given
+00199     }
+00200     $text=FormatString(${"p_av_text$i"});
+00201     // Add it the attr_value table
+00202     $Sql=sprintf("insert into attr_value(jft_id,av_text) values (%d,'%s')",
+00203                  $l_jft_id,$text);
+00204     $Res=ExecSql($p_cn,$Sql);
+00205 
+00206   }
+00207 
+00208 }
+00225 function EncodeFiche($p_cn,$p_type,$p_array=null) {
+00226   echo_debug('fiche_inc.php',__LINE__,"function EncodeFiche($p_cn,$p_type) ");
+00227 
+00228   $ch_col="</TD><TD>";
+00229   $ch_li='</TR><TR>';
+00230   echo '<FORM action="fiche.php" method="post" name="fiche">';
+00231   echo '<INPUT TYPE="HIDDEN" name="fiche" value="'.$p_type.'">';
+00232   $l_sessid=$_REQUEST['PHPSESSID'];
+00233 
+00234   echo JS_SHOW_TVA;
+00235   echo JS_SEARCH_POSTE;
+00236   echo "<TABLE>";
+00237   if ($p_array == null) {
+00238     // Array is null so we display a blank form
+00239     //    echo '<H2 class="info">'.getFicheName($p_cn,$p_type).'</H2>';
+00240     echo '<H2 class="info">New </H2>';
+00241     $p_f_id="";
+00242     echo_debug('fiche_inc.php',__LINE__,"Array is null");
+00243     // Find all the attribute of the existing cards
+00244     // --> Get_attr_def 
+00245     $sql="select frd_id,ad_id,ad_text from  fiche_def join jnt_fic_attr using (fd_id)
+00246            join attr_def using (ad_id) where fd_id=".$p_type." order by ad_id";
+00247 
+00248     $Res=ExecSql($p_cn,$sql);
+00249     $Max=pg_NumRows($Res);
+00250     // Put the card modele id (fiche_def.fd_id)
+00251     echo '<INPUT TYPE="HIDDEN" name="fd_id" value="'.$p_type.'">';
+00252     for ($i=0;$i < $Max;$i++) {
+00253       $l_line=pg_fetch_array($Res,$i);
+00254 
+00255       // The number of the attribute
+00256       $Hid=sprintf('<INPUT TYPE="HIDDEN" name="ad_id%d" value="%s">',
+00257                    $i,$l_line['ad_id']);
+00258 
+00259       $but_search_poste="";
+00260       // Javascript for searching the account
+00261       if ( $l_line ['ad_id'] == ATTR_DEF_ACCOUNT ) {
+00262         $ctl_name="av_text$i";
+00263         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$l_sessid.'\',\''.$ctl_name.'\')">';
+00264       } 
+00265       // Javascript for showing the tva
+00266       if ( $l_line ['ad_id'] == ATTR_DEF_TVA ) {
+00267         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Montre" OnClick="ShowTva(\''.$l_sessid.'\', \'av_text'.$i.'\')">';
+00268       }
+00269       // content of the attribute
+00270       printf ('<TR><TD> %s </TD><TD><INPUT TYPE="TEXT" NAME="av_text%d">%s %s</TD></TR>',
+00271               $l_line['ad_text'], $i,$Hid,$but_search_poste);
+00272    }
+00273     echo '</TR>';
+00274     echo '</TABLE>';
+00275     echo '<INPUT TYPE="HIDDEN" name="inc" value="'.$Max.'">';
+00276     echo '<INPUT TYPE="SUBMIT" name="add_fiche" value="ajoute">';
+00277     echo '</FORM>';
+00278   }else {
+00279     // Array is not null so we have to find the card's data from the database
+00280     // and display them
+00281 
+00282     // Display the card name
+00283     $label=getFicheNameById($p_cn,$p_type);
+00284     echo '<H2 class="info">'.$label.'</H2>';
+00285 
+00286     // Find all the data related to the card
+00287     $sql="select av_text,ad_id,ad_text,jft_id from attr_value
+00288         natural join attr_def 
+00289         natural join jnt_fic_att_value 
+00290         natural join fiche where f_id=$p_type order by ad_id";
+00291 
+00292     $Res=ExecSql($p_cn,$sql);
+00293     $Max=pg_NumRows($Res);
+00294     echo_debug('fiche_inc.php',__LINE__,"Max ==== $Max");    
+00295 
+00296     echo '<INPUT TYPE="HIDDEN" name="f_id" value="'.$p_type.'">';
+00297     echo '<INPUT TYPE="HIDDEN" name="f_label" value="'.$label.'">';
+00298     echo '<INPUT TYPE="HIDDEN" name="max" value="'.$Max.'">';
+00299 
+00300     for ($i=0;$i < $Max;$i++) {
+00301       // fetch the data
+00302       $l_line=pg_fetch_array($Res,$i);
+00303 
+00304       // Put also the class in a special variable
+00305       // useful when we want to update the PCMN
+00306 
+00307       $but_search_poste="";
+00308       if ( $l_line['ad_id'] == ATTR_DEF_ACCOUNT ) {
+00309         printf('<INPUT TYPE="HIDDEN" name="class" value="%s">',
+00310                $l_line['av_text']);
+00311       // Javascript for searching the account
+00312         $ctl_name="av_text$i";
+00313         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$l_sessid.'\',\''.$ctl_name.'\')">';
+00314       } 
+00315         
+00316       // Javascript for showing the tva
+00317       if ( $l_line ['ad_id'] == ATTR_DEF_TVA ) {
+00318         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Montre" OnClick="ShowTva(\''.$l_sessid.'\',\'av_text'.$i.'\')">';
+00319       }
+00320       
+00321       // hide ad_id
+00322       $ad=sprintf('<input type="hidden" name="ad_id%d" value="%s">',
+00323                   $l_line['ad_id'],$l_line['av_text']);
+00324       
+00325       // in hidden we put the jft_id
+00326       $Hid=sprintf('<INPUT TYPE="HIDDEN" name="jft_id%d" value="%s">',
+00327                    $i,$l_line['jft_id']);
+00328       printf ('<TR><TD> %s </TD><TD><INPUT TYPE="TEXT" NAME="av_text%d" VALUE="%s">%s %s %s</TD></TR>',
+00329               $l_line['ad_text'], $i, $l_line['av_text'],$Hid,$but_search_poste,$ad);
+00330       
+00331     }
+00332     echo '</TR>';
+00333     echo '</TABLE>';
+00334     echo '<INPUT TYPE="SUBMIT" name="update_fiche" value="Mis à jour">';
+00335     echo '</FORM>';
+00336   }
+00337 }
+00338 
+00352 function GetBaseFiche($p_cn,$p_type) {
+00353   $base=null;
+00354   $Res=ExecSql($p_cn,"select fd_class_base from fiche_def where fd_id=".$p_type);
+00355   if ( pg_NumRows($Res) == 0 ) return null;
+00356   $base=pg_fetch_array($Res,0);
+00357   return $base['fd_class_base'];
+00358 }
+00359 
+00374 function GetBaseFicheDefault($p_cn,$p_type) {
+00375   $base=null;
+00376   $Res=ExecSql($p_cn,"select frd_class_base from fiche_def_ref where frd_id=".$p_type);
+00377   if ( pg_NumRows($Res) == 0 ) return null;
+00378   $base=pg_fetch_array($Res,0);
+00379   return $base['frd_class_base'];
+00380 }
+00394 function ViewFiche($p_cn,$p_type) {
+00395   require_once("user_common.php");
+00396   echo '<H2 class="info">'.getFicheDefName($p_cn,$p_type).'</H2>';
+00397 
+00398    $step=$_SESSION['g_pagesize'];
+00399    $sql_limit="";
+00400    $sql_offset="";
+00401    if ( $step != -1 ) {
+00402      $page=(isset($_GET['page']))?$_GET['page']:1;
+00403      $offset=(isset($_GET['offset']))?$_GET['offset']:0;
+00404      $max_line=CountSql($p_cn,"select f_id,av_text  from 
+00405                           fiche join jnt_fic_att_value using (f_id) 
+00406                                 join attr_value using (jft_id)
+00407                        where fd_id='".$p_type."' and ad_id=".ATTR_DEF_NAME." order by f_id");
+00408      $sql_limit=" limit ".$step;
+00409      $sql_offset=" offset ".$offset;
+00410      $bar=jrn_navigation_bar($offset,$max_line,$step,$page);
+00411    }
+00412    
+00413   // Get all name the cards of the select category
+00414   // 1 for attr_def.ad_id is always the name
+00415     $Res=ExecSql($p_cn,"select f_id,av_text,j_qcode  from 
+00416                           fiche join jnt_fic_att_value using (f_id) 
+00417                                 join attr_value using (jft_id)
+00418                                 left outer join vw_poste_qcode using(f_id)
+00419                        where fd_id='".$p_type.
+00420                        "' and ad_id=".ATTR_DEF_NAME." order by f_id $sql_offset $sql_limit ");
+00421     $Max=pg_NumRows($Res);
+00422     echo $bar;
+00423 
+00424     for ( $i = 0; $i < $Max; $i++) {
+00425       $l_line=pg_fetch_array($Res,$i);
+00426       $div="<DIV>";
+00427       $span_mod='<span class="mtitle"><A class="mtitle2" href="fiche.php?action=detail&fiche_id='.$l_line['f_id'].'"> Modifie</A></SPAN>';
+00428       $span_del='<span class="mtitle2" ALIGN="left">'.
+00429         '<A class="mtitle2" href="fiche.php?f_fd_id='.$p_type.'&action=delete&fiche_id='.$l_line['f_id'].
+00430         '"> delete</A></SPAN>';
+00431       $span_id='<SPAN style="background-color:lightgrey;">'.$l_line['j_qcode']."</SPAN>";
+00432       if ( $i %2 == 0 ) 
+00433         $div='<DIV style="background-color:#DDE6FF;">';
+00434         echo $div.$span_del.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.
+00435           $span_mod."&nbsp;"."&nbsp;"."&nbsp;".$span_id."&nbsp;"."&nbsp;"."&nbsp;".$l_line['av_text']."</DIV>";
+00436     }
+00437     echo '<FORM METHOD="POST" action="fiche.php">';
+00438     echo '<INPUT TYPE="HIDDEN" name="fiche" value="'.$p_type.'">';
+00439     echo '<INPUT TYPE="SUBMIT" name="add" Value="Ajout fiche">';
+00440     echo '</FORM>';
+00441     echo $bar;
+00442 
+00443 }
+00458 function GetNextFiche($p_cn,$p_base) {
+00459   $Res=ExecSql($p_cn,"select max(pcm_val) as maxcode from tmp_pcmn where pcm_val_parent = $p_base");
+00460  $Max=pg_NumRows($Res);
+00461  echo_debug('fiche_inc.php',__LINE__,"$Max=pg_NumRows");
+00462   $l_line=pg_fetch_array($Res,0);
+00463   $ret=$l_line['maxcode'];
+00464  if ( $ret == "" ) {
+00465    $ret=sprintf("%d%04d",$p_base,0);
+00466    return $ret+1;
+00467 
+00468  }
+00469 
+00470   echo_debug('fiche_inc.php',__LINE__,"ret $ret");
+00471   return $ret+1;
+00472 }
+00488 function ViewFicheDetail($p_cn,$p_id) {
+00489   
+00490   // Retrieve the fiche_def.fd_id of the card
+00491   $fd_id=GetFicheDef($p_cn,$p_id);
+00492 
+00493   //Update the default attribute of a card if is model has changed
+00494   $sql="insert into jnt_fic_att_value (f_id,ad_id) 
+00495         select $p_id, ad_id 
+00496               from jnt_fic_attr 
+00497         where fd_id=$fd_id and 
+00498         ad_id not in (select ad_id from jnt_fic_att_value where
+00499         f_id=$p_id)";
+00500 
+00501  $Res=ExecSql($p_cn,$sql);
+00502 
+00503  // add a empty string to attr_value
+00504  $sql="insert into attr_value select jft_id,'' from jnt_fic_att_value
+00505          where f_id=$p_id and jft_id not in (select jft_id from attr_value natural join jnt_fic_att_value where 
+00506          f_id = $p_id)"; 
+00507  $Res=ExecSql($p_cn,$sql);
+00508 
+00509   EncodeFiche ($p_cn,$p_id,1);
+00510 }
+00526 function UpdateFiche($p_cn,$p_array) {
+00527 
+00528   echo_debug ('fiche_inc.php',__LINE__,"UpdateFiche");
+00529   $tva_error=false;
+00530   foreach ( $p_array as $key=> $element) {
+00531     echo_debug('fiche_inc.php',__LINE__,"UF  $key => $element");
+00532     ${"$key"}=$element;
+00533     // Get the name
+00534     if ( $key == "ad_id".ATTR_DEF_NAME ) {
+00535       $label=$element;
+00536       if (strlen(trim($label))== 0  ) 
+00537         return;
+00538     }
+00539     // Get the class base
+00540     if ( $key=="ad_id".ATTR_DEF_ACCOUNT) {
+00541       $class=$element;
+00542     }
+00543     // Get the vat and
+00544     // test the vat rate
+00545     if ( $key == 'ad_id'.ATTR_DEF_TVA ) {
+00546       // is a valid rate ?
+00547       if ( strlen(trim($element)) == 0 ) continue;
+00548       if ( CountSql($p_cn,"select * from tva_rate where tva_id='".$element."'") == 0 ) {
+00549         // warning
+00550         echo_error('invalid rate') ;
+00551         echo '<script>
+00552                 alert("Attention tva invalid remis à sa valeur par défaut ");
+00553               </script>';
+00554         $tva_error=true;
+00555       }
+00556     }
+00557   }
+00558   // If each card has it own account must also update the tmp_pcm table
+00559   //
+00560   $fd_ref=GetFicheDefRef($p_cn,$fiche);
+00561   // Update all the others data
+00562   for ( $i =0 ; $i < $max ; $i++) {
+00563     // Format text
+00564     $text=FormatString( ${"av_text$i"});
+00565     // Check if we don't try to update a QUICK CODE
+00566     $Res=ExecSql($p_cn,"select ad_id from jnt_fic_att_value where jft_id=".${"jft_id$i"});
+00567     $a=pg_fetch_array($Res,0);
+00568     if ( $a['ad_id'] != ATTR_DEF_QUICKCODE) 
+00569       {
+00570         $sql=sprintf("update attr_value set av_text='%s' where jft_id=%d",
+00571                      $text,
+00572                      ${"jft_id$i"});
+00573       }
+00574     else
+00575       {
+00576         $sql=sprintf("select update_quick_code(%d,'%s')",
+00577                      ${"jft_id$i"},
+00578                      $text);
 00579       }
-00580     }
-00581   }
-00582   // If each card has it own account must also update the tmp_pcm table
-00583   //
-00584   $fd_ref=GetFicheDefRef($p_cn,$fiche);
-00585   // Update all the others data
-00586   for ( $i =0 ; $i < $max ; $i++) {
-00587     // Format text
-00588     $text=FormatString( ${"av_text$i"});
-00589     // Check if we don't try to update a QUICK CODE
-00590     $Res=ExecSql($p_cn,"select ad_id from jnt_fic_att_value where jft_id=".${"jft_id$i"});
-00591     $a=pg_fetch_array($Res,0);
-00592     if ( $a['ad_id'] != ATTR_DEF_QUICKCODE) 
-00593       {
-00594         $sql=sprintf("update attr_value set av_text='%s' where jft_id=%d",
-00595                      $text,
-00596                      ${"jft_id$i"});
-00597       }
-00598     else
-00599       {
-00600         $sql=sprintf("select update_quick_code(%d,'%s')",
-00601                      ${"jft_id$i"},
-00602                      $text);
-00603       }
-00604     // Execute SQL
-00605     $Res=ExecSql($p_cn,$sql);
-00606   }
-00607     // Update tva to his default value
-00608   if ( $tva_error == true ) { 
-00609     $sql="update attr_value set av_text=1 where jft_id = ( select jft_id from jnt_fic_att_value 
-00610                     natural join fiche natural join attr_def 
-00611                  where ad_id=".ATTR_DEF_TVA." and f_id=$fiche)";
-00612     $Res=ExecSql($p_cn,$sql);
-00613   } 
-00614 
-00615   // Update the PCMN if needed
-00616   $sql="select av_text from attr_value natural join jnt_fic_att_value
-00617         where f_id=$fiche and ad_id=".ATTR_DEF_ACCOUNT;
-00618   $Res=ExecSql($p_cn,$sql);
-00619 
-00620   if ( pg_NumRows($Res) != 0 ) {
-00621     // it means that a account exists
-00622     // Retrieve the name and the ad_id 5
-00623     $f=pg_fetch_array($Res,0);
-00624     $class_old=$f['av_text'];
-00625 
-00626     // if the class changed
-00627     if ( $class != $class_old and $class != "" ) {
-00628       if ( CountSql($p_cn,"select * from jrnx where j_poste=$class") or 
-00629            CountSql($p_cn,"select * from jrnx where j_poste=$class_old" ))
-00630       {
-00631         // No change if the account is already used 
-00632         echo_error("Not possible to change the account, already used");
-00633       } else {
-00634         if ( CountSql($p_cn,"select * from tmp_pcmn where pcm_val=".$class) ==0)
-00635           // we have to insert 
-00636           {
-00637             // First we must use a parent
-00638             $parent=GetParent($p_cn,$class);
-00639             $Res=ExecSql($p_cn,
-00640                          "insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) 
-00641                          values ($class,'$f_label',$parent)");
-00642           }
-00643       }
-00644         $class=$class_old;
-00645     } else // $class=""
-00646       {
-00647 
-00648         echo_debug('fiche_inc.php',__LINE__,"new account ");
-00649         $class=$class_old;
-00650         if ( CountSql($p_cn,"select * from tmp_pcmn where pcm_val=".$class) == 0 ) {
-00651           // First we must use a parent
-00652           $parent=GetParent($p_cn,$class);
-00653           $Res=ExecSql($p_cn,
-00654                        "insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) 
-00655                          values ($class,'$f_label',$parent)");
-00656         }
-00657       }
-00658     
-00659 
-00660     // Change the name in TMP_PCMN
-00661     // Get the new name
-00662     $f_label=FormatString($f_label);
-00663     ExecSql($p_cn,"update tmp_pcmn set pcm_lib='".$f_label."' where pcm_val=".$class);
-00664 
-00665 
-00666   }
-00667   // Update of TMP_PCMN if a class base is given (ad_id=5)
-00668 
-00669 
-00670 
-00671 }
-00672 /* function EncodeModele
-00673  ***************************************************
-00674  * Purpose :
-00675  * 
-00676  * parm : 
-00677  *      - 
-00678  * gen :
-00679  *      -
-00680  * return:
-00681  *      -
-00682  *
-00683  */ 
-00684 function EncodeModele($p_js)
-00685 {
-00686   echo '<H2 CLASS="info"> Ajout d\'un modèle</H2>';
-00687   echo '<FORM ACTION="fiche.php" METHOD="post">';
-00688   echo '<BR>Libellé <INPUT TYPE="TEXT" NAME="nom_mod">';
-00689   echo '<BR>Classe de base <INPUT TYPE="TEXT" NAME="class_base">';
-00690   echo $p_js;
-00691   echo '<INPUT TYPE="HIDDEN" NAME="inc" VALUE="1">';
-00692   echo '<BR><INPUT TYPE="SUBMIT" name="record_model" VALUE="Ajoute modèle">';
-00693   echo '</FORM>';
-00694 }
-00695 /* function DefModele
-00696  ***************************************************
-00697  * Purpose : Creation of a model of card or correction
-00698  * 
-00699  * parm : 
-00700  *      - $p_cn  database connection 
-00701  *      - $p_ligne number of lines
-00702  *      - $p_array  array
-00703  *      - $p_js class base (javascript code)
-00704  * gen :
-00705  *      - none
-00706  * return:
-00707  *      - nothing
-00708  *
-00709  */ 
-00710 function DefModele ($p_cn,$p_js,$p_array=null,$p_ligne=1) 
-00711 {
-00712   echo_debug('fiche_inc.php',__LINE__,"DefModele ($p_array,$p_ligne=1) ");
-00713 
-00714   // Creating form
-00715   $display='<FORM ACTION="fiche.php" METHOD="POST">';
-00716 
-00717   // Number of line of the card
-00718   $display.='<INPUT TYPE="HIDDEN" NAME="INC" VALUE="'.$p_ligne.'">';
-00719 
-00720   // Table of input
-00721   $display.='<TABLE BORDER="0" CELLSPACING="0">';
-00722   
-00723   
-00724   //Name of the CARD (fiche_def.fd_label)
-00725   $display.='<TR><TD> Catégorie de fiche </TD>';
-00726   $display.='<TD><INPUT TYPE="INPUT" NAME="nom_mod">';
-00727   $display.='</TD></TR>';
-00728 
-00729   // Class base fiche_def.fd_class_base (optional)
-00730   $display.='<TR><TD> Classe de base </TD>';
-00731   $display.='<TD><INPUT TYPE="INPUT" NAME="class_base"> '.$p_js;
-00732   $display.='</TD></TR>';
-00733   // Checkbox for the creation of a post
-00734   $display.='<TR><TD> <INPUT TYPE="CHECKBOX" NAME="create"  UNCHECKED>Create accounts for each</TD></TR>';
-00735 
-00736   //display the different template
-00737   $ref=Get_fiche_def_ref($p_cn);
+00580     // Execute SQL
+00581     $Res=ExecSql($p_cn,$sql);
+00582   }
+00583     // Update tva to his default value
+00584   if ( $tva_error == true ) { 
+00585     $sql="update attr_value set av_text=1 where jft_id = ( select jft_id from jnt_fic_att_value 
+00586                     natural join fiche natural join attr_def 
+00587                  where ad_id=".ATTR_DEF_TVA." and f_id=$fiche)";
+00588     $Res=ExecSql($p_cn,$sql);
+00589   } 
+00590 
+00591   // Update the PCMN if needed
+00592   $sql="select av_text from attr_value natural join jnt_fic_att_value
+00593         where f_id=$fiche and ad_id=".ATTR_DEF_ACCOUNT;
+00594   $Res=ExecSql($p_cn,$sql);
+00595 
+00596   if ( pg_NumRows($Res) != 0 ) {
+00597     // it means that a account exists
+00598     // Retrieve the name and the ad_id 5
+00599     $f=pg_fetch_array($Res,0);
+00600     $class_old=$f['av_text'];
+00601 
+00602     // if the class changed
+00603     if ( $class != $class_old and $class != "" ) {
+00604       if ( CountSql($p_cn,"select * from jrnx where j_poste=$class") or 
+00605            CountSql($p_cn,"select * from jrnx where j_poste=$class_old" ))
+00606       {
+00607         // No change if the account is already used 
+00608         echo_error("Not possible to change the account, already used");
+00609       } else {
+00610         if ( CountSql($p_cn,"select * from tmp_pcmn where pcm_val=".$class) ==0)
+00611           // we have to insert 
+00612           {
+00613             // First we must use a parent
+00614             $parent=GetParent($p_cn,$class);
+00615             $Res=ExecSql($p_cn,
+00616                          "insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) 
+00617                          values ($class,'$f_label',$parent)");
+00618           }
+00619       }
+00620         $class=$class_old;
+00621     } else // $class=""
+00622       {
+00623 
+00624         echo_debug('fiche_inc.php',__LINE__,"new account ");
+00625         $class=$class_old;
+00626         if ( CountSql($p_cn,"select * from tmp_pcmn where pcm_val=".$class) == 0 ) {
+00627           // First we must use a parent
+00628           $parent=GetParent($p_cn,$class);
+00629           $Res=ExecSql($p_cn,
+00630                        "insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) 
+00631                          values ($class,'$f_label',$parent)");
+00632         }
+00633       }
+00634     
+00635 
+00636     // Change the name in TMP_PCMN
+00637     // Get the new name
+00638     $f_label=FormatString($f_label);
+00639     ExecSql($p_cn,"update tmp_pcmn set pcm_lib='".$f_label."' where pcm_val=".$class);
+00640 
+00641 
+00642   }
+00643   // Update of TMP_PCMN if a class base is given (ad_id=5)
+00644 
+00645 
+00646 
+00647 }
+00660 function EncodeModele($p_js)
+00661 {
+00662   echo '<H2 CLASS="info"> Ajout d\'un modèle</H2>';
+00663   echo '<FORM ACTION="fiche.php" METHOD="post">';
+00664   echo '<BR>Libellé <INPUT TYPE="TEXT" NAME="nom_mod">';
+00665   echo '<BR>Classe de base <INPUT TYPE="TEXT" NAME="class_base">';
+00666   echo $p_js;
+00667   echo '<INPUT TYPE="HIDDEN" NAME="inc" VALUE="1">';
+00668   echo '<BR><INPUT TYPE="SUBMIT" name="record_model" VALUE="Ajoute modèle">';
+00669   echo '</FORM>';
+00670 }
+00686 function DefModele ($p_cn,$p_js,$p_array=null,$p_ligne=1) 
+00687 {
+00688   echo_debug('fiche_inc.php',__LINE__,"DefModele ($p_array,$p_ligne=1) ");
+00689 
+00690   // Creating form
+00691   $display='<FORM ACTION="fiche.php" METHOD="POST">';
+00692 
+00693   // Number of line of the card
+00694   $display.='<INPUT TYPE="HIDDEN" NAME="INC" VALUE="'.$p_ligne.'">';
+00695 
+00696   // Table of input
+00697   $display.='<TABLE BORDER="0" CELLSPACING="0">';
+00698   
+00699   
+00700   //Name of the CARD (fiche_def.fd_label)
+00701   $display.='<TR><TD> Catégorie de fiche </TD>';
+00702   $display.='<TD><INPUT TYPE="INPUT" NAME="nom_mod">';
+00703   $display.='</TD></TR>';
+00704 
+00705   // Class base fiche_def.fd_class_base (optional)
+00706   $display.='<TR><TD> Classe de base </TD>';
+00707   $display.='<TD><INPUT TYPE="INPUT" NAME="class_base"> '.$p_js;
+00708   $display.='</TD></TR>';
+00709   // Checkbox for the creation of a post
+00710   $display.='<TR><TD> <INPUT TYPE="CHECKBOX" NAME="create"  UNCHECKED>Create accounts for each</TD></TR>';
+00711 
+00712   //display the different template
+00713   $ref=Get_fiche_def_ref($p_cn);
+00714 
+00715   // check if $ref is an array 
+00716   // and display the choice
+00717 
+00718   // select by default the first choice
+00719   $check="CHECKED";
+00720   if ( sizeof($ref)  ) {
+00721     foreach ($ref as $i=>$v) {
+00722       $display.='<TR><TD COLSPAN="2">';
+00723 
+00724       $display.='<INPUT TYPE="RADIO" NAME="FICHE_REF" VALUE="'.$v['id'].'"'.$check.'>';
+00725       $display.=$v['text'];
+00726       // if a class base exist in fiche_def_ref, we display it
+00727       if ( sizeof ($v['class']) != 0 ) 
+00728            $display.="&nbsp;&nbsp<I>Class base = ".$v['class']."</I>";
+00729       $display.="</TD></TR>";
+00730       $check="";
+00731     }
+00732  
+00733   }
+00734   // closing the form
+00735   $display.='</TABLE>';
+00736   $display.='<INPUT TYPE="SUBMIT" NAME="add_modele" VALUE="Sauve">';
+00737   $display.='</FORM>';
 00738 
-00739   // check if $ref is an array 
-00740   // and display the choice
+00739   // display it
+00740   echo $display;
 00741 
-00742   // select by default the first choice
-00743   $check="CHECKED";
-00744   if ( sizeof($ref)  ) {
-00745     foreach ($ref as $i=>$v) {
-00746       $display.='<TR><TD COLSPAN="2">';
-00747 
-00748       $display.='<INPUT TYPE="RADIO" NAME="FICHE_REF" VALUE="'.$v['id'].'"'.$check.'>';
-00749       $display.=$v['text'];
-00750       // if a class base exist in fiche_def_ref, we display it
-00751       if ( sizeof ($v['class']) != 0 ) 
-00752            $display.="&nbsp;&nbsp<I>Class base = ".$v['class']."</I>";
-00753       $display.="</TD></TR>";
-00754       $check="";
-00755     }
-00756  
-00757   }
-00758   // closing the form
-00759   $display.='</TABLE>';
-00760   $display.='<INPUT TYPE="SUBMIT" NAME="add_modele" VALUE="Sauve">';
-00761   $display.='</FORM>';
-00762 
-00763   // display it
-00764   echo $display;
-00765 
-00766 }
-00767 /* function AddModele
-00768  ***************************************************
-00769  * Purpose : Add a modele of card into the database
-00770  *           
-00771  * parm : 
-00772  *      - connection
-00773  *      - array
-00774  * gen :
-00775  *      - none
-00776  * table : insert into fiche_def
-00777  *         insert into attr_def
-00778  * return:
-00779  *      - none
-00780  *
-00781  */ 
-00782 function AddModele($p_cn,$p_array) {
-00783   echo_debug('fiche_inc.php',__LINE__,"AddModele");
-00784   // Show what we receive for debug purpose only
-00785   //
-00786   foreach ( $p_array as $key=>$element ) {
-00787     echo_debug('fiche_inc.php',__LINE__,"p_$key $element");
-00788     ${"p_$key"}=$element;
-00789   }
-00790   // Format correctly the name of the cat. of card
-00791   $p_nom_mod=FormatString($p_nom_mod);
-00792   echo_debug('fiche_inc.php',__LINE__,"Adding $p_nom_mod");
-00793    // Format the p_class_base 
-00794   // must be an integer
-00795   if ( isNumber($p_class_base) == 0 && FormatString($p_class_base) != null ) {
-00796     echo_error ('p_class_base is NOT a number');
-00797   }
-00798   if ( strlen(trim($p_nom_mod)) == 0 ) 
-00799     return;
-00800 
-00801   // $p_FICHE_REF cannot be null !!! (== fiche_def_ref.frd_id
-00802   if (! isset ($p_FICHE_REF) or strlen($p_FICHE_REF) == 0 ) {
-00803     echo_error ("AddModele : fiche_ref MUST NOT be null or empty");
-00804     return;
-00805   }
-00806   // build the sql request for fiche_def
-00807   // and insert into fiche_def
-00808   // if p_class_base is null get the default class base from
-00809   // fiche_def_ref
-00810   if ( FormatString($p_class_base) == null )
-00811     { // p_class is null
-00812       // So we take the default one
-00813       $p_class_base=GetBaseFicheDefault($p_cn,$p_FICHE_REF);
-00814     }
-00815   // Set the value of fiche_def.fd_create_account
-00816   if ( isset($p_create)) 
-00817     $p_create='true';
-00818   else
-00819     $p_create='false';
-00820 
-00821   // Class is valid ?
-00822   if ( FormatString($p_class_base) != null) {
-00823 
-00824     // p_class is a valid number
-00825     $sql=sprintf("insert into fiche_def(fd_label,fd_class_base,frd_id,fd_create_account) 
-00826                 values ('%s',%s,%d,'%s')",
-00827                  $p_nom_mod,$p_class_base,$p_FICHE_REF,$p_create);
-00828     $Res=ExecSql($p_cn,$sql);
-00829 
-00830     // p_class must be added to tmp_pcmn 
-00831     $sql=sprintf("select account_add(%d,'%s')",
-00832                  $p_class_base,$p_nom_mod);
+00742 }
+00758 function AddModele($p_cn,$p_array) {
+00759   echo_debug('fiche_inc.php',__LINE__,"AddModele");
+00760   // Show what we receive for debug purpose only
+00761   //
+00762   foreach ( $p_array as $key=>$element ) {
+00763     echo_debug('fiche_inc.php',__LINE__,"p_$key $element");
+00764     ${"p_$key"}=$element;
+00765   }
+00766   // Format correctly the name of the cat. of card
+00767   $p_nom_mod=FormatString($p_nom_mod);
+00768   echo_debug('fiche_inc.php',__LINE__,"Adding $p_nom_mod");
+00769    // Format the p_class_base 
+00770   // must be an integer
+00771   if ( isNumber($p_class_base) == 0 && FormatString($p_class_base) != null ) {
+00772     echo_error ('p_class_base is NOT a number');
+00773   }
+00774   if ( strlen(trim($p_nom_mod)) == 0 ) 
+00775     return;
+00776 
+00777   // $p_FICHE_REF cannot be null !!! (== fiche_def_ref.frd_id
+00778   if (! isset ($p_FICHE_REF) or strlen($p_FICHE_REF) == 0 ) {
+00779     echo_error ("AddModele : fiche_ref MUST NOT be null or empty");
+00780     return;
+00781   }
+00782   // build the sql request for fiche_def
+00783   // and insert into fiche_def
+00784   // if p_class_base is null get the default class base from
+00785   // fiche_def_ref
+00786   if ( FormatString($p_class_base) == null )
+00787     { // p_class is null
+00788       // So we take the default one
+00789       $p_class_base=GetBaseFicheDefault($p_cn,$p_FICHE_REF);
+00790     }
+00791   // Set the value of fiche_def.fd_create_account
+00792   if ( isset($p_create)) 
+00793     $p_create='true';
+00794   else
+00795     $p_create='false';
+00796 
+00797   // Class is valid ?
+00798   if ( FormatString($p_class_base) != null) {
+00799 
+00800     // p_class is a valid number
+00801     $sql=sprintf("insert into fiche_def(fd_label,fd_class_base,frd_id,fd_create_account) 
+00802                 values ('%s',%s,%d,'%s')",
+00803                  $p_nom_mod,$p_class_base,$p_FICHE_REF,$p_create);
+00804     $Res=ExecSql($p_cn,$sql);
+00805 
+00806     // p_class must be added to tmp_pcmn 
+00807     $sql=sprintf("select account_add(%d,'%s')",
+00808                  $p_class_base,$p_nom_mod);
+00809 
+00810     $Res=ExecSql($p_cn,$sql);
+00811 
+00812     // Get the fd_id
+00813     $fd_id=GetSequence($p_cn,'s_fdef');
+00814 
+00815     // Add the class_base if needed
+00816 
+00817     if ( $p_create=='true' ) {
+00818       $sql=sprintf("insert into jnt_fic_attr(fd_id,ad_id) 
+00819                      values (%d,%d)",$fd_id,ATTR_DEF_ACCOUNT);
+00820       $Res=ExecSql($p_cn,$sql);
+00821     }
+00822   } else {
+00823     //There is no class base not even as default
+00824     $sql=sprintf("insert into fiche_def(fd_label,frd_id,fd_create_account) values ('%s',%d,'%s')",
+00825                  $p_nom_mod,$p_FICHE_REF,$p_create);
+00826 
+00827   $Res=ExecSql($p_cn,$sql);
+00828 
+00829   // Get the fd_id
+00830   $fd_id=GetSequence($p_cn,'s_fdef');
+00831 
+00832   }
 00833 
-00834     $Res=ExecSql($p_cn,$sql);
-00835 
-00836     // Get the fd_id
-00837     $fd_id=GetSequence($p_cn,'s_fdef');
-00838 
-00839     // Add the class_base if needed
-00840 
-00841     if ( $p_create=='true' ) {
-00842       $sql=sprintf("insert into jnt_fic_attr(fd_id,ad_id) 
-00843                      values (%d,%d)",$fd_id,ATTR_DEF_ACCOUNT);
-00844       $Res=ExecSql($p_cn,$sql);
-00845     }
-00846   } else {
-00847     //There is no class base not even as default
-00848     $sql=sprintf("insert into fiche_def(fd_label,frd_id,fd_create_account) values ('%s',%d,'%s')",
-00849                  $p_nom_mod,$p_FICHE_REF,$p_create);
-00850 
-00851   $Res=ExecSql($p_cn,$sql);
-00852 
-00853   // Get the fd_id
-00854   $fd_id=GetSequence($p_cn,'s_fdef');
-00855 
-00856   }
-00857 
-00858   // Get the default attr_def from attr_min
-00859   $def_attr=Get_attr_min($p_cn,$p_FICHE_REF);
-00860 
-00861    //if defaut attr not null 
-00862   // build the sql insert for the table attr_def
-00863   if (sizeof($def_attr) != 0 ) {
-00864     // insert all the mandatory fields into jnt_fiche_attr
-00865     foreach ( $def_attr as $i=>$v) {
-00866       $sql=sprintf("insert into jnt_fic_Attr(fd_id,ad_id)
-00867                    values (%d,%s)",
-00868                    $fd_id,$v['ad_id']);
-00869       ExecSql($p_cn,$sql);
-00870     }
-00871   }
-00872   
-00873   
-00874 }
-00875 /* function UpdateModele
-00876  ***************************************************
-00877  * Purpose : Modify the model of card
-00878  *           change some attribute (fd_label) and permit
-00879  *           to add line
-00880  * 
-00881  * parm : 
-00882  *      - p_cn connexion
-00883  *      - p_fiche fichedef(f_id)
-00884  * gen :
-00885  *      - none
-00886  * return:
-00887  *      - none
-00888  *
-00889  */ 
-00890 function UpdateModele($p_cn,$p_fiche) {
-00891 
-00892   $array=GetDataModele($p_cn,$p_fiche);
-00893   if ($array==null) {
-00894     echo_error ("fiche_inc:UpdateModele Fiche non trouvée");
-00895     return;
-00896   }
-00897   echo '<H2 class="info">'.getFicheDefName($p_cn,$p_fiche).'</H2>';
-00898   foreach ( $array as $key=>$element) echo_debug('fiche_inc.php',__LINE__,"$key => $element");
-00899   DisplayDetailModele($p_cn,$array,$array['ligne']);
-00900 
-00901 }
-00902 /* function GetDataModele
-00903  ***************************************************
-00904  * Purpose : Return the info of an fiche identified by
-00905  *           p_fiche
-00906  * 
-00907  * parm : 
-00908  *      - connection
-00909  *      - fiche id
-00910  * gen :
-00911  *      - none
-00912  * return:
-00913  *      - array with all the data
-00914  *
-00915  */ 
-00916 function GetDataModele($p_cn,$p_fiche) {
-00917   $Res=ExecSql($p_cn,"select fd_class_base,ad_id,ad_text from 
-00918                           fiche_def
-00919                           natural join jnt_fic_attr
-00920                           natural join attr_def
-00921                           where
-00922                           fd_id=$p_fiche");
-00923   $Max=pg_NumRows($Res) ;
-00924   if ($Max==0) return null;
-00925 
-00926   // store the data in an array
-00927   for ($i=0; $i < $Max;$i++) {
-00928     $line=pg_fetch_array($Res,$i);
-00929     if ($i == 0 ) {
-00930       $array['label']=GetFicheDefName($p_cn,$p_fiche);
-00931       $array['class_base']=$line['fd_class_base'];
-00932       $array['fd_id']=$p_fiche;
-00933     }//if $i == 0
-00934 
-00935     //Label
-00936     $text=sprintf("ad_id%d",$i);
-00937     $array[$text]=$line['ad_id'];
-00938     //isd_id
-00939     $text=sprintf("ad_text%d",$i);
-00940     $array[$text]=$line['ad_text'];
-00941 
-00942   }//for
-00943   $array['ligne']=$Max;
-00944   return $array;
-00945 }
-00946 /* function Remove
-00947  ***************************************************
-00948  * Purpose : enleve une fiche dans attr_value, jnt_fic_att_value  et fiche
-00949  *           a la condition que ce poste n'aie jamais
-00950  *           été utilisé
-00951  * parm : 
-00952  *      - p_cn
-00953  *      - p_fid fiche(f_id)
-00954  * gen :
-00955  *      - none
-00956  * return:
-00957  *      - none
-00958  */
-00959 function Remove ($p_cn, $p_fid) {
-00960   if ( ! isset ($p_cn) ||
-00961        ! isset ($p_fid) ) {
-00962     echo_error ("Remove Missing Parameter p_cn = $p_cn p_fid=$p_fid");
-00963     return;
-00964   }
-00965   // if the card has its own account in PCMN
-00966   // Get the fiche_def.fd_id from fiche.f_id
-00967   $fd_id=GetFicheDef($p_cn,$p_fid);
-00968   if ( GetCreateAccount($p_cn,$fd_id) == 1 ) {
-00969     // Retrieve the class 
-00970     $class=GetClass($p_cn,$p_fid);
-00971 
-00972     // if class is not NULL and if we use it before, we can't remove it
-00973     if (FormatString($class) != null && 
-00974            CountSql($p_cn,"select * from jrnx where j_poste=$class") != 0 ) {
-00975       echo "<SCRIPT> alert('Impossible ce poste est utilisé dans un journal'); </SCRIPT>";
-00976       return;
-00977     } else {
-00978       // Remove in PCMN
-00979       if ( trim(strlen($class)) != 0 and isNumber($class) == 1)
-00980            ExecSql($p_cn,"delete from tmp_pcmn where pcm_val=".$class);
-00981     }
-00982 
-00983   }
-00984   // Remove from attr_value
-00985   $Res=ExecSql($p_cn,"delete from attr_value 
-00986                         where jft_id in (select jft_id 
-00987                                           from jnt_fic_att_value 
-00988                                                 natural join fiche where f_id=$p_fid)");
-00989   // Remove from jnt_fic_att_value
-00990   $Res=ExecSql($p_cn,"delete from jnt_fic_att_value where f_id=$p_fid");
-00991   
-00992   // Remove from fiche
-00993   $Res=ExecSql($p_cn,"delete from fiche where f_id=$p_fid");
-00994     
-00995 }
-00996 /* function getFicheName
-00997  ***************************************************
-00998  * Purpose : retourne le nom de la fiche
-00999  *           en fournissant le quick_code
-01000  *        
-01001  * parm : 
-01002  *      - p_cn connexion
-01003  *      - p_id quick_code
-01004  * gen :
-01005  *      - none
-01006  * return:
-01007  *     - string avec nom fiche
-01008  */
-01009 function getFicheName($p_cn,$p_id) {
-01010   // Retrieve the attribute with the ad_id 1
-01011   // 1 is always the name
-01012 
-01013   $Res=ExecSql($p_cn,"select vw_name from 
-01014                         vw_fiche_attr where quick_code='$p_id'");
-01015   if ( pg_NumRows($Res) == 0 ) return "Unknown";
-01016   $st=pg_fetch_array($Res,0);
-01017   return $st['vw_name'];
-01018 }
-01019 /* function getFicheNameById
-01020  ***************************************************
-01021  * Purpose : retourne le nom de la fiche en fournissant le f_id
-01022  *        
-01023  * parm : 
-01024  *      - p_cn connexion
-01025  *      - p_id quick_code
-01026  * gen :
-01027  *      - none
-01028  * return:
-01029  *     - string avec nom fiche
-01030  */
-01031 function getFicheNameById($p_cn,$p_id) {
-01032   // Retrieve the attribute with the ad_id 1
-01033   // 1 is always the name
-01034    $Res=ExecSql($p_cn,"select av_text from
-01035                      attr_value
-01036                      natural join jnt_fic_att_value
-01037                      natural join fiche
-01038                      where
-01039                      f_id=$p_id and
-01040                      ad_id=".ATTR_DEF_NAME);
+00834   // Get the default attr_def from attr_min
+00835   $def_attr=Get_attr_min($p_cn,$p_FICHE_REF);
+00836 
+00837    //if defaut attr not null 
+00838   // build the sql insert for the table attr_def
+00839   if (sizeof($def_attr) != 0 ) {
+00840     // insert all the mandatory fields into jnt_fiche_attr
+00841     foreach ( $def_attr as $i=>$v) {
+00842       $sql=sprintf("insert into jnt_fic_Attr(fd_id,ad_id)
+00843                    values (%d,%s)",
+00844                    $fd_id,$v['ad_id']);
+00845       ExecSql($p_cn,$sql);
+00846     }
+00847   }
+00848   
+00849   
+00850 }
+00866 function UpdateModele($p_cn,$p_fiche) {
+00867 
+00868   $array=GetDataModele($p_cn,$p_fiche);
+00869   if ($array==null) {
+00870     echo_error ("fiche_inc:UpdateModele Fiche non trouvée");
+00871     return;
+00872   }
+00873   echo '<H2 class="info">'.getFicheDefName($p_cn,$p_fiche).'</H2>';
+00874   foreach ( $array as $key=>$element) echo_debug('fiche_inc.php',__LINE__,"$key => $element");
+00875   DisplayDetailModele($p_cn,$array,$array['ligne']);
+00876 
+00877 }
+00892 function GetDataModele($p_cn,$p_fiche) {
+00893   $Res=ExecSql($p_cn,"select fd_class_base,ad_id,ad_text from 
+00894                           fiche_def
+00895                           natural join jnt_fic_attr
+00896                           natural join attr_def
+00897                           where
+00898                           fd_id=$p_fiche");
+00899   $Max=pg_NumRows($Res) ;
+00900   if ($Max==0) return null;
+00901 
+00902   // store the data in an array
+00903   for ($i=0; $i < $Max;$i++) {
+00904     $line=pg_fetch_array($Res,$i);
+00905     if ($i == 0 ) {
+00906       $array['label']=GetFicheDefName($p_cn,$p_fiche);
+00907       $array['class_base']=$line['fd_class_base'];
+00908       $array['fd_id']=$p_fiche;
+00909     }//if $i == 0
+00910 
+00911     //Label
+00912     $text=sprintf("ad_id%d",$i);
+00913     $array[$text]=$line['ad_id'];
+00914     //isd_id
+00915     $text=sprintf("ad_text%d",$i);
+00916     $array[$text]=$line['ad_text'];
+00917 
+00918   }//for
+00919   $array['ligne']=$Max;
+00920   return $array;
+00921 }
+00935 function Remove ($p_cn, $p_fid) {
+00936   if ( ! isset ($p_cn) ||
+00937        ! isset ($p_fid) ) {
+00938     echo_error ("Remove Missing Parameter p_cn = $p_cn p_fid=$p_fid");
+00939     return;
+00940   }
+00941   // if the card has its own account in PCMN
+00942   // Get the fiche_def.fd_id from fiche.f_id
+00943   $fd_id=GetFicheDef($p_cn,$p_fid);
+00944   if ( GetCreateAccount($p_cn,$fd_id) == 1 ) {
+00945     // Retrieve the class 
+00946     $class=GetClass($p_cn,$p_fid);
+00947 
+00948     // if class is not NULL and if we use it before, we can't remove it
+00949     if (FormatString($class) != null && 
+00950            CountSql($p_cn,"select * from jrnx where j_poste=$class") != 0 ) {
+00951       echo "<SCRIPT> alert('Impossible ce poste est utilisé dans un journal'); </SCRIPT>";
+00952       return;
+00953     } else {
+00954       // Remove in PCMN
+00955       if ( trim(strlen($class)) != 0 and isNumber($class) == 1)
+00956            ExecSql($p_cn,"delete from tmp_pcmn where pcm_val=".$class);
+00957     }
+00958 
+00959   }
+00960   // Remove from attr_value
+00961   $Res=ExecSql($p_cn,"delete from attr_value 
+00962                         where jft_id in (select jft_id 
+00963                                           from jnt_fic_att_value 
+00964                                                 natural join fiche where f_id=$p_fid)");
+00965   // Remove from jnt_fic_att_value
+00966   $Res=ExecSql($p_cn,"delete from jnt_fic_att_value where f_id=$p_fid");
+00967   
+00968   // Remove from fiche
+00969   $Res=ExecSql($p_cn,"delete from fiche where f_id=$p_fid");
+00970     
+00971 }
+00985 function getFicheName($p_cn,$p_id) {
+00986   // Retrieve the attribute with the ad_id 1
+00987   // 1 is always the name
+00988 
+00989   $Res=ExecSql($p_cn,"select vw_name from 
+00990                         vw_fiche_attr where quick_code='$p_id'");
+00991   if ( pg_NumRows($Res) == 0 ) return "Unknown";
+00992   $st=pg_fetch_array($Res,0);
+00993   return $st['vw_name'];
+00994 }
+01007 function getFicheNameById($p_cn,$p_id) {
+01008   // Retrieve the attribute with the ad_id 1
+01009   // 1 is always the name
+01010    $Res=ExecSql($p_cn,"select av_text from
+01011                      attr_value
+01012                      natural join jnt_fic_att_value
+01013                      natural join fiche
+01014                      where
+01015                      f_id=$p_id and
+01016                      ad_id=".ATTR_DEF_NAME);
+01017 
+01018   if ( pg_NumRows($Res) == 0 ) return "Unknown";
+01019   $st=pg_fetch_array($Res,0);
+01020   return $st['av_text'];
+01021 }
+01022 
+01035 function getFicheDefName($p_cn,$p_id) {
+01036   $Res=ExecSql($p_cn,"select fd_label from fiche_def where fd_id=$p_id");
+01037   if ( pg_NumRows($Res) == 0 ) return "Unknown";
+01038   $st=pg_fetch_array($Res,0);
+01039   return $st['fd_label'];
+01040 }
 01041 
-01042   if ( pg_NumRows($Res) == 0 ) return "Unknown";
-01043   $st=pg_fetch_array($Res,0);
-01044   return $st['av_text'];
-01045 }
-01046 
-01047 /* function getFicheDefName
-01048  ***************************************************
-01049  * Purpose : retourne le nom de la cat. de  fiches
-01050  *        
-01051  * parm : 
-01052  *      - p_cn connexion
-01053  *      - p_id fiche id fiche_def.fd_id
-01054  * gen :
-01055  *      - none
-01056  * return:
-01057  *     - string fiche_def.fd_label
-01058  */
-01059 function getFicheDefName($p_cn,$p_id) {
-01060   $Res=ExecSql($p_cn,"select fd_label from fiche_def where fd_id=$p_id");
-01061   if ( pg_NumRows($Res) == 0 ) return "Unknown";
-01062   $st=pg_fetch_array($Res,0);
-01063   return $st['fd_label'];
-01064 }
-01065 
-01066 /* function GetFicheJrn
-01067  ***************************************************
-01068  * Purpose : Get all the fiche related to a "journal"
-01069  *        
-01070  * parm : 
-01071  *      - p_cn connextion
-01072  *      - j_jrn journal_id
-01073  *      - $p_type : deb or cred
-01074  * gen :
-01075  *      - none
-01076  * return: array containing the fiche(f_id),fiche(f_label)
-01077  */
-01078 function GetFicheJrn($p_cn,$p_jrn,$p_type)
-01079 {
-01080   $get="";
-01081   if ( $p_type == 'deb' ) {
-01082     $get='jrn_def_fiche_deb';
-01083   }
-01084   if ( $p_type == 'cred' ) {
-01085     $get='jrn_def_fiche_cred';
-01086   }
-01087   if ( $get == "" ) {
-01088     echo_error("Invalid p_type function GetFicheJrn($p_cn,$p_jrn,$p_type)");
-01089     exit -1;
-01090   }
-01091   $Res=ExecSql($p_cn,"select $get as fiche from jrn_def where jrn_def_id=$p_jrn");
-01092   $Max=pg_NumRows($Res);
-01093   if ( $Max==0) {
-01094     echo_warning("No rows");
-01095     return null;
-01096   }
-01097   // Normally Max must be == 1
-01098   $list=pg_fetch_array($Res,0);
-01099   if ( $list['fiche']=="") {
-01100     echo_warning("No fiche");
-01101     return null;
-01102   }
-01103   
-01104  $sql="select f_id,av_text as f_label 
-01105         from fiche natural join jnt_fic_att_value
-01106         natural join attr_def
-01107         natural join attr_value
-01108         natural join fiche_def
-01109         where ad_id=1 and
-01110            fd_id in (".$list['fiche'].")  order by f_label";
-01111 
-01112   $Res=ExecSql($p_cn,$sql);
-01113   $Max=pg_NumRows($Res);
-01114   if ($Max==0 ) return null;
-01115   // Get The result and put it into an array
-01116   for ($i=0;$i<$Max;$i++) {
-01117     $line=pg_fetch_array($Res,$i);
-01118     $f_id=$line['f_id'];
-01119     $f_label=$line['f_label'];
-01120     $a[$i]=array($f_id,$f_label);
-01121   }
-01122   return $a;
-01123 }
-01124 /* function Get_fiche_def_ref
-01125  ***************************************************
-01126  * Purpose : 
-01127  *        return an array containing all the
-01128  *        data contained in the table fiche_def_ref
-01129  * parm : 
-01130  *      - $p_cn  connection to the database
-01131  * gen :
-01132  *      - none
-01133  * return:
-01134  *       array if ok null otherwize
-01135  */
-01136 function Get_fiche_def_ref($p_cn)
-01137 {
-01138   // get all the data from fiche_def_ref
-01139   $Res=ExecSql($p_cn, "select frd_id,frd_text,frd_class_base 
-01140                           from fiche_def_ref
-01141                        order by frd_text");
-01142 
-01143   // check if the result is valid
-01144   $Max=pg_NumRows($Res);
-01145   if ( $Max == 0) return null;
-01146 
-01147   // store the result in a array
-01148   for ($i=0;$i<$Max;$i++) {
-01149     $f=pg_fetch_array($Res,$i);
-01150     $array[$i]['id']=$f['frd_id'];
-01151     $array[$i]['text']=$f['frd_text'];
-01152     $array[$i]['class']=$f['frd_class_base'];
-01153   }
+01054 function GetFicheJrn($p_cn,$p_jrn,$p_type)
+01055 {
+01056   $get="";
+01057   if ( $p_type == 'deb' ) {
+01058     $get='jrn_def_fiche_deb';
+01059   }
+01060   if ( $p_type == 'cred' ) {
+01061     $get='jrn_def_fiche_cred';
+01062   }
+01063   if ( $get == "" ) {
+01064     echo_error("Invalid p_type function GetFicheJrn($p_cn,$p_jrn,$p_type)");
+01065     exit -1;
+01066   }
+01067   $Res=ExecSql($p_cn,"select $get as fiche from jrn_def where jrn_def_id=$p_jrn");
+01068   $Max=pg_NumRows($Res);
+01069   if ( $Max==0) {
+01070     echo_warning("No rows");
+01071     return null;
+01072   }
+01073   // Normally Max must be == 1
+01074   $list=pg_fetch_array($Res,0);
+01075   if ( $list['fiche']=="") {
+01076     echo_warning("No fiche");
+01077     return null;
+01078   }
+01079   
+01080  $sql="select f_id,av_text as f_label 
+01081         from fiche natural join jnt_fic_att_value
+01082         natural join attr_def
+01083         natural join attr_value
+01084         natural join fiche_def
+01085         where ad_id=1 and
+01086            fd_id in (".$list['fiche'].")  order by f_label";
+01087 
+01088   $Res=ExecSql($p_cn,$sql);
+01089   $Max=pg_NumRows($Res);
+01090   if ($Max==0 ) return null;
+01091   // Get The result and put it into an array
+01092   for ($i=0;$i<$Max;$i++) {
+01093     $line=pg_fetch_array($Res,$i);
+01094     $f_id=$line['f_id'];
+01095     $f_label=$line['f_label'];
+01096     $a[$i]=array($f_id,$f_label);
+01097   }
+01098   return $a;
+01099 }
+01112 function Get_fiche_def_ref($p_cn)
+01113 {
+01114   // get all the data from fiche_def_ref
+01115   $Res=ExecSql($p_cn, "select frd_id,frd_text,frd_class_base 
+01116                           from fiche_def_ref
+01117                        order by frd_text");
+01118 
+01119   // check if the result is valid
+01120   $Max=pg_NumRows($Res);
+01121   if ( $Max == 0) return null;
+01122 
+01123   // store the result in a array
+01124   for ($i=0;$i<$Max;$i++) {
+01125     $f=pg_fetch_array($Res,$i);
+01126     $array[$i]['id']=$f['frd_id'];
+01127     $array[$i]['text']=$f['frd_text'];
+01128     $array[$i]['class']=$f['frd_class_base'];
+01129   }
+01130 
+01131   // return result
+01132   return $array;
+01133 }
+01146 function Get_attr_min($p_cn,$p_fiche_def_ref) {
+01147   // find the min attr for the fiche_def_ref
+01148   $Sql="select ad_id,ad_text from attr_min natural join attr_def 
+01149          natural join fiche_def_ref
+01150       where
+01151       frd_id= $p_fiche_def_ref";
+01152   $Res=ExecSql($p_cn,$Sql);
+01153   $Num=pg_NumRows($Res);
 01154 
-01155   // return result
-01156   return $array;
-01157 }
-01158 /* function Get_attr_min
-01159  ***************************************************
-01160  * Purpose : retrieve the mandatory field of the card model
-01161  *        
-01162  * parm : 
-01163  *      - $p_cn  database connexion
-01164  *      - $p_fiche_def_ref 
-01165  * gen :
-01166  *      -
-01167  * return:
-01168  *      array of ad_id  (attr_min.ad_id) and  labels (attr_def.ad_text)
-01169  */
-01170 function Get_attr_min($p_cn,$p_fiche_def_ref) {
-01171   // find the min attr for the fiche_def_ref
-01172   $Sql="select ad_id,ad_text from attr_min natural join attr_def 
-01173          natural join fiche_def_ref
-01174       where
-01175       frd_id= $p_fiche_def_ref";
-01176   $Res=ExecSql($p_cn,$Sql);
-01177   $Num=pg_NumRows($Res);
-01178 
-01179   // test the number of returned rows
-01180   if ($Num == 0 ) return null;
-01181 
-01182   // Get Results & Store them in a array
-01183   for ($i=0;$i<$Num;$i++) {
-01184     $f=pg_fetch_array($Res,$i);
-01185     $array[$i]['ad_id']=$f['ad_id'];
-01186     $array[$i]['ad_text']=$f['ad_text'];
-01187   }
-01188   return $array;
-01189 }
-01190 /* function Get_attr_def
-01191  ***************************************************
-01192  * Purpose : retrieve the  fields of the card model
-01193  *        
-01194  * parm : 
-01195  *      - $p_cn  database connexion
-01196  *      - $p_fiche_def_ref fiche_def.fd_id
-01197  * gen :
-01198  *      -
-01199  * return:
-01200  *      array of ad_id  (attr_def.ad_id) and  labels (attr_def.ad_text)
-01201  */
-01202 function Get_attr_def($p_cn,$p_fiche_def) {
-01203   // find the min attr for the fiche_def_ref
-01204   $Sql="select ad_id,ad_text from attr_def 
-01205          natural join jnt_fic_attr
-01206          natural join fiche_def
-01207       where
-01208       fd_id= $p_fiche_def order by ad_id";
-01209   $Res=ExecSql($p_cn,$Sql);
-01210   $Num=pg_NumRows($Res);
-01211 
-01212   // test the number of returned rows
-01213   if ($Num == 0 ) return null;
-01214 
-01215   // Get Results & Store them in a array
-01216   for ($i=0;$i<$Num;$i++) {
-01217     $f=pg_fetch_array($Res,$i);
-01218     $array[$i]['ad_id']=$f['ad_id'];
-01219     $array[$i]['ad_text']=$f['ad_text'];
-01220   }
-01221   return $array;
-01222 }
-01223 /* function GetCreateAccount
-01224  ***************************************************
-01225  * Purpose : retrieve the  fields of the card model
-01226  *        which indicate if each cards needs its own account
-01227  * parm : 
-01228  *      - $p_cn  database connexion
-01229  *      - $p_fiche_def_ref fiche_def.fd_id
-01230  * gen :
-01231  *      -
-01232  * return:
-01233  *      not null if yes, each cards has its own account
-01234  */
-01235 function GetCreateAccount($p_cn,$p_fiche_def) {
-01236   // find the min attr for the fiche_def_ref
-01237   $Sql="select fd_create_account
-01238       from fiche_def
-01239         where
-01240       fd_id= $p_fiche_def";
-01241   $Res=ExecSql($p_cn,$Sql);
-01242   $Num=pg_NumRows($Res);
-01243 
-01244   // test the number of returned rows
-01245   if ($Num == 0 ) return 0;
-01246 
-01247 
-01248   for ($i=0;$i<$Num;$i++) {
-01249     $f=pg_fetch_array($Res,$i);
-01250     echo_debug ("fd_create_account == ".$f['fd_create_account']);
-01251     if ( $f['fd_create_account']=='t') {
-01252       echo_debug('fiche_inc.php',__LINE__,"fd_create_account return 1");
-01253       return 1;
-01254     }
-01255   }
-01256   echo_debug('fiche_inc.php',__LINE__,"fd_create_account return 0");
-01257   return 0;
-01258 }
-01259 /* function GetFicheDefRef
-01260  ***************************************************
-01261  * Purpose : retrieve the fiche_def.frd_id thanks the f_id 
-01262  *           of a card
-01263  *        
-01264  * parm : 
-01265  *      - $p_cn connection
-01266  *      - $p_f_id  fiche.f_id
-01267  * gen :
-01268  *      - none
-01269  * return:
-01270  *     - the fiche_def.frd_id or null if nothing has been found
-01271  */
-01272 function GetFicheDefRef($p_cn,$p_f_id)
-01273 {
-01274   // Sql stmt
-01275   $sql="select frd_id from fiche_def join fiche using (fd_id) 
-01276       where f_id=$p_f_id";
-01277   // Execute it
-01278   $Res=ExecSql($p_cn,$sql);
-01279 
-01280   // nothing is found
-01281   if ( pg_NumRows($Res) == 0 ) return null;
-01282 
-01283   // Fetch the data
-01284   $f=pg_fetch_array($Res,0);
-01285 
-01286   // return the value
-01287   return $f['frd_id'];
-01288 
-01289 }
-01290 /* function GetFicheRef
-01291  ***************************************************
-01292  * Purpose : retrieve the fiche_def.fd_id thanks the f_id 
-01293  *           of a card
-01294  *        
-01295  * parm : 
-01296  *      - $p_cn connection
-01297  *      - $p_f_id  fiche.f_id
-01298  * gen :
-01299  *      - none
-01300  * return:
-01301  *     - the fiche_def.fd_id or null if nothing has been found
-01302  */
-01303 function GetFicheDef($p_cn,$p_f_id)
-01304 {
-01305   // Sql stmt
-01306   $sql="select fd_id from fiche_def join fiche using (fd_id) 
-01307       where f_id=$p_f_id";
-01308   // Execute it
-01309   $Res=ExecSql($p_cn,$sql);
-01310 
-01311   // nothing is found
-01312   if ( pg_NumRows($Res) == 0 ) return null;
-01313 
-01314   // Fetch the data
-01315   $f=pg_fetch_array($Res,0);
-01316 
-01317   // return the value
-01318   return $f['fd_id'];
-01319 
-01320 }
-01321 
-01322 /* function  GetClass
-01323  ***************************************************
-01324  * Purpose : Retrieve the account of a card
-01325  *        
-01326  * parm : 
-01327  *      - connection 
-01328  *      - card id (fiche.f_id)
-01329  * gen :
-01330  *      - none
-01331  * return: 
-01332  *      string if a class if found or null otherwise
-01333  */
-01334 function GetClass($p_cn,$p_fid) {
-01335   echo_debug('fiche_inc.php',__LINE__,"GetClass($p_fid)");
-01336   
-01337   // the account class is in the av_text with the ad_id=5 in 
-01338   // attr_Def
-01339   $sql="select av_text from attr_value 
-01340                      natural join jnt_fic_att_value
-01341                       natural join attr_def 
-01342                     where
-01343                       ad_id=".ATTR_DEF_ACCOUNT." and f_id=$p_fid";
-01344   // Exec
-01345   $Res=ExecSql($p_cn,$sql);
-01346   if (pg_NumRows($Res) == 0 ) return null;
-01347 
-01348   // Fetch the data and return it
-01349   $f=pg_fetch_array($Res,0);
-01350   return $f['av_text'];
-01351 }
-01352 /* function InsertModeleLine
-01353  **************************************************
-01354  * Purpose : Insert a new row into jnt_fic_attr
-01355  *        for adding a new attribute to the card model
-01356  * parm : 
-01357  *      - p_cn   connection
-01358  *      - the fiche_def.fd_id, id of the cat of the model
-01359  *      - the ad_id is the attr_def.ad_id
-01360  * gen :
-01361  *      - none
-01362  * return: none
-01363  */
-01364 function InsertModeleLine($p_cn,$p_fid,$p_adid) 
-01365 {
-01366   // Insert a new attribute for the model
-01367   // it means insert a row in jnt_fic_attr
-01368   $sql=sprintf("insert into jnt_fic_attr (fd_id,ad_id) values (%d,%d)", 
-01369                $p_fid,$p_adid);
-01370   $Res=ExecSql($p_cn,$sql);
-01371                        
-01372 }
-01373 /* function SaveModeleName
-01374  **************************************************
-01375  * Purpose : Update the model's name
-01376  *
-01377  * parm : 
-01378  *      - p_cn   connection
-01379  *      - the fiche_def.fd_id, id of the cat of the model
-01380  *      - the label
-01381  * gen :
-01382  *      - none
-01383  * return: none
-01384  */
-01385 function SaveModeleName($p_cn,$p_fid,$p_label) 
-01386 {
-01387   // Insert a new attribute for the model
-01388   // it means insert a row in jnt_fic_attr
-01389   $sql=sprintf("update   fiche_def set fd_label='%s' where 
-01390                   fd_id=%d", 
-01391                $p_label,$p_fid);
-01392   $Res=ExecSql($p_cn,$sql);
-01393                        
-01394 }
-01395 
-01396 /* function DisplayDetailModele
-01397  **************************************************
-01398  * Purpose : Show the data contained in an array of
-01399  *           a model of card (fiche_def)
-01400  *        
-01401  * parm : 
-01402  *      - p_cn database connection
-01403  *      - array containing 
-01404  *                 label,class_base,fd_id,ad_textX,ad_idX
-01405  *      - number of line
-01406  * gen :
-01407  *      - none
-01408  * return:
-01409  *      none
-01410  */
-01411 function DisplayDetailModele($p_cn,$p_array,$MaxLine)
-01412 {
-01413   echo_debug('fiche_inc.php',__LINE__,"DisplayDetailModele");
+01155   // test the number of returned rows
+01156   if ($Num == 0 ) return null;
+01157 
+01158   // Get Results & Store them in a array
+01159   for ($i=0;$i<$Num;$i++) {
+01160     $f=pg_fetch_array($Res,$i);
+01161     $array[$i]['ad_id']=$f['ad_id'];
+01162     $array[$i]['ad_text']=$f['ad_text'];
+01163   }
+01164   return $array;
+01165 }
+01178 function Get_attr_def($p_cn,$p_fiche_def) {
+01179   // find the min attr for the fiche_def_ref
+01180   $Sql="select ad_id,ad_text from attr_def 
+01181          natural join jnt_fic_attr
+01182          natural join fiche_def
+01183       where
+01184       fd_id= $p_fiche_def order by ad_id";
+01185   $Res=ExecSql($p_cn,$Sql);
+01186   $Num=pg_NumRows($Res);
+01187 
+01188   // test the number of returned rows
+01189   if ($Num == 0 ) return null;
+01190 
+01191   // Get Results & Store them in a array
+01192   for ($i=0;$i<$Num;$i++) {
+01193     $f=pg_fetch_array($Res,$i);
+01194     $array[$i]['ad_id']=$f['ad_id'];
+01195     $array[$i]['ad_text']=$f['ad_text'];
+01196   }
+01197   return $array;
+01198 }
+01211 function GetCreateAccount($p_cn,$p_fiche_def) {
+01212   // find the min attr for the fiche_def_ref
+01213   $Sql="select fd_create_account
+01214       from fiche_def
+01215         where
+01216       fd_id= $p_fiche_def";
+01217   $Res=ExecSql($p_cn,$Sql);
+01218   $Num=pg_NumRows($Res);
+01219 
+01220   // test the number of returned rows
+01221   if ($Num == 0 ) return 0;
+01222 
+01223 
+01224   for ($i=0;$i<$Num;$i++) {
+01225     $f=pg_fetch_array($Res,$i);
+01226     echo_debug ("fd_create_account == ".$f['fd_create_account']);
+01227     if ( $f['fd_create_account']=='t') {
+01228       echo_debug('fiche_inc.php',__LINE__,"fd_create_account return 1");
+01229       return 1;
+01230     }
+01231   }
+01232   echo_debug('fiche_inc.php',__LINE__,"fd_create_account return 0");
+01233   return 0;
+01234 }
+01248 function GetFicheDefRef($p_cn,$p_f_id)
+01249 {
+01250   // Sql stmt
+01251   $sql="select frd_id from fiche_def join fiche using (fd_id) 
+01252       where f_id=$p_f_id";
+01253   // Execute it
+01254   $Res=ExecSql($p_cn,$sql);
+01255 
+01256   // nothing is found
+01257   if ( pg_NumRows($Res) == 0 ) return null;
+01258 
+01259   // Fetch the data
+01260   $f=pg_fetch_array($Res,0);
+01261 
+01262   // return the value
+01263   return $f['frd_id'];
+01264 
+01265 }
+01279 function GetFicheDef($p_cn,$p_f_id)
+01280 {
+01281   // Sql stmt
+01282   $sql="select fd_id from fiche_def join fiche using (fd_id) 
+01283       where f_id=$p_f_id";
+01284   // Execute it
+01285   $Res=ExecSql($p_cn,$sql);
+01286 
+01287   // nothing is found
+01288   if ( pg_NumRows($Res) == 0 ) return null;
+01289 
+01290   // Fetch the data
+01291   $f=pg_fetch_array($Res,0);
+01292 
+01293   // return the value
+01294   return $f['fd_id'];
+01295 
+01296 }
+01297 
+01310 function GetClass($p_cn,$p_fid) {
+01311   echo_debug('fiche_inc.php',__LINE__,"GetClass($p_fid)");
+01312   
+01313   // the account class is in the av_text with the ad_id=5 in 
+01314   // attr_Def
+01315   $sql="select av_text from attr_value 
+01316                      natural join jnt_fic_att_value
+01317                       natural join attr_def 
+01318                     where
+01319                       ad_id=".ATTR_DEF_ACCOUNT." and f_id=$p_fid";
+01320   // Exec
+01321   $Res=ExecSql($p_cn,$sql);
+01322   if (pg_NumRows($Res) == 0 ) return null;
+01323 
+01324   // Fetch the data and return it
+01325   $f=pg_fetch_array($Res,0);
+01326   return $f['av_text'];
+01327 }
+01340 function InsertModeleLine($p_cn,$p_fid,$p_adid) 
+01341 {
+01342   // Insert a new attribute for the model
+01343   // it means insert a row in jnt_fic_attr
+01344   $sql=sprintf("insert into jnt_fic_attr (fd_id,ad_id) values (%d,%d)", 
+01345                $p_fid,$p_adid);
+01346   $Res=ExecSql($p_cn,$sql);
+01347                        
+01348 }
+01361 function SaveModeleName($p_cn,$p_fid,$p_label) 
+01362 {
+01363   // Insert a new attribute for the model
+01364   // it means insert a row in jnt_fic_attr
+01365   $sql=sprintf("update   fiche_def set fd_label='%s' where 
+01366                   fd_id=%d", 
+01367                $p_label,$p_fid);
+01368   $Res=ExecSql($p_cn,$sql);
+01369                        
+01370 }
+01371 
+01387 function DisplayDetailModele($p_cn,$p_array,$MaxLine)
+01388 {
+01389   echo_debug('fiche_inc.php',__LINE__,"DisplayDetailModele");
+01390 
+01391   foreach ($p_array as $v=>$i) { 
+01392     echo_debug('fiche_inc.php',__LINE__,"v == $v i==$i");
+01393     ${"$v"}=$i;
+01394   }
+01395   echo '<FORM action="fiche.php" method="get">';
+01396   echo '<INPUT TYPE="HIDDEN" NAME="fd_id" VALUE="'.$fd_id.'">';
+01397 
+01398   printf("<TABLE>");
+01399   // Display each attribute
+01400   for ($i=0;$i<$MaxLine;$i++) {
+01401     echo '<TR><td>';
+01402     // Can change the name
+01403     if ( ${"ad_id$i"} == ATTR_DEF_NAME ) {
+01404       printf('Label</TD><TD><INPUT TYPE="TEXT" NAME="label" VALUE="%s">',
+01405              $label);
+01406       printf('</td><TD><input type="submit" NAME="change_name" value="Change Nom">');
+01407     } else {
+01408       // The attr.
+01409       printf('%s ',
+01410              ${"ad_text$i"});
+01411     }
+01412     echo '</td></tr>';
+01413   }
 01414 
-01415   foreach ($p_array as $v=>$i) { 
-01416     echo_debug('fiche_inc.php',__LINE__,"v == $v i==$i");
-01417     ${"$v"}=$i;
-01418   }
-01419   echo '<FORM action="fiche.php" method="get">';
-01420   echo '<INPUT TYPE="HIDDEN" NAME="fd_id" VALUE="'.$fd_id.'">';
+01415   // Show the possible attribute which are not already attribute of the model
+01416   // of card
+01417   $Res=ExecSql($p_cn,"select ad_id,ad_text from attr_def 
+01418                        where ad_id not in (select ad_id from fiche_def natural join jnt_fic_attr
+01419                            where fd_id=$fd_id)");
+01420   $M=pg_NumRows($Res);
 01421 
-01422   printf("<TABLE>");
-01423   // Display each attribute
-01424   for ($i=0;$i<$MaxLine;$i++) {
-01425     echo '<TR><td>';
-01426     // Can change the name
-01427     if ( ${"ad_id$i"} == ATTR_DEF_NAME ) {
-01428       printf('Label</TD><TD><INPUT TYPE="TEXT" NAME="label" VALUE="%s">',
-01429              $label);
-01430       printf('</td><TD><input type="submit" NAME="change_name" value="Change Nom">');
-01431     } else {
-01432       // The attr.
-01433       printf('%s ',
-01434              ${"ad_text$i"});
-01435     }
-01436     echo '</td></tr>';
-01437   }
-01438 
-01439   // Show the possible attribute which are not already attribute of the model
-01440   // of card
-01441   $Res=ExecSql($p_cn,"select ad_id,ad_text from attr_def 
-01442                        where ad_id not in (select ad_id from fiche_def natural join jnt_fic_attr
-01443                            where fd_id=$fd_id)");
-01444   $M=pg_NumRows($Res);
-01445 
-01446   // Show the unused attribute
-01447   echo '<TR> <TD>';
-01448   echo '<SELECT NAME="ad_id">';
-01449   for ($i=0;$i<$M;$i++) {
-01450     $l=pg_fetch_array($Res,$i);
-01451     printf('<OPTION VALUE="%s"> %s',
-01452            $l['ad_id'],$l['ad_text']);
-01453   }
-01454   echo '</SELECT>';
-01455   echo '</TD><TD> <INPUT TYPE="SUBMIT" Value="Add that line" NAME="add_ligne"></TD></TR>';
-01456   printf("</TABLE>");
-01457   echo '</FORM>';
-01458 }
-01459 /* function GetParent
-01460  **************************************************
-01461  * Purpose : Get the parent in tmp_pcmn
-01462  *        
-01463  * parm : 
-01464  *      - cn database connextion
-01465  *      - the base we want insert
-01466  * gen :
-01467  *      -
-01468  * return: the parent
-01469  *
-01470  */
-01471 function GetParent($p_cn,$p_val) 
-01472 {
-01473   $len=strlen($p_val)-1;
-01474   for ($i=$len-1;$i>0;$i--) {
-01475     $a=substr($p_val,0,$i);
-01476     echo_debug ("parent == $a len =1");
-01477     if (CountSql($p_cn,"select pcm_val from tmp_pcmn where pcm_val=$a") == 1)
-01478       return $a;
-01479   }
-01480 }
-01481 /* function getFicheAttribut
-01482  ***************************************************
-01483  * Purpose : retrun array of attribut or string
-01484  *        
-01485  * parm : 
-01486  *      - p_cn connexion
-01487  *      - p_id quick_code
-01488  *      - attribut if attribut == "" then return a array
-01489  *        taken from vw_fiche_attr
-01490  * gen :
-01491  *      - none
-01492  * return:
-01493  *     - string avec nom fiche or array 
-01494  */
-01495 function getFicheAttribut($p_cn,$p_id,$p_attr="") {
-01496   // Retrieve the attribute with the ad_id 1
-01497   // 1 is always the name
-01498 
-01499   if ( $p_attr != "") {
-01500     $Res=ExecSql($p_cn,"select av_text from 
-01501                     attr_value
-01502                     natural join jnt_fic_att_value 
-01503                     natural join fiche 
-01504                     where
-01505                     ad_id=$p_attr 
-01506                     and f_id=(select f_id from vw_poste_qcode where j_qcode='$p_id') ");
-01507     if ( pg_NumRows($Res) == 0 ) return NULL;
-01508     $st=pg_fetch_array($Res,0);
-01509     return $st['av_text'];
-01510   } else {
-01511     // Get attribut from the view
-01512     $Res=ExecSql($p_cn,"select * from vw_fiche_attr where quick_code='$p_id'");
-01513     if ( pg_NumRows($Res) == 0 ) return null;
-01514     $st=pg_fetch_array($Res,0);
-01515     return $st;
+01422   // Show the unused attribute
+01423   echo '<TR> <TD>';
+01424   echo '<SELECT NAME="ad_id">';
+01425   for ($i=0;$i<$M;$i++) {
+01426     $l=pg_fetch_array($Res,$i);
+01427     printf('<OPTION VALUE="%s"> %s',
+01428            $l['ad_id'],$l['ad_text']);
+01429   }
+01430   echo '</SELECT>';
+01431   echo '</TD><TD> <INPUT TYPE="SUBMIT" Value="Add that line" NAME="add_ligne"></TD></TR>';
+01432   printf("</TABLE>");
+01433   echo '</FORM>';
+01434 }
+01447 function GetParent($p_cn,$p_val) 
+01448 {
+01449   $len=strlen($p_val)-1;
+01450   for ($i=$len-1;$i>0;$i--) {
+01451     $a=substr($p_val,0,$i);
+01452     echo_debug ("parent == $a len =1");
+01453     if (CountSql($p_cn,"select pcm_val from tmp_pcmn where pcm_val=$a") == 1)
+01454       return $a;
+01455   }
+01456 }
+01471 function getFicheAttribut($p_cn,$p_id,$p_attr="") {
+01472   // Retrieve the attribute with the ad_id 1
+01473   // 1 is always the name
+01474 
+01475   if ( $p_attr != "") {
+01476     $Res=ExecSql($p_cn,"select av_text from 
+01477                     attr_value
+01478                     natural join jnt_fic_att_value 
+01479                     natural join fiche 
+01480                     where
+01481                     ad_id=$p_attr 
+01482                     and f_id=(select f_id from vw_poste_qcode where j_qcode='$p_id') ");
+01483     if ( pg_NumRows($Res) == 0 ) return NULL;
+01484     $st=pg_fetch_array($Res,0);
+01485     return $st['av_text'];
+01486   } else {
+01487     // Get attribut from the view
+01488     $Res=ExecSql($p_cn,"select * from vw_fiche_attr where quick_code='$p_id'");
+01489     if ( pg_NumRows($Res) == 0 ) return null;
+01490     $st=pg_fetch_array($Res,0);
+01491     return $st;
+01492   }
+01493 }
+01494 
+01511 function IsFicheOfJrn($p_cn,$p_jrn,$p_fiche,$p_type="")
+01512 {
+01513   $get="";
+01514   if ( $p_type == 'deb' ) {
+01515     $get='jrn_def_fiche_deb';
 01516   }
-01517 }
-01518 
-01519 /* function IsFicheOfJrn
-01520  ***************************************************
-01521  * Purpose :  Check if a fiche is used by a jrn
-01522  *  return 1 if the  fiche is in the range otherwise 0
-01523  *        
-01524  * parm : 
-01525  *      - p_cn connextion
-01526  *      - j_jrn journal_id
-01527  *      - $p_type : deb or cred
-01528  *      - $p_fiche : quick_code
-01529  * gen :
-01530  *      - none
-01531  *
-01532  * return 1 if the fiche is in the range otherwise 0
-01533  * 
-01534  */
-01535 function IsFicheOfJrn($p_cn,$p_jrn,$p_fiche,$p_type="")
-01536 {
-01537   $get="";
-01538   if ( $p_type == 'deb' ) {
-01539     $get='jrn_def_fiche_deb';
-01540   }
-01541   if ( $p_type == 'cred' ) {
-01542     $get='jrn_def_fiche_cred';
-01543   }
-01544   if ( $get != "" ) {
-01545     $Res=ExecSql($p_cn,"select $get as fiche from jrn_def where jrn_def_id=$p_jrn");
-01546   } else {
-01547     // Get all the fiche type (deb and cred)
-01548     $Res=ExecSql($p_cn," select jrn_def_fiche_cred as fiche  
-01549                          from jrn_def where jrn_def_id=$p_jrn
-01550                         union
-01551                          select jrn_def_fiche_deb 
-01552                          from jrn_def where jrn_def_id=$p_jrn"
-01553                  );
-01554   }
-01555   $Max=pg_NumRows($Res);
-01556   if ( $Max==0) {
-01557     echo_warning("No rows");
-01558     return null;
-01559   }
-01560   // Normally Max must be == 1
-01561   $list=pg_fetch_array($Res,0);
-01562   if ( $list['fiche']=="") {
-01563     echo_warning("No fiche");
-01564     return null;
-01565   }
-01566   
-01567  $sql="select *
-01568         from vw_fiche_attr
-01569         where  
-01570            fd_id in (".$list['fiche'].") and quick_code='$p_fiche'"; 
-01571 
-01572   $Res=ExecSql($p_cn,$sql);
-01573   $Max=pg_NumRows($Res);
-01574   if ($Max==0 ) 
-01575     return 0;
-01576   else
-01577     return 1;
-01578 }
-01579 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +01517 if ( $p_type == 'cred' ) { +01518 $get='jrn_def_fiche_cred'; +01519 } +01520 if ( $get != "" ) { +01521 $Res=ExecSql($p_cn,"select $get as fiche from jrn_def where jrn_def_id=$p_jrn"); +01522 } else { +01523 // Get all the fiche type (deb and cred) +01524 $Res=ExecSql($p_cn," select jrn_def_fiche_cred as fiche +01525 from jrn_def where jrn_def_id=$p_jrn +01526 union +01527 select jrn_def_fiche_deb +01528 from jrn_def where jrn_def_id=$p_jrn" +01529 ); +01530 } +01531 $Max=pg_NumRows($Res); +01532 if ( $Max==0) { +01533 echo_warning("No rows"); +01534 return null; +01535 } +01536 // Normally Max must be == 1 +01537 $list=pg_fetch_array($Res,0); +01538 if ( $list['fiche']=="") { +01539 echo_warning("No fiche"); +01540 return null; +01541 } +01542 +01543 $sql="select * +01544 from vw_fiche_attr +01545 where +01546 fd_id in (".$list['fiche'].") and quick_code='$p_fiche'"; +01547 +01548 $Res=ExecSql($p_cn,$sql); +01549 $Max=pg_NumRows($Res); +01550 if ($Max==0 ) +01551 return 0; +01552 else +01553 return 1; +01554 } +01555 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche__inc_8php.html b/doc/developper/html/fiche__inc_8php.html index b64ee9c26..4bad67970 100644 --- a/doc/developper/html/fiche__inc_8php.html +++ b/doc/developper/html/fiche__inc_8php.html @@ -4,81 +4,140 @@ - + -

fiche_inc.php File Reference

+

fiche_inc.php File Reference

Function for managing card, redundant with the class fiche. More... +

+

Go to the source code of this file. - + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - - - + + +

Functions

 GetSqlFiche ($p_type)
 AddFiche ($p_cn, $p_type, $p_array)
 AddFiche ($p_cn, $p_type, $p_array)
 ajoute une nouvelle fiche
 EncodeFiche ($p_cn, $p_type, $p_array=null)
 EncodeFiche ($p_cn, $p_type, $p_array=null)
 Affiche les détails d'une fiche et propose de mettre à jour ou si array est a null, permet d'ajouter une fiche, to fill the attribute.
 GetBaseFiche ($p_cn, $p_type)
 GetBaseFiche ($p_cn, $p_type)
 donne la classe comptable de base d'une fiche
 GetBaseFicheDefault ($p_cn, $p_type)
 GetBaseFicheDefault ($p_cn, $p_type)
 Give the default accounts of fiche_def.
 ViewFiche ($p_cn, $p_type)
 ViewFiche ($p_cn, $p_type)
 Montre les fiches d'une rubrique.
 GetNextFiche ($p_cn, $p_base)
 GetNextFiche ($p_cn, $p_base)
 Crée le poste suivant pour une fiche en fonction de la classe de base (fichedef(fd_class_base)).
 ViewFicheDetail ($p_cn, $p_id)
 ViewFicheDetail ($p_cn, $p_id)
 Montre le detail d'une fiche et ajoute les lignes manquantes dans le cas où le modèle à changer.
 UpdateFiche ($p_cn, $p_array)
 UpdateFiche ($p_cn, $p_array)
 Met a jour une fiche change dans le plan comptable, fiche,et isupp.
 EncodeModele ($p_js)
 EncodeModele ($p_js)
 parm :
    +
  • gen :
  • return:
+
 DefModele ($p_cn, $p_js, $p_array=null, $p_ligne=1)
 DefModele ($p_cn, $p_js, $p_array=null, $p_ligne=1)
 Creation of a model of card or correction.
 AddModele ($p_cn, $p_array)
 AddModele ($p_cn, $p_array)
 Add a modele of card into the database.
 UpdateModele ($p_cn, $p_fiche)
 UpdateModele ($p_cn, $p_fiche)
 Modify the model of card change some attribute (fd_label) and permit to add line.
 GetDataModele ($p_cn, $p_fiche)
 GetDataModele ($p_cn, $p_fiche)
 Return the info of an fiche identified by p_fiche.
 Remove ($p_cn, $p_fid)
 Remove ($p_cn, $p_fid)
 enleve une fiche dans attr_value, jnt_fic_att_value et fiche a la condition que ce poste n'aie jamais été utilisé parm :
    +
  • p_cn
+

+p_fid fiche(f_id) gen :

    +
  • none return:
+

+none

 getFicheName ($p_cn, $p_id)
 getFicheName ($p_cn, $p_id)
 retourne le nom de la fiche en fournissant le quick_code
 getFicheNameById ($p_cn, $p_id)
 getFicheNameById ($p_cn, $p_id)
 retourne le nom de la fiche en fournissant le f_id
 getFicheDefName ($p_cn, $p_id)
 getFicheDefName ($p_cn, $p_id)
 retourne le nom de la cat. de fiches
 GetFicheJrn ($p_cn, $p_jrn, $p_type)
 GetFicheJrn ($p_cn, $p_jrn, $p_type)
 Get all the fiche related to a "journal".
 Get_fiche_def_ref ($p_cn)
 Get_fiche_def_ref ($p_cn)
 return an array containing all the data contained in the table fiche_def_ref parm :
    +
  • $p_cn connection to the database gen :
  • none return: array if ok null otherwize
+
 Get_attr_min ($p_cn, $p_fiche_def_ref)
 Get_attr_min ($p_cn, $p_fiche_def_ref)
 retrieve the mandatory field of the card model
 Get_attr_def ($p_cn, $p_fiche_def)
 Get_attr_def ($p_cn, $p_fiche_def)
 retrieve the fields of the card model
 GetCreateAccount ($p_cn, $p_fiche_def)
 GetCreateAccount ($p_cn, $p_fiche_def)
 retrieve the fields of the card model which indicate if each cards needs its own account parm :
    +
  • $p_cn database connexion
+

+$p_fiche_def_ref fiche_def.fd_id gen :

    +
  • return: not null if yes, each cards has its own account
+
 GetFicheDefRef ($p_cn, $p_f_id)
 GetFicheDefRef ($p_cn, $p_f_id)
 retrieve the fiche_def.frd_id thanks the f_id of a card
 GetFicheDef ($p_cn, $p_f_id)
 GetFicheDef ($p_cn, $p_f_id)
 retrieve the fiche_def.fd_id thanks the f_id of a card
 GetClass ($p_cn, $p_fid)
 GetClass ($p_cn, $p_fid)
 Retrieve the account of a card.
 InsertModeleLine ($p_cn, $p_fid, $p_adid)
 InsertModeleLine ($p_cn, $p_fid, $p_adid)
 Insert a new row into jnt_fic_attr for adding a new attribute to the card model parm :
    +
  • p_cn connection
+

+the fiche_def.fd_id, id of the cat of the model

    +
  • the ad_id is the attr_def.ad_id gen :
      +
    • none return: none.
    +
+
 SaveModeleName ($p_cn, $p_fid, $p_label)
 SaveModeleName ($p_cn, $p_fid, $p_label)
 Update the model's name.
 DisplayDetailModele ($p_cn, $p_array, $MaxLine)
 DisplayDetailModele ($p_cn, $p_array, $MaxLine)
 Show the data contained in an array of a model of card (fiche_def).
 GetParent ($p_cn, $p_val)
 GetParent ($p_cn, $p_val)
 Get the parent in tmp_pcmn.
 getFicheAttribut ($p_cn, $p_id, $p_attr="")
 getFicheAttribut ($p_cn, $p_id, $p_attr="")
 IsFicheOfJrn ($p_cn, $p_jrn, $p_fiche, $p_type="")
 retrun array of attribut or string
 IsFicheOfJrn ($p_cn, $p_jrn, $p_fiche, $p_type="")
 Check if a fiche is used by a jrn return 1 if the fiche is in the range otherwise 0.
-


Function Documentation

-

+


Detailed Description

+Function for managing card, redundant with the class fiche. +

+

Todo:
remove this file but adapt first the pages which needs those function and complete the class_fiche.php
+ +

+Definition in file fiche_inc.php.


Function Documentation

+

+References $flag, $num, $p_parent, $Res, $sql, $Sql, CountSql(), echo_debug(), echo_error(), ExecSql(), exit, FormatString(), Get_attr_def(), GetBaseFiche(), GetCreateAccount(), GetNextFiche(), GetSequence(), and isNumber().
@@ -118,14 +177,23 @@

+ajoute une nouvelle fiche +

+

Parameters:
+ + + + +
$p_cn connexion
$p_type type de la fiche
$p_array tableau
+

-Definition at line 57 of file fiche_inc.php. +Definition at line 38 of file fiche_inc.php.

-References $flag, $num, $p_parent, $Res, $sql, $Sql, CountSql(), echo_debug(), echo_error(), ExecSql(), exit, FormatString(), Get_attr_def(), GetBaseFiche(), GetCreateAccount(), GetNextFiche(), GetSequence(), and isNumber().

-

+

+References $Res, $sql, echo_debug(), echo_error(), ExecSql(), FormatString(), Get_attr_min(), GetBaseFicheDefault(), GetSequence(), and isNumber().
@@ -159,14 +227,22 @@ References $flag,

+Add a modele of card into the database. +

+AddModele

+parm :

    +
  • connection
+

+array gen :

-Definition at line 782 of file fiche_inc.php. +Definition at line 758 of file fiche_inc.php.

-References $Res, $sql, echo_debug(), echo_error(), ExecSql(), FormatString(), Get_attr_min(), GetBaseFicheDefault(), GetSequence(), and isNumber().

-

+

+References $check, echo_debug(), Get_fiche_def_ref(), and METHOD.
@@ -212,14 +288,23 @@ References $Res, <

+Creation of a model of card or correction. +

+DefModele

+parm :

    +
  • $p_cn database connection
      +
    • $p_ligne number of lines
    +
  • $p_array array
  • $p_js class base (javascript code) gen :
      +
    • none return:
    • nothing
    +

-Definition at line 710 of file fiche_inc.php. +Definition at line 686 of file fiche_inc.php.

-References $check, echo_debug(), Get_fiche_def_ref(), and METHOD.

-

+

+Referenced by UpdateModele().
@@ -259,16 +344,25 @@ References $check

+Show the data contained in an array of a model of card (fiche_def). +

+DisplayDetailModele

+parm :

    +
  • p_cn database connection
      +
    • array containing label,class_base,fd_id,ad_textX,ad_idX
    +
  • number of line gen :
      +
    • none return: none
    +

-Definition at line 1411 of file fiche_inc.php. +Definition at line 1387 of file fiche_inc.php.

-References $i, $l, $M, $Res, echo_debug(), ExecSql(), label, and value. +References $i, $l, $M, $Res, echo_debug(), ExecSql(), label, and value.

-Referenced by UpdateModele().

-

+

+Referenced by ViewFicheDetail().
@@ -308,16 +402,27 @@ Referenced by UpdateMode

+Affiche les détails d'une fiche et propose de mettre à jour ou si array est a null, permet d'ajouter une fiche, to fill the attribute. +

+EncodeFiche

+

Parameters:
+ + + +
$p_cn connexion
$p_type id du modele fiche_def(fd_id) de la fiche SI array est null sinon correspond au id d'une fiche fiche(f_id)
+
+
Note:
STAN: je ne trouve pas le nom "EncodeFiche" super claire pour une fonction qui affiche les détails d'une fiche... on ne changerait pas en "DisplayFiche" ?  

+DANY: Oui je suis assez d'accord avec toi

-Definition at line 249 of file fiche_inc.php. +Definition at line 225 of file fiche_inc.php.

-References $l_line, $label, $Max, $Res, $sql, echo_debug(), ExecSql(), getFicheNameById(), name, and value. +References $l_line, $label, $Max, $Res, $sql, echo_debug(), ExecSql(), getFicheNameById(), name, and value.

-Referenced by ViewFicheDetail().

-

+

+Definition at line 660 of file fiche_inc.php. +

+References METHOD, and name.

@@ -342,14 +447,18 @@ Referenced by ViewFicheD

+parm :

    +
  • gen :
  • return:

-Definition at line 684 of file fiche_inc.php. +EncodeModele

-References METHOD, and name.

-

+

+Referenced by AddFiche().
@@ -383,16 +492,24 @@ References METHOD, an

+retrieve the fields of the card model +

+Get_attr_def

+parm :

    +
  • $p_cn database connexion
+

+$p_fiche_def_ref fiche_def.fd_id gen :

    +
  • return: array of ad_id (attr_def.ad_id) and labels (attr_def.ad_text)

-Definition at line 1202 of file fiche_inc.php. +Definition at line 1178 of file fiche_inc.php.

-References $array, $i, $Num, $Res, $Sql, and ExecSql(). +References $array, $i, $Num, $Res, $Sql, and ExecSql().

-Referenced by AddFiche().

-

+

+Referenced by AddModele().
@@ -426,16 +543,24 @@ Referenced by AddFiche()

+retrieve the mandatory field of the card model +

+Get_attr_min

+parm :

    +
  • $p_cn database connexion
+

+$p_fiche_def_ref gen :

    +
  • return: array of ad_id (attr_min.ad_id) and labels (attr_def.ad_text)

-Definition at line 1170 of file fiche_inc.php. +Definition at line 1146 of file fiche_inc.php.

-References $array, $i, $Num, $Res, $Sql, and ExecSql(). +References $array, $i, $Num, $Res, $Sql, and ExecSql().

-Referenced by AddModele().

-

+

+References $array, $i, $Max, $Res, ExecSql(), frd_class_base, frd_id, and frd_text. +

+Referenced by DefModele().

@@ -460,16 +585,20 @@ Referenced by AddModele(

+return an array containing all the data contained in the table fiche_def_ref parm :

    +
  • $p_cn connection to the database gen :
  • none return: array if ok null otherwize

-Definition at line 1136 of file fiche_inc.php. +Get_fiche_def_ref

-References $array, $i, $Max, $Res, ExecSql(), frd_class_base, frd_id, and frd_text. +Definition at line 1112 of file fiche_inc.php.

-Referenced by DefModele().

-

+

+Referenced by AddFiche().
@@ -503,16 +632,24 @@ Referenced by DefModele(

+donne la classe comptable de base d'une fiche +

+GetBaseFiche

+parm :

    +
  • p_cn connexion
+

+p_type fiche id gen :

    +
  • none return:
  • return la classe id ou rien

-Definition at line 376 of file fiche_inc.php. +Definition at line 352 of file fiche_inc.php.

-References $Res, and ExecSql(). +References $Res, and ExecSql().

-Referenced by AddFiche().

-

+

+Referenced by AddModele().
@@ -546,16 +683,24 @@ Referenced by AddFiche()

+Give the default accounts of fiche_def. +

+GetBaseFicheDefault

+parm :

    +
  • p_cn connexion
+

+p_type fiche id gen :

    +
  • none return:
  • return la classe id ou rien

-Definition at line 398 of file fiche_inc.php. +Definition at line 374 of file fiche_inc.php.

-References $Res, ExecSql(), and frd_class_base. +References $Res, ExecSql(), and frd_class_base.

-Referenced by AddModele().

-

+

+Referenced by Remove().
@@ -589,16 +734,24 @@ Referenced by AddModele(

+Retrieve the account of a card. +

+GetClass

+parm :

    +
  • connection
+

+card id (fiche.f_id) gen :

    +
  • none return: string if a class if found or null otherwise

-Definition at line 1334 of file fiche_inc.php. +Definition at line 1310 of file fiche_inc.php.

-References $Res, $sql, echo_debug(), and ExecSql(). +References $Res, $sql, echo_debug(), and ExecSql().

-Referenced by Remove().

-

+

+References $Num, $Res, $Sql, echo_debug(), and ExecSql(). +

+Referenced by AddFiche(), and Remove().

@@ -632,16 +785,23 @@ Referenced by Remove()

+retrieve the fields of the card model which indicate if each cards needs its own account parm :

    +
  • $p_cn database connexion
+

+$p_fiche_def_ref fiche_def.fd_id gen :

    +
  • return: not null if yes, each cards has its own account

-Definition at line 1235 of file fiche_inc.php. +GetCreateAccount

-References $Num, $Res, $Sql, echo_debug(), and ExecSql(). +Definition at line 1211 of file fiche_inc.php.

-Referenced by AddFiche(), and Remove().

-

+

+Referenced by UpdateModele().
@@ -675,16 +835,24 @@ Referenced by AddFiche()

+Return the info of an fiche identified by p_fiche. +

+GetDataModele

+parm :

    +
  • connection
+

+fiche id gen :

    +
  • none return:
  • array with all the data

-Definition at line 916 of file fiche_inc.php. +Definition at line 892 of file fiche_inc.php.

-References $array, $Max, $Res, ExecSql(), and label. +References $array, $Max, $Res, ExecSql(), and label.

-Referenced by UpdateModele().

-

+

+string avec nom fiche or array +

+Definition at line 1471 of file fiche_inc.php. +

+References $Res, and ExecSql(). +

+Referenced by FormAchView(), FormVenteView(), and withStock().

@@ -724,16 +892,27 @@ Referenced by UpdateMode

- +retrun array of attribut or string

-Definition at line 1495 of file fiche_inc.php. +getFicheAttribut

+parm :

    +
  • p_cn connexion

-References $Res, and ExecSql(). +p_id quick_code

    +
  • attribut if attribut == "" then return a array taken from vw_fiche_attr gen :
      +
    • none return:
    +

-Referenced by FormAchView(), FormVenteView(), and withStock().

-

+

+the fiche_def.fd_id or null if nothing has been found +

+Definition at line 1279 of file fiche_inc.php. +

+References $Res, $sql, and ExecSql(). +

+Referenced by Remove(), and ViewFicheDetail().

@@ -767,16 +946,25 @@ Referenced by FormA

- +retrieve the fiche_def.fd_id thanks the f_id of a card

-Definition at line 1303 of file fiche_inc.php. +GetFicheRef

+parm :

    +
  • $p_cn connection

-References $Res, $sql, and ExecSql(). +$p_f_id fiche.f_id gen :

    +
  • none return:

-Referenced by Remove(), and ViewFicheDetail().

-

+

+p_id fiche id fiche_def.fd_id gen :
    +
  • none return:
+

+string fiche_def.fd_label +

+Definition at line 1035 of file fiche_inc.php. +

+References $Res, and ExecSql().

@@ -810,14 +998,23 @@ Referenced by Remove()

- +retourne le nom de la cat. de fiches

-Definition at line 1059 of file fiche_inc.php. +getFicheDefName

+parm :

    +
  • p_cn connexion

-References $Res, and ExecSql().

-

+

+the fiche_def.frd_id or null if nothing has been found +

+Definition at line 1248 of file fiche_inc.php. +

+References $Res, $sql, ExecSql(), and frd_id. +

+Referenced by UpdateFiche().

@@ -851,16 +1048,25 @@ References $Res, a

- +retrieve the fiche_def.frd_id thanks the f_id of a card

-Definition at line 1272 of file fiche_inc.php. +GetFicheDefRef

+parm :

    +
  • $p_cn connection

-References $Res, $sql, ExecSql(), and frd_id. +$p_f_id fiche.f_id gen :

    +
  • none return:

-Referenced by UpdateFiche().

-

+

+References $a, $i, $list, $Max, $Res, $sql, echo_error(), echo_warning(), ExecSql(), exit, and f_id.
@@ -900,14 +1106,24 @@ Referenced by UpdateFich

+Get all the fiche related to a "journal". +

+GetFicheJrn

+parm :

    +
  • p_cn connextion
+

+j_jrn journal_id

    +
  • $p_type : deb or cred gen :
      +
    • none return: array containing the fiche(f_id),fiche(f_label)
    +

-Definition at line 1078 of file fiche_inc.php. +Definition at line 1054 of file fiche_inc.php.

-References $a, $i, $list, $Max, $Res, $sql, echo_error(), echo_warning(), ExecSql(), and exit.

-

+

+string avec nom fiche +

+Definition at line 985 of file fiche_inc.php. +

+References $Res, and ExecSql(). +

+Referenced by FormAchView(), and FormVenteView().

@@ -941,16 +1157,25 @@ References $a,

- +retourne le nom de la fiche en fournissant le quick_code

-Definition at line 1009 of file fiche_inc.php. +getFicheName

+parm :

    +
  • p_cn connexion

-References $Res, and ExecSql(). +p_id quick_code gen :

    +
  • none return:

-Referenced by FormAchView(), and FormVenteView().

-

+

+string avec nom fiche +

+Definition at line 1007 of file fiche_inc.php. +

+References $Res, and ExecSql(). +

+Referenced by EncodeFiche().

@@ -984,16 +1209,25 @@ Referenced by FormA

- +retourne le nom de la fiche en fournissant le f_id

-Definition at line 1031 of file fiche_inc.php. +getFicheNameById

+parm :

    +
  • p_cn connexion

-References $Res, and ExecSql(). +p_id quick_code gen :

    +
  • none return:

-Referenced by EncodeFiche().

-

+

+Referenced by AddFiche().
@@ -1027,16 +1261,24 @@ Referenced by EncodeFich

+Crée le poste suivant pour une fiche en fonction de la classe de base (fichedef(fd_class_base)). +

+GetNextFiche

+parm :

    +
  • p_cn connexion
+

+p_base gen :

    +
  • return:

-Definition at line 482 of file fiche_inc.php. +Definition at line 458 of file fiche_inc.php.

-References $l_line, $Max, $Res, $ret, echo_debug(), and ExecSql(). +References $l_line, $Max, $Res, $ret, echo_debug(), and ExecSql().

-Referenced by AddFiche().

-

+

+Referenced by UpdateFiche().
@@ -1070,48 +1312,24 @@ Referenced by AddFiche()

+Get the parent in tmp_pcmn. +

+GetParent

+parm :

    +
  • cn database connextion
+

+the base we want insert gen :

    +
  • return: the parent

-Definition at line 1471 of file fiche_inc.php. +Definition at line 1447 of file fiche_inc.php.

-References $a, CountSql(), and echo_debug(). +References $a, CountSql(), and echo_debug().

-Referenced by UpdateFiche().

-

- - - - -
- - - - - - - - - -
GetSqlFiche p_type  ) 
-
- - - - - -
-   - - -

- -

-Definition at line 29 of file fiche_inc.php. -

-References echo_error().

-

+

+Definition at line 1340 of file fiche_inc.php. +

+References $Res, $sql, and ExecSql().

@@ -1151,14 +1369,23 @@ References echo_error()<

+Insert a new row into jnt_fic_attr for adding a new attribute to the card model parm :

    +
  • p_cn connection
+

+the fiche_def.fd_id, id of the cat of the model

    +
  • the ad_id is the attr_def.ad_id gen :
      +
    • none return: none.
    +

-Definition at line 1364 of file fiche_inc.php. +InsertModeleLine

-References $Res, $sql, and ExecSql().

-

+

+return 1 if the fiche is in the range otherwise 0 +

+Definition at line 1511 of file fiche_inc.php. +

+References $list, $Max, $Res, $sql, echo_warning(), and ExecSql(). +

+Referenced by form_verify_input().

@@ -1204,16 +1431,27 @@ References $Res, <

- +Check if a fiche is used by a jrn return 1 if the fiche is in the range otherwise 0.

-Definition at line 1535 of file fiche_inc.php. +IsFicheOfJrn

+parm :

    +
  • p_cn connextion

-References $list, $Max, $Res, $sql, echo_warning(), and ExecSql(). +j_jrn journal_id

    +
  • $p_type : deb or cred
  • $p_fiche : quick_code gen :
      +
    • none
    +

-Referenced by form_verify_input().

-

+

+none +

+Remove +

+Definition at line 935 of file fiche_inc.php. +

+References $Res, CountSql(), echo_error(), ExecSql(), FormatString(), GetClass(), GetCreateAccount(), GetFicheDef(), and isNumber().

@@ -1247,14 +1485,22 @@ Referenced by form_

- +enleve une fiche dans attr_value, jnt_fic_att_value et fiche a la condition que ce poste n'aie jamais été utilisé parm :

    +
  • p_cn

-Definition at line 959 of file fiche_inc.php. +p_fid fiche(f_id) gen :

    +
  • none return:

-References $Res, CountSql(), echo_error(), ExecSql(), FormatString(), GetClass(), GetCreateAccount(), GetFicheDef(), and isNumber().

-

+

+References $Res, $sql, and ExecSql().
@@ -1294,14 +1540,24 @@ References $Res, <

+Update the model's name. +

+SaveModeleName

+parm :

    +
  • p_cn connection
+

+the fiche_def.fd_id, id of the cat of the model

    +
  • the label gen :
      +
    • none return: none
    +

-Definition at line 1385 of file fiche_inc.php. +Definition at line 1361 of file fiche_inc.php.

-References $Res, $sql, and ExecSql().

-

+

+References $a, $label, $Res, $sql, CountSql(), echo_debug(), echo_error(), ExecSql(), FormatString(), GetFicheDefRef(), GetParent(), and label.
@@ -1335,14 +1591,22 @@ References $Res, <

+Met a jour une fiche change dans le plan comptable, fiche,et isupp. +

+UpdateFiche

+parm :

    +
  • p_cn
+

+p_array gen :

    +
  • none return:
  • nothing

-Definition at line 550 of file fiche_inc.php. +Definition at line 526 of file fiche_inc.php.

-References $a, $label, $Res, $sql, CountSql(), echo_debug(), echo_error(), ExecSql(), FormatString(), GetFicheDefRef(), GetParent(), and label.

-

+

+References $array, DisplayDetailModele(), echo_debug(), echo_error(), and GetDataModele().
@@ -1376,14 +1640,22 @@ References $a,

+Modify the model of card change some attribute (fd_label) and permit to add line. +

+UpdateModele

+parm :

    +
  • p_cn connexion
+

+p_fiche fichedef(f_id) gen :

    +
  • none return:
  • none

-Definition at line 890 of file fiche_inc.php. +Definition at line 866 of file fiche_inc.php.

-References $array, DisplayDetailModele(), echo_debug(), echo_error(), and GetDataModele().

-

+

+References $_SESSION, $bar, $l_line, $Max, $offset, $page, $Res, $sql_limit, $sql_offset, $step, CountSql(), ExecSql(), jrn_navigation_bar(), METHOD, name, and value.
@@ -1417,14 +1689,22 @@ References $array,

+Montre les fiches d'une rubrique. +

+ViewFiche

+parm :

    +
  • p_cn connexion
+

+$p_type fiche_def.fd_id catg of card gen :

    +
  • none return:
  • none

-Definition at line 418 of file fiche_inc.php. +Definition at line 394 of file fiche_inc.php.

-References $_SESSION, $bar, $l_line, $Max, $offset, $page, $Res, $sql_limit, $sql_offset, $step, CountSql(), ExecSql(), jrn_navigation_bar(), METHOD, name, and value.

-

+

+References $Res, $sql, EncodeFiche(), ExecSql(), and GetFicheDef().
@@ -1458,14 +1738,22 @@ References $_SESSION

+Montre le detail d'une fiche et ajoute les lignes manquantes dans le cas où le modèle à changer. +

+ViewFicheDetail

+parm :

    +
  • p_cn
+

+id de la fiche fiche(f_id) gen :

    +
  • return:

-Definition at line 512 of file fiche_inc.php. +Definition at line 488 of file fiche_inc.php.

-References $Res, $sql, EncodeFiche(), ExecSql(), and GetFicheDef().

-


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche__new_8php-source.html b/doc/developper/html/fiche__new_8php-source.html index 46a7cc2a3..8aba90e0b 100644 --- a/doc/developper/html/fiche__new_8php-source.html +++ b/doc/developper/html/fiche__new_8php-source.html @@ -4,7 +4,7 @@ - +

fiche_new.php

Go to the documentation of this file.
00001 <?
@@ -29,179 +29,178 @@
 00020 include_once ("ac_common.php");
 00021 include_once ("postgres.php");
 00022 include_once ("check_priv.php");
-00023 
-00024 /* $Revision$ */
-00025 /* Admin. Dossier */
-00026 $rep=DbConnect();
-00027 include_once ("class_user.php");
-00028 $User=new cl_user($rep);
-00029 $User->Check();
-00030 
-00031 html_page_start($User->theme,"onLoad='window.focus();'");
-00032 
-00033 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
-00034   echo "You must choose a Dossier ";
-00035   exit -2;
-00036 }
-00037 
-00038 $cn=DbConnect($_SESSION['g_dossier']);
-00039 // TODO add security here
-00040 // Get The priv on the selected folder
-00041 if ( $User->CheckAction($cn,FICHE_WRITE)== 0) {
-00042     /* Cannot Access */
-00043     echo '<h2 class="error"> Vous  ne pouvez pas ajouter de fiche</h2>';
-00044     return;
-00045 }
-00046 
-00047 include_once("fiche_inc.php");
-00048 
+00027 /* $Revision$ */
+00028 /* Admin. Dossier */
+00029 $rep=DbConnect();
+00030 include_once ("class_user.php");
+00031 $User=new cl_user($rep);
+00032 $User->Check();
+00033 
+00034 html_page_start($User->theme,"onLoad='window.focus();'");
+00035 
+00036 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
+00037   echo "You must choose a Dossier ";
+00038   exit -2;
+00039 }
+00040 
+00041 $cn=DbConnect($_SESSION['g_dossier']);
+00042 // TODO add security here
+00043 // Get The priv on the selected folder
+00044 if ( $User->CheckAction($cn,FICHE_WRITE)== 0) {
+00045     /* Cannot Access */
+00046     echo '<h2 class="error"> Vous  ne pouvez pas ajouter de fiche</h2>';
+00047     return;
+00048 }
 00049 
-00050 foreach ($HTTP_GET_VARS as $key=>$element) {
-00051   // The value are e_name e_type e_PHPSESSID
-00052   ${"e_$key"}=$element;
-00053   echo_debug('fiche_new.php',__LINE__,"e_$key =$element<br>");
-00054 
-00055 }
-00056 
-00057 function new_fiche($p_cn,$p_type) {
-00058   $ch_col="</TD><TD>";
-00059   $ch_li='</TR><TR>';
-00060   $r='<FORM action="fiche_new.php" method="post">';
-00061   $r.='<INPUT TYPE="HIDDEN" name="fiche" value="'.$p_type.'">';
-00062   $l_sessid=(isset ($_POST["PHPSESSID"]))?$_POST["PHPSESSID"]:$_GET["PHPSESSID"];
-00063 
-00064   $r.=JS_SHOW_TVA;
-00065   $r.=JS_SEARCH_POSTE;
-00066   $r.="<TABLE>";
-00067   echo '<H2 class="info">New </H2>';
-00068   $p_f_id="";
-00069   echo_debug('fiche_new.php',__LINE__,"Array is null");
-00070   // Find all the attribute of the existing cards
-00071   // --> Get_attr_def 
-00072     $sql="select frd_id,ad_id,ad_text from  fiche_def join jnt_fic_attr using (fd_id)
-00073            join attr_def using (ad_id) where fd_id=".$p_type." order by ad_id";
-00074 
-00075     $Res=ExecSql($p_cn,$sql);
-00076     $Max=pg_NumRows($Res);
-00077     // Put the card modele id (fiche_def.fd_id)
-00078     $r.='<INPUT TYPE="HIDDEN" name="fd_id" value="'.$p_type.'">';
-00079     for ($i=0;$i < $Max;$i++) {
-00080       $l_line=pg_fetch_array($Res,$i);
-00081 
-00082       // The number of the attribute
-00083       $Hid=sprintf('<INPUT TYPE="HIDDEN" name="ad_id%d" value="%s">',
-00084                    $i,$l_line['ad_id']);
-00085 
-00086       $but_search_poste="";
-00087       // Javascript for searching the account
-00088       if ( $l_line ['ad_id'] == ATTR_DEF_ACCOUNT ) {
-00089         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$l_sessid.'\',\'av_text'.$i.'\')">';
-00090       } 
-00091       // Javascript for showing the tva
-00092       if ( $l_line ['ad_id'] == ATTR_DEF_TVA ) {
-00093         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Montre" OnClick="ShowTva(\''.$l_sessid.'\',\'av_text'.$i.'\')">';
-00094       }
-00095       // content of the attribute
-00096       $r.= sprintf('<TR><TD> %s </TD><TD><INPUT TYPE="TEXT" NAME="av_text%d">%s %s</TD></TR>',
-00097               $l_line['ad_text'], $i,$Hid,$but_search_poste);
-00098    }  
-00099     $r.="</TABLE>";
-00100     $r.='<INPUT TYPE="SUBMIT" name="add_fiche" value="Mis à jour">';
-00101     $r.= '<INPUT TYPE="HIDDEN" name="inc" value="'.$Max.'">';
-00102     $r.='</FORM>';
-00103     return $r;
-00104 }
-00105 if ( isset($_POST['add_fiche'])) {
-00106   AddFiche($cn,$_POST["fiche"],$HTTP_POST_VARS);
-00107 ?>
-00108 <SCRIPT>
-00109 
-00110   window.close();
-00111 </SCRIPT>
-00112 <?
-00113     return;
-00114 }
-00115 // Prob : ajout de fiche mais si plusieur cat possible ???
-00116  // Get the field from database
-00117   // if e_type contains a list of value
-00118   if ( $e_type != 'cred' and $e_type != 'deb')     {
-00119     //    $list['fiche']=$e_type;
-00120     $sql="select fd_id from fiche_def where frd_id in ($e_type)";
-00121     $Res=ExecSql($cn,$sql);
-00122     // fetch it
-00123     $Max=pg_NumRows($Res);
-00124     if ( $Max==0) {
-00125       echo_warning("No rows");
-00126     exit();
-00127     }
-00128     $n=pg_NumRows($Res);
-00129     for ($i=0;$i <$n;$i++) {
-00130       $f=pg_fetch_array($Res,$i);
-00131       $e[$i]=$f['fd_id'];
-00132     }
-00133     $list['fiche']=join(',',$e);
-00134   } else { // We have to find it from the database
-00135     if ( $e_type == 'deb' ) {
-00136       $get='jrn_def_fiche_deb';
-00137       $sql="select $get as fiche from jrn_def where jrn_def_id=".$_GET['p_jrn'];
-00138     }
-00139     if ( $e_type == 'cred' ) {
-00140       $get='jrn_def_fiche_cred';
-00141     $sql="select $get as fiche from jrn_def where jrn_def_id=".$_GET['p_jrn'];
-00142     }
-00143     
-00144     
-00145 
-00146     $Res=ExecSql($cn,$sql);
+00050 include_once("fiche_inc.php");
+00051 
+00052 
+00053 foreach ($HTTP_GET_VARS as $key=>$element) {
+00054   // The value are e_name e_type e_PHPSESSID
+00055   ${"e_$key"}=$element;
+00056   echo_debug('fiche_new.php',__LINE__,"e_$key =$element<br>");
+00057 
+00058 }
+00059 
+00060 function new_fiche($p_cn,$p_type) {
+00061   $ch_col="</TD><TD>";
+00062   $ch_li='</TR><TR>';
+00063   $r='<FORM action="fiche_new.php" method="post">';
+00064   $r.='<INPUT TYPE="HIDDEN" name="fiche" value="'.$p_type.'">';
+00065   $l_sessid=(isset ($_POST["PHPSESSID"]))?$_POST["PHPSESSID"]:$_GET["PHPSESSID"];
+00066 
+00067   $r.=JS_SHOW_TVA;
+00068   $r.=JS_SEARCH_POSTE;
+00069   $r.="<TABLE>";
+00070   echo '<H2 class="info">New </H2>';
+00071   $p_f_id="";
+00072   echo_debug('fiche_new.php',__LINE__,"Array is null");
+00073   // Find all the attribute of the existing cards
+00074   // --> Get_attr_def 
+00075     $sql="select frd_id,ad_id,ad_text from  fiche_def join jnt_fic_attr using (fd_id)
+00076            join attr_def using (ad_id) where fd_id=".$p_type." order by ad_id";
+00077 
+00078     $Res=ExecSql($p_cn,$sql);
+00079     $Max=pg_NumRows($Res);
+00080     // Put the card modele id (fiche_def.fd_id)
+00081     $r.='<INPUT TYPE="HIDDEN" name="fd_id" value="'.$p_type.'">';
+00082     for ($i=0;$i < $Max;$i++) {
+00083       $l_line=pg_fetch_array($Res,$i);
+00084 
+00085       // The number of the attribute
+00086       $Hid=sprintf('<INPUT TYPE="HIDDEN" name="ad_id%d" value="%s">',
+00087                    $i,$l_line['ad_id']);
+00088 
+00089       $but_search_poste="";
+00090       // Javascript for searching the account
+00091       if ( $l_line ['ad_id'] == ATTR_DEF_ACCOUNT ) {
+00092         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$l_sessid.'\',\'av_text'.$i.'\')">';
+00093       } 
+00094       // Javascript for showing the tva
+00095       if ( $l_line ['ad_id'] == ATTR_DEF_TVA ) {
+00096         $but_search_poste='<INPUT TYPE="BUTTON" VALUE="Montre" OnClick="ShowTva(\''.$l_sessid.'\',\'av_text'.$i.'\')">';
+00097       }
+00098       // content of the attribute
+00099       $r.= sprintf('<TR><TD> %s </TD><TD><INPUT TYPE="TEXT" NAME="av_text%d">%s %s</TD></TR>',
+00100               $l_line['ad_text'], $i,$Hid,$but_search_poste);
+00101    }  
+00102     $r.="</TABLE>";
+00103     $r.='<INPUT TYPE="SUBMIT" name="add_fiche" value="Mis à jour">';
+00104     $r.= '<INPUT TYPE="HIDDEN" name="inc" value="'.$Max.'">';
+00105     $r.='</FORM>';
+00106     return $r;
+00107 }
+00108 if ( isset($_POST['add_fiche'])) {
+00109   AddFiche($cn,$_POST["fiche"],$HTTP_POST_VARS);
+00110 ?>
+00111 <SCRIPT>
+00112 
+00113   window.close();
+00114 </SCRIPT>
+00115 <?
+00116     return;
+00117 }
+00118 // Prob : ajout de fiche mais si plusieur cat possible ???
+00119  // Get the field from database
+00120   // if e_type contains a list of value
+00121   if ( $e_type != 'cred' and $e_type != 'deb')     {
+00122     //    $list['fiche']=$e_type;
+00123     $sql="select fd_id from fiche_def where frd_id in ($e_type)";
+00124     $Res=ExecSql($cn,$sql);
+00125     // fetch it
+00126     $Max=pg_NumRows($Res);
+00127     if ( $Max==0) {
+00128       echo_warning("No rows");
+00129     exit();
+00130     }
+00131     $n=pg_NumRows($Res);
+00132     for ($i=0;$i <$n;$i++) {
+00133       $f=pg_fetch_array($Res,$i);
+00134       $e[$i]=$f['fd_id'];
+00135     }
+00136     $list['fiche']=join(',',$e);
+00137   } else { // We have to find it from the database
+00138     if ( $e_type == 'deb' ) {
+00139       $get='jrn_def_fiche_deb';
+00140       $sql="select $get as fiche from jrn_def where jrn_def_id=".$_GET['p_jrn'];
+00141     }
+00142     if ( $e_type == 'cred' ) {
+00143       $get='jrn_def_fiche_cred';
+00144     $sql="select $get as fiche from jrn_def where jrn_def_id=".$_GET['p_jrn'];
+00145     }
+00146     
 00147     
-00148   // fetch it
-00149     $Max=pg_NumRows($Res);
-00150     if ( $Max==0) {
-00151       echo_warning("No rows");
-00152     exit();
-00153     }
-00154     // Normally Max must be == 1
-00155     $list=pg_fetch_array($Res,0);
-00156     if ( $list['fiche']=="") {
-00157       echo_warning("Journal mal paramètré");
-00158       return;
-00159     }
-00160   }
-00161 
-00162 
-00163 // Compter le nombre de cat. possible
-00164 $a=explode(",",$list['fiche']);
+00148 
+00149     $Res=ExecSql($cn,$sql);
+00150     
+00151   // fetch it
+00152     $Max=pg_NumRows($Res);
+00153     if ( $Max==0) {
+00154       echo_warning("No rows");
+00155     exit();
+00156     }
+00157     // Normally Max must be == 1
+00158     $list=pg_fetch_array($Res,0);
+00159     if ( $list['fiche']=="") {
+00160       echo_warning("Journal mal paramètré");
+00161       return;
+00162     }
+00163   }
+00164 
 00165 
-00166 // sinon si cat = 1 ou si var. cat vaut qq chose
-00167 // Montrer le contenu de fiche
-00168 if ( sizeof($a) == 1 ) {
-00169   if ( strlen(trim($a[0])) != 0)
-00170  // Display a blank  card from the selected category
-00171         $f=new_fiche($cn,$a[0]);
-00172   echo $f;
-00173 }
-00174  
-00175 if ( isset($_POST['cat'])) {
-00176         $f=new_fiche($cn,$_POST['cat']);
-00177         echo $f;
-00178 }
-00179 
-00180 // si cat > 1 proposer choix cat
-00181 //      recharger avec var. cat
-00182 if ( sizeof($a)>1 and !isset ($_POST['cat']))
-00183   {
-00184     echo "Choix catégories fiche";
-00185     echo '<FORM METHOD="POST" ACTION="'.$_SERVER['REQUEST_URI'].'">';
-00186     foreach ($a as $element) {
-00187       printf('<INPUT TYPE="RADIO" NAME="cat" value="%s">%s<br>',
-00188              $element,GetFicheDefName($cn,$element));
-00189     
-00190   }
-00191     echo '<INPUT TYPE="SUBMIT" value="Choisir">';
-00192     echo "<FORM>";
+00166 // Compter le nombre de cat. possible
+00167 $a=explode(",",$list['fiche']);
+00168 
+00169 // sinon si cat = 1 ou si var. cat vaut qq chose
+00170 // Montrer le contenu de fiche
+00171 if ( sizeof($a) == 1 ) {
+00172   if ( strlen(trim($a[0])) != 0)
+00173  // Display a blank  card from the selected category
+00174         $f=new_fiche($cn,$a[0]);
+00175   echo $f;
+00176 }
+00177  
+00178 if ( isset($_POST['cat'])) {
+00179         $f=new_fiche($cn,$_POST['cat']);
+00180         echo $f;
+00181 }
+00182 
+00183 // si cat > 1 proposer choix cat
+00184 //      recharger avec var. cat
+00185 if ( sizeof($a)>1 and !isset ($_POST['cat']))
+00186   {
+00187     echo "Choix catégories fiche";
+00188     echo '<FORM METHOD="POST" ACTION="'.$_SERVER['REQUEST_URI'].'">';
+00189     foreach ($a as $element) {
+00190       printf('<INPUT TYPE="RADIO" NAME="cat" value="%s">%s<br>',
+00191              $element,GetFicheDefName($cn,$element));
+00192     
 00193   }
-00194 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00194 echo '<INPUT TYPE="SUBMIT" value="Choisir">'; +00195 echo "<FORM>"; +00196 } +00197 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche__new_8php.html b/doc/developper/html/fiche__new_8php.html index 0fb213c7a..46269e1f8 100644 --- a/doc/developper/html/fiche__new_8php.html +++ b/doc/developper/html/fiche__new_8php.html @@ -4,10 +4,12 @@ - + -

fiche_new.php File Reference

+

fiche_new.php File Reference

Create a new card in a popup window. More... +

+

Go to the source code of this file. @@ -32,7 +34,12 @@
 $list ['fiche'] = join(',',$e)
-


Function Documentation

+

Detailed Description

+Create a new card in a popup window. +

+ +

+Definition in file fiche_new.php.


Function Documentation

@@ -69,9 +76,9 @@

-Definition at line 57 of file fiche_new.php. +Definition at line 60 of file fiche_new.php.

-References $l_line, $Max, $r, $Res, $sql, echo_debug(), ExecSql(), name, and value. +References $l_line, $Max, $r, $Res, $sql, echo_debug(), ExecSql(), name, and value.


Variable Documentation

@@ -97,7 +104,7 @@ References $l_line,

-Definition at line 131 of file fiche_new.php. +Definition at line 134 of file fiche_new.php.

@@ -122,9 +129,9 @@ Definition at line 131

-Definition at line 133 of file fiche_new.php. +Definition at line 136 of file fiche_new.php.

-Referenced by FormAchInput(), FormVenInput(), GetFicheJrn(), IsFicheOfJrn(), and Cpdf::selectFont(). +Referenced by FormAchInput(), FormVenInput(), GetFicheJrn(), IsFicheOfJrn(), and Cpdf::selectFont().

@@ -149,7 +156,7 @@ Referenced by FormA

-Definition at line 123 of file fiche_new.php. +Definition at line 126 of file fiche_new.php.

@@ -174,9 +181,9 @@ Definition at line 123

-Definition at line 128 of file fiche_new.php. +Definition at line 131 of file fiche_new.php.

-Referenced by AddForm(), Cezpdf::ezPrvtTableDrawLines(), and GetConcerned(). +Referenced by AddForm(), Cezpdf::ezPrvtTableDrawLines(), and GetConcerned().

@@ -201,7 +208,7 @@ Referenced by AddForm()

-Definition at line 26 of file fiche_new.php. +Definition at line 29 of file fiche_new.php.

@@ -226,7 +233,7 @@ Definition at line 26

-Definition at line 121 of file fiche_new.php. +Definition at line 124 of file fiche_new.php.

@@ -251,7 +258,7 @@ Definition at line 121

-Definition at line 28 of file fiche_new.php. +Definition at line 31 of file fiche_new.php.

@@ -276,10 +283,10 @@ Definition at line 28

-Definition at line 113 of file fiche_new.php. +Definition at line 116 of file fiche_new.php. -


Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche__search_8php-source.html b/doc/developper/html/fiche__search_8php-source.html index 555438c2c..43c3cdb06 100644 --- a/doc/developper/html/fiche__search_8php-source.html +++ b/doc/developper/html/fiche__search_8php-source.html @@ -4,7 +4,7 @@ - +

fiche_search.php

Go to the documentation of this file.
00001 <?
@@ -27,164 +27,163 @@
 00018 */
 00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00020 /* $Revision$ */
-00021 include_once ("ac_common.php");
-00022 include_once ("poste.php");
-00023 include_once ("postgres.php");
-00024 include_once("jrn.php");
-00025 /* Admin. Dossier */
-00026 $rep=DbConnect();
-00027 include_once ("class_user.php");
-00028 $User=new cl_user($rep);
-00029 $User->Check();
-00030 
-00031 //determine focus:
-00032 if ( isset ( $_POST['search']) )
-00033 {
-00034   html_page_start($User->theme,"onLoad=\"window.focus();SetFocus('select0',0)\"");
-00035 } else
-00036 {
-00037   html_page_start($User->theme,"onLoad=\"window.focus();SetFocus('fic_search',0)\"");
-00038 }
-00039 
-00040 
-00041 
-00042 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
-00043   echo "You must choose a Dossier ";
-00044   phpinfo();
-00045   exit -2;
-00046 }
-00047 
-00048 include_once ("check_priv.php");
-00049 $cn=DbConnect($_SESSION['g_dossier']);
-00050 // Get The priv on the selected folder
-00051 if ( $User->CheckAction($cn,FICHE_READ) == 0 ){
-00052     /* Cannot Access */
-00053     echo '<h2 class="error"> Vous n\' avez pas accès</h2>';
-00054     return;
-00055 }
-00056 
-00057 function get_list_fiche($p_cn,$get,$p_jrn)
-00058 {
-00059   $sql="select $get as fiche from jrn_def where jrn_def_id=$p_jrn";
-00060   $Res=ExecSql($p_cn,$sql);
-00061 
-00062   // fetch it
-00063   $Max=pg_NumRows($Res);
-00064   if ( $Max==0) {
-00065     echo_warning("No rows");
-00066     exit();
-00067   }
-00068   // Normally Max must be == 1
-00069   $list=pg_fetch_array($Res,0);
-00070   if ( $list['fiche']=="") {
-00071     echo_warning("Journal mal paramètré");
-00072     exit();
-00073   }
-00074   $list_fiche=$list['fiche'];
-00075   return $list_fiche;
-00076 }
-00077 ?>
-00078 <script language="javascript">
-00079 function SetData (name_ctl,value,value_2,value_3,value_4,value_5,value_6) {
-00080   self.opener.SetData(name_ctl,value,value_2,value_3,value_4,value_5,value_6);
-00081   window.close();
-00082 }
-00083 </script>
-00084 <?
-00085 $cn=DbConnect($_SESSION['g_dossier']);
-00086 $r="";
-00087 
-00088 foreach ($HTTP_GET_VARS as $key=>$element) {
-00089   // The value are e_name e_type e_PHPSESSID
-00090   ${"e_$key"}=$element;
-00091   echo_debug('fiche_search.php',__LINE__,"e_$key =$element<br>");
-00092 
-00093 }
-00094 $e_fic_search=(isset ($_POST['fic_search']))?$_POST['fic_search']:"";
+00025 include_once ("ac_common.php");
+00026 include_once ("poste.php");
+00027 include_once ("postgres.php");
+00028 include_once("jrn.php");
+00029 /* Admin. Dossier */
+00030 $rep=DbConnect();
+00031 include_once ("class_user.php");
+00032 $User=new cl_user($rep);
+00033 $User->Check();
+00034 
+00035 //determine focus:
+00036 if ( isset ( $_POST['search']) )
+00037 {
+00038   html_page_start($User->theme,"onLoad=\"window.focus();SetFocus('select0',0)\"");
+00039 } else
+00040 {
+00041   html_page_start($User->theme,"onLoad=\"window.focus();SetFocus('fic_search',0)\"");
+00042 }
+00043 
+00044 
+00045 
+00046 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
+00047   echo "You must choose a Dossier ";
+00048   exit -2;
+00049 }
+00050 
+00051 include_once ("check_priv.php");
+00052 $cn=DbConnect($_SESSION['g_dossier']);
+00053 // Get The priv on the selected folder
+00054 if ( $User->CheckAction($cn,FICHE_READ) == 0 ){
+00055     /* Cannot Access */
+00056     echo '<h2 class="error"> Vous n\' avez pas accès</h2>';
+00057     return;
+00058 }
+00059 
+00060 function get_list_fiche($p_cn,$get,$p_jrn)
+00061 {
+00062   $sql="select $get as fiche from jrn_def where jrn_def_id=$p_jrn";
+00063   $Res=ExecSql($p_cn,$sql);
+00064 
+00065   // fetch it
+00066   $Max=pg_NumRows($Res);
+00067   if ( $Max==0) {
+00068     echo_warning("No rows");
+00069     exit();
+00070   }
+00071   // Normally Max must be == 1
+00072   $list=pg_fetch_array($Res,0);
+00073   if ( $list['fiche']=="") {
+00074     echo_warning("Journal mal paramètré");
+00075     exit();
+00076   }
+00077   $list_fiche=$list['fiche'];
+00078   return $list_fiche;
+00079 }
+00080 ?>
+00081 <script language="javascript">
+00082 function SetData (name_ctl,value,value_2,value_3,value_4,value_5,value_6) {
+00083   self.opener.SetData(name_ctl,value,value_2,value_3,value_4,value_5,value_6);
+00084   window.close();
+00085 }
+00086 </script>
+00087 <?
+00088 $cn=DbConnect($_SESSION['g_dossier']);
+00089 $r="";
+00090 
+00091 foreach ($HTTP_GET_VARS as $key=>$element) {
+00092   // The value are e_name e_type e_PHPSESSID
+00093   ${"e_$key"}=$element;
+00094   echo_debug('fiche_search.php',__LINE__,"e_$key =$element<br>");
 00095 
-00096 $r.="<FORM METHOD=\"POST\" ACTION=\"".$_SERVER['REQUEST_URI']."\">";
-00097 $r.="Recherche : ".'<INPUT TYPE="TEXT" NAME="fic_search" VALUE="'.$e_fic_search.'">';
-00098 $r.='<INPUT TYPE="submit" name="search" value="Go">';
-00099 //$r.="</FORM>";
-00100 $r.="<div>";
-00101 echo $r;
-00102 $r="";
-00103 
-00104 // Show result of the search 
-00105 if ( isset ( $_POST['search']) )  {
+00096 }
+00097 $e_fic_search=(isset ($_POST['fic_search']))?$_POST['fic_search']:"";
+00098 
+00099 $r.="<FORM METHOD=\"POST\" ACTION=\"".$_SERVER['REQUEST_URI']."\">";
+00100 $r.="Recherche : ".'<INPUT TYPE="TEXT" NAME="fic_search" VALUE="'.$e_fic_search.'">';
+00101 $r.='<INPUT TYPE="submit" name="search" value="Go">';
+00102 //$r.="</FORM>";
+00103 $r.="<div>";
+00104 echo $r;
+00105 $r="";
 00106 
-00107   // Get the field from database
-00108   if ( $e_type == 'deb' ) {
-00109     $get='jrn_def_fiche_deb';
-00110     $list_fiche=get_list_fiche($cn,$get,$_GET['p_jrn']);
-00111     $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )";
-00112   }
-00113   if ( $e_type == 'cred' ) {
-00114     $get='jrn_def_fiche_cred';
-00115     $list_fiche=get_list_fiche($cn,$get,$_GET['p_jrn']);
-00116     $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )";
-00117   }
-00118 
-00119 
-00120   // if e_type contains a list of value
-00121   if ( $e_type != 'cred' and $e_type != 'deb')     {
-00122     $list_fiche=$e_type;
-00123     $sql="select * from vw_fiche_attr where frd_id in ( $list_fiche )";
-00124     //    $sql="select * from vw_fiche_attr ";
-00125   }
-00126 // e_fic_search contains the pattern
-00127 
-00128   if (strlen(trim($e_fic_search) ) == 0 ) {
-00129     $Res=ExecSql($cn,$sql); 
-00130   } else {
-00131     $Res=ExecSql($cn,"$sql and upper(vw_name) like upper('%$e_fic_search%')"); 
-00132   }
-00133 
-00134   // Test whether rows are returned
-00135  if ( ($Max = pg_NumRows($Res) ) == 0 ) {
-00136    echo_warning("Pas de fiche trouvée");
-00137    return;
-00138  } 
-00139  // Show the cards
-00140  for ( $i=0; $i < $Max; $i++)  {
-00141 
-00142   //set focus on first "Select" button.
-00143    
-00144   $row=pg_fetch_array($Res,$i);
-00145   if ( $i %2  == 0 ) 
-00146     $class="even";
-00147   else
-00148     $class="odd";
-00149   $text=FormatString($row['vw_name']);
-00150   $r.="<span class=\"$class\">";
-00151   $r.=sprintf ('<input name="%s" type="button" onClick="'."SetData('%s','%s','%s','%s','%s','%s','%s')".'" value="%s">',
-00152         "select" . $i,
-00153               $e_name,
-00154               $row['quick_code'] ,
-00155               $text, 
-00156               $row['vw_sell'], 
-00157               $row['vw_buy'], 
-00158               $row['tva_id'], 
-00159                $row['tva_label']  ,
-00160                $row['quick_code'] 
-00161                );
-00162   $r.="&nbsp;".$row['vw_name'];
-00163   if ( $row['vw_addr'] !="")
-00164     $r.="<br><font size=-1>Adresse:&nbsp;".$row['vw_addr']."&nbsp;".$row['vw_cp']."</font>";
-00165   $r.="</span>";
-00166  }
-00167 }
-00168 $r.="</div>";
-00169 $r.="</FORM>";
-00170 echo $r;
-00171 
-00172 ?>
-00173 
-00174 <?
-00175 
-00176 html_page_stop();
-00177 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00107 // Show result of the search +00108 if ( isset ( $_POST['search']) ) { +00109 +00110 // Get the field from database +00111 if ( $e_type == 'deb' ) { +00112 $get='jrn_def_fiche_deb'; +00113 $list_fiche=get_list_fiche($cn,$get,$_GET['p_jrn']); +00114 $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; +00115 } +00116 if ( $e_type == 'cred' ) { +00117 $get='jrn_def_fiche_cred'; +00118 $list_fiche=get_list_fiche($cn,$get,$_GET['p_jrn']); +00119 $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; +00120 } +00121 +00122 +00123 // if e_type contains a list of value +00124 if ( $e_type != 'cred' and $e_type != 'deb') { +00125 $list_fiche=$e_type; +00126 $sql="select * from vw_fiche_attr where frd_id in ( $list_fiche )"; +00127 // $sql="select * from vw_fiche_attr "; +00128 } +00129 // e_fic_search contains the pattern +00130 +00131 if (strlen(trim($e_fic_search) ) == 0 ) { +00132 $Res=ExecSql($cn,$sql); +00133 } else { +00134 $Res=ExecSql($cn,"$sql and upper(vw_name) like upper('%$e_fic_search%')"); +00135 } +00136 +00137 // Test whether rows are returned +00138 if ( ($Max = pg_NumRows($Res) ) == 0 ) { +00139 echo_warning("Pas de fiche trouvée"); +00140 return; +00141 } +00142 // Show the cards +00143 for ( $i=0; $i < $Max; $i++) { +00144 +00145 //set focus on first "Select" button. +00146 +00147 $row=pg_fetch_array($Res,$i); +00148 if ( $i %2 == 0 ) +00149 $class="even"; +00150 else +00151 $class="odd"; +00152 $text=FormatString($row['vw_name']); +00153 $r.="<span class=\"$class\">"; +00154 $r.=sprintf ('<input name="%s" type="button" onClick="'."SetData('%s','%s','%s','%s','%s','%s','%s')".'" value="%s">', +00155 "select" . $i, +00156 $e_name, +00157 $row['quick_code'] , +00158 $text, +00159 $row['vw_sell'], +00160 $row['vw_buy'], +00161 $row['tva_id'], +00162 $row['tva_label'] , +00163 $row['quick_code'] +00164 ); +00165 $r.="&nbsp;".$row['vw_name']; +00166 if ( $row['vw_addr'] !="") +00167 $r.="<br><font size=-1>Adresse:&nbsp;".$row['vw_addr']."&nbsp;".$row['vw_cp']."</font>"; +00168 $r.="</span>"; +00169 } +00170 } +00171 $r.="</div>"; +00172 $r.="</FORM>"; +00173 echo $r; +00174 +00175 ?> +00176 +00177 <? +00178 +00179 html_page_stop(); +00180 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fiche__search_8php.html b/doc/developper/html/fiche__search_8php.html index 1454a146b..311cb931c 100644 --- a/doc/developper/html/fiche__search_8php.html +++ b/doc/developper/html/fiche__search_8php.html @@ -4,10 +4,12 @@ - + -

fiche_search.php File Reference

+

fiche_search.php File Reference

Search a card in a popup window. More... +

+

Go to the source code of this file. @@ -31,7 +33,12 @@
 $sql = "select * from vw_fiche_attr where fd_id in ( $list_fiche )"
-


Variable Documentation

+

Detailed Description

+Search a card in a popup window. +

+ +

+Definition in file fiche_search.php.


Variable Documentation

@@ -54,7 +61,7 @@

-Definition at line 49 of file fiche_search.php. +Definition at line 52 of file fiche_search.php.

@@ -79,7 +86,7 @@ Definition at line 49

-Definition at line 94 of file fiche_search.php. +Definition at line 97 of file fiche_search.php.

@@ -104,7 +111,7 @@ Definition at line 94

-Definition at line 69 of file fiche_search.php. +Definition at line 72 of file fiche_search.php.

@@ -129,7 +136,7 @@ Definition at line 69

-Definition at line 74 of file fiche_search.php. +Definition at line 77 of file fiche_search.php.

@@ -154,7 +161,7 @@ Definition at line 74

-Definition at line 63 of file fiche_search.php. +Definition at line 66 of file fiche_search.php.

@@ -179,7 +186,7 @@ Definition at line 63

-Definition at line 86 of file fiche_search.php. +Definition at line 89 of file fiche_search.php.

@@ -204,7 +211,7 @@ Definition at line 86

-Definition at line 26 of file fiche_search.php. +Definition at line 30 of file fiche_search.php.

@@ -229,7 +236,7 @@ Definition at line 26

-Definition at line 111 of file fiche_search.php. +Definition at line 114 of file fiche_search.php.

@@ -254,10 +261,10 @@ Definition at line 11

-Definition at line 28 of file fiche_search.php. +Definition at line 32 of file fiche_search.php. -


Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/files.html b/doc/developper/html/files.html index b4c318881..7f82c5171 100644 --- a/doc/developper/html/files.html +++ b/doc/developper/html/files.html @@ -4,138 +4,144 @@ - +

phpcompta File List

Here is a list of all files with brief descriptions: - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + - - - - - - + + + + + + - + - + - - - - - - - - + + + + + + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
/home/dany/developpement/phpcompta-dev/phpcompta/html/a.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/admin_repo.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/annulation.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/b.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/bal_csv.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/bilan.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/central.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/commercial.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/admin_repo.php [code]Administration of the repository : creation of user, folder, security, templates... Accessible only by the administrator
/home/dany/developpement/phpcompta-dev/phpcompta/html/annulation.php [code]In a popup window manage the deletion of the operations
/home/dany/developpement/phpcompta-dev/phpcompta/html/bal_csv.php [code]Return the balance in CSV format
/home/dany/developpement/phpcompta-dev/phpcompta/html/bilan.php [code]Send a Bilan in RTF format
/home/dany/developpement/phpcompta-dev/phpcompta/html/central.php [code]Concerns the centralisation of the operations
/home/dany/developpement/phpcompta-dev/phpcompta/html/commercial.php [code]Base of the module "Gestion", the p_action indicates what file must included and this file will manage the request (customer, supplier, contact,...)
/home/dany/developpement/phpcompta-dev/phpcompta/html/demo.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/dossier_prefs.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/ecrit_ouv.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/export_ouv.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/facturation.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/fiche.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/fiche_csv.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/fiche_new.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/fiche_search.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/form.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/form_csv.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/form_pdf.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/import.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/index.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_add.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_csv.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_detail.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_op_detail.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_pdf.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_search.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_update.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/line_update.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/listing_client.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/login.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/logout.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/modify_op.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/ecrit_ouv.php [code]For reporting the saldo of account to the next year
/home/dany/developpement/phpcompta-dev/phpcompta/html/export_ouv.php [code]Send the final balance in CSV this balance is used to open an exercice
/home/dany/developpement/phpcompta-dev/phpcompta/html/facturation.php [code]Obsolete
/home/dany/developpement/phpcompta-dev/phpcompta/html/fiche.php [code]Module to manage the card (removing, listing, creating, modify attribut)
/home/dany/developpement/phpcompta-dev/phpcompta/html/fiche_csv.php [code]Send a CSV file with card
/home/dany/developpement/phpcompta-dev/phpcompta/html/fiche_new.php [code]Create a new card in a popup window
/home/dany/developpement/phpcompta-dev/phpcompta/html/fiche_search.php [code]Search a card in a popup window
/home/dany/developpement/phpcompta-dev/phpcompta/html/form.php [code]Handle your own report: create or view report
/home/dany/developpement/phpcompta-dev/phpcompta/html/form_csv.php [code]Send a report in CSV format
/home/dany/developpement/phpcompta-dev/phpcompta/html/form_pdf.php [code]Send a report in PDF
/home/dany/developpement/phpcompta-dev/phpcompta/html/gestion_fiche_search.php [code]Obsolete
/home/dany/developpement/phpcompta-dev/phpcompta/html/import.php [code]For importing Bank operations
/home/dany/developpement/phpcompta-dev/phpcompta/html/index.php [code]Default page where user access
/home/dany/developpement/phpcompta-dev/phpcompta/html/info.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_add.php [code]To add a ledger
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_csv.php [code]Send a ledger in CSV format
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_detail.php [code]Show and let modify ledger parameter
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_op_detail.php [code]Show the detail of a operation in a popup windows
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_pdf.php [code]Send a ledger in a pdf format
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_search.php [code]Search a operation from a ledger into a popup window, used for the "rapprochement"
/home/dany/developpement/phpcompta-dev/phpcompta/html/jrn_update.php [code]Create, modify parameter ledger
/home/dany/developpement/phpcompta-dev/phpcompta/html/line_update.php [code]Modify the "Plan Comptable"
/home/dany/developpement/phpcompta-dev/phpcompta/html/listing_client.php [code]Electronic declaration for VAT BELGIUM --> experimental
/home/dany/developpement/phpcompta-dev/phpcompta/html/login.php [code]Login page
/home/dany/developpement/phpcompta-dev/phpcompta/html/logout.php [code]Logout
/home/dany/developpement/phpcompta-dev/phpcompta/html/modify_op.php [code]Update a operation in a popup window : add a document
/home/dany/developpement/phpcompta-dev/phpcompta/html/not_implemented.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/p.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/parametre.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/pcmn_update.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/poste_csv.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/poste_pdf.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/poste_search.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/print_balance.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/print_invoice.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/priv_user.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/recherche.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/sec_pdf.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/send_jrn_pdf.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/send_poste_pdf.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/show_document.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/show_tva.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/stock.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/t.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/parametre.php [code]Parametre module
/home/dany/developpement/phpcompta-dev/phpcompta/html/pcmn_update.php [code]Concerns the management of the "Plan Comptable"
/home/dany/developpement/phpcompta-dev/phpcompta/html/poste_csv.php [code]Send the poste list in csv
/home/dany/developpement/phpcompta-dev/phpcompta/html/poste_pdf.php [code]Send the account list in PDF
/home/dany/developpement/phpcompta-dev/phpcompta/html/poste_search.php [code]Search a account in a popup window
/home/dany/developpement/phpcompta-dev/phpcompta/html/print_balance.php [code]Print the balance in pdf format
/home/dany/developpement/phpcompta-dev/phpcompta/html/print_invoice.php [code]Print invoice
/home/dany/developpement/phpcompta-dev/phpcompta/html/priv_user.php [code]Users Security
/home/dany/developpement/phpcompta-dev/phpcompta/html/recherche.php [code]Search module
/home/dany/developpement/phpcompta-dev/phpcompta/html/sec_pdf.php [code]Print the user security in pdf
/home/dany/developpement/phpcompta-dev/phpcompta/html/send_jrn_pdf.php [code]Print the ledger in pdf
/home/dany/developpement/phpcompta-dev/phpcompta/html/send_poste_pdf.php [code]Print the account in pdf
/home/dany/developpement/phpcompta-dev/phpcompta/html/show_document.php [code]Retrieve a document
/home/dany/developpement/phpcompta-dev/phpcompta/html/show_document_modele.php [code]Send the document template
/home/dany/developpement/phpcompta-dev/phpcompta/html/show_pj.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/show_tva.php [code]Popup window to let the user choose the vat
/home/dany/developpement/phpcompta-dev/phpcompta/html/stock.php [code]Manage the stock by year
/home/dany/developpement/phpcompta-dev/phpcompta/html/test.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/test_smarty.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_advanced.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_compta.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_impress.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_jrn.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_login.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_pref.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_sec.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_advanced.php [code]Obsolete
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_compta.php [code]Main page of the accountancy module
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_impress.php [code]Main page for the printing
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_jrn.php [code]Main page for encoding in the ledger
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_login.php [code]Welcome page where the folder and module are choosen
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_pref.php [code]Page for the personal preference (theme, password,...)
/home/dany/developpement/phpcompta-dev/phpcompta/html/user_sec.php [code]Set the security for an user
/home/dany/developpement/phpcompta-dev/phpcompta/html/addon/class.ezpdf.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/addon/class.pdf.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/addon/readme.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/html/admin/setup.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/ac_common.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/action.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/balance.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/cbc_be.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/central_inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/check_priv.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_attribut.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_balance.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_customer.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_document_modele.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_fiche.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_fiche_def.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_invoice.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/ac_common.php [code]Common utilities for a lot of procedure, classe
/home/dany/developpement/phpcompta-dev/phpcompta/include/action.inc.php [code]Page who manage the different action (meeting, letter)
/home/dany/developpement/phpcompta-dev/phpcompta/include/balance.php [code]Show the balance and let you print it or export to PDF
/home/dany/developpement/phpcompta-dev/phpcompta/include/cbc_be.inc.php [code]This file must be included to parse the CVS from the CBC Bank
/home/dany/developpement/phpcompta-dev/phpcompta/include/central_inc.php [code]Concerns the centralization operations
/home/dany/developpement/phpcompta-dev/phpcompta/include/check_priv.php [code]Tools for checking the security
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_action.php [code]Class_action for manipulating actions action can be :
    +
  • an invoice
  • a meeting
  • an order
  • a letter
+
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_attribut.php [code]Manage the attribut of the card
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_balance.php [code]Class for manipulating data to print the balance of account
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_contact.php [code]Class for the contact, contact are derived from ficheContact are a card which are own by a another card (customer, supplier...)
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_customer.php [code]Derived from class fiche Customer are a specific kind of card
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_document.php [code]Class Document corresponds to the table document
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_document_modele.php [code]Class for the document template
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_document_type.php [code]Class for the table document_type
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_fiche.php [code]Define Class fiche and fiche def, those class are using class attribut
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_fiche_def.php [code]Fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_invoice.php [code]Class invoice to manage the customer invoice
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_jrn.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_operation.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_own.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_parm_code.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_poste.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_rapport.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_user.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_widget.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/client.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/constant.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/debug.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_operation.php [code]To remove ?
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_own.php [code]Class to manage the company parameter (address, name...)
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_parm_code.php [code]Manage the table parm_code which contains the custom parameter for the module accountancy
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_poste.php [code]Manage the account
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_rapport.php [code]Create, view, modify and parse report
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_user.php [code]Data & function about connected users
/home/dany/developpement/phpcompta-dev/phpcompta/include/class_widget.php [code]This class is used to create all the HTML INPUT TYPE
/home/dany/developpement/phpcompta-dev/phpcompta/include/client.inc.php [code]Called from the module "Gestion" to manage the customer
/home/dany/developpement/phpcompta-dev/phpcompta/include/constant.php [code]Contains all the variable + the javascript and some parameter
/home/dany/developpement/phpcompta-dev/phpcompta/include/contact.inc.php [code]File for adding contact, contact is a kind of fichethe contact class is derived from the class fiche the contact is in fact a card but more specific This file is included from the module "Gestion"
/home/dany/developpement/phpcompta-dev/phpcompta/include/debug.php [code]Debug procedure
/home/dany/developpement/phpcompta-dev/phpcompta/include/decla.BE.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/document_modele.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/error.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/eub_be.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/facture_inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/fiche_def.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/fiche_inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/document_modele.inc.php [code]Manage the document template
/home/dany/developpement/phpcompta-dev/phpcompta/include/error.php [code]Obsolete ?
/home/dany/developpement/phpcompta-dev/phpcompta/include/eub_be.inc.php [code]File included to parse CSV from EUB Bank
/home/dany/developpement/phpcompta-dev/phpcompta/include/facture.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/fiche_def.inc.php [code]Let customise the fiche_def_ref for the user
/home/dany/developpement/phpcompta-dev/phpcompta/include/fiche_inc.php [code]Function for managing card, redundant with the class fiche
/home/dany/developpement/phpcompta-dev/phpcompta/include/form_inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/fortis_be.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/fortis_be.inc.php [code]File to include : parse the CSV file from fortis Bank Belgium
/home/dany/developpement/phpcompta-dev/phpcompta/include/import_inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_bilan.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_bilan.php [code]Form who call the printing of the bilan in RTF
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_fiche.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_jrn.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_listing_client.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_poste.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_rapport.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/ing_be.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/jrn.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/periode.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/poste.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_jrn.php [code]Ask for Printing the ledger (pdf,html)
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_listing_client.php [code]Print the listing of customer for vat
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_poste.php [code]Print account (html or pdf)
/home/dany/developpement/phpcompta-dev/phpcompta/include/impress_rapport.php [code]Print first the report in html and propose to print it in pdf
/home/dany/developpement/phpcompta-dev/phpcompta/include/ing_be.inc.php [code]File to be included to parse CSV from ING Belgium
/home/dany/developpement/phpcompta-dev/phpcompta/include/jrn.php [code]Work with the ledger
/home/dany/developpement/phpcompta-dev/phpcompta/include/periode.inc.php [code]Still used ?
/home/dany/developpement/phpcompta-dev/phpcompta/include/poste.inc.php [code]P_action contains the main action (always poste here) action contains the sub action
/home/dany/developpement/phpcompta-dev/phpcompta/include/poste.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/postgres.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/postgres.php [code]Contains the procedure for connecting to postgresql
/home/dany/developpement/phpcompta-dev/phpcompta/include/pref.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/preference.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/stock_inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/tva.inc.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_action_ach.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_action_fin.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_action_gl.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_action_ods.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_action_ven.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_common.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_form_ach.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_form_fin.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_form_ods.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_form_ven.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_menu.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_update.php [code]
/home/dany/developpement/phpcompta-dev/phpcompta/include/preference.php [code]Include file for the periode form, currency,..
/home/dany/developpement/phpcompta-dev/phpcompta/include/stock_inc.php [code]Function for managing the stock
/home/dany/developpement/phpcompta-dev/phpcompta/include/tva.inc.php [code]Included file for customizing with the vat (account,rate...)
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_action_ach.php [code]Included file for the ledger of expenses
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_action_fin.php [code]Included file for the financial ledger
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_action_gl.php [code]Included file for the great ledger
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_action_ods.php [code]Included file for the miscellaneous operation ledger
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_action_ven.php [code]Manage the ledger of type VEN
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_common.php [code]Common functions
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_form_ach.php [code]Functions for the ledger of expenses
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_form_fin.php [code]Functions for the financial ledger
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_form_ods.php [code]Functions for the ledger of misc. operation
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_form_ven.php [code]Functions for the ledger of sold
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_menu.php [code]Nearly all the menu are here, some of them returns a HTML string, others echo directly the result
/home/dany/developpement/phpcompta-dev/phpcompta/include/user_update.php [code]Check if still used
-
Generated on Wed May 31 21:39:14 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/form_8php-source.html b/doc/developper/html/form_8php-source.html index 3925b7d15..d4f87b228 100644 --- a/doc/developper/html/form_8php-source.html +++ b/doc/developper/html/form_8php-source.html @@ -4,7 +4,7 @@ - +

form.php

Go to the documentation of this file.
00001 <?
@@ -27,99 +27,98 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 
-00022 include_once ("ac_common.php");
-00023 include_once ("user_menu.php");
-00024 
-00025 html_page_start($_SESSION['g_theme']);
+00024 include_once ("ac_common.php");
+00025 include_once ("user_menu.php");
 00026 
-00027 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
-00028   echo "You must choose a Dossier ";
-00029   exit -2;
-00030 }
-00031 include_once ("postgres.php");
-00032 /* Admin. Dossier */
-00033 $rep=DbConnect();
-00034 include_once ("class_user.php");
-00035 $User=new cl_user($rep);
-00036 $User->Check();
-00037 
-00038 include_once("form_inc.php");
+00027 html_page_start($_SESSION['g_theme']);
+00028 
+00029 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
+00030   echo "You must choose a Dossier ";
+00031   exit -2;
+00032 }
+00033 include_once ("postgres.php");
+00034 /* Admin. Dossier */
+00035 $rep=DbConnect();
+00036 include_once ("class_user.php");
+00037 $User=new cl_user($rep);
+00038 $User->Check();
 00039 
-00040 include_once ("user_menu.php");
-00041 echo '<div class="u_tmenu">';
-00042 echo ShowMenuCompta($_SESSION['g_dossier']);
-00043 echo '</div>';
-00044 
-00045 include ("check_priv.php");
+00040 include_once("form_inc.php");
+00041 
+00042 include_once ("user_menu.php");
+00043 echo '<div class="u_tmenu">';
+00044 echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php");
+00045 echo '</div>';
 00046 
-00047 $cn=DbConnect($_SESSION['g_dossier']);
-00048 if ( $User->CheckAction($cn,FORM)==0){
-00049   /* Cannot Access */
-00050   NoAccess();
-00051  }
-00052 echo ShowMenuAdvanced("form.php");
-00053 if ( isset ($_POST["record"] )) {
-00054   echo '<DIV class="u_redcontent">';
-00055   AddForm($cn,$HTTP_POST_VARS);
-00056   echo "</DIV>";
-00057 }
-00058 if ( isset ($_POST["del_form"]) ) {
-00059   echo '<DIV class="u_redcontent">';
-00060   DeleteForm($cn,$_POST['fr_id']);
-00061    echo "</DIV>";
-00062 }
-00063 
-00064 ShowMenuComptaForm($_SESSION['g_dossier']);
+00047 include ("check_priv.php");
+00048 
+00049 $cn=DbConnect($_SESSION['g_dossier']);
+00050 if ( $User->CheckAction($cn,FORM)==0){
+00051   /* Cannot Access */
+00052   NoAccess();
+00053  }
+00054 echo ShowMenuAdvanced("form.php");
+00055 if ( isset ($_POST["record"] )) {
+00056   echo '<DIV class="u_redcontent">';
+00057   AddForm($cn,$HTTP_POST_VARS);
+00058   echo "</DIV>";
+00059 }
+00060 if ( isset ($_POST["del_form"]) ) {
+00061   echo '<DIV class="u_redcontent">';
+00062   DeleteForm($cn,$_POST['fr_id']);
+00063    echo "</DIV>";
+00064 }
 00065 
-00066 if ( isset($_GET["PHPSESSID"] )) {
-00067   $sessid=$_GET["PHPSESSID"];
-00068 } 
-00069 if ( isset($_POST["PHPSESSID"] )) {
-00070   $sessid=$_POST["PHPSESSID"];
-00071 } 
-00072 if ( isset( $_REQUEST['PHPSESSID'])) {
-00073         $sessid = $_REQUEST['PHPSESSID'];
-00074 }
-00075 
-00076 
-00077 if ( isset ($_GET["action"]) ) {
-00078   $action=$_GET["action"];
-00079   if ($action == "add" )
-00080     {
-00081       echo '<DIV class="u_redcontent">';
-00082       EncodeForm(1,$sessid);
-00083       echo "</DIV>";
-00084     }
-00085   if ($action=="view" ) {
-00086       echo '<DIV class="u_redcontent">';
-00087     if ( ! $_GET["fr_id"] ) {
-00088       echo_error("fr_id n'est pas donné");
-00089       return;
-00090     }
-00091     ViewForm($cn,$sessid,$_GET["fr_id"]);
-00092     echo "</DIV>";
-00093   }
-00094 } // if $_GET
-00095 if ( isset ($_POST["add_line"]) ) {
-00096   echo '<DIV class="u_redcontent">';
-00097   $line=$_POST["line"];
-00098   EncodeForm($line+1,$sessid,$HTTP_POST_VARS);
-00099   echo "</DIV>";
-00100 }
-00101 if ( isset ($_POST["update"]) ) {
-00102   echo '<DIV class="u_redcontent">';
-00103   UpdateForm($cn,$HTTP_POST_VARS);
-00104     ViewForm($cn,$sessid,$_POST["fr_id"]);
-00105 
-00106   echo "</DIV>";
-00107 }
-00108 
-00109 
-00110 //echo "</DIV>";
-00111 html_page_stop();
-00112 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00066 ShowMenuComptaForm($_SESSION['g_dossier']); +00067 +00068 if ( isset($_GET["PHPSESSID"] )) { +00069 $sessid=$_GET["PHPSESSID"]; +00070 } +00071 if ( isset($_POST["PHPSESSID"] )) { +00072 $sessid=$_POST["PHPSESSID"]; +00073 } +00074 if ( isset( $_REQUEST['PHPSESSID'])) { +00075 $sessid = $_REQUEST['PHPSESSID']; +00076 } +00077 +00078 +00079 if ( isset ($_GET["action"]) ) { +00080 $action=$_GET["action"]; +00081 if ($action == "add" ) +00082 { +00083 echo '<DIV class="u_redcontent">'; +00084 EncodeForm(1,$sessid); +00085 echo "</DIV>"; +00086 } +00087 if ($action=="view" ) { +00088 echo '<DIV class="u_redcontent">'; +00089 if ( ! $_GET["fr_id"] ) { +00090 echo_error("fr_id n'est pas donné"); +00091 return; +00092 } +00093 ViewForm($cn,$sessid,$_GET["fr_id"]); +00094 echo "</DIV>"; +00095 } +00096 } // if $_GET +00097 if ( isset ($_POST["add_line"]) ) { +00098 echo '<DIV class="u_redcontent">'; +00099 $line=$_POST["line"]; +00100 EncodeForm($line+1,$sessid,$HTTP_POST_VARS); +00101 echo "</DIV>"; +00102 } +00103 if ( isset ($_POST["update"]) ) { +00104 echo '<DIV class="u_redcontent">'; +00105 UpdateForm($cn,$HTTP_POST_VARS); +00106 ViewForm($cn,$sessid,$_POST["fr_id"]); +00107 +00108 echo "</DIV>"; +00109 } +00110 +00111 +00112 //echo "</DIV>"; +00113 html_page_stop(); +00114 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/form_8php.html b/doc/developper/html/form_8php.html index 3925e5be9..d296c8abe 100644 --- a/doc/developper/html/form_8php.html +++ b/doc/developper/html/form_8php.html @@ -4,10 +4,12 @@ - + -

form.php File Reference

+

form.php File Reference

handle your own report: create or view report More... +

+

Go to the source code of this file. @@ -21,7 +23,12 @@
 return
-


Variable Documentation

+

Detailed Description

+handle your own report: create or view report +

+ +

+Definition in file form.php.


Variable Documentation

@@ -44,7 +51,7 @@

-Definition at line 47 of file form.php. +Definition at line 49 of file form.php.

@@ -69,7 +76,7 @@ Definition at line 47 of f

-Definition at line 33 of file form.php. +Definition at line 35 of file form.php.

@@ -94,7 +101,7 @@ Definition at line 33 of f

-Definition at line 35 of file form.php. +Definition at line 37 of file form.php.

@@ -119,10 +126,10 @@ Definition at line 35 of f

-Definition at line 89 of file form.php. +Definition at line 91 of file form.php. -


Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/form__csv_8php-source.html b/doc/developper/html/form__csv_8php-source.html index 754261f0a..667548552 100644 --- a/doc/developper/html/form__csv_8php-source.html +++ b/doc/developper/html/form__csv_8php-source.html @@ -4,7 +4,7 @@ - +

form_csv.php

Go to the documentation of this file.
00001 <?
@@ -27,84 +27,84 @@
 00018 */
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-00021 include_once("ac_common.php");
-00022 include_once ("postgres.php");
-00023 include ('class_user.php');
-00024 include("class_rapport.php");
-00025 include("impress_inc.php");
-00026 header('Content-type: application/csv');
-00027 header('Content-Disposition: attachment;filename="rapport.csv"',FALSE);
-00028 
-00029 /* Admin. Dossier */
-00030 $cn=DbConnect($_SESSION['g_dossier']);
+00024 include_once("ac_common.php");
+00025 include_once ("postgres.php");
+00026 include ('class_user.php');
+00027 include("class_rapport.php");
+00028 include("impress_inc.php");
+00029 header('Content-type: application/csv');
+00030 header('Content-Disposition: attachment;filename="rapport.csv"',FALSE);
 00031 
-00032 
-00033 $User=new cl_user($cn);
-00034 $User->Check();
+00032 /* Admin. Dossier */
+00033 $cn=DbConnect($_SESSION['g_dossier']);
+00034 
 00035 
-00036 
-00037 $Form=new rapport($cn,$_POST['form_id']);
-00038 $Form->GetName();
-00039 // Step ?
-00040 //--
-00041 if ( $_POST['p_step'] == 0 )
-00042   {
-00043     $array=$Form->GetRow( $_POST['from_periode'],
-00044                           $_POST['to_periode']
-00045                           );
-00046     if ( count($Form->row ) == 0 ) 
-00047       exit;
-00048     
-00049     echo       "\"Mois,\"\t\"Description\"\t,".
-00050       "\"Montant\"\t";
-00051 
-00052 
-00053 
-00054     foreach ( $Form->row as $op ) { 
-00055       echo '"'.$op['desc'].'"'."\t,".
-00056         sprintf("%8.2f",$op['montant'])."\t".
-00057         "\n";
-00058       
-00059     }
-00060   } 
-00061  else 
-00062    {
-00063      // Gather all the data
-00064      //---
-00065      for ($e=$_POST['from_periode'];$e<=$_POST['to_periode'];$e+=$_POST['p_step'])
-00066        {
-00067         $periode=getPeriodeName($cn,$e);
-00068         if ( $periode == null ) continue;
-00069         $array[]=$Form->GetRow($e,$e);
-00070         $periode_name[]=$periode;
-00071        }
-00072      // Display column heading
-00073      //--
-00074      $x="";
-00075      foreach ($array[0] as $e) 
-00076        {
-00077          printf("%s%s",$x,$e['desc']);
-00078          $x=";";
-00079 
-00080        }
-00081      printf("\n");
-00082      // Display value for each line 
-00083      //--
-00084      $a=0;
-00085      foreach ($array as $e ) 
-00086        {
-00087          print $periode_name[$a];
-00088          $a++;
-00089          foreach ($e as $elt) 
-00090            {
-00091              printf(";%s",$elt['montant']);
-00092            }
-00093          printf("\n");
-00094        }
-00095    }
-00096   exit;
-00097 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00036 $User=new cl_user($cn); +00037 $User->Check(); +00038 +00039 +00040 $Form=new rapport($cn,$_POST['form_id']); +00041 $Form->GetName(); +00042 // Step ? +00043 //-- +00044 if ( $_POST['p_step'] == 0 ) +00045 { +00046 $array=$Form->GetRow( $_POST['from_periode'], +00047 $_POST['to_periode'] +00048 ); +00049 if ( count($Form->row ) == 0 ) +00050 exit; +00051 +00052 echo "\"Mois,\"\t\"Description\"\t,". +00053 "\"Montant\"\t"; +00054 +00055 +00056 +00057 foreach ( $Form->row as $op ) { +00058 echo '"'.$op['desc'].'"'."\t,". +00059 sprintf("%8.2f",$op['montant'])."\t". +00060 "\n"; +00061 +00062 } +00063 } +00064 else +00065 { +00066 // Gather all the data +00067 //--- +00068 for ($e=$_POST['from_periode'];$e<=$_POST['to_periode'];$e+=$_POST['p_step']) +00069 { +00070 $periode=getPeriodeName($cn,$e); +00071 if ( $periode == null ) continue; +00072 $array[]=$Form->GetRow($e,$e); +00073 $periode_name[]=$periode; +00074 } +00075 // Display column heading +00076 //-- +00077 $x=""; +00078 foreach ($array[0] as $e) +00079 { +00080 printf("%s%s",$x,$e['desc']); +00081 $x=";"; +00082 +00083 } +00084 printf("\n"); +00085 // Display value for each line +00086 //-- +00087 $a=0; +00088 foreach ($array as $e ) +00089 { +00090 print $periode_name[$a]; +00091 $a++; +00092 foreach ($e as $elt) +00093 { +00094 printf(";%s",$elt['montant']); +00095 } +00096 printf("\n"); +00097 } +00098 } +00099 exit; +00100 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/form__csv_8php.html b/doc/developper/html/form__csv_8php.html index a4ad69962..1894a7a7f 100644 --- a/doc/developper/html/form__csv_8php.html +++ b/doc/developper/html/form__csv_8php.html @@ -4,10 +4,12 @@ - + -

form_csv.php File Reference

+

form_csv.php File Reference

Send a report in CSV format. More... +

+

Go to the source code of this file. @@ -19,7 +21,12 @@
 $Form = new rapport($cn,$_POST['form_id'])
-


Variable Documentation

+

Detailed Description

+Send a report in CSV format. +

+ +

+Definition in file form_csv.php.


Variable Documentation

@@ -42,7 +49,7 @@

-Definition at line 30 of file form_csv.php. +Definition at line 33 of file form_csv.php.

@@ -67,7 +74,7 @@ Definition at line 30

-Definition at line 37 of file form_csv.php. +Definition at line 40 of file form_csv.php.

@@ -92,10 +99,10 @@ Definition at line 37

-Definition at line 33 of file form_csv.php. +Definition at line 36 of file form_csv.php. -


Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/form__inc_8php-source.html b/doc/developper/html/form__inc_8php-source.html index c30f81987..26da217e9 100644 --- a/doc/developper/html/form__inc_8php-source.html +++ b/doc/developper/html/form__inc_8php-source.html @@ -4,7 +4,7 @@ - +

form_inc.php

Go to the documentation of this file.
00001 <?
@@ -30,321 +30,219 @@
 00021 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00022 //$Revision$
 00023 include_once("impress_inc.php");
-00024 /* function EncodeForm
-00025  * Purpose : 
-00026  *          Encoding Form
-00027  * 
-00028  * parm : 
-00029  *      - array of previous changes
-00030  *      - sessid for the search window
-00031  *      - p_line number of line
-00032  * gen :
-00033  *      - none
-00034  * return:
-00035  *      - none
-00036  *
-00037  */ 
-00038 function EncodeForm($p_line,$p_sessid,$p_array=null) {
-00039   //  echo '<SCRIPT LANGUAGE="javascript" SRC="win_search_poste.js"></SCRIPT>';
-00040   include_once("constant.php");
-00041   echo JS_SEARCH_POSTE;
-00042    $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$p_sessid."','not')\">";
-00043   for ( $i =0 ; $i <= $p_line; $i++) {
-00044     ${"text$i"}="";
-00045     ${"form$i"}="";
-00046     ${"pos$i"}="";
-00047   }
-00048   if ( $p_array != null ) {
-00049     foreach ( $p_array as $key=> $element ) {
-00050       ${"$key"}=$element;
-00051       echo_debug ("EncodeForm $key = $element");
-00052 
-00053     }
-00054     
-00055   } else {
-00056     $form_nom="";
-00057     $text0="";
-00058     $form0="";
-00059   }
-00060   echo "<FORM ACTION=\"form.php\" METHOD=\"POST\">";
-00061   printf ("Nom du rapport : <INPUT TYPE=\"TEXT\" NAME=\"form_nom\" VALUE=\"%s\">",
-00062           $form_nom);
-00063   printf ('<INPUT TYPE="HIDDEN" NAME="line" value="%s"',
-00064           $p_line);
-00065 if ( isset ($fr_id))   printf ('<INPUT TYPE="HIDDEN" NAME="fr_id" value="%s"',
-00066           $fr_id);
-00067 
-00068   echo '<TABLE>';
-00069   echo "<TR>";
-00070   if ( isset($fr_id) )   echo "<TH> Position </TH>";
-00071   echo "<TH> Texte </TH>";
-00072   echo "<TH> Formule</TH>";
-00073 
-00074   echo '</TR>';
-00075   for ( $i =0 ; $i < $p_line;$i++) {
-00076     echo "<TR>";
-00077     // si fr_id != null alors les donnees viennent de 
-00078     // GetDataForm: ce n'est pas un nouvel enregistrement
-00079     //
-00080     if ( isset($fr_id)) {
-00081       echo "<TD>";
-00082       printf ('<input TYPE="TEXT" NAME="pos%d" size="3" VALUE="%s">',
-00083               $i,${"pos$i"});
-00084       echo '</TD>';
-00085     }
-00086 
-00087     echo "<TD>";
-00088     printf ('<input TYPE="TEXT" NAME="text%d" size="25" VALUE="%s">',
-00089             $i,${"text$i"});
-00090     echo '</TD>';
-00091 
-00092     echo "<TD>";
-00093     printf ('<input TYPE="TEXT" NAME="form%d" SIZE="25" VALUE="%s">',
-00094             $i,${"form$i"});
-00095     echo $search;
-00096     echo '</TD>';
-00097 
-00098     echo "</TR>";
-00099   }
-00100   echo "</TABLE>";
-00101   if ( isset($fr_id)){
-00102     echo '<INPUT TYPE="submit" value="Enregistre" name="update">';
-00103   }else {
-00104     echo '<INPUT TYPE="submit" value="Enregistre" name="record">';
-00105   }
-00106   echo '<INPUT TYPE="submit" value="Ajoute une ligne" name="add_line">';
-00107   echo '<INPUT TYPE="submit" value="Efface ce rapport" name="del_form">';
-00108 
-00109   echo "</FORM>";
-00110 
-00111 }
-00112 /* function ViewForm
-00113  * Purpose : Show the details of a form
-00114  * 
-00115  * parm : 
-00116  *      - $p_cn connection
-00117  *      - $p_id gives the formdef.fr_id
-00118  *      - sessid for the search window
-00119  * gen :
-00120  *      - none
-00121  * return: 
-00122  *      - none
-00123  *
-00124  */ 
-00125 function ViewForm($p_cn,$p_sessid,$p_id) {
-00126   $array=GetDataForm($p_cn,$p_id);
-00127   $l_nom=GetFormName($p_cn,$p_id);
-00128   $array['form_nom']=$l_nom;
-00129 
-00130   $l_line=GetNumberLine($p_cn,$p_id);
-00131   EncodeForm($l_line,$p_sessid,$array);
-00132 
-00133 }
-00134 /* function ViewForm
-00135  * Purpose : Show the details of a form
-00136  * 
-00137  * parm : 
-00138  *      - $p_cn connection
-00139  *      - $p_id gives the formdef.fr_id
-00140  *      - sessid for the search window
-00141  * gen :
-00142  *      - none
-00143  * return: 
-00144  *      - none
-00145  *
-00146  */ 
-00147 function DeleteForm($p_cn,$p_id) {
-00148   ExecSql($p_cn,"delete from form where fo_fr_id=$p_id");
-00149   ExecSql($p_cn,"delete from formdef where fr_id=$p_id");
-00150 }
-00151 /* function GetDataForm
-00152  * Purpose :
-00153  *         Get data from a form 
-00154  * parm : 
-00155  *      - $p_cn connection
-00156  *      - $p_id gives the formdef.fr_id
-00157  *      - 
-00158  * gen :
-00159  *      - none
-00160  * return:
-00161  *      - array
-00162  *
-00163  */ 
-00164 function GetDataForm($p_cn,$p_id) {
-00165   $Res=ExecSql($p_cn,"select fo_id,fo_fr_id,fo_pos,fo_label,fo_formula from form where fo_fr_id=$p_id
-00166                       order by fo_pos");
-00167   $Max=pg_NumRows($Res);
-00168   for ( $i=0;$i<$Max;$i++){
-00169     $l_line=pg_fetch_array($Res,$i);
-00170 
-00171     // get the fo_id
-00172     $text=sprintf("fo_id%d",$i);
-00173     $array[$text]=$l_line['fo_id'];
-00174     // get the fo_label
-00175     $text=sprintf("text%d",$i);
-00176     $array[$text]=$l_line['fo_label'];
-00177     // get the fo_formula
-00178     $text=sprintf("form%d",$i);
-00179     $array[$text]=$l_line['fo_formula'];
-00180     // get the pos
-00181     $text=sprintf("pos%d",$i);
-00182     $array[$text]=$l_line['fo_pos'];
-00183   } //for
-00184   $array["fr_id"]=$p_id;
-00185   return $array;
-00186 }
-00187 /* function GetNumberLine
-00188  * Purpose : Get the number of line of a form
-00189  * 
-00190  * parm : 
-00191  *      - $p_cn connection
-00192  *      - $p_id gives the formdef.fr_id
-00193  *      - 
-00194  * gen :
-00195  *      - none
-00196  * return:
-00197  *      - integer
-00198  *
-00199  */ 
-00200 function GetNumberLine($p_cn,$p_id) {
-00201   $Res=ExecSql($p_cn,"select * from form where fo_fr_id=".$p_id);
-00202   $count=pg_NumRows($Res);
-00203   return $count;
-00204 }
-00205 /* function GetFormName
-00206  * Purpose : Get the name of the form
-00207  * 
-00208  * parm : 
-00209  *      - $p_cn connection
-00210  *      - $p_id formdef.fr_id
-00211  * gen :
-00212  *      - none
-00213  * return:
-00214  *      - string name
-00215  *
-00216  */ 
-00217 function GetFormName($p_cn,$p_id) {
-00218   $Res=ExecSql($p_cn,"select fr_label from formdef where fr_id=".$p_id);
-00219   if ( pg_NumRows($Res) == 0 ) return null;
-00220   $name=pg_fetch_array($Res,0);
-00221   return $name['fr_label'];
-00222 }
-00223 /* function UpdateForm
-00224  * Purpose :
-00225  * 
-00226  * parm : 
-00227  *      -  $p_cn connexion
-00228  *      -  $array
-00229  * gen :
-00230  *      - none
-00231  * return:
-00232  *      - none
-00233  *
-00234  */ 
-00235 function UpdateForm($p_cn,$p_array) {
-00236   foreach ($p_array as $key=>$element) {
-00237     echo_debug ("UpdateForm $key = $element");
-00238     ${"$key"}=$element;
-00239   }
-00240   $Res=ExecSql($p_cn,"update formdef set fr_label='".FormatString($form_nom)."' where fr_id=".$fr_id);
-00241   $Res=ExecSql($p_cn,"delete from form where fo_fr_id=".$fr_id);
-00242   // Test les positions
-00243   for ($i =0; $i <$line;$i++) {
-00244     echo_debug ("position =".${"pos$i"});
-00245     if ( (string) ${"pos$i"} != (string) (int) ${"pos$i"}) {
-00246       ${"pos$i"}=$i+1;
-00247     }
-00248     if ( ${"pos$i"} > $line || ${"pos$i"} < 0) { 
-00249       ${"pos$i"}=$i+1;
-00250       echo_debug('form_inc.php',__LINE__,"position trop grand max = $line+1 ");
-00251     }
-00252   }
-00253   for ($i =0; $i <$line;$i++) {
-00254     for ( $o=$i+1; $o < $line;$o++) {
-00255       if ( ${"pos$i"} == ${"pos$o"} ) {
-00256         ${"pos$o"}=$o+1;
-00257       }
-00258     }
-00259   }
-00260   for ( $i=0;$i<$line;$i++) {
-00261     if ( strlen(trim(${"text$i"})) != 0) {
-00262       ${"text$i"}=FormatString(${"text$i"});
-00263       ${"form$i"}=FormatString(${"form$i"});
-00264       if ( ${"text$i"} != null ) {
-00265         if ( CheckFormula(${"form$i"}) == false ) 
-00266           ${"form$i"}="!!!!!!! FORMULE INVALIDE ".${"form$i"};
-00267 
-00268         ${"form$i"}=(${"form$i"}==null)?"null":"'".${"form$i"}."'";
-00269         $sql=sprintf("insert into form (fo_fr_id,
-00270                                   fo_pos,
-00271                                   fo_label,
-00272                                   fo_formula) values
-00273                                   ( %d,
-00274                                     %d,
-00275                                     '%s',
-00276                                     %s)",
-00277                      $fr_id,${"pos$i"},
-00278                      ${"text$i"},
-00279                      ${"form$i"}
-00280                      );
-00281         $Res=ExecSql($p_cn,$sql);
-00282       }
-00283     }//if
-00284   }//for
-00285 
-00286 }
-00287 /* function AddForm
-00288  * Purpose :
-00289  * 
-00290  * parm : 
-00291  *      -  $p_cn connexion
-00292  *      -  $array
-00293  * gen :
-00294  *      - none
-00295  * return:
-00296  *      - none
-00297  *
-00298  */ 
-00299 function AddForm($p_cn,$p_array) {
-00300   foreach ($p_array as $key=>$element) {
-00301     echo_debug ("AddForm $key = $element");
-00302     ${"$key"}=$element;
-00303   }
+00034 function EncodeForm($p_line,$p_sessid,$p_array=null) {
+00035   //  echo '<SCRIPT LANGUAGE="javascript" SRC="win_search_poste.js"></SCRIPT>';
+00036   include_once("constant.php");
+00037   echo JS_SEARCH_POSTE;
+00038    $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$p_sessid."','not')\">";
+00039   for ( $i =0 ; $i <= $p_line; $i++) {
+00040     ${"text$i"}="";
+00041     ${"form$i"}="";
+00042     ${"pos$i"}="";
+00043   }
+00044   if ( $p_array != null ) {
+00045     foreach ( $p_array as $key=> $element ) {
+00046       ${"$key"}=$element;
+00047       echo_debug ("EncodeForm $key = $element");
+00048 
+00049     }
+00050     
+00051   } else {
+00052     $form_nom="";
+00053     $text0="";
+00054     $form0="";
+00055   }
+00056   echo "<FORM ACTION=\"form.php\" METHOD=\"POST\">";
+00057   printf ("Nom du rapport : <INPUT TYPE=\"TEXT\" NAME=\"form_nom\" VALUE=\"%s\">",
+00058           $form_nom);
+00059   printf ('<INPUT TYPE="HIDDEN" NAME="line" value="%s"',
+00060           $p_line);
+00061 if ( isset ($fr_id))   printf ('<INPUT TYPE="HIDDEN" NAME="fr_id" value="%s"',
+00062           $fr_id);
+00063 
+00064   echo '<TABLE>';
+00065   echo "<TR>";
+00066   if ( isset($fr_id) )   echo "<TH> Position </TH>";
+00067   echo "<TH> Texte </TH>";
+00068   echo "<TH> Formule</TH>";
+00069 
+00070   echo '</TR>';
+00071   for ( $i =0 ; $i < $p_line;$i++) {
+00072     echo "<TR>";
+00073     // si fr_id != null alors les donnees viennent de 
+00074     // GetDataForm: ce n'est pas un nouvel enregistrement
+00075     //
+00076     if ( isset($fr_id)) {
+00077       echo "<TD>";
+00078       printf ('<input TYPE="TEXT" NAME="pos%d" size="3" VALUE="%s">',
+00079               $i,${"pos$i"});
+00080       echo '</TD>';
+00081     }
+00082 
+00083     echo "<TD>";
+00084     printf ('<input TYPE="TEXT" NAME="text%d" size="25" VALUE="%s">',
+00085             $i,${"text$i"});
+00086     echo '</TD>';
+00087 
+00088     echo "<TD>";
+00089     printf ('<input TYPE="TEXT" NAME="form%d" SIZE="25" VALUE="%s">',
+00090             $i,${"form$i"});
+00091     echo $search;
+00092     echo '</TD>';
+00093 
+00094     echo "</TR>";
+00095   }
+00096   echo "</TABLE>";
+00097   if ( isset($fr_id)){
+00098     echo '<INPUT TYPE="submit" value="Enregistre" name="update">';
+00099   }else {
+00100     echo '<INPUT TYPE="submit" value="Enregistre" name="record">';
+00101   }
+00102   echo '<INPUT TYPE="submit" value="Ajoute une ligne" name="add_line">';
+00103   echo '<INPUT TYPE="submit" value="Efface ce rapport" name="del_form">';
+00104 
+00105   echo "</FORM>";
+00106 
+00107 }
+00117 function ViewForm($p_cn,$p_sessid,$p_id) {
+00118   $array=GetDataForm($p_cn,$p_id);
+00119   $l_nom=GetFormName($p_cn,$p_id);
+00120   $array['form_nom']=$l_nom;
+00121 
+00122   $l_line=GetNumberLine($p_cn,$p_id);
+00123   EncodeForm($l_line,$p_sessid,$array);
+00124 
+00125 }
+00134 function DeleteForm($p_cn,$p_id) {
+00135   ExecSql($p_cn,"delete from form where fo_fr_id=$p_id");
+00136   ExecSql($p_cn,"delete from formdef where fr_id=$p_id");
+00137 }
+00149 function GetDataForm($p_cn,$p_id) {
+00150   $Res=ExecSql($p_cn,"select fo_id,fo_fr_id,fo_pos,fo_label,fo_formula from form where fo_fr_id=$p_id
+00151                       order by fo_pos");
+00152   $Max=pg_NumRows($Res);
+00153   for ( $i=0;$i<$Max;$i++){
+00154     $l_line=pg_fetch_array($Res,$i);
+00155 
+00156     // get the fo_id
+00157     $text=sprintf("fo_id%d",$i);
+00158     $array[$text]=$l_line['fo_id'];
+00159     // get the fo_label
+00160     $text=sprintf("text%d",$i);
+00161     $array[$text]=$l_line['fo_label'];
+00162     // get the fo_formula
+00163     $text=sprintf("form%d",$i);
+00164     $array[$text]=$l_line['fo_formula'];
+00165     // get the pos
+00166     $text=sprintf("pos%d",$i);
+00167     $array[$text]=$l_line['fo_pos'];
+00168   } //for
+00169   $array["fr_id"]=$p_id;
+00170   return $array;
+00171 }
+00180 function GetNumberLine($p_cn,$p_id) {
+00181   $Res=ExecSql($p_cn,"select * from form where fo_fr_id=".$p_id);
+00182   $count=pg_NumRows($Res);
+00183   return $count;
+00184 }
+00195 function GetFormName($p_cn,$p_id) {
+00196   $Res=ExecSql($p_cn,"select fr_label from formdef where fr_id=".$p_id);
+00197   if ( pg_NumRows($Res) == 0 ) return null;
+00198   $name=pg_fetch_array($Res,0);
+00199   return $name['fr_label'];
+00200 }
+00208 function UpdateForm($p_cn,$p_array) {
+00209   foreach ($p_array as $key=>$element) {
+00210     echo_debug ("UpdateForm $key = $element");
+00211     ${"$key"}=$element;
+00212   }
+00213   $Res=ExecSql($p_cn,"update formdef set fr_label='".FormatString($form_nom)."' where fr_id=".$fr_id);
+00214   $Res=ExecSql($p_cn,"delete from form where fo_fr_id=".$fr_id);
+00215   // Test les positions
+00216   for ($i =0; $i <$line;$i++) {
+00217     echo_debug ("position =".${"pos$i"});
+00218     if ( (string) ${"pos$i"} != (string) (int) ${"pos$i"}) {
+00219       ${"pos$i"}=$i+1;
+00220     }
+00221     if ( ${"pos$i"} > $line || ${"pos$i"} < 0) { 
+00222       ${"pos$i"}=$i+1;
+00223       echo_debug('form_inc.php',__LINE__,"position trop grand max = $line+1 ");
+00224     }
+00225   }
+00226   for ($i =0; $i <$line;$i++) {
+00227     for ( $o=$i+1; $o < $line;$o++) {
+00228       if ( ${"pos$i"} == ${"pos$o"} ) {
+00229         ${"pos$o"}=$o+1;
+00230       }
+00231     }
+00232   }
+00233   for ( $i=0;$i<$line;$i++) {
+00234     if ( strlen(trim(${"text$i"})) != 0) {
+00235       ${"text$i"}=FormatString(${"text$i"});
+00236       ${"form$i"}=FormatString(${"form$i"});
+00237       if ( ${"text$i"} != null ) {
+00238         if ( CheckFormula(${"form$i"}) == false ) 
+00239           ${"form$i"}="!!!!!!! FORMULE INVALIDE ".${"form$i"};
+00240 
+00241         ${"form$i"}=(${"form$i"}==null)?"null":"'".${"form$i"}."'";
+00242         $sql=sprintf("insert into form (fo_fr_id,
+00243                                   fo_pos,
+00244                                   fo_label,
+00245                                   fo_formula) values
+00246                                   ( %d,
+00247                                     %d,
+00248                                     '%s',
+00249                                     %s)",
+00250                      $fr_id,${"pos$i"},
+00251                      ${"text$i"},
+00252                      ${"form$i"}
+00253                      );
+00254         $Res=ExecSql($p_cn,$sql);
+00255       }
+00256     }//if
+00257   }//for
+00258 
+00259 }
+00267 function AddForm($p_cn,$p_array) {
+00268   foreach ($p_array as $key=>$element) {
+00269     echo_debug ("AddForm $key = $element");
+00270     ${"$key"}=$element;
+00271   }
+00272 
+00273   if ( !isset ($form_nom) ||
+00274        ! isset ($line) ) {
+00275     echo_error("Nom ou ligne non défini");
+00276     return;
+00277   }
+00278   $form_nom=(FormatString($form_nom)==null)?"NoName":FormatString($form_nom);
+00279   $sql="insert into formdef (fr_label) values ('".$form_nom."')";
+00280   $Res=ExecSql($p_cn,$sql);
+00281   $n=GetSequence($p_cn,"s_formdef");
+00282 
+00283   for ($i=0;$i < $line;$i++) {
+00284       ${"text$i"}=FormatString(${"text$i"});
+00285       ${"form$i"}=FormatString(${"form$i"});
+00286       if ( ${"text$i"} != null ) {
+00287         //      ${"form$i"}=(${"form$i"}==null)?${"form$i"}:"'".${"form$i"}."'";
+00288         ${"form$i"}=(${"form$i"}==null)?"null":"'".${"form$i"}."'";
+00289         CheckFormula(${"form$i"});
+00290         $sql=sprintf("insert into form (fo_fr_id,
+00291                                   fo_pos,
+00292                                   fo_label,
+00293                                   fo_formula) values
+00294                                   ( %d,
+00295                                     %d,
+00296                                     '%s',
+00297                                     %s)",
+00298                    $n,$i+1,${"text$i"},${"form$i"}
+00299                    );
+00300         $Res=ExecSql($p_cn,$sql);
+00301     }//if
+00302   }//for $i
+00303 }
 00304 
-00305   if ( !isset ($form_nom) ||
-00306        ! isset ($line) ) {
-00307     echo_error("Nom ou ligne non défini");
-00308     return;
-00309   }
-00310   $form_nom=(FormatString($form_nom)==null)?"NoName":FormatString($form_nom);
-00311   $sql="insert into formdef (fr_label) values ('".$form_nom."')";
-00312   $Res=ExecSql($p_cn,$sql);
-00313   $n=GetSequence($p_cn,"s_formdef");
-00314 
-00315   for ($i=0;$i < $line;$i++) {
-00316       ${"text$i"}=FormatString(${"text$i"});
-00317       ${"form$i"}=FormatString(${"form$i"});
-00318       if ( ${"text$i"} != null ) {
-00319         //      ${"form$i"}=(${"form$i"}==null)?${"form$i"}:"'".${"form$i"}."'";
-00320         ${"form$i"}=(${"form$i"}==null)?"null":"'".${"form$i"}."'";
-00321         CheckFormula(${"form$i"});
-00322         $sql=sprintf("insert into form (fo_fr_id,
-00323                                   fo_pos,
-00324                                   fo_label,
-00325                                   fo_formula) values
-00326                                   ( %d,
-00327                                     %d,
-00328                                     '%s',
-00329                                     %s)",
-00330                    $n,$i+1,${"text$i"},${"form$i"}
-00331                    );
-00332         $Res=ExecSql($p_cn,$sql);
-00333     }//if
-00334   }//for $i
-00335 }
-00336 
-00337 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00305 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/form__inc_8php.html b/doc/developper/html/form__inc_8php.html index d6b06964e..8dde96acf 100644 --- a/doc/developper/html/form__inc_8php.html +++ b/doc/developper/html/form__inc_8php.html @@ -4,7 +4,7 @@ - +

form_inc.php File Reference

@@ -14,20 +14,28 @@

Functions

 EncodeForm ($p_line, $p_sessid, $p_array=null) + Encoding report.
 ViewForm ($p_cn, $p_sessid, $p_id) + Show the details of a report.
 DeleteForm ($p_cn, $p_id) + Remove a report.
 GetDataForm ($p_cn, $p_id) + Get data from a form.
 GetNumberLine ($p_cn, $p_id) + Get the number of line of a form.
 GetFormName ($p_cn, $p_id) + Get the name of the report.
 UpdateForm ($p_cn, $p_array) + Update a report.
 AddForm ($p_cn, $p_array) + Add a report.

Function Documentation

@@ -64,11 +72,19 @@

+Add a report. +

+

Parameters:
+ + + +
$p_cn connexion
$array 
+

-Definition at line 299 of file form_inc.php. +Definition at line 267 of file form_inc.php.

-References $n, $Res, $sql, CheckFormula(), echo_debug(), echo_error(), ExecSql(), FormatString(), and GetSequence(). +References $n, $Res, $sql, CheckFormula(), echo_debug(), echo_error(), ExecSql(), FormatString(), and GetSequence().

@@ -105,9 +121,17 @@ References $n,

+Remove a report. +

+parm :

Parameters:
+ + + +
$p_cn connection
$p_id gives the formdef.fr_id
+

-Definition at line 147 of file form_inc.php. +Definition at line 134 of file form_inc.php.

References ExecSql(). @@ -152,13 +176,22 @@ References ExecSql().

+Encoding report. +

+parm :

Parameters:
+ + + + +
$p_array array of previous changes
$p_sessid sessid for the search window
$p_line number of line
+

-Definition at line 38 of file form_inc.php. +Definition at line 34 of file form_inc.php.

-References $search, echo_debug(), name, size, and value. +References $search, echo_debug(), name, size, and value.

-Referenced by ViewForm(). +Referenced by ViewForm().

@@ -195,13 +228,24 @@ Referenced by ViewForm()<

+Get data from a form. +

+

Parameters:
+ + + +
$p_cn connection
$p_id gives the formdef.fr_id
    +
+
+
+
Returns:
array(fo_idX=>fo_id,textX=>fo_label,formX=>fo_formula,posX=>fo_pos) where X is the row number

-Definition at line 164 of file form_inc.php. +Definition at line 149 of file form_inc.php.

-References $array, $l_line, $Max, $p_id, $Res, and ExecSql(). +References $array, $l_line, $Max, $p_id, $Res, and ExecSql().

-Referenced by ViewForm(). +Referenced by ViewForm().

@@ -238,13 +282,22 @@ Referenced by ViewForm()<

+Get the name of the report. +

+

Parameters:
+ + + +
$p_cn connection
$p_id formdef.fr_id
+
+
Returns:
string name

-Definition at line 217 of file form_inc.php. +Definition at line 195 of file form_inc.php.

-References $Res, and ExecSql(). +References $Res, and ExecSql().

-Referenced by ViewForm(). +Referenced by ViewForm().

@@ -281,13 +334,22 @@ Referenced by ViewForm()<

+Get the number of line of a form. +

+

Parameters:
+ + + +
$p_cn connection
$p_id gives the formdef.fr_id
+
+
Returns:
integer

-Definition at line 200 of file form_inc.php. +Definition at line 180 of file form_inc.php.

-References $count, $Res, and ExecSql(). +References $count, $Res, and ExecSql().

-Referenced by ViewForm(). +Referenced by ViewForm().

@@ -324,11 +386,19 @@ Referenced by ViewForm()<

+Update a report. +

+

Parameters:
+ + + +
$p_cn connexion
$array 
+

-Definition at line 235 of file form_inc.php. +Definition at line 208 of file form_inc.php.

-References $i, $o, $Res, $sql, CheckFormula(), echo_debug(), ExecSql(), and FormatString(). +References $i, $o, $Res, $sql, CheckFormula(), echo_debug(), ExecSql(), and FormatString().

@@ -371,14 +441,23 @@ References $i,

+Show the details of a report. +

+parm :

Parameters:
+ + + + +
$p_cn connection
$p_id gives the formdef.fr_id
sessid for the search window
+

-Definition at line 125 of file form_inc.php. +Definition at line 117 of file form_inc.php.

-References $array, $l_line, EncodeForm(), GetDataForm(), GetFormName(), and GetNumberLine(). +References $array, $l_line, EncodeForm(), GetDataForm(), GetFormName(), and GetNumberLine(). -


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/form__pdf_8php-source.html b/doc/developper/html/form__pdf_8php-source.html index 669d9394a..3fba4c3cb 100644 --- a/doc/developper/html/form__pdf_8php-source.html +++ b/doc/developper/html/form__pdf_8php-source.html @@ -4,7 +4,7 @@ - +

form_pdf.php

Go to the documentation of this file.
00001 <?
@@ -29,90 +29,89 @@
 00020 
 00021 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00022 // $Revision$
-00023 
-00024 include_once("class_rapport.php");
-00025 include_once("ac_common.php");
-00026 include_once("postgres.php");
-00027 include_once("class.ezpdf.php");
-00028 include_once("impress_inc.php");
-00029 
-00030     $cn=DbConnect($_SESSION['g_dossier']);
-00031 foreach ($HTTP_POST_VARS as $key=>$element) {
-00032   ${"$key"}=$element;
-00033 }
-00034 
-00035 $ret="";
-00036 $pdf=& new Cezpdf();
-00037 $pdf->selectFont('./addon/fonts/Helvetica.afm');
-00038 
-00039 $Form=new rapport($cn,$form_id);
-00040 // Step ??
-00041 //--
-00042 if ( $_POST['p_step'] == 0 ) 
-00043   {
-00044     // No step asked
-00045     //--
-00046     $array=$Form->GetRow($from_periode,$to_periode);
-00047   }
-00048  else 
-00049    {
-00050      // yes with step
-00051      //--
-00052      for ($e=$_POST['from_periode'];$e<=$_POST['to_periode'];$e+=$_POST['p_step'])
-00053        {
-00054         $periode=getPeriodeName($cn,$e);
-00055         if ( $periode == null ) continue;
-00056         $array[]=$Form->GetRow($e,$e);
-00057         $periode_name[]=$periode;
-00058        }
-00059 
-00060    }
-00061 
-00062 $Libelle=sprintf("(%s) %s ",$Form->id,$Form->GetName());
-00063     
-00064     $pdf->ezText($Libelle,30);
-00065 // without step 
-00066 if ( $_POST['p_step'] == 0 ) 
-00067   {
-00068     $q=getPeriodeName($cn,$from_periode);
-00069     if ( $from_periode != $to_periode){
-00070       $periode=sprintf("Période %s à %s",$q,getPeriodeName($cn,$to_periode));
-00071     } else {
-00072       $periode=sprintf("Période %s",$q);
-00073     }
-00074     
-00075     $pdf->ezText($periode,25);
-00076     $pdf->ezTable($array,
-00077                   array ('desc'=>'Description',
-00078                          'montant' => 'Montant'
-00079                        ),$Libelle,
-00080                   array('shaded'=>0,'showHeadings'=>1,'width'=>500,
-00081                         'cols'=>array('montant'=> array('justification'=>'right'),
-00082                                       )));
-00083     //New page
-00084     //$pdf->ezNewPage();
-00085     //}    
-00086   } 
-00087  else 
-00088    { // With Step 
-00089      $a=0;
-00090      foreach ($array as $e) 
-00091        {
-00092          $pdf->ezText($periode_name[$a],25);
-00093          $a++;
-00094          $pdf->ezTable($e,
-00095                        array ('desc'=>'Description',
-00096                               'montant' => 'Montant'
-00097                               ),$Libelle,
-00098                        array('shaded'=>0,'showHeadings'=>1,'width'=>500,
-00099                              'cols'=>array('montant'=> array('justification'=>'right'),
-00100                                            )));
-00101        }
-00102    }
-00103 $pdf->ezStream();
-00104 
-00105 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00027 include_once("class_rapport.php"); +00028 include_once("ac_common.php"); +00029 include_once("postgres.php"); +00030 include_once("class.ezpdf.php"); +00031 include_once("impress_inc.php"); +00032 +00033 $cn=DbConnect($_SESSION['g_dossier']); +00034 foreach ($HTTP_POST_VARS as $key=>$element) { +00035 ${"$key"}=$element; +00036 } +00037 +00038 $ret=""; +00039 $pdf=& new Cezpdf(); +00040 $pdf->selectFont('./addon/fonts/Helvetica.afm'); +00041 +00042 $Form=new rapport($cn,$form_id); +00043 // Step ?? +00044 //-- +00045 if ( $_POST['p_step'] == 0 ) +00046 { +00047 // No step asked +00048 //-- +00049 $array=$Form->GetRow($from_periode,$to_periode); +00050 } +00051 else +00052 { +00053 // yes with step +00054 //-- +00055 for ($e=$_POST['from_periode'];$e<=$_POST['to_periode'];$e+=$_POST['p_step']) +00056 { +00057 $periode=getPeriodeName($cn,$e); +00058 if ( $periode == null ) continue; +00059 $array[]=$Form->GetRow($e,$e); +00060 $periode_name[]=$periode; +00061 } +00062 +00063 } +00064 +00065 $Libelle=sprintf("(%s) %s ",$Form->id,$Form->GetName()); +00066 +00067 $pdf->ezText($Libelle,30); +00068 // without step +00069 if ( $_POST['p_step'] == 0 ) +00070 { +00071 $q=getPeriodeName($cn,$from_periode); +00072 if ( $from_periode != $to_periode){ +00073 $periode=sprintf("Période %s à %s",$q,getPeriodeName($cn,$to_periode)); +00074 } else { +00075 $periode=sprintf("Période %s",$q); +00076 } +00077 +00078 $pdf->ezText($periode,25); +00079 $pdf->ezTable($array, +00080 array ('desc'=>'Description', +00081 'montant' => 'Montant' +00082 ),$Libelle, +00083 array('shaded'=>0,'showHeadings'=>1,'width'=>500, +00084 'cols'=>array('montant'=> array('justification'=>'right'), +00085 ))); +00086 //New page +00087 //$pdf->ezNewPage(); +00088 //} +00089 } +00090 else +00091 { // With Step +00092 $a=0; +00093 foreach ($array as $e) +00094 { +00095 $pdf->ezText($periode_name[$a],25); +00096 $a++; +00097 $pdf->ezTable($e, +00098 array ('desc'=>'Description', +00099 'montant' => 'Montant' +00100 ),$Libelle, +00101 array('shaded'=>0,'showHeadings'=>1,'width'=>500, +00102 'cols'=>array('montant'=> array('justification'=>'right'), +00103 ))); +00104 } +00105 } +00106 $pdf->ezStream(); +00107 +00108 ?> +
Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/form__pdf_8php.html b/doc/developper/html/form__pdf_8php.html index 81fdcf46b..49b1b396f 100644 --- a/doc/developper/html/form__pdf_8php.html +++ b/doc/developper/html/form__pdf_8php.html @@ -4,10 +4,12 @@ - + -

form_pdf.php File Reference

+

form_pdf.php File Reference

Send a report in PDF. More... +

+

Go to the source code of this file. @@ -17,7 +19,12 @@
 $Form = new rapport($cn,$form_id)
-


Variable Documentation

+

Detailed Description

+Send a report in PDF. +

+ +

+Definition in file form_pdf.php.


Variable Documentation

@@ -40,7 +47,7 @@

-Definition at line 30 of file form_pdf.php. +Definition at line 33 of file form_pdf.php.

@@ -65,10 +72,10 @@ Definition at line 30

-Definition at line 39 of file form_pdf.php. +Definition at line 42 of file form_pdf.php. -


Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fortis__be_8inc_8php-source.html b/doc/developper/html/fortis__be_8inc_8php-source.html index 7e0b7f366..29adda342 100644 --- a/doc/developper/html/fortis__be_8inc_8php-source.html +++ b/doc/developper/html/fortis__be_8inc_8php-source.html @@ -4,7 +4,7 @@ - +

fortis_be.inc.php

Go to the documentation of this file.
00001 <?
@@ -28,93 +28,94 @@
 00019 /* $Revision$ */
 00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
 00021 // Author Olivier Dzwoniarkiewicz
-00023 // Fortis Bank
-00025 $row=1;
-00026 while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
-00027         $num = count($data);
-00028         for ($c=0; $c < $num; $c++) {
-00029 
-00030 // first line is skipped
-00031                 if ( $row>1) {
-00032                         
-00033                         $code=""; $date_exec=""; $date_valeur=""; $montant=""; $devise=""; $compte_ordre=""; $detail=""; $num_compte=""; $iduser="";
-00034                         
-00035                         list($code, $date_exec, $date_valeur, $montant, $devise, $compte_ordre, $detail, $num_compte) = split(";", $data[$c]);
-00036                         echo "line : $row > ".$data[$c]."<hr>";
-00037                 
-00038                         //corrige un bug de date
-00039                         $date_exec = str_replace(chr(34),"", $date_exec);
-00040                         
-00041                         // Si LTXXXXX ou LT XXXXX dans le détail
-00042                         if ((ereg ("LT+([0-9]{5})", $detail, $regs)) || (ereg ("LT+[ ]+([0-9]{5})", $detail, $regs))) {
-00043                                 $iduser = $regs[1];
-00044                         }
-00045                         
-00046                         // Si 00000XXXXXXX
-00047                         if (ereg ("[0-9]{12}", $detail, $regs)){
-00048                                 if($regs[0] != "000000000000") {
-00049                                         $id = substr($regs[0], 5, 5);
-00050                                         $check = substr($regs[0], 10, 2);
-00051                                         if (($id % 97) == $check) $iduser = $id;
-00052                                 }
-00053                         }
-00054                         
-00055                         if($iduser != "" ) $poste_comptable = "400".$iduser;
-00056                         else $poste_comptable = "";
-00057                         
-00058                         list($jour,$mois,$annee) = explode("/", $date_exec);  $date_exec = $annee."-".$mois."-".$jour;
-00059                         list($jour,$mois,$annee) = explode("/", $date_valeur);  $date_valeur = $annee."-".$mois."-".$jour;
-00060                         
-00061                         $montant = str_replace(",", ".", $montant);
-00062                         $montant = str_replace("+", "", $montant);
-00063                         $montant = str_replace("\"", "", $montant);
+00026 
+00027 // Fortis Bank
+00029 $row=1;
+00030 while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
+00031         $num = count($data);
+00032         for ($c=0; $c < $num; $c++) {
+00033 
+00034 // first line is skipped
+00035                 if ( $row>1) {
+00036                         
+00037                         $code=""; $date_exec=""; $date_valeur=""; $montant=""; $devise=""; $compte_ordre=""; $detail=""; $num_compte=""; $iduser="";
+00038                         
+00039                         list($code, $date_exec, $date_valeur, $montant, $devise, $compte_ordre, $detail, $num_compte) = split(";", $data[$c]);
+00040                         echo "line : $row > ".$data[$c]."<hr>";
+00041                 
+00042                         //corrige un bug de date
+00043                         $date_exec = str_replace(chr(34),"", $date_exec);
+00044                         
+00045                         // Si LTXXXXX ou LT XXXXX dans le détail
+00046                         if ((ereg ("LT+([0-9]{5})", $detail, $regs)) || (ereg ("LT+[ ]+([0-9]{5})", $detail, $regs))) {
+00047                                 $iduser = $regs[1];
+00048                         }
+00049                         
+00050                         // Si 00000XXXXXXX
+00051                         if (ereg ("[0-9]{12}", $detail, $regs)){
+00052                                 if($regs[0] != "000000000000") {
+00053                                         $id = substr($regs[0], 5, 5);
+00054                                         $check = substr($regs[0], 10, 2);
+00055                                         if (($id % 97) == $check) $iduser = $id;
+00056                                 }
+00057                         }
+00058                         
+00059                         if($iduser != "" ) $poste_comptable = "400".$iduser;
+00060                         else $poste_comptable = "";
+00061                         
+00062                         list($jour,$mois,$annee) = explode("/", $date_exec);  $date_exec = $annee."-".$mois."-".$jour;
+00063                         list($jour,$mois,$annee) = explode("/", $date_valeur);  $date_valeur = $annee."-".$mois."-".$jour;
 00064                         
-00065                         $detail=str_replace("\"","",$detail);
-00066                 
-00067                         $sql = "select * from import_tmp 
-00068                                         where 
-00069                                         code='".$code."' and 
-00070                                         num_compte='".$num_compte."'";
-00071                         $Res=ExecSql($p_cn,$sql);
-00072                         $Num=pg_NumRows($Res);
-00073                         
-00074                         if($Num > 0) {
-00075                                 echo "Op&eacute;ration FORTIS ".$code." d&eacute;j&eagrave; import&eacute;e.<br/>";
-00076                         } else {
-00077                         //      $Sql="insert into import_tmp values ('$code','$date_exec','$date_valeur','$montant','$devise','".addslashes($compte_ordre)."','".addslashes($detail)."','$num_compte','$poste_comptable')";
-00078                                 $Sql="insert into import_tmp (code ,
-00079                                         date_exec ,
-00080                                         date_valeur,
-00081                                         montant,
-00082                                         devise,
-00083                                         compte_ordre,
-00084                                         detail,
-00085                                         num_compte,
-00086                                         bq_account ,
-00087                                         jrn,
-00088                                         ok)
-00089                                 values ('$code',
-00090                                         '$date_exec',
-00091                                         '$date_exec',
-00092                                         '$montant',
-00093                                         '$devise',
-00094                                         '".addslashes($compte_ordre)."',        
-00095                                         '".addslashes($detail)."',
-00096                                         '$num_compte',
-00097                                         $p_bq_account,
-00098                                         $p_jrn,
-00099                                         false)";
-00100                         
-00101                                 $Res=ExecSql($p_cn,$Sql);
-00102                         }
-00103                 }
-00104 
-00105                 } // for ($c=0;$c<$num;$c++)
-00106                 $row++;
-00107 } // file is read
-00108 fclose($handle);
-00109 ?>
-

Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00065 $montant = str_replace(",", ".", $montant); +00066 $montant = str_replace("+", "", $montant); +00067 $montant = str_replace("\"", "", $montant); +00068 +00069 $detail=str_replace("\"","",$detail); +00070 +00071 $sql = "select * from import_tmp +00072 where +00073 code='".$code."' and +00074 num_compte='".$num_compte."'"; +00075 $Res=ExecSql($p_cn,$sql); +00076 $Num=pg_NumRows($Res); +00077 +00078 if($Num > 0) { +00079 echo "Op&eacute;ration FORTIS ".$code." d&eacute;j&eagrave; import&eacute;e.<br/>"; +00080 } else { +00081 // $Sql="insert into import_tmp values ('$code','$date_exec','$date_valeur','$montant','$devise','".addslashes($compte_ordre)."','".addslashes($detail)."','$num_compte','$poste_comptable')"; +00082 $Sql="insert into import_tmp (code , +00083 date_exec , +00084 date_valeur, +00085 montant, +00086 devise, +00087 compte_ordre, +00088 detail, +00089 num_compte, +00090 bq_account , +00091 jrn, +00092 ok) +00093 values ('$code', +00094 '$date_exec', +00095 '$date_exec', +00096 '$montant', +00097 '$devise', +00098 '".addslashes($compte_ordre)."', +00099 '".addslashes($detail)."', +00100 '$num_compte', +00101 $p_bq_account, +00102 $p_jrn, +00103 false)"; +00104 +00105 $Res=ExecSql($p_cn,$Sql); +00106 } +00107 } +00108 +00109 } // for ($c=0;$c<$num;$c++) +00110 $row++; +00111 } // file is read +00112 fclose($handle); +00113 ?> +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/fortis__be_8inc_8php.html b/doc/developper/html/fortis__be_8inc_8php.html index cee10f6f7..9f825994b 100644 --- a/doc/developper/html/fortis__be_8inc_8php.html +++ b/doc/developper/html/fortis__be_8inc_8php.html @@ -4,10 +4,12 @@ - + -

fortis_be.inc.php File Reference

+

fortis_be.inc.php File Reference

File to include : parse the CSV file from fortis Bank Belgium. More... +

+

Go to the source code of this file. @@ -33,7 +35,12 @@
 $Num = pg_NumRows($Res)
-


Variable Documentation

+

Detailed Description

+File to include : parse the CSV file from fortis Bank Belgium. +

+ +

+Definition in file fortis_be.inc.php.


Variable Documentation

@@ -56,9 +63,9 @@

-Definition at line 50 of file fortis_be.inc.php. +Definition at line 54 of file fortis_be.inc.php.

-Referenced by DefModele(), widget::IOValue(), and UpdateJrn(). +Referenced by DefModele(), widget::IOValue(), and UpdateJrn().

@@ -83,7 +90,7 @@ Referenced by DefModele(

-Definition at line 39 of file fortis_be.inc.php. +Definition at line 43 of file fortis_be.inc.php.

@@ -108,7 +115,7 @@ Definition at line

-Definition at line 59 of file fortis_be.inc.php. +Definition at line 63 of file fortis_be.inc.php.

@@ -133,7 +140,7 @@ Definition at line

-Definition at line 65 of file fortis_be.inc.php. +Definition at line 69 of file fortis_be.inc.php.

@@ -158,7 +165,7 @@ Definition at line

-Definition at line 61 of file fortis_be.inc.php. +Definition at line 65 of file fortis_be.inc.php.

@@ -183,9 +190,9 @@ Definition at line

-Definition at line 72 of file fortis_be.inc.php. +Definition at line 76 of file fortis_be.inc.php.

-Referenced by Get_attr_def(), Get_attr_min(), GetAllUser(), GetCreateAccount(), GetPriv(), GetUid(), and VerifImport(). +Referenced by Get_attr_def(), Get_attr_min(), GetAllUser(), GetCreateAccount(), GetPriv(), GetUid(), and VerifImport().

@@ -210,9 +217,9 @@ Referenced by Get_attr_d

-Definition at line 56 of file fortis_be.inc.php. +Definition at line 60 of file fortis_be.inc.php.

-Referenced by TransferCSV(). +Referenced by TransferCSV().

@@ -237,7 +244,7 @@ Referenced by TransferC

-Definition at line 71 of file fortis_be.inc.php. +Definition at line 75 of file fortis_be.inc.php.

@@ -262,7 +269,7 @@ Definition at line

-Definition at line 25 of file fortis_be.inc.php. +Definition at line 29 of file fortis_be.inc.php.

@@ -291,12 +298,10 @@ Definition at line num_compte='".$num_compte."'"

-Definition at line 67 of file fortis_be.inc.php. -

-Referenced by cl_user::AccessJrn(), AddFiche(), AddForm(), AddModele(), cl_user::Admin(), fiche::blank(), Centralise(), cl_user::Check(), CheckDossier(), CheckIsAdmin(), fiche::CountByDef(), fiche::Display(), EncodeFiche(), ExecuteScript(), FormAchInput(), FormPeriode(), FormPeriodeMult(), FormVenInput(), parm_code::Get(), fiche_def_ref::Get(), fiche_def::Get(), fiche_def::GetAll(), GetAllUser(), fiche::getAttribut(), fiche_def::GetAttribut(), GetAvailableFolder(), fiche::GetByDef(), fiche::GetByType(), GetClass(), GetConcerned(), GetFicheDef(), GetFicheDefRef(), GetFicheJrn(), getFicheNameCode(), Customer::GetFromPoste(), GetPeriode(), cl_user::GetPreferences(), GetQuantity(), GetRappel(), Balance::GetRow(), jrn::GetRowSimple(), GetUserProperty(), fiche::insert(), InsertJrn(), InsertJrnx(), InsertModeleLine(), InsertStockGoods(), IsFicheOfJrn(), ListJrn(), parm_code::LoadAll(), fiche_def_ref::LoadAll(), Invoice::myList(), Document_modele::myList(), new_fiche(), PeriodeClosed(), fiche::remove(), parm_code::Save(), fiche_def_ref::Save(), Document_modele::Save(), SaveModeleName(), cl_user::SetPeriode(), SyncRight(), TransferCSV(), fiche::update(), UpdateCSV(), UpdateFiche(), UpdateForm(), Customer::VatListing(), VerifImport(), ViewDetailStock(), ViewFicheDetail(), ViewJrn(), and ViewStock(). +Definition at line 71 of file fortis_be.inc.php. -


Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
diff --git a/doc/developper/html/functions.html b/doc/developper/html/functions.html index 6f975b44c..4c49dcdad 100644 --- a/doc/developper/html/functions.html +++ b/doc/developper/html/functions.html @@ -4,7 +4,7 @@ - +
$ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
@@ -16,7 +16,11 @@ Here is a list of all struct and union fields with links to the structures/union : Attribut
  • $ad_text : Attribut
  • $addLooseObjects : Cpdf
  • $admin -: cl_user
  • $all +: cl_user
  • $ag_date +: action
  • $ag_desc +: action
  • $ag_id +: Document
  • $ag_title +: action
  • $all : fiche_def
  • $arc4 : Cpdf
  • $arc4_objnum : Cpdf
  • $attribut @@ -27,9 +31,10 @@ Here is a list of all struct and union fields with links to the structures/union : Balance
  • $checkpoint : Cpdf
  • $class_base : fiche_def
  • $cn -: Invoice, fiche, fiche_def, Document_modele, Attribut
  • $country -: Customer
  • $cp -: Customer
  • $create_account +: Invoice, fiche, fiche_def, Document_modele, Attribut
  • $company +: contact
  • $country +: Customer
  • $cp +: Customer
  • $create_account : fiche_def
  • $currentBaseFont : Cpdf
  • $currentColour : Cpdf
  • $currentContents @@ -40,19 +45,26 @@ Here is a list of all struct and union fields with links to the structures/union : Cpdf
  • $currentPage : Cpdf
  • $currentStrokeColour : Cpdf
  • $currentTextState -: Cpdf
  • $db -: cl_user, rapport, poste, parm_code, Own, jrn, Balance
  • $destinations +: Cpdf
  • $d_filename +: Document, action
  • $d_lob +: Document, action
  • $d_mimetype +: Document, action
  • $d_number +: Document, action
  • $d_state +: action
  • $db +: cl_user, rapport, poste, parm_code, Own, jrn, Document, Balance, action
  • $destinations : Cpdf
  • $disabled -: widget
  • $encrypted +: widget
  • $dt_id +: action
  • $encrypted : Cpdf
  • $encryptionKey : Cpdf
  • $extra : widget
  • $extra2 : widget
  • $ez : Cezpdf
  • $ezPageCount : Cezpdf
  • $ezPages -: Cezpdf
  • $fiche_def +: Cezpdf
  • $f_id +: action
  • $fiche_def : fiche, fiche_def
  • $fiche_def_ref -: Customer
  • $fileIdentifier +: fiche
  • $fileIdentifier : Cpdf
  • $firstPageId : Cpdf
  • $fontFamilies : Cpdf
  • $fonts @@ -60,16 +72,17 @@ Here is a list of all struct and union fields with links to the structures/union : fiche_def_ref
  • $frd_id : fiche_def_ref
  • $frd_text : fiche_def_ref
  • $id -: cl_user, rapport, poste, jrn, Invoice, fiche, fiche_def, Customer
  • $infoObject +: cl_user, rapport, poste, jrn, Invoice, fiche, fiche_def
  • $infoObject : Cpdf
  • $label : widget, fiche_def
  • $looseObjects : Cpdf
  • $md_id -: Document_modele
  • $md_lob +: Document_modele, Document
  • $md_lob : Document_modele
  • $md_name -: Document_modele
  • $md_type +: Document_modele
  • $md_sequence +: Document_modele
  • $md_type : Document_modele
  • $messages : Cpdf
  • $name -: widget, rapport, jrn, Customer
  • $nCallback +: widget, rapport, jrn, Customer
  • $nCallback : Cpdf
  • $nStack : Cpdf
  • $nStateStack : Cpdf
  • $numFonts @@ -83,26 +96,27 @@ Here is a list of all struct and union fields with links to the structures/union : parm_code
  • $p_value : parm_code
  • $pass : cl_user
  • $poste -: Customer
  • $procsetObjectId +: Customer
  • $procsetObjectId : Cpdf
  • $readonly : widget
  • $reportContents : Creport
  • $row : poste, jrn, Balance
  • $selected -: widget
  • $size +: widget
  • $sequence +: Document_modele
  • $size : widget
  • $stack : Cpdf
  • $stateStack : Cpdf
  • $street -: Customer
  • $tabindex +: Customer
  • $tabindex : widget
  • $table : widget
  • $template : Invoice
  • $type : widget
  • $valid : cl_user
  • $value : widget
  • $vat_number -: Customer
  • $wordSpaceAdjust +: Customer
  • $wordSpaceAdjust : Cpdf
  • $y : Cezpdf -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x61.html b/doc/developper/html/functions_0x61.html index 266d65eca..605afab30 100644 --- a/doc/developper/html/functions_0x61.html +++ b/doc/developper/html/functions_0x61.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -12,8 +12,10 @@ Here is a list of all struct and union fields with links to the structures/unions they belong to:

    - a -

      -
    • AccessJrn() -: cl_user
    • addContent() +
    • a_ref() +: Document
    • AccessJrn() +: cl_user
    • action() +: action
    • addContent() : Cpdf
    • addDestination() : Cpdf
    • addImage() : Cpdf
    • addInfo() @@ -32,7 +34,7 @@ Here is a list of all struct and union fields with links to the structures/union : Cpdf
    • ARC4_init() : Cpdf
    • Attribut() : Attribut
    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x62.html b/doc/developper/html/functions_0x62.html index 6fea8a275..85be4c7b7 100644 --- a/doc/developper/html/functions_0x62.html +++ b/doc/developper/html/functions_0x62.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -14,8 +14,8 @@ Here is a list of all struct and union fields with links to the structures/union

    - b -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: fiche +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x63.html b/doc/developper/html/functions_0x63.html index 4ef602320..104d5d966 100644 --- a/doc/developper/html/functions_0x63.html +++ b/doc/developper/html/functions_0x63.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -18,13 +18,15 @@ Here is a list of all struct and union fields with links to the structures/union : cl_user
  • checkAllHere() : Cpdf
  • cl_user() : cl_user
  • closeObject() -: Cpdf
  • CountByDef() -: fiche
  • Cpdf() +: Cpdf
  • Confirm() +: action
  • contact() +: contact
  • CountByDef() +: fiche
  • Cpdf() : Cpdf
  • Creport() : Creport
  • curve() : Cpdf
  • Customer() : Customer -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x64.html b/doc/developper/html/functions_0x64.html index 7f85a8721..891ae4746 100644 --- a/doc/developper/html/functions_0x64.html +++ b/doc/developper/html/functions_0x64.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -15,10 +15,12 @@ Here is a list of all struct and union fields with links to the structures/union
  • debug() : widget
  • Delete() : Invoice, Document_modele
  • Display() -: parm_code, fiche_def_ref, fiche, fiche_def
  • Document_modele() -: Document_modele
  • dots() +: parm_code, fiche_def_ref, fiche, fiche_def, action
  • Document() +: Document
  • Document_modele() +: Document_modele
  • document_type() +: Document_type
  • dots() : Creport -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x65.html b/doc/developper/html/functions_0x65.html index 87e376697..6432e189c 100644 --- a/doc/developper/html/functions_0x65.html +++ b/doc/developper/html/functions_0x65.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -40,7 +40,7 @@ Here is a list of all struct and union fields with links to the structures/union : Cezpdf
  • ezText() : Cezpdf
  • ezWhatPageNumber() : Cezpdf -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x66.html b/doc/developper/html/functions_0x66.html index 2208e266e..54d8a89c0 100644 --- a/doc/developper/html/functions_0x66.html +++ b/doc/developper/html/functions_0x66.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -18,10 +18,11 @@ Here is a list of all struct and union fields with links to the structures/union : fiche_def_ref
  • filledEllipse() : Cpdf
  • filledRectangle() : Cpdf
  • filterText() -: Cpdf
  • FormAdd() -: Invoice, Document_modele
  • FormDelete() -: Invoice, Document_modele -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: Cpdf
  • form() +: Document_modele
  • FormAdd() +: Invoice
  • FormDelete() +: Invoice +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x67.html b/doc/developper/html/functions_0x67.html index 0ec1223b7..0d0e46c45 100644 --- a/doc/developper/html/functions_0x67.html +++ b/doc/developper/html/functions_0x67.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -12,19 +12,24 @@ Here is a list of all struct and union fields with links to the structures/unions they belong to:

    - g -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x68.html b/doc/developper/html/functions_0x68.html index ec238e2d2..c07cf76bf 100644 --- a/doc/developper/html/functions_0x68.html +++ b/doc/developper/html/functions_0x68.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -14,7 +14,7 @@ Here is a list of all struct and union fields with links to the structures/union

    - h -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x69.html b/doc/developper/html/functions_0x69.html index bb8039c03..b5e678df3 100644 --- a/doc/developper/html/functions_0x69.html +++ b/doc/developper/html/functions_0x69.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -15,11 +15,11 @@ Here is a list of all struct and union fields with links to the structures/union
  • ilink() : Cezpdf
  • Input() : parm_code, fiche_def_ref
  • insert() -: fiche
  • insert_default_global_pref() +: fiche
  • insert_default_global_pref() : cl_user
  • Invoice() : Invoice
  • IOValue() : widget -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x6a.html b/doc/developper/html/functions_0x6a.html index f2b804446..f1d8d979d 100644 --- a/doc/developper/html/functions_0x6a.html +++ b/doc/developper/html/functions_0x6a.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -14,7 +14,7 @@ Here is a list of all struct and union fields with links to the structures/union

    - j -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x6c.html b/doc/developper/html/functions_0x6c.html index b5439a7a3..3a8371c7b 100644 --- a/doc/developper/html/functions_0x6c.html +++ b/doc/developper/html/functions_0x6c.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -16,7 +16,7 @@ Here is a list of all struct and union fields with links to the structures/union : Cpdf
  • LoadAll() : parm_code, fiche_def_ref
  • loadTemplate() : Cezpdf -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x6d.html b/doc/developper/html/functions_0x6d.html index 96fcf542e..c50b3549f 100644 --- a/doc/developper/html/functions_0x6d.html +++ b/doc/developper/html/functions_0x6d.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -14,8 +14,8 @@ Here is a list of all struct and union fields with links to the structures/union

    - m -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: Invoice, Document_modele, action +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x6e.html b/doc/developper/html/functions_0x6e.html index df72a1623..301db8380 100644 --- a/doc/developper/html/functions_0x6e.html +++ b/doc/developper/html/functions_0x6e.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -15,7 +15,7 @@ Here is a list of all struct and union fields with links to the structures/union
  • newDocument() : Cpdf
  • newPage() : Cpdf -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x6f.html b/doc/developper/html/functions_0x6f.html index d6b975a0d..23497e327 100644 --- a/doc/developper/html/functions_0x6f.html +++ b/doc/developper/html/functions_0x6f.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -34,7 +34,7 @@ Here is a list of all struct and union fields with links to the structures/union : Cpdf
  • output() : Cpdf
  • Own() : Own -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x70.html b/doc/developper/html/functions_0x70.html index c661dce05..64118de6b 100644 --- a/doc/developper/html/functions_0x70.html +++ b/doc/developper/html/functions_0x70.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -13,7 +13,8 @@ Here is a list of all struct and union fields with links to the structures/union

    - p -

    • parm_code() -: parm_code
    • partEllipse() +: parm_code
    • ParseDocument() +: Document
    • partEllipse() : Cpdf
    • polygon() : Cpdf
    • poste() : poste
    • PRVT_getBytes() @@ -22,7 +23,7 @@ Here is a list of all struct and union fields with links to the structures/union : Cpdf
    • PRVTcheckTextDirective1() : Cpdf
    • PRVTgetTextPosition() : Cpdf
    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x72.html b/doc/developper/html/functions_0x72.html index 18a97df2c..2702e555d 100644 --- a/doc/developper/html/functions_0x72.html +++ b/doc/developper/html/functions_0x72.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -15,12 +15,13 @@ Here is a list of all struct and union fields with links to the structures/union
  • rapport() : rapport
  • rectangle() : Cpdf
  • remove() -: fiche
  • reopenObject() -: Cpdf
  • Reset() +: fiche
  • reopenObject() +: Cpdf
  • Replace() +: Document
  • Reset() : widget
  • restoreState() : Cpdf
  • rf() : Creport -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x73.html b/doc/developper/html/functions_0x73.html index 40b60658f..0430ede7f 100644 --- a/doc/developper/html/functions_0x73.html +++ b/doc/developper/html/functions_0x73.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -13,7 +13,10 @@ Here is a list of all struct and union fields with links to the structures/union

    - s -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: Customer, contact +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x74.html b/doc/developper/html/functions_0x74.html index 948ea08a7..823b870f7 100644 --- a/doc/developper/html/functions_0x74.html +++ b/doc/developper/html/functions_0x74.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -14,7 +14,7 @@ Here is a list of all struct and union fields with links to the structures/union

    - t -

    • transaction() : Cpdf
    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x75.html b/doc/developper/html/functions_0x75.html index e24d28a84..7b94cd3e1 100644 --- a/doc/developper/html/functions_0x75.html +++ b/doc/developper/html/functions_0x75.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -14,10 +14,11 @@ Here is a list of all struct and union fields with links to the structures/union

    - u -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: Own
  • Upload() +: Document +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x76.html b/doc/developper/html/functions_0x76.html index 01dd421ac..9d7eabbe8 100644 --- a/doc/developper/html/functions_0x76.html +++ b/doc/developper/html/functions_0x76.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -14,7 +14,7 @@ Here is a list of all struct and union fields with links to the structures/union

    - v -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_0x77.html b/doc/developper/html/functions_0x77.html index c767bda78..cb54137c3 100644 --- a/doc/developper/html/functions_0x77.html +++ b/doc/developper/html/functions_0x77.html @@ -4,7 +4,7 @@ - +
    $ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -14,7 +14,7 @@ Here is a list of all struct and union fields with links to the structures/union

    - w -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_func.html b/doc/developper/html/functions_func.html index 74612ed48..6129e9736 100644 --- a/doc/developper/html/functions_func.html +++ b/doc/developper/html/functions_func.html @@ -4,7 +4,7 @@ - +
    a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w
    @@ -12,8 +12,10 @@

    - a -

    - c -

    - e -

    +: Cpdf
  • form() +: Document_modele
  • FormAdd() +: Invoice
  • FormDelete() +: Invoice

    - g -

    @@ -139,7 +151,7 @@

    - m -

    +: Invoice, Document_modele, action

    - n -

    • newDocument() : Cpdf
    • newPage() @@ -169,7 +181,8 @@ : Own

    - p -

    - s -

    +: Customer, contact

    - t -

    • transaction() : Cpdf

    - u -

    +: Own
  • Upload() +: Document

    - v -

    - w -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/functions_vars.html b/doc/developper/html/functions_vars.html index 9110182f5..47576b1ab 100644 --- a/doc/developper/html/functions_vars.html +++ b/doc/developper/html/functions_vars.html @@ -4,7 +4,7 @@ - + @@ -16,7 +16,11 @@ : Attribut
  • $ad_text : Attribut
  • $addLooseObjects : Cpdf
  • $admin -: cl_user
  • $all +: cl_user
  • $ag_date +: action
  • $ag_desc +: action
  • $ag_id +: Document
  • $ag_title +: action
  • $all : fiche_def
  • $arc4 : Cpdf
  • $arc4_objnum : Cpdf
  • $attribut @@ -27,9 +31,10 @@ : Balance
  • $checkpoint : Cpdf
  • $class_base : fiche_def
  • $cn -: Invoice, fiche, fiche_def, Document_modele, Attribut
  • $country -: Customer
  • $cp -: Customer
  • $create_account +: Invoice, fiche, fiche_def, Document_modele, Attribut
  • $company +: contact
  • $country +: Customer
  • $cp +: Customer
  • $create_account : fiche_def
  • $currentBaseFont : Cpdf
  • $currentColour : Cpdf
  • $currentContents @@ -40,19 +45,26 @@ : Cpdf
  • $currentPage : Cpdf
  • $currentStrokeColour : Cpdf
  • $currentTextState -: Cpdf
  • $db -: cl_user, rapport, poste, parm_code, Own, jrn, Balance
  • $destinations +: Cpdf
  • $d_filename +: Document, action
  • $d_lob +: Document, action
  • $d_mimetype +: Document, action
  • $d_number +: Document, action
  • $d_state +: action
  • $db +: cl_user, rapport, poste, parm_code, Own, jrn, Document, Balance, action
  • $destinations : Cpdf
  • $disabled -: widget
  • $encrypted +: widget
  • $dt_id +: action
  • $encrypted : Cpdf
  • $encryptionKey : Cpdf
  • $extra : widget
  • $extra2 : widget
  • $ez : Cezpdf
  • $ezPageCount : Cezpdf
  • $ezPages -: Cezpdf
  • $fiche_def +: Cezpdf
  • $f_id +: action
  • $fiche_def : fiche, fiche_def
  • $fiche_def_ref -: Customer
  • $fileIdentifier +: fiche
  • $fileIdentifier : Cpdf
  • $firstPageId : Cpdf
  • $fontFamilies : Cpdf
  • $fonts @@ -60,16 +72,17 @@ : fiche_def_ref
  • $frd_id : fiche_def_ref
  • $frd_text : fiche_def_ref
  • $id -: cl_user, rapport, poste, jrn, Invoice, fiche, fiche_def, Customer
  • $infoObject +: cl_user, rapport, poste, jrn, Invoice, fiche, fiche_def
  • $infoObject : Cpdf
  • $label : widget, fiche_def
  • $looseObjects : Cpdf
  • $md_id -: Document_modele
  • $md_lob +: Document_modele, Document
  • $md_lob : Document_modele
  • $md_name -: Document_modele
  • $md_type +: Document_modele
  • $md_sequence +: Document_modele
  • $md_type : Document_modele
  • $messages : Cpdf
  • $name -: widget, rapport, jrn, Customer
  • $nCallback +: widget, rapport, jrn, Customer
  • $nCallback : Cpdf
  • $nStack : Cpdf
  • $nStateStack : Cpdf
  • $numFonts @@ -83,26 +96,27 @@ : parm_code
  • $p_value : parm_code
  • $pass : cl_user
  • $poste -: Customer
  • $procsetObjectId +: Customer
  • $procsetObjectId : Cpdf
  • $readonly : widget
  • $reportContents : Creport
  • $row : poste, jrn, Balance
  • $selected -: widget
  • $size +: widget
  • $sequence +: Document_modele
  • $size : widget
  • $stack : Cpdf
  • $stateStack : Cpdf
  • $street -: Customer
  • $tabindex +: Customer
  • $tabindex : widget
  • $table : widget
  • $template : Invoice
  • $type : widget
  • $valid : cl_user
  • $value : widget
  • $vat_number -: Customer
  • $wordSpaceAdjust +: Customer
  • $wordSpaceAdjust : Cpdf
  • $y : Cezpdf -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals.html b/doc/developper/html/globals.html index 3f348f329..15bd4e238 100644 --- a/doc/developper/html/globals.html +++ b/doc/developper/html/globals.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -14,7 +14,7 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li

    - $ -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x5f.html b/doc/developper/html/globals_0x5f.html index 61ce68de9..75eb06b94 100644 --- a/doc/developper/html/globals_0x5f.html +++ b/doc/developper/html/globals_0x5f.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -19,7 +19,7 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li : readme.php
  • __pad4__ : readme.php
  • __pad5__ : readme.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x61.html b/doc/developper/html/globals_0x61.html index a1a999625..e597691ba 100644 --- a/doc/developper/html/globals_0x61.html +++ b/doc/developper/html/globals_0x61.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -13,26 +13,32 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li

    - a -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: constant.php
  • ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP +: constant.php +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x62.html b/doc/developper/html/globals_0x62.html index d6ce075eb..9c77de277 100644 --- a/doc/developper/html/globals_0x62.html +++ b/doc/developper/html/globals_0x62.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -20,7 +20,7 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li : user_impress.php
  • BQE : constant.php
  • break : user_impress.php, readme.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x63.html b/doc/developper/html/globals_0x63.html index a1a58d371..c828353e3 100644 --- a/doc/developper/html/globals_0x63.html +++ b/doc/developper/html/globals_0x63.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -33,7 +33,7 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li : jrn.php
  • CountSql() : postgres.php
  • CreatePeriodeCond() : impress_inc.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x64.html b/doc/developper/html/globals_0x64.html index 88e63c74a..eb24ee9f1 100644 --- a/doc/developper/html/globals_0x64.html +++ b/doc/developper/html/globals_0x64.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -12,19 +12,18 @@ Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

    - d -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x65.html b/doc/developper/html/globals_0x65.html index c51bf1125..ee2dfb7a6 100644 --- a/doc/developper/html/globals_0x65.html +++ b/doc/developper/html/globals_0x65.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -12,26 +12,24 @@ Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

    - e -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x66.html b/doc/developper/html/globals_0x66.html index b4b93a59c..e44d5642b 100644 --- a/doc/developper/html/globals_0x66.html +++ b/doc/developper/html/globals_0x66.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -12,15 +12,17 @@ Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

    - f -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x67.html b/doc/developper/html/globals_0x67.html index 54f5d52f2..86fec6fdb 100644 --- a/doc/developper/html/globals_0x67.html +++ b/doc/developper/html/globals_0x67.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -13,37 +13,37 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li

    - g -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x68.html b/doc/developper/html/globals_0x68.html index ee7a2e3e1..ea4782e25 100644 --- a/doc/developper/html/globals_0x68.html +++ b/doc/developper/html/globals_0x68.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -17,7 +17,7 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li : ac_common.php
  • html_page_start() : ac_common.php
  • html_page_stop() : ac_common.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x69.html b/doc/developper/html/globals_0x69.html index f7ee9a9c3..7770f88e1 100644 --- a/doc/developper/html/globals_0x69.html +++ b/doc/developper/html/globals_0x69.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -21,16 +21,16 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li : import_inc.php
  • InsertJrn() : user_common.php
  • InsertJrnx() : user_common.php
  • InsertModeleLine() -: fiche_inc.php
  • InsertRapt() +: fiche_inc.php
  • InsertRapt() : user_common.php
  • InsertStockGoods() : user_common.php
  • INVALID_ECH : constant.php
  • isCentralize() : central_inc.php
  • isDate() : ac_common.php
  • IsFicheOfJrn() -: fiche_inc.php
  • isNumber() +: fiche_inc.php
  • isNumber() : ac_common.php
  • isValid() : user_common.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x6a.html b/doc/developper/html/globals_0x6a.html index d67057948..df3f579d3 100644 --- a/doc/developper/html/globals_0x6a.html +++ b/doc/developper/html/globals_0x6a.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -14,17 +14,17 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li

    - j -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: constant.php
  • JS_CONCERNED_OP +: constant.php
  • JS_SEARCH_CARD +: constant.php
  • JS_SEARCH_POSTE +: constant.php
  • JS_SHOW_TVA +: constant.php
  • JS_TVA +: constant.php
  • JS_UPDATE_PCMN +: constant.php
  • JS_VIEW_JRN_CANCEL +: constant.php
  • JS_VIEW_JRN_DETAIL +: constant.php
  • JS_VIEW_JRN_MODIFY +: constant.php +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x6c.html b/doc/developper/html/globals_0x6c.html index 4101fd4a1..1069804a9 100644 --- a/doc/developper/html/globals_0x6c.html +++ b/doc/developper/html/globals_0x6c.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -17,7 +17,7 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li : constant.php
  • list_client : user_impress.php
  • ListJrn() : user_common.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x6d.html b/doc/developper/html/globals_0x6d.html index 16e5769f6..16c62e8e4 100644 --- a/doc/developper/html/globals_0x6d.html +++ b/doc/developper/html/globals_0x6d.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -14,7 +14,10 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li

    - m -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: parametre.php
  • MY_CP +: parametre.php
  • MY_NAME +: parametre.php
  • MY_NUMBER +: parametre.php
  • MY_STREET +: parametre.php
  • MY_TVA +: parametre.php +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x6e.html b/doc/developper/html/globals_0x6e.html index 4c5752a5e..7649d583d 100644 --- a/doc/developper/html/globals_0x6e.html +++ b/doc/developper/html/globals_0x6e.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -13,7 +13,7 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li

    - n -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x6f.html b/doc/developper/html/globals_0x6f.html index 5240d99a4..b2a711d2b 100644 --- a/doc/developper/html/globals_0x6f.html +++ b/doc/developper/html/globals_0x6f.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -15,7 +15,7 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li
  • ODS : constant.php
  • OPEN : constant.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x70.html b/doc/developper/html/globals_0x70.html index 1cf08015f..72270d6cd 100644 --- a/doc/developper/html/globals_0x70.html +++ b/doc/developper/html/globals_0x70.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -24,7 +24,7 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li : user_impress.php
  • PosteForm() : poste.php
  • print : impress_rapport.php, impress_poste.php, impress_listing_client.php, impress_jrn.php, impress_bilan.php, class_operation.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x72.html b/doc/developper/html/globals_0x72.html index a2158b0e3..7869569cf 100644 --- a/doc/developper/html/globals_0x72.html +++ b/doc/developper/html/globals_0x72.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -23,11 +23,11 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li : jrn.php
  • RecordODS() : user_form_ods.php
  • RecordSell() : user_form_ach.php
  • Remove() -: fiche_inc.php
  • return -: priv_user.php, parametre.php, listing_client.php, jrn_search.php, form.php, fiche_new.php, dossier_prefs.php, admin_repo.php, user_action_ach.php, periode.inc.php, impress_listing_client.php
  • Rollback() +: fiche_inc.php
  • return +: priv_user.php, parametre.php, listing_client.php, jrn_search.php, form.php, fiche_new.php, admin_repo.php, user_action_ach.php, periode.inc.php, impress_listing_client.php
  • Rollback() : postgres.php
  • ros_logo() : readme.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x73.html b/doc/developper/html/globals_0x73.html index 65ee6725c..72ac7dac7 100644 --- a/doc/developper/html/globals_0x73.html +++ b/doc/developper/html/globals_0x73.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -14,9 +14,9 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li

    - s -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x74.html b/doc/developper/html/globals_0x74.html index f62fab25d..26940fba7 100644 --- a/doc/developper/html/globals_0x74.html +++ b/doc/developper/html/globals_0x74.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -13,11 +13,11 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li

    - t -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x75.html b/doc/developper/html/globals_0x75.html index 749b6faa3..eb3587201 100644 --- a/doc/developper/html/globals_0x75.html +++ b/doc/developper/html/globals_0x75.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -18,11 +18,11 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li : user_menu.php
  • UpdateComment() : user_common.php
  • UpdateCSV() : import_inc.php
  • UpdateFiche() -: fiche_inc.php
  • UpdateForm() +: fiche_inc.php
  • UpdateForm() : form_inc.php
  • UpdateJrn() : jrn.php
  • UpdateModele() -: fiche_inc.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: fiche_inc.php +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x76.html b/doc/developper/html/globals_0x76.html index b220493a0..2b90b7609 100644 --- a/doc/developper/html/globals_0x76.html +++ b/doc/developper/html/globals_0x76.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -13,23 +13,21 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li

    - v -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x77.html b/doc/developper/html/globals_0x77.html index eea245b99..e6eec48e1 100644 --- a/doc/developper/html/globals_0x77.html +++ b/doc/developper/html/globals_0x77.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -15,7 +15,7 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li
  • width : tva.inc.php
  • withStock() : user_common.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_0x79.html b/doc/developper/html/globals_0x79.html index 60198a7cb..fafad13ff 100644 --- a/doc/developper/html/globals_0x79.html +++ b/doc/developper/html/globals_0x79.html @@ -4,7 +4,7 @@ - +
    $ | _ | a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | r | s | t | u | v | w | y
    @@ -14,7 +14,7 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li

    - y -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_enum.html b/doc/developper/html/globals_enum.html index bb2922d3a..9d649adcc 100644 --- a/doc/developper/html/globals_enum.html +++ b/doc/developper/html/globals_enum.html @@ -4,7 +4,7 @@ - +
    a | b | c | d | e | f | g | i | j | l | m | n | o | p | r | s | v | y
    @@ -15,18 +15,23 @@
  • ALL_FICHE_DEF_REF : constant.php
  • ATTR_DEF_ACCOUNT : constant.php
  • ATTR_DEF_ADRESS -: constant.php
  • ATTR_DEF_CP -: constant.php
  • ATTR_DEF_DEPENSE_NON_DEDUCTIBLE -: constant.php
  • ATTR_DEF_NAME -: constant.php
  • ATTR_DEF_PAYS -: constant.php
  • ATTR_DEF_PRIX_ACHAT +: constant.php
  • ATTR_DEF_COMPANY +: constant.php
  • ATTR_DEF_CP +: constant.php
  • ATTR_DEF_DEPENSE_NON_DEDUCTIBLE +: constant.php
  • ATTR_DEF_EMAIL +: constant.php
  • ATTR_DEF_FAX +: constant.php
  • ATTR_DEF_NAME +: constant.php
  • ATTR_DEF_NUMTVA +: constant.php
  • ATTR_DEF_PAYS +: constant.php
  • ATTR_DEF_PRIX_ACHAT : constant.php
  • ATTR_DEF_PRIX_VENTE : constant.php
  • ATTR_DEF_QUICKCODE -: constant.php
  • ATTR_DEF_STOCK -: constant.php
  • ATTR_DEF_TVA +: constant.php
  • ATTR_DEF_STOCK +: constant.php
  • ATTR_DEF_TEL +: constant.php
  • ATTR_DEF_TVA : constant.php
  • ATTR_DEF_TVA_NON_DEDUCTIBLE -: constant.php
  • ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP -: constant.php +: constant.php
  • ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP +: constant.php

    - b -

    @@ -70,16 +76,16 @@ : constant.php

    - j -

    +: constant.php
  • JS_CONCERNED_OP +: constant.php
  • JS_SEARCH_CARD +: constant.php
  • JS_SEARCH_POSTE +: constant.php
  • JS_SHOW_TVA +: constant.php
  • JS_TVA +: constant.php
  • JS_UPDATE_PCMN +: constant.php
  • JS_VIEW_JRN_CANCEL +: constant.php
  • JS_VIEW_JRN_DETAIL +: constant.php
  • JS_VIEW_JRN_MODIFY +: constant.php

    - l -

    @@ -115,9 +121,9 @@

    - s -

    - v -

    - e -

    - g -

    - j -

    - s -

    +: fiche_inc.php

    - v -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x62.html b/doc/developper/html/globals_vars_0x62.html index 5068764bc..77c16bee2 100644 --- a/doc/developper/html/globals_vars_0x62.html +++ b/doc/developper/html/globals_vars_0x62.html @@ -4,9 +4,9 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    @@ -16,7 +16,7 @@ : user_impress.php

  • bilan : user_impress.php
  • break : user_impress.php, readme.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x63.html b/doc/developper/html/globals_vars_0x63.html index e29e941fd..2961c0243 100644 --- a/doc/developper/html/globals_vars_0x63.html +++ b/doc/developper/html/globals_vars_0x63.html @@ -4,9 +4,9 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    @@ -17,7 +17,7 @@ : class_operation.php

  • compile_dir : test_smarty.php
  • config_dir : test_smarty.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x64.html b/doc/developper/html/globals_vars_0x64.html index 6e4ce48ff..f775bf22a 100644 --- a/doc/developper/html/globals_vars_0x64.html +++ b/doc/developper/html/globals_vars_0x64.html @@ -4,9 +4,9 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    @@ -14,7 +14,7 @@

    - d -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x65.html b/doc/developper/html/globals_vars_0x65.html index 4402989f8..38f183f37 100644 --- a/doc/developper/html/globals_vars_0x65.html +++ b/doc/developper/html/globals_vars_0x65.html @@ -4,20 +4,18 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    - e -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: user_sec.php, user_jrn.php, show_tva.php, show_pj.php, show_document_modele.php, sec_pdf.php, print_balance.php, poste_csv.php, pcmn_update.php, parametre.php, modify_op.php, line_update.php, jrn_update.php, jrn_search.php, jrn_detail.php, jrn_csv.php, jrn_add.php, fiche_csv.php, facturation.php, export_ouv.php, ecrit_ouv.php, bal_csv.php, annulation.php, admin_repo.php, user_update.php, user_action_ven.php, user_action_ods.php, user_action_gl.php, user_action_fin.php, user_action_ach.php, impress_rapport.php, impress_poste.php, impress_jrn.php, balance.php +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x66.html b/doc/developper/html/globals_vars_0x66.html index 11132b48c..af2616085 100644 --- a/doc/developper/html/globals_vars_0x66.html +++ b/doc/developper/html/globals_vars_0x66.html @@ -4,20 +4,21 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    - f -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x68.html b/doc/developper/html/globals_vars_0x68.html index 44cd655d2..0d6c8d295 100644 --- a/doc/developper/html/globals_vars_0x68.html +++ b/doc/developper/html/globals_vars_0x68.html @@ -4,9 +4,9 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    @@ -14,7 +14,7 @@

    - h -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x69.html b/doc/developper/html/globals_vars_0x69.html index d9fd406c3..a468dca43 100644 --- a/doc/developper/html/globals_vars_0x69.html +++ b/doc/developper/html/globals_vars_0x69.html @@ -4,9 +4,9 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    @@ -14,7 +14,7 @@

    - i -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x6c.html b/doc/developper/html/globals_vars_0x6c.html index 24f454c41..908409a59 100644 --- a/doc/developper/html/globals_vars_0x6c.html +++ b/doc/developper/html/globals_vars_0x6c.html @@ -4,9 +4,9 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    @@ -15,7 +15,7 @@

  • label : ecrit_ouv.php, impress_rapport.php, impress_poste.php, impress_listing_client.php, impress_jrn.php, impress_bilan.php, class_operation.php, balance.php
  • list_client : user_impress.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x6d.html b/doc/developper/html/globals_vars_0x6d.html index 3ebbebf29..91cea5d29 100644 --- a/doc/developper/html/globals_vars_0x6d.html +++ b/doc/developper/html/globals_vars_0x6d.html @@ -4,23 +4,26 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    - m -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: parametre.php
  • MY_CP +: parametre.php
  • MY_NAME +: parametre.php
  • MY_NUMBER +: parametre.php
  • MY_STREET +: parametre.php
  • MY_TVA +: parametre.php +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x6e.html b/doc/developper/html/globals_vars_0x6e.html index 716b29efc..debfd084d 100644 --- a/doc/developper/html/globals_vars_0x6e.html +++ b/doc/developper/html/globals_vars_0x6e.html @@ -4,17 +4,17 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    - n -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: ecrit_ouv.php, user_action_ven.php, user_action_ods.php, user_action_gl.php, user_action_fin.php, user_action_ach.php, tva.inc.php, poste.inc.php, facture.inc.php, contact.inc.php, client.inc.php +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x70.html b/doc/developper/html/globals_vars_0x70.html index 3d7a849d1..78da545a0 100644 --- a/doc/developper/html/globals_vars_0x70.html +++ b/doc/developper/html/globals_vars_0x70.html @@ -4,9 +4,9 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    @@ -17,7 +17,7 @@ : poste.inc.php

  • poste : user_impress.php
  • print : impress_rapport.php, impress_poste.php, impress_listing_client.php, impress_jrn.php, impress_bilan.php, class_operation.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x72.html b/doc/developper/html/globals_vars_0x72.html index 7e2e89c21..05fad247d 100644 --- a/doc/developper/html/globals_vars_0x72.html +++ b/doc/developper/html/globals_vars_0x72.html @@ -4,9 +4,9 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    @@ -15,8 +15,8 @@

  • rapport : user_impress.php
  • readonly : ecrit_ouv.php
  • return -: priv_user.php, parametre.php, listing_client.php, jrn_search.php, form.php, fiche_new.php, dossier_prefs.php, admin_repo.php, user_action_ach.php, periode.inc.php, impress_listing_client.php -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: priv_user.php, parametre.php, listing_client.php, jrn_search.php, form.php, fiche_new.php, admin_repo.php, user_action_ach.php, periode.inc.php, impress_listing_client.php +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x73.html b/doc/developper/html/globals_vars_0x73.html index 09d237bf7..c43280ff1 100644 --- a/doc/developper/html/globals_vars_0x73.html +++ b/doc/developper/html/globals_vars_0x73.html @@ -4,19 +4,20 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    - s -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x74.html b/doc/developper/html/globals_vars_0x74.html index 4491f46cf..4c9e063fc 100644 --- a/doc/developper/html/globals_vars_0x74.html +++ b/doc/developper/html/globals_vars_0x74.html @@ -4,19 +4,19 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    - t -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x76.html b/doc/developper/html/globals_vars_0x76.html index 54ff9fe69..578233179 100644 --- a/doc/developper/html/globals_vars_0x76.html +++ b/doc/developper/html/globals_vars_0x76.html @@ -4,17 +4,17 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    - v -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +: ecrit_ouv.php, user_action_ven.php, user_action_ods.php, user_action_gl.php, user_action_fin.php, user_action_ach.php, tva.inc.php, poste.inc.php, facture.inc.php, contact.inc.php, client.inc.php +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/globals_vars_0x77.html b/doc/developper/html/globals_vars_0x77.html index 31bad1df5..3bf51b986 100644 --- a/doc/developper/html/globals_vars_0x77.html +++ b/doc/developper/html/globals_vars_0x77.html @@ -4,9 +4,9 @@ - + -
    $ | _ | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w
    +
    $ | _ | a | b | c | d | e | f | h | i | l | m | n | p | r | s | t | v | w

    @@ -14,7 +14,7 @@

    - w -

    -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/hierarchy.html b/doc/developper/html/hierarchy.html index 3f975cb3a..d5f1686bc 100644 --- a/doc/developper/html/hierarchy.html +++ b/doc/developper/html/hierarchy.html @@ -4,8 +4,9 @@ - +

    phpcompta Class Hierarchy

    This inheritance list is sorted roughly, but not completely, alphabetically: +
  • Document
  • Document_modele +
  • Document_type
  • fiche
  • fiche_def @@ -31,7 +35,7 @@
  • rapport
  • widget -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/import_8php-source.html b/doc/developper/html/import_8php-source.html index fd6f13e77..de548f141 100644 --- a/doc/developper/html/import_8php-source.html +++ b/doc/developper/html/import_8php-source.html @@ -4,7 +4,7 @@ - +

    import.php

    Go to the documentation of this file.
    00001 <?
    @@ -28,82 +28,81 @@
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00021 // Author Olivier Dzwoniarkiewicz
    -00022 
    -00023 include_once("ac_common.php");
    -00024 include_once("user_menu.php");
    -00025 include_once ("constant.php");
    -00026 include_once ("postgres.php");
    -00027 include_once ("check_priv.php");
    -00028 include_once ("class_widget.php");
    -00029 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00030   echo "You must choose a Dossier ";
    -00031   exit -2;
    -00032 }
    -00033 $cn=DbConnect($_SESSION['g_dossier']);
    -00034 include ('class_user.php');
    -00035 $User=new cl_user($cn);
    -00036 $User->Check();
    -00037 
    -00038 html_page_start($User->theme);
    -00039 
    +00026 include_once("ac_common.php");
    +00027 include_once("user_menu.php");
    +00028 include_once ("constant.php");
    +00029 include_once ("postgres.php");
    +00030 include_once ("check_priv.php");
    +00031 include_once ("class_widget.php");
    +00032 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00033   echo "You must choose a Dossier ";
    +00034   exit -2;
    +00035 }
    +00036 $cn=DbConnect($_SESSION['g_dossier']);
    +00037 include ('class_user.php');
    +00038 $User=new cl_user($cn);
    +00039 $User->Check();
     00040 
    -00041 /* Admin. Dossier */
    +00041 html_page_start($User->theme);
     00042 
    -00043 include_once("import_inc.php");
    -00044 
    -00045 include_once ("user_menu.php");
    -00046 echo '<div class="u_tmenu">';
    -00047 echo ShowMenuCompta($_SESSION['g_dossier']);
    -00048 echo '</div>';
    -00049 $cn=DbConnect($_SESSION['g_dossier']);
    -00050 if ( $User->CheckAction($cn,IMP_BQE)==0){
    -00051   /* Cannot Access */
    -00052   NoAccess();
    -00053  }
    -00054 echo ShowMenuAdvanced("import.php");
    -00055 
    -00056 echo '<div class="lmenu">';
    -00057 ShowMenuImport();
    -00058 echo '</div>';
    -00059 if ( isset( $_REQUEST['PHPSESSID'])) {
    -00060         $sessid = $_REQUEST['PHPSESSID'];
    -00061 }
    -00062 echo JS_SEARCH_POSTE;
    -00063 
    -00064 // if action is set proceed to it
    -00065 if ( isset ($_GET["action"]) ) {
    -00066   $action=$_GET["action"];
    -00067 // menu = import cvs
    -00068   if ($action == "import" ) {
    -00069     if(isset($_FILES['fupload'])) {
    -00070         // load the table with the cvs' content
    -00071       echo '<DIV class="u_redcontent">';
    -00072       ImportCSV($cn,$_FILES['fupload']['tmp_name'],$_POST['import_bq'],$_POST['format_csv'],$_POST['import_jrn']);
    -00073       echo "</DIV>";
    -00074     } else {
    -00075       echo '<DIV class="u_redcontent">';
    -00076       ShowFormTransfert($cn);
    -00077       echo "</DIV>";
    -00078     }
    -00079   }
    -00080   if ($action == "verif" ) {
    -00081     if(isset($_POST['poste'])) {
    -00082       UpdateCSV($cn, $_POST['code'], $_POST['poste']);
    -00083     }
    -00084     echo '<DIV class="u_redcontent">';
    -00085     VerifImport($cn);
    -00086     echo "</DIV>";
    -00087   }
    -00088   if ($action == "transfer" ) {
    -00089     echo '<DIV class="u_redcontent">';
    -00090     TransferCSV($cn, $User->GetPeriode());
    -00091     echo "</DIV>";
    -00092   }
    -00093 } 
    -00094 
    -00095 html_page_stop();
    -00096 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00043 +00044 /* Admin. Dossier */ +00045 +00046 include_once("import_inc.php"); +00047 +00048 include_once ("user_menu.php"); +00049 echo '<div class="u_tmenu">'; +00050 echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php"); +00051 echo '</div>'; +00052 $cn=DbConnect($_SESSION['g_dossier']); +00053 if ( $User->CheckAction($cn,IMP_BQE)==0){ +00054 /* Cannot Access */ +00055 NoAccess(); +00056 } +00057 echo ShowMenuAdvanced("import.php"); +00058 +00059 echo '<div class="lmenu">'; +00060 ShowMenuImport(); +00061 echo '</div>'; +00062 if ( isset( $_REQUEST['PHPSESSID'])) { +00063 $sessid = $_REQUEST['PHPSESSID']; +00064 } +00065 echo JS_SEARCH_POSTE; +00066 +00067 // if action is set proceed to it +00068 if ( isset ($_GET["action"]) ) { +00069 $action=$_GET["action"]; +00070 // menu = import cvs +00071 if ($action == "import" ) { +00072 if(isset($_FILES['fupload'])) { +00073 // load the table with the cvs' content +00074 echo '<DIV class="u_redcontent">'; +00075 ImportCSV($cn,$_FILES['fupload']['tmp_name'],$_POST['import_bq'],$_POST['format_csv'],$_POST['import_jrn']); +00076 echo "</DIV>"; +00077 } else { +00078 echo '<DIV class="u_redcontent">'; +00079 ShowFormTransfert($cn); +00080 echo "</DIV>"; +00081 } +00082 } +00083 if ($action == "verif" ) { +00084 if(isset($_POST['poste'])) { +00085 UpdateCSV($cn, $_POST['code'], $_POST['poste']); +00086 } +00087 echo '<DIV class="u_redcontent">'; +00088 VerifImport($cn); +00089 echo "</DIV>"; +00090 } +00091 if ($action == "transfer" ) { +00092 echo '<DIV class="u_redcontent">'; +00093 TransferCSV($cn, $User->GetPeriode()); +00094 echo "</DIV>"; +00095 } +00096 } +00097 +00098 html_page_stop(); +00099 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/import_8php.html b/doc/developper/html/import_8php.html index 486eda1dd..de8368c44 100644 --- a/doc/developper/html/import_8php.html +++ b/doc/developper/html/import_8php.html @@ -4,10 +4,12 @@ - + -

    import.php File Reference

    +

    import.php File Reference

    for importing Bank operations More... +

    +

    Go to the source code of this file. @@ -17,7 +19,12 @@
     $cn = DbConnect($_SESSION['g_dossier'])
    -


    Variable Documentation

    +

    Detailed Description

    +for importing Bank operations +

    + +

    +Definition in file import.php.


    Variable Documentation

    @@ -40,7 +47,7 @@

    -Definition at line 49 of file import.php. +Definition at line 52 of file import.php.

    @@ -65,10 +72,10 @@ Definition at line 49 of

    -Definition at line 35 of file import.php. +Definition at line 38 of file import.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/import__inc_8php-source.html b/doc/developper/html/import__inc_8php-source.html index a5236a372..ec5c21deb 100644 --- a/doc/developper/html/import__inc_8php-source.html +++ b/doc/developper/html/import__inc_8php-source.html @@ -4,7 +4,7 @@ - +

    import_inc.php

    Go to the documentation of this file.
    00001 <?
    @@ -31,180 +31,142 @@
     00022 include_once("jrn.php");
     00023 include_once("preference.php");
     00024 include_once("user_common.php");
    -00025 /* function ImportCSV
    -00026  **************************************************
    -00027  * Purpose : Parse the file and insert the record
    -00028  *          into the table import_tmp. Insert in a temporary table, if
    -00029  *          no confirmation is given then the data are removed otherwise
    -00030  *          records are inserted into import_tmp
    -00031  *        
    -00032  * parm : 
    -00033  *      - p_cn database connection
    -00034  *  - file the uploaded file
    -00035  *  - $p_bq_account 
    -00036  *  - p_format_csv file to include (depending of the bank)
    -00037  * gen :
    -00038  *      -
    -00039  * return:
    -00040  */
    -00041 function ImportCSV($p_cn,$file,$p_bq_account,$p_format_csv,$p_jrn)
    -00042 {
    -00043         if(!$handle = fopen($file, "r")) {
    -00044                 print 'could not open file. quitting';
    -00045                 die;
    -00046         }
    -00047 
    -00048 StartSql($p_cn);
    +00037 function ImportCSV($p_cn,$file,$p_bq_account,$p_format_csv,$p_jrn)
    +00038 {
    +00039         if(!$handle = fopen($file, "r")) {
    +00040                 print 'could not open file. quitting';
    +00041                 die;
    +00042         }
    +00043 
    +00044 StartSql($p_cn);
    +00045 
    +00046         
    +00047 // include the right format for CSV --> given by the <form
    +00048                 include($p_format_csv);
     00049 
     00050         
    -00051 // include the right format for CSV --> given by the <form
    -00052                 include($p_format_csv);
    -00053 
    -00054         
    -00055         echo "Importation terminée.";
    -00056 
    -00057 // if importation succeeds then we can commit the change
    -00058 Commit($p_cn);
    -00059 /* Done by trigger
    -00060 // clean all the double quote
    -00061 $sql="update import_tmp set 
    -00062                 compte_ordre=replace(compte_ordre,'\"',''),
    -00063                 detail=replace(detail,'\"',''),
    -00064                 num_compte=replace(num_compte,'\"','');";
    -00065 ExecSql($p_cn,$sql);*/
    -00066 
    -00067 }
    -00068 
    -00069 function UpdateCSV($p_cn, $code, $poste){
    -00070         $sql = "update import_tmp set poste_comptable='".$poste."' where code='".$code."'";
    -00071         $Res=ExecSql($p_cn,$sql);
    -00072 }
    -00073 
    -00074 function VerifImport($p_cn){
    -00075         $sql = "select * from import_tmp where poste_comptable='' or poste_comptable is null";
    -00076         $Res=ExecSql($p_cn,$sql);
    -00077         $Num=pg_NumRows($Res);
    -00078         echo $Num." opérations à complèter.<br/><br/>";
    -00079         $i=1;
    -00080         while($val = pg_fetch_array($Res)){
    -00081                 echo '<form METHOD="POST" action="import.php?action=verif">';
    -00082                 echo '<input type="hidden" name="code" value="'.$val['code'].'">';
    -00083                 echo '<table border="1" width="500">';
    -00084                 echo '<tr><td width="200">'.$val['code'].'</td><td width="200">'.$val['date_exec'].'</td><td width="100">'.$val['montant'].' EUR</td><tr/>';
    -00085                 echo '<tr><td height="50" colspan="3">'.$val['detail'].'</td><tr/>';
    -00086                 echo '<tr><td>Poste Comptable : <input type="text" size="10" name="poste"></td>';
    -00087                 echo "<td>n° compte : ".$val['num_compte']."</td>";
    -00088                 echo '<td><input type="submit" value="modifier"></td><tr/>';
    -00089                 echo '</table>';
    -00090                 echo '</FORM>';
    -00091                 $i++;
    -00092         }
    -00093 }
    -00094 
    -00095 function TransferCSV($p_cn, $periode){
    -00096         //on obtient la période courante
    -00097         //$p_user = $_SESSION['g_user'];
    -00098         //$periode = GetUserPeriode($p_cn,$p_user);
    -00099         //$periode = $p_user->GetPeriode();
    -00100         // on trouve les dates frontières de cette période
    -00101         $sql = "select p_start,p_end from parm_periode where p_id = '".$periode."'";
    -00102         $Res=ExecSql($p_cn,$sql);
    -00103         $val = pg_fetch_array($Res);
    -00104         $start = $val['p_start'];   $end = $val['p_end'];
    -00105         
    -00106         $sql = "select * from import_tmp where poste_comptable is not null and  poste_comptable <> '' 
    -00107             AND ok <> TRUE AND date_exec BETWEEN '".$start."' and '".$end."'";
    -00108         $Res=ExecSql($p_cn,$sql);
    -00109         //echo "boucle: ".sizeof($Res)."<br/>";
    -00110         //while($val = pg_fetch_array($Res)){
    -00111         $Max=pg_NumRows($Res);
    -00112         echo $Max." opérations à transférer.<br/>";
    -00113         for ($i = 0;$i < $Max;$i++) {
    -00114                 $val=pg_fetch_array($Res,$i);
    -00115                 
    -00116                 $code=$val['code']; $date_exec=$val['date_exec']; $montant=$val['montant']; $num_compte=$val['num_compte']; 
    -00117                 $poste_comptable=$val['poste_comptable'];$bq_account=$val['bq_account'];
    -00118                 $jrn=$val['jrn'];
    -00119 
    -00120                 list($annee, $mois, $jour) = explode("-", $date_exec);
    -00121                 $date_exec = $jour.".".$mois.".".$annee;
    -00122 
    -00123                 // Vérification que le poste comptable trouvé existe
    -00124                 $sqltest = "select * from tmp_pcmn WHERE pcm_val='".$poste_comptable."'";
    -00125                 $Restest=ExecSql($p_cn,$sqltest);
    -00126                 $test=pg_NumRows($Restest);
    -00127                 if($test == 0) {
    -00128                         $sqlupdate = "update import_tmp set poste_comptable='' WHERE code='".$code."' AND num_compte='".$num_compte."'";
    -00129                         $Resupdate=ExecSql($p_cn,$sqlupdate);
    -00130                         echo "Poste comptable erronné pour l'opération ".$num_compte."-".$code.", réinitialisation du poste comptable<br/>";
    -00131                 } else {
    -00132 
    -00133                 // Finances
    -00134         
    -00135                 //$seq = GetNextId($p_cn,'j_grpt')+1;
    -00136                 $seq=NextSequence($p_cn,'s_grpt');
    -00137                 $p_user = $_SESSION['g_user'];
    -00138                 //$periode = GetUserPeriode($p_cn,$p_user);
    -00139                 //$periode = $User->GetPeriode();
    -00140                 StartSql($p_cn);
    -00141 
    -00142                 $r=InsertJrnx($p_cn,"d",$p_user,$jrn,$bq_account,$date_exec,$montant,$seq,$periode);
    -00143                 if ( $r == false) { $Rollback($p_cn);exit("error 'import_inc.php' __LINE__");}
    -00144         
    -00145                 $r=InsertJrnx($p_cn,"c",$p_user,$jrn,$poste_comptable,$date_exec,$montant,$seq,$periode);
    -00146                 if ( $r == false) { $Rollback($p_cn);exit("error 'import_inc.php' __LINE__");}
    -00147 
    -00148                 //remove annoying double-quote
    -00149                 $num_compte=str_replace('"','',$num_compte);
    -00150                 $code=str_replace('\"','',$code);
    -00151         
    -00152                 $r=InsertJrn($p_cn,$date_exec,NULL,$jrn,$num_compte." ".$code,$montant,$seq,$periode);
    -00153                 if ( $r == false ) { Rollback($p_cn); exit(" Error 'import_inc.php' __LINE__");}
    -00154                   
    -00155                 //$sql = "insert into jrn (jr_def_id,jr_montant,jr_comment,jr_date,jr_grpt_id,jr_tech_per) values ( ".$p_jrn.", abs(".round($montant,2)."), '".$num_compte." ".$code."','".$date_valeur."','".$seq."','".$periode."')";
    -00156                 SetInternalCode($p_cn,$seq,$jrn);
    +00051         echo "Importation terminée.";
    +00052 
    +00053 // if importation succeeds then we can commit the change
    +00054 Commit($p_cn);
    +00055 
    +00056 }
    +00060 function UpdateCSV($p_cn, $code, $poste){
    +00061         $sql = "update import_tmp set poste_comptable='".$poste."' where code='".$code."'";
    +00062         $Res=ExecSql($p_cn,$sql);
    +00063 }
    +00067 function VerifImport($p_cn){
    +00068         $sql = "select * from import_tmp where poste_comptable='' or poste_comptable is null";
    +00069         $Res=ExecSql($p_cn,$sql);
    +00070         $Num=pg_NumRows($Res);
    +00071         echo $Num." opérations à complèter.<br/><br/>";
    +00072         $i=1;
    +00073         while($val = pg_fetch_array($Res)){
    +00074                 echo '<form METHOD="POST" action="import.php?action=verif">';
    +00075                 echo '<input type="hidden" name="code" value="'.$val['code'].'">';
    +00076                 echo '<table border="1" width="500">';
    +00077                 echo '<tr><td width="200">'.$val['code'].'</td><td width="200">'.$val['date_exec'].'</td><td width="100">'.$val['montant'].' EUR</td><tr/>';
    +00078                 echo '<tr><td height="50" colspan="3">'.$val['detail'].'</td><tr/>';
    +00079                 echo '<tr><td>Poste Comptable : <input type="text" size="10" name="poste"></td>';
    +00080                 echo "<td>n° compte : ".$val['num_compte']."</td>";
    +00081                 echo '<td><input type="submit" value="modifier"></td><tr/>';
    +00082                 echo '</table>';
    +00083                 echo '</FORM>';
    +00084                 $i++;
    +00085         }
    +00086 }
    +00090 function TransferCSV($p_cn, $periode){
    +00091         //on obtient la période courante
    +00092         //$p_user = $_SESSION['g_user'];
    +00093         //$periode = GetUserPeriode($p_cn,$p_user);
    +00094         //$periode = $p_user->GetPeriode();
    +00095         // on trouve les dates frontières de cette période
    +00096         $sql = "select p_start,p_end from parm_periode where p_id = '".$periode."'";
    +00097         $Res=ExecSql($p_cn,$sql);
    +00098         $val = pg_fetch_array($Res);
    +00099         $start = $val['p_start'];   $end = $val['p_end'];
    +00100         
    +00101         $sql = "select * from import_tmp where poste_comptable is not null and  poste_comptable <> '' 
    +00102             AND ok <> TRUE AND date_exec BETWEEN '".$start."' and '".$end."'";
    +00103         $Res=ExecSql($p_cn,$sql);
    +00104         //echo "boucle: ".sizeof($Res)."<br/>";
    +00105         //while($val = pg_fetch_array($Res)){
    +00106         $Max=pg_NumRows($Res);
    +00107         echo $Max." opérations à transférer.<br/>";
    +00108         for ($i = 0;$i < $Max;$i++) {
    +00109                 $val=pg_fetch_array($Res,$i);
    +00110                 
    +00111                 $code=$val['code']; $date_exec=$val['date_exec']; $montant=$val['montant']; $num_compte=$val['num_compte']; 
    +00112                 $poste_comptable=$val['poste_comptable'];$bq_account=$val['bq_account'];
    +00113                 $jrn=$val['jrn'];
    +00114 
    +00115                 list($annee, $mois, $jour) = explode("-", $date_exec);
    +00116                 $date_exec = $jour.".".$mois.".".$annee;
    +00117 
    +00118                 // Vérification que le poste comptable trouvé existe
    +00119                 $sqltest = "select * from tmp_pcmn WHERE pcm_val='".$poste_comptable."'";
    +00120                 $Restest=ExecSql($p_cn,$sqltest);
    +00121                 $test=pg_NumRows($Restest);
    +00122                 if($test == 0) {
    +00123                         $sqlupdate = "update import_tmp set poste_comptable='' WHERE code='".$code."' AND num_compte='".$num_compte."'";
    +00124                         $Resupdate=ExecSql($p_cn,$sqlupdate);
    +00125                         echo "Poste comptable erronné pour l'opération ".$num_compte."-".$code.", réinitialisation du poste comptable<br/>";
    +00126                 } else {
    +00127 
    +00128                 // Finances
    +00129         
    +00130                 //$seq = GetNextId($p_cn,'j_grpt')+1;
    +00131                 $seq=NextSequence($p_cn,'s_grpt');
    +00132                 $p_user = $_SESSION['g_user'];
    +00133                 //$periode = GetUserPeriode($p_cn,$p_user);
    +00134                 //$periode = $User->GetPeriode();
    +00135                 StartSql($p_cn);
    +00136 
    +00137                 $r=InsertJrnx($p_cn,"d",$p_user,$jrn,$bq_account,$date_exec,$montant,$seq,$periode);
    +00138                 if ( $r == false) { $Rollback($p_cn);exit("error 'import_inc.php' __LINE__");}
    +00139         
    +00140                 $r=InsertJrnx($p_cn,"c",$p_user,$jrn,$poste_comptable,$date_exec,$montant,$seq,$periode);
    +00141                 if ( $r == false) { $Rollback($p_cn);exit("error 'import_inc.php' __LINE__");}
    +00142 
    +00143                 //remove annoying double-quote
    +00144                 $num_compte=str_replace('"','',$num_compte);
    +00145                 $code=str_replace('\"','',$code);
    +00146         
    +00147                 $r=InsertJrn($p_cn,$date_exec,NULL,$jrn,$num_compte." ".$code,$montant,$seq,$periode);
    +00148                 if ( $r == false ) { Rollback($p_cn); exit(" Error 'import_inc.php' __LINE__");}
    +00149                   
    +00150                 //$sql = "insert into jrn (jr_def_id,jr_montant,jr_comment,jr_date,jr_grpt_id,jr_tech_per) values ( ".$p_jrn.", abs(".round($montant,2)."), '".$num_compte." ".$code."','".$date_valeur."','".$seq."','".$periode."')";
    +00151                 SetInternalCode($p_cn,$seq,$jrn);
    +00152 
    +00153 
    +00154                 echo "Tranfer de l'opération ".$code." effectué<br/>";
    +00155                 $sql2 = "update import_tmp set ok=TRUE where code='".$code."'";
    +00156                 $Res2=ExecSql($p_cn,$sql2);
     00157 
    -00158 
    -00159                 echo "Tranfer de l'opération ".$code." effectué<br/>";
    -00160                 $sql2 = "update import_tmp set ok=TRUE where code='".$code."'";
    -00161                 $Res2=ExecSql($p_cn,$sql2);
    -00162 
    -00163                 Commit($p_cn);
    -00164                 }
    -00165         }
    -00166 }
    -00167 /* function ShowForm
    -00168  **************************************************
    -00169  * Purpose : ShowForm for getting data about 
    -00170  *           the bank transfert in cvs
    -00171  *        
    -00172  * parm :  database connection
    -00173  *      -
    -00174  * gen :
    -00175  *      -
    -00176  * return: none
    -00177  */
    -00178 
    -00179 function ShowFormTransfert($p_cn){
    -00180 $w=new widget("select");
    -00181   echo '<FORM METHOD="POST" action="import.php?action=import" enctype="multipart/form-data">';
    -00182   echo '<INPUT TYPE="file" name="fupload" size="20"><br>';
    -00183   // ask for the journal target 
    -00184   $jrn=make_array ($p_cn,"select jrn_def_id,jrn_def_name from jrn_def where jrn_def_type='FIN';");
    -00185   $w->label='Journal';
    -00186   echo $w->label." :".$w->IOValue('import_jrn',$jrn)."<br>";
    -00187   // choose the bank account
    -00188   $bq=make_array($p_cn,"select pcm_val,pcm_lib from tmp_pcmn where pcm_val like '550%'");
    -00189   $w->label='Banque';
    -00190   echo "Compte en banque :".$w->IOValue('import_bq',$bq)."<br>";
    -00191   $format_csv=make_array($p_cn,"select include_file,name from format_csv_banque;");
    -00192   $w->label="Format import";
    -00193   echo $w->label.$w->IOValue('format_csv',$format_csv).'<br>';
    -00194   echo '<INPUT TYPE="SUBMIT" Value="Import fiche">';
    -00195   echo '</FORM>';
    -00196 }
    -00197 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00158 Commit($p_cn); +00159 } +00160 } +00161 } +00174 function ShowFormTransfert($p_cn){ +00175 $w=new widget("select"); +00176 echo '<FORM METHOD="POST" action="import.php?action=import" enctype="multipart/form-data">'; +00177 echo '<INPUT TYPE="file" name="fupload" size="20"><br>'; +00178 // ask for the journal target +00179 $jrn=make_array ($p_cn,"select jrn_def_id,jrn_def_name from jrn_def where jrn_def_type='FIN';"); +00180 $w->label='Journal'; +00181 echo $w->label." :".$w->IOValue('import_jrn',$jrn)."<br>"; +00182 // choose the bank account +00183 $bq=make_array($p_cn,"select pcm_val,pcm_lib from tmp_pcmn where pcm_val like '550%'"); +00184 $w->label='Banque'; +00185 echo "Compte en banque :".$w->IOValue('import_bq',$bq)."<br>"; +00186 $format_csv=make_array($p_cn,"select include_file,name from format_csv_banque;"); +00187 $w->label="Format import"; +00188 echo $w->label.$w->IOValue('format_csv',$format_csv).'<br>'; +00189 echo '<INPUT TYPE="SUBMIT" Value="Import fiche">'; +00190 echo '</FORM>'; +00191 } +00192 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/import__inc_8php.html b/doc/developper/html/import__inc_8php.html index 9296e2871..5d363f051 100644 --- a/doc/developper/html/import__inc_8php.html +++ b/doc/developper/html/import__inc_8php.html @@ -4,7 +4,7 @@ - +

    import_inc.php File Reference

    @@ -14,14 +14,19 @@

    Functions

     ImportCSV ($p_cn, $file, $p_bq_account, $p_format_csv, $p_jrn) + Parse the file and insert the record into the table import_tmp. Insert in a temporary table, if no confirmation is given then the data are removed otherwise records are inserted into import_tmp.
     UpdateCSV ($p_cn, $code, $poste) + Update import_tmp with the bank account.
     VerifImport ($p_cn) + Verify the import.
     TransferCSV ($p_cn, $periode) + Transfert data into the ledger.
     ShowFormTransfert ($p_cn) + ShowForm for getting data about the bank transfert in cvs.

    Function Documentation

    @@ -76,11 +81,21 @@

    +Parse the file and insert the record into the table import_tmp. Insert in a temporary table, if no confirmation is given then the data are removed otherwise records are inserted into import_tmp. +

    +

    Parameters:
    + + + + + +
    $p_cn database connection
    $file the uploaded file
    $p_bq_account the bank account (target)
    $p_format_csv file to include (depending of the bank)
    +

    -Definition at line 41 of file import_inc.php. +Definition at line 37 of file import_inc.php.

    -References Commit(), print, and StartSql(). +References Commit(), print, and StartSql().

    @@ -108,11 +123,15 @@ References Commit(), <

    +ShowForm for getting data about the bank transfert in cvs. +

    +parm : database connection

      +
    • gen :
    • return: none

    -Definition at line 179 of file import_inc.php. +Definition at line 174 of file import_inc.php.

    -References $jrn, $w, make_array(), METHOD, name, and size. +References $jrn, $w, make_array(), METHOD, name, and size.

    @@ -149,11 +168,13 @@ References $jrn,

    +Transfert data into the ledger. +

    -Definition at line 95 of file import_inc.php. +Definition at line 90 of file import_inc.php.

    -References $_SESSION, $code, $date_exec, $end, $jrn, $Max, $montant, $poste_comptable, $r, $Res, $Res2, $seq, $sql, $start, $val, Commit(), ExecSql(), exit, InsertJrn(), InsertJrnx(), NextSequence(), Rollback(), SetInternalCode(), and StartSql(). +References $_SESSION, $code, $date_exec, $end, $jrn, $Max, $montant, $poste_comptable, $r, $Res, $Res2, $seq, $sql, $start, $val, Commit(), ExecSql(), exit, InsertJrn(), InsertJrnx(), NextSequence(), Rollback(), SetInternalCode(), and StartSql().

    @@ -196,11 +217,14 @@ References $_SESSION

    +Update import_tmp with the bank account. +

    +

    Note:
    still used ?

    -Definition at line 69 of file import_inc.php. +Definition at line 60 of file import_inc.php.

    -References $code, $Res, $sql, and ExecSql(). +References $code, $Res, $sql, and ExecSql().

    @@ -228,14 +252,16 @@ References $code,

    +Verify the import. +

    -Definition at line 74 of file import_inc.php. +Definition at line 67 of file import_inc.php.

    -References $i, $Num, $Res, $sql, $val, ExecSql(), METHOD, name, size, table, value, and width. +References $i, $Num, $Res, $sql, $val, ExecSql(), METHOD, name, size, table, value, and width. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__bilan_8php-source.html b/doc/developper/html/impress__bilan_8php-source.html index a8ffb0f04..015fbfcde 100644 --- a/doc/developper/html/impress__bilan_8php-source.html +++ b/doc/developper/html/impress__bilan_8php-source.html @@ -4,7 +4,7 @@ - +

    impress_bilan.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,35 +27,35 @@
     00018 */
     00019 /* $Revision$ */
     00020 include_once("class_widget.php");
    -00021 
    -00023 // Show the jrn and date
    -00025 include_once("postgres.php");
    -00026 $ret=make_array($cn,"select fr_id,fr_label
    -00027                  from formdef
    -00028                  order by fr_label");
    -00030 // Form
    -00032 $w=new widget("select");
    -00033 $w->table=1;
    -00034 
    -00035 echo '<div class="u_redcontent">';
    -00036 echo '<FORM ACTION="bilan.php" METHOD="POST">';
    -00037 echo '<TABLE>';
    -00038 
    -00039 print '<TR>';
    -00040 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
    -00041 $w->label="Depuis";
    -00042 print $w->IOValue('from_periode',$periode_start);
    -00043 $w->label=" jusqu'à ";
    -00044 $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id");
    -00045 print $w->IOValue('to_periode',$periode_end);
    -00046 print "</TR>";
    -00047 echo '</TABLE>';
    -00048 print $w->Submit('bt_rtf','Impression');
    -00049 
    -00050 echo '</FORM>';
    -00051 echo '</div>';
    -00052 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00025 +00026 // Show the jrn and date +00028 include_once("postgres.php"); +00029 $ret=make_array($cn,"select fr_id,fr_label +00030 from formdef +00031 order by fr_label"); +00033 // Form +00035 $w=new widget("select"); +00036 $w->table=1; +00037 +00038 echo '<div class="u_redcontent">'; +00039 echo '<FORM ACTION="bilan.php" METHOD="POST">'; +00040 echo '<TABLE>'; +00041 +00042 print '<TR>'; +00043 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id"); +00044 $w->label="Depuis"; +00045 print $w->IOValue('from_periode',$periode_start); +00046 $w->label=" jusqu'à "; +00047 $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id"); +00048 print $w->IOValue('to_periode',$periode_end); +00049 print "</TR>"; +00050 echo '</TABLE>'; +00051 print $w->Submit('bt_rtf','Impression'); +00052 +00053 echo '</FORM>'; +00054 echo '</div>'; +00055 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__bilan_8php.html b/doc/developper/html/impress__bilan_8php.html index f640759ba..4e715edbc 100644 --- a/doc/developper/html/impress__bilan_8php.html +++ b/doc/developper/html/impress__bilan_8php.html @@ -4,10 +4,12 @@ - + -

    impress_bilan.php File Reference

    +

    impress_bilan.php File Reference

    form who call the printing of the bilan in RTF More... +

    +

    Go to the source code of this file. @@ -27,7 +29,12 @@
     $periode_end = make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id")
    -


    Variable Documentation

    +

    Detailed Description

    +form who call the printing of the bilan in RTF +

    + +

    +Definition in file impress_bilan.php.


    Variable Documentation

    @@ -50,7 +57,7 @@

    -Definition at line 44 of file impress_bilan.php. +Definition at line 47 of file impress_bilan.php.

    @@ -75,7 +82,7 @@ Definition at line 4

    -Definition at line 40 of file impress_bilan.php. +Definition at line 43 of file impress_bilan.php.

    @@ -103,7 +110,7 @@ Definition at line 4 order by fr_label")

    -Definition at line 26 of file impress_bilan.php. +Definition at line 29 of file impress_bilan.php.

    @@ -128,7 +135,7 @@ Definition at line 2

    -Definition at line 32 of file impress_bilan.php. +Definition at line 35 of file impress_bilan.php.

    @@ -153,7 +160,7 @@ Definition at line 3

    -Definition at line 41 of file impress_bilan.php. +Definition at line 44 of file impress_bilan.php.

    @@ -178,7 +185,7 @@ Definition at line 4

    -Definition at line 35 of file impress_bilan.php. +Definition at line 38 of file impress_bilan.php.

    @@ -203,10 +210,10 @@ Definition at line 3

    -Definition at line 33 of file impress_bilan.php. +Definition at line 36 of file impress_bilan.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__fiche_8php-source.html b/doc/developper/html/impress__fiche_8php-source.html index 7fe9762b1..fe0faebb9 100644 --- a/doc/developper/html/impress__fiche_8php-source.html +++ b/doc/developper/html/impress__fiche_8php-source.html @@ -4,7 +4,7 @@ - +

    impress_fiche.php

    Go to the documentation of this file.
    00001 <?
    @@ -57,7 +57,7 @@
     00049     echo $hid->IOValue("to_periode",$_REQUEST['to_periode']);
     00050   }
     00051   echo "</form>";
    -00052   echo '<form method="Post" action="?type=fiche">'.$submit->Submit("bt_submit","Autres fiches")."</form>";
    +00052   echo '<form method="Post" action="?type=fiche">'.$submit->Submit("bt_submit","Autres fiches")."</form>";
     00053   
     00054   $fiche_def->id=$_REQUEST['fd_id'];
     00055 
    @@ -85,7 +85,7 @@
     00077   
     00078   $fiche=new fiche($cn);
     00079   $e=$fiche->GetByType($fiche_def->id);
    -00080   $l=var_export($e,true);
    +00080   $l=var_export($e,true);
     00081   echo_debug('impress_fiche.php',__LINE__,$l);
     00082   $old=-1;
     00083   echo "<TABLE class=\"result\">";
    @@ -147,7 +147,7 @@
     00139  }
     00140 
     00141 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__fiche_8php.html b/doc/developper/html/impress__fiche_8php.html index 108432bd7..0562af9c8 100644 --- a/doc/developper/html/impress__fiche_8php.html +++ b/doc/developper/html/impress__fiche_8php.html @@ -4,7 +4,7 @@ - +

    impress_fiche.php File Reference

    @@ -66,7 +66,7 @@

    Definition at line 26 of file impress_fiche.php.

    -Referenced by cl_user::Admin(), cl_user::Check(), CheckAction(), CheckDossier(), CheckIsAdmin(), CheckJrn(), cl_user::cl_user(), ExisteJnt(), ExistePriv(), GetAllUser(), GetAvailableFolder(), GetDbId(), GetDossierName(), cl_user::GetGlobalPref(), GetJnt(), GetJrnProp(), GetLogin(), GetNumberLine(), GetPosteLibelle(), GetPriv(), GetUid(), html_page_start(), cl_user::insert_default_global_pref(), RecordJrn(), ShowDossier(), ShowMenuComptaForm(), ShowMenuFiche(), SyncRight(), cl_user::update_global_pref(), and ViewJrn(). +Referenced by cl_user::Admin(), cl_user::Check(), CheckAction(), CheckDossier(), CheckIsAdmin(), CheckJrn(), cl_user::cl_user(), ExisteJnt(), ExistePriv(), GetAllUser(), GetAvailableFolder(), GetDbId(), GetDossierName(), cl_user::GetGlobalPref(), GetJnt(), GetJrnProp(), GetLogin(), GetNumberLine(), GetPosteLibelle(), GetPriv(), GetUid(), html_page_start(), cl_user::insert_default_global_pref(), RecordJrn(), ShowDossier(), ShowMenuComptaForm(), ShowMenuFiche(), SyncRight(), cl_user::update_global_pref(), and ViewJrn().

    @@ -93,7 +93,7 @@ Referenced by cl_user::

    Definition at line 79 of file impress_fiche.php.

    -Referenced by fiche::getAttribut(), jrn_navigation_bar(), ParseFormula(), RecordFin(), RecordInvoice(), RecordJrn(), RecordODS(), RecordSell(), fiche::strAttribut(), and Customer::VatListing(). +Referenced by fiche::getAttribut(), jrn_navigation_bar(), ParseFormula(), RecordFin(), RecordInvoice(), RecordJrn(), RecordODS(), RecordSell(), fiche::strAttribut(), Customer::Summary(), and Customer::VatListing().

    @@ -120,7 +120,7 @@ Referenced by fiche::g

    Definition at line 78 of file impress_fiche.php.

    -Referenced by FormAchInput(), and FormVenInput(). +Referenced by FormAchInput(), and FormVenInput().

    @@ -172,7 +172,7 @@ Definition at line 4

    Definition at line 38 of file impress_fiche.php.

    -Referenced by fiche::insert(). +Referenced by fiche::insert().

    @@ -222,9 +222,7 @@ Definition at line 3

    -Definition at line 80 of file impress_fiche.php. -

    -Referenced by DisplayDetailModele(), Cezpdf::ezPRVTaddPageNumbers(), GetConcerned(), GetFormulaValue(), and ViewDetailStock(). +Definition at line 80 of file impress_fiche.php.

    @@ -306,7 +304,7 @@ Definition at line 6

    Definition at line 110 of file impress_fiche.php.

    -Referenced by FormFin(), and ImpHtml(). +Referenced by FormFin(), and ImpHtml().

    @@ -390,7 +388,7 @@ Definition at line 5 - +
    w selected = (isset($_POST['from_periode']))?$_POST['from_periode']:"" $w selected = (isset($_POST['from_periode']))?$_POST['from_periode']:""
    @@ -406,12 +404,10 @@ Definition at line
    5

    -Definition at line 63 of file impress_fiche.php. -

    -Referenced by widget::IOValue(), RecordJrn(), and widget::widget(). +Definition at line 63 of file impress_fiche.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__inc_8php-source.html b/doc/developper/html/impress__inc_8php-source.html index 8e6678e5a..1a50285a7 100644 --- a/doc/developper/html/impress__inc_8php-source.html +++ b/doc/developper/html/impress__inc_8php-source.html @@ -4,7 +4,7 @@ - +

    impress_inc.php

    Go to the documentation of this file.
    00001 <?
    @@ -29,19 +29,6 @@
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00021 // $Revision$
     00022 
    -00023 /* function ViewImp
    -00024  * Purpose : Create the form where the period
    -00025  *           is asked
    -00026  * 
    -00027  * parm : 
    -00028  *      - array (type,action,central,filter...)
    -00029  *      - connection
    -00030  * gen :
    -00031  *      - none
    -00032  * return:
    -00033  *      - none
    -00034  *
    -00035  */ 
     00036 function ViewImp($p_array,$p_cn) {
     00037   include_once("preference.php");
     00038   $periode=FormPeriodeMult($p_cn);
    @@ -51,7 +38,7 @@
     00042   }
     00043   if ( ! isset($type) ) return;
     00044   $centr="";
    -00045   if ( $action=="viewhtml")  {
    +00045   if ( $action=="viewhtml")  {
     00046     echo '<FORM ACTION=impress.php METHOD="GET">';
     00047     if ( $type=="jrn")
     00048           $centr='<BR>Centralisé : 
    @@ -88,21 +75,8 @@
     00079   echo '</FORM>';
     00080   echo "</DIV>";
     00081 }
    -00082 /* function Imp
    -00083  * Purpose : Show the html printing result 
    -00084  *           
    -00085  * 
    -00086  * parm : 
    -00087  *      -  array
    -00088  *      -  db connection
    -00089  * gen :
    -00090  *      - none
    -00091  * return:
    -00092  *      - ImpHtml
    -00093  *
    -00094  */ 
     00095 function Imp($p_array,$p_cn) {
    -00096   if ( ! isset($p_array['action'])) {
    +00096   if ( ! isset($p_array['action'])) {
     00097     echo_error ("IMP no action specified"); return;
     00098   }
     00099   if ( $p_array['action']=="viewhtml") {
    @@ -110,19 +84,6 @@
     00101   }
     00102   echo_error ("IMP no action specified"); return;
     00103 }
    -00104 /* function ImpHtml
    -00105  * Purpose : Show the html result
    -00106  * 
    -00107  * parm : 
    -00108  *      - array (type,periode,
    -00109  *      - connection
    -00110  * gen :
    -00111  *      - none
    -00112  * return: 
    -00113  *      - error if something goes wrong or
    -00114  *        the page result
    -00115  *
    -00116  */ 
     00117 function ImpHtml($p_array,$p_cn) 
     00118 {
     00119   foreach($p_array as $key=>$element) {
    @@ -258,19 +219,6 @@
     00249   }//jrn
     00250 
     00251 }
    -00252 /* function GetDataPoste
    -00253  * Purpose : Get dat for poste 
    -00254  * 
    -00255  * parm : 
    -00256  *      - connection
    -00257  *      - condition
    -00258  *      -. position
    -00259  * gen :
    -00260  *      - none
    -00261  * return:
    -00262  *      - none
    -00263  *
    -00264  */ 
     00265 function GetDataPoste($p_cn,$p_poste,$p_condition)
     00266 {
     00267   $Res=ExecSql($p_cn,"select to_char(j_date,'DD.MM.YYYY') as j_date,".
    @@ -298,20 +246,6 @@
     00289   }
     00290   return array($array,$tot_deb,$tot_cred);
     00291 }
    -00292 /* function GetDataJrn
    -00293  * Purpose : Get data from the jrn table
    -00294  * 
    -00295  * parm : 
    -00296  *      - connection
    -00297  *      - array periode
    -00298  *      - filter (default = YES)
    -00299  * gen :
    -00300  *      - none
    -00301  * return:
    -00302  *      - error code if something code wrong
    -00303  *       otherwise the result
    -00304  *
    -00305  */ 
     00306 function GetDataJrn($p_cn,$p_array,$filter=YES)
     00307 {
     00308   if ( !isset ($p_array['periode']) ) return NO_PERIOD_SELECTED;
    @@ -366,18 +300,6 @@
     00357   }
     00358   return $array;
     00359 }
    -00360 /* function CreatePeriodeCond
    -00361  * Purpose : Create the sql query for the periode
    -00362  * 
    -00363  * parm : 
    -00364  *      - p_periode
    -00365  *      - p_field (default = j_tech_per)
    -00366  * gen :
    -00367  *      - none
    -00368  * return:
    -00369  *      - a string containing the query
    -00370  *
    -00371  */ 
     00372 function CreatePeriodeCond($p_periode,$p_field=" j_tech_per") {
     00373   if ( count($p_periode) == 1) {
     00374     return $p_field."=".$p_periode[0];
    @@ -412,21 +334,6 @@
     00403   $cond_periode.=")";
     00404   return $cond_periode;
     00405 }
    -00406 /* function GetDataJrnPdf
    -00407  * Purpose : Get The data for the pdf printing
    -00408  * 
    -00409  * parm : 
    -00410  *      - connection
    -00411  *      - array
    -00412  *      - p_limit starting line
    -00413  *      - p_offset number of lines
    -00414  *
    -00415  * gen :
    -00416  *      - none
    -00417  * return:
    -00418  *      - Array with the asked data
    -00419  *
    -00420  */ 
     00421 function GetDataJrnPdf($p_cn,$p_array,$p_limit,$p_offset)
     00422 {
     00423   echo_debug('impress_inc.php',__LINE__,"GetDataJrnPdf");
    @@ -575,17 +482,6 @@
     00566   $a=array($array,$tot_deb,$tot_cred);
     00567  return $a;
     00568 }
    -00569 /* function 
    -00570  * Purpose : 
    -00571  *        
    -00572  * parm : 
    -00573  *      -
    -00574  * gen :
    -00575  *      -
    -00576  * return:
    -00577  */
    -00578 
    -00579 
     00580 function GetDataGrpt($p_cn,$p_array)
     00581 {
     00582   if ( !isset ($p_array['periode']) ) return NO_PERIOD_SELECTED;
    @@ -604,22 +500,6 @@
     00595   return $array;
     00596 }
     00597 
    -00598 /* function GetRappel
    -00599  * Purpose : Get the amount on each page
    -00600  * 
    -00601  * parm : 
    -00602  *      - $p_cn
    -00603  *      - $p_jrnx_id jrnx.j_id
    -00604  *      - $p_jrn_id jrn.jr_id
    -00605  *      - $which LAST or FIRST
    -00606  *      - $p_type valeur JRN GL-CENTRAL GL-NOCENTRAL
    -00607  * gen :
    -00608  *      -
    -00609  * return:
    -00610  *      - array sum (deb) sum(cred)
    -00611  *
    -00612  */ 
    -00613 
     00614 function GetRappel($p_cn,$p_jrnx_id,$p_jrn_id,$p_exercice,$which,$p_type,$p_central) 
     00615 {
     00616   include_once("preference.php");
    @@ -642,7 +522,7 @@
     00633                        " and c_order $cmp $p_jrnx_id ");
     00634       
     00635       if ($c_line == 0 ) { return array (0,0); }
    -00636       $sql="select sum(c_montant) as tot_amount ".
    +00636       $sql="select sum(c_montant) as tot_amount ".
     00637         " from centralized ".
     00638         " left join parm_periode on c_periode=p_id ".
     00639         " inner join jrn on jr_grpt_id=c_grp ".
    @@ -678,7 +558,7 @@
     00669                        " and c_id $cmp $p_jrnx_id ");
     00670       
     00671       if ($c_line == 0 ) { return array (0,0); }
    -00672       $sql="select sum(c_montant) as tot_amount ".
    +00672       $sql="select sum(c_montant) as tot_amount ".
     00673         " from centralized ".
     00674         " left join parm_periode on c_periode=p_id ".
     00675         " where ".
    @@ -714,22 +594,6 @@
     00705   
     00706 }
     00707 
    -00708 /* function ParseFormula
    -00709  * Purpose Parse a formula
    -00710  * 
    -00711  * parm : 
    -00712  *      - $p_cn connexion
    -00713  *      - $p_label
    -00714  *      - $p_formula
    -00715  *      - $p_eval  true if we eval here otherwise the function returns
    -00716  *                 a string which must be evaluated
    -00717  * gen :
    -00718  *      - none
    -00719  * return:
    -00720  *      - array
    -00721  *
    -00722  *
    -00723  */ 
     00724 function ParseFormula($p_cn,$p_label,$p_formula,$p_start,$p_end,$p_eval=true) {
     00725   if ( CheckFormula($p_formula) == false) {
     00726     if ( $p_eval == true)
    @@ -788,21 +652,6 @@
     00779     return $p_formula;
     00780   }
     00781 }
    -00782 /* function GetFormulaValue
    -00783  * Purpose : Parse the formula contained in the fo_formula 
    -00784  *           field and return a array containing all the columns
    -00785  * 
    -00786  * parm : 
    -00787  *      - $p_cn connexion
    -00788  *      - $p_label
    -00789  *      - $p_formula
    -00790  * gen :
    -00791  *      - none
    -00792  * return:
    -00793  *      - array
    -00794  * 
    -00795  *
    -00796  */ 
     00797 function GetFormulaValue($p_cn,$p_label,$p_formula,$p_cond) 
     00798 {
     00799   $aret=array();
    @@ -814,8 +663,8 @@
     00805   if (pg_NumRows($Res)==0){
     00806     $l_debit=0;                   
     00807   } else {
    -00808     $l=pg_fetch_array($Res,0);
    -00809     $l_debit=$l['montant'];
    +00808     $l=pg_fetch_array($Res,0);
    +00809     $l_debit=$l['montant'];
     00810       }
     00811   // somme credit
     00812   $Res=ExecSql($p_cn,"select sum (j_montant) as montant from
    @@ -823,8 +672,8 @@
     00814   if (pg_NumRows($Res)==0) {
     00815     $l_credit=0;                   
     00816   } else {
    -00817     $l=pg_fetch_array($Res,0);
    -00818     $l_credit=$l['montant'];
    +00817     $l=pg_fetch_array($Res,0);
    +00818     $l_credit=$l['montant'];
     00819   }
     00820 
     00821   if ( $l_credit==$l_debit) {
    @@ -847,17 +696,6 @@
     00838   }
     00839   return $aret;
     00840 }
    -00841 /* function CheckFormula
    -00842  **************************************************
    -00843  * Purpose : Check if formula doesn't contain
    -00844  *           php injection
    -00845  *        
    -00846  * parm : 
    -00847  *      - string
    -00848  * gen :
    -00849  *      - 
    -00850  * return: none : stop on error
    -00851  */
     00852 function CheckFormula($p_string) {
     00853   // the ereg gets too complex if we want to add a test
     00854   // for parenthesis, math function...
    @@ -885,7 +723,7 @@
     00876 }
     00877 
     00878 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__inc_8php.html b/doc/developper/html/impress__inc_8php.html index 8dacbffc4..79bcd4354 100644 --- a/doc/developper/html/impress__inc_8php.html +++ b/doc/developper/html/impress__inc_8php.html @@ -4,7 +4,7 @@ - +

    impress_inc.php File Reference

    @@ -63,11 +63,15 @@

    +CheckFormula

    +Check if formula doesn't contain php injection

    +parm :

      +
    • string gen :
    • return: none : stop on error

    Definition at line 852 of file impress_inc.php.

    -Referenced by AddForm(), ParseFormula(), and UpdateForm(). +Referenced by AddForm(), ParseFormula(), and UpdateForm().

    @@ -104,11 +108,17 @@ Referenced by AddForm()

    +CreatePeriodeCond Create the sql query for the periode

    +parm :

    +

    +p_field (default = j_tech_per) gen :

      +
    • none return:
    • a string containing the query

    Definition at line 372 of file impress_inc.php.

    -References $cond, and $old. +References $cond, and $old.

    Referenced by GetDataGrpt(), GetDataJrn(), GetDataJrnPdf(), and ImpHtml(). @@ -147,11 +157,13 @@ Referenced by GetDataG

    +parm :

    Definition at line 580 of file impress_inc.php.

    -References $array, $cond, $Max, $Res, CreatePeriodeCond(), and ExecSql(). +References $array, $cond, $Max, $Res, CreatePeriodeCond(), and ExecSql().

    @@ -194,11 +206,19 @@ References $array,

    +GetDataJrn Get data from the jrn table

    +parm :

    +

    +array periode

      +
    • filter (default = YES) gen :
        +
      • none return:
      • error code if something code wrong otherwise the result
      +

    Definition at line 306 of file impress_inc.php.

    -References $array, $cond, $Max, $Res, CreatePeriodeCond(), and ExecSql(). +References $array, $cond, $Max, $Res, CreatePeriodeCond(), and ExecSql().

    Referenced by ImpHtml(). @@ -249,11 +269,20 @@ Referenced by ImpHtml(

    +GetDataJrnPdf Get The data for the pdf printing

    +parm :

    +

    +array

      +
    • p_limit starting line
    • p_offset number of lines
    +

    +gen :

      +
    • none return:
    • Array with the asked data

    Definition at line 421 of file impress_inc.php.

    -References $a, $array, $cond, $Max, $Res, $Sql, CreatePeriodeCond(), echo_debug(), and ExecSql(). +References $a, $array, $cond, $Max, $Res, $Sql, CreatePeriodeCond(), echo_debug(), and ExecSql().

    @@ -296,11 +325,16 @@ References $a,

    +GetDataPoste Get dat for poste

    +parm :

    Definition at line 265 of file impress_inc.php.

    -References $array, $i, $Max, $Res, and ExecSql(). +References $array, $i, $Max, $Res, and ExecSql().

    Referenced by ImpHtml(). @@ -351,11 +385,19 @@ Referenced by ImpHtml(

    +GetFormulaValue Parse the formula contained in the fo_formula field and return a array containing all the columns

    +parm :

    +

    +$p_label

      +
    • $p_formula gen :
        +
      • none return:
      • array
      +

    Definition at line 797 of file impress_inc.php.

    -References $l, $Res, and ExecSql(). +References $l, $Res, and ExecSql().

    Referenced by ImpHtml(). @@ -424,11 +466,19 @@ Referenced by ImpHtml(

    +GetRappel Get the amount on each page

    +parm :

    +

    +$p_jrnx_id jrnx.j_id

      +
    • $p_jrn_id jrn.jr_id
    • $which LAST or FIRST
    • $p_type valeur JRN GL-CENTRAL GL-NOCENTRAL gen :
        +
      • return:
      • array sum (deb) sum(cred)
      +

    Definition at line 614 of file impress_inc.php.

    -References $a, $Res, $sql, CountSql(), echo_debug(), and ExecSql(). +References $a, $Res, $sql, CountSql(), echo_debug(), and ExecSql().

    @@ -465,11 +515,17 @@ References $a,

    +Imp Show the html printing result

    +parm :

    +

    +db connection gen :

      +
    • none return:
    • ImpHtml

    Definition at line 95 of file impress_inc.php.

    -References echo_error(), and ImpHtml(). +References echo_error(), and ImpHtml().

    @@ -506,11 +562,17 @@ References echo_error()<

    +ImpHtml Show the html result

    +parm :

    +

    +connection gen :

      +
    • none return:
    • error if something goes wrong or the page result

    Definition at line 117 of file impress_inc.php.

    -References $array, $c, $col, $cond, $i, $l_line, $Max, $nPoste, $poste, $Res, $ret, $solde, CreatePeriodeCond(), echo_debug(), ExecSql(), GetDataJrn(), GetDataPoste(), GetFormulaValue(), and GetPosteLibelle(). +References $array, $c, $col, $cond, $i, $l_line, $Max, $nPoste, $poste, $Res, $ret, $solde, CreatePeriodeCond(), echo_debug(), ExecSql(), GetDataJrn(), GetDataPoste(), GetFormulaValue(), and GetPosteLibelle().

    Referenced by Imp(). @@ -573,13 +635,21 @@ Referenced by Imp()

    +ParseFormula Purpose Parse a formula

    +parm :

      +
    • $p_cn connexion
    +

    +$p_label

      +
    • $p_formula
    • $p_eval true if we eval here otherwise the function returns a string which must be evaluated gen :
        +
      • none return:
      • array
      +

    Definition at line 724 of file impress_inc.php.

    -References $cond, $e, $i, $x, CheckFormula(), echo_debug(), getPeriodeFromMonth(), and poste. +References $cond, $e, $i, $x, CheckFormula(), echo_debug(), getPeriodeFromMonth(), and poste.

    -Referenced by rapport::GetRow(). +Referenced by rapport::GetRow().

    @@ -616,14 +686,20 @@ Referenced by rappor

    +ViewImp Create the form where the period is asked

    +parm :

    +

    +connection gen :

      +
    • none return:
    • none

    Definition at line 36 of file impress_inc.php.

    -References $centr, echo_debug(), FormPeriodeMult(), METHOD, name, PosteForm(), and value. +References $centr, echo_debug(), FormPeriodeMult(), METHOD, name, PosteForm(), and value. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__jrn_8php-source.html b/doc/developper/html/impress__jrn_8php-source.html index 7f6b84530..ca9dca115 100644 --- a/doc/developper/html/impress__jrn_8php-source.html +++ b/doc/developper/html/impress__jrn_8php-source.html @@ -4,7 +4,7 @@ - +

    impress_jrn.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,208 +27,208 @@
     00018 */
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00021 include_once("class_widget.php");
    -00023 // If print is asked
    -00024 // First time in html
    -00025 // after in pdf or cvs
    -00027 if ( isset( $_POST['bt_html'] ) ) {
    -00028 include("class_jrn.php");
    -00029  $p_cent=( isset ( $_POST['cent']) )?'on':'off';
    -00030   // $POST=from_periode, to_periode, jrn_id, cent
    -00031  $d=var_export($_POST,true);
    -00032  echo_debug('impress_jrn.php',__LINE__,$d);
    -00033   $Jrn=new jrn($cn,$_POST['jrn_id']);
    -00034   $Jrn->GetName();
    -00035   if ( $_POST['p_simple']==0 ) 
    -00036     {
    -00037       $Jrn->GetRow( $_POST['from_periode'],
    -00038                     $_POST['to_periode'],
    -00039                     $p_cent);
    -00040     }
    -00041   else 
    -00042     {
    -00043       $Row=$Jrn->GetRowSimple($_POST['from_periode'],
    -00044                          $_POST['to_periode'],
    -00045                          $p_cent);
    -00046       //      var_dump($Row);
    -00047     }
    -00048   $rep="";
    -00049   $submit=new widget();
    -00050   $hid=new widget("hidden");
    -00051   echo '<div class="u_content">';
    -00052   echo '<h2 class="info">'.$Jrn->name.'</h2>';
    -00053   echo "<table>";
    -00054   echo '<TR>';
    -00055   echo '<TD><form method="GET" ACTION="user_impress.php">'.
    -00056     $submit->Submit('bt_other',"Autre journal").
    -00057     $hid->IOValue("type","jrn")."</form></TD>";
    -00058 
    -00059   echo '<TD><form method="GET" ACTION="jrn_pdf.php">'.
    -00060     $submit->Submit('bt_pdf',"Export PDF").
    -00061     $hid->IOValue("type","jrn").
    -00062     $hid->IOValue("central",$p_cent).
    -00063     $hid->IOValue("jrn_id",$Jrn->id).
    -00064     $hid->IOValue("from_periode",$_POST['from_periode']).
    -00065     $hid->IOValue("to_periode",$_POST['to_periode']);
    -00066   echo $hid->IOValue("p_simple",$_POST['p_simple']);
    -00067 
    -00068   echo "</form></TD>";
    -00069   echo '<TD><form method="GET" ACTION="jrn_csv.php">'.
    -00070     $submit->Submit('bt_csv',"Export CSV").
    -00071     $hid->IOValue("type","jrn").
    -00072     $hid->IOValue("central",$p_cent).
    -00073     $hid->IOValue("jrn_id",$Jrn->id).
    -00074     $hid->IOValue("from_periode",$_POST['from_periode']).
    -00075     $hid->IOValue("to_periode",$_POST['to_periode']);
    -00076   echo $hid->IOValue("p_simple",$_POST['p_simple']);
    -00077   echo "</form></TD>";
    -00078 
    -00079   echo "</TR>";
    -00080 
    -00081   echo "</table>";
    -00082   if ( count($Jrn->row ) == 0 
    -00083        && $Row==null) 
    -00084         exit;
    -00085 
    -00086   echo '<TABLE class="result">';
    -00087 
    -00088   if ( $_POST['p_simple'] == 0 ) {
    -00089     // detailled printing
    -00090     //---
    -00091     foreach ( $Jrn->row as $op ) { 
    -00092       echo "<TR>";
    -00093       // centralized
    -00094       if ( $p_cent == 'on') {
    -00095         echo "<TD>".$op['j_id']."</TD>";
    -00096       }
    -00097       echo "<TD>".$op['internal']."</TD>".
    -00098         "<TD>".$op['j_date']."</TD>".
    -00099         "<TD>".$op['poste']."</TD>".
    -00100         "<TD>".$op['description']."</TD>".
    -00101         "<TD>".$op['deb_montant']."</TD>".
    -00102         "<TD>".$op['cred_montant']."</TD>".
    -00103         "</TR>";
    -00104     }// end loop
    -00105   } // if
    -00106   else 
    -00107     {
    -00108       include_once("jrn.php");
    -00109       // Simple printing
    -00110       //---
    -00111 
    -00112       echo "<TR>".
    -00113         "<th> operation </td>".
    -00114         "<th>Date</th>".
    -00115         "<th> commentaire </th>".
    -00116         "<th>internal</th>".
    -00117         /* "<th>Pièce justificative</th>". */
    -00118         "<th> montant</th>".
    -00119         "</TR>";
    -00120 
    -00121       foreach ($Row as $line)
    -00122         {
    -00123           echo "<tr>";
    -00124           echo "<TD>".$line['num']."</TD>";
    -00125           echo "<TD>".$line['date']."</TD>";
    -00126           echo "<TD>".$line['comment']."</TD>";
    -00127           echo "<TD>".$line['jr_internal']."</TD>";
    -00128           //      echo "<TD>".$line['pj']."</TD>";
    -00129         // If the ledger is financial :
    -00130         // the credit must be negative and written in red
    -00131         // Get the jrn type
    -00132         if ( $line['jrn_def_type'] == 'FIN' ) {
    -00133           $positive = CountSql($cn,"select * from jrn inner join jrnx on jr_grpt_id=j_grpt ".
    -00134                    " where jr_id=".$line['jr_id']." and (j_poste like '55%' or j_poste like '57%' )".
    -00135                                " and j_debit='f'");
    -00136         
    -00137         echo "<TD align=\"right\">";
    -00138         echo ( $positive != 0 )?"<font color=\"red\">  - ".sprintf("%8.2f",$line['montant'])."</font>":sprintf("%8.2f",$line['montant']);
    -00139         echo "</TD>";
    -00140         }
    -00141         else 
    -00142           {
    -00143             echo "<TD align=\"right\">".sprintf("% 8.2f",$line['montant'])."</TD>";
    -00144           }
    -00145 
    -00146           echo "</tr>";
    -00147         }
    -00148       
    -00149     } //else
    -00150   echo "</table>";
    -00151 
    -00152   echo "</div>";
    -00153   exit;
    -00154 }
    +00025 include_once("class_widget.php");
    +00027 // If print is asked
    +00028 // First time in html
    +00029 // after in pdf or cvs
    +00031 if ( isset( $_POST['bt_html'] ) ) {
    +00032 include("class_jrn.php");
    +00033  $p_cent=( isset ( $_POST['cent']) )?'on':'off';
    +00034   // $POST=from_periode, to_periode, jrn_id, cent
    +00035  $d=var_export($_POST,true);
    +00036  echo_debug('impress_jrn.php',__LINE__,$d);
    +00037   $Jrn=new jrn($cn,$_POST['jrn_id']);
    +00038   $Jrn->GetName();
    +00039   if ( $_POST['p_simple']==0 ) 
    +00040     {
    +00041       $Jrn->GetRow( $_POST['from_periode'],
    +00042                     $_POST['to_periode'],
    +00043                     $p_cent);
    +00044     }
    +00045   else 
    +00046     {
    +00047       $Row=$Jrn->GetRowSimple($_POST['from_periode'],
    +00048                          $_POST['to_periode'],
    +00049                          $p_cent);
    +00050       //      var_dump($Row);
    +00051     }
    +00052   $rep="";
    +00053   $submit=new widget();
    +00054   $hid=new widget("hidden");
    +00055   echo '<div class="u_content">';
    +00056   echo '<h2 class="info">'.$Jrn->name.'</h2>';
    +00057   echo "<table>";
    +00058   echo '<TR>';
    +00059   echo '<TD><form method="GET" ACTION="user_impress.php">'.
    +00060     $submit->Submit('bt_other',"Autre journal").
    +00061     $hid->IOValue("type","jrn")."</form></TD>";
    +00062 
    +00063   echo '<TD><form method="GET" ACTION="jrn_pdf.php">'.
    +00064     $submit->Submit('bt_pdf',"Export PDF").
    +00065     $hid->IOValue("type","jrn").
    +00066     $hid->IOValue("central",$p_cent).
    +00067     $hid->IOValue("jrn_id",$Jrn->id).
    +00068     $hid->IOValue("from_periode",$_POST['from_periode']).
    +00069     $hid->IOValue("to_periode",$_POST['to_periode']);
    +00070   echo $hid->IOValue("p_simple",$_POST['p_simple']);
    +00071 
    +00072   echo "</form></TD>";
    +00073   echo '<TD><form method="GET" ACTION="jrn_csv.php">'.
    +00074     $submit->Submit('bt_csv',"Export CSV").
    +00075     $hid->IOValue("type","jrn").
    +00076     $hid->IOValue("central",$p_cent).
    +00077     $hid->IOValue("jrn_id",$Jrn->id).
    +00078     $hid->IOValue("from_periode",$_POST['from_periode']).
    +00079     $hid->IOValue("to_periode",$_POST['to_periode']);
    +00080   echo $hid->IOValue("p_simple",$_POST['p_simple']);
    +00081   echo "</form></TD>";
    +00082 
    +00083   echo "</TR>";
    +00084 
    +00085   echo "</table>";
    +00086   if ( count($Jrn->row ) == 0 
    +00087        && $Row==null) 
    +00088         exit;
    +00089 
    +00090   echo '<TABLE class="result">';
    +00091 
    +00092   if ( $_POST['p_simple'] == 0 ) {
    +00093     // detailled printing
    +00094     //---
    +00095     foreach ( $Jrn->row as $op ) { 
    +00096       echo "<TR>";
    +00097       // centralized
    +00098       if ( $p_cent == 'on') {
    +00099         echo "<TD>".$op['j_id']."</TD>";
    +00100       }
    +00101       echo "<TD>".$op['internal']."</TD>".
    +00102         "<TD>".$op['j_date']."</TD>".
    +00103         "<TD>".$op['poste']."</TD>".
    +00104         "<TD>".$op['description']."</TD>".
    +00105         "<TD>".$op['deb_montant']."</TD>".
    +00106         "<TD>".$op['cred_montant']."</TD>".
    +00107         "</TR>";
    +00108     }// end loop
    +00109   } // if
    +00110   else 
    +00111     {
    +00112       include_once("jrn.php");
    +00113       // Simple printing
    +00114       //---
    +00115 
    +00116       echo "<TR>".
    +00117         "<th> operation </td>".
    +00118         "<th>Date</th>".
    +00119         "<th> commentaire </th>".
    +00120         "<th>internal</th>".
    +00121         /* "<th>Pièce justificative</th>". */
    +00122         "<th> montant</th>".
    +00123         "</TR>";
    +00124 
    +00125       foreach ($Row as $line)
    +00126         {
    +00127           echo "<tr>";
    +00128           echo "<TD>".$line['num']."</TD>";
    +00129           echo "<TD>".$line['date']."</TD>";
    +00130           echo "<TD>".$line['comment']."</TD>";
    +00131           echo "<TD>".$line['jr_internal']."</TD>";
    +00132           //      echo "<TD>".$line['pj']."</TD>";
    +00133         // If the ledger is financial :
    +00134         // the credit must be negative and written in red
    +00135         // Get the jrn type
    +00136         if ( $line['jrn_def_type'] == 'FIN' ) {
    +00137           $positive = CountSql($cn,"select * from jrn inner join jrnx on jr_grpt_id=j_grpt ".
    +00138                    " where jr_id=".$line['jr_id']." and (j_poste like '55%' or j_poste like '57%' )".
    +00139                                " and j_debit='f'");
    +00140         
    +00141         echo "<TD align=\"right\">";
    +00142         echo ( $positive != 0 )?"<font color=\"red\">  - ".sprintf("%8.2f",$line['montant'])."</font>":sprintf("%8.2f",$line['montant']);
    +00143         echo "</TD>";
    +00144         }
    +00145         else 
    +00146           {
    +00147             echo "<TD align=\"right\">".sprintf("% 8.2f",$line['montant'])."</TD>";
    +00148           }
    +00149 
    +00150           echo "</tr>";
    +00151         }
    +00152       
    +00153     } //else
    +00154   echo "</table>";
     00155 
    -00157 // Show the jrn and date
    -00159 include_once("postgres.php");
    -00160 
    -00161 if ( $User->Admin() ==0) {
    -00162   $ret=make_array($cn,"select jrn_def_id,jrn_def_name
    -00163                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id
    -00164                              join user_sec_jrn on uj_jrn_id=jrn_def_id 
    -00165                              where
    -00166                              uj_login='$User->id'
    -00167                              and uj_priv !='X'
    -00168                              ");
    -00169     } else {
    -00170   $ret=make_array($cn,"select jrn_def_id,jrn_def_name
    -00171                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id");
    -00172 
    -00173  } 
    -00174 
    -00175 // Count the forbidden journaux
    -00176     $NoPriv=CountSql($cn,"select jrn_def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv,
    -00177                                 jrn_deb_max_line,jrn_cred_max_line
    -00178                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id
    -00179                              join  user_sec_jrn on uj_jrn_id=jrn_def_id 
    -00180                              where  
    -00181                              uj_login='$User->id'
    -00182                              and uj_priv ='X'
    -00183                    ");
    -00184     // Pour voir tout les journal ?
    -00185     if ( $NoPriv == 0 ) {
    -00186       $a=count($ret);
    -00187       $all=array('value'=>0,'label'=>'Grand Livre');
    -00188       $ret[$a]=$all;
    -00189    }
    -00190 if ( count($ret) < 1 ) 
    -00191   NoAccess();
    -00193 // Form
    -00195 echo '<div class="u_content">';
    -00196 echo '<FORM ACTION="?type=jrn" METHOD="POST">';
    -00197 echo '<TABLE width="90%" align="center"><TR>';
    -00198 $w=new widget("select");
    -00199 $w->table=1;
    -00200 $w->label="Choississez le journal";
    -00201 print $w->IOValue("jrn_id",$ret);
    -00202 print '</TR>';
    -00203 print '<TR>';
    -00204 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
    -00205 $w->label="Depuis";
    -00206 print $w->IOValue('from_periode',$periode_start);
    -00207 $w->label=" jusqu'à ";
    -00208 $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id");
    -00209 print $w->IOValue('to_periode',$periode_end);
    -00210 print "</TR><TR>";
    -00211 $centralise=new widget("checkbox");
    -00212 $centralise->label="Depuis les journaux centralisés";
    -00213 $centralise->table=1;
    -00214 print $centralise->IOValue('cent');
    -00215 $a=array(
    -00216          array('value'=>0,'label'=>'Detaillé'),
    -00217          array('value'=>1,'label'=>'Simple')
    -00218          );
    -00219 $w->selected=1;
    -00220 echo $w->IOValue('p_simple',$a,'Style d\'impression');
    -00221 print "</TR>";
    -00222 echo '</TABLE>';
    -00223 print $w->Submit('bt_html','Impression');
    -00224 
    -00225 echo '</FORM>';
    -00226 echo '</div>';
    -00227 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00156 echo "</div>"; +00157 exit; +00158 } +00159 +00161 // Show the jrn and date +00163 include_once("postgres.php"); +00164 +00165 if ( $User->Admin() ==0) { +00166 $ret=make_array($cn,"select jrn_def_id,jrn_def_name +00167 from jrn_def join jrn_type on jrn_def_type=jrn_type_id +00168 join user_sec_jrn on uj_jrn_id=jrn_def_id +00169 where +00170 uj_login='$User->id' +00171 and uj_priv !='X' +00172 "); +00173 } else { +00174 $ret=make_array($cn,"select jrn_def_id,jrn_def_name +00175 from jrn_def join jrn_type on jrn_def_type=jrn_type_id"); +00176 +00177 } +00178 +00179 // Count the forbidden journaux +00180 $NoPriv=CountSql($cn,"select jrn_def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, +00181 jrn_deb_max_line,jrn_cred_max_line +00182 from jrn_def join jrn_type on jrn_def_type=jrn_type_id +00183 join user_sec_jrn on uj_jrn_id=jrn_def_id +00184 where +00185 uj_login='$User->id' +00186 and uj_priv ='X' +00187 "); +00188 // Pour voir tout les journal ? +00189 if ( $NoPriv == 0 ) { +00190 $a=count($ret); +00191 $all=array('value'=>0,'label'=>'Grand Livre'); +00192 $ret[$a]=$all; +00193 } +00194 if ( count($ret) < 1 ) +00195 NoAccess(); +00197 // Form +00199 echo '<div class="u_content">'; +00200 echo '<FORM ACTION="?type=jrn" METHOD="POST">'; +00201 echo '<TABLE width="90%" align="center"><TR>'; +00202 $w=new widget("select"); +00203 $w->table=1; +00204 $w->label="Choississez le journal"; +00205 print $w->IOValue("jrn_id",$ret); +00206 print '</TR>'; +00207 print '<TR>'; +00208 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id"); +00209 $w->label="Depuis"; +00210 print $w->IOValue('from_periode',$periode_start); +00211 $w->label=" jusqu'à "; +00212 $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id"); +00213 print $w->IOValue('to_periode',$periode_end); +00214 print "</TR><TR>"; +00215 $centralise=new widget("checkbox"); +00216 $centralise->label="Depuis les journaux centralisés"; +00217 $centralise->table=1; +00218 print $centralise->IOValue('cent'); +00219 $a=array( +00220 array('value'=>0,'label'=>'Detaillé'), +00221 array('value'=>1,'label'=>'Simple') +00222 ); +00223 $w->selected=1; +00224 echo $w->IOValue('p_simple',$a,'Style d\'impression'); +00225 print "</TR>"; +00226 echo '</TABLE>'; +00227 print $w->Submit('bt_html','Impression'); +00228 +00229 echo '</FORM>'; +00230 echo '</div>'; +00231 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__jrn_8php.html b/doc/developper/html/impress__jrn_8php.html index 98424aadc..fba186132 100644 --- a/doc/developper/html/impress__jrn_8php.html +++ b/doc/developper/html/impress__jrn_8php.html @@ -4,10 +4,12 @@ - + -

    impress_jrn.php File Reference

    +

    impress_jrn.php File Reference

    ask for Printing the ledger (pdf,html) More... +

    +

    Go to the source code of this file. @@ -47,7 +49,12 @@
    $w selected = 1
    -


    Variable Documentation

    +

    Detailed Description

    +ask for Printing the ledger (pdf,html) +

    + +

    +Definition in file impress_jrn.php.


    Variable Documentation

    @@ -74,7 +81,7 @@ )

    -Definition at line 215 of file impress_jrn.php. +Definition at line 219 of file impress_jrn.php.

    @@ -99,7 +106,7 @@ Definition at line 215

    -Definition at line 187 of file impress_jrn.php. +Definition at line 191 of file impress_jrn.php.

    @@ -124,7 +131,7 @@ Definition at line 187

    -Definition at line 211 of file impress_jrn.php. +Definition at line 215 of file impress_jrn.php.

    @@ -149,7 +156,7 @@ Definition at line 211

    -Definition at line 31 of file impress_jrn.php. +Definition at line 35 of file impress_jrn.php.

    Referenced by Cpdf::selectFont(). @@ -176,7 +183,7 @@ Referenced by Cpdf::sele

    -Definition at line 50 of file impress_jrn.php. +Definition at line 54 of file impress_jrn.php.

    @@ -201,7 +208,7 @@ Definition at line 50<

    -Definition at line 33 of file impress_jrn.php. +Definition at line 37 of file impress_jrn.php.

    @@ -226,7 +233,7 @@ Definition at line 33<

    -Definition at line 29 of file impress_jrn.php. +Definition at line 33 of file impress_jrn.php.

    @@ -251,7 +258,7 @@ Definition at line 29<

    -Definition at line 208 of file impress_jrn.php. +Definition at line 212 of file impress_jrn.php.

    @@ -276,7 +283,7 @@ Definition at line 208

    -Definition at line 204 of file impress_jrn.php. +Definition at line 208 of file impress_jrn.php.

    @@ -301,7 +308,7 @@ Definition at line 204

    -Definition at line 188 of file impress_jrn.php. +Definition at line 192 of file impress_jrn.php.

    @@ -326,7 +333,7 @@ Definition at line 188

    -Definition at line 49 of file impress_jrn.php. +Definition at line 53 of file impress_jrn.php.

    @@ -351,7 +358,7 @@ Definition at line 49<

    -Definition at line 198 of file impress_jrn.php. +Definition at line 202 of file impress_jrn.php.

    @@ -376,7 +383,7 @@ Definition at line 198

    -Definition at line 137 of file impress_jrn.php. +Definition at line 141 of file impress_jrn.php.

    @@ -401,7 +408,7 @@ Definition at line 137

    -Definition at line 200 of file impress_jrn.php. +Definition at line 204 of file impress_jrn.php.

    @@ -426,7 +433,7 @@ Definition at line 200

    -Definition at line 202 of file impress_jrn.php. +Definition at line 206 of file impress_jrn.php.

    @@ -451,7 +458,7 @@ Definition at line 202

    -Definition at line 219 of file impress_jrn.php. +Definition at line 223 of file impress_jrn.php.

    @@ -476,10 +483,10 @@ Definition at line 219

    -Definition at line 199 of file impress_jrn.php. +Definition at line 203 of file impress_jrn.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__listing__client_8php-source.html b/doc/developper/html/impress__listing__client_8php-source.html index 8152b1e73..a1afa11c0 100644 --- a/doc/developper/html/impress__listing__client_8php-source.html +++ b/doc/developper/html/impress__listing__client_8php-source.html @@ -4,7 +4,7 @@ - +

    impress_listing_client.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,64 +27,64 @@
     00018 */
     00019 /* $Revision$ */
     00020 include_once("class_widget.php");
    -00021 
    -00023 // Show the jrn and date
    -00025 
    -00027 // Submit Html
    -00029 if ( isset($_POST['bt_html'] )) {
    -00030   require_once("class_customer.php");
    -00031   $customer=new Customer($cn);
    -00032   $a_Res=$customer->VatListing($_POST['year']);
    -00033 
    -00034 echo "
    -00035 <div class=\"u_redcontent\"
    -00036 <form method=\"post\" action=\"listing_client.php\">
    -00037 <input type=\"submit\" name=\"bt_disk\" value=\"expérimental !! déclaration magnétique\" disable>
    -00038 <input type=\"hidden\" name=\"year\" value=\"".$_POST['year']."\">
    -00039 </form>
    -00040 <Table class=\"result\">
    -00041 <tr>
    -00042 <th> Nom </th>
    -00043 <th> Numéro TVA </th>
    -00044 <th> Montant HTVA </th>
    -00045 <th> Montant TVA </th>
    -00046 </tr>
    -00047 ";
    -00048  foreach ($a_Res as $key=>$elt) {
    -00049    echo "<tr>".
    -00050      "<td>".$elt['name']."</td>".
    -00051      "<td>".$elt['vat_number']."</td>".
    -00052      "<td align=\"right\">".sprintf("% 8.2f",$elt['amount'])."</td>".
    -00053      "<td align=\"right\">".sprintf("% 8.2f",$elt['tva'])."</td>".
    -00054      "</tr>";
    -00055  }
    -00056  echo "</table>";
    -00057  echo "</div>";
    -00058   return;
    -00059  }
    -00060 
    -00062 // Form
    -00064 $w=new widget("select");
    -00065 $w->table=1;
    -00066 
    -00067 echo '<div class="u_redcontent">';
    -00068 echo '<FORM ACTION="user_impress.php?type=list_client" METHOD="POST">';
    -00069 echo '<TABLE>';
    -00070 
    -00071 print '<TR>';
    -00072 $year=make_array($cn,"select distinct extract(year from jr_date), extract(year from jr_date) from jrn");
    -00073 $w->label="Année concernée";
    -00074 print $w->IOValue('year',$year);
    -00075 print "</TR>";
    -00076 echo '</TABLE>';
    -00077 print $w->Submit('bt_html','Impression');
    -00078 
    -00079 echo '</FORM>';
    -00080 
    -00081 echo '</div>';
    -00082 
    -00083 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00025 +00026 // Show the jrn and date +00028 +00030 // Submit Html +00032 if ( isset($_POST['bt_html'] )) { +00033 require_once("class_customer.php"); +00034 $customer=new Customer($cn); +00035 $a_Res=$customer->VatListing($_POST['year']); +00036 +00037 echo " +00038 <div class=\"u_redcontent\" +00039 <form method=\"post\" action=\"listing_client.php\"> +00040 <input type=\"submit\" name=\"bt_disk\" value=\"expérimental !! déclaration magnétique\" disable> +00041 <input type=\"hidden\" name=\"year\" value=\"".$_POST['year']."\"> +00042 </form> +00043 <Table class=\"result\"> +00044 <tr> +00045 <th> Nom </th> +00046 <th> Numéro TVA </th> +00047 <th> Montant HTVA </th> +00048 <th> Montant TVA </th> +00049 </tr> +00050 "; +00051 foreach ($a_Res as $key=>$elt) { +00052 echo "<tr>". +00053 "<td>".$elt['name']."</td>". +00054 "<td>".$elt['vat_number']."</td>". +00055 "<td align=\"right\">".sprintf("% 8.2f",$elt['amount'])."</td>". +00056 "<td align=\"right\">".sprintf("% 8.2f",$elt['tva'])."</td>". +00057 "</tr>"; +00058 } +00059 echo "</table>"; +00060 echo "</div>"; +00061 return; +00062 } +00063 +00065 // Form +00067 $w=new widget("select"); +00068 $w->table=1; +00069 +00070 echo '<div class="u_redcontent">'; +00071 echo '<FORM ACTION="user_impress.php?type=list_client" METHOD="POST">'; +00072 echo '<TABLE>'; +00073 +00074 print '<TR>'; +00075 $year=make_array($cn,"select distinct extract(year from jr_date), extract(year from jr_date) from jrn"); +00076 $w->label="Année concernée"; +00077 print $w->IOValue('year',$year); +00078 print "</TR>"; +00079 echo '</TABLE>'; +00080 print $w->Submit('bt_html','Impression'); +00081 +00082 echo '</FORM>'; +00083 +00084 echo '</div>'; +00085 +00086 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__listing__client_8php.html b/doc/developper/html/impress__listing__client_8php.html index a8f23088c..87cb8f1bb 100644 --- a/doc/developper/html/impress__listing__client_8php.html +++ b/doc/developper/html/impress__listing__client_8php.html @@ -4,10 +4,12 @@ - + -

    impress_listing_client.php File Reference

    +

    impress_listing_client.php File Reference

    print the listing of customer for vat More... +

    +

    Go to the source code of this file. @@ -29,7 +31,12 @@
    $w label = "Année concernée"
    -


    Variable Documentation

    +

    Detailed Description

    +print the listing of customer for vat +

    + +

    +Definition in file impress_listing_client.php.


    Variable Documentation

    @@ -52,9 +59,9 @@

    -Definition at line 32 of file impress_listing_client.php. +Definition at line 35 of file impress_listing_client.php.

    -Referenced by Customer::VatListing(). +Referenced by Customer::VatListing().

    @@ -79,7 +86,7 @@ Referenced by Custo

    -Definition at line 31 of file impress_listing_client.php. +Definition at line 34 of file impress_listing_client.php.

    @@ -104,7 +111,7 @@ Definition at line 64 of file impress_listing_client.php. +Definition at line 67 of file impress_listing_client.php.

    @@ -129,7 +136,7 @@ Definition at line 72 of file impress_listing_client.php. +Definition at line 75 of file impress_listing_client.php.

    @@ -154,7 +161,7 @@ Definition at line 73 of file impress_listing_client.php. +Definition at line 76 of file impress_listing_client.php.

    @@ -179,7 +186,7 @@ Definition at line 67 of file impress_listing_client.php. +Definition at line 70 of file impress_listing_client.php.

    @@ -204,9 +211,9 @@ Definition at line 56 of file impress_listing_client.php. +Definition at line 59 of file impress_listing_client.php.

    -Referenced by fiche_def::Get(), fiche_def::GetAll(), fiche::getAttribut(), fiche_def::GetAttribut(), fiche::GetByDef(), fiche::GetByType(), and UpdateJrn(). +Referenced by fiche_def::Get(), fiche_def::GetAll(), fiche::getAttribut(), fiche_def::GetAttribut(), fiche::GetByDef(), fiche::GetByType(), and UpdateJrn().

    @@ -231,10 +238,10 @@ Referenced by fiche_de

    -Definition at line 65 of file impress_listing_client.php. +Definition at line 68 of file impress_listing_client.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__poste_8php-source.html b/doc/developper/html/impress__poste_8php-source.html index 9a4d41796..a7c520d46 100644 --- a/doc/developper/html/impress__poste_8php-source.html +++ b/doc/developper/html/impress__poste_8php-source.html @@ -4,7 +4,7 @@ - +

    impress_poste.php

    Go to the documentation of this file.
    00001 <?
    @@ -28,119 +28,120 @@
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00021 include_once("class_widget.php");
    -00023 // If print is asked
    -00024 // First time in html
    -00025 // after in pdf or cvs
    -00027 if ( isset( $_POST['bt_html'] ) ) {
    -00028 include("class_poste.php");
    -00029   $Poste=new poste($cn,$_POST['poste_id']);
    -00030   $Poste->GetName();
    -00031   list($array,$tot_deb,$tot_cred)=$Poste->GetRow( $_POST['from_periode'],
    -00032                                                   $_POST['to_periode']
    -00033                                                   );
    -00034 
    -00035   $rep="";
    -00036   $submit=new widget();
    -00037   $hid=new widget("hidden");
    -00038   echo '<div class="u_content">';
    -00039   echo '<h2 class="info">'.$Poste->id." ".$Poste->name.'</h2>';
    -00040   echo "<table >";
    -00041   echo '<TR>';
    -00042   echo '<TD><form method="GET" ACTION="user_impress.php">'.
    -00043     $submit->Submit('bt_other',"Autre poste").
    -00044     $hid->IOValue("type","poste")."</form></TD>";
    -00045 
    -00046   echo '<TD><form method="POST" ACTION="poste_pdf.php">'.
    -00047     $submit->Submit('bt_pdf',"Export PDF").
    -00048     $hid->IOValue("type","poste").
    -00049     $hid->IOValue("poste_id",$Poste->id).
    -00050     $hid->IOValue("from_periode",$_POST['from_periode']).
    -00051     $hid->IOValue("to_periode",$_POST['to_periode']);
    -00052 
    -00053   echo "</form></TD>";
    -00054   echo '<TD><form method="POST" ACTION="poste_csv.php">'.
    -00055     $submit->Submit('bt_csv',"Export CSV").
    -00056     $hid->IOValue("type","poste").
    -00057     $hid->IOValue("poste_id",$Poste->id).
    -00058     $hid->IOValue("from_periode",$_POST['from_periode']).
    -00059     $hid->IOValue("to_periode",$_POST['to_periode']);
    -00060 
    -00061   echo "</form></TD>";
    -00062 
    -00063   echo "</TR>";
    +00026 
    +00027 // If print is asked
    +00028 // First time in html
    +00029 // after in pdf or cvs
    +00031 if ( isset( $_POST['bt_html'] ) ) {
    +00032 include("class_poste.php");
    +00033   $Poste=new poste($cn,$_POST['poste_id']);
    +00034   $Poste->GetName();
    +00035   list($array,$tot_deb,$tot_cred)=$Poste->GetRow( $_POST['from_periode'],
    +00036                                                   $_POST['to_periode']
    +00037                                                   );
    +00038 
    +00039   $rep="";
    +00040   $submit=new widget();
    +00041   $hid=new widget("hidden");
    +00042   echo '<div class="u_content">';
    +00043   echo '<h2 class="info">'.$Poste->id." ".$Poste->name.'</h2>';
    +00044   echo "<table >";
    +00045   echo '<TR>';
    +00046   echo '<TD><form method="GET" ACTION="user_impress.php">'.
    +00047     $submit->Submit('bt_other',"Autre poste").
    +00048     $hid->IOValue("type","poste")."</form></TD>";
    +00049 
    +00050   echo '<TD><form method="POST" ACTION="poste_pdf.php">'.
    +00051     $submit->Submit('bt_pdf',"Export PDF").
    +00052     $hid->IOValue("type","poste").
    +00053     $hid->IOValue("poste_id",$Poste->id).
    +00054     $hid->IOValue("from_periode",$_POST['from_periode']).
    +00055     $hid->IOValue("to_periode",$_POST['to_periode']);
    +00056 
    +00057   echo "</form></TD>";
    +00058   echo '<TD><form method="POST" ACTION="poste_csv.php">'.
    +00059     $submit->Submit('bt_csv',"Export CSV").
    +00060     $hid->IOValue("type","poste").
    +00061     $hid->IOValue("poste_id",$Poste->id).
    +00062     $hid->IOValue("from_periode",$_POST['from_periode']).
    +00063     $hid->IOValue("to_periode",$_POST['to_periode']);
     00064 
    -00065   echo "</table>";
    -00066   if ( count($Poste->row ) == 0 ) 
    -00067         exit;
    +00065   echo "</form></TD>";
    +00066 
    +00067   echo "</TR>";
     00068 
    -00069   echo "<TABLE class=\"result\" width=\"100%\">";
    -00070       echo "<TR>".
    -00071         "<TH> Code interne </TH>".
    -00072         "<TH> Date</TH>".
    -00073         "<TH> Description </TH>".
    -00074         "<TH> Débit  </TH>".
    -00075         "<TH> Crédit </TH>".
    -00076         "</TR>";
    -00077 
    -00078   foreach ( $Poste->row as $op ) { 
    -00079       echo "<TR>".
    -00080         "<TD>".$op['jr_internal']."</TD>".
    -00081         "<TD>".$op['j_date']."</TD>".
    -00082         "<TD>".$op['description']."</TD>".
    -00083         "<TD>".$op['deb_montant']."</TD>".
    -00084         "<TD>".$op['cred_montant']."</TD>".
    -00085         "</TR>";
    -00086     
    -00087   }
    -00088   $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur";
    -00089   $diff=abs($tot_deb-$tot_cred);
    -00090   echo "<TR>".
    -00091     "<TD>$solde_type</TD>".
    -00092     "<TD>$diff</TD>".
    -00093     "<TD></TD>".
    -00094     "<TD>$tot_deb</TD>".
    -00095     "<TD>$tot_cred</TD>".
    -00096     "</TR>";
    -00097 
    -00098   echo "</table>";
    -00099   echo "</div>";
    -00100   exit;
    -00101 }
    -00102 
    -00104 // Show the jrn and date
    -00106 include_once("postgres.php");
    -00107 $ret=make_array($cn,"select distinct j_poste::text ,j_poste::text||'  '||pcm_lib
    -00108                  from jrnx inner join tmp_pcmn on (pcm_val=j_poste)
    -00109                  order by j_poste::text");
    -00111 // Form
    -00113 echo '<div class="u_content">';
    -00114 echo '<FORM ACTION="?type=poste" METHOD="POST">';
    -00115 echo '<TABLE><TR>';
    -00116 $w=new widget("select");
    -00117 $w->table=1;
    -00118 $w->label="Choississez le poste";
    -00119 print $w->IOValue("poste_id",$ret);
    -00120 print '</TR>';
    -00121 print '<TR>';
    -00122 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
    -00123 $w->label="Depuis";
    -00124 print $w->IOValue('from_periode',$periode_start);
    -00125 $w->label=" jusqu'à ";
    -00126 $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id");
    -00127 print $w->IOValue('to_periode',$periode_end);
    -00128 print "</TR>";
    -00129 print "<TR><TD>";
    -00130 $all=new widget("checkbox");
    -00131 $all->label="Tous les postes";
    -00132 $all->disabled=true;
    -00133 echo $all->IOValue("poste_id","");
    -00134 echo '</TABLE>';
    -00135 print $w->Submit('bt_html','Impression');
    -00136 
    -00137 echo '</FORM>';
    -00138 echo '</div>';
    -00139 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00069 echo "</table>"; +00070 if ( count($Poste->row ) == 0 ) +00071 exit; +00072 +00073 echo "<TABLE class=\"result\" width=\"100%\">"; +00074 echo "<TR>". +00075 "<TH> Code interne </TH>". +00076 "<TH> Date</TH>". +00077 "<TH> Description </TH>". +00078 "<TH> Débit </TH>". +00079 "<TH> Crédit </TH>". +00080 "</TR>"; +00081 +00082 foreach ( $Poste->row as $op ) { +00083 echo "<TR>". +00084 "<TD>".$op['jr_internal']."</TD>". +00085 "<TD>".$op['j_date']."</TD>". +00086 "<TD>".$op['description']."</TD>". +00087 "<TD>".$op['deb_montant']."</TD>". +00088 "<TD>".$op['cred_montant']."</TD>". +00089 "</TR>"; +00090 +00091 } +00092 $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; +00093 $diff=abs($tot_deb-$tot_cred); +00094 echo "<TR>". +00095 "<TD>$solde_type</TD>". +00096 "<TD>$diff</TD>". +00097 "<TD></TD>". +00098 "<TD>$tot_deb</TD>". +00099 "<TD>$tot_cred</TD>". +00100 "</TR>"; +00101 +00102 echo "</table>"; +00103 echo "</div>"; +00104 exit; +00105 } +00106 +00108 // Show the jrn and date +00110 include_once("postgres.php"); +00111 $ret=make_array($cn,"select distinct j_poste::text ,j_poste::text||' '||pcm_lib +00112 from jrnx inner join tmp_pcmn on (pcm_val=j_poste) +00113 order by j_poste::text"); +00115 // Form +00117 echo '<div class="u_content">'; +00118 echo '<FORM ACTION="?type=poste" METHOD="POST">'; +00119 echo '<TABLE><TR>'; +00120 $w=new widget("select"); +00121 $w->table=1; +00122 $w->label="Choississez le poste"; +00123 print $w->IOValue("poste_id",$ret); +00124 print '</TR>'; +00125 print '<TR>'; +00126 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id"); +00127 $w->label="Depuis"; +00128 print $w->IOValue('from_periode',$periode_start); +00129 $w->label=" jusqu'à "; +00130 $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id"); +00131 print $w->IOValue('to_periode',$periode_end); +00132 print "</TR>"; +00133 print "<TR><TD>"; +00134 $all=new widget("checkbox"); +00135 $all->label="Tous les postes"; +00136 $all->disabled=true; +00137 echo $all->IOValue("poste_id",""); +00138 echo '</TABLE>'; +00139 print $w->Submit('bt_html','Impression'); +00140 +00141 echo '</FORM>'; +00142 echo '</div>'; +00143 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__poste_8php.html b/doc/developper/html/impress__poste_8php.html index c5b3b847c..f63cc4168 100644 --- a/doc/developper/html/impress__poste_8php.html +++ b/doc/developper/html/impress__poste_8php.html @@ -4,10 +4,12 @@ - + -

    impress_poste.php File Reference

    +

    impress_poste.php File Reference

    Print account (html or pdf). More... +

    +

    Go to the source code of this file. @@ -41,7 +43,12 @@
    $all disabled = true
    -


    Variable Documentation

    +

    Detailed Description

    +Print account (html or pdf). +

    + +

    +Definition in file impress_poste.php.


    Variable Documentation

    @@ -64,7 +71,7 @@

    -Definition at line 130 of file impress_poste.php. +Definition at line 134 of file impress_poste.php.

    @@ -89,7 +96,7 @@ Definition at line 1

    -Definition at line 37 of file impress_poste.php. +Definition at line 41 of file impress_poste.php.

    @@ -114,7 +121,7 @@ Definition at line 3

    -Definition at line 126 of file impress_poste.php. +Definition at line 130 of file impress_poste.php.

    @@ -139,7 +146,7 @@ Definition at line 1

    -Definition at line 122 of file impress_poste.php. +Definition at line 126 of file impress_poste.php.

    @@ -164,7 +171,7 @@ Definition at line 1

    -Definition at line 29 of file impress_poste.php. +Definition at line 33 of file impress_poste.php.

    @@ -189,7 +196,7 @@ Definition at line 2

    -Definition at line 35 of file impress_poste.php. +Definition at line 39 of file impress_poste.php.

    @@ -217,7 +224,7 @@ Definition at line 3 order by j_poste::text")

    -Definition at line 107 of file impress_poste.php. +Definition at line 111 of file impress_poste.php.

    @@ -242,7 +249,7 @@ Definition at line 1

    -Definition at line 36 of file impress_poste.php. +Definition at line 40 of file impress_poste.php.

    @@ -267,7 +274,7 @@ Definition at line 3

    -Definition at line 116 of file impress_poste.php. +Definition at line 120 of file impress_poste.php.

    @@ -292,9 +299,9 @@ Definition at line 1

    -Definition at line 132 of file impress_poste.php. +Definition at line 136 of file impress_poste.php.

    -Referenced by widget::IOValue(), and widget::widget(). +Referenced by widget::IOValue(), and widget::widget().

    @@ -319,7 +326,7 @@ Referenced by widget:

    -Definition at line 96 of file impress_poste.php. +Definition at line 100 of file impress_poste.php.

    @@ -344,7 +351,7 @@ Definition at line 9

    -Definition at line 118 of file impress_poste.php. +Definition at line 122 of file impress_poste.php.

    @@ -369,7 +376,7 @@ Definition at line 1

    -Definition at line 120 of file impress_poste.php. +Definition at line 124 of file impress_poste.php.

    @@ -394,10 +401,10 @@ Definition at line 1

    -Definition at line 117 of file impress_poste.php. +Definition at line 121 of file impress_poste.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__rapport_8php-source.html b/doc/developper/html/impress__rapport_8php-source.html index f0c5a3566..461024337 100644 --- a/doc/developper/html/impress__rapport_8php-source.html +++ b/doc/developper/html/impress__rapport_8php-source.html @@ -4,7 +4,7 @@ - +

    impress_rapport.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,156 +27,157 @@
     00018 */
     00019 /* $Revision$ */
     00020 include_once("class_widget.php");
    -00022 // If print is asked
    -00023 // First time in html
    -00024 // after in pdf or cvs
    -00026 if ( isset( $_POST['bt_html'] ) ) {
    -00027   include("class_rapport.php");
    -00028   $Form=new rapport($cn,$_POST['form_id']);
    -00029   $Form->GetName();
    -00030   // step asked ?
    -00031   //--
    -00032   if ($_POST['p_step'] == 0 ) {
    -00033     $array=$Form->GetRow( $_POST['from_periode'],
    -00034                           $_POST['to_periode']
    -00035                           );
    -00036   } else {
    -00037     // step are asked
    -00038     //--
    -00039     for ($e=$_POST['from_periode'];$e<=$_POST['to_periode'];$e+=$_POST['p_step'])
    -00040       {
    -00041 
    -00042         $periode=getPeriodeName($cn,$e);
    -00043         if ( $periode == null ) continue;
    -00044         $array[]=$Form->GetRow($e,$e);
    -00045         $periode_name[]=$periode;
    -00046       }
    -00047   }
    -00048 
    -00049 
    -00050   $rep="";
    -00051   $submit=new widget();
    -00052   $hid=new widget("hidden");
    -00053   echo '<div class="u_content">';
    -00054   $t=($_POST['from_periode']==$_POST['to_periode'])?"":" -> ".getPeriodeName($cn,$_POST['to_periode'],'p_end');
    -00055   echo '<h2 class="info">'.$Form->id." ".$Form->name.
    -00056     " - ".getPeriodeName($cn,$_POST['from_periode'],'p_start').
    -00057     " ".$t.
    -00058     '</h2>';
    -00059   echo '<table >';
    -00060   echo '<TR>';
    -00061   echo '<TD><form method="GET" ACTION="user_impress.php">'.
    -00062     $submit->Submit('bt_other',"Autre Rapport").
    -00063     $hid->IOValue("type","rapport")."</form></TD>";
    -00064 
    -00065   echo '<TD><form method="POST" ACTION="form_pdf.php">'.
    -00066     $submit->Submit('bt_pdf',"Export PDF").
    -00067     $hid->IOValue("type","rapport").
    -00068     $hid->IOValue("form_id",$Form->id).
    -00069     $hid->IOValue("from_periode",$_POST['from_periode']).
    -00070     $hid->IOValue("to_periode",$_POST['to_periode']).
    -00071     $hid->IOValue("p_step",$_POST['p_step']);
    -00072 
    -00073 
    -00074   echo "</form></TD>";
    -00075   echo '<TD><form method="POST" ACTION="form_csv.php">'.
    -00076     $submit->Submit('bt_csv',"Export CSV").
    -00077     $hid->IOValue("type","form").
    -00078     $hid->IOValue("form_id",$Form->id).
    -00079     $hid->IOValue("from_periode",$_POST['from_periode']).
    -00080     $hid->IOValue("to_periode",$_POST['to_periode']).
    -00081     $hid->IOValue("p_step",$_POST['p_step']);
    -00082 
    -00083   echo "</form></TD>";
    -00084 
    -00085   echo "</TR>";
    +00025 
    +00026 // If print is asked
    +00027 // First time in html
    +00028 // after in pdf or cvs
    +00030 if ( isset( $_POST['bt_html'] ) ) {
    +00031   include("class_rapport.php");
    +00032   $Form=new rapport($cn,$_POST['form_id']);
    +00033   $Form->GetName();
    +00034   // step asked ?
    +00035   //--
    +00036   if ($_POST['p_step'] == 0 ) {
    +00037     $array=$Form->GetRow( $_POST['from_periode'],
    +00038                           $_POST['to_periode']
    +00039                           );
    +00040   } else {
    +00041     // step are asked
    +00042     //--
    +00043     for ($e=$_POST['from_periode'];$e<=$_POST['to_periode'];$e+=$_POST['p_step'])
    +00044       {
    +00045 
    +00046         $periode=getPeriodeName($cn,$e);
    +00047         if ( $periode == null ) continue;
    +00048         $array[]=$Form->GetRow($e,$e);
    +00049         $periode_name[]=$periode;
    +00050       }
    +00051   }
    +00052 
    +00053 
    +00054   $rep="";
    +00055   $submit=new widget();
    +00056   $hid=new widget("hidden");
    +00057   echo '<div class="u_content">';
    +00058   $t=($_POST['from_periode']==$_POST['to_periode'])?"":" -> ".getPeriodeName($cn,$_POST['to_periode'],'p_end');
    +00059   echo '<h2 class="info">'.$Form->id." ".$Form->name.
    +00060     " - ".getPeriodeName($cn,$_POST['from_periode'],'p_start').
    +00061     " ".$t.
    +00062     '</h2>';
    +00063   echo '<table >';
    +00064   echo '<TR>';
    +00065   echo '<TD><form method="GET" ACTION="user_impress.php">'.
    +00066     $submit->Submit('bt_other',"Autre Rapport").
    +00067     $hid->IOValue("type","rapport")."</form></TD>";
    +00068 
    +00069   echo '<TD><form method="POST" ACTION="form_pdf.php">'.
    +00070     $submit->Submit('bt_pdf',"Export PDF").
    +00071     $hid->IOValue("type","rapport").
    +00072     $hid->IOValue("form_id",$Form->id).
    +00073     $hid->IOValue("from_periode",$_POST['from_periode']).
    +00074     $hid->IOValue("to_periode",$_POST['to_periode']).
    +00075     $hid->IOValue("p_step",$_POST['p_step']);
    +00076 
    +00077 
    +00078   echo "</form></TD>";
    +00079   echo '<TD><form method="POST" ACTION="form_csv.php">'.
    +00080     $submit->Submit('bt_csv',"Export CSV").
    +00081     $hid->IOValue("type","form").
    +00082     $hid->IOValue("form_id",$Form->id).
    +00083     $hid->IOValue("from_periode",$_POST['from_periode']).
    +00084     $hid->IOValue("to_periode",$_POST['to_periode']).
    +00085     $hid->IOValue("p_step",$_POST['p_step']);
     00086 
    -00087   echo "</table>";
    -00088   if ( count($Form->row ) == 0 ) 
    -00089         exit;
    +00087   echo "</form></TD>";
    +00088 
    +00089   echo "</TR>";
     00090 
    -00091       if ( $_POST['p_step'] == 0) 
    -00092         { // check the step
    -00093           // show tables
    -00094           ShowReportResult($Form->row);
    -00095         } 
    -00096         else
    -00097           {
    -00098             $a=0;
    -00099             foreach ( $array as $e) {
    -00100               echo '<h2 class="info">Periode : '.$periode_name[$a]."</h2>";
    -00101               $a++;
    -00102               ShowReportResult($e);
    -00103             }
    -00104           }
    -00105 
    -00106   echo "</div>";
    -00107   exit;
    -00108 }
    +00091   echo "</table>";
    +00092   if ( count($Form->row ) == 0 ) 
    +00093         exit;
    +00094 
    +00095       if ( $_POST['p_step'] == 0) 
    +00096         { // check the step
    +00097           // show tables
    +00098           ShowReportResult($Form->row);
    +00099         } 
    +00100         else
    +00101           {
    +00102             $a=0;
    +00103             foreach ( $array as $e) {
    +00104               echo '<h2 class="info">Periode : '.$periode_name[$a]."</h2>";
    +00105               $a++;
    +00106               ShowReportResult($e);
    +00107             }
    +00108           }
     00109 
    -00111 // Show the jrn and date
    -00113 include_once("postgres.php");
    -00114 $ret=make_array($cn,"select fr_id,fr_label
    -00115                  from formdef
    -00116                  order by fr_label");
    -00117 if ( sizeof($ret) == 0 ) {
    -00118   echo "Aucun Rapport";
    -00119   return;
    -00120  }
    -00122 // Form
    -00124 echo '<div class="u_content">';
    -00125 echo '<FORM ACTION="?type=rapport" METHOD="POST">';
    -00126 echo '<TABLE><TR>';
    -00127 $w=new widget("select");
    -00128 $w->table=1;
    -00129 $w->label="Choississez le rapport";
    -00130 print $w->IOValue("form_id",$ret);
    -00131 print '</TR>';
    -00132 print '<TR>';
    -00133 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
    -00134 $w->label="Depuis";
    -00135 print $w->IOValue('from_periode',$periode_start);
    -00136 $w->label=" jusqu'à ";
    -00137 $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id");
    -00138 print $w->IOValue('to_periode',$periode_end);
    -00139 print "</TR>";
    -00140 $aStep=array(
    -00141              array('value'=>0,'label'=>'Pas d\'étape'),
    -00142              array('value'=>1,'label'=>'1 mois')
    -00143              );
    -00144 $w->label='Par étape de';
    -00145 echo '<TR> '.$w->IOValue('p_step',$aStep);
    -00146 echo '</TR>';
    -00147 
    -00148 echo '</TABLE>';
    -00149 print $w->Submit('bt_html','Impression');
    -00150 
    -00151 echo '</FORM>';
    -00152 echo '</div>';
    -00154 // Function
    -00156  function ShowReportResult($p_array) {
    -00157    
    -00158    echo '<TABLE class="result">';
    -00159    echo "<TR>".
    -00160      "<TH> Description </TH>".
    -00161      "<TH> montant </TH>".
    -00162      "</TR>";
    -00163    $i=0;
    -00164    foreach ( $p_array as $op ) { 
    -00165      $i++;
    -00166      $class= ( $i % 2 == 0 )?' class="odd"':"";
    -00167    
    -00168      echo "<TR $class>".
    -00169        "<TD>".$op['desc']."</TD>".
    -00170        "<TD align=\"right\">".sprintf("% 8.2f",$op['montant'])."</TD>".
    -00171        "</TR>";
    -00172    }
    -00173    echo "</table>";
    -00174 
    -00175  }
    -00176 
    -00177 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00110 echo "</div>"; +00111 exit; +00112 } +00113 +00115 // Show the jrn and date +00117 include_once("postgres.php"); +00118 $ret=make_array($cn,"select fr_id,fr_label +00119 from formdef +00120 order by fr_label"); +00121 if ( sizeof($ret) == 0 ) { +00122 echo "Aucun Rapport"; +00123 return; +00124 } +00126 // Form +00128 echo '<div class="u_content">'; +00129 echo '<FORM ACTION="?type=rapport" METHOD="POST">'; +00130 echo '<TABLE><TR>'; +00131 $w=new widget("select"); +00132 $w->table=1; +00133 $w->label="Choississez le rapport"; +00134 print $w->IOValue("form_id",$ret); +00135 print '</TR>'; +00136 print '<TR>'; +00137 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id"); +00138 $w->label="Depuis"; +00139 print $w->IOValue('from_periode',$periode_start); +00140 $w->label=" jusqu'à "; +00141 $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id"); +00142 print $w->IOValue('to_periode',$periode_end); +00143 print "</TR>"; +00144 $aStep=array( +00145 array('value'=>0,'label'=>'Pas d\'étape'), +00146 array('value'=>1,'label'=>'1 mois') +00147 ); +00148 $w->label='Par étape de'; +00149 echo '<TR> '.$w->IOValue('p_step',$aStep); +00150 echo '</TR>'; +00151 +00152 echo '</TABLE>'; +00153 print $w->Submit('bt_html','Impression'); +00154 +00155 echo '</FORM>'; +00156 echo '</div>'; +00158 // Function +00160 function ShowReportResult($p_array) { +00161 +00162 echo '<TABLE class="result">'; +00163 echo "<TR>". +00164 "<TH> Description </TH>". +00165 "<TH> montant </TH>". +00166 "</TR>"; +00167 $i=0; +00168 foreach ( $p_array as $op ) { +00169 $i++; +00170 $class= ( $i % 2 == 0 )?' class="odd"':""; +00171 +00172 echo "<TR $class>". +00173 "<TD>".$op['desc']."</TD>". +00174 "<TD align=\"right\">".sprintf("% 8.2f",$op['montant'])."</TD>". +00175 "</TR>"; +00176 } +00177 echo "</table>"; +00178 +00179 } +00180 +00181 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/impress__rapport_8php.html b/doc/developper/html/impress__rapport_8php.html index cca7a4496..d67e8d651 100644 --- a/doc/developper/html/impress__rapport_8php.html +++ b/doc/developper/html/impress__rapport_8php.html @@ -4,10 +4,12 @@ - + -

    impress_rapport.php File Reference

    +

    impress_rapport.php File Reference

    print first the report in html and propose to print it in pdf More... +

    +

    Go to the source code of this file. @@ -40,7 +42,12 @@
    print</TR > $aStep
    -


    Function Documentation

    +

    Detailed Description

    +print first the report in html and propose to print it in pdf +

    + +

    +Definition in file impress_rapport.php.


    Function Documentation

    @@ -68,9 +75,9 @@

    -Definition at line 156 of file impress_rapport.php. +Definition at line 160 of file impress_rapport.php.

    -References $i. +References $i.


    Variable Documentation

    @@ -100,7 +107,7 @@ References $i. )

    -Definition at line 140 of file impress_rapport.php. +Definition at line 144 of file impress_rapport.php.

    @@ -125,7 +132,7 @@ Definition at line

    -Definition at line 28 of file impress_rapport.php. +Definition at line 32 of file impress_rapport.php.

    @@ -150,7 +157,7 @@ Definition at line

    -Definition at line 52 of file impress_rapport.php. +Definition at line 56 of file impress_rapport.php.

    @@ -175,7 +182,7 @@ Definition at line

    -Definition at line 137 of file impress_rapport.php. +Definition at line 141 of file impress_rapport.php.

    @@ -200,7 +207,7 @@ Definition at line

    -Definition at line 133 of file impress_rapport.php. +Definition at line 137 of file impress_rapport.php.

    @@ -228,7 +235,7 @@ Definition at line order by fr_label")

    -Definition at line 114 of file impress_rapport.php. +Definition at line 118 of file impress_rapport.php.

    @@ -253,7 +260,7 @@ Definition at line

    -Definition at line 51 of file impress_rapport.php. +Definition at line 55 of file impress_rapport.php.

    @@ -278,9 +285,9 @@ Definition at line

    -Definition at line 54 of file impress_rapport.php. +Definition at line 58 of file impress_rapport.php.

    -Referenced by Cpdf::ARC4(), Cpdf::ARC4_init(), Cezpdf::ezTable(), fiche::getAttribut(), fiche_def::GetAttribut(), fiche::GetByDef(), fiche::GetByType(), fiche_def_ref::Input(), RecordInvoice(), SortAttributeById(), and Customer::VatListing(). +Referenced by Cpdf::ARC4(), Cpdf::ARC4_init(), Cezpdf::ezTable(), Document_modele::form(), fiche::getAttribut(), fiche_def::GetAttribut(), fiche::GetByDef(), fiche::GetByType(), fiche_def_ref::Input(), RecordInvoice(), SortAttributeById(), and Customer::VatListing().

    @@ -305,7 +312,7 @@ Referenced by Cpdf::ARC4

    -Definition at line 106 of file impress_rapport.php. +Definition at line 110 of file impress_rapport.php.

    @@ -330,7 +337,7 @@ Definition at line

    -Definition at line 129 of file impress_rapport.php. +Definition at line 133 of file impress_rapport.php.

    @@ -355,7 +362,7 @@ Definition at line

    -Definition at line 131 of file impress_rapport.php. +Definition at line 135 of file impress_rapport.php.

    @@ -380,10 +387,10 @@ Definition at line

    -Definition at line 128 of file impress_rapport.php. +Definition at line 132 of file impress_rapport.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/index.html b/doc/developper/html/index.html index 7a7947958..61ed21a1a 100644 --- a/doc/developper/html/index.html +++ b/doc/developper/html/index.html @@ -4,10 +4,10 @@ - +

    phpcompta Documentation

    -

    1


    Generated on Wed May 31 21:39:14 2006 for phpcompta by  +

    1


    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/index_8php-source.html b/doc/developper/html/index_8php-source.html index 9d283b8ad..336ae69b6 100644 --- a/doc/developper/html/index_8php-source.html +++ b/doc/developper/html/index_8php-source.html @@ -4,80 +4,81 @@ - +

    index.php

    Go to the documentation of this file.
    00001 
     00002 <?
    -00003 echo '<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 3.2 FINAL//EN">
    -00004 <HTML>
    -00005 <head>
    -00006 <TITLE> PhpCompta </TITLE>
    -00007 <style>
    -00008 BODY {
    -00009   background-color:white;
    -00010   font-size:12px;
    -00011   font-family:sans-serif;
    -00012   color:blue;
    -00013 }
    -00014 .remark {
    -00015         border: solid black 1px;
    -00016         font-family:sans-serif;
    -00017         font-size: 9px;
    -00018         color:blue;
    -00019         width:200px;
    -00020         padding:3px;
    -00021 }
    -00022 .gras {
    -00023   font-size:12px;
    -00024   font-family:sans-serif;
    -00025   color:red;
    -00026 
    -00027 }
    -00028 </style>
    -00029 <script src="scripts.js" type="text/javascript"></script>
    -00030 </head>
    -00031 <BODY onLoad="SetFocus(\'login\',0)">
    -00032 Version  developpement 1.2.2 patch 5
    -00033 <div class="remark">
    -00034  <p class="gras">Il est conseill&eacute; de ne PAS utiliser Internet Explorer.
    -00035  </p><p>
    -00036  Vous pouvez utiliser un autre browser: firefox, mozilla, netscape, Konqueror, opera...
    -00037  </p>
    -00038  <p>
    -00039  <a href="https://savannah.nongnu.org/projects/phpcompta">
    -00040  Si vous avez envie de nous rejoindre, vous êtes les bienvenus
    -00041  </a>   .
    +00007 ?>
    +00008 echo '<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 3.2 FINAL//EN">
    +00009 <HTML>
    +00010 <head>
    +00011 <TITLE> PhpCompta </TITLE>
    +00012 <style>
    +00013 BODY {
    +00014   background-color:white;
    +00015   font-size:12px;
    +00016   font-family:sans-serif;
    +00017   color:blue;
    +00018 }
    +00019 .remark {
    +00020         border: solid black 1px;
    +00021         font-family:sans-serif;
    +00022         font-size: 9px;
    +00023         color:blue;
    +00024         width:200px;
    +00025         padding:3px;
    +00026 }
    +00027 .gras {
    +00028   font-size:12px;
    +00029   font-family:sans-serif;
    +00030   color:red;
    +00031 
    +00032 }
    +00033 </style>
    +00034 <script src="scripts.js" type="text/javascript"></script>
    +00035 </head>
    +00036 <BODY onLoad="SetFocus(\'login\',0)">
    +00037 Version  developpement 1.2.2 patch 5
    +00038 <div class="remark">
    +00039  <p class="gras">Il est conseill&eacute; de ne PAS utiliser Internet Explorer.
    +00040  </p><p>
    +00041  Vous pouvez utiliser un autre browser: firefox, mozilla, netscape, Konqueror, opera...
     00042  </p>
    -00043 </div>
    -00044 
    -00045 <center>
    -00046         <IMG SRC="image/logo7.jpg" alt="Logo">
    -00047 <BR>
    -00048 
    -00049 <form action="login.php" method="post" name="loginform">
    -00050 <TABLE><TR><TD>
    -00051 <TABLE  BORDER=0 CELLSPACING=0>
    -00052 <TR>
    -00053 <TD class="cell">Login</TD>
    -00054 <TD><input type="text" name="p_user" tabindex="1"></TD>
    -00055 </TR>
    -00056 <TR>
    -00057 <TD> Password</TD>
    -00058 <TD><INPUT TYPE="PASSWORD" NAME="p_pass" tabindex="2"></TD>
    -00059 </TR>
    -00060 <TR>
    -00061 <TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE=SUBMIT  NAME="login" value="Log in"></TD>
    -00062 </TR>
    -00063 </table>
    -00064 </TD></TR></TABLE>
    -00065 </form> 
    -00066 </Center>
    -00067 </body>
    -00068 </html>';
    -00069 
    -00070 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00043 <p> +00044 <a href="https://savannah.nongnu.org/projects/phpcompta"> +00045 Si vous avez envie de nous rejoindre, vous êtes les bienvenus +00046 </a> . +00047 </p> +00048 </div> +00049 +00050 <center> +00051 <IMG SRC="image/logo7.jpg" alt="Logo"> +00052 <BR> +00053 +00054 <form action="login.php" method="post" name="loginform"> +00055 <TABLE><TR><TD> +00056 <TABLE BORDER=0 CELLSPACING=0> +00057 <TR> +00058 <TD class="cell">Login</TD> +00059 <TD><input type="text" name="p_user" tabindex="1"></TD> +00060 </TR> +00061 <TR> +00062 <TD> Password</TD> +00063 <TD><INPUT TYPE="PASSWORD" NAME="p_pass" tabindex="2"></TD> +00064 </TR> +00065 <TR> +00066 <TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE=SUBMIT NAME="login" value="Log in"></TD> +00067 </TR> +00068 </table> +00069 </TD></TR></TABLE> +00070 </form> +00071 </Center> +00072 </body> +00073 </html>'; +00074 +00075 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/index_8php.html b/doc/developper/html/index_8php.html index 0c72eef99..50a1d5bd8 100644 --- a/doc/developper/html/index_8php.html +++ b/doc/developper/html/index_8php.html @@ -4,15 +4,22 @@ - + -

    index.php File Reference

    +

    index.php File Reference

    default page where user access More... +

    +

    Go to the source code of this file.
    -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +

    Detailed Description

    +default page where user access +

    + +

    +Definition in file index.php.


    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/ing__be_8inc_8php-source.html b/doc/developper/html/ing__be_8inc_8php-source.html index 1447befaa..c52fda9ca 100644 --- a/doc/developper/html/ing__be_8inc_8php-source.html +++ b/doc/developper/html/ing__be_8inc_8php-source.html @@ -4,7 +4,7 @@ - +

    ing_be.inc.php

    Go to the documentation of this file.
    00001 <?
    @@ -28,101 +28,102 @@
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00021 // Author Olivier Dzwoniarkiewicz
    -00023 // Bank ING
    -00025 $row=1;
    -00026 while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
    -00027         $num = count($data);
    -00028         for ($c=0; $c < $num; $c++) {
    -00029         
    -00030         // first line is skipped
    -00031         if ( $row > 1 ) {
    -00032                 
    -00033                 $code=""; $date_exec=""; $date_valeur=""; $montant=""; $devise=""; $compte_ordre=""; $detail=""; $num_compte=""; $iduser="";
    -00034                 list($num_compte, $code, $date_exec, $date_valeur, $montant, $devise, $montant2, $devise2, $rubriques, $detail, $zzz, $zzz, $date_comptable) = split(";", $data[$c]);
    -00035                 
    -00036                 # Bug CSV ING : "424 au lieu de 424
    -00037                 $code = str_replace("\"", "", $code);   
    -00038                 
    -00039                 # Bug CSV ING : espace après la date
    -00040                 $date_exec = str_replace(" ", "", $date_exec);
    -00041                 $date_valeur = str_replace(" ", "", $date_valeur);
    -00042                 $date_exec = str_replace("\"", "", $date_exec);
    -00043                 $date_valeur = str_replace("\"", "", $date_valeur);
    -00044                 $montant = str_replace("\"", "", $montant);
    -00045                 if ((ereg ("([0-9]{3})-([0-9]{7})-([0-9]{2})", $num_compte, $regs))){
    -00046                         $num_compte = $regs[0];
    -00047                 }
    -00048                 
    -00049                 // Si LTXXXXX ou LT XXXXX dans le détail
    -00050                 if ((ereg ("LT+([0-9]{5})", $detail, $regs)) || (ereg ("LT+[ ]+([0-9]{5})", $detail, $regs))) {
    -00051                         $iduser = $regs[1];
    -00052                 }
    -00053                 
    -00054                 // Si XXXXXXXXXXXX
    -00055                 if (ereg ("[0-9]{12}", $detail, $regs)){
    -00056                         if($regs[0] != "000000000000") {
    -00057                                 $id = substr($regs[0], 2, 5);
    -00058                                 $longchiffre = substr($regs[0], 0, 10);
    -00059                                 $check = substr($regs[0], 10, 2);
    -00060                                 if (($longchiffre % 97) == $check) $iduser = $id;
    -00061                         }
    -00062                 }
    -00063                 
    -00064                 if($iduser != "" ) $poste_comptable = "400".$iduser;
    -00065                 else $poste_comptable = "";
    -00066                 
    -00067                 list($jour,$mois,$annee) = explode("/", $date_valeur);  $date_valeur = $annee."-".$mois."-".$jour;
    -00068                 list($jour,$mois,$annee) = explode("/", $date_exec);  $date_exec = $annee."-".$mois."-".$jour;
    -00069                 
    -00070                 $montant = str_replace(",", ".", $montant);
    -00071                 $montant = str_replace("+", "", $montant);
    -00072                 
    -00073                 if($code < 10) $code = "000".$code;
    -00074                 if($code >= 10 and $code < 100) $code = "00".$code;
    -00075                 if($code >= 100) $code = "0".$code;
    +00026 
    +00027 // Bank ING
    +00029 $row=1;
    +00030 while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
    +00031         $num = count($data);
    +00032         for ($c=0; $c < $num; $c++) {
    +00033         
    +00034         // first line is skipped
    +00035         if ( $row > 1 ) {
    +00036                 
    +00037                 $code=""; $date_exec=""; $date_valeur=""; $montant=""; $devise=""; $compte_ordre=""; $detail=""; $num_compte=""; $iduser="";
    +00038                 list($num_compte, $code, $date_exec, $date_valeur, $montant, $devise, $montant2, $devise2, $rubriques, $detail, $zzz, $zzz, $date_comptable) = split(";", $data[$c]);
    +00039                 
    +00040                 # Bug CSV ING : "424 au lieu de 424
    +00041                 $code = str_replace("\"", "", $code);   
    +00042                 
    +00043                 # Bug CSV ING : espace après la date
    +00044                 $date_exec = str_replace(" ", "", $date_exec);
    +00045                 $date_valeur = str_replace(" ", "", $date_valeur);
    +00046                 $date_exec = str_replace("\"", "", $date_exec);
    +00047                 $date_valeur = str_replace("\"", "", $date_valeur);
    +00048                 $montant = str_replace("\"", "", $montant);
    +00049                 if ((ereg ("([0-9]{3})-([0-9]{7})-([0-9]{2})", $num_compte, $regs))){
    +00050                         $num_compte = $regs[0];
    +00051                 }
    +00052                 
    +00053                 // Si LTXXXXX ou LT XXXXX dans le détail
    +00054                 if ((ereg ("LT+([0-9]{5})", $detail, $regs)) || (ereg ("LT+[ ]+([0-9]{5})", $detail, $regs))) {
    +00055                         $iduser = $regs[1];
    +00056                 }
    +00057                 
    +00058                 // Si XXXXXXXXXXXX
    +00059                 if (ereg ("[0-9]{12}", $detail, $regs)){
    +00060                         if($regs[0] != "000000000000") {
    +00061                                 $id = substr($regs[0], 2, 5);
    +00062                                 $longchiffre = substr($regs[0], 0, 10);
    +00063                                 $check = substr($regs[0], 10, 2);
    +00064                                 if (($longchiffre % 97) == $check) $iduser = $id;
    +00065                         }
    +00066                 }
    +00067                 
    +00068                 if($iduser != "" ) $poste_comptable = "400".$iduser;
    +00069                 else $poste_comptable = "";
    +00070                 
    +00071                 list($jour,$mois,$annee) = explode("/", $date_valeur);  $date_valeur = $annee."-".$mois."-".$jour;
    +00072                 list($jour,$mois,$annee) = explode("/", $date_exec);  $date_exec = $annee."-".$mois."-".$jour;
    +00073                 
    +00074                 $montant = str_replace(",", ".", $montant);
    +00075                 $montant = str_replace("+", "", $montant);
     00076                 
    -00077                 $code = $annee."-".$code;
    -00078                 
    -00079                 $sql = "select * from import_tmp where code='".$code."' and num_compte='".$num_compte."'";
    -00080                 $Res=ExecSql($p_cn,$sql);
    -00081                 $Num=pg_NumRows($Res);
    +00077                 if($code < 10) $code = "000".$code;
    +00078                 if($code >= 10 and $code < 100) $code = "00".$code;
    +00079                 if($code >= 100) $code = "0".$code;
    +00080                 
    +00081                 $code = $annee."-".$code;
     00082                 
    -00083                 if($Num > 0) {
    -00084                         echo "Op&eacute;ration FORTIS ".$code." d&eacute;j&eagrave; import&eacute;e.<br/>";
    -00085                 } else {
    -00086                         //echo $code." ".$date_exec." ".$date_valeur." ".$montant." ".$devise." ".$compte_ordre." detail ".$num_compte." <b>".$poste_comptable."</b><br/>";
    -00087                         //$Sql="insert into import_tmp values ('$code','$date_exec','$date_valeur','$montant','$devise','".addslashes($compte_ordre)."','".addslashes($detail)."','$num_compte','$poste_comptable')";
    -00088                         $Sql="insert into import_tmp (code,
    -00089                                 date_exec ,
    -00090                                 date_valeur,
    -00091                                 montant,
    -00092                                 devise,
    -00093                                 compte_ordre,
    -00094                                 detail,
    -00095                                 bq_account ,
    -00096                                 jrn,
    -00097                                 ok)
    -00098                         values ('$code',
    -00099                                 '$date_exec',
    -00100                                 '$date_exec',
    -00101                                 $montant,
    -00102                                 '$devise',
    -00103                                 '".addslashes($compte_ordre)."',        
    -00104                                 '".addslashes($detail).$num_compte."    ',
    -00105                                 '$p_bq_account',
    -00106                                 $p_jrn,
    -00107                                 false)";
    -00108         echo $sql;
    -00109                         $Res=ExecSql($p_cn,$Sql);
    -00110                 }
    -00111         }
    -00112 
    -00113                 } // for ($c=0;$c<$num;$c++)
    -00114                 $row++;
    -00115 } // file is read
    -00116 fclose($handle);
    -00117 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00083 $sql = "select * from import_tmp where code='".$code."' and num_compte='".$num_compte."'"; +00084 $Res=ExecSql($p_cn,$sql); +00085 $Num=pg_NumRows($Res); +00086 +00087 if($Num > 0) { +00088 echo "Op&eacute;ration FORTIS ".$code." d&eacute;j&eagrave; import&eacute;e.<br/>"; +00089 } else { +00090 //echo $code." ".$date_exec." ".$date_valeur." ".$montant." ".$devise." ".$compte_ordre." detail ".$num_compte." <b>".$poste_comptable."</b><br/>"; +00091 //$Sql="insert into import_tmp values ('$code','$date_exec','$date_valeur','$montant','$devise','".addslashes($compte_ordre)."','".addslashes($detail)."','$num_compte','$poste_comptable')"; +00092 $Sql="insert into import_tmp (code, +00093 date_exec , +00094 date_valeur, +00095 montant, +00096 devise, +00097 compte_ordre, +00098 detail, +00099 bq_account , +00100 jrn, +00101 ok) +00102 values ('$code', +00103 '$date_exec', +00104 '$date_exec', +00105 $montant, +00106 '$devise', +00107 '".addslashes($compte_ordre)."', +00108 '".addslashes($detail).$num_compte." ', +00109 '$p_bq_account', +00110 $p_jrn, +00111 false)"; +00112 echo $sql; +00113 $Res=ExecSql($p_cn,$Sql); +00114 } +00115 } +00116 +00117 } // for ($c=0;$c<$num;$c++) +00118 $row++; +00119 } // file is read +00120 fclose($handle); +00121 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/ing__be_8inc_8php.html b/doc/developper/html/ing__be_8inc_8php.html index 37cc7e28c..b5b680234 100644 --- a/doc/developper/html/ing__be_8inc_8php.html +++ b/doc/developper/html/ing__be_8inc_8php.html @@ -4,10 +4,12 @@ - + -

    ing_be.inc.php File Reference

    +

    ing_be.inc.php File Reference

    File to be included to parse CSV from ING Belgium. More... +

    +

    Go to the source code of this file. @@ -35,7 +37,12 @@
     $Num = pg_NumRows($Res)
    -


    Variable Documentation

    +

    Detailed Description

    +File to be included to parse CSV from ING Belgium. +

    + +

    +Definition in file ing_be.inc.php.


    Variable Documentation

    @@ -58,7 +65,7 @@

    -Definition at line 59 of file ing_be.inc.php. +Definition at line 63 of file ing_be.inc.php.

    @@ -83,7 +90,7 @@ Definition at line 59<

    -Definition at line 37 of file ing_be.inc.php. +Definition at line 41 of file ing_be.inc.php.

    @@ -108,7 +115,7 @@ Definition at line 37<

    -Definition at line 40 of file ing_be.inc.php. +Definition at line 44 of file ing_be.inc.php.

    @@ -133,7 +140,7 @@ Definition at line 40<

    -Definition at line 41 of file ing_be.inc.php. +Definition at line 45 of file ing_be.inc.php.

    @@ -158,7 +165,7 @@ Definition at line 41<

    -Definition at line 58 of file ing_be.inc.php. +Definition at line 62 of file ing_be.inc.php.

    @@ -183,7 +190,7 @@ Definition at line 58<

    -Definition at line 44 of file ing_be.inc.php. +Definition at line 48 of file ing_be.inc.php.

    @@ -208,7 +215,7 @@ Definition at line 44<

    -Definition at line 81 of file ing_be.inc.php. +Definition at line 85 of file ing_be.inc.php.

    @@ -233,7 +240,7 @@ Definition at line 81<

    -Definition at line 65 of file ing_be.inc.php. +Definition at line 69 of file ing_be.inc.php.

    @@ -258,7 +265,7 @@ Definition at line 65<

    -Definition at line 80 of file ing_be.inc.php. +Definition at line 84 of file ing_be.inc.php.

    @@ -283,7 +290,7 @@ Definition at line 80<

    -Definition at line 25 of file ing_be.inc.php. +Definition at line 29 of file ing_be.inc.php.

    @@ -308,10 +315,10 @@ Definition at line 25<

    -Definition at line 79 of file ing_be.inc.php. +Definition at line 83 of file ing_be.inc.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn_8php-source.html b/doc/developper/html/jrn_8php-source.html index 0f0d5243e..53fbf3037 100644 --- a/doc/developper/html/jrn_8php-source.html +++ b/doc/developper/html/jrn_8php-source.html @@ -4,7 +4,7 @@ - +

    jrn.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,1006 +27,785 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 
    -00022 /* function RecordJrn
    -00023  * Purpose : Record an entry in the selected journal
    -00024  * 
    -00025  * parm : 
    -00026  *      - p_dossier dossier id
    -00027  *      - p_user user id
    -00028  *      - p_jrn selected journal
    -00029  * gen :
    -00030  *      - none
    -00031  * return:
    -00032  *      - none
    -00033  *
    -00034  */ 
    -00035 function RecordJrn($p_dossier,$p_user,$p_jrn,$p_MaxDeb,$p_MaxCred,$p_array = null,$p_update=0)
    -00036 {
    -00037   include_once("postgres.php");
    -00038   include_once("preference.php");
    -00039 
    -00040   echo_debug('jrn.php',__LINE__,"RecordJrn($p_dossier,$p_user,$p_jrn,$p_MaxDeb,$p_MaxCred,$p_array,$p_update)");
    -00041   for ( $i = 0; $i < $p_MaxDeb; $i++) {
    -00042       ${"e_class_deb$i"}=0;
    -00043       ${"e_mont_deb$i"}=0;
    -00044   }
    -00045   for ( $i = 0; $i < $p_MaxCred; $i++) {
    -00046       ${"e_class_cred$i"}=0;
    -00047       ${"e_mont_cred$i"}=0;
    -00048   }
    -00049   $cn=DbConnect($p_dossier);
    -00050     // userPref contient la periode par default
    -00051     $userPref=GetUserPeriode($cn,$p_user);
    -00052     list ($l_date_start,$l_date_end)=GetPeriode($cn,$userPref);
    -00053     $e_op_rem=substr($l_date_start,2,8);
    -00054 
    -00055   if ( $p_array == null ) {
    -00056     $e_op_date="01";
    -00057     $e_comment="";
    -00058     $e_rapt="";
    -00059     $e_ech="";
    -00060     $e_sum_deb=0;
    -00061     $e_sum_cred=0;
    -00062   } else {
    -00063     foreach ( $p_array as $n=>$e) {
    -00064       ${"e_$n"}= $e;
    -00065   }
    -00066   }
    -00067   /* Get Jrn's properties */
    -00068   $l_line=GetJrnProperty($cn,$p_jrn);
    -00069   if ( $l_line == null ) return;
    -00070   echo '<DIV class="redcontent">';
    -00071   echo '<FORM NAME="encoding" ACTION="enc_jrn.php" METHOD="POST">';
    -00072 
    -00073   printf ('<H2 class="info"> %s %s </H2>',$l_line['jrn_def_name'],$l_line['jrn_def_code']);
    -00074 
    -00075   echo "<INPUT TYPE=HIDDEN NAME=\"MaxDeb\" VALUE=\"$p_MaxDeb\">";
    -00076   echo "<INPUT TYPE=HIDDEN NAME=\"MaxCred\" VALUE=\"$p_MaxCred\">";
    -00077   echo 'Date : <INPUT TYPE="TEXT" NAME="op_date" VALUE="'.
    -00078     $e_op_date.'" SIZE="4">'.
    -00079     $e_op_rem;
    -00080 
    -00081   // Comment
    -00082   echo '<br><SPAN>Comment  = <INPUT TYPE="TEXT" SIZE="70" NAME="comment" VALUE="'.$e_comment.'"></span>';
    +00038 function RecordJrn($p_dossier,$p_user,$p_jrn,$p_MaxDeb,$p_MaxCred,$p_array = null,$p_update=0)
    +00039 {
    +00040   include_once("postgres.php");
    +00041   include_once("preference.php");
    +00042 
    +00043   echo_debug('jrn.php',__LINE__,"RecordJrn($p_dossier,$p_user,$p_jrn,$p_MaxDeb,$p_MaxCred,$p_array,$p_update)");
    +00044   for ( $i = 0; $i < $p_MaxDeb; $i++) {
    +00045       ${"e_class_deb$i"}=0;
    +00046       ${"e_mont_deb$i"}=0;
    +00047   }
    +00048   for ( $i = 0; $i < $p_MaxCred; $i++) {
    +00049       ${"e_class_cred$i"}=0;
    +00050       ${"e_mont_cred$i"}=0;
    +00051   }
    +00052   $cn=DbConnect($p_dossier);
    +00053     // userPref contient la periode par default
    +00054     $userPref=GetUserPeriode($cn,$p_user);
    +00055     list ($l_date_start,$l_date_end)=GetPeriode($cn,$userPref);
    +00056     $e_op_rem=substr($l_date_start,2,8);
    +00057 
    +00058   if ( $p_array == null ) {
    +00059     $e_op_date="01";
    +00060     $e_comment="";
    +00061     $e_rapt="";
    +00062     $e_ech="";
    +00063     $e_sum_deb=0;
    +00064     $e_sum_cred=0;
    +00065   } else {
    +00066     foreach ( $p_array as $n=>$e) {
    +00067       ${"e_$n"}= $e;
    +00068   }
    +00069   }
    +00070   /* Get Jrn's properties */
    +00071   $l_line=GetJrnProperty($cn,$p_jrn);
    +00072   if ( $l_line == null ) return;
    +00073   echo '<DIV class="redcontent">';
    +00074   echo '<FORM NAME="encoding" ACTION="enc_jrn.php" METHOD="POST">';
    +00075 
    +00076   printf ('<H2 class="info"> %s %s </H2>',$l_line['jrn_def_name'],$l_line['jrn_def_code']);
    +00077 
    +00078   echo "<INPUT TYPE=HIDDEN NAME=\"MaxDeb\" VALUE=\"$p_MaxDeb\">";
    +00079   echo "<INPUT TYPE=HIDDEN NAME=\"MaxCred\" VALUE=\"$p_MaxCred\">";
    +00080   echo 'Date : <INPUT TYPE="TEXT" NAME="op_date" VALUE="'.
    +00081     $e_op_date.'" SIZE="4">'.
    +00082     $e_op_rem;
     00083 
    -00084   // Chargement comptes disponibles
    -00085   if ( strlen(trim ($l_line['jrn_def_class_deb']) ) > 0 ) {
    -00086     $valid_deb=split(" ",$l_line['jrn_def_class_deb']);
    -00087 
    -00088     // Creation query
    -00089     $SqlDeb="select pcm_val,pcm_lib from tmp_pcmn where ";
    -00090     foreach ( $valid_deb as $item_deb) {
    -00091       if ( strlen (trim($item_deb))) {
    -00092         echo_debug('jrn.php',__LINE__,"l_line[jrn_def_class_deb] $l_line[jrn_def_class_deb] item_deb $item_deb");
    -00093         if ( strstr($item_deb,"*") == true ) {
    -00094           $item_deb=strtr($item_deb,"*","%");
    -00095           $Sql=" pcm_val like '$item_deb' or";
    -00096         } else {
    -00097           $Sql=" pcm_val = '$item_deb' or";
    -00098         }
    -00099         $SqlDeb=$SqlDeb.$Sql;
    -00100       }
    -00101     }
    -00102     $SqlDeb = substr($SqlDeb,0,strlen($SqlDeb)-2)." order by pcm_val::text";
    -00103   } else
    -00104     {
    -00105       $SqlDeb="select pcm_val,pcm_lib from tmp_pcmn  order by pcm_val::text";
    -00106     }
    -00107   echo_debug('jrn.php',__LINE__,"SqlDeb $SqlDeb");
    -00108   $Res=ExecSql($cn,$SqlDeb);
    -00109   $Count=pg_NumRows($Res);
    -00110 
    -00111   for ( $i=0;$i<$Count;$i++) {
    -00112     $l2_line=pg_fetch_array($Res,$i);
    -00113     $lib=substr($l2_line['pcm_lib'],0,35);
    -00114     $poste [$l2_line['pcm_val']]= $lib;
    -00115   }
    -00116 
    -00117   echo "<TABLE>";
    -00118   echo '<TR><TD><H2 class="info"> débit </H2></TD></TR>';
    -00119   for ( $i=0;$i < $p_MaxDeb;$i++) {
    -00120     echo "<tr>";
    -00121     echo "<TD>";
    -00122     printf ('<SELECT NAME="class_deb%d">',$i);
    -00123     foreach ( $poste as $key => $value){ 
    -00124       $selected="";
    -00125       if ( ${"e_class_deb$i"} == $key ) $selected="SELECTED";
    -00126       $a=sprintf('<OPTION VALUE="%s" %s >%s - % .40s',
    -00127              $key,
    -00128              $selected,
    -00129              $key,
    -00130              $value);
    -00131       echo $a;
    -00132     }
    -00133     echo "</SELECT>";
    -00134     printf ('</TD>');
    -00135 
    -00136     printf('<TD> Montant :<INPUT TYPE="TEXT" id="mont_deb%d" NAME="mont_deb%d" VALUE="%s" onChange="CheckTotal()"></TD>',
    -00137             $i,$i,${"e_mont_deb$i"},$i);
    -00138     echo "</tr>";
    -00139 
    -00140   }
    -00141   // Total debit
    -00142    echo '<TR><TD>';
    -00143    echo 'Total ';
    -00144    echo '</TD><TD>';
    -00145    echo '<input type="TEXT" NAME="sum_deb" VALUE="'.$e_sum_deb.'" onChange="CheckTotal()">';
    -00146    echo '</TD></TR>';
    -00147 if ( $p_update == 0 )  echo "<TR><TD> <INPUT TYPE=\"SUBMIT\" VALUE=\"+ de line\" NAME=\"add_line_deb\"></TD></TR>";
    -00148 
    -00149 
    -00150 
    +00084   // Comment
    +00085   echo '<br><SPAN>Comment  = <INPUT TYPE="TEXT" SIZE="70" NAME="comment" VALUE="'.$e_comment.'"></span>';
    +00086 
    +00087   // Chargement comptes disponibles
    +00088   if ( strlen(trim ($l_line['jrn_def_class_deb']) ) > 0 ) {
    +00089     $valid_deb=split(" ",$l_line['jrn_def_class_deb']);
    +00090 
    +00091     // Creation query
    +00092     $SqlDeb="select pcm_val,pcm_lib from tmp_pcmn where ";
    +00093     foreach ( $valid_deb as $item_deb) {
    +00094       if ( strlen (trim($item_deb))) {
    +00095         echo_debug('jrn.php',__LINE__,"l_line[jrn_def_class_deb] $l_line[jrn_def_class_deb] item_deb $item_deb");
    +00096         if ( strstr($item_deb,"*") == true ) {
    +00097           $item_deb=strtr($item_deb,"*","%");
    +00098           $Sql=" pcm_val like '$item_deb' or";
    +00099         } else {
    +00100           $Sql=" pcm_val = '$item_deb' or";
    +00101         }
    +00102         $SqlDeb=$SqlDeb.$Sql;
    +00103       }
    +00104     }
    +00105     $SqlDeb = substr($SqlDeb,0,strlen($SqlDeb)-2)." order by pcm_val::text";
    +00106   } else
    +00107     {
    +00108       $SqlDeb="select pcm_val,pcm_lib from tmp_pcmn  order by pcm_val::text";
    +00109     }
    +00110   echo_debug('jrn.php',__LINE__,"SqlDeb $SqlDeb");
    +00111   $Res=ExecSql($cn,$SqlDeb);
    +00112   $Count=pg_NumRows($Res);
    +00113 
    +00114   for ( $i=0;$i<$Count;$i++) {
    +00115     $l2_line=pg_fetch_array($Res,$i);
    +00116     $lib=substr($l2_line['pcm_lib'],0,35);
    +00117     $poste [$l2_line['pcm_val']]= $lib;
    +00118   }
    +00119 
    +00120   echo "<TABLE>";
    +00121   echo '<TR><TD><H2 class="info"> débit </H2></TD></TR>';
    +00122   for ( $i=0;$i < $p_MaxDeb;$i++) {
    +00123     echo "<tr>";
    +00124     echo "<TD>";
    +00125     printf ('<SELECT NAME="class_deb%d">',$i);
    +00126     foreach ( $poste as $key => $value){ 
    +00127       $selected="";
    +00128       if ( ${"e_class_deb$i"} == $key ) $selected="SELECTED";
    +00129       $a=sprintf('<OPTION VALUE="%s" %s >%s - % .40s',
    +00130              $key,
    +00131              $selected,
    +00132              $key,
    +00133              $value);
    +00134       echo $a;
    +00135     }
    +00136     echo "</SELECT>";
    +00137     printf ('</TD>');
    +00138 
    +00139     printf('<TD> Montant :<INPUT TYPE="TEXT" id="mont_deb%d" NAME="mont_deb%d" VALUE="%s" onChange="CheckTotal()"></TD>',
    +00140             $i,$i,${"e_mont_deb$i"},$i);
    +00141     echo "</tr>";
    +00142 
    +00143   }
    +00144   // Total debit
    +00145    echo '<TR><TD>';
    +00146    echo 'Total ';
    +00147    echo '</TD><TD>';
    +00148    echo '<input type="TEXT" NAME="sum_deb" VALUE="'.$e_sum_deb.'" onChange="CheckTotal()">';
    +00149    echo '</TD></TR>';
    +00150 if ( $p_update == 0 )  echo "<TR><TD> <INPUT TYPE=\"SUBMIT\" VALUE=\"+ de line\" NAME=\"add_line_deb\"></TD></TR>";
     00151 
    -00152   echo '<TR><TD><H2 class="info"> crédit </H2> </TD></TR>';
    -00153   // Chargement comptes disponibles
    -00154   if ( strlen(trim ($l_line['jrn_def_class_cred']) ) > 0 ) {
    -00155     $valid_cred=split(" ",$l_line['jrn_def_class_cred']);
    -00156 
    -00157     // Creation query
    -00158     $SqlCred="select pcm_val,pcm_lib from tmp_pcmn where ";
    -00159     foreach ( $valid_cred as $item_cred) {
    -00160       if ( strlen (trim($item_cred))) {
    -00161         echo_debug('jrn.php',__LINE__,"l_line[jrn_def_class_cred] $l_line[jrn_def_class_cred] item_cred $item_cred");
    -00162         if ( strstr($item_cred,"*") == true ) {
    -00163           $item_cred=strtr($item_cred,"*","%");
    -00164           $Sql=" pcm_val like '$item_cred' or";
    -00165         } else {
    -00166           $Sql=" pcm_val = '$item_cred' or";
    -00167         }
    -00168         $SqlCred=$SqlCred.$Sql;
    -00169       }
    -00170     }
    -00171     $SqlCred = substr($SqlCred,0,strlen($SqlCred)-2)." order by pcm_val::text" ;
    -00172   } else
    -00173     {
    -00174       $SqlCred="select pcm_val,pcm_lib from tmp_pcmn  order by pcm_val::text";
    -00175     }
    -00176   echo_debug('jrn.php',__LINE__,"SqlCred $SqlCred");
    -00177   $Res=ExecSql($cn,$SqlCred);
    -00178   $Count=pg_NumRows($Res);
    -00179 
    -00180 
    -00181   for ( $i=0;$i<$Count;$i++) {
    -00182     $l2_line=pg_fetch_array($Res,$i);
    -00183     $lib=substr($l2_line['pcm_lib'],0,35);
    -00184     $poste_c[$l2_line['pcm_val']]=$lib;
    -00185   }
    -00186   for ( $i=0;$i < $p_MaxCred;$i++) {
    -00187     echo "<tr>";
    -00188     echo "<TD>";
    -00189     printf ('<SELECT NAME="class_cred%d">',$i);
    -00190     foreach ( $poste_c as $key => $value){ 
    -00191       $selected="";
    -00192       if ( ${"e_class_cred$i"} == $key ) $selected="SELECTED";
    -00193       $a=sprintf('<OPTION VALUE="%s" %s >%s - % .40s',
    -00194              $key,
    -00195              $selected,
    -00196              $key,
    -00197              $value);
    -00198       echo $a;
    -00199     }
    -00200         
    -00201     echo "</SELECT>";
    -00202     echo "</TD>";
    -00203 
    -00204     printf ('<TD> Montant :<INPUT TYPE="TEXT" id="mont_cred%d" NAME="mont_cred%d" VALUE="%s" onChange="CheckTotal()"></TD>',
    -00205             $i,$i,${"e_mont_cred$i"});
    -00206     echo "</tr>";
    -00207 
    -00208   }
    -00209   // Total Credit
    -00210   echo '<TR><TD>';
    -00211   echo 'Total';
    -00212   echo '</TD><TD>';
    -00213   echo '<input type="TEXT" NAME="sum_cred" VALUE="'.$e_sum_cred.'" onChange="CheckTotal()">';
    -00214   echo '</TD></TR>';
    -00215   echo "<TR><TD> <INPUT TYPE=\"SUBMIT\" VALUE=\"+ de line\" NAME=\"add_line_cred\"></TD></TR>";
    -00216   if ( isset ($_GET["PHPSESSID"]) ) {
    -00217     $sessid=$_GET["PHPSESSID"];
    -00218   }
    -00219   else {
    -00220     $sessid=$_POST["PHPSESSID"];
    +00152 
    +00153 
    +00154 
    +00155   echo '<TR><TD><H2 class="info"> crédit </H2> </TD></TR>';
    +00156   // Chargement comptes disponibles
    +00157   if ( strlen(trim ($l_line['jrn_def_class_cred']) ) > 0 ) {
    +00158     $valid_cred=split(" ",$l_line['jrn_def_class_cred']);
    +00159 
    +00160     // Creation query
    +00161     $SqlCred="select pcm_val,pcm_lib from tmp_pcmn where ";
    +00162     foreach ( $valid_cred as $item_cred) {
    +00163       if ( strlen (trim($item_cred))) {
    +00164         echo_debug('jrn.php',__LINE__,"l_line[jrn_def_class_cred] $l_line[jrn_def_class_cred] item_cred $item_cred");
    +00165         if ( strstr($item_cred,"*") == true ) {
    +00166           $item_cred=strtr($item_cred,"*","%");
    +00167           $Sql=" pcm_val like '$item_cred' or";
    +00168         } else {
    +00169           $Sql=" pcm_val = '$item_cred' or";
    +00170         }
    +00171         $SqlCred=$SqlCred.$Sql;
    +00172       }
    +00173     }
    +00174     $SqlCred = substr($SqlCred,0,strlen($SqlCred)-2)." order by pcm_val::text" ;
    +00175   } else
    +00176     {
    +00177       $SqlCred="select pcm_val,pcm_lib from tmp_pcmn  order by pcm_val::text";
    +00178     }
    +00179   echo_debug('jrn.php',__LINE__,"SqlCred $SqlCred");
    +00180   $Res=ExecSql($cn,$SqlCred);
    +00181   $Count=pg_NumRows($Res);
    +00182 
    +00183 
    +00184   for ( $i=0;$i<$Count;$i++) {
    +00185     $l2_line=pg_fetch_array($Res,$i);
    +00186     $lib=substr($l2_line['pcm_lib'],0,35);
    +00187     $poste_c[$l2_line['pcm_val']]=$lib;
    +00188   }
    +00189   for ( $i=0;$i < $p_MaxCred;$i++) {
    +00190     echo "<tr>";
    +00191     echo "<TD>";
    +00192     printf ('<SELECT NAME="class_cred%d">',$i);
    +00193     foreach ( $poste_c as $key => $value){ 
    +00194       $selected="";
    +00195       if ( ${"e_class_cred$i"} == $key ) $selected="SELECTED";
    +00196       $a=sprintf('<OPTION VALUE="%s" %s >%s - % .40s',
    +00197              $key,
    +00198              $selected,
    +00199              $key,
    +00200              $value);
    +00201       echo $a;
    +00202     }
    +00203         
    +00204     echo "</SELECT>";
    +00205     echo "</TD>";
    +00206 
    +00207     printf ('<TD> Montant :<INPUT TYPE="TEXT" id="mont_cred%d" NAME="mont_cred%d" VALUE="%s" onChange="CheckTotal()"></TD>',
    +00208             $i,$i,${"e_mont_cred$i"});
    +00209     echo "</tr>";
    +00210 
    +00211   }
    +00212   // Total Credit
    +00213   echo '<TR><TD>';
    +00214   echo 'Total';
    +00215   echo '</TD><TD>';
    +00216   echo '<input type="TEXT" NAME="sum_cred" VALUE="'.$e_sum_cred.'" onChange="CheckTotal()">';
    +00217   echo '</TD></TR>';
    +00218   echo "<TR><TD> <INPUT TYPE=\"SUBMIT\" VALUE=\"+ de line\" NAME=\"add_line_cred\"></TD></TR>";
    +00219   if ( isset ($_GET["PHPSESSID"]) ) {
    +00220     $sessid=$_GET["PHPSESSID"];
     00221   }
    -00222 
    -00223   $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchJrn(\''.$sessid."','rapt')\">";
    -00224   echo_debug('jrn.php',__LINE__,"search $search");
    -00225   // To avoid problem with unknown variable
    -00226   if ( ! isset ($e_rapt) ) {
    -00227         $e_rapt="";
    -00228   }
    -00229 
    -00230   echo '<TR><TD colspan="2">
    -00231          rapprochement : <INPUT TYPE="TEXT" name="rapt" value="'.$e_rapt.'">'.$search.'</TD></TR>';
    -00232   echo "</TABLE>";
    -00233 
    -00234   // To avoid problem with unknown variable
    -00235   if ( ! isset ($e_comment) ) {
    -00236         $e_comment="";
    -00237   }
    -00238  
    -00239 
    -00240 
    -00241   if ( $p_update==0) {
    -00242     echo '<input type="submit" Name="add_record" Value="Enregistre">';
    -00243   } else {
    -00244     echo '<input type="submit" Name="update_record" Value="Enregistre">';
    -00245   }
    -00246    echo '<input type="reset" Value="Efface">';
    -00247 
    -00248    // To avoid problem with unknown variable
    -00249     if ( ! isset ($e_sum_deb) ) {
    -00250                  $e_sum_deb=0;
    -00251     }
    -00252 
    -00253    // To avoid problem with unknown variable
    -00254      if ( ! isset ($e_sum_cred) ) {
    -00255                  $e_sum_cred=0;
    -00256       }
    -00257 
    -00258 
    -00259    echo '<SPAN ID="diff"></SPAN>';
    -00260   echo "</FORM>";
    -00261   echo '</DIV>';
    -00262   
    -00263 }
    -00264 /* function UpdateJrn
    -00265  * Purpose : Display the form to UPDATE account operation
    -00266  *          
    -00267  * parm : 
    -00268  *      - p_dossier
    -00269  *      - p_jrn
    -00270  *      - p_MaxDeb number of debit line
    -00271  *      - p_MaxCred "     "  credit "
    -00272  *"     - p_array array containing the others datas
    -00273  * gen :
    -00274  *      - none
    -00275  * return:
    -00276  *      - none
    -00277  *
    -00278  */ 
    -00279  function UpdateJrn($p_cn,$p_jr_id)
    -00280 {
    -00281   echo_debug('jrn.php',__LINE__,"function UpdateJrn");
    -00282 
    -00283   $l_array=GetDataJrnJrId($p_cn,$p_jr_id);
    -00284   if ( $l_array == null ) {
    -00285     echo_error ("Not data found for UpdateJrn p_jr_id = $p_jr_id");
    -00286     return ;
    -00287   }
    -00288   // Javascript
    -00289   $r=JS_VIEW_JRN_MODIFY;
    -00290 
    -00291   // Build the form
    -00292   $col_vide="<TD></TD>";
    -00293   for ( $i =0 ; $i < sizeof($l_array); $i++) {
    -00294     $content=$l_array[$i] ;
    -00295 
    -00296       // for the first line
    -00297       if ( $i == 0 ) {
    -00298         $r.="<TABLE>";
    -00299         $r.="<TR>";
    -00300         // Date
    -00301         $r.="<TD>";
    -00302         $r.=$content['jr_date'];
    -00303         $r.="</TD>";
    -00304         // for upload document we need the grpt_id   
    -00305         $r.='<Input type="hidden" name="jr_grpt_id" value="'.$content['jr_grpt_id'].'">';
    -00306 
    -00307         // comment can be changed
    -00308         $r.="<TD>";
    -00309         $r.='<INPUT TYPE="TEXT" name="comment" value="';
    -00310         $r.=$content['jr_comment'];
    -00311         $r.='" SIZE="25">';
    -00312         $r.="</TD>";
    -00313 
    -00314         // Internal
    -00315         $r.="<TD>";
    -00316         $r.=$content['jr_internal'];
    -00317         $r.="</TD>";
    -00318 
    -00319         if ( $content['jrn_def_type'] == 'ACH' or 
    -00320              $content['jrn_def_type'] == 'VEN' )
    -00321           {
    -00322             // Is Paid
    -00323             $r.="<TD>";
    -00324             $check=( $content['jr_rapt'] != null )?"CHECKED":"UNCHECKED";
    -00325             $r.='<TD>Payé <INPUT TYPE="CHECKBOX" name="is_paid" '.$check.'></TD>';
    -00326           }
    -00327         $r.="</TR>";
    -00328         $r.="</TABLE>";
    -00329         $r.="<TABLE>";
    -00330       }
    -00331       $r.="<TR>";
    -00332       if ( $content['j_debit'] == 'f' ) $r.=$col_vide;
    -00333       //      $r.="<TD>".$content['j_debit']."</td>";
    -00334       
    -00335       $r.="<TD>".$content['j_poste']."</td>";
    -00336       if ( $content['j_debit'] == 't' ) $r.=$col_vide;
    -00337       $r.="<TD>".$content['vw_name']."</td>";
    -00338       if ( $content['j_debit'] == 'f' ) $r.=$col_vide;
    -00339       $r.="<TD>".$content['j_montant']."</td>";
    -00340       $r.="</TR>";
    -00341 
    -00342       //    }//     foreach ($l_array[$i]  as $value=>$content) 
    -00343   }// for ( $i =0 ; $i < sizeof($l_array); $i++) 
    -00344     $file=new widget("file");
    -00345     $file->table=1;
    -00346         //document
    -00347     $r.='<TD>A effacer <INPUT TYPE="CHECKBOX" name="to_remove" ></TD>';
    -00348     $r.="<TD>".sprintf('<A class="detail" HREF="show_document.php?jrn=%s&jr_grpt_id=%s">%s</A>',
    -00349                 $content['jr_id'],
    -00350                 $content['jr_grpt_id'],
    -00351                 $content['jr_pj_name'])."</TD>";
    -00352     $r.="</TR></TABLE>";
    -00353     $r.="<hr>";
    -00354     $r.= "<table>"; 
    -00355     $r.="<TR>".$file->IOValue("pj","","Pièce justificative")."</TR>";
    -00356     $r.="</table>";
    -00357     $r.="<hr>";
    -00358 
    -00359   $r.="</table>";
    -00360   $r.="Total ".$content['jr_montant']."<br>";
    -00361   // show all the related operation
    -00362   $a=GetConcerned($p_cn,$content['jr_id']);
    -00363   
    -00364   if ( $a != null ) {
    -00365       $r.="<b>Operation concernée</b> <br>";
    -00366       if ( isset ($_GET["PHPSESSID"]) ) {
    -00367         $sessid=$_GET["PHPSESSID"];
    -00368       }
    -00369       else {
    -00370         $sessid=$_POST["PHPSESSID"];
    +00222   else {
    +00223     $sessid=$_POST["PHPSESSID"];
    +00224   }
    +00225 
    +00226   $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchJrn(\''.$sessid."','rapt')\">";
    +00227   echo_debug('jrn.php',__LINE__,"search $search");
    +00228   // To avoid problem with unknown variable
    +00229   if ( ! isset ($e_rapt) ) {
    +00230         $e_rapt="";
    +00231   }
    +00232 
    +00233   echo '<TR><TD colspan="2">
    +00234          rapprochement : <INPUT TYPE="TEXT" name="rapt" value="'.$e_rapt.'">'.$search.'</TD></TR>';
    +00235   echo "</TABLE>";
    +00236 
    +00237   // To avoid problem with unknown variable
    +00238   if ( ! isset ($e_comment) ) {
    +00239         $e_comment="";
    +00240   }
    +00241  
    +00242 
    +00243 
    +00244   if ( $p_update==0) {
    +00245     echo '<input type="submit" Name="add_record" Value="Enregistre">';
    +00246   } else {
    +00247     echo '<input type="submit" Name="update_record" Value="Enregistre">';
    +00248   }
    +00249    echo '<input type="reset" Value="Efface">';
    +00250 
    +00251    // To avoid problem with unknown variable
    +00252     if ( ! isset ($e_sum_deb) ) {
    +00253                  $e_sum_deb=0;
    +00254     }
    +00255 
    +00256    // To avoid problem with unknown variable
    +00257      if ( ! isset ($e_sum_cred) ) {
    +00258                  $e_sum_cred=0;
    +00259       }
    +00260 
    +00261 
    +00262    echo '<SPAN ID="diff"></SPAN>';
    +00263   echo "</FORM>";
    +00264   echo '</DIV>';
    +00265   
    +00266 }
    +00282  function UpdateJrn($p_cn,$p_jr_id)
    +00283 {
    +00284   echo_debug('jrn.php',__LINE__,"function UpdateJrn");
    +00285 
    +00286   $l_array=GetDataJrnJrId($p_cn,$p_jr_id);
    +00287   if ( $l_array == null ) {
    +00288     echo_error ("Not data found for UpdateJrn p_jr_id = $p_jr_id");
    +00289     return ;
    +00290   }
    +00291   // Javascript
    +00292   $r=JS_VIEW_JRN_MODIFY;
    +00293 
    +00294   // Build the form
    +00295   $col_vide="<TD></TD>";
    +00296   for ( $i =0 ; $i < sizeof($l_array); $i++) {
    +00297     $content=$l_array[$i] ;
    +00298 
    +00299       // for the first line
    +00300       if ( $i == 0 ) {
    +00301         $r.="<TABLE>";
    +00302         $r.="<TR>";
    +00303         // Date
    +00304         $r.="<TD>";
    +00305         $r.=$content['jr_date'];
    +00306         $r.="</TD>";
    +00307         // for upload document we need the grpt_id   
    +00308         $r.='<Input type="hidden" name="jr_grpt_id" value="'.$content['jr_grpt_id'].'">';
    +00309 
    +00310         // comment can be changed
    +00311         $r.="<TD>";
    +00312         $r.='<INPUT TYPE="TEXT" name="comment" value="';
    +00313         $r.=$content['jr_comment'];
    +00314         $r.='" SIZE="25">';
    +00315         $r.="</TD>";
    +00316 
    +00317         // Internal
    +00318         $r.="<TD>";
    +00319         $r.=$content['jr_internal'];
    +00320         $r.="</TD>";
    +00321 
    +00322         if ( $content['jrn_def_type'] == 'ACH' or 
    +00323              $content['jrn_def_type'] == 'VEN' )
    +00324           {
    +00325             // Is Paid
    +00326             $r.="<TD>";
    +00327             $check=( $content['jr_rapt'] != null )?"CHECKED":"UNCHECKED";
    +00328             $r.='<TD>Payé <INPUT TYPE="CHECKBOX" name="is_paid" '.$check.'></TD>';
    +00329           }
    +00330         $r.="</TR>";
    +00331         $r.="</TABLE>";
    +00332         $r.="<TABLE>";
    +00333       }
    +00334       $r.="<TR>";
    +00335       if ( $content['j_debit'] == 'f' ) $r.=$col_vide;
    +00336       //      $r.="<TD>".$content['j_debit']."</td>";
    +00337       
    +00338       $r.="<TD>".$content['j_poste']."</td>";
    +00339       if ( $content['j_debit'] == 't' ) $r.=$col_vide;
    +00340       $r.="<TD>".$content['vw_name']."</td>";
    +00341       if ( $content['j_debit'] == 'f' ) $r.=$col_vide;
    +00342       $r.="<TD>".$content['j_montant']."</td>";
    +00343       $r.="</TR>";
    +00344 
    +00345       //    }//     foreach ($l_array[$i]  as $value=>$content) 
    +00346   }// for ( $i =0 ; $i < sizeof($l_array); $i++) 
    +00347     $file=new widget("file");
    +00348     $file->table=1;
    +00349         //document
    +00350     $r.='<TD>A effacer <INPUT TYPE="CHECKBOX" name="to_remove" ></TD>';
    +00351     $r.="<TD>".sprintf('<A class="detail" HREF="show_pj.php?jrn=%s&jr_grpt_id=%s">%s</A>',
    +00352                 $content['jr_id'],
    +00353                 $content['jr_grpt_id'],
    +00354                 $content['jr_pj_name'])."</TD>";
    +00355     $r.="</TR></TABLE>";
    +00356     $r.="<hr>";
    +00357     $r.= "<table>"; 
    +00358     $r.="<TR>".$file->IOValue("pj","","Pièce justificative")."</TR>";
    +00359     $r.="</table>";
    +00360     $r.="<hr>";
    +00361 
    +00362   $r.="</table>";
    +00363   $r.="Total ".$content['jr_montant']."<br>";
    +00364   // show all the related operation
    +00365   $a=GetConcerned($p_cn,$content['jr_id']);
    +00366   
    +00367   if ( $a != null ) {
    +00368       $r.="<b>Operation concernée</b> <br>";
    +00369       if ( isset ($_GET["PHPSESSID"]) ) {
    +00370         $sessid=$_GET["PHPSESSID"];
     00371       }
    -00372 
    -00373     $r.= '<div style="margin-left:30px;">';
    -00374     foreach ($a as $key => $element) {
    -00375       $r.=sprintf ('%s <INPUT TYPE="BUTTON" VALUE="Détail" onClick="viewDetail(\'%s\',\'%s\')">', 
    -00376                    GetInternal($p_cn,$element),GetGrpt($p_cn,$element),$sessid);
    -00377       $r.=sprintf('<INPUT TYPE="button" value="Efface" onClick="dropLink(\'%s\',\'%s\',\'%s\')"><BR>',
    -00378                   $content['jr_id'],$element,$sessid);
    -00379     }//for
    -00380     $r.= "</div>";
    -00381   }// if ( $a != null ) {
    -00382 
    -00383   if ( isset ($_GET["PHPSESSID"]) ) {
    -00384     $sessid=$_GET["PHPSESSID"];
    -00385   }
    -00386   else {
    -00387     $sessid=$_POST["PHPSESSID"];
    +00372       else {
    +00373         $sessid=$_POST["PHPSESSID"];
    +00374       }
    +00375 
    +00376     $r.= '<div style="margin-left:30px;">';
    +00377     foreach ($a as $key => $element) {
    +00378       $r.=sprintf ('%s <INPUT TYPE="BUTTON" VALUE="Détail" onClick="viewDetail(\'%s\',\'%s\')">', 
    +00379                    GetInternal($p_cn,$element),GetGrpt($p_cn,$element),$sessid);
    +00380       $r.=sprintf('<INPUT TYPE="button" value="Efface" onClick="dropLink(\'%s\',\'%s\',\'%s\')"><BR>',
    +00381                   $content['jr_id'],$element,$sessid);
    +00382     }//for
    +00383     $r.= "</div>";
    +00384   }// if ( $a != null ) {
    +00385 
    +00386   if ( isset ($_GET["PHPSESSID"]) ) {
    +00387     $sessid=$_GET["PHPSESSID"];
     00388   }
    -00389   
    -00390   $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchJrn(\''.$sessid."','rapt')\">";
    -00391 
    -00392   $r.= '<H2 class="info">rapprochement </H2> 
    -00393        <INPUT TYPE="TEXT" name="rapt" value="">'.$search;
    -00394   $r.='<input type="hidden" name="jr_id" value="'.$content['jr_id'].'">';
    -00395 
    -00396   //  echo $r;
    -00397   return $r;
    -00398 }
    -00399 
    -00400 /* function ViewRec
    -00401  * Purpose : debug function to be dropped
    -00402  * 
    -00403  * parm : 
    -00404  *      - 
    -00405  * gen :
    -00406  *      -
    -00407  * return:
    -00408  *      -
    -00409  *
    -00410  */ 
    -00411 
    -00412 function ViewRec($p_array = null) {
    -00413   if ($p_array == null) { 
    -00414     echo_debug('jrn.php',__LINE__,"p_array is null");
    -00415   }else {
    -00416     foreach ( $p_array as $n=>$e) {
    -00417       echo_debug('jrn.php',__LINE__,"a[$n]= $e");
    -00418     }
    -00419  
    -00420   }
    -00421 }
    -00422 /* function CorrectRecord
    -00423  * Purpose : Call the RecordJrn. In fact does nothing
    -00424  * 
    -00425  * parm : 
    -00426  *      - the same as RecordJrn
    -00427  * gen :
    -00428  *      - none
    -00429  * return:
    -00430  *      - none
    -00431  *
    -00432  */ 
    -00433 function CorrectRecord($p_dossier,$p_user,$p_jrn,$p_MaxDeb,$p_MaxCred,$p_array)
    -00434 {
    -00435 
    -00436    RecordJrn($p_dossier,$p_user,$p_jrn,$p_MaxDeb,$p_MaxCred,$p_array);
    -00437 }
    -00438 /* function ViewRecord
    -00439  * Purpose : View the added operation
    -00440  * 
    -00441  * parm : 
    -00442  *      - p_dossier
    -00443  *      - p_jrn
    -00444  *      - p_id
    -00445  *      - p_MaxDeb
    -00446  *      - p_MaxCred
    -00447  *      - p_array
    -00448  * gen :
    -00449  *      - none
    -00450  * return:
    -00451  *      - none
    -00452  *
    -00453  */ 
    -00454 function ViewRecord ($p_dossier,$p_jrn,$p_id,$p_MaxDeb,$p_MaxCred,$p_array)
    -00455 {
    -00456   echo_debug ("ViewRecord : $p_dossier");
    -00457   echo_debug('jrn.php',__LINE__,"function ViewRecord ($p_dossier,$p_jrn,$p_id,$p_MaxCred,$p_MaxDeb,$p_array)");
    -00458   foreach ( $p_array as $key=>$element) {
    -00459     ${"e_$key"}=$element;
    -00460     echo_debug('jrn.php',__LINE__," e_$key=$element;");
    -00461 
    -00462   }
    -00463   // Get Jrn's Prop
    -00464   $l_prop=GetJrnProp($p_dossier,$p_jrn);
    -00465 
    -00466   include_once("poste.php");
    -00467   if ( $l_prop == null ) return;
    -00468   $col_vide="<TD></TD>";
    -00469   echo '<TABLE ALIGN=CENTER BORDER=1 style="border-style:groove">';
    -00470   echo '<TR>';
    -00471   echo "<TD>". $l_prop['jrn_def_name']."(".$l_prop['jrn_def_code'].") </TD>";
    -00472   echo "<TD> Date : $e_op_date</TD>";
    -00473   echo "</TR>";
    -00474   echo "</TABLE>";
    -00475 
    -00476 
    -00477   echo "<table width=600 border=0>";
    -00478   echo "<TR><TD>operation $p_id</TD></TR>";
    -00479   for ($i = 0; $i < $p_MaxDeb;$i++) {
    -00480     //Deb
    -00481     if ( strlen(trim(${"e_mont_deb$i"})) > 0 && ${"e_mont_deb$i"} > 0 ) {
    -00482       $class=GetPosteLibelle($p_dossier,${"e_class_deb$i"});
    -00483 
    -00484       echo '<TR style="background-color:lightblue"><TD>'.${"e_class_deb$i"}."</TD>$col_vide<TD> $class </TD> <TD>".${"e_mont_deb$i"}."</TD>$col_vide</TR>";
    -00485     }
    -00486   }
    -00487 
    -00488   // Cred
    -00489   for ($i = 0; $i < $p_MaxCred;$i++) {
    -00490     if ( strlen(trim(${"e_mont_cred$i"})) > 0 && ${"e_mont_cred$i"} > 0 ) {
    -00491       $class=GetPosteLibelle($p_dossier,${"e_class_cred$i"});
    -00492       
    -00493       echo '<TR style="background-color:lightgreen;">'.$col_vide.'<TD>'.${"e_class_cred$i"}."</TD><TD> $class </TD>$col_vide <TD>".${"e_mont_cred$i"}."</TD></TR>";
    -00494     }
    -00495   }
    -00496   echo "<TR style=\"background-color:lightgray\">";
    -00497   echo $col_vide;
    -00498   echo $col_vide;
    -00499   echo "<TD align=\"center\"> Total</TD>";
    -00500   echo "<TD> $e_sum_deb</TD><TD> $e_sum_cred</TD>";
    -00501   echo "</TABLE>";
    -00502   // Bouton again
    -00503   echo '<table align="center">';
    -00504   echo '<TR><TD class="mtitle">';
    -00505   echo ' <A class="mtitle" HREF="enc_jrn.php?action=record&max_deb='.$l_prop['jrn_deb_max_line'].'&max_cred='.$l_prop['jrn_cred_max_line'].'&p_jrn='.$p_jrn.'"> Ajouter</A>';
    -00506   echo '</TD></TR></TABLE>';
    -00507 }
    -00508 /* function GetJrnProperty ($p_cn,$p_jrn) 
    -00509  * Purpose : Get the properties of a journal
    -00510  * 
    -00511  * parm : 
    -00512  *      - p_cn database connection
    -00513  *      - p_jrn the jrn id
    -00514  * gen :
    -00515  *      - none
    -00516  * return:
    -00517  *      - an array containing properties
    -00518  *
    -00519  */ 
    -00520 function GetJrnProperty($p_cn,$p_jrn) 
    -00521 {
    -00522   $Res=ExecSql($p_cn,"select jrn_Def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_def_type, 
    -00523                    jrn_deb_max_line,jrn_cred_max_line,jrn_def_ech,jrn_def_ech_lib,jrn_def_code,
    -00524                    jrn_def_fiche_deb,jrn_def_fiche_deb
    -00525                    from jrn_Def 
    -00526                       where jrn_def_id=$p_jrn");
    -00527   $Count=pg_NumRows($Res);
    -00528   if ( $Count == 0 ) {
    -00529     echo '<DIV="redcontent"><H2 class="error"> Paramètres journaux non trouvés</H2> </DIV>';
    -00530     return null;
    -00531   }
    -00532   return pg_fetch_array($Res,0);
    -00533 }
    -00534 /* function GetJrnProp
    -00535  * Purpose : Get the properties of a journal
    -00536  * 
    -00537  * parm : 
    -00538  *      - p_dossier the folder id
    -00539  *      - p_jrn the jrn id
    -00540  * gen :
    -00541  *      - none
    -00542  * return:
    -00543  *      - an array containing properties
    -00544  *
    -00545  */ 
    -00546 function GetJrnProp($p_dossier,$p_jrn,$is_connected=0) 
    -00547 {
    -00548   if ( $is_connected == 0 ) 
    -00549     $cn=DbConnect($p_dossier);
    -00550   else
    -00551     $cn=$p_dossier;
    -00552 
    -00553   $Res=ExecSql($cn,"select jrn_Def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_def_type, 
    -00554                    jrn_deb_max_line,jrn_cred_max_line,jrn_def_ech,jrn_def_ech_lib,jrn_def_code,
    -00555                    jrn_def_fiche_deb,jrn_def_fiche_deb
    -00556                    from jrn_Def 
    -00557                       where jrn_def_id=$p_jrn");
    -00558   $Count=pg_NumRows($Res);
    -00559   if ( $Count == 0 ) {
    -00560     echo '<DIV="redcontent"><H2 class="error"> Paramètres journaux non trouvés</H2> </DIV>';
    -00561     return null;
    -00562   }
    -00563   return pg_fetch_array($Res,0);
    -00564 }
    -00565 /* function ViewJrn
    -00566  * Purpose : Vue des écritures comptables
    -00567  * 
    -00568  * parm : 
    -00569  *      - p_dossier,
    -00570  *      - p_user,
    -00571  *      - p_jrn
    -00572  *      - p_url for modif
    -00573  *      - array
    -00574  * gen :
    -00575  *      -
    -00576  * return:
    -00577  *      -
    -00578  *
    -00579  */ 
    -00580 function ViewJrn($p_dossier,$p_user,$p_jrn,$p_url,$p_array=null) {
    -00581   echo_debug('jrn.php',__LINE__,"function ViewJrn($p_dossier,$p_user,$p_jrn,$p_array=null) ");
    -00582   echo JS_VIEW_JRN_DETAIL;
    -00583   $db=sprintf("dossier%d",$p_dossier);
    -00584   $l_prop=GetJrnProp($p_dossier,$p_jrn);
    -00585   echo "<H2 class=\"info\">".$l_prop['jrn_def_name']."( ".$l_prop['jrn_def_code'].")"."</H2>";
    -00586   $cn=DbConnect($p_dossier);
    -00587   if ( $p_array == null) {
    -00588     include_once("preference.php");
    -00589     $l_periode=GetUserPeriode($cn,$p_user);
    -00590     $Res=ExecSql($cn,"select jr_id,j_id,jr_internal,to_char(j_date,'DD.MM.YYYY') as j_date,
    -00591                        j_montant,j_poste,pcm_lib,j_grpt,j_debit,j_centralized,j_tech_per,
    -00592                        pcm_lib
    -00593                    from jrnx inner join tmp_pcmn on j_poste=pcm_val
    -00594                              inner join jrn on jr_grpt_id=j_grpt
    -00595                    where 
    -00596                    j_jrn_def=$p_jrn and j_tech_per=$l_periode
    -00597                    order by j_id,j_grpt,j_debit desc");
    -00598   } else {
    -00599     // Construction Query 
    -00600     foreach ( $p_array as $key=>$element) {
    -00601       ${"l_$key"}=$element;
    -00602       echo_debug ("l_$key $element");
    -00603     }
    -00604     $sql="select j_id,to_char(j_date,'DD.MM.YYYY') as j_date,j_montant,j_poste,
    -00605                  pcm_lib,j_grpt,jr_id,j_debit,j_centralized,j_tech_per,jr_internal
    -00606                    from jrnx inner join tmp_pcmn on j_poste=pcm_val
    -00607                         inner join jrn on jr_grpt_id=j_grpt
    -00608                    where 
    -00609                    j_jrn_def=$p_jrn";
    -00610     $l_and="and ";
    -00611     if ( ereg("^[0-9]+$", $l_s_montant) || ereg ("^[0-9]+\.[0-9]+$", $l_s_montant) ) {
    -00612     $sql.=" and jr_montant $l_mont_sel $l_s_montant";
    -00613     }
    -00614     if ( isDate($l_date_start) != null ) {
    -00615       $sql.=$l_and." j_date >= to_date('".$l_date_start."','DD.MM.YYYY')";
    +00389   else {
    +00390     $sessid=$_POST["PHPSESSID"];
    +00391   }
    +00392   
    +00393   $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchJrn(\''.$sessid."','rapt')\">";
    +00394 
    +00395   $r.= '<H2 class="info">rapprochement </H2> 
    +00396        <INPUT TYPE="TEXT" name="rapt" value="">'.$search;
    +00397   $r.='<input type="hidden" name="jr_id" value="'.$content['jr_id'].'">';
    +00398 
    +00399   //  echo $r;
    +00400   return $r;
    +00401 }
    +00402 
    +00415 function ViewRec($p_array = null) {
    +00416   if ($p_array == null) { 
    +00417     echo_debug('jrn.php',__LINE__,"p_array is null");
    +00418   }else {
    +00419     foreach ( $p_array as $n=>$e) {
    +00420       echo_debug('jrn.php',__LINE__,"a[$n]= $e");
    +00421     }
    +00422  
    +00423   }
    +00424 }
    +00436 function CorrectRecord($p_dossier,$p_user,$p_jrn,$p_MaxDeb,$p_MaxCred,$p_array)
    +00437 {
    +00438 
    +00439    RecordJrn($p_dossier,$p_user,$p_jrn,$p_MaxDeb,$p_MaxCred,$p_array);
    +00440 }
    +00457 function ViewRecord ($p_dossier,$p_jrn,$p_id,$p_MaxDeb,$p_MaxCred,$p_array)
    +00458 {
    +00459   echo_debug ("ViewRecord : $p_dossier");
    +00460   echo_debug('jrn.php',__LINE__,"function ViewRecord ($p_dossier,$p_jrn,$p_id,$p_MaxCred,$p_MaxDeb,$p_array)");
    +00461   foreach ( $p_array as $key=>$element) {
    +00462     ${"e_$key"}=$element;
    +00463     echo_debug('jrn.php',__LINE__," e_$key=$element;");
    +00464 
    +00465   }
    +00466   // Get Jrn's Prop
    +00467   $l_prop=GetJrnProp($p_dossier,$p_jrn);
    +00468 
    +00469   include_once("poste.php");
    +00470   if ( $l_prop == null ) return;
    +00471   $col_vide="<TD></TD>";
    +00472   echo '<TABLE ALIGN=CENTER BORDER=1 style="border-style:groove">';
    +00473   echo '<TR>';
    +00474   echo "<TD>". $l_prop['jrn_def_name']."(".$l_prop['jrn_def_code'].") </TD>";
    +00475   echo "<TD> Date : $e_op_date</TD>";
    +00476   echo "</TR>";
    +00477   echo "</TABLE>";
    +00478 
    +00479 
    +00480   echo "<table width=600 border=0>";
    +00481   echo "<TR><TD>operation $p_id</TD></TR>";
    +00482   for ($i = 0; $i < $p_MaxDeb;$i++) {
    +00483     //Deb
    +00484     if ( strlen(trim(${"e_mont_deb$i"})) > 0 && ${"e_mont_deb$i"} > 0 ) {
    +00485       $class=GetPosteLibelle($p_dossier,${"e_class_deb$i"});
    +00486 
    +00487       echo '<TR style="background-color:lightblue"><TD>'.${"e_class_deb$i"}."</TD>$col_vide<TD> $class </TD> <TD>".${"e_mont_deb$i"}."</TD>$col_vide</TR>";
    +00488     }
    +00489   }
    +00490 
    +00491   // Cred
    +00492   for ($i = 0; $i < $p_MaxCred;$i++) {
    +00493     if ( strlen(trim(${"e_mont_cred$i"})) > 0 && ${"e_mont_cred$i"} > 0 ) {
    +00494       $class=GetPosteLibelle($p_dossier,${"e_class_cred$i"});
    +00495       
    +00496       echo '<TR style="background-color:lightgreen;">'.$col_vide.'<TD>'.${"e_class_cred$i"}."</TD><TD> $class </TD>$col_vide <TD>".${"e_mont_cred$i"}."</TD></TR>";
    +00497     }
    +00498   }
    +00499   echo "<TR style=\"background-color:lightgray\">";
    +00500   echo $col_vide;
    +00501   echo $col_vide;
    +00502   echo "<TD align=\"center\"> Total</TD>";
    +00503   echo "<TD> $e_sum_deb</TD><TD> $e_sum_cred</TD>";
    +00504   echo "</TABLE>";
    +00505   // Bouton again
    +00506   echo '<table align="center">';
    +00507   echo '<TR><TD class="mtitle">';
    +00508   echo ' <A class="mtitle" HREF="enc_jrn.php?action=record&max_deb='.$l_prop['jrn_deb_max_line'].'&max_cred='.$l_prop['jrn_cred_max_line'].'&p_jrn='.$p_jrn.'"> Ajouter</A>';
    +00509   echo '</TD></TR></TABLE>';
    +00510 }
    +00523 function GetJrnProperty($p_cn,$p_jrn) 
    +00524 {
    +00525   $Res=ExecSql($p_cn,"select jrn_Def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_def_type, 
    +00526                    jrn_deb_max_line,jrn_cred_max_line,jrn_def_ech,jrn_def_ech_lib,jrn_def_code,
    +00527                    jrn_def_fiche_deb,jrn_def_fiche_deb
    +00528                    from jrn_Def 
    +00529                       where jrn_def_id=$p_jrn");
    +00530   $Count=pg_NumRows($Res);
    +00531   if ( $Count == 0 ) {
    +00532     echo '<DIV="redcontent"><H2 class="error"> Paramètres journaux non trouvés</H2> </DIV>';
    +00533     return null;
    +00534   }
    +00535   return pg_fetch_array($Res,0);
    +00536 }
    +00549 function GetJrnProp($p_dossier,$p_jrn,$is_connected=0) 
    +00550 {
    +00551   if ( $is_connected == 0 ) 
    +00552     $cn=DbConnect($p_dossier);
    +00553   else
    +00554     $cn=$p_dossier;
    +00555 
    +00556   $Res=ExecSql($cn,"select jrn_Def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_def_type, 
    +00557                    jrn_deb_max_line,jrn_cred_max_line,jrn_def_ech,jrn_def_ech_lib,jrn_def_code,
    +00558                    jrn_def_fiche_deb,jrn_def_fiche_deb
    +00559                    from jrn_Def 
    +00560                       where jrn_def_id=$p_jrn");
    +00561   $Count=pg_NumRows($Res);
    +00562   if ( $Count == 0 ) {
    +00563     echo '<DIV="redcontent"><H2 class="error"> Paramètres journaux non trouvés</H2> </DIV>';
    +00564     return null;
    +00565   }
    +00566   return pg_fetch_array($Res,0);
    +00567 }
    +00583 function ViewJrn($p_dossier,$p_user,$p_jrn,$p_url,$p_array=null) {
    +00584   echo_debug('jrn.php',__LINE__,"function ViewJrn($p_dossier,$p_user,$p_jrn,$p_array=null) ");
    +00585   echo JS_VIEW_JRN_DETAIL;
    +00586   $db=sprintf("dossier%d",$p_dossier);
    +00587   $l_prop=GetJrnProp($p_dossier,$p_jrn);
    +00588   echo "<H2 class=\"info\">".$l_prop['jrn_def_name']."( ".$l_prop['jrn_def_code'].")"."</H2>";
    +00589   $cn=DbConnect($p_dossier);
    +00590   if ( $p_array == null) {
    +00591     include_once("preference.php");
    +00592     $l_periode=GetUserPeriode($cn,$p_user);
    +00593     $Res=ExecSql($cn,"select jr_id,j_id,jr_internal,to_char(j_date,'DD.MM.YYYY') as j_date,
    +00594                        j_montant,j_poste,pcm_lib,j_grpt,j_debit,j_centralized,j_tech_per,
    +00595                        pcm_lib
    +00596                    from jrnx inner join tmp_pcmn on j_poste=pcm_val
    +00597                              inner join jrn on jr_grpt_id=j_grpt
    +00598                    where 
    +00599                    j_jrn_def=$p_jrn and j_tech_per=$l_periode
    +00600                    order by j_id,j_grpt,j_debit desc");
    +00601   } else {
    +00602     // Construction Query 
    +00603     foreach ( $p_array as $key=>$element) {
    +00604       ${"l_$key"}=$element;
    +00605       echo_debug ("l_$key $element");
    +00606     }
    +00607     $sql="select j_id,to_char(j_date,'DD.MM.YYYY') as j_date,j_montant,j_poste,
    +00608                  pcm_lib,j_grpt,jr_id,j_debit,j_centralized,j_tech_per,jr_internal
    +00609                    from jrnx inner join tmp_pcmn on j_poste=pcm_val
    +00610                         inner join jrn on jr_grpt_id=j_grpt
    +00611                    where 
    +00612                    j_jrn_def=$p_jrn";
    +00613     $l_and="and ";
    +00614     if ( ereg("^[0-9]+$", $l_s_montant) || ereg ("^[0-9]+\.[0-9]+$", $l_s_montant) ) {
    +00615     $sql.=" and jr_montant $l_mont_sel $l_s_montant";
     00616     }
    -00617     if ( isDate($l_date_end) != null ) {
    -00618       $sql.=$l_and." j_date <= to_date('".$l_date_end."','DD.MM.YYYY')";
    +00617     if ( isDate($l_date_start) != null ) {
    +00618       $sql.=$l_and." j_date >= to_date('".$l_date_start."','DD.MM.YYYY')";
     00619     }
    -00620     $l_s_comment=FormatString($l_s_comment);
    -00621     if ( $l_s_comment != null ) {
    -00622       $sql.=$l_and." upper(jr_comment) like upper('%".$l_s_comment."%') ";
    -00623     }
    -00624 
    -00625     $sql.=" order by j_id,j_grpt,j_debit desc";
    -00626     echo_debug ("search query is $sql");
    -00627     $Res=ExecSql($cn,$sql);
    -00628   }
    -00629   $MaxLine=pg_NumRows($Res);
    -00630   if ( $MaxLine == 0 ) return;
    -00631   $col_vide="<TD></TD>";
    -00632   echo '<TABLE ALIGN="center">';
    -00633   $l_id=0;
    -00634   for ( $i=0; $i < $MaxLine; $i++) {
    -00635     $l_line=pg_fetch_array($Res,$i);
    -00636     if ( $l_line['j_debit'] == 't' ) {
    -00637       echo '<TR style="background-color:lightblue;">';
    -00638     }
    -00639     else {
    -00640       echo '<TR>';
    +00620     if ( isDate($l_date_end) != null ) {
    +00621       $sql.=$l_and." j_date <= to_date('".$l_date_end."','DD.MM.YYYY')";
    +00622     }
    +00623     $l_s_comment=FormatString($l_s_comment);
    +00624     if ( $l_s_comment != null ) {
    +00625       $sql.=$l_and." upper(jr_comment) like upper('%".$l_s_comment."%') ";
    +00626     }
    +00627 
    +00628     $sql.=" order by j_id,j_grpt,j_debit desc";
    +00629     echo_debug ("search query is $sql");
    +00630     $Res=ExecSql($cn,$sql);
    +00631   }
    +00632   $MaxLine=pg_NumRows($Res);
    +00633   if ( $MaxLine == 0 ) return;
    +00634   $col_vide="<TD></TD>";
    +00635   echo '<TABLE ALIGN="center">';
    +00636   $l_id=0;
    +00637   for ( $i=0; $i < $MaxLine; $i++) {
    +00638     $l_line=pg_fetch_array($Res,$i);
    +00639     if ( $l_line['j_debit'] == 't' ) {
    +00640       echo '<TR style="background-color:lightblue;">';
     00641     }
    -00642     if ( $l_id == $l_line['j_grpt'] ) {
    -00643       echo $col_vide.$col_vide.$col_vide;
    -00644     } else {
    -00645       echo "<TD>";
    -00646       echo $l_line['j_date'];
    -00647       echo "</TD>";
    -00648       
    -00649       
    -00650           echo "<TD>";
    -00651           if ( isset ($_GET["PHPSESSID"])  ) {
    -00652             $sessid=$_GET["PHPSESSID"];
    -00653           } else {
    -00654             $sessid=$_POST["PHPSESSID"];
    -00655           }
    -00656 
    -00657           list($z_type,$z_num,$num_op)=split("-",$l_line['jr_internal']);
    -00658           printf ('<INPUT TYPE="BUTTON" VALUE="%s" onClick="viewDetail(\'%s\',\'%s\')">', 
    -00659                   $num_op,$l_line['j_grpt'],$sessid);
    -00660           //      echo $num_op;
    -00661           echo "</TD>";
    -00662 
    -00663 
    -00664           // no modification only cancel of wrong op.
    -00665           echo '<TD class="mlltitle">';
    -00666           echo "<A class=\"mtitle\" HREF=$p_url?action=update&line=".$l_line['jr_id'].">";
    -00667           echo "M";
    -00668           echo "</A></TD>";
    -00669       $l_id=$l_line['j_grpt'];
    -00670     }
    -00671     if ($l_line['j_debit']=='f')
    -00672       echo $col_vide;
    -00673     
    -00674     echo '<TD>';
    -00675     echo $l_line['j_poste'];
    -00676     echo '</TD>';
    -00677 
    -00678     echo '<TD>';
    -00679     echo $l_line['pcm_lib'];
    -00680     echo '</TD>';
    -00681     echo $col_vide;
    -00682 
    -00683     echo '<TD>';
    -00684     echo $l_line['j_montant'];
    -00685     echo '</TD>';
    -00686 
    -00687     if ( $l_line['j_debit']=='t')
    -00688       echo $col_vide;
    +00642     else {
    +00643       echo '<TR>';
    +00644     }
    +00645     if ( $l_id == $l_line['j_grpt'] ) {
    +00646       echo $col_vide.$col_vide.$col_vide;
    +00647     } else {
    +00648       echo "<TD>";
    +00649       echo $l_line['j_date'];
    +00650       echo "</TD>";
    +00651       
    +00652       
    +00653           echo "<TD>";
    +00654           if ( isset ($_GET["PHPSESSID"])  ) {
    +00655             $sessid=$_GET["PHPSESSID"];
    +00656           } else {
    +00657             $sessid=$_POST["PHPSESSID"];
    +00658           }
    +00659 
    +00660           list($z_type,$z_num,$num_op)=split("-",$l_line['jr_internal']);
    +00661           printf ('<INPUT TYPE="BUTTON" VALUE="%s" onClick="viewDetail(\'%s\',\'%s\')">', 
    +00662                   $num_op,$l_line['j_grpt'],$sessid);
    +00663           //      echo $num_op;
    +00664           echo "</TD>";
    +00665 
    +00666 
    +00667           // no modification only cancel of wrong op.
    +00668           echo '<TD class="mlltitle">';
    +00669           echo "<A class=\"mtitle\" HREF=$p_url?action=update&line=".$l_line['jr_id'].">";
    +00670           echo "M";
    +00671           echo "</A></TD>";
    +00672       $l_id=$l_line['j_grpt'];
    +00673     }
    +00674     if ($l_line['j_debit']=='f')
    +00675       echo $col_vide;
    +00676     
    +00677     echo '<TD>';
    +00678     echo $l_line['j_poste'];
    +00679     echo '</TD>';
    +00680 
    +00681     echo '<TD>';
    +00682     echo $l_line['pcm_lib'];
    +00683     echo '</TD>';
    +00684     echo $col_vide;
    +00685 
    +00686     echo '<TD>';
    +00687     echo $l_line['j_montant'];
    +00688     echo '</TD>';
     00689 
    -00690     echo "</TR>";
    -00691 
    +00690     if ( $l_line['j_debit']=='t')
    +00691       echo $col_vide;
     00692 
    -00693   }
    -00694   echo '</TABLE>';
    -00695 }
    -00696 /* function GetData
    -00697  * Purpose : Get data from jrnx where p_grpt=jrnx(j_grpt)
    -00698  * 
    -00699  * parm : 
    -00700  *      - connection
    -00701  *      - p_grpt
    -00702  * gen :
    -00703  *      - none
    -00704  * return:
    -00705  *      - return array
    -00706  *
    -00707  */ 
    -00708 function GetData ($p_cn,$p_grpt) {
    -00709   echo_debug('jrn.php',__LINE__,"GetData $p_cn $p_grpt");
    -00710   $Res=ExecSql($p_cn,"select 
    -00711                         to_char(j_date,'DD.MM.YYYY') as j_date,
    -00712                         j_text,
    -00713                         j_debit,
    -00714                         j_poste,
    -00715                         j_montant,
    -00716                         j_id,
    -00717                         jr_comment,
    -00718                         to_char(jr_ech,'DD.MM.YYYY') as jr_ech,
    -00719                         to_char(jr_date,'DD.MM.YYYY') as jr_date,
    -00720                         jr_id,jr_internal,jr_def_id
    -00721                      from jrnx inner join jrn on j_grpt=jr_grpt_id where j_grpt=$p_grpt");
    -00722   $MaxLine=pg_NumRows($Res);
    -00723   if ( $MaxLine == 0 ) return null;
    -00724   $deb=0;$cred=0;
    -00725   for ( $i=0; $i < $MaxLine; $i++) {
    -00726     
    -00727     $l_line=pg_fetch_array($Res,$i);
    -00728     $l_array['op_date']=$l_line['j_date'];
    -00729     if ( $l_line['j_debit'] == 't' ) {
    -00730       $l_class=sprintf("class_deb%d",$deb);
    -00731       $l_montant=sprintf("mont_deb%d",$deb);
    -00732       $l_text=sprintf("text_deb%d",$deb);
    -00733       $l_array[$l_class]=$l_line['j_poste'];
    -00734       $l_array[$l_montant]=$l_line['j_montant'];
    -00735       $l_array[$l_text]=$l_line['j_text'];
    -00736       $l_id=sprintf("op_deb%d",$deb);
    -00737       $l_array[$l_id]=$l_line['j_id'];
    -00738       $deb++;
    -00739     }
    -00740     if ( $l_line['j_debit'] == 'f' ) {
    -00741       $l_class=sprintf("class_cred%d",$cred);
    -00742       $l_montant=sprintf("mont_cred%d",$cred);
    -00743       $l_array[$l_class]=$l_line['j_poste'];
    -00744       $l_array[$l_montant]=$l_line['j_montant'];
    -00745       $l_id=sprintf("op_cred%d",$cred);
    -00746       $l_array[$l_id]=$l_line['j_id'];
    -00747       $l_text=sprintf("text_cred%d",$deb);
    -00748       $l_array[$l_text]=$l_line['j_text'];
    -00749 
    -00750       $cred++;
    -00751     }
    -00752     $l_array['jr_internal']=$l_line['jr_internal'];
    -00753     $l_array['comment']=$l_line['jr_comment'];
    -00754     $l_array['ech']=$l_line['jr_ech'];
    -00755     $l_array['jr_id']=$l_line['jr_id'];
    -00756     $l_array['jr_def_id']=$l_line['jr_def_id'];
    -00757    }
    -00758   return array($l_array,$deb,$cred);
    -00759 }
    -00760 /* function
    -00761  * Purpose :
    -00762  * 
    -00763  * parm : 
    -00764  *      - 
    -00765  * gen :
    -00766  *      -
    -00767  * return:
    -00768  *      -  -1 si aucune valeur de trouvée
    -00769  *
    -00770  */ 
    -00771 // function GetRapt($p_cn,$p_rappt) {
    -00772 
    -00773 //   $Res=ExecSql($p_cn,"select jr_id from jrn where jr_rapt='$p_rappt'");
    -00774 //   if ( pg_NumRows($Res) == 0 ) return -1;
    -00775 //   $l_line=pg_fetch_array($Res);
    -00776 //   return $l_line['jr_id'];
    -00777 // }
    -00778 /* function  GetInternal($p_cn,$p_id)
    -00779  * Purpose : Return the internal value
    -00780  * 
    -00781  * parm : 
    -00782  *      - p_cn database connection
    -00783  *      - p_id : jrn.jr_id
    -00784  * gen :
    -00785  *      - none
    -00786  * return:
    -00787  *      -  null si aucune valeur de trouvée
    -00788  *
    -00789  */ 
    -00790 function GetInternal($p_cn,$p_id) {
    -00791 
    -00792   $Res=ExecSql($p_cn,"select jr_internal from jrn where jr_id=$p_id");
    -00793   if ( pg_NumRows($Res) == 0 ) return null;
    -00794   $l_line=pg_fetch_array($Res);
    -00795   return $l_line['jr_internal'];
    -00796 }
    -00797 
    -00798 /* function GetAmount
    -00799  * Purpose : return the sum of jrn where
    -00800  *            the internal_code is the p_id
    -00801  * 
    -00802  * parm : 
    -00803  *      - $p_cn database connection
    -00804  *  - p_id = jrn.jr_internal
    -00805  * gen :
    -00806  *      -
    -00807  * return:
    -00808  *      - number
    -00809  *
    -00810  */ 
    -00811 function GetAmount($p_cn,$p_id) {
    -00812   $Res=ExecSql($p_cn,"select jr_montant from jrn where jr_internal='$p_id'");
    -00813   if (pg_NumRows($Res)==0) return -1;
    -00814   $l_line=pg_fetch_array($Res,0);
    -00815   return $l_line['jr_montant'];
    -00816 }
    -00817 /* function VerifData
    -00818  * Purpose : Verify the data before inserting or
    -00819  *           updating
    -00820  * 
    -00821  * parm : 
    -00822  *      - p_cn connection
    -00823  *      - p_array array with all the values
    -00824  *      - p_user
    -00825  * gen :
    -00826  *      - none
    -00827  * return:
    -00828  *      - errorcode or ok
    -00829  *
    -00830  */ 
    -00831 function VerifData($p_cn,$p_array,$p_user)
    -00832 {
    -00833   if ( ! isset ($p_cn) ||
    -00834        ! isset ($p_array)||
    -00835        ! isset ($p_user)||
    -00836        $p_array == null ){
    -00837     echo_error("JRN.PHP VerifData missing parameter");
    -00838     return BADPARM;
    -00839   }
    -00840   // Montre ce qu'on a encodé et demande vérif
    -00841   $next="";
    -00842   foreach ( $p_array as $name=>$element ) {
    -00843       echo_debug('jrn.php',__LINE__,"element $name -> $element ");
    -00844       // Sauve les données dans des variables
    -00845       ${"p_$name"}=$element;
    -00846     }
    -00847     // Verif Date
    -00848     if ( isDate($p_op_date) == null) {
    -00849       return BADDATE;
    -00850     }
    -00851     // userPref contient la periode par default
    -00852     $userPref=$p_user->GetPeriode();
    -00853     list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$userPref);
    -00854 
    -00855     // Date dans la periode active
    -00856     echo_debug ("date start periode $l_date_start date fin periode $l_date_end date demandée $p_op_date");
    -00857     if ( cmpDate($p_op_date,$l_date_start)<0 || 
    -00858          cmpDate($p_op_date,$l_date_end)>0 )
    -00859       {
    -00860         return NOTPERIODE;
    -00861       }
    -00862     // Periode fermée 
    -00863     if ( PeriodeClosed ($p_cn,$userPref)=='t' )
    -00864       {
    -00865         return PERIODCLOSED;
    -00866       }
    -00867     $l_mont=0;
    -00868     if ( ! isset ($p_ech) ) $p_ech="";
    -00869 
    -00870     if ($p_ech!='' && isDate ( $p_ech) == null ){
    -00871       return INVALID_ECH;
    -00872     }
    -00873 
    -00874     $tot_deb= 0;
    -00875     $tot_cred= 0;
    -00876     for ( $i = 0; $i < $p_MaxCred; $i++) {
    -00877       if ( isset ( ${"p_mont_cred$i"} ))
    -00878         $tot_cred+=${"p_mont_cred$i"};
    -00879     }
    -00880     for ( $i = 0; $i < $p_MaxDeb; $i++) {
    -00881       if ( isset ( ${"p_mont_deb$i"} ))
    -00882         $tot_deb+=${"p_mont_deb$i"};
    -00883     }
    -00884     echo_debug('jrn.php',__LINE__,"Amont =      $tot_deb $tot_cred");
    -00885     if ( round($tot_deb,2) != round($tot_cred,2) ) { 
    -00886       return DIFF_AMOUNT;
    -00887     }
    -00888 
    -00889     return NOERROR;
    -00890 
    -00891 }
    -00892 /* function GetJrnName
    -00893  * Purpose : Return the name of the jrn
    -00894  * 
    -00895  * parm : 
    -00896  *      - p_cn connexion resource
    -00897  *      - jrn id
    -00898  * gen :
    -00899  *      - none
    -00900  * return:
    -00901  *      - string or null if not found
    -00902  *
    -00903  */ 
    -00904 function GetJrnName($p_cn,$p_id) {
    -00905   $Res=ExecSql($p_cn,"select jrn_def_name from ".
    -00906                " jrn_def where jrn_def_id=".
    -00907                $p_id);
    -00908   $Max=pg_NumRows($Res);
    -00909   if ($Max==0) return null;
    -00910   $ret=pg_fetch_array($Res,0);
    -00911   return $ret['jrn_def_name'];
    -00912 }
    -00913 /* function NextJrn
    -00914  * Purpose :
    -00915  *         Get the number of the next jrn
    -00916  *         from the jrn_def.jrn_code
    -00917  * 
    -00918  * parm : 
    -00919  *      - $p_cn connection
    -00920  *      - $p_type jrn type
    -00921  * gen :
    -00922  *      - none
    -00923  * return:
    -00924  *      - string containing the next code
    -00925  *
    -00926  */ 
    -00927 function NextJrn($p_cn,$p_type)
    -00928 {
    -00929   $Ret=CountSql($p_cn,"select * from jrn_def where jrn_def_type='".$p_type."'");
    -00930   return $Ret+1; 
    -00931 }
    -00932 /* function     SetInternalCode
    -00933  * Purpose :
    -00934  * 
    -00935  * parm : 
    -00936  *      - $p_cn connection
    -00937  *      - $p_grpt id in jr_grpt_id
    -00938  *      - $p_jrn jrn id jrn_def_id
    -00939  *      - $p_dossier dossier id
    -00940  * gen :
    -00941  *      -
    -00942  * return:
    -00943  *      -
    -00944  *
    -00945  */ 
    -00946 function SetInternalCode($p_cn,$p_grpt,$p_jrn)
    -00947 {
    -00948   //$num=CountSql($p_cn,"select * from jrn where jr_def_id=$p_jrn and jr_internal != 'ANNULE'")+1;
    -00949   $num = NextSequence($p_cn,'s_internal');
    -00950   $num=strtoupper(hexdec($num));
    -00951   $atype=GetJrnProperty($p_cn,$p_jrn);
    -00952   $type=$atype['jrn_def_code'];
    -00953   $internal_code=sprintf("%d%s-%s",$_SESSION['g_dossier'],$type,$num);
    -00954   $Res=ExecSql($p_cn,"update jrn set jr_internal='".$internal_code."' where ".
    -00955                " jr_grpt_id = ".$p_grpt);
    -00956   return $internal_code;
    -00957 }
    -00958 /* function GetDataJrnJrid
    -00959  * Purpose : Get data from jrn and jrnx thanks the jr_id
    -00960  * 
    -00961  * parm : 
    -00962  *      - connection
    -00963  *      - p_jr_id (jrn.jr_id)
    -00964  * gen :
    -00965  *      - none
    -00966  * return:
    -00967  *      - return array
    -00968  *
    -00969  */ 
    -00970 function GetDataJrnJrId ($p_cn,$p_jr_id) {
    -00971   echo_debug('jrn.php',__LINE__,"GetDataJrn $p_cn $p_jr_id");
    -00972   $Res=ExecSql($p_cn,"select 
    -00973                         j_text,
    -00974                         j_debit,
    -00975                         j_poste,
    -00976                        pcm_lib as vw_name,
    -00977                         j_montant,
    -00978                         jr_montant,
    -00979                         j_id,
    -00980                         jr_pj_name,
    -00981                         jr_grpt_id,
    -00982                         jr_comment,
    -00983                         to_char(jr_ech,'DD.MM.YYYY') as jr_ech,
    -00984                         to_char(jr_date,'DD.MM.YYYY') as jr_date,
    -00985                         jr_id,jr_internal, jr_rapt,jrn_def_type
    -00986                      from 
    -00987                           jrnx 
    -00988                         inner join jrn on j_grpt=jr_grpt_id 
    -00989                         inner join jrn_def on jrn_def.jrn_def_id=jrn.jr_def_id
    -00990                         left outer join tmp_pcmn on  j_poste=pcm_val
    -00991                       where 
    -00992                          jr_id=$p_jr_id 
    -00993                       order by j_debit desc");
    -00994   $MaxLine=pg_NumRows($Res);
    -00995   echo_debug('jrn.php',__LINE__,"Found $MaxLine lines");
    -00996   if ( $MaxLine == 0 ) return null;
    -00997 
    -00998   for ( $i=0; $i < $MaxLine; $i++) {
    -00999     $line=pg_fetch_array($Res,$i);
    -01000     $array['j_debit']=$line['j_debit'];
    -01001     $array['vw_name']=$line['vw_name'];
    -01002     $array['jr_comment']=$line['jr_comment'];
    -01003     $array['j_montant']=$line['j_montant'];
    -01004     $array['jr_id']=$line['jr_id'];
    -01005     $array['jr_date']=$line['jr_date'];
    -01006     $array['jr_internal']=$line['jr_internal'];
    -01007     $array['j_poste']=$line['j_poste'];
    -01008     $array['jr_montant']=$line['jr_montant'];
    -01009     $array['jr_rapt']=$line['jr_rapt'];
    -01010     $array['jrn_def_type']=$line['jrn_def_type'];
    -01011     $array['jr_grpt_id']=$line['jr_grpt_id'];
    -01012     $array['jr_pj_name']=$line['jr_pj_name'];
    -01013     //    $array['']=$line[''];
    -01014 
    -01015     $ret_array[$i]=$array;
    -01016     }
    -01017   return $ret_array;
    -01018 }
    -01019 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00693 echo "</TR>"; +00694 +00695 +00696 } +00697 echo '</TABLE>'; +00698 } +00711 function GetData ($p_cn,$p_grpt) { +00712 echo_debug('jrn.php',__LINE__,"GetData $p_cn $p_grpt"); +00713 $Res=ExecSql($p_cn,"select +00714 to_char(j_date,'DD.MM.YYYY') as j_date, +00715 j_text, +00716 j_debit, +00717 j_poste, +00718 j_montant, +00719 j_id, +00720 jr_comment, +00721 to_char(jr_ech,'DD.MM.YYYY') as jr_ech, +00722 to_char(jr_date,'DD.MM.YYYY') as jr_date, +00723 jr_id,jr_internal,jr_def_id +00724 from jrnx inner join jrn on j_grpt=jr_grpt_id where j_grpt=$p_grpt"); +00725 $MaxLine=pg_NumRows($Res); +00726 if ( $MaxLine == 0 ) return null; +00727 $deb=0;$cred=0; +00728 for ( $i=0; $i < $MaxLine; $i++) { +00729 +00730 $l_line=pg_fetch_array($Res,$i); +00731 $l_array['op_date']=$l_line['j_date']; +00732 if ( $l_line['j_debit'] == 't' ) { +00733 $l_class=sprintf("class_deb%d",$deb); +00734 $l_montant=sprintf("mont_deb%d",$deb); +00735 $l_text=sprintf("text_deb%d",$deb); +00736 $l_array[$l_class]=$l_line['j_poste']; +00737 $l_array[$l_montant]=$l_line['j_montant']; +00738 $l_array[$l_text]=$l_line['j_text']; +00739 $l_id=sprintf("op_deb%d",$deb); +00740 $l_array[$l_id]=$l_line['j_id']; +00741 $deb++; +00742 } +00743 if ( $l_line['j_debit'] == 'f' ) { +00744 $l_class=sprintf("class_cred%d",$cred); +00745 $l_montant=sprintf("mont_cred%d",$cred); +00746 $l_array[$l_class]=$l_line['j_poste']; +00747 $l_array[$l_montant]=$l_line['j_montant']; +00748 $l_id=sprintf("op_cred%d",$cred); +00749 $l_array[$l_id]=$l_line['j_id']; +00750 $l_text=sprintf("text_cred%d",$deb); +00751 $l_array[$l_text]=$l_line['j_text']; +00752 +00753 $cred++; +00754 } +00755 $l_array['jr_internal']=$l_line['jr_internal']; +00756 $l_array['comment']=$l_line['jr_comment']; +00757 $l_array['ech']=$l_line['jr_ech']; +00758 $l_array['jr_id']=$l_line['jr_id']; +00759 $l_array['jr_def_id']=$l_line['jr_def_id']; +00760 } +00761 return array($l_array,$deb,$cred); +00762 } +00774 // function GetRapt($p_cn,$p_rappt) { +00775 +00776 // $Res=ExecSql($p_cn,"select jr_id from jrn where jr_rapt='$p_rappt'"); +00777 // if ( pg_NumRows($Res) == 0 ) return -1; +00778 // $l_line=pg_fetch_array($Res); +00779 // return $l_line['jr_id']; +00780 // } +00793 function GetInternal($p_cn,$p_id) { +00794 +00795 $Res=ExecSql($p_cn,"select jr_internal from jrn where jr_id=$p_id"); +00796 if ( pg_NumRows($Res) == 0 ) return null; +00797 $l_line=pg_fetch_array($Res); +00798 return $l_line['jr_internal']; +00799 } +00800 +00814 function GetAmount($p_cn,$p_id) { +00815 $Res=ExecSql($p_cn,"select jr_montant from jrn where jr_internal='$p_id'"); +00816 if (pg_NumRows($Res)==0) return -1; +00817 $l_line=pg_fetch_array($Res,0); +00818 return $l_line['jr_montant']; +00819 } +00834 function VerifData($p_cn,$p_array,$p_user) +00835 { +00836 if ( ! isset ($p_cn) || +00837 ! isset ($p_array)|| +00838 ! isset ($p_user)|| +00839 $p_array == null ){ +00840 echo_error("JRN.PHP VerifData missing parameter"); +00841 return BADPARM; +00842 } +00843 // Montre ce qu'on a encodé et demande vérif +00844 $next=""; +00845 foreach ( $p_array as $name=>$element ) { +00846 echo_debug('jrn.php',__LINE__,"element $name -> $element "); +00847 // Sauve les données dans des variables +00848 ${"p_$name"}=$element; +00849 } +00850 // Verif Date +00851 if ( isDate($p_op_date) == null) { +00852 return BADDATE; +00853 } +00854 // userPref contient la periode par default +00855 $userPref=$p_user->GetPeriode(); +00856 list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$userPref); +00857 +00858 // Date dans la periode active +00859 echo_debug ("date start periode $l_date_start date fin periode $l_date_end date demandée $p_op_date"); +00860 if ( cmpDate($p_op_date,$l_date_start)<0 || +00861 cmpDate($p_op_date,$l_date_end)>0 ) +00862 { +00863 return NOTPERIODE; +00864 } +00865 // Periode fermée +00866 if ( PeriodeClosed ($p_cn,$userPref)=='t' ) +00867 { +00868 return PERIODCLOSED; +00869 } +00870 $l_mont=0; +00871 if ( ! isset ($p_ech) ) $p_ech=""; +00872 +00873 if ($p_ech!='' && isDate ( $p_ech) == null ){ +00874 return INVALID_ECH; +00875 } +00876 +00877 $tot_deb= 0; +00878 $tot_cred= 0; +00879 for ( $i = 0; $i < $p_MaxCred; $i++) { +00880 if ( isset ( ${"p_mont_cred$i"} )) +00881 $tot_cred+=${"p_mont_cred$i"}; +00882 } +00883 for ( $i = 0; $i < $p_MaxDeb; $i++) { +00884 if ( isset ( ${"p_mont_deb$i"} )) +00885 $tot_deb+=${"p_mont_deb$i"}; +00886 } +00887 echo_debug('jrn.php',__LINE__,"Amont = $tot_deb $tot_cred"); +00888 if ( round($tot_deb,2) != round($tot_cred,2) ) { +00889 return DIFF_AMOUNT; +00890 } +00891 +00892 return NOERROR; +00893 +00894 } +00907 function GetJrnName($p_cn,$p_id) { +00908 $Res=ExecSql($p_cn,"select jrn_def_name from ". +00909 " jrn_def where jrn_def_id=". +00910 $p_id); +00911 $Max=pg_NumRows($Res); +00912 if ($Max==0) return null; +00913 $ret=pg_fetch_array($Res,0); +00914 return $ret['jrn_def_name']; +00915 } +00930 function NextJrn($p_cn,$p_type) +00931 { +00932 $Ret=CountSql($p_cn,"select * from jrn_def where jrn_def_type='".$p_type."'"); +00933 return $Ret+1; +00934 } +00949 function SetInternalCode($p_cn,$p_grpt,$p_jrn) +00950 { +00951 //$num=CountSql($p_cn,"select * from jrn where jr_def_id=$p_jrn and jr_internal != 'ANNULE'")+1; +00952 $num = NextSequence($p_cn,'s_internal'); +00953 $num=strtoupper(hexdec($num)); +00954 $atype=GetJrnProperty($p_cn,$p_jrn); +00955 $type=$atype['jrn_def_code']; +00956 $internal_code=sprintf("%d%s-%s",$_SESSION['g_dossier'],$type,$num); +00957 $Res=ExecSql($p_cn,"update jrn set jr_internal='".$internal_code."' where ". +00958 " jr_grpt_id = ".$p_grpt); +00959 return $internal_code; +00960 } +00973 function GetDataJrnJrId ($p_cn,$p_jr_id) { +00974 echo_debug('jrn.php',__LINE__,"GetDataJrn $p_cn $p_jr_id"); +00975 $Res=ExecSql($p_cn,"select +00976 j_text, +00977 j_debit, +00978 j_poste, +00979 pcm_lib as vw_name, +00980 j_montant, +00981 jr_montant, +00982 j_id, +00983 jr_pj_name, +00984 jr_grpt_id, +00985 jr_comment, +00986 to_char(jr_ech,'DD.MM.YYYY') as jr_ech, +00987 to_char(jr_date,'DD.MM.YYYY') as jr_date, +00988 jr_id,jr_internal, jr_rapt,jrn_def_type +00989 from +00990 jrnx +00991 inner join jrn on j_grpt=jr_grpt_id +00992 inner join jrn_def on jrn_def.jrn_def_id=jrn.jr_def_id +00993 left outer join tmp_pcmn on j_poste=pcm_val +00994 where +00995 jr_id=$p_jr_id +00996 order by j_debit desc"); +00997 $MaxLine=pg_NumRows($Res); +00998 echo_debug('jrn.php',__LINE__,"Found $MaxLine lines"); +00999 if ( $MaxLine == 0 ) return null; +01000 +01001 for ( $i=0; $i < $MaxLine; $i++) { +01002 $line=pg_fetch_array($Res,$i); +01003 $array['j_debit']=$line['j_debit']; +01004 $array['vw_name']=$line['vw_name']; +01005 $array['jr_comment']=$line['jr_comment']; +01006 $array['j_montant']=$line['j_montant']; +01007 $array['jr_id']=$line['jr_id']; +01008 $array['jr_date']=$line['jr_date']; +01009 $array['jr_internal']=$line['jr_internal']; +01010 $array['j_poste']=$line['j_poste']; +01011 $array['jr_montant']=$line['jr_montant']; +01012 $array['jr_rapt']=$line['jr_rapt']; +01013 $array['jrn_def_type']=$line['jrn_def_type']; +01014 $array['jr_grpt_id']=$line['jr_grpt_id']; +01015 $array['jr_pj_name']=$line['jr_pj_name']; +01016 // $array['']=$line['']; +01017 +01018 $ret_array[$i]=$array; +01019 } +01020 return $ret_array; +01021 } +01022 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn_8php.html b/doc/developper/html/jrn_8php.html index 9859fb749..ad6daf9d8 100644 --- a/doc/developper/html/jrn_8php.html +++ b/doc/developper/html/jrn_8php.html @@ -4,48 +4,80 @@ - + -

    jrn.php File Reference

    +

    jrn.php File Reference

    work with the ledger More... +

    +

    Go to the source code of this file. + + + + + + + + + + + + + + + +

    Functions

     RecordJrn ($p_dossier, $p_user, $p_jrn, $p_MaxDeb, $p_MaxCred, $p_array=null, $p_update=0)
     Record an entry in the selected journal.
     UpdateJrn ($p_cn, $p_jr_id)
     Display the form to UPDATE account operation.
     ViewRec ($p_array=null)
     debug function to be dropped
     CorrectRecord ($p_dossier, $p_user, $p_jrn, $p_MaxDeb, $p_MaxCred, $p_array)
     Call the RecordJrn. In fact does nothing.
     ViewRecord ($p_dossier, $p_jrn, $p_id, $p_MaxDeb, $p_MaxCred, $p_array)
     View the added operation.
     GetJrnProperty ($p_cn, $p_jrn)
     Get the properties of a journal.
     GetJrnProp ($p_dossier, $p_jrn, $is_connected=0)
     Get the properties of a journal.
     ViewJrn ($p_dossier, $p_user, $p_jrn, $p_url, $p_array=null)
     Vue des écritures comptables.
     GetData ($p_cn, $p_grpt)
     Get data from jrnx where p_grpt=jrnx(j_grpt).
     GetInternal ($p_cn, $p_id)
     parm :
      +
    • gen :
    • return:
    • -1 si aucune valeur de trouvéeReturn the internal value
    +
     GetAmount ($p_cn, $p_id)
     return the sum of jrn where the internal_code is the p_id
     VerifData ($p_cn, $p_array, $p_user)
     Verify the data before inserting or updating.
     GetJrnName ($p_cn, $p_id)
     Return the name of the jrn.
     NextJrn ($p_cn, $p_type)
     Get the number of the next jrn from the jrn_def.jrn_code.
     SetInternalCode ($p_cn, $p_grpt, $p_jrn)
     parm :
      +
    • $p_cn connection
    +

    +$p_grpt id in jr_grpt_id

      +
    • $p_jrn jrn id jrn_def_id
    • $p_dossier dossier id gen :
        +
      • return:
      +
    +
     GetDataJrnJrId ($p_cn, $p_jr_id)
     Get data from jrn and jrnx thanks the jr_id.
    -


    Function Documentation

    +

    Detailed Description

    +work with the ledger +

    + +

    +Definition in file jrn.php.


    Function Documentation

    @@ -104,11 +136,15 @@ +References RecordJrn().

    +Call the RecordJrn. In fact does nothing. +

    +parm :

      +
    • the same as RecordJrn gen :
    • none return:
    • none

    -Definition at line 433 of file jrn.php. +Definition at line 436 of file jrn.php.

    -References RecordJrn().

    @@ -145,11 +181,18 @@ References RecordJrn().

    +return the sum of jrn where the internal_code is the p_id +

    +parm :

      +
    • $p_cn database connection
    +

    +p_id = jrn.jr_internal gen :

      +
    • return:
    • number

    -Definition at line 811 of file jrn.php. +Definition at line 814 of file jrn.php.

    -References $l_line, $Res, and ExecSql(). +References $l_line, $Res, and ExecSql().

    @@ -186,11 +229,18 @@ References $l_line,

    +Get data from jrnx where p_grpt=jrnx(j_grpt). +

    +parm :

      +
    • connection
    +

    +p_grpt gen :

      +
    • none return:
    • return array

    -Definition at line 708 of file jrn.php. +Definition at line 711 of file jrn.php.

    -References $l_id, $l_line, $MaxLine, $Res, echo_debug(), and ExecSql(). +References $l_id, $l_line, $MaxLine, $Res, echo_debug(), and ExecSql().

    @@ -227,13 +277,20 @@ References $l_id, <

    +Get data from jrn and jrnx thanks the jr_id. +

    +parm :

      +
    • connection
    +

    +p_jr_id (jrn.jr_id) gen :

      +
    • none return:
    • return array

    -Definition at line 970 of file jrn.php. +Definition at line 973 of file jrn.php.

    -References $array, $i, $MaxLine, $Res, echo_debug(), and ExecSql(). +References $array, $i, $MaxLine, $Res, echo_debug(), and ExecSql().

    -Referenced by UpdateJrn(). +Referenced by UpdateJrn().

    @@ -270,13 +327,22 @@ Referenced by UpdateJrn().

    +parm :

      +
    • gen :
    • return:
    • -1 si aucune valeur de trouvéeReturn the internal value

    -Definition at line 790 of file jrn.php. +parm :

      +
    • p_cn database connection

    -References $l_line, $Res, and ExecSql(). +p_id : jrn.jr_id gen :

      +
    • none return:
    • null si aucune valeur de trouvée
    +

    -Referenced by ListJrn(), and UpdateJrn(). +Definition at line 793 of file jrn.php. +

    +References $l_line, $Res, and ExecSql(). +

    +Referenced by ListJrn(), and UpdateJrn().

    @@ -313,11 +379,18 @@ Referenced by ListJrn(

    +Return the name of the jrn. +

    +parm :

    +

    +jrn id gen :

      +
    • none return:
    • string or null if not found

    -Definition at line 904 of file jrn.php. +Definition at line 907 of file jrn.php.

    -References $Max, $Res, $ret, and ExecSql(). +References $Max, $Res, $ret, and ExecSql().

    @@ -360,13 +433,20 @@ References $Max,

    +Get the properties of a journal. +

    +parm :

    +

    +p_jrn the jrn id gen :

      +
    • none return:
    • an array containing properties

    -Definition at line 546 of file jrn.php. +Definition at line 549 of file jrn.php.

    -References $cn, $Res, DbConnect(), and ExecSql(). +References $cn, $Res, DbConnect(), and ExecSql().

    -Referenced by ListJrn(), ViewJrn(), and ViewRecord(). +Referenced by ListJrn(), ViewJrn(), and ViewRecord().

    @@ -403,13 +483,20 @@ Referenced by ListJrn(

    +Get the properties of a journal. +

    +parm :

    +

    +p_jrn the jrn id gen :

      +
    • none return:
    • an array containing properties

    -Definition at line 520 of file jrn.php. +Definition at line 523 of file jrn.php.

    -References $Res, and ExecSql(). +References $Res, and ExecSql().

    -Referenced by FormODS(), RecordJrn(), and SetInternalCode(). +Referenced by FormODS(), RecordJrn(), and SetInternalCode().

    @@ -446,11 +533,18 @@ Referenced by FormO

    +Get the number of the next jrn from the jrn_def.jrn_code. +

    +parm :

    +

    +$p_type jrn type gen :

      +
    • none return:
    • string containing the next code

    -Definition at line 927 of file jrn.php. +Definition at line 930 of file jrn.php.

    -References $Ret, and CountSql(). +References $Ret, and CountSql().

    @@ -517,13 +611,22 @@ References $Ret, a

    +Record an entry in the selected journal. +

    +parm :

      +
    • p_dossier dossier id
    +

    +p_user user id

      +
    • p_jrn selected journal gen :
        +
      • none return:
      • none
      +

    -Definition at line 35 of file jrn.php. +Definition at line 38 of file jrn.php.

    -References $a, $cn, $e, $l2_line, $l_line, $poste, $Res, $search, $sessid, $Sql, DbConnect(), echo_debug(), ExecSql(), GetJrnProperty(), GetPeriode(), METHOD, name, selected, and value. +References $a, $cn, $e, $l2_line, $l_line, $poste, $Res, $search, $sessid, $Sql, DbConnect(), echo_debug(), ExecSql(), GetJrnProperty(), GetPeriode(), METHOD, name, selected, and value.

    -Referenced by CorrectRecord(). +Referenced by CorrectRecord().

    @@ -566,13 +669,22 @@ Referenced by CorrectRecord()

    +parm :

    +

    +$p_grpt id in jr_grpt_id

      +
    • $p_jrn jrn id jrn_def_id
    • $p_dossier dossier id gen :
        +
      • return:
      +

    -Definition at line 946 of file jrn.php. +

    -References $num, $Res, ExecSql(), GetJrnProperty(), and NextSequence(). +Definition at line 949 of file jrn.php.

    -Referenced by RecordFin(), RecordInvoice(), RecordSell(), and TransferCSV(). +References $num, $Res, ExecSql(), GetJrnProperty(), and NextSequence(). +

    +Referenced by RecordFin(), RecordInvoice(), RecordSell(), and TransferCSV().

    @@ -609,11 +721,20 @@ Referenced by Recor

    +Display the form to UPDATE account operation. +

    +parm :

    +

    +p_jrn

      +
    • p_MaxDeb number of debit line
    • p_MaxCred " " credit " " - p_array array containing the others datas gen :
        +
      • none return:
      • none
      +

    -Definition at line 279 of file jrn.php. +Definition at line 282 of file jrn.php.

    -References $a, $check, $col_vide, $file, $i, $r, $search, $sessid, echo_debug(), echo_error(), GetConcerned(), GetDataJrnJrId(), GetGrpt(), GetInternal(), name, return, and value. +References $a, $check, $col_vide, $file, $i, $r, $search, $sessid, echo_debug(), echo_error(), GetConcerned(), GetDataJrnJrId(), GetGrpt(), GetInternal(), name, return, and value.

    @@ -656,11 +777,20 @@ References $a,

    +Verify the data before inserting or updating. +

    +parm :

    +

    +p_array array with all the values

      +
    • p_user gen :
        +
      • none return:
      • errorcode or ok
      +

    -Definition at line 831 of file jrn.php. +Definition at line 834 of file jrn.php.

    -References cmpDate(), echo_debug(), echo_error(), GetPeriode(), isDate(), name, and PeriodeClosed(). +References cmpDate(), echo_debug(), echo_error(), GetPeriode(), isDate(), name, and PeriodeClosed().

    @@ -715,11 +845,20 @@ References cmpDate()

    +Vue des écritures comptables. +

    +parm :

      +
    • p_dossier,
    +

    +p_user,

      +
    • p_jrn
    • p_url for modif
    • array gen :
        +
      • return:
      +

    -Definition at line 580 of file jrn.php. +Definition at line 583 of file jrn.php.

    -References $cn, $col_vide, $db, $l_id, $l_line, $MaxLine, $Res, $sessid, $sql, DbConnect(), echo_debug(), ExecSql(), FormatString(), GetJrnProp(), and isDate(). +References $cn, $col_vide, $db, $l_id, $l_line, $MaxLine, $Res, $sessid, $sql, DbConnect(), echo_debug(), ExecSql(), FormatString(), GetJrnProp(), and isDate().

    @@ -747,11 +886,15 @@ References $cn,

    +debug function to be dropped +

    +parm :

      +
    • gen :
    • return:

    -Definition at line 412 of file jrn.php. +Definition at line 415 of file jrn.php.

    -References echo_debug(). +References echo_debug().

    @@ -812,14 +955,23 @@ References echo_debug().

    +View the added operation. +

    +parm :

      +
    • p_dossier
    +

    +p_jrn

      +
    • p_id
    • p_MaxDeb
    • p_MaxCred
    • p_array gen :
        +
      • none return:
      • none
      +

    -Definition at line 454 of file jrn.php. +Definition at line 457 of file jrn.php.

    -References $col_vide, echo_debug(), GetJrnProp(), GetPosteLibelle(), and table. +References $col_vide, echo_debug(), GetJrnProp(), GetPosteLibelle(), and table. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__add_8php-source.html b/doc/developper/html/jrn__add_8php-source.html index 70137ba42..97cc56543 100644 --- a/doc/developper/html/jrn__add_8php-source.html +++ b/doc/developper/html/jrn__add_8php-source.html @@ -4,7 +4,7 @@ - +

    jrn_add.php

    Go to the documentation of this file.
    00001 <?
    @@ -28,187 +28,187 @@
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00021 /* $Revision$ */
    -00022 include_once ("ac_common.php");
    -00023 include_once("jrn.php");
    -00024 html_page_start($_SESSION['g_theme']);
    -00025 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00026   echo "You must choose a Dossier ";
    -00027   exit -2;
    -00028 }
    -00029 include_once ("postgres.php");
    -00030 /* Admin. Dossier */
    -00031 $rep=DbConnect();
    -00032 include_once ("class_user.php");
    -00033 $User=new cl_user($rep);
    -00034 $User->Check();
    -00035 include_once("check_priv.php");
    -00036 include_once ("user_menu.php");
    -00037 
    -00038 echo '<div class="u_tmenu">';
    -00039 echo ShowMenuCompta($_SESSION['g_dossier']);
    -00040 echo '</div>';
    +00026 include_once ("ac_common.php");
    +00027 include_once("jrn.php");
    +00028 html_page_start($_SESSION['g_theme']);
    +00029 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00030   echo "You must choose a Dossier ";
    +00031   exit -2;
    +00032 }
    +00033 include_once ("postgres.php");
    +00034 /* Admin. Dossier */
    +00035 $rep=DbConnect();
    +00036 include_once ("class_user.php");
    +00037 $User=new cl_user($rep);
    +00038 $User->Check();
    +00039 include_once("check_priv.php");
    +00040 include_once ("user_menu.php");
     00041 
    -00042 
    -00043 
    -00044 $cn=DbConnect($_SESSION['g_dossier']);
    -00045 if ($User->CheckAction($cn,GJRN) == 0 ){
    -00046   /* Cannot Access */
    -00047   NoAccess();
    -00048   exit -1;                      
    -00049   
    -00050  }
    -00051 
    -00052 echo JS_SEARCH_POSTE;
    -00053 
    -00054 If ( isset ($_POST["JRN_ADD"]) ) {
    -00055   if (  !isset($_POST["p_jrn_name"]) || ! isset($_POST["p_jrn_type"] )) {
    -00056     echo '<H2 CLASS="error"> Un paramètre manque</H2>';
    -00057   }
    -00058   else {
    -00059     if ( $_POST['p_ech'] == 'no' ) {
    -00060       $p_ech='false';
    -00061       $p_ech_lib='null';
    -00062     } else {
    -00063       $p_ech='true';
    -00064       $p_ech_lib="'".$_POST['p_ech_lib']."'";
    -00065     }
    -00066       if (strlen(trim($_POST['p_jrn_deb_max_line'])) == 0 || 
    -00067           (string) (int)$_POST['p_jrn_deb_max_line'] != (string)$_POST['p_jrn_deb_max_line'] )
    -00068       $l_deb_max_line=1;
    -00069     else
    -00070       $l_deb_max_line=$_POST['p_jrn_deb_max_line'];
    -00071 
    -00072      if (  strlen(trim($_POST['p_jrn_cred_max_line'])) == 0 ||
    -00073            (string) (int)$_POST['p_jrn_cred_max_line'] != (string)$_POST['p_jrn_cred_max_line'] )
    -00074       $l_cred_max_line=1;
    -00075     else
    -00076       $l_cred_max_line=$_POST['p_jrn_cred_max_line'];
    -00077      $p_jrn_name=$_POST["p_jrn_name"];
    -00078 echo_debug('jrn_add.php',__LINE__,"nom journal $p_jrn_name");
    -00079      $p_jrn_class_deb=FormatString($_POST["p_jrn_class_deb"]);
    -00080      if (strlen(trim($p_jrn_name))==0) return;
    -00081      $p_jrn_name=FormatString($p_jrn_name);
    -00082      $p_jrn_class_cred=FormatString($_POST["p_jrn_class_cred"]);
    -00083      // compute the jrn_def.jrn_def_code
    -00084      $p_code=sprintf("%s-%02d",trim($_POST['p_jrn_type']),NextJrn($cn,$_POST['p_jrn_type']));
    -00085        $p_jrn_fiche_deb="";
    -00086        $p_jrn_fiche_cred="";
    -00087 
    -00088      if ( isset    ($_POST["FICHEDEB"])) {
    -00089        $p_jrn_fiche_deb=join(",",$_POST["FICHEDEB"]);
    -00090      }
    -00091       if ( isset    ($_POST["FICHECRED"])) {
    -00092        $p_jrn_fiche_cred=join(",",$_POST["FICHECRED"]);
    -00093       }
    -00094 
    -00095     $Sql=sprintf("insert into jrn_def(jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_deb_max_line,jrn_cred_max_line,
    -00096                   jrn_def_type,jrn_def_fiche_deb,jrn_def_fiche_cred,jrn_def_code) 
    -00097                   values ('%s','%s','%s',%s,%s,'%s','%s','%s','%s')",
    -00098                  $p_jrn_name,$p_jrn_class_deb,$p_jrn_class_cred,
    -00099                  $l_deb_max_line,$l_cred_max_line,$_POST['p_jrn_type'],
    -00100                  $p_jrn_fiche_deb,$p_jrn_fiche_cred,
    -00101                  $p_code
    -00102                  );
    -00103     echo_debug($Sql);
    -00104     $Res=ExecSql($cn,$Sql);
    -00105   }
    -00106 }
    -00107 echo ShowMenuAdvanced();
    -00108 echo '<div class="lmenu">';
    -00109 MenuJrn($_SESSION['g_dossier']);
    -00110 echo '</div>';
    -00111 
    -00112 $sessid=$_REQUEST['PHPSESSID'];
    -00113 $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$sessid."','not')\">";
    -00114 
    -00115 echo '<DIV CLASS="u_redcontent">';
    -00116 echo '<FORM ACTION="jrn_add.php" METHOD="POST">';
    -00117 echo '<INPUT TYPE="HIDDEN" NAME="JRN_ADD">';
    -00118 echo '<TABLE>';
    -00119 
    -00120 echo '<TR>'; 
    -00121 echo '<TD> Nom journal </TD>';
    -00122 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_name"></TD>';
    -00123 echo '</TR>';
    -00124 
    -00125 echo '<TR>'; 
    -00126 echo '<TD> Postes utilisables journal (débit) </TD>';
    -00127 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_class_deb">'.$search.'</TD>';
    -00128 echo '</TR>';
    -00129 
    -00130 echo '<TR>'; 
    -00131 echo '<TD> Nombre de lignes par défaut (débit) </TD>';
    -00132 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_deb_max_line" ></TD>';
    -00133 echo '</TR>';
    -00134 
    -00135 echo '<TR>'; 
    -00136 echo '<TD> Postes utilisables journal (crédit) </TD>';
    -00137 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_class_cred">'.$search.'</TD>';
    -00138 echo '</TR>';
    -00139 
    -00140 
    -00141 echo '<TR>'; 
    -00142 echo '<TD> Nombre de lignes par défaut (crédit) </TD>';
    -00143 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_cred_max_line"></TD>';
    -00144 echo '</TR>';
    -00145 
    -00146 echo '<TR>'; 
    -00147 echo '<TD> Date d\'échéance </TD>';
    -00148 echo '<TD> <INPUT TYPE="radio" NAME="p_ech" VALUE="yes" >Oui';
    -00149 echo '<INPUT TYPE="radio" NAME="p_ech" VALUE="no" CHECKED>Non</TD>';
    -00150 
    -00151 echo '</TR>';
    -00152 
    -00153 echo '<TR>'; 
    -00154 echo '<TD> Libellé echéance </TD>';
    -00155 echo '<TD> <INPUT TYPE="text" NAME="p_ech_lib" ></TD>';
    -00156 echo '</TR>';
    -00157 
    -00158 
    -00159 echo '<TR>'; 
    -00160 echo '<TD> Type de journal </TD>';
    -00161 echo '<TD> ';
    -00162 $Res=ExecSql($cn,"select jrn_type_id,jrn_desc from jrn_type");
    -00163 $Max=pg_NumRows($Res);
    -00164 echo '<SELECT NAME="p_jrn_type">';
    -00165 for ($i=0;$i<$Max;$i++) {
    -00166   $Line=pg_fetch_array($Res,$i);
    -00167   printf ('<OPTION VALUE="%s">%s',$Line['jrn_type_id'],$Line['jrn_desc']);
    -00168 }
    -00169 echo '</SELECT>';
    -00170 echo '</TD>';
    -00171 echo '</TR>';
    -00172 ?>
    -00173 <?
    -00174 // Get all the fiches
    -00175 echo '<tr> <td colspan="2"><H2 class="info"> Fiches </H2></TD></TR>';
    -00176 $Res=ExecSql($cn,"select fd_id,fd_label from fiche_def order by fd_label");
    -00177 $num=pg_NumRows($Res);
    -00178 
    -00179 
    -00180 echo '<TR>';
    -00181 echo '<th> Fiches Crédit</TH>';
    -00182 echo '<th> Fiches Débit</TH>';
    -00183 echo '</TR>';
    -00184 // Show the fiche in deb section
    -00185 for ($i=0;$i<$num;$i++) {
    -00186   $res=pg_fetch_array($Res,$i);
    -00187   echo '<TR>';
    -00188   printf ('<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="FICHEDEB[]">%s</TD>',
    -00189           $res['fd_id'],$res['fd_label']);
    -00190   printf ('<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="FICHECRED[]">%s</TD>',
    -00191           $res['fd_id'],$res['fd_label']);
    -00192   echo '</TR>';
    -00193 }
    -00194 ?>
    -00195 <TR><TD><INPUT TYPE="SUBMIT" VALUE="Sauve"></TD><TD><INPUT TYPE="RESET" VALUE="Reset"></TD></TR>
    -00196 <?
    -00197 echo '</TABLE>';
    -00198 echo '</FORM>';
    -00199 echo "</DIV>";
    -00200 html_page_stop();
    -00201 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00042 echo '<div class="u_tmenu">'; +00043 echo ShowMenuCompta($_SESSION['g_dossier']); +00044 echo '</div>'; +00045 +00046 +00047 +00048 $cn=DbConnect($_SESSION['g_dossier']); +00049 if ($User->CheckAction($cn,GJRN) == 0 ){ +00050 /* Cannot Access */ +00051 NoAccess(); +00052 exit -1; +00053 +00054 } +00055 +00056 echo JS_SEARCH_POSTE; +00057 +00058 If ( isset ($_POST["JRN_ADD"]) ) { +00059 if ( !isset($_POST["p_jrn_name"]) || ! isset($_POST["p_jrn_type"] )) { +00060 echo '<H2 CLASS="error"> Un paramètre manque</H2>'; +00061 } +00062 else { +00063 if ( $_POST['p_ech'] == 'no' ) { +00064 $p_ech='false'; +00065 $p_ech_lib='null'; +00066 } else { +00067 $p_ech='true'; +00068 $p_ech_lib="'".$_POST['p_ech_lib']."'"; +00069 } +00070 if (strlen(trim($_POST['p_jrn_deb_max_line'])) == 0 || +00071 (string) (int)$_POST['p_jrn_deb_max_line'] != (string)$_POST['p_jrn_deb_max_line'] ) +00072 $l_deb_max_line=1; +00073 else +00074 $l_deb_max_line=$_POST['p_jrn_deb_max_line']; +00075 +00076 if ( strlen(trim($_POST['p_jrn_cred_max_line'])) == 0 || +00077 (string) (int)$_POST['p_jrn_cred_max_line'] != (string)$_POST['p_jrn_cred_max_line'] ) +00078 $l_cred_max_line=1; +00079 else +00080 $l_cred_max_line=$_POST['p_jrn_cred_max_line']; +00081 $p_jrn_name=$_POST["p_jrn_name"]; +00082 echo_debug('jrn_add.php',__LINE__,"nom journal $p_jrn_name"); +00083 $p_jrn_class_deb=FormatString($_POST["p_jrn_class_deb"]); +00084 if (strlen(trim($p_jrn_name))==0) return; +00085 $p_jrn_name=FormatString($p_jrn_name); +00086 $p_jrn_class_cred=FormatString($_POST["p_jrn_class_cred"]); +00087 // compute the jrn_def.jrn_def_code +00088 $p_code=sprintf("%s-%02d",trim($_POST['p_jrn_type']),NextJrn($cn,$_POST['p_jrn_type'])); +00089 $p_jrn_fiche_deb=""; +00090 $p_jrn_fiche_cred=""; +00091 +00092 if ( isset ($_POST["FICHEDEB"])) { +00093 $p_jrn_fiche_deb=join(",",$_POST["FICHEDEB"]); +00094 } +00095 if ( isset ($_POST["FICHECRED"])) { +00096 $p_jrn_fiche_cred=join(",",$_POST["FICHECRED"]); +00097 } +00098 +00099 $Sql=sprintf("insert into jrn_def(jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_deb_max_line,jrn_cred_max_line, +00100 jrn_def_type,jrn_def_fiche_deb,jrn_def_fiche_cred,jrn_def_code) +00101 values ('%s','%s','%s',%s,%s,'%s','%s','%s','%s')", +00102 $p_jrn_name,$p_jrn_class_deb,$p_jrn_class_cred, +00103 $l_deb_max_line,$l_cred_max_line,$_POST['p_jrn_type'], +00104 $p_jrn_fiche_deb,$p_jrn_fiche_cred, +00105 $p_code +00106 ); +00107 echo_debug($Sql); +00108 $Res=ExecSql($cn,$Sql); +00109 } +00110 } +00111 echo ShowMenuAdvanced(); +00112 echo '<div class="lmenu">'; +00113 MenuJrn($_SESSION['g_dossier']); +00114 echo '</div>'; +00115 +00116 $sessid=$_REQUEST['PHPSESSID']; +00117 $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$sessid."','not')\">"; +00118 +00119 echo '<DIV CLASS="u_redcontent">'; +00120 echo '<FORM ACTION="jrn_add.php" METHOD="POST">'; +00121 echo '<INPUT TYPE="HIDDEN" NAME="JRN_ADD">'; +00122 echo '<TABLE>'; +00123 +00124 echo '<TR>'; +00125 echo '<TD> Nom journal </TD>'; +00126 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_name"></TD>'; +00127 echo '</TR>'; +00128 +00129 echo '<TR>'; +00130 echo '<TD> Postes utilisables journal (débit) </TD>'; +00131 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_class_deb">'.$search.'</TD>'; +00132 echo '</TR>'; +00133 +00134 echo '<TR>'; +00135 echo '<TD> Nombre de lignes par défaut (débit) </TD>'; +00136 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_deb_max_line" ></TD>'; +00137 echo '</TR>'; +00138 +00139 echo '<TR>'; +00140 echo '<TD> Postes utilisables journal (crédit) </TD>'; +00141 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_class_cred">'.$search.'</TD>'; +00142 echo '</TR>'; +00143 +00144 +00145 echo '<TR>'; +00146 echo '<TD> Nombre de lignes par défaut (crédit) </TD>'; +00147 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_cred_max_line"></TD>'; +00148 echo '</TR>'; +00149 +00150 echo '<TR>'; +00151 echo '<TD> Date d\'échéance </TD>'; +00152 echo '<TD> <INPUT TYPE="radio" NAME="p_ech" VALUE="yes" >Oui'; +00153 echo '<INPUT TYPE="radio" NAME="p_ech" VALUE="no" CHECKED>Non</TD>'; +00154 +00155 echo '</TR>'; +00156 +00157 echo '<TR>'; +00158 echo '<TD> Libellé echéance </TD>'; +00159 echo '<TD> <INPUT TYPE="text" NAME="p_ech_lib" ></TD>'; +00160 echo '</TR>'; +00161 +00162 +00163 echo '<TR>'; +00164 echo '<TD> Type de journal </TD>'; +00165 echo '<TD> '; +00166 $Res=ExecSql($cn,"select jrn_type_id,jrn_desc from jrn_type"); +00167 $Max=pg_NumRows($Res); +00168 echo '<SELECT NAME="p_jrn_type">'; +00169 for ($i=0;$i<$Max;$i++) { +00170 $Line=pg_fetch_array($Res,$i); +00171 printf ('<OPTION VALUE="%s">%s',$Line['jrn_type_id'],$Line['jrn_desc']); +00172 } +00173 echo '</SELECT>'; +00174 echo '</TD>'; +00175 echo '</TR>'; +00176 ?> +00177 <? +00178 // Get all the fiches +00179 echo '<tr> <td colspan="2"><H2 class="info"> Fiches </H2></TD></TR>'; +00180 $Res=ExecSql($cn,"select fd_id,fd_label from fiche_def order by fd_label"); +00181 $num=pg_NumRows($Res); +00182 +00183 +00184 echo '<TR>'; +00185 echo '<th> Fiches Dédit</TH>'; +00186 echo '<th> Fiches Crébit</TH>'; +00187 echo '</TR>'; +00188 // Show the fiche in deb section +00189 for ($i=0;$i<$num;$i++) { +00190 $res=pg_fetch_array($Res,$i); +00191 echo '<TR>'; +00192 printf ('<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="FICHEDEB[]">%s</TD>', +00193 $res['fd_id'],$res['fd_label']); +00194 printf ('<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="FICHECRED[]">%s</TD>', +00195 $res['fd_id'],$res['fd_label']); +00196 echo '</TR>'; +00197 } +00198 ?> +00199 <TR><TD><INPUT TYPE="SUBMIT" VALUE="Sauve"></TD><TD><INPUT TYPE="RESET" VALUE="Reset"></TD></TR> +00200 <? +00201 echo '</TABLE>'; +00202 echo '</FORM>'; +00203 echo "</DIV>"; +00204 html_page_stop(); +00205 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__add_8php.html b/doc/developper/html/jrn__add_8php.html index 634241852..5c64ea4c3 100644 --- a/doc/developper/html/jrn__add_8php.html +++ b/doc/developper/html/jrn__add_8php.html @@ -4,10 +4,12 @@ - + -

    jrn_add.php File Reference

    +

    jrn_add.php File Reference

    To add a ledger. More... +

    +

    Go to the source code of this file. @@ -49,7 +51,12 @@
     $num = pg_NumRows($Res)
    -


    Variable Documentation

    +

    Detailed Description

    +To add a ledger. +

    + +

    +Definition in file jrn_add.php.


    Variable Documentation

    @@ -72,7 +79,7 @@

    -Definition at line 44 of file jrn_add.php. +Definition at line 48 of file jrn_add.php.

    @@ -97,7 +104,7 @@ Definition at line 44

    -Definition at line 76 of file jrn_add.php. +Definition at line 80 of file jrn_add.php.

    @@ -122,7 +129,7 @@ Definition at line 76

    -Definition at line 70 of file jrn_add.php. +Definition at line 74 of file jrn_add.php.

    @@ -147,7 +154,7 @@ Definition at line 70

    -Definition at line 163 of file jrn_add.php. +Definition at line 167 of file jrn_add.php.

    @@ -172,9 +179,9 @@ Definition at line 163

    -Definition at line 177 of file jrn_add.php. +Definition at line 181 of file jrn_add.php.

    -Referenced by AddFiche(), Cezpdf::ezPRVTaddPageNumbers(), Cezpdf::ezWhatPageNumber(), GetDbId(), Cpdf::o_fontEncoding(), Creport::rf(), Cpdf::selectFont(), SetInternalCode(), and ShowMenuJrn(). +Referenced by AddFiche(), Cezpdf::ezPRVTaddPageNumbers(), Cezpdf::ezWhatPageNumber(), GetDbId(), Cpdf::o_fontEncoding(), Creport::rf(), Cpdf::selectFont(), SetInternalCode(), and ShowMenuJrn().

    @@ -199,7 +206,7 @@ Referenced by AddFiche()

    -Definition at line 84 of file jrn_add.php. +Definition at line 88 of file jrn_add.php.

    @@ -224,7 +231,7 @@ Definition at line 84

    -Definition at line 82 of file jrn_add.php. +Definition at line 86 of file jrn_add.php.

    @@ -249,7 +256,7 @@ Definition at line 82

    -Definition at line 79 of file jrn_add.php. +Definition at line 83 of file jrn_add.php.

    @@ -274,7 +281,7 @@ Definition at line 79

    -Definition at line 86 of file jrn_add.php. +Definition at line 90 of file jrn_add.php.

    @@ -299,7 +306,7 @@ Definition at line 86

    -Definition at line 85 of file jrn_add.php. +Definition at line 89 of file jrn_add.php.

    @@ -324,7 +331,7 @@ Definition at line 85

    -Definition at line 77 of file jrn_add.php. +Definition at line 81 of file jrn_add.php.

    @@ -349,7 +356,7 @@ Definition at line 77

    -Definition at line 31 of file jrn_add.php. +Definition at line 35 of file jrn_add.php.

    @@ -374,7 +381,7 @@ Definition at line 31

    -Definition at line 104 of file jrn_add.php. +Definition at line 108 of file jrn_add.php.

    @@ -399,7 +406,7 @@ Definition at line 104

    -Definition at line 113 of file jrn_add.php. +Definition at line 117 of file jrn_add.php.

    @@ -424,7 +431,7 @@ Definition at line 113

    -Definition at line 112 of file jrn_add.php. +Definition at line 116 of file jrn_add.php.

    @@ -457,7 +464,7 @@ Definition at line 112 )

    -Definition at line 95 of file jrn_add.php. +Definition at line 99 of file jrn_add.php.

    @@ -482,7 +489,7 @@ Definition at line 95

    -Definition at line 33 of file jrn_add.php. +Definition at line 37 of file jrn_add.php.

    @@ -507,10 +514,10 @@ Definition at line 33

    -Definition at line 48 of file jrn_add.php. +Definition at line 52 of file jrn_add.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__csv_8php-source.html b/doc/developper/html/jrn__csv_8php-source.html index a64918c21..6bdbe3e7e 100644 --- a/doc/developper/html/jrn__csv_8php-source.html +++ b/doc/developper/html/jrn__csv_8php-source.html @@ -4,7 +4,7 @@ - +

    jrn_csv.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,104 +27,104 @@
     00018 */
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00021 header('Content-type: application/csv');
    -00022 header('Content-Disposition: attachment;filename="jrn.csv"',FALSE);
    -00023 include_once ("ac_common.php");
    -00024 
    -00025 include_once ("postgres.php");
    -00026 include_once("check_priv.php");
    -00027 include("class_jrn.php");
    -00028 $cn=DbConnect($_SESSION['g_dossier']);
    -00029 $rep=DbConnect();
    -00030 
    -00031 include ('class_user.php');
    -00032 $User=new cl_user($rep);
    -00033 $User->Check();
    -00034 if ( $User->CheckAction($cn,IMP) == 0 ||
    -00035      $User->AccessJrn($cn,$_GET['jrn_id']) == false){
    -00036     /* Cannot Access */
    -00037     NoAccess();
    -00038   }
    -00039 
    -00040 
    -00041  $p_cent=( isset ( $_GET['central']) )?$_GET['central']:'off';
    -00042 
    -00043 $Jrn=new jrn($cn,$_GET['jrn_id']);
    +00025 header('Content-type: application/csv');
    +00026 header('Content-Disposition: attachment;filename="jrn.csv"',FALSE);
    +00027 include_once ("ac_common.php");
    +00028 
    +00029 include_once ("postgres.php");
    +00030 include_once("check_priv.php");
    +00031 include("class_jrn.php");
    +00032 $cn=DbConnect($_SESSION['g_dossier']);
    +00033 $rep=DbConnect();
    +00034 
    +00035 include ('class_user.php');
    +00036 $User=new cl_user($rep);
    +00037 $User->Check();
    +00038 if ( $User->CheckAction($cn,IMP) == 0 ||
    +00039      $User->AccessJrn($cn,$_GET['jrn_id']) == false){
    +00040     /* Cannot Access */
    +00041     NoAccess();
    +00042   }
    +00043 
     00044 
    -00045 $Jrn->GetName();
    -00046 // Detailled printing
    -00047 //---
    -00048 if  ( $_GET['p_simple'] == 0 ) 
    -00049   {
    -00050     $Jrn->GetRow( $_GET['from_periode'],
    -00051                   $_GET['to_periode'],
    -00052                   $p_cent);
    -00053 
    -00054     if ( count($Jrn->row) == 0) 
    -00055       exit;
    -00056     foreach ( $Jrn->row as $op ) { 
    -00057       // should clean description : remove <b><i> tag and '; char
    -00058       $desc=$op['description'];
    -00059       $desc=str_replace("<b>","",$desc);
    -00060       $desc=str_replace("</b>","",$desc);
    -00061       $desc=str_replace("<i>","",$desc);
    -00062       $desc=str_replace("</i>","",$desc);
    -00063       $desc=str_replace('"',"'",$desc);
    -00064 
    -00065       printf("\"%s\"\t\"%s\"\t\"%s\"\t\"%s\"\t\"%s\"\t%8.4f\t%8.4f\n",
    -00066              $op['j_id'],
    -00067              $op['internal'],
    -00068              $op['j_date'],
    -00069              $op['poste'],
    -00070              $desc,
    -00071              $op['cred_montant'],
    -00072              $op['deb_montant']
    -00073              );
    -00074         
    -00075     }
    -00076     exit;
    -00077   }
    -00078  else 
    -00079    {
    -00080      $Row=$Jrn->GetRowSimple($_GET['from_periode'],
    -00081                              $_GET['to_periode'],
    -00082                              $p_cent);
    -00084      printf ('" operation "'.
    -00085              '"Date"'.
    -00086              '"commentaire"'.
    -00087              '"internal"'.
    -00088              '"montant"');
    -00089 
    -00090       foreach ($Row as $line)
    -00091         {
    -00092           echo $line['num'].";";
    -00093           echo $line['date'].";";
    -00094           echo $line['comment'].";";
    -00095           echo $line['jr_internal'].";";
    -00096           //      echo "<TD>".$line['pj'].";";
    -00097         // If the ledger is financial :
    -00098         // the credit must be negative and written in red
    -00099         // Get the jrn type
    -00100         if ( $line['jrn_def_type'] == 'FIN' ) {
    -00101           $positive = CountSql($cn,"select * from jrn inner join jrnx on jr_grpt_id=j_grpt ".
    -00102                    " where jr_id=".$line['jr_id']." and (j_poste like '55%' or j_poste like '57%' )".
    -00103                                " and j_debit='f'");
    -00104         
    -00105 
    -00106         echo ( $positive != 0 )?sprintf("-%8.2f",$line['montant']):sprintf("%8.2f",$line['montant']);
    -00107         echo ";";
    -00108         }
    -00109         else 
    -00110           {
    -00111             printf("% 8.2f",$line['montant']).";";
    -00112           }
    -00113 
    -00114         printf("\r\n");
    -00115         }
    -00116       
    -00118    }
    -00119 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00045 $p_cent=( isset ( $_GET['central']) )?$_GET['central']:'off'; +00046 +00047 $Jrn=new jrn($cn,$_GET['jrn_id']); +00048 +00049 $Jrn->GetName(); +00050 // Detailled printing +00051 //--- +00052 if ( $_GET['p_simple'] == 0 ) +00053 { +00054 $Jrn->GetRow( $_GET['from_periode'], +00055 $_GET['to_periode'], +00056 $p_cent); +00057 +00058 if ( count($Jrn->row) == 0) +00059 exit; +00060 foreach ( $Jrn->row as $op ) { +00061 // should clean description : remove <b><i> tag and '; char +00062 $desc=$op['description']; +00063 $desc=str_replace("<b>","",$desc); +00064 $desc=str_replace("</b>","",$desc); +00065 $desc=str_replace("<i>","",$desc); +00066 $desc=str_replace("</i>","",$desc); +00067 $desc=str_replace('"',"'",$desc); +00068 +00069 printf("\"%s\"\t\"%s\"\t\"%s\"\t\"%s\"\t\"%s\"\t%8.4f\t%8.4f\n", +00070 $op['j_id'], +00071 $op['internal'], +00072 $op['j_date'], +00073 $op['poste'], +00074 $desc, +00075 $op['cred_montant'], +00076 $op['deb_montant'] +00077 ); +00078 +00079 } +00080 exit; +00081 } +00082 else +00083 { +00084 $Row=$Jrn->GetRowSimple($_GET['from_periode'], +00085 $_GET['to_periode'], +00086 $p_cent); +00088 printf ('" operation "'. +00089 '"Date"'. +00090 '"commentaire"'. +00091 '"internal"'. +00092 '"montant"'); +00093 +00094 foreach ($Row as $line) +00095 { +00096 echo $line['num'].";"; +00097 echo $line['date'].";"; +00098 echo $line['comment'].";"; +00099 echo $line['jr_internal'].";"; +00100 // echo "<TD>".$line['pj'].";"; +00101 // If the ledger is financial : +00102 // the credit must be negative and written in red +00103 // Get the jrn type +00104 if ( $line['jrn_def_type'] == 'FIN' ) { +00105 $positive = CountSql($cn,"select * from jrn inner join jrnx on jr_grpt_id=j_grpt ". +00106 " where jr_id=".$line['jr_id']." and (j_poste like '55%' or j_poste like '57%' )". +00107 " and j_debit='f'"); +00108 +00109 +00110 echo ( $positive != 0 )?sprintf("-%8.2f",$line['montant']):sprintf("%8.2f",$line['montant']); +00111 echo ";"; +00112 } +00113 else +00114 { +00115 printf("% 8.2f",$line['montant']).";"; +00116 } +00117 +00118 printf("\r\n"); +00119 } +00120 +00122 } +00123 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__csv_8php.html b/doc/developper/html/jrn__csv_8php.html index d360f264a..b5e92d8e5 100644 --- a/doc/developper/html/jrn__csv_8php.html +++ b/doc/developper/html/jrn__csv_8php.html @@ -4,10 +4,12 @@ - + -

    jrn_csv.php File Reference

    +

    jrn_csv.php File Reference

    Send a ledger in CSV format. More... +

    +

    Go to the source code of this file. @@ -27,7 +29,12 @@
     exit
    -


    Variable Documentation

    +

    Detailed Description

    +Send a ledger in CSV format. +

    + +

    +Definition in file jrn_csv.php.


    Variable Documentation

    @@ -50,7 +57,7 @@

    -Definition at line 28 of file jrn_csv.php. +Definition at line 32 of file jrn_csv.php.

    @@ -75,7 +82,7 @@ Definition at line 28

    -Definition at line 60 of file jrn_csv.php. +Definition at line 64 of file jrn_csv.php.

    @@ -100,7 +107,7 @@ Definition at line 60

    -Definition at line 43 of file jrn_csv.php. +Definition at line 47 of file jrn_csv.php.

    @@ -125,7 +132,7 @@ Definition at line 43

    -Definition at line 41 of file jrn_csv.php. +Definition at line 45 of file jrn_csv.php.

    @@ -150,7 +157,7 @@ Definition at line 41

    -Definition at line 29 of file jrn_csv.php. +Definition at line 33 of file jrn_csv.php.

    @@ -175,7 +182,7 @@ Definition at line 29

    -Definition at line 32 of file jrn_csv.php. +Definition at line 36 of file jrn_csv.php.

    @@ -200,10 +207,10 @@ Definition at line 32

    -Definition at line 76 of file jrn_csv.php. +Definition at line 80 of file jrn_csv.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__detail_8php-source.html b/doc/developper/html/jrn__detail_8php-source.html index 73f11b683..4e7aa10ea 100644 --- a/doc/developper/html/jrn__detail_8php-source.html +++ b/doc/developper/html/jrn__detail_8php-source.html @@ -4,7 +4,7 @@ - +

    jrn_detail.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,229 +27,229 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 include_once ("ac_common.php");
    -00022 html_page_start($_SESSION['g_theme']);
    -00023 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00024   echo "You must choose a Dossier ";
    -00025   exit -2;
    -00026 }
    -00027 include_once ("postgres.php");
    -00028 /* Admin. Dossier */
    -00029 $rep=DbConnect();
    -00030 include_once ("class_user.php");
    -00031 $User=new cl_user($rep);
    -00032 $User->Check();
    -00033 
    -00034 //include_once ("top_menu_compta.php");
    -00035 include_once ("user_menu.php");
    -00036 
    +00025 include_once ("ac_common.php");
    +00026 html_page_start($_SESSION['g_theme']);
    +00027 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00028   echo "You must choose a Dossier ";
    +00029   exit -2;
    +00030 }
    +00031 include_once ("postgres.php");
    +00032 /* Admin. Dossier */
    +00033 $rep=DbConnect();
    +00034 include_once ("class_user.php");
    +00035 $User=new cl_user($rep);
    +00036 $User->Check();
     00037 
    -00038 echo '<div class="u_tmenu">';
    -00039 echo ShowMenuCompta($_SESSION['g_dossier']);
    -00040 echo '</div>';
    +00038 //include_once ("top_menu_compta.php");
    +00039 include_once ("user_menu.php");
    +00040 
     00041 
    -00042 include_once("check_priv.php");
    -00043 
    -00044 $cn=DbConnect($_SESSION['g_dossier']);
    -00045 if ( $User->CheckAction($cn,GJRN) == 0 ){
    -00046   /* Cannot Access */
    -00047   NoAccess();
    -00048   exit -1;                      
    -00049 }
    -00050 // Javascript
    -00051 echo JS_SEARCH_POSTE;
    -00052 if ( isset( $_GET['p_jrn'] )) {
    -00053   $p_jrn=$_GET['p_jrn'];
    -00054  } else {
    -00055   echo '<h2 class="error">Journal inexistant</h2>';
    -00056   exit();
    -00057  }
    -00058 
    -00059 
    -00060 
    -00061 If ( isset ($_POST["JRN_UPD"] )) {
    -00062   if (  !isset($_POST["p_jrn_name"])  ) {
    -00063     echo '<H2 CLASS="error"> Un paramètre manque</H2>';
    -00064   }
    -00065   else {
    -00066     if ( $_POST['p_ech'] == 'no' ) {
    -00067       $p_ech='false';
    -00068       $p_ech_lib='null';
    -00069     } else {
    -00070       $p_ech='true';
    -00071       $p_ech_lib="'".$_POST['p_ech_lib']."'";
    -00072     }
    -00073     if (strlen(trim($_POST['p_jrn_deb_max_line'])) == 0 || 
    -00074         (string) (int)$_POST['p_jrn_deb_max_line'] != (string)$_POST['p_jrn_deb_max_line'] )
    -00075       $l_deb_max_line=1;
    -00076     else
    -00077       $l_deb_max_line=$_POST['p_jrn_deb_max_line'];
    -00078     
    -00079     if (  strlen(trim($_POST['p_jrn_cred_max_line'])) == 0 ||
    -00080           (string) (int)$_POST['p_jrn_cred_max_line'] != (string)$_POST['p_jrn_cred_max_line'] )
    -00081       $l_cred_max_line=1;
    -00082     else
    -00083       $l_cred_max_line=$_POST['p_jrn_cred_max_line'];
    -00084     $p_jrn_name=$_POST['p_jrn_name'];
    -00085      if (strlen(trim($p_jrn_name))==0) return;
    -00086      $p_jrn_name=FormatString($p_jrn_name);
    -00087        $p_jrn_fiche_deb="";
    -00088        $p_jrn_fiche_cred="";
    -00089 
    -00090      if ( isset    ($_POST["FICHEDEB"])) {
    -00091        $p_jrn_fiche_deb=join(",",$_POST["FICHEDEB"]);
    -00092      }
    -00093       if ( isset    ($_POST["FICHECRED"])) {
    -00094        $p_jrn_fiche_cred=join(",",$_POST["FICHECRED"]);
    -00095       }
    -00096     $Sql=sprintf("update jrn_def set jrn_def_name='%s',jrn_def_class_deb='%s',jrn_def_class_cred='%s',
    -00097                  jrn_deb_max_line=%s,jrn_cred_max_line=%s,jrn_def_ech=%s,jrn_def_ech_lib=%s,jrn_def_fiche_deb='%s',
    -00098                   jrn_def_fiche_cred='%s'
    -00099                  where jrn_def_id=%s",
    -00100                  $p_jrn_name,$_POST['p_jrn_class_deb'],$_POST['p_jrn_class_cred'],
    -00101                  $l_deb_max_line,$l_cred_max_line,
    -00102                  $p_ech,$p_ech_lib,
    -00103                  $p_jrn_fiche_deb,$p_jrn_fiche_cred,
    -00104                  $_GET['p_jrn']
    -00105                  );
    -00106     echo_debug($Sql);
    -00107     $Res=ExecSql($cn,$Sql);
    -00108   }
    -00109 }
    -00110 echo ShowMenuAdvanced();
    -00111 echo '<div class="lmenu">';
    -00112 MenuJrn($_SESSION['g_dossier']);
    -00113 echo '</div>';
    -00114 
    -00115 $Res=ExecSql($cn,"select jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,".
    -00116              "jrn_deb_max_line,jrn_cred_max_line,jrn_def_code".
    -00117                  ",jrn_def_type,jrn_def_ech, jrn_def_ech_lib,jrn_def_fiche_deb,jrn_def_fiche_cred".
    -00118                  " from jrn_def where".
    -00119                  " jrn_def_id=".$_GET['p_jrn']);
    -00120 $l_line=pg_fetch_array($Res,0);
    -00121 $sessid = $_REQUEST['PHPSESSID'];
    -00122 $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$sessid."','not','".$_GET['p_jrn']."')\">";
    -00123 echo '<DIV CLASS="u_redcontent">';
    -00124 echo '<H2 class="info">'.$l_line['jrn_def_name'].'</H2>';
    -00125 echo '<FORM ACTION="jrn_detail.php?p_jrn='.$_GET['p_jrn'].'" METHOD="POST">';
    -00126 echo '<INPUT TYPE="HIDDEN" NAME="JRN_UPD">';
    -00127 echo '<TABLE>';
    -00128 
    -00129 echo '<TR>'; 
    -00130 echo '<TD> Nom journal </TD>';
    -00131 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_name" VALUE="'.$l_line['jrn_def_name'].'"></TD>';
    -00132 echo '</TR>';
    -00133 
    -00134 echo '<TR>'; 
    -00135 echo '<TD> Postes utilisables journal (débit) </TD>';
    -00136 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_class_deb" VALUE="'.$l_line['jrn_def_class_deb'].'">'.$search.'</TD>';
    -00137 echo '</TR>';
    -00138 
    -00139 echo '<TR>'; 
    -00140 echo '<TD> Nombre de lignes par défaut (débit) </TD>';
    -00141 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_deb_max_line" VALUE="'.$l_line['jrn_deb_max_line'].'"></TD>';
    -00142 echo '</TR>';
    -00143 
    -00144 echo '<TR>'; 
    -00145 echo '<TD> Postes utilisables journal (crédit) </TD>';
    -00146 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_class_cred" VALUE="'.$l_line['jrn_def_class_cred'].'">'.$search.'</TD>';
    -00147 echo '</TR>';
    -00148 
    -00149 
    -00150 echo '<TR>'; 
    -00151 echo '<TD> Nombre de lignes par défaut (crédit) </TD>';
    -00152 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_cred_max_line" VALUE="'.$l_line['jrn_cred_max_line'].'"></TD>';
    -00153 echo '</TR>';
    -00154 
    -00155 echo '<TR>'; 
    -00156 echo '<TD> Date d\'échéance </TD>';
    -00157 if ( $l_line['jrn_def_ech'] == 't' ) {
    -00158   echo '<TD> <INPUT TYPE="radio" NAME="p_ech" VALUE="yes" checked> Oui';
    -00159   echo '<INPUT TYPE="radio" NAME="p_ech" VALUE="no">Non </TD>';
    -00160 }
    -00161 if ( $l_line['jrn_def_ech'] == 'f' ) {
    -00162   echo '<TD> <INPUT TYPE="radio" NAME="p_ech" VALUE="yes" >Oui';
    -00163   echo '<INPUT TYPE="radio" NAME="p_ech" VALUE="no" CHECKED>Non</TD>';
    +00042 echo '<div class="u_tmenu">';
    +00043 echo ShowMenuCompta($_SESSION['g_dossier']);
    +00044 echo '</div>';
    +00045 
    +00046 include_once("check_priv.php");
    +00047 
    +00048 $cn=DbConnect($_SESSION['g_dossier']);
    +00049 if ( $User->CheckAction($cn,GJRN) == 0 ){
    +00050   /* Cannot Access */
    +00051   NoAccess();
    +00052   exit -1;                      
    +00053 }
    +00054 // Javascript
    +00055 echo JS_SEARCH_POSTE;
    +00056 if ( isset( $_GET['p_jrn'] )) {
    +00057   $p_jrn=$_GET['p_jrn'];
    +00058  } else {
    +00059   echo '<h2 class="error">Journal inexistant</h2>';
    +00060   exit();
    +00061  }
    +00062 
    +00063 
    +00064 
    +00065 If ( isset ($_POST["JRN_UPD"] )) {
    +00066   if (  !isset($_POST["p_jrn_name"])  ) {
    +00067     echo '<H2 CLASS="error"> Un paramètre manque</H2>';
    +00068   }
    +00069   else {
    +00070     if ( $_POST['p_ech'] == 'no' ) {
    +00071       $p_ech='false';
    +00072       $p_ech_lib='null';
    +00073     } else {
    +00074       $p_ech='true';
    +00075       $p_ech_lib="'".$_POST['p_ech_lib']."'";
    +00076     }
    +00077     if (strlen(trim($_POST['p_jrn_deb_max_line'])) == 0 || 
    +00078         (string) (int)$_POST['p_jrn_deb_max_line'] != (string)$_POST['p_jrn_deb_max_line'] )
    +00079       $l_deb_max_line=1;
    +00080     else
    +00081       $l_deb_max_line=$_POST['p_jrn_deb_max_line'];
    +00082     
    +00083     if (  strlen(trim($_POST['p_jrn_cred_max_line'])) == 0 ||
    +00084           (string) (int)$_POST['p_jrn_cred_max_line'] != (string)$_POST['p_jrn_cred_max_line'] )
    +00085       $l_cred_max_line=1;
    +00086     else
    +00087       $l_cred_max_line=$_POST['p_jrn_cred_max_line'];
    +00088     $p_jrn_name=$_POST['p_jrn_name'];
    +00089      if (strlen(trim($p_jrn_name))==0) return;
    +00090      $p_jrn_name=FormatString($p_jrn_name);
    +00091        $p_jrn_fiche_deb="";
    +00092        $p_jrn_fiche_cred="";
    +00093 
    +00094      if ( isset    ($_POST["FICHEDEB"])) {
    +00095        $p_jrn_fiche_deb=join(",",$_POST["FICHEDEB"]);
    +00096      }
    +00097       if ( isset    ($_POST["FICHECRED"])) {
    +00098        $p_jrn_fiche_cred=join(",",$_POST["FICHECRED"]);
    +00099       }
    +00100     $Sql=sprintf("update jrn_def set jrn_def_name='%s',jrn_def_class_deb='%s',jrn_def_class_cred='%s',
    +00101                  jrn_deb_max_line=%s,jrn_cred_max_line=%s,jrn_def_ech=%s,jrn_def_ech_lib=%s,jrn_def_fiche_deb='%s',
    +00102                   jrn_def_fiche_cred='%s'
    +00103                  where jrn_def_id=%s",
    +00104                  $p_jrn_name,$_POST['p_jrn_class_deb'],$_POST['p_jrn_class_cred'],
    +00105                  $l_deb_max_line,$l_cred_max_line,
    +00106                  $p_ech,$p_ech_lib,
    +00107                  $p_jrn_fiche_deb,$p_jrn_fiche_cred,
    +00108                  $_GET['p_jrn']
    +00109                  );
    +00110     echo_debug($Sql);
    +00111     $Res=ExecSql($cn,$Sql);
    +00112   }
    +00113 }
    +00114 echo ShowMenuAdvanced();
    +00115 echo '<div class="lmenu">';
    +00116 MenuJrn($_SESSION['g_dossier']);
    +00117 echo '</div>';
    +00118 
    +00119 $Res=ExecSql($cn,"select jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,".
    +00120              "jrn_deb_max_line,jrn_cred_max_line,jrn_def_code".
    +00121                  ",jrn_def_type,jrn_def_ech, jrn_def_ech_lib,jrn_def_fiche_deb,jrn_def_fiche_cred".
    +00122                  " from jrn_def where".
    +00123                  " jrn_def_id=".$_GET['p_jrn']);
    +00124 $l_line=pg_fetch_array($Res,0);
    +00125 $sessid = $_REQUEST['PHPSESSID'];
    +00126 $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$sessid."','not','".$_GET['p_jrn']."')\">";
    +00127 echo '<DIV CLASS="u_redcontent">';
    +00128 echo '<H2 class="info">'.$l_line['jrn_def_name'].'</H2>';
    +00129 echo '<FORM ACTION="jrn_detail.php?p_jrn='.$_GET['p_jrn'].'" METHOD="POST">';
    +00130 echo '<INPUT TYPE="HIDDEN" NAME="JRN_UPD">';
    +00131 echo '<TABLE>';
    +00132 
    +00133 echo '<TR>'; 
    +00134 echo '<TD> Nom journal </TD>';
    +00135 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_name" VALUE="'.$l_line['jrn_def_name'].'"></TD>';
    +00136 echo '</TR>';
    +00137 
    +00138 echo '<TR>'; 
    +00139 echo '<TD> Postes utilisables journal (débit) </TD>';
    +00140 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_class_deb" VALUE="'.$l_line['jrn_def_class_deb'].'">'.$search.'</TD>';
    +00141 echo '</TR>';
    +00142 
    +00143 echo '<TR>'; 
    +00144 echo '<TD> Nombre de lignes par défaut (débit) </TD>';
    +00145 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_deb_max_line" VALUE="'.$l_line['jrn_deb_max_line'].'"></TD>';
    +00146 echo '</TR>';
    +00147 
    +00148 echo '<TR>'; 
    +00149 echo '<TD> Postes utilisables journal (crédit) </TD>';
    +00150 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_class_cred" VALUE="'.$l_line['jrn_def_class_cred'].'">'.$search.'</TD>';
    +00151 echo '</TR>';
    +00152 
    +00153 
    +00154 echo '<TR>'; 
    +00155 echo '<TD> Nombre de lignes par défaut (crédit) </TD>';
    +00156 echo '<TD> <INPUT TYPE="text" NAME="p_jrn_cred_max_line" VALUE="'.$l_line['jrn_cred_max_line'].'"></TD>';
    +00157 echo '</TR>';
    +00158 
    +00159 echo '<TR>'; 
    +00160 echo '<TD> Date d\'échéance </TD>';
    +00161 if ( $l_line['jrn_def_ech'] == 't' ) {
    +00162   echo '<TD> <INPUT TYPE="radio" NAME="p_ech" VALUE="yes" checked> Oui';
    +00163   echo '<INPUT TYPE="radio" NAME="p_ech" VALUE="no">Non </TD>';
     00164 }
    -00165 echo '</TR>';
    -00166 
    -00167 echo '<TR>'; 
    -00168 echo '<TD> Libellé echéance </TD>';
    -00169 echo '<TD> <INPUT TYPE="text" NAME="p_ech_lib" VALUE="'.$l_line['jrn_def_ech_lib'].'"></TD>';
    -00170 echo '</TR>';
    -00171 
    -00172 echo '<TR>'; 
    -00173 echo '<TD> Type de journal </TD>';
    -00174 echo '<TD> ';
    -00175 $Res=ExecSql($cn,"select jrn_type_id,jrn_desc from jrn_type where ".
    -00176         "trim(jrn_type_id)=trim('".$l_line['jrn_def_type']."')");
    -00177 $Max=pg_NumRows($Res);
    -00178 
    -00179 for ($i=0;$i<$Max;$i++) {
    -00180   $Line=pg_fetch_array($Res,$i);
    -00181 
    -00182   echo_debug('jrn_detail.php',__LINE__,"jrn type !".$Line['jrn_type_id']."!,!".$l_line['jrn_def_type']."!");
    -00183   printf (' %s',$Line['jrn_desc']);
    -00184 }
    -00185 echo '</TD>';
    -00186 echo '</TR>';
    -00187 echo "<TR><TD> Code </TD><TD>".$l_line['jrn_def_code']."</TD></TR>";
    -00188 
    -00189 
    -00190 ?>
    -00191 
    -00192 <?
    +00165 if ( $l_line['jrn_def_ech'] == 'f' ) {
    +00166   echo '<TD> <INPUT TYPE="radio" NAME="p_ech" VALUE="yes" >Oui';
    +00167   echo '<INPUT TYPE="radio" NAME="p_ech" VALUE="no" CHECKED>Non</TD>';
    +00168 }
    +00169 echo '</TR>';
    +00170 
    +00171 echo '<TR>'; 
    +00172 echo '<TD> Libellé echéance </TD>';
    +00173 echo '<TD> <INPUT TYPE="text" NAME="p_ech_lib" VALUE="'.$l_line['jrn_def_ech_lib'].'"></TD>';
    +00174 echo '</TR>';
    +00175 
    +00176 echo '<TR>'; 
    +00177 echo '<TD> Type de journal </TD>';
    +00178 echo '<TD> ';
    +00179 $Res=ExecSql($cn,"select jrn_type_id,jrn_desc from jrn_type where ".
    +00180         "trim(jrn_type_id)=trim('".$l_line['jrn_def_type']."')");
    +00181 $Max=pg_NumRows($Res);
    +00182 
    +00183 for ($i=0;$i<$Max;$i++) {
    +00184   $Line=pg_fetch_array($Res,$i);
    +00185 
    +00186   echo_debug('jrn_detail.php',__LINE__,"jrn type !".$Line['jrn_type_id']."!,!".$l_line['jrn_def_type']."!");
    +00187   printf (' %s',$Line['jrn_desc']);
    +00188 }
    +00189 echo '</TD>';
    +00190 echo '</TR>';
    +00191 echo "<TR><TD> Code </TD><TD>".$l_line['jrn_def_code']."</TD></TR>";
    +00192 
     00193 
    -00194 echo '</TABLE>';
    -00195 // Get all the fiches
    -00196 echo '<H2 class="info"> Fiches </H2>';
    -00197 $Res=ExecSql($cn,"select fd_id,fd_label from fiche_def order by fd_label");
    -00198 $num=pg_NumRows($Res);
    -00199 
    -00200 $rdeb=split(',',$l_line['jrn_def_fiche_deb']);
    -00201 
    -00202 $rcred=split(',',$l_line['jrn_def_fiche_cred']);
    -00203 echo '<TABLE>';
    -00204 echo '<TR>';
    -00205 echo '<th> Fiches Débit</TH>';
    -00206 echo '<th> Fiches Crédit</TH>';
    -00207 echo '</TR>';
    -00208 // Show the fiche in deb section
    -00209 for ($i=0;$i<$num;$i++) {
    -00210   $res=pg_fetch_array($Res,$i);
    -00211   $CHECKED=" unchecked";
    -00212   foreach ( $rdeb as $element) { 
    -00213     if ( $element == $res['fd_id'] ) {
    -00214     $CHECKED="CHECKED";
    -00215     break;
    -00216   }
    -00217   }
    -00218   echo '<TR>';
    -00219   printf ('<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="FICHEDEB[]" %s>%s</TD>',
    -00220           $res['fd_id'],$CHECKED,$res['fd_label']);
    -00221   $CHECKED=" unchecked";
    -00222   foreach ( $rcred as $element) { 
    -00223     if ( $element == $res['fd_id'] ) {
    -00224     $CHECKED="CHECKED";
    -00225     break;
    -00226   }
    -00227   }
    -00228 
    -00229   printf ('<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="FICHECRED[]" %s>%s</TD>',
    -00230           $res['fd_id'],$CHECKED,$res['fd_label']);
    -00231   echo '</TR>';
    -00232 }
    -00233 
    -00234 
    -00235 ?>
    -00236 
    -00237 <TABLE><TR><TD><INPUT TYPE="SUBMIT" VALUE="Sauve"></TD><TD><INPUT TYPE="RESET" VALUE="Reset"></TD></TR></TABLE>
    -00238 <?
    -00239 echo '</FORM>';
    -00240 echo "</DIV>";
    -00241 html_page_stop();
    -00242 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00194 ?> +00195 +00196 <? +00197 +00198 echo '</TABLE>'; +00199 // Get all the fiches +00200 echo '<H2 class="info"> Fiches </H2>'; +00201 $Res=ExecSql($cn,"select fd_id,fd_label from fiche_def order by fd_label"); +00202 $num=pg_NumRows($Res); +00203 +00204 $rdeb=split(',',$l_line['jrn_def_fiche_deb']); +00205 +00206 $rcred=split(',',$l_line['jrn_def_fiche_cred']); +00207 echo '<TABLE>'; +00208 echo '<TR>'; +00209 echo '<th> Fiches Débit</TH>'; +00210 echo '<th> Fiches Crédit</TH>'; +00211 echo '</TR>'; +00212 // Show the fiche in deb section +00213 for ($i=0;$i<$num;$i++) { +00214 $res=pg_fetch_array($Res,$i); +00215 $CHECKED=" unchecked"; +00216 foreach ( $rdeb as $element) { +00217 if ( $element == $res['fd_id'] ) { +00218 $CHECKED="CHECKED"; +00219 break; +00220 } +00221 } +00222 echo '<TR>'; +00223 printf ('<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="FICHEDEB[]" %s>%s</TD>', +00224 $res['fd_id'],$CHECKED,$res['fd_label']); +00225 $CHECKED=" unchecked"; +00226 foreach ( $rcred as $element) { +00227 if ( $element == $res['fd_id'] ) { +00228 $CHECKED="CHECKED"; +00229 break; +00230 } +00231 } +00232 +00233 printf ('<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="FICHECRED[]" %s>%s</TD>', +00234 $res['fd_id'],$CHECKED,$res['fd_label']); +00235 echo '</TR>'; +00236 } +00237 +00238 +00239 ?> +00240 +00241 <TABLE><TR><TD><INPUT TYPE="SUBMIT" VALUE="Sauve"></TD><TD><INPUT TYPE="RESET" VALUE="Reset"></TD></TR></TABLE> +00242 <? +00243 echo '</FORM>'; +00244 echo "</DIV>"; +00245 html_page_stop(); +00246 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__detail_8php.html b/doc/developper/html/jrn__detail_8php.html index 45b8397c8..e9ef9de19 100644 --- a/doc/developper/html/jrn__detail_8php.html +++ b/doc/developper/html/jrn__detail_8php.html @@ -4,10 +4,12 @@ - + -

    jrn_detail.php File Reference

    +

    jrn_detail.php File Reference

    Show and let modify ledger parameter. More... +

    +

    Go to the source code of this file. @@ -51,7 +53,12 @@
     $CHECKED = " unchecked"
    -


    Variable Documentation

    +

    Detailed Description

    +Show and let modify ledger parameter. +

    + +

    +Definition in file jrn_detail.php.


    Variable Documentation

    @@ -74,7 +81,7 @@

    -Definition at line 211 of file jrn_detail.php. +Definition at line 215 of file jrn_detail.php.

    @@ -99,7 +106,7 @@ Definition at line 211<

    -Definition at line 44 of file jrn_detail.php. +Definition at line 48 of file jrn_detail.php.

    @@ -124,7 +131,7 @@ Definition at line 44

    -Definition at line 83 of file jrn_detail.php. +Definition at line 87 of file jrn_detail.php.

    @@ -149,7 +156,7 @@ Definition at line 83

    -Definition at line 77 of file jrn_detail.php. +Definition at line 81 of file jrn_detail.php.

    @@ -174,9 +181,9 @@ Definition at line 77

    -Definition at line 120 of file jrn_detail.php. +Definition at line 124 of file jrn_detail.php.

    -Referenced by EncodeFiche(), FormODS(), FormPeriode(), FormPeriodeMult(), GetAmount(), GetData(), GetDataForm(), GetFirstJrnIdForJrnType(), GetInternal(), GetNextFiche(), GetNumberLine(), rapport::GetRow(), ImpHtml(), MenuJrn(), new_fiche(), PeriodeClosed(), RecordJrn(), ShowDevise(), ShowMenuComptaForm(), ShowMenuFiche(), ShowMenuJrnUser(), ShowPeriode(), ViewFiche(), ViewForm(), and ViewJrn(). +Referenced by EncodeFiche(), FormODS(), FormPeriode(), FormPeriodeMult(), GetAmount(), GetData(), GetDataForm(), GetFirstJrnIdForJrnType(), GetInternal(), GetNextFiche(), GetNumberLine(), rapport::GetRow(), ImpHtml(), MenuJrn(), new_fiche(), PeriodeClosed(), RecordJrn(), ShowDevise(), ShowMenuComptaForm(), ShowMenuFiche(), ShowMenuJrnUser(), ShowPeriode(), ViewFiche(), ViewForm(), and ViewJrn().

    @@ -201,7 +208,7 @@ Referenced by EncodeFich

    -Definition at line 177 of file jrn_detail.php. +Definition at line 181 of file jrn_detail.php.

    @@ -226,7 +233,7 @@ Definition at line 177<

    -Definition at line 198 of file jrn_detail.php. +Definition at line 202 of file jrn_detail.php.

    @@ -251,7 +258,7 @@ Definition at line 198<

    -Definition at line 88 of file jrn_detail.php. +Definition at line 92 of file jrn_detail.php.

    @@ -276,7 +283,7 @@ Definition at line 88

    -Definition at line 87 of file jrn_detail.php. +Definition at line 91 of file jrn_detail.php.

    @@ -301,7 +308,7 @@ Definition at line 87

    -Definition at line 84 of file jrn_detail.php. +Definition at line 88 of file jrn_detail.php.

    @@ -326,7 +333,7 @@ Definition at line 84

    -Definition at line 202 of file jrn_detail.php. +Definition at line 206 of file jrn_detail.php.

    @@ -351,7 +358,7 @@ Definition at line 202<

    -Definition at line 200 of file jrn_detail.php. +Definition at line 204 of file jrn_detail.php.

    @@ -376,7 +383,7 @@ Definition at line 200<

    -Definition at line 29 of file jrn_detail.php. +Definition at line 33 of file jrn_detail.php.

    @@ -401,7 +408,7 @@ Definition at line 29

    -Definition at line 107 of file jrn_detail.php. +Definition at line 111 of file jrn_detail.php.

    @@ -426,7 +433,7 @@ Definition at line 107<

    -Definition at line 122 of file jrn_detail.php. +Definition at line 126 of file jrn_detail.php.

    @@ -451,7 +458,7 @@ Definition at line 122<

    -Definition at line 121 of file jrn_detail.php. +Definition at line 125 of file jrn_detail.php.

    @@ -486,7 +493,7 @@ Definition at line 121< )

    -Definition at line 96 of file jrn_detail.php. +Definition at line 100 of file jrn_detail.php.

    @@ -511,7 +518,7 @@ Definition at line 96

    -Definition at line 31 of file jrn_detail.php. +Definition at line 35 of file jrn_detail.php.

    @@ -536,10 +543,10 @@ Definition at line 31

    -Definition at line 48 of file jrn_detail.php. +Definition at line 52 of file jrn_detail.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__op__detail_8php-source.html b/doc/developper/html/jrn__op__detail_8php-source.html index 5cbf5b87e..b0d62b18f 100644 --- a/doc/developper/html/jrn__op__detail_8php-source.html +++ b/doc/developper/html/jrn__op__detail_8php-source.html @@ -4,7 +4,7 @@ - +

    jrn_op_detail.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,79 +27,78 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 include_once ("ac_common.php");
    -00022 include_once ("poste.php");
    -00023 include_once ("user_common.php");
    -00024 html_page_start($_SESSION['g_theme']);
    -00025 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00026   echo "You must choose a Dossier ";
    -00027   //  phpinfo();
    -00028   exit -2;
    -00029 }
    -00030 include_once ("postgres.php");
    -00031 include_once("jrn.php");
    -00032 /* Admin. Dossier */
    -00033 $rep=DbConnect();
    -00034 include_once ("class_user.php");
    -00035 $User=new cl_user($rep);
    -00036 $User->Check();
    -00037 
    -00038 if ( isset( $_GET['$p_jrn'] )) {
    -00039   $p_jrn=$_GE['p_jrn'];
    -00040   $_SESSION[ "p_jrn"]=$p_jrn;
    -00041 
    -00042 }
    -00043 $cn=DbConnect($_SESSION['g_dossier']);
    -00044 $jrn_op=$_GET['jrn_op'];
    -00045 list ($l_array,$max_deb,$max_cred)=GetData($cn,$jrn_op);
    -00046 foreach ($l_array as $key=>$element) {
    -00047   ${"e_$key"}=$element;
    -00048   echo_debug('jrn_op_detail.php',__LINE__,"jrn_op_detail.php e_$key =$element");
    -00049 }
    -00050 
    -00051 echo '<div align="center"> Opération </div>';
    -00052 
    -00053 echo 'Date : '.$e_op_date;
    -00054 echo '<div style="border-style:solid;border-width:1pt;">';
    -00055 echo $e_comment;
    -00056 echo '</DIV>';
    -00057 
    -00058 if ( isset ($e_ech) ) {
    -00059   echo "<DIV> Echeance $e_ech </DIV>";
    -00060 }
    -00061 echo '<div style="background-color:#BFC2D5;">';
    -00062 
    -00063 for ( $i = 0; $i < $max_deb;$i++) {
    -00064   $lib=GetPosteLibelle($_SESSION['g_dossier'],${"e_class_deb$i"}); 
    -00065   echo ${"e_class_deb$i"}." $lib    "."<B>".${"e_mont_deb$i"}."</B>.<br>";
    -00066 
    -00067 }
    -00068   echo "</div>";
    -00069   echo '<div style="background-color:#E8F4FF;margin-left:50px;">';
    -00070 for ( $i = 0; $i < $max_cred;$i++) {
    -00071   $lib=GetPosteLibelle($_SESSION['g_dossier'],${"e_class_cred$i"});
    -00072 
    -00073   echo ${"e_class_cred$i"}."  $lib   "."<B>".${"e_mont_cred$i"}."</B><br>";
    -00074 }
    -00075   echo '</div>';
    -00076 
    -00077 $a=GetConcerned($cn,$e_jr_id);
    -00078 
    -00079 if ( $a != null ) {
    -00080     echo "operation concernée <br>";
    -00081     echo '<div style="margin-left:30px;">';
    -00082   foreach ($a as $key => $element) {
    -00083 
    -00084     echo "<A class=\"detail\" HREF=\"jrn_op_detail.php?jrn_op=".GetGrpt($cn,$element)."\"> ".GetInternal($cn,$element)."</A>";
    -00085   }//for
    -00086   echo "</div>";
    -00087 }// if ( $a != null ) {
    -00088 ?>
    -00089 <input type="button" onClick="window.close()" value="Fermer">
    -00090 <?
    -00091 html_page_stop();
    -00092 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00025 include_once ("ac_common.php"); +00026 include_once ("poste.php"); +00027 include_once ("user_common.php"); +00028 html_page_start($_SESSION['g_theme']); +00029 if ( ! isset ( $_SESSION['g_dossier'] ) ) { +00030 echo "You must choose a Dossier "; +00031 exit -2; +00032 } +00033 include_once ("postgres.php"); +00034 include_once("jrn.php"); +00035 /* Admin. Dossier */ +00036 $rep=DbConnect(); +00037 include_once ("class_user.php"); +00038 $User=new cl_user($rep); +00039 $User->Check(); +00040 +00041 if ( isset( $_GET['$p_jrn'] )) { +00042 $p_jrn=$_GE['p_jrn']; +00043 $_SESSION[ "p_jrn"]=$p_jrn; +00044 +00045 } +00046 $cn=DbConnect($_SESSION['g_dossier']); +00047 $jrn_op=$_GET['jrn_op']; +00048 list ($l_array,$max_deb,$max_cred)=GetData($cn,$jrn_op); +00049 foreach ($l_array as $key=>$element) { +00050 ${"e_$key"}=$element; +00051 echo_debug('jrn_op_detail.php',__LINE__,"jrn_op_detail.php e_$key =$element"); +00052 } +00053 +00054 echo '<div align="center"> Opération </div>'; +00055 +00056 echo 'Date : '.$e_op_date; +00057 echo '<div style="border-style:solid;border-width:1pt;">'; +00058 echo $e_comment; +00059 echo '</DIV>'; +00060 +00061 if ( isset ($e_ech) ) { +00062 echo "<DIV> Echeance $e_ech </DIV>"; +00063 } +00064 echo '<div style="background-color:#BFC2D5;">'; +00065 +00066 for ( $i = 0; $i < $max_deb;$i++) { +00067 $lib=GetPosteLibelle($_SESSION['g_dossier'],${"e_class_deb$i"}); +00068 echo ${"e_class_deb$i"}." $lib "."<B>".${"e_mont_deb$i"}."</B>.<br>"; +00069 +00070 } +00071 echo "</div>"; +00072 echo '<div style="background-color:#E8F4FF;margin-left:50px;">'; +00073 for ( $i = 0; $i < $max_cred;$i++) { +00074 $lib=GetPosteLibelle($_SESSION['g_dossier'],${"e_class_cred$i"}); +00075 +00076 echo ${"e_class_cred$i"}." $lib "."<B>".${"e_mont_cred$i"}."</B><br>"; +00077 } +00078 echo '</div>'; +00079 +00080 $a=GetConcerned($cn,$e_jr_id); +00081 +00082 if ( $a != null ) { +00083 echo "operation concernée <br>"; +00084 echo '<div style="margin-left:30px;">'; +00085 foreach ($a as $key => $element) { +00086 +00087 echo "<A class=\"detail\" HREF=\"jrn_op_detail.php?jrn_op=".GetGrpt($cn,$element)."\"> ".GetInternal($cn,$element)."</A>"; +00088 }//for +00089 echo "</div>"; +00090 }// if ( $a != null ) { +00091 ?> +00092 <input type="button" onClick="window.close()" value="Fermer"> +00093 <? +00094 html_page_stop(); +00095 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__op__detail_8php.html b/doc/developper/html/jrn__op__detail_8php.html index 7583f3684..adb51cafb 100644 --- a/doc/developper/html/jrn__op__detail_8php.html +++ b/doc/developper/html/jrn__op__detail_8php.html @@ -4,10 +4,12 @@ - + -

    jrn_op_detail.php File Reference

    +

    jrn_op_detail.php File Reference

    Show the detail of a operation in a popup windows. More... +

    +

    Go to the source code of this file. @@ -21,7 +23,12 @@
     $a = GetConcerned($cn,$e_jr_id)
    -


    Variable Documentation

    +

    Detailed Description

    +Show the detail of a operation in a popup windows. +

    + +

    +Definition in file jrn_op_detail.php.


    Variable Documentation

    @@ -44,7 +51,7 @@

    -Definition at line 77 of file jrn_op_detail.php. +Definition at line 80 of file jrn_op_detail.php.

    @@ -69,7 +76,7 @@ Definition at line

    -Definition at line 44 of file jrn_op_detail.php. +Definition at line 47 of file jrn_op_detail.php.

    @@ -94,7 +101,7 @@ Definition at line

    -Definition at line 33 of file jrn_op_detail.php. +Definition at line 36 of file jrn_op_detail.php.

    @@ -119,10 +126,10 @@ Definition at line

    -Definition at line 35 of file jrn_op_detail.php. +Definition at line 38 of file jrn_op_detail.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__pdf_8php-source.html b/doc/developper/html/jrn__pdf_8php-source.html index 944d707df..9ee38bc0a 100644 --- a/doc/developper/html/jrn__pdf_8php-source.html +++ b/doc/developper/html/jrn__pdf_8php-source.html @@ -4,7 +4,7 @@ - +

    jrn_pdf.php

    Go to the documentation of this file.
    00001 <?
    @@ -30,143 +30,142 @@
     00021 
     00022 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00023 // $Revision$
    -00024 
    -00025 if ( ! isset($_SESSION['g_dossier']) ) {
    -00026   echo "INVALID G_DOSSIER UNKNOWN !!! ";
    -00027   exit();
    -00028 }
    -00029 include_once('class_user.php');
    -00030 include_once("jrn.php");
    -00031 include_once("ac_common.php");
    -00032 include_once("postgres.php");
    -00033 include_once("class.ezpdf.php");
    -00034 include_once("impress_inc.php");
    -00035 include_once("preference.php");
    -00036 include_once("class_jrn.php");
    -00037 include_once("check_priv.php");
    -00038 
    -00039 echo_debug('jrn_pdf.php',__LINE__,"imp pdf journaux");
    -00040 $cn=DbConnect($_SESSION['g_dossier']);
    -00041 $l_type="JRN";
    -00042 $centr=" Non centralisé";
    -00043 $l_centr=0;
    -00044 if ($_GET['central'] == 'on' ) {
    -00045   $centr=" centralisé ";
    -00046   $l_centr=1;
    -00047 }
    -00048 $Jrn=new jrn($cn,$_GET['jrn_id']);
    -00049 
    -00050 $Jrn->GetName();
    -00051 $User=new cl_user(DbConnect());
    -00052 $User->Check();
    -00053 
    -00054 // Security
    -00055 if ($User->CheckAction($cn,IMP) == 0 ||
    -00056     $User->AccessJrn($cn,$_GET['jrn_id']) == false){
    -00057     /* Cannot Access */
    -00058     NoAccess();
    -00059  }
    -00060 
    -00061 $ret="";
    -00062 $pdf=& new Cezpdf("A4");
    -00063 $pdf->selectFont('./addon/fonts/Helvetica.afm');
    -00064 
    -00065 // filter : 0 for Grand Livre otherwise 1
    -00066 $filter=( $Jrn->id == 0)?0:1;
    +00028 if ( ! isset($_SESSION['g_dossier']) ) {
    +00029   echo "INVALID G_DOSSIER UNKNOWN !!! ";
    +00030   exit();
    +00031 }
    +00032 include_once('class_user.php');
    +00033 include_once("jrn.php");
    +00034 include_once("ac_common.php");
    +00035 include_once("postgres.php");
    +00036 include_once("class.ezpdf.php");
    +00037 include_once("impress_inc.php");
    +00038 include_once("preference.php");
    +00039 include_once("class_jrn.php");
    +00040 include_once("check_priv.php");
    +00041 
    +00042 echo_debug('jrn_pdf.php',__LINE__,"imp pdf journaux");
    +00043 $cn=DbConnect($_SESSION['g_dossier']);
    +00044 $l_type="JRN";
    +00045 $centr=" Non centralisé";
    +00046 $l_centr=0;
    +00047 if ($_GET['central'] == 'on' ) {
    +00048   $centr=" centralisé ";
    +00049   $l_centr=1;
    +00050 }
    +00051 $Jrn=new jrn($cn,$_GET['jrn_id']);
    +00052 
    +00053 $Jrn->GetName();
    +00054 $User=new cl_user(DbConnect());
    +00055 $User->Check();
    +00056 
    +00057 // Security
    +00058 if ($User->CheckAction($cn,IMP) == 0 ||
    +00059     $User->AccessJrn($cn,$_GET['jrn_id']) == false){
    +00060     /* Cannot Access */
    +00061     NoAccess();
    +00062  }
    +00063 
    +00064 $ret="";
    +00065 $pdf=& new Cezpdf("A4");
    +00066 $pdf->selectFont('./addon/fonts/Helvetica.afm');
     00067 
    -00068 $offset=0;$limit=22;$step=22;
    -00069 $rap_deb=0;$rap_cred=0;
    -00070 while (1) {
    -00071   $a=0;
    -00072   list ($a_jrn,$tot_deb,$tot_cred)=$Jrn->GetRow($_GET['from_periode'],
    -00073                                           $_GET['to_periode'],
    -00074                                           $_GET['central'],
    -00075                                           $limit,$offset);
    -00076   echo_debug('jrn_pdf.php',__LINE__,"Total debit $tot_deb,credit $tot_cred");
    -00077 
    -00078   if ( $a_jrn==null) break;
    -00079   $offset+=$step; 
    -00080   $first_id=$a_jrn[0]['int_j_id'];
    -00081   $Exercice=GetExercice($cn,$a_jrn[0]['periode']);
    -00082 
    -00083 
    -00084   list($rap_deb,$rap_cred)=GetRappel($cn,$first_id,$Jrn->id,$Exercice,FIRST,
    -00085                                      $filter,
    -00086                                      $l_centr
    -00087                                      );
    -00088   echo_debug('jrn_pdf.php',__LINE__,"MONTANT $rap_deb,$rap_cred");
    -00089   echo_debug('jrn_pdf.php',__LINE__,"  list($rap_deb,$rap_cred)=GetRappel($cn,$first_id,".$Jrn->id.",$Exercice,FIRST)");
    -00090   $pdf->ezText($Jrn->name,30);
    -00091 
    -00092   if (  $l_centr == 1 ) {
    -00093     // si centralisé montre les montants de rappel
    -00094   $str_debit=sprintf( "report Débit  % 10.2f",$rap_deb);
    -00095   $str_credit=sprintf("report Crédit % 10.2f",$rap_cred);
    -00096   $pdf->ezText($str_debit,12,array('justification'=>'right'));
    -00097   $pdf->ezText($str_credit,12,array('justification'=>'right'));
    -00098   }
    -00099 
    -00100   $pdf->ezTable($a_jrn,
    -00101                 array ('j_id'=>' Numéro',
    -00102                        'j_date' => 'Date',
    -00103                        'poste'=>'Poste',
    -00104                        'description' => 'Description',
    -00105                        'deb_montant'=> 'Débit',
    -00106                        'cred_montant'=>'Crédit')," ",
    -00107                 array('shaded'=>0,'showHeadings'=>1,'width'=>500,
    -00108                       'cols'=>array('deb_montant'=> array('justification'=>'right'),
    -00109                       'cred_montant'=> array('justification'=>'right'))));
    -00110   $a=1;
    -00111   // Total Page
    -00112   $apage=array(array('deb'=>sprintf("%8.2f",$tot_deb),'cred'=>$tot_cred));
    -00113   foreach ($apage as $key=>$element) echo_debug('jrn_pdf.php',__LINE__,"apage $key => $element");
    -00114   $pdf->ezTable($apage,
    -00115                 array (
    -00116                        'deb'=> 'Total Débit',
    -00117                        'cred'=>'Total Crédit')," ",
    -00118                 array('shaded'=>0,'showHeadings'=>1,'width'=>200,
    -00119                       'xPos'=>'right','xOrientation'=>'left',
    -00120                       'cols'=>array('deb'=> array('justification'=>'right'),
    -00121                       'cred'=> array('justification'=>'right'))));
    -00122 
    -00123   $count=count($a_jrn)-1;
    -00124   $last_id=$a_jrn[$count]['int_j_id'];
    -00125   $Exercice=GetExercice($cn,$a_jrn[$count]['periode']);
    -00126   if ( $l_centr == 1) {
    -00127     // Montant de rappel si centralisé
    -00128     list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$Jrn->id,$Exercice,LAST,$filter,$l_centr);
    -00129     $str_debit=sprintf( "à reporter Débit  % 10.2f",$rap_deb);
    -00130     $str_credit=sprintf("à reporter Crédit % 10.2f",$rap_cred);
    -00131     $pdf->ezText($str_debit,12,array('justification'=>'right'));
    -00132     $pdf->ezText($str_credit,12,array('justification'=>'right'));
    -00133   }
    -00134   //New page
    -00135   $pdf->ezNewPage();
    -00136 }    
    -00137 if ( $a == 1 )   {
    -00138   $apage=array('deb'=>$tot_deb,'cred'=>$tot_cred);
    -00139 $pdf->ezTable($apage,
    -00140                 array (
    -00141                        'deb'=> 'Total Débit',
    -00142                        'cred'=>'Total Crédit')," ",
    -00143                 array('shaded'=>0,'showHeadings'=>1,'width'=>500,
    -00144                       'cols'=>array('deb'=> array('justification'=>'right'),
    -00145                       'cred'=> array('justification'=>'right'))));
    -00146   $count=count($a_jrn)-1;
    -00147   $last_id=$a_jrn[$count]['int_j_id'];
    -00148   $Exercice=GetExercice($cn,$a_jrn[$count]['periode']);
    -00149 
    -00150   list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$Jrn->id,$Exercice,LAST,$filter,$l_centr);
    -00151   $str_debit=sprintf( "à reporter  Débit % 10.2f",$rap_deb);
    -00152   $str_credit=sprintf("à reporter Crédit % 10.2f",$rap_cred);
    -00153   $pdf->ezText($str_debit,12,array('justification'=>'right'));
    -00154   $pdf->ezText($str_credit,12,array('justification'=>'right'));
    -00155 
    -00156 }
    -00157 $pdf->ezStream();
    +00068 // filter : 0 for Grand Livre otherwise 1
    +00069 $filter=( $Jrn->id == 0)?0:1;
    +00070 
    +00071 $offset=0;$limit=22;$step=22;
    +00072 $rap_deb=0;$rap_cred=0;
    +00073 while (1) {
    +00074   $a=0;
    +00075   list ($a_jrn,$tot_deb,$tot_cred)=$Jrn->GetRow($_GET['from_periode'],
    +00076                                           $_GET['to_periode'],
    +00077                                           $_GET['central'],
    +00078                                           $limit,$offset);
    +00079   echo_debug('jrn_pdf.php',__LINE__,"Total debit $tot_deb,credit $tot_cred");
    +00080 
    +00081   if ( $a_jrn==null) break;
    +00082   $offset+=$step; 
    +00083   $first_id=$a_jrn[0]['int_j_id'];
    +00084   $Exercice=GetExercice($cn,$a_jrn[0]['periode']);
    +00085 
    +00086 
    +00087   list($rap_deb,$rap_cred)=GetRappel($cn,$first_id,$Jrn->id,$Exercice,FIRST,
    +00088                                      $filter,
    +00089                                      $l_centr
    +00090                                      );
    +00091   echo_debug('jrn_pdf.php',__LINE__,"MONTANT $rap_deb,$rap_cred");
    +00092   echo_debug('jrn_pdf.php',__LINE__,"  list($rap_deb,$rap_cred)=GetRappel($cn,$first_id,".$Jrn->id.",$Exercice,FIRST)");
    +00093   $pdf->ezText($Jrn->name,30);
    +00094 
    +00095   if (  $l_centr == 1 ) {
    +00096     // si centralisé montre les montants de rappel
    +00097   $str_debit=sprintf( "report Débit  % 10.2f",$rap_deb);
    +00098   $str_credit=sprintf("report Crédit % 10.2f",$rap_cred);
    +00099   $pdf->ezText($str_debit,12,array('justification'=>'right'));
    +00100   $pdf->ezText($str_credit,12,array('justification'=>'right'));
    +00101   }
    +00102 
    +00103   $pdf->ezTable($a_jrn,
    +00104                 array ('j_id'=>' Numéro',
    +00105                        'j_date' => 'Date',
    +00106                        'poste'=>'Poste',
    +00107                        'description' => 'Description',
    +00108                        'deb_montant'=> 'Débit',
    +00109                        'cred_montant'=>'Crédit')," ",
    +00110                 array('shaded'=>0,'showHeadings'=>1,'width'=>500,
    +00111                       'cols'=>array('deb_montant'=> array('justification'=>'right'),
    +00112                       'cred_montant'=> array('justification'=>'right'))));
    +00113   $a=1;
    +00114   // Total Page
    +00115   $apage=array(array('deb'=>sprintf("%8.2f",$tot_deb),'cred'=>$tot_cred));
    +00116   foreach ($apage as $key=>$element) echo_debug('jrn_pdf.php',__LINE__,"apage $key => $element");
    +00117   $pdf->ezTable($apage,
    +00118                 array (
    +00119                        'deb'=> 'Total Débit',
    +00120                        'cred'=>'Total Crédit')," ",
    +00121                 array('shaded'=>0,'showHeadings'=>1,'width'=>200,
    +00122                       'xPos'=>'right','xOrientation'=>'left',
    +00123                       'cols'=>array('deb'=> array('justification'=>'right'),
    +00124                       'cred'=> array('justification'=>'right'))));
    +00125 
    +00126   $count=count($a_jrn)-1;
    +00127   $last_id=$a_jrn[$count]['int_j_id'];
    +00128   $Exercice=GetExercice($cn,$a_jrn[$count]['periode']);
    +00129   if ( $l_centr == 1) {
    +00130     // Montant de rappel si centralisé
    +00131     list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$Jrn->id,$Exercice,LAST,$filter,$l_centr);
    +00132     $str_debit=sprintf( "à reporter Débit  % 10.2f",$rap_deb);
    +00133     $str_credit=sprintf("à reporter Crédit % 10.2f",$rap_cred);
    +00134     $pdf->ezText($str_debit,12,array('justification'=>'right'));
    +00135     $pdf->ezText($str_credit,12,array('justification'=>'right'));
    +00136   }
    +00137   //New page
    +00138   $pdf->ezNewPage();
    +00139 }    
    +00140 if ( $a == 1 )   {
    +00141   $apage=array('deb'=>$tot_deb,'cred'=>$tot_cred);
    +00142 $pdf->ezTable($apage,
    +00143                 array (
    +00144                        'deb'=> 'Total Débit',
    +00145                        'cred'=>'Total Crédit')," ",
    +00146                 array('shaded'=>0,'showHeadings'=>1,'width'=>500,
    +00147                       'cols'=>array('deb'=> array('justification'=>'right'),
    +00148                       'cred'=> array('justification'=>'right'))));
    +00149   $count=count($a_jrn)-1;
    +00150   $last_id=$a_jrn[$count]['int_j_id'];
    +00151   $Exercice=GetExercice($cn,$a_jrn[$count]['periode']);
    +00152 
    +00153   list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$Jrn->id,$Exercice,LAST,$filter,$l_centr);
    +00154   $str_debit=sprintf( "à reporter  Débit % 10.2f",$rap_deb);
    +00155   $str_credit=sprintf("à reporter Crédit % 10.2f",$rap_cred);
    +00156   $pdf->ezText($str_debit,12,array('justification'=>'right'));
    +00157   $pdf->ezText($str_credit,12,array('justification'=>'right'));
     00158 
    -00159 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00159 } +00160 $pdf->ezStream(); +00161 +00162 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__pdf_8php.html b/doc/developper/html/jrn__pdf_8php.html index 1f4be1d6d..9e1c7615c 100644 --- a/doc/developper/html/jrn__pdf_8php.html +++ b/doc/developper/html/jrn__pdf_8php.html @@ -4,10 +4,12 @@ - + -

    jrn_pdf.php File Reference

    +

    jrn_pdf.php File Reference

    Send a ledger in a pdf format. More... +

    +

    Go to the source code of this file. @@ -55,7 +57,12 @@
     $str_debit = sprintf( "à reporter Débit % 10.2f",$rap_deb)
    -


    Variable Documentation

    +

    Detailed Description

    +Send a ledger in a pdf format. +

    + +

    +Definition in file jrn_pdf.php.


    Variable Documentation

    @@ -78,7 +85,7 @@

    -Definition at line 110 of file jrn_pdf.php. +Definition at line 113 of file jrn_pdf.php.

    @@ -103,7 +110,7 @@ Definition at line 110

    -Definition at line 112 of file jrn_pdf.php. +Definition at line 115 of file jrn_pdf.php.

    @@ -128,7 +135,7 @@ Definition at line 112

    -Definition at line 42 of file jrn_pdf.php. +Definition at line 45 of file jrn_pdf.php.

    Referenced by ViewImp(). @@ -155,7 +162,7 @@ Referenced by ViewImp(

    -Definition at line 40 of file jrn_pdf.php. +Definition at line 43 of file jrn_pdf.php.

    @@ -180,7 +187,7 @@ Definition at line 40

    -Definition at line 123 of file jrn_pdf.php. +Definition at line 126 of file jrn_pdf.php.

    @@ -205,7 +212,7 @@ Definition at line 123

    -Definition at line 81 of file jrn_pdf.php. +Definition at line 84 of file jrn_pdf.php.

    @@ -230,9 +237,9 @@ Definition at line 81

    -Definition at line 66 of file jrn_pdf.php. +Definition at line 69 of file jrn_pdf.php.

    -Referenced by FormODS(), and GetAvailableFolder(). +Referenced by FormODS(), and GetAvailableFolder().

    @@ -257,7 +264,7 @@ Referenced by FormO

    -Definition at line 80 of file jrn_pdf.php. +Definition at line 83 of file jrn_pdf.php.

    @@ -282,7 +289,7 @@ Definition at line 80

    -Definition at line 43 of file jrn_pdf.php. +Definition at line 46 of file jrn_pdf.php.

    @@ -307,7 +314,7 @@ Definition at line 43

    -Definition at line 41 of file jrn_pdf.php. +Definition at line 44 of file jrn_pdf.php.

    @@ -332,7 +339,7 @@ Definition at line 41

    -Definition at line 124 of file jrn_pdf.php. +Definition at line 127 of file jrn_pdf.php.

    @@ -357,9 +364,9 @@ Definition at line 124

    -Definition at line 68 of file jrn_pdf.php. +Definition at line 71 of file jrn_pdf.php.

    -Referenced by fiche::GetByDef(), and ListJrn(). +Referenced by fiche::GetByDef(), ListJrn(), and action::myList().

    @@ -384,7 +391,7 @@ Referenced by fiche::G

    -Definition at line 68 of file jrn_pdf.php. +Definition at line 71 of file jrn_pdf.php.

    @@ -409,7 +416,7 @@ Definition at line 68

    -Definition at line 62 of file jrn_pdf.php. +Definition at line 65 of file jrn_pdf.php.

    @@ -434,7 +441,7 @@ Definition at line 62

    -Definition at line 69 of file jrn_pdf.php. +Definition at line 72 of file jrn_pdf.php.

    @@ -459,7 +466,7 @@ Definition at line 69

    -Definition at line 69 of file jrn_pdf.php. +Definition at line 72 of file jrn_pdf.php.

    @@ -484,7 +491,7 @@ Definition at line 69

    -Definition at line 61 of file jrn_pdf.php. +Definition at line 64 of file jrn_pdf.php.

    @@ -509,7 +516,7 @@ Definition at line 61

    -Definition at line 68 of file jrn_pdf.php. +Definition at line 71 of file jrn_pdf.php.

    @@ -534,7 +541,7 @@ Definition at line 68

    -Definition at line 95 of file jrn_pdf.php. +Definition at line 98 of file jrn_pdf.php.

    @@ -559,7 +566,7 @@ Definition at line 95

    -Definition at line 129 of file jrn_pdf.php. +Definition at line 132 of file jrn_pdf.php.

    @@ -584,10 +591,10 @@ Definition at line 129

    -Definition at line 51 of file jrn_pdf.php. +Definition at line 54 of file jrn_pdf.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__search_8php-source.html b/doc/developper/html/jrn__search_8php-source.html index aa88684cb..8896c3c8f 100644 --- a/doc/developper/html/jrn__search_8php-source.html +++ b/doc/developper/html/jrn__search_8php-source.html @@ -4,7 +4,7 @@ - +

    jrn_search.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,218 +27,218 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 require_once ("ac_common.php");
    -00022 require_once ("postgres.php");
    -00023 require_once("user_common.php");
    -00024 /* Admin. Dossier */
    -00025 $rep=DbConnect();
    -00026 include_once ("class_user.php");
    -00027 $User=new cl_user($rep);
    -00028 $User->Check();
    -00029 
    -00030 
    -00031 html_page_start($User->theme,"onLoad='window.focus();'");
    -00032 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00033   echo "You must choose a Dossier ";
    -00034   phpinfo();
    -00035   exit -2;
    -00036 }
    -00037 // Javascript
    -00038 echo JS_CONCERNED_OP;
    -00039 if ( isset( $p_jrn )) {
    -00040   $p_jrn=$p_jrn;
    -00041   $_SESSION[ "p_jrn"]=$p_jrn;
    -00042 
    -00043 }
    -00044 if (isset ($_GET['p_ctl'])) $p_ctl=$_GET['p_ctl'];
    -00045 if (isset($_POST['p_ctl'])) $p_ctl=$_POST['p_ctl'];
    -00046 $opt='<OPTION VALUE="="> =';
    -00047 $opt.='<OPTION VALUE="<="> <=';
    -00048 $opt.='<OPTION VALUE="<"> <';
    -00049 $opt.='<OPTION VALUE=">"> >';
    -00050 $opt.='<OPTION VALUE=">="> >=';
    -00051 $opt_date=$opt;
    -00052 $opt_montant=$opt;
    -00053 $c_comment="";
    -00054 $c_montant="";
    -00055 $c_internal="";
    -00056 $c_date="";
    -00057 $condition="";
    -00058 $part=" where ";
    -00059 $cn=DbConnect($_SESSION['g_dossier']);
    -00060 // if search then build the condition
    -00061 if ( isset ($_GET["search"]) ) {
    -00062   $c1=0;
    -00063   foreach( $_GET as $key=>$element){
    -00064     echo_debug('jrn_search.php',__LINE__,"$key = $element");
    -00065     ${"$key"}=$element;
    -00066   }
    -00067 
    -00068   if ( strlen(trim($p_comment)) != 0 ) {
    -00069     $c_comment=" $part upper(jr_comment) like upper('%$p_comment%')";
    -00070     $part=" and ";
    -00071   }
    -00072   if ( strlen($p_montant) != 0 && (ereg ("^[0-9]*\.[0-9]*$",$p_montant) ||
    -00073                                    ereg ("^[0-9]*$",$p_montant)) )
    -00074       { 
    -00075     $c_montant=sprintf(" $part jr_montant %s %s",$p_montant_sel,$p_montant);
    -00076     $opt_montant.='<OPTION VALUE="'.$p_montant_sel.'" SELECTED>'.$p_montant_sel;
    -00077     $part="  and ";
    -00078     }
    -00079   if ( strlen(trim($p_date)) != 0 ) {
    -00080       $c_date=sprintf(" $part j_date %s to_date('%s','DD.MM.YYYY')",$p_date_sel,$p_date);
    -00081       $part=" and ";
    -00082       $opt_date.='<OPTION VALUE="'.$p_date_sel.'" SELECTED>'.$p_date_sel;
    -00083   }
    -00084   if ( strlen(trim($p_internal)) != 0 ) {
    -00085     $c_internal=$part." jr_internal like  ('%".$p_internal."%')";
    -00086     $part=" and ";
    -00087 
    -00088   }
    -00089 
    -00090 $condition=$c_comment.$c_montant.$c_date.$c_internal;
    -00091 echo_debug('jrn_search.php',__LINE__,"condition = $condition");
    -00092 }
    -00093 $condition=$condition." ".$part;
    -00094 
    -00095 // If the usr is admin he has all right
    -00096 if ( $User->admin != 1 ) {
    -00097   $condition.="  uj_priv in ('W','R') and uj_login='".$User->id."'" ;
    -00098 } else {
    -00099   $condition.=" uj_login='".$User->id."' ";
    -00100 }
    -00101 ?>
    -00102 <div style="font-size:11px;">
    -00103 <?
    -00104 echo '<FORM ACTION="jrn_search.php" METHOD="GET">';
    -00105 echo '<TABLE>';
    -00106 echo '<TR>';
    -00107 if ( ! isset ($p_date)) $p_date="";
    -00108 if ( ! isset ($p_montant)) $p_montant="";
    -00109 if ( ! isset ($p_comment)) $p_comment="";
    -00110 if ( ! isset ($p_internal)) $p_internal="";
    -00111 echo '<input type="hidden" name="p_ctl" value="'.$p_ctl.'">';
    -00112 echo '<TD> Date </TD>';
    -00113 echo '<TD> <SELECT NAME="p_date_sel">'.$opt_date.' </TD>';
    -00114 echo '<TD> <INPUT TYPE="text" name="p_date" VALUE="'.$p_date.'"></TD>';
    -00115 
    -00116 echo '<TD> Montant </TD>';
    -00117 echo '<TD> <SELECT NAME="p_montant_sel">'.$opt_montant.' </TD>';
    -00118 echo '<TD> <INPUT TYPE="text" name="p_montant" VALUE="'.$p_montant.'"></TD>';
    -00119 echo '</TR><TR>';
    -00120 echo '<TD> Commentaire </TD>';
    -00121 echo '<TD> contient </TD>';
    -00122 echo '<TD> <INPUT TYPE="text" name="p_comment" VALUE="'.$p_comment.'"></TD>';
    -00123 ?>
    -00124 </TR><TR>
    -00125 <TD> Code interne </TD><TD>comme </TD>
    -00126 <?
    -00127 echo '<TD> <INPUT TYPE="text" name="p_internal" VALUE="'.$p_internal.'"></TD>';
    -00128 echo "</TR>";
    -00129 
    -00130 echo '</TABLE>';
    -00131 echo '<INPUT TYPE="submit" name="search" value="cherche">';
    -00132 echo '</FORM>';
    +00025 require_once ("ac_common.php");
    +00026 require_once ("postgres.php");
    +00027 require_once("user_common.php");
    +00028 /* Admin. Dossier */
    +00029 $rep=DbConnect();
    +00030 include_once ("class_user.php");
    +00031 $User=new cl_user($rep);
    +00032 $User->Check();
    +00033 
    +00034 
    +00035 html_page_start($User->theme,"onLoad='window.focus();'");
    +00036 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00037   echo "You must choose a Dossier ";
    +00038   phpinfo();
    +00039   exit -2;
    +00040 }
    +00041 // Javascript
    +00042 echo JS_CONCERNED_OP;
    +00043 if ( isset( $p_jrn )) {
    +00044   $p_jrn=$p_jrn;
    +00045   $_SESSION[ "p_jrn"]=$p_jrn;
    +00046 
    +00047 }
    +00048 if (isset ($_GET['p_ctl'])) $p_ctl=$_GET['p_ctl'];
    +00049 if (isset($_POST['p_ctl'])) $p_ctl=$_POST['p_ctl'];
    +00050 $opt='<OPTION VALUE="="> =';
    +00051 $opt.='<OPTION VALUE="<="> <=';
    +00052 $opt.='<OPTION VALUE="<"> <';
    +00053 $opt.='<OPTION VALUE=">"> >';
    +00054 $opt.='<OPTION VALUE=">="> >=';
    +00055 $opt_date=$opt;
    +00056 $opt_montant=$opt;
    +00057 $c_comment="";
    +00058 $c_montant="";
    +00059 $c_internal="";
    +00060 $c_date="";
    +00061 $condition="";
    +00062 $part=" where ";
    +00063 $cn=DbConnect($_SESSION['g_dossier']);
    +00064 // if search then build the condition
    +00065 if ( isset ($_GET["search"]) ) {
    +00066   $c1=0;
    +00067   foreach( $_GET as $key=>$element){
    +00068     echo_debug('jrn_search.php',__LINE__,"$key = $element");
    +00069     ${"$key"}=$element;
    +00070   }
    +00071 
    +00072   if ( strlen(trim($p_comment)) != 0 ) {
    +00073     $c_comment=" $part upper(jr_comment) like upper('%$p_comment%')";
    +00074     $part=" and ";
    +00075   }
    +00076   if ( strlen($p_montant) != 0 && (ereg ("^[0-9]*\.[0-9]*$",$p_montant) ||
    +00077                                    ereg ("^[0-9]*$",$p_montant)) )
    +00078       { 
    +00079     $c_montant=sprintf(" $part jr_montant %s %s",$p_montant_sel,$p_montant);
    +00080     $opt_montant.='<OPTION VALUE="'.$p_montant_sel.'" SELECTED>'.$p_montant_sel;
    +00081     $part="  and ";
    +00082     }
    +00083   if ( strlen(trim($p_date)) != 0 ) {
    +00084       $c_date=sprintf(" $part j_date %s to_date('%s','DD.MM.YYYY')",$p_date_sel,$p_date);
    +00085       $part=" and ";
    +00086       $opt_date.='<OPTION VALUE="'.$p_date_sel.'" SELECTED>'.$p_date_sel;
    +00087   }
    +00088   if ( strlen(trim($p_internal)) != 0 ) {
    +00089     $c_internal=$part." jr_internal like  ('%".$p_internal."%')";
    +00090     $part=" and ";
    +00091 
    +00092   }
    +00093 
    +00094 $condition=$c_comment.$c_montant.$c_date.$c_internal;
    +00095 echo_debug('jrn_search.php',__LINE__,"condition = $condition");
    +00096 }
    +00097 $condition=$condition." ".$part;
    +00098 
    +00099 // If the usr is admin he has all right
    +00100 if ( $User->admin != 1 ) {
    +00101   $condition.="  uj_priv in ('W','R') and uj_login='".$User->id."'" ;
    +00102 } else {
    +00103   $condition.=" uj_login='".$User->id."' ";
    +00104 }
    +00105 ?>
    +00106 <div style="font-size:11px;">
    +00107 <?
    +00108 echo '<FORM ACTION="jrn_search.php" METHOD="GET">';
    +00109 echo '<TABLE>';
    +00110 echo '<TR>';
    +00111 if ( ! isset ($p_date)) $p_date="";
    +00112 if ( ! isset ($p_montant)) $p_montant="";
    +00113 if ( ! isset ($p_comment)) $p_comment="";
    +00114 if ( ! isset ($p_internal)) $p_internal="";
    +00115 echo '<input type="hidden" name="p_ctl" value="'.$p_ctl.'">';
    +00116 echo '<TD> Date </TD>';
    +00117 echo '<TD> <SELECT NAME="p_date_sel">'.$opt_date.' </TD>';
    +00118 echo '<TD> <INPUT TYPE="text" name="p_date" VALUE="'.$p_date.'"></TD>';
    +00119 
    +00120 echo '<TD> Montant </TD>';
    +00121 echo '<TD> <SELECT NAME="p_montant_sel">'.$opt_montant.' </TD>';
    +00122 echo '<TD> <INPUT TYPE="text" name="p_montant" VALUE="'.$p_montant.'"></TD>';
    +00123 echo '</TR><TR>';
    +00124 echo '<TD> Commentaire </TD>';
    +00125 echo '<TD> contient </TD>';
    +00126 echo '<TD> <INPUT TYPE="text" name="p_comment" VALUE="'.$p_comment.'"></TD>';
    +00127 ?>
    +00128 </TR><TR>
    +00129 <TD> Code interne </TD><TD>comme </TD>
    +00130 <?
    +00131 echo '<TD> <INPUT TYPE="text" name="p_internal" VALUE="'.$p_internal.'"></TD>';
    +00132 echo "</TR>";
     00133 
    -00134 // if a search is asked otherwise don't show all the rows
    -00135 if ( isset ($_GET["search"]) ) {
    -00136   $sql="select j_id,to_char(j_date,'DD.MM.YYYY') as j_date,
    -00137                  j_montant,j_poste,j_debit,j_tech_per,jr_id,jr_comment,j_grpt,pcm_lib,jr_internal from jrnx inner join 
    -00138                  jrn on jr_grpt_id=j_grpt inner join tmp_pcmn on j_poste=pcm_val ".
    -00139     " inner join user_sec_jrn on uj_jrn_id=j_jrn_def".
    -00140     $condition." order by jr_date,jr_id,j_debit desc";
    -00141   $Res=ExecSql($cn,$sql);
    -00142 
    -00143   $MaxLine=pg_NumRows($Res);
    -00144   $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    -00145   $limit=$_SESSION['g_pagesize'];
    -00146   $sql_limit="";
    -00147   $sql_offset="";
    -00148   $bar="";
    -00149   if ( $limit != -1) {
    -00150     $page=(isset($_GET['page']))?$_GET['page']:0;
    -00151     $sql_limit=" LIMIT $limit ";
    -00152     $sql_offset=" OFFSET $offset ";
    -00153     $bar=jrn_navigation_bar($offset,$MaxLine,$limit,$page);
    -00154 
    -00155   }
    -00156   $sql.=$sql_limit.$sql_offset;
    -00157    if ( $MaxLine==0) { 
    -00158      html_page_stop();
    -00159      return;
    -00160    }
    -00161   $Res=ExecSql($cn,$sql);
    -00162   $MaxLine=pg_NumRows($Res);
    -00163 
    -00164   $col_vide="<TD></TD>";
    -00165   echo $bar;
    -00166   echo '<TABLE ALIGN="center" BORDER="0" CELLSPACING="O">';
    -00167   $l_id="";
    -00168 //   if ( $MaxLine > 250 ) {
    -00169 //     echo "Trop de lignes redéfinir la recherche";
    -00170 //     html_page_stop();
    -00171 //     return;
    -00172 //   }
    -00173   for ( $i=0; $i < $MaxLine; $i++) {
    -00174     $l_line=pg_fetch_array($Res,$i);
    -00175     if ( $l_id == $l_line['j_grpt'] ) {
    -00176       echo $col_vide.$col_vide;
    -00177     } else {
    -00178       echo "<TR><TD>";
    -00179       echo '<INPUT TYPE="CHECKBOX" onClick="GetIt(\''.$p_ctl.'\',\''.$l_line['jr_id']."')\" >";
    -00180       echo "</TD>";
    -00181 
    -00182       echo "<TD>";
    -00183       echo $l_line['j_date'];
    +00134 echo '</TABLE>';
    +00135 echo '<INPUT TYPE="submit" name="search" value="cherche">';
    +00136 echo '</FORM>';
    +00137 
    +00138 // if a search is asked otherwise don't show all the rows
    +00139 if ( isset ($_GET["search"]) ) {
    +00140   $sql="select j_id,to_char(j_date,'DD.MM.YYYY') as j_date,
    +00141                  j_montant,j_poste,j_debit,j_tech_per,jr_id,jr_comment,j_grpt,pcm_lib,jr_internal from jrnx inner join 
    +00142                  jrn on jr_grpt_id=j_grpt inner join tmp_pcmn on j_poste=pcm_val ".
    +00143     " inner join user_sec_jrn on uj_jrn_id=j_jrn_def".
    +00144     $condition." order by jr_date,jr_id,j_debit desc";
    +00145   $Res=ExecSql($cn,$sql);
    +00146 
    +00147   $MaxLine=pg_NumRows($Res);
    +00148   $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    +00149   $limit=$_SESSION['g_pagesize'];
    +00150   $sql_limit="";
    +00151   $sql_offset="";
    +00152   $bar="";
    +00153   if ( $limit != -1) {
    +00154     $page=(isset($_GET['page']))?$_GET['page']:0;
    +00155     $sql_limit=" LIMIT $limit ";
    +00156     $sql_offset=" OFFSET $offset ";
    +00157     $bar=jrn_navigation_bar($offset,$MaxLine,$limit,$page);
    +00158 
    +00159   }
    +00160   $sql.=$sql_limit.$sql_offset;
    +00161    if ( $MaxLine==0) { 
    +00162      html_page_stop();
    +00163      return;
    +00164    }
    +00165   $Res=ExecSql($cn,$sql);
    +00166   $MaxLine=pg_NumRows($Res);
    +00167 
    +00168   $col_vide="<TD></TD>";
    +00169   echo $bar;
    +00170   echo '<TABLE ALIGN="center" BORDER="0" CELLSPACING="O">';
    +00171   $l_id="";
    +00172 //   if ( $MaxLine > 250 ) {
    +00173 //     echo "Trop de lignes redéfinir la recherche";
    +00174 //     html_page_stop();
    +00175 //     return;
    +00176 //   }
    +00177   for ( $i=0; $i < $MaxLine; $i++) {
    +00178     $l_line=pg_fetch_array($Res,$i);
    +00179     if ( $l_id == $l_line['j_grpt'] ) {
    +00180       echo $col_vide.$col_vide;
    +00181     } else {
    +00182       echo "<TR><TD>";
    +00183       echo '<INPUT TYPE="CHECKBOX" onClick="GetIt(\''.$p_ctl.'\',\''.$l_line['jr_id']."')\" >";
     00184       echo "</TD>";
    -00185       
    +00185 
     00186       echo "<TD>";
    -00187       echo $l_line['jr_internal'];
    +00187       echo $l_line['j_date'];
     00188       echo "</TD>";
    -00189       $l_id=$l_line['j_grpt'];
    -00190       echo '<TD COLSPAN="4">'.$l_line['jr_comment'].'</TD></TR>';
    -00191     }
    -00192     if ( $l_line['j_debit'] == 't' ) {
    -00193       echo '<TR style="background-color:#E7FBFF;">';
    -00194     }
    -00195     else {
    -00196       echo '<TR style="background-color:#E7FFEB;">';
    -00197     }
    -00198     echo $col_vide;
    -00199     if ( $l_line['j_debit']=='f')
    -00200       echo $col_vide;
    -00201 
    -00202     echo '<TD>';
    -00203     echo $l_line['j_poste'];
    -00204     echo '</TD>';
    +00189       
    +00190       echo "<TD>";
    +00191       echo $l_line['jr_internal'];
    +00192       echo "</TD>";
    +00193       $l_id=$l_line['j_grpt'];
    +00194       echo '<TD COLSPAN="4">'.$l_line['jr_comment'].'</TD></TR>';
    +00195     }
    +00196     if ( $l_line['j_debit'] == 't' ) {
    +00197       echo '<TR style="background-color:#E7FBFF;">';
    +00198     }
    +00199     else {
    +00200       echo '<TR style="background-color:#E7FFEB;">';
    +00201     }
    +00202     echo $col_vide;
    +00203     if ( $l_line['j_debit']=='f')
    +00204       echo $col_vide;
     00205 
    -00206     if ( $l_line['j_debit']=='t')
    -00207       echo $col_vide;
    -00208 
    -00209     echo '<TD>';
    -00210     echo $l_line['pcm_lib'];
    -00211     echo '</TD>';
    +00206     echo '<TD>';
    +00207     echo $l_line['j_poste'];
    +00208     echo '</TD>';
    +00209 
    +00210     if ( $l_line['j_debit']=='t')
    +00211       echo $col_vide;
     00212 
    -00213     if ( $l_line['j_debit']=='f')
    -00214       echo $col_vide;
    -00215 
    -00216     echo '<TD>';
    -00217     echo $l_line['j_montant'];
    -00218     echo '</TD>';
    +00213     echo '<TD>';
    +00214     echo $l_line['pcm_lib'];
    +00215     echo '</TD>';
    +00216 
    +00217     if ( $l_line['j_debit']=='f')
    +00218       echo $col_vide;
     00219 
    -00220     echo "</TR>";
    -00221 
    -00222   }
    -00223   
    -00224   echo '</TABLE>';
    -00225   echo $bar;
    -00226 }// if $_POST [search]
    -00227 ?>
    -00228 </div>
    -00229 <?
    -00230 html_page_stop();
    +00220     echo '<TD>';
    +00221     echo $l_line['j_montant'];
    +00222     echo '</TD>';
    +00223 
    +00224     echo "</TR>";
    +00225 
    +00226   }
    +00227   
    +00228   echo '</TABLE>';
    +00229   echo $bar;
    +00230 }// if $_POST [search]
     00231 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00232 </div> +00233 <? +00234 html_page_stop(); +00235 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__search_8php.html b/doc/developper/html/jrn__search_8php.html index 7c8b68503..da6bdeb30 100644 --- a/doc/developper/html/jrn__search_8php.html +++ b/doc/developper/html/jrn__search_8php.html @@ -4,10 +4,12 @@ - + -

    jrn_search.php File Reference

    +

    jrn_search.php File Reference

    Search a operation from a ledger into a popup window, used for the "rapprochement". More... +

    +

    Go to the source code of this file. @@ -61,7 +63,12 @@
     $l_id = ""
    -


    Variable Documentation

    +

    Detailed Description

    +Search a operation from a ledger into a popup window, used for the "rapprochement". +

    + +

    +Definition in file jrn_search.php.


    Variable Documentation

    @@ -84,7 +91,7 @@

    -Definition at line 148 of file jrn_search.php. +Definition at line 152 of file jrn_search.php.

    @@ -109,7 +116,7 @@ Definition at line 148<

    -Definition at line 53 of file jrn_search.php. +Definition at line 57 of file jrn_search.php.

    @@ -134,7 +141,7 @@ Definition at line 53

    -Definition at line 56 of file jrn_search.php. +Definition at line 60 of file jrn_search.php.

    @@ -159,7 +166,7 @@ Definition at line 56

    -Definition at line 55 of file jrn_search.php. +Definition at line 59 of file jrn_search.php.

    @@ -184,7 +191,7 @@ Definition at line 55

    -Definition at line 54 of file jrn_search.php. +Definition at line 58 of file jrn_search.php.

    @@ -209,7 +216,7 @@ Definition at line 54

    -Definition at line 59 of file jrn_search.php. +Definition at line 63 of file jrn_search.php.

    @@ -234,9 +241,9 @@ Definition at line 59

    -Definition at line 164 of file jrn_search.php. +Definition at line 168 of file jrn_search.php.

    -Referenced by UpdateJrn(), ViewJrn(), and ViewRecord(). +Referenced by UpdateJrn(), ViewJrn(), and ViewRecord().

    @@ -261,7 +268,7 @@ Referenced by UpdateJrn(),

    -Definition at line 57 of file jrn_search.php. +Definition at line 61 of file jrn_search.php.

    @@ -286,7 +293,7 @@ Definition at line 57

    -Definition at line 167 of file jrn_search.php. +Definition at line 171 of file jrn_search.php.

    @@ -311,7 +318,7 @@ Definition at line 167<

    -Definition at line 145 of file jrn_search.php. +Definition at line 149 of file jrn_search.php.

    @@ -336,9 +343,9 @@ Definition at line 145<

    -Definition at line 143 of file jrn_search.php. +Definition at line 147 of file jrn_search.php.

    -Referenced by Centralise(), GetData(), GetDataJrnJrId(), and ViewJrn(). +Referenced by Centralise(), GetData(), GetDataJrnJrId(), and ViewJrn().

    @@ -363,7 +370,7 @@ Referenced by Centrali

    -Definition at line 144 of file jrn_search.php. +Definition at line 148 of file jrn_search.php.

    @@ -388,9 +395,9 @@ Definition at line 144<

    -Definition at line 46 of file jrn_search.php. +Definition at line 50 of file jrn_search.php.

    -Referenced by Cpdf::newPage(), and u_ShowMenuRecherche(). +Referenced by Cpdf::newPage(), and u_ShowMenuRecherche().

    @@ -415,7 +422,7 @@ Referenced by Cpdf::newP

    -Definition at line 51 of file jrn_search.php. +Definition at line 55 of file jrn_search.php.

    @@ -440,7 +447,7 @@ Definition at line 51

    -Definition at line 52 of file jrn_search.php. +Definition at line 56 of file jrn_search.php.

    @@ -465,7 +472,7 @@ Definition at line 52

    -Definition at line 58 of file jrn_search.php. +Definition at line 62 of file jrn_search.php.

    @@ -490,7 +497,7 @@ Definition at line 58

    -Definition at line 25 of file jrn_search.php. +Definition at line 29 of file jrn_search.php.

    @@ -515,7 +522,7 @@ Definition at line 25

    -Definition at line 161 of file jrn_search.php. +Definition at line 165 of file jrn_search.php.

    @@ -540,7 +547,7 @@ Definition at line 161<

    -Definition at line 156 of file jrn_search.php. +Definition at line 160 of file jrn_search.php.

    @@ -565,9 +572,9 @@ Definition at line 156<

    -Definition at line 146 of file jrn_search.php. +Definition at line 150 of file jrn_search.php.

    -Referenced by ViewFiche(). +Referenced by ViewFiche().

    @@ -592,9 +599,9 @@ Referenced by ViewFiche(

    -Definition at line 147 of file jrn_search.php. +Definition at line 151 of file jrn_search.php.

    -Referenced by ViewFiche(). +Referenced by ViewFiche().

    @@ -619,7 +626,7 @@ Referenced by ViewFiche(

    -Definition at line 27 of file jrn_search.php. +Definition at line 31 of file jrn_search.php.

    @@ -644,7 +651,7 @@ Definition at line 27

    -Definition at line 35 of file jrn_search.php. +Definition at line 39 of file jrn_search.php.

    @@ -669,10 +676,10 @@ Definition at line 35

    -Definition at line 159 of file jrn_search.php. +Definition at line 163 of file jrn_search.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__update_8php-source.html b/doc/developper/html/jrn__update_8php-source.html index 4c6f1b866..de8becb5b 100644 --- a/doc/developper/html/jrn__update_8php-source.html +++ b/doc/developper/html/jrn__update_8php-source.html @@ -4,7 +4,7 @@ - +

    jrn_update.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,44 +27,44 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 include_once ("ac_common.php");
    -00022 html_page_start($_SESSION['g_theme']);
    -00023 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00024   echo "You must choose a Dossier ";
    -00025   exit -2;
    -00026 }
    -00027 include_once ("postgres.php");
    -00028 /* Admin. Dossier */
    -00029 $rep=DbConnect();
    -00030 include_once ("class_user.php");
    -00031 $User=new cl_user($rep);
    -00032 $User->Check();
    -00033 
    -00034 include_once ("check_priv.php");
    -00035 
    -00036 include_once ("user_menu.php");
    -00037 
    -00038 echo '<div class="u_tmenu">';
    -00039 echo ShowMenuCompta($_SESSION['g_dossier']);
    -00040 echo '</div>';
    -00041 
    -00042 
    -00043 $cn=DbConnect($_SESSION['g_dossier']);
    -00044 if ( $User->CheckAction($cn,GJRN) == 0 ) {
    -00045   /* Cannot Access */
    -00046   NoAccess();
    -00047   exit -1;                      
    -00048  }
    -00049 
    -00050 echo '<div class="u_subtmenu">';
    -00051 echo ShowMenuAdvanced("jrn_update.php");
    -00052 echo '</div>';
    -00053 echo '<div class="lmenu">';
    -00054 MenuJrn($_SESSION['g_dossier']);
    +00024 include_once ("ac_common.php");
    +00025 html_page_start($_SESSION['g_theme']);
    +00026 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00027   echo "You must choose a Dossier ";
    +00028   exit -2;
    +00029 }
    +00030 include_once ("postgres.php");
    +00031 /* Admin. Dossier */
    +00032 $rep=DbConnect();
    +00033 include_once ("class_user.php");
    +00034 $User=new cl_user($rep);
    +00035 $User->Check();
    +00036 
    +00037 include_once ("check_priv.php");
    +00038 
    +00039 include_once ("user_menu.php");
    +00040 
    +00041 echo '<div class="u_tmenu">';
    +00042 echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php");
    +00043 echo '</div>';
    +00044 
    +00045 
    +00046 $cn=DbConnect($_SESSION['g_dossier']);
    +00047 if ( $User->CheckAction($cn,GJRN) == 0 ) {
    +00048   /* Cannot Access */
    +00049   NoAccess();
    +00050   exit -1;                      
    +00051  }
    +00052 
    +00053 echo '<div class="u_subtmenu">';
    +00054 echo ShowMenuAdvanced("jrn_update.php");
     00055 echo '</div>';
    -00056 html_page_stop();
    -00057 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00056 echo '<div class="lmenu">'; +00057 MenuJrn($_SESSION['g_dossier']); +00058 echo '</div>'; +00059 html_page_stop(); +00060 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/jrn__update_8php.html b/doc/developper/html/jrn__update_8php.html index ce0ab0503..74343a4dd 100644 --- a/doc/developper/html/jrn__update_8php.html +++ b/doc/developper/html/jrn__update_8php.html @@ -4,10 +4,12 @@ - + -

    jrn_update.php File Reference

    +

    jrn_update.php File Reference

    create, modify parameter ledger More... +

    +

    Go to the source code of this file. @@ -21,7 +23,12 @@
     exit
    -


    Variable Documentation

    +

    Detailed Description

    +create, modify parameter ledger +

    + +

    +Definition in file jrn_update.php.


    Variable Documentation

    @@ -44,7 +51,7 @@

    -Definition at line 43 of file jrn_update.php. +Definition at line 46 of file jrn_update.php.

    @@ -69,7 +76,7 @@ Definition at line 43

    -Definition at line 29 of file jrn_update.php. +Definition at line 32 of file jrn_update.php.

    @@ -94,7 +101,7 @@ Definition at line 29

    -Definition at line 31 of file jrn_update.php. +Definition at line 34 of file jrn_update.php.

    @@ -119,10 +126,10 @@ Definition at line 31

    -Definition at line 47 of file jrn_update.php. +Definition at line 50 of file jrn_update.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/line__update_8php-source.html b/doc/developper/html/line__update_8php-source.html index 05af4369f..b1d521758 100644 --- a/doc/developper/html/line__update_8php-source.html +++ b/doc/developper/html/line__update_8php-source.html @@ -4,7 +4,7 @@ - +

    line_update.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,102 +27,102 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 // $Revision$
    -00021 include_once ("ac_common.php");
    -00022 
    -00023 if ( !isset ($_SESSION['g_dossier'])) {
    -00024     echo "You must choose a Dossier ";
    -00025    exit -2;
    -00026 }
    -00027 include_once ("postgres.php");
    -00028 include_once("check_priv.php");
    -00029 
    -00030 /* Admin. Dossier */
    -00031 $rep=DbConnect();
    -00032 include_once ("class_user.php");
    -00033 $User=new cl_user($rep);
    -00034 $User->Check();
    -00035 html_page_start($User->theme,"onLoad='window.focus();'");
    -00036 
    -00037 if ( $User->CheckAction(DbConnect($_SESSION['g_dossier']),MPCMN) == 0 ) {
    -00038   /* Cannot Access */
    -00039   NoAccess();
    -00040   exit -1;                      
    -00041  }
    -00042 
    -00043 include ("user_menu.php");
    -00044 
    -00045 /* Modif d'une ligne */
    -00046 if ( isset ($_POST["update"] ) ) {
    -00047   foreach ($HTTP_POST_VARS as $name => $element) {
    -00048     echo_debug('line_update.php',__LINE__,"name $name $element");
    -00049   }
    -00050   echo JS_UPDATE_PCMN;
    -00051   $cn=DbConnect($_SESSION['g_dossier']);
    -00052     $p_val=trim($_POST["p_val"]);
    -00053     $p_lib=FormatString($_POST["p_name"]);
    -00054     $p_parent=trim($_POST["p_val_parent"]);
    -00055     $old_line=trim($_POST["p_old"]);
    -00056     echo_debug('line_update.php',__LINE__,"Update old : $old_line News = $p_val $p_lib");
    -00057     if ( strlen ($p_val) != 0 && strlen ($p_lib) != 0 && strlen($old_line)!=0 ) {
    -00058       if (strlen ($p_val) == 1 ) {
    -00059         $p_parent=0;
    -00060       } else {
    -00061         if ( strlen($p_parent)==0 ) {
    -00062           $p_parent=substr($p_val,0,strlen($p_val)-1);
    -00063           echo_debug('line_update.php',__LINE__,"Modif valeur = $p_val parent = $p_parent");
    -00064         }
    -00065       }
    -00066       /* Parent existe */
    -00067       $Ret=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val=$p_parent");
    -00068       if ( pg_NumRows($Ret) == 0 || $p_parent==$old_line ) {
    -00069         echo '<SCRIPT> alert(" Ne peut pas modifier; aucune poste parent"); </SCRIPT>';
    -00070       } else {
    -00071         
    -00072         $Ret=ExecSql($cn,"update tmp_pcmn set pcm_val=$p_val, pcm_lib='$p_lib',pcm_val_parent=$p_parent where pcm_val=$old_line");
    -00073       }
    -00074     } else {
    -00075       echo '<script> alert(\'Update Valeurs invalides\'); </script>';
    -00076     }
    -00077 
    -00078   echo "<script> 
    -00079         window.close();
    -00080          self.opener.RefreshMe();
    -00081 
    -00082         </script>";
    -00083 
    -00084 }
    -00085 
    -00086 ?>
    -00087 <FORM ACTION="line_update.php" METHOD="POST">
    -00088 <TABLE>
    -00089 <TR>
    -00090 <?
    -00091 $l=$_GET['l'];
    -00092 $p=$_GET['p'];
    -00093 $n=$_GET['n'];
    -00094 
    -00095 printf ('<TD>Numéro de classe </TD><TD><INPUT TYPE="TEXT" name="p_val" value="%s"></TD>',$l);
    -00096 echo "</TR><TR>";
    -00097 printf('<TD>Libellé </TD><TD><INPUT TYPE="TEXT" size="70" NAME="p_name" value="%s"></TD>',urldecode($n));
    -00098 echo "</TR><TR>";
    -00099 printf ('<TD>Classe Parent</TD><TD><INPUT TYPE="TEXT" name="p_val_parent" value="%s"></TD>',$p);
    -00100 ?>
    -00101 </TR>
    -00102 </TABLE>
    -00103 <TABLE>
    -00104 <TR>
    -00105 <TD><INPUT TYPE="Submit" VALUE="Sauve">
    -00106 <INPUT TYPE="HIDDEN" name="update">
    -00107 <? printf ('<INPUT TYPE="HIDDEN" name="p_old" value="%s">',$l); ?>
    -00108 </TD><TD><input type="button"  Value="Retour sans sauver" onClick='window.close();'></TD></TR>
    -00109 </TABLE>
    -00110 </FORM>
    -00111 
    -00112 
    -00113 <?
    -00114 html_page_stop();
    -00115 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00024 include_once ("ac_common.php"); +00025 +00026 if ( !isset ($_SESSION['g_dossier'])) { +00027 echo "You must choose a Dossier "; +00028 exit -2; +00029 } +00030 include_once ("postgres.php"); +00031 include_once("check_priv.php"); +00032 +00033 /* Admin. Dossier */ +00034 $rep=DbConnect(); +00035 include_once ("class_user.php"); +00036 $User=new cl_user($rep); +00037 $User->Check(); +00038 html_page_start($User->theme,"onLoad='window.focus();'"); +00039 +00040 if ( $User->CheckAction(DbConnect($_SESSION['g_dossier']),MPCMN) == 0 ) { +00041 /* Cannot Access */ +00042 NoAccess(); +00043 exit -1; +00044 } +00045 +00046 include ("user_menu.php"); +00047 +00048 /* Modif d'une ligne */ +00049 if ( isset ($_POST["update"] ) ) { +00050 foreach ($HTTP_POST_VARS as $name => $element) { +00051 echo_debug('line_update.php',__LINE__,"name $name $element"); +00052 } +00053 echo JS_UPDATE_PCMN; +00054 $cn=DbConnect($_SESSION['g_dossier']); +00055 $p_val=trim($_POST["p_val"]); +00056 $p_lib=FormatString($_POST["p_name"]); +00057 $p_parent=trim($_POST["p_val_parent"]); +00058 $old_line=trim($_POST["p_old"]); +00059 echo_debug('line_update.php',__LINE__,"Update old : $old_line News = $p_val $p_lib"); +00060 if ( strlen ($p_val) != 0 && strlen ($p_lib) != 0 && strlen($old_line)!=0 ) { +00061 if (strlen ($p_val) == 1 ) { +00062 $p_parent=0; +00063 } else { +00064 if ( strlen($p_parent)==0 ) { +00065 $p_parent=substr($p_val,0,strlen($p_val)-1); +00066 echo_debug('line_update.php',__LINE__,"Modif valeur = $p_val parent = $p_parent"); +00067 } +00068 } +00069 /* Parent existe */ +00070 $Ret=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val=$p_parent"); +00071 if ( pg_NumRows($Ret) == 0 || $p_parent==$old_line ) { +00072 echo '<SCRIPT> alert(" Ne peut pas modifier; aucune poste parent"); </SCRIPT>'; +00073 } else { +00074 +00075 $Ret=ExecSql($cn,"update tmp_pcmn set pcm_val=$p_val, pcm_lib='$p_lib',pcm_val_parent=$p_parent where pcm_val=$old_line"); +00076 } +00077 } else { +00078 echo '<script> alert(\'Update Valeurs invalides\'); </script>'; +00079 } +00080 +00081 echo "<script> +00082 window.close(); +00083 self.opener.RefreshMe(); +00084 +00085 </script>"; +00086 +00087 } +00088 +00089 ?> +00090 <FORM ACTION="line_update.php" METHOD="POST"> +00091 <TABLE> +00092 <TR> +00093 <? +00094 $l=$_GET['l']; +00095 $p=$_GET['p']; +00096 $n=$_GET['n']; +00097 +00098 printf ('<TD>Numéro de classe </TD><TD><INPUT TYPE="TEXT" name="p_val" value="%s"></TD>',$l); +00099 echo "</TR><TR>"; +00100 printf('<TD>Libellé </TD><TD><INPUT TYPE="TEXT" size="70" NAME="p_name" value="%s"></TD>',urldecode($n)); +00101 echo "</TR><TR>"; +00102 printf ('<TD>Classe Parent</TD><TD><INPUT TYPE="TEXT" name="p_val_parent" value="%s"></TD>',$p); +00103 ?> +00104 </TR> +00105 </TABLE> +00106 <TABLE> +00107 <TR> +00108 <TD><INPUT TYPE="Submit" VALUE="Sauve"> +00109 <INPUT TYPE="HIDDEN" name="update"> +00110 <? printf ('<INPUT TYPE="HIDDEN" name="p_old" value="%s">',$l); ?> +00111 </TD><TD><input type="button" Value="Retour sans sauver" onClick='window.close();'></TD></TR> +00112 </TABLE> +00113 </FORM> +00114 +00115 +00116 <? +00117 html_page_stop(); +00118 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/line__update_8php.html b/doc/developper/html/line__update_8php.html index 7b2d94cf3..6fe6ea253 100644 --- a/doc/developper/html/line__update_8php.html +++ b/doc/developper/html/line__update_8php.html @@ -4,10 +4,12 @@ - + -

    line_update.php File Reference

    +

    line_update.php File Reference

    Modify the "Plan Comptable". More... +

    +

    Go to the source code of this file. @@ -37,7 +39,12 @@
     $n = $_GET['n']
    -


    Variable Documentation

    +

    Detailed Description

    +Modify the "Plan Comptable". +

    + +

    +Definition in file line_update.php.


    Variable Documentation

    @@ -60,7 +67,7 @@

    -Definition at line 51 of file line_update.php. +Definition at line 54 of file line_update.php.

    @@ -85,7 +92,7 @@ Definition at line 51<

    -Definition at line 91 of file line_update.php. +Definition at line 94 of file line_update.php.

    @@ -110,7 +117,7 @@ Definition at line 91<

    -Definition at line 93 of file line_update.php. +Definition at line 96 of file line_update.php.

    @@ -135,7 +142,7 @@ Definition at line 93<

    -Definition at line 55 of file line_update.php. +Definition at line 58 of file line_update.php.

    @@ -160,7 +167,7 @@ Definition at line 55<

    -Definition at line 92 of file line_update.php. +Definition at line 95 of file line_update.php.

    Referenced by Cezpdf::ezTable(), and Cpdf::setEncryption(). @@ -187,7 +194,7 @@ Referenced by Cezpdf::

    -Definition at line 53 of file line_update.php. +Definition at line 56 of file line_update.php.

    @@ -212,9 +219,9 @@ Definition at line 53<

    -Definition at line 54 of file line_update.php. +Definition at line 57 of file line_update.php.

    -Referenced by AddFiche(). +Referenced by AddFiche().

    @@ -239,7 +246,7 @@ Referenced by AddFiche()

    -Definition at line 52 of file line_update.php. +Definition at line 55 of file line_update.php.

    @@ -264,7 +271,7 @@ Definition at line 52<

    -Definition at line 31 of file line_update.php. +Definition at line 34 of file line_update.php.

    @@ -289,9 +296,9 @@ Definition at line 31<

    -Definition at line 67 of file line_update.php. +Definition at line 70 of file line_update.php.

    -Referenced by Centralise(), fiche::CountByDef(), fiche_def::Get(), fiche_def::GetAll(), fiche::getAttribut(), fiche_def::GetAttribut(), fiche::GetByDef(), fiche::GetByType(), GetDossierName(), GetFirstJrnIdForJrnType(), GetUserProperty(), fiche::insert(), MenuJrn(), NextJrn(), Document_modele::Save(), ShowMenuComptaForm(), ShowMenuJrnUser(), and fiche::update(). +Referenced by Centralise(), fiche::CountByDef(), fiche_def::Get(), fiche_def::GetAll(), fiche::getAttribut(), fiche_def::GetAttribut(), fiche::GetByDef(), fiche::GetByType(), GetDossierName(), GetFirstJrnIdForJrnType(), GetUserProperty(), fiche::insert(), MenuJrn(), NextJrn(), Document_modele::Save(), ShowMenuComptaForm(), ShowMenuJrnUser(), and fiche::update().

    @@ -316,7 +323,7 @@ Referenced by Centrali

    -Definition at line 33 of file line_update.php. +Definition at line 36 of file line_update.php.

    @@ -341,10 +348,10 @@ Definition at line 33<

    -Definition at line 40 of file line_update.php. +Definition at line 43 of file line_update.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/listing__client_8php-source.html b/doc/developper/html/listing__client_8php-source.html index bb5fdf7db..40f62f041 100644 --- a/doc/developper/html/listing__client_8php-source.html +++ b/doc/developper/html/listing__client_8php-source.html @@ -4,7 +4,7 @@ - +

    listing_client.php

    Go to the documentation of this file.
    00001 <?
    @@ -29,38 +29,39 @@
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00021 require_once("ac_common.php");
     00022 require_once("postgres.php");
    -00024 // Check User
    -00025 include ('class_user.php');
    -00026 /* Admin. Dossier */
    -00027 $cn=DbConnect($_SESSION['g_dossier']);
    -00028 
    -00029 $User=new cl_user($cn);
    -00030 $User->Check();
    +00026 
    +00027 // Check User
    +00028 include ('class_user.php');
    +00029 /* Admin. Dossier */
    +00030 $cn=DbConnect($_SESSION['g_dossier']);
     00031 
    -00032 // TODO a specific level of security for the "bilan" ???
    -00033 // Change must be done here
    -00034 if ($User->CheckAction($cn,IMP) == 0 ){
    -00035     /* Cannot Access */
    -00036     NoAccess();
    -00037   }
    -00038 
    -00039 header('Content-type: application/bin');
    -00040 header('Content-Disposition: attachment;filename="declaration.bin"',FALSE);
    +00032 $User=new cl_user($cn);
    +00033 $User->Check();
    +00034 
    +00035 // TODO a specific level of security for the "bilan" ???
    +00036 // Change must be done here
    +00037 if ($User->CheckAction($cn,IMP) == 0 ){
    +00038     /* Cannot Access */
    +00039     NoAccess();
    +00040   }
     00041 
    -00043 // Submit for a magnetic declaration
    -00044 // Belgium only
    -00046 if ( isset($_POST['bt_disk'])) {
    -00047   require_once("class_customer.php");
    -00048   $customer=new Customer($cn);
    -00049   $a_Res=$customer->VatListing($_POST['year']);
    -00050 
    -00051   require_once("decla.BE.inc.php");
    -00052   $a=MakeListingVat($cn,$a_Res,$_POST['year']);
    -00053   echo "$a";
    -00054   return;
    -00055  }
    -00056 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00042 header('Content-type: application/bin'); +00043 header('Content-Disposition: attachment;filename="declaration.bin"',FALSE); +00044 +00046 // Submit for a magnetic declaration +00047 // Belgium only +00049 if ( isset($_POST['bt_disk'])) { +00050 require_once("class_customer.php"); +00051 $customer=new Customer($cn); +00052 $a_Res=$customer->VatListing($_POST['year']); +00053 +00054 require_once("decla.BE.inc.php"); +00055 $a=MakeListingVat($cn,$a_Res,$_POST['year']); +00056 echo "$a"; +00057 return; +00058 } +00059 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/listing__client_8php.html b/doc/developper/html/listing__client_8php.html index 510f533ae..ced236d87 100644 --- a/doc/developper/html/listing__client_8php.html +++ b/doc/developper/html/listing__client_8php.html @@ -4,10 +4,12 @@ - + -

    listing_client.php File Reference

    +

    listing_client.php File Reference

    Electronic declaration for VAT BELGIUM --> experimental. More... +

    +

    Go to the source code of this file. @@ -25,7 +27,12 @@
     return
    -


    Variable Documentation

    +

    Detailed Description

    +Electronic declaration for VAT BELGIUM --> experimental. +

    + +

    +Definition in file listing_client.php.


    Variable Documentation

    @@ -48,7 +55,7 @@

    -Definition at line 52 of file listing_client.php. +Definition at line 55 of file listing_client.php.

    @@ -73,7 +80,7 @@ Definition at line

    -Definition at line 49 of file listing_client.php. +Definition at line 52 of file listing_client.php.

    @@ -98,7 +105,7 @@ Definition at line

    -Definition at line 27 of file listing_client.php. +Definition at line 30 of file listing_client.php.

    @@ -123,7 +130,7 @@ Definition at line

    -Definition at line 48 of file listing_client.php. +Definition at line 51 of file listing_client.php.

    @@ -148,7 +155,7 @@ Definition at line

    -Definition at line 29 of file listing_client.php. +Definition at line 32 of file listing_client.php.

    @@ -173,10 +180,10 @@ Definition at line

    -Definition at line 53 of file listing_client.php. +Definition at line 56 of file listing_client.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/login_8php-source.html b/doc/developper/html/login_8php-source.html index 17b9cc228..4f0596842 100644 --- a/doc/developper/html/login_8php-source.html +++ b/doc/developper/html/login_8php-source.html @@ -4,7 +4,7 @@ - +

    login.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,42 +27,41 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 include_once ("ac_common.php");
    -00021 
    -00022 /* $Revision$ */
    -00023 
    -00024 include_once ("postgres.php");
    -00025 include_once("debug.php");
    -00026 
    -00027 
    -00028 if (  isset ($_POST["p_user"] ) ) {
    -00029   echo_debug('login.php',__LINE__,"user is set");
    -00030   $g_user=$_POST["p_user"];
    -00031   $g_pass=$_POST["p_pass"];
    -00032   $_SESSION['g_user']=$g_user; 
    -00033   $_SESSION['g_pass']=$g_pass;
    -00034 
    -00035   // Verif if User and Pass match DB
    -00036   // if no, then redirect to the login page
    -00037 $rep=DbConnect();
    -00038 include_once ("class_user.php");
    -00039 $User=new cl_user($rep);
    -00040 $User->Check();
    -00041 
    -00042   echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=user_login.php?PHPSESSID=" . $_REQUEST["PHPSESSID"] . "\">";
    +00024 /* $Revision$ */
    +00025 
    +00026 include_once ("postgres.php");
    +00027 include_once("debug.php");
    +00028 
    +00029 
    +00030 if (  isset ($_POST["p_user"] ) ) {
    +00031   echo_debug('login.php',__LINE__,"user is set");
    +00032   $g_user=$_POST["p_user"];
    +00033   $g_pass=$_POST["p_pass"];
    +00034   $_SESSION['g_user']=$g_user; 
    +00035   $_SESSION['g_pass']=$g_pass;
    +00036 
    +00037   // Verif if User and Pass match DB
    +00038   // if no, then redirect to the login page
    +00039 $rep=DbConnect();
    +00040 include_once ("class_user.php");
    +00041 $User=new cl_user($rep);
    +00042 $User->Check();
     00043 
    -00044 } else
    -00045 {
    -00046   $rep=DbConnect();
    -00047   include_once ("class_user.php");
    -00048   $User=new cl_user($rep);
    -00049   $User->Check();
    -00050   
    -00051   echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=user_login.php?PHPSESSID=" . $_REQUEST["PHPSESSID"] . "\">";  
    -00052     // }
    -00053 }
    -00054 html_page_stop();
    -00055 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00044 echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=user_login.php?PHPSESSID=" . $_REQUEST["PHPSESSID"] . "\">"; +00045 +00046 } else +00047 { +00048 $rep=DbConnect(); +00049 include_once ("class_user.php"); +00050 $User=new cl_user($rep); +00051 $User->Check(); +00052 +00053 echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=user_login.php?PHPSESSID=" . $_REQUEST["PHPSESSID"] . "\">"; +00054 // } +00055 } +00056 html_page_stop(); +00057 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/login_8php.html b/doc/developper/html/login_8php.html index 7c1f95df4..6f6ee88c9 100644 --- a/doc/developper/html/login_8php.html +++ b/doc/developper/html/login_8php.html @@ -4,10 +4,12 @@ - + -

    login.php File Reference

    +

    login.php File Reference

    Login page. More... +

    +

    Go to the source code of this file. @@ -23,7 +25,12 @@
     $User = new cl_user($rep)
    -


    Variable Documentation

    +

    Detailed Description

    +Login page. +

    + +

    +Definition in file login.php.


    Variable Documentation

    @@ -46,7 +53,7 @@

    -Definition at line 32 of file login.php. +Definition at line 34 of file login.php.

    @@ -71,7 +78,7 @@ Definition at line 32 of

    -Definition at line 31 of file login.php. +Definition at line 33 of file login.php.

    @@ -96,7 +103,7 @@ Definition at line 31 of

    -Definition at line 30 of file login.php. +Definition at line 32 of file login.php.

    @@ -121,7 +128,7 @@ Definition at line 30 of

    -Definition at line 37 of file login.php. +Definition at line 39 of file login.php.

    @@ -146,10 +153,10 @@ Definition at line 37 of

    -Definition at line 39 of file login.php. +Definition at line 41 of file login.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/logout_8php-source.html b/doc/developper/html/logout_8php-source.html index 0bb81d50f..7de831f75 100644 --- a/doc/developper/html/logout_8php-source.html +++ b/doc/developper/html/logout_8php-source.html @@ -4,7 +4,7 @@ - +

    logout.php

    Go to the documentation of this file.
    00001 <?
    @@ -26,17 +26,17 @@
     00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00020 include ("ac_common.php");
    -00021 include ("postgres.php");
    -00022 
    -00023 html_page_start("classic");
    -00024 
    -00025 session_unset();
    -00026 echo '<META HTTP-EQUIV="REFRESH" content="0;url=index.html">';
    +00023 include ("ac_common.php");
    +00024 include ("postgres.php");
    +00025 
    +00026 html_page_start("classic");
     00027 
    -00028 html_page_stop();
    -00029 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00028 session_unset(); +00029 echo '<META HTTP-EQUIV="REFRESH" content="0;url=index.html">'; +00030 +00031 html_page_stop(); +00032 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/logout_8php.html b/doc/developper/html/logout_8php.html index baac87919..994a8ae94 100644 --- a/doc/developper/html/logout_8php.html +++ b/doc/developper/html/logout_8php.html @@ -4,15 +4,22 @@ - + -

    logout.php File Reference

    +

    logout.php File Reference

    Logout. More... +

    +

    Go to the source code of this file.
    -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +

    Detailed Description

    +Logout. +

    + +

    +Definition in file logout.php.


    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/modify__op_8php-source.html b/doc/developper/html/modify__op_8php-source.html index b224840fb..69f46d2dd 100644 --- a/doc/developper/html/modify__op_8php-source.html +++ b/doc/developper/html/modify__op_8php-source.html @@ -4,7 +4,7 @@ - +

    modify_op.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,131 +27,131 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision*/
    -00021 include_once ("ac_common.php");
    -00022 include_once ("poste.php");
    -00023 include_once("preference.php");
    -00024 include_once("central_inc.php");
    -00025 include_once("check_priv.php");
    -00026 include_once("user_common.php");
    -00027 include_once ("postgres.php");
    -00028 include_once("jrn.php");
    -00029 include_once("class_widget.php");
    -00030 
    -00031 /* Admin. Dossier */
    -00032 $rep=DbConnect();
    -00033 include_once ("class_user.php");
    -00034 $User=new cl_user($rep);
    -00035 $User->Check();
    -00036 
    -00037 html_page_start($User->theme,"onLoad='window.focus();'");
    -00038 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00039   echo "You must choose a Dossier ";
    -00040   exit -2;
    -00041 }
    -00042 
    -00043 $cn=DbConnect($_SESSION['g_dossier']);
    -00044 
    -00045 if ( isset( $_GET['p_jrn'] )) {
    -00046   $p_jrn=$_GET['p_jrn'];
    -00047  } else {
    -00048   if ( ! isset ( $_GET['p_jrn'])  ) 
    -00049     $p_jrn=0;
    -00050   else 
    -00051     $p_jrn=$_GET['p_jrn'];
    -00052  }
    -00053 if ( isset ( $_GET['action'] ) ) {
    -00054   $action=$_GET['action'];
    -00055 }
    -00056 $_SESSION["p_jrn"]=$p_jrn;
    -00057 
    -00058 
    -00059 if ( isset ( $_POST['action'] ) ) {
    -00060   $action=$_POST['action'];
    -00061 }
    -00062 if ( ! isset ( $action )) {
    -00063   echo_error("modify_op.php No action asked ");
    -00064   exit();
    -00065 }
    -00066 
    -00067 // Javascript
    -00068 echo JS_VIEW_JRN_MODIFY;
    -00070 if ( $action == 'update' ) {
    -00071   if ( ($priv=CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn'],true)) < 1 ) {
    -00072       NoAccess();
    -00073       exit -1;
    -00074     
    -00075     }
    -00076     // p_id is jrn.jr_id
    -00077     $p_id=$_GET["line"];
    -00078     echo_debug('modify_op.php',__LINE__," action = update p_id = $p_id");
    -00079     echo JS_VIEW_JRN_DETAIL;
    -00080     echo JS_CONCERNED_OP;
    -00081     $r ='<FORM METHOD="POST" enctype="multipart/form-data" ACTION="modify_op.php">';
    -00082     $r.=UpdateJrn($cn,$p_id);
    -00083 
    -00084     $r.='<INPUT TYPE="Hidden" name="action" value="update_record">';
    -00085     $r.="<br>";
    -00086     $r.="<br>";
    -00087     $r.="<br>";
    -00088     $r.='<input type="SUBMIT" name="update_record" value="Enregistre">';
    -00089     $r.="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
    -00090     $r.='<input type="button" value="Fermer" onClick="window.close();">';
    -00091     $r.='</FORM>';
    -00092 
    -00093 //    echo '<div class="redcontent">';
    -00094     echo $r;
    -00095 //    echo '</div>';
    -00096   }    
    -00097 if ( isset($_POST['update_record']) ) {
    -00098   if ( ($priv=CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$p_jrn,true)) !=2 ) {
    -00099       NoAccess();
    -00100       exit -1;
    -00101     
    -00102     }
    -00103 
    -00104   // NO UPDATE except rapt & comment && upload pj
    -00105   StartSql($cn);
    +00024 include_once ("ac_common.php");
    +00025 include_once ("poste.php");
    +00026 include_once("preference.php");
    +00027 include_once("central_inc.php");
    +00028 include_once("check_priv.php");
    +00029 include_once("user_common.php");
    +00030 include_once ("postgres.php");
    +00031 include_once("jrn.php");
    +00032 include_once("class_widget.php");
    +00033 
    +00034 /* Admin. Dossier */
    +00035 $rep=DbConnect();
    +00036 include_once ("class_user.php");
    +00037 $User=new cl_user($rep);
    +00038 $User->Check();
    +00039 
    +00040 html_page_start($User->theme,"onLoad='window.focus();'");
    +00041 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00042   echo "You must choose a Dossier ";
    +00043   exit -2;
    +00044 }
    +00045 
    +00046 $cn=DbConnect($_SESSION['g_dossier']);
    +00047 
    +00048 if ( isset( $_GET['p_jrn'] )) {
    +00049   $p_jrn=$_GET['p_jrn'];
    +00050  } else {
    +00051   if ( ! isset ( $_GET['p_jrn'])  ) 
    +00052     $p_jrn=0;
    +00053   else 
    +00054     $p_jrn=$_GET['p_jrn'];
    +00055  }
    +00056 if ( isset ( $_GET['action'] ) ) {
    +00057   $action=$_GET['action'];
    +00058 }
    +00059 $_SESSION["p_jrn"]=$p_jrn;
    +00060 
    +00061 
    +00062 if ( isset ( $_POST['action'] ) ) {
    +00063   $action=$_POST['action'];
    +00064 }
    +00065 if ( ! isset ( $action )) {
    +00066   echo_error("modify_op.php No action asked ");
    +00067   exit();
    +00068 }
    +00069 
    +00070 // Javascript
    +00071 echo JS_VIEW_JRN_MODIFY;
    +00073 if ( $action == 'update' ) {
    +00074   if ( ($priv=CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn'],true)) < 1 ) {
    +00075       NoAccess();
    +00076       exit -1;
    +00077     
    +00078     }
    +00079     // p_id is jrn.jr_id
    +00080     $p_id=$_GET["line"];
    +00081     echo_debug('modify_op.php',__LINE__," action = update p_id = $p_id");
    +00082     echo JS_VIEW_JRN_DETAIL;
    +00083     echo JS_CONCERNED_OP;
    +00084     $r ='<FORM METHOD="POST" enctype="multipart/form-data" ACTION="modify_op.php">';
    +00085     $r.=UpdateJrn($cn,$p_id);
    +00086 
    +00087     $r.='<INPUT TYPE="Hidden" name="action" value="update_record">';
    +00088     $r.="<br>";
    +00089     $r.="<br>";
    +00090     $r.="<br>";
    +00091     $r.='<input type="SUBMIT" name="update_record" value="Enregistre">';
    +00092     $r.="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
    +00093     $r.='<input type="button" value="Fermer" onClick="window.close();">';
    +00094     $r.='</FORM>';
    +00095 
    +00096 //    echo '<div class="redcontent">';
    +00097     echo $r;
    +00098 //    echo '</div>';
    +00099   }    
    +00100 if ( isset($_POST['update_record']) ) {
    +00101   if ( ($priv=CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$p_jrn,true)) !=2 ) {
    +00102       NoAccess();
    +00103       exit -1;
    +00104     
    +00105     }
     00106 
    -00107   UpdateComment($cn,$_POST['jr_id'],$_POST['comment']);
    -00108   InsertRapt($cn,$_POST['jr_id'],$_POST['rapt']);
    -00109   if ( isset ($_FILES)) {
    -00110        save_upload_document($cn,$_POST['jr_grpt_id']);
    -00111     }
    -00112   if ( isset ($_POST['is_paid'] )) 
    -00113        $Res=ExecSql($cn,"update jrn set jr_rapt='paid' where jr_id=".$_POST['jr_id']);
    -00114 
    -00115   if ( isset ($_POST['to_remove'] )) {
    -00116         // Remove old document
    -00117         $ret=ExecSql($cn,"select jr_pj from jrn where jr_id=".$_POST['jr_id']);
    -00118         if (pg_num_rows($ret) != 0) {
    -00119           $r=pg_fetch_array($ret,0);
    -00120           $old_oid=$r['jr_pj'];
    -00121           if (strlen($old_oid) != 0) 
    -00122             pg_lo_unlink($cn,$old_oid);
    -00123           ExecSql($cn,"update jrn set jr_pj=null, jr_pj_name=null, ".
    -00124                 "jr_pj_type=null  where jr_id=".$_POST['jr_id']);
    -00125         }
    -00126   }
    -00127   
    -00128 
    -00129   Commit($cn);
    -00130 
    -00131   echo ' <script> 
    -00132  window.close();
    -00133  self.opener.RefreshMe();
    -00134  </script>';
    -00135 } // if update_record
    -00137 if (  $action  == 'delete' ) {
    -00138   echo_debug('modify_op.php',__LINE__," Call   DeleteRapt($cn,".$_GET['line'].",".$_GET['line2'].")");
    -00139   DeleteRapt($cn,$_GET['line'],$_GET['line2']);
    -00140  echo ' <script> 
    -00141   window.close();
    -00142  self.opener.RefreshMe();
    -00143  </script>';
    -00144 }
    -00145 html_page_stop();
    -00146 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00107 // NO UPDATE except rapt & comment && upload pj +00108 StartSql($cn); +00109 +00110 UpdateComment($cn,$_POST['jr_id'],$_POST['comment']); +00111 InsertRapt($cn,$_POST['jr_id'],$_POST['rapt']); +00112 if ( isset ($_FILES)) { +00113 save_upload_document($cn,$_POST['jr_grpt_id']); +00114 } +00115 if ( isset ($_POST['is_paid'] )) +00116 $Res=ExecSql($cn,"update jrn set jr_rapt='paid' where jr_id=".$_POST['jr_id']); +00117 +00118 if ( isset ($_POST['to_remove'] )) { +00119 // Remove old document +00120 $ret=ExecSql($cn,"select jr_pj from jrn where jr_id=".$_POST['jr_id']); +00121 if (pg_num_rows($ret) != 0) { +00122 $r=pg_fetch_array($ret,0); +00123 $old_oid=$r['jr_pj']; +00124 if (strlen($old_oid) != 0) +00125 pg_lo_unlink($cn,$old_oid); +00126 ExecSql($cn,"update jrn set jr_pj=null, jr_pj_name=null, ". +00127 "jr_pj_type=null where jr_id=".$_POST['jr_id']); +00128 } +00129 } +00130 +00131 +00132 Commit($cn); +00133 +00134 echo ' <script> +00135 window.close(); +00136 self.opener.RefreshMe(); +00137 </script>'; +00138 } // if update_record +00140 if ( $action == 'delete' ) { +00141 echo_debug('modify_op.php',__LINE__," Call DeleteRapt($cn,".$_GET['line'].",".$_GET['line2'].")"); +00142 DeleteRapt($cn,$_GET['line'],$_GET['line2']); +00143 echo ' <script> +00144 window.close(); +00145 self.opener.RefreshMe(); +00146 </script>'; +00147 } +00148 html_page_stop(); +00149 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/modify__op_8php.html b/doc/developper/html/modify__op_8php.html index e14e79dc2..8591d59e9 100644 --- a/doc/developper/html/modify__op_8php.html +++ b/doc/developper/html/modify__op_8php.html @@ -4,10 +4,12 @@ - + -

    modify_op.php File Reference

    +

    modify_op.php File Reference

    Update a operation in a popup window : add a document. More... +

    +

    Go to the source code of this file. @@ -27,7 +29,12 @@
     $old_oid = $r['jr_pj']
    -


    Variable Documentation

    +

    Detailed Description

    +Update a operation in a popup window : add a document. +

    + +

    +Definition in file modify_op.php.


    Variable Documentation

    @@ -50,9 +57,9 @@

    -Definition at line 120 of file modify_op.php. +Definition at line 123 of file modify_op.php.

    -Referenced by Invoice::Save(), Document_modele::Save(), and save_upload_document(). +Referenced by Invoice::Save(), Document_modele::Save(), save_upload_document(), and Document::Upload().

    @@ -77,7 +84,7 @@ Referenced by Invoic

    -Definition at line 77 of file modify_op.php. +Definition at line 80 of file modify_op.php.

    @@ -102,9 +109,9 @@ Definition at line 77

    -Definition at line 51 of file modify_op.php. +Definition at line 54 of file modify_op.php.

    -Referenced by FormAchInput(), FormFin(), FormODS(), FormVenInput(), and ListJrn(). +Referenced by FormAchInput(), FormFin(), FormODS(), FormVenInput(), and ListJrn().

    @@ -129,7 +136,7 @@ Referenced by FormA

    -Definition at line 81 of file modify_op.php. +Definition at line 84 of file modify_op.php.

    @@ -154,7 +161,7 @@ Definition at line 81

    -Definition at line 32 of file modify_op.php. +Definition at line 35 of file modify_op.php.

    @@ -179,7 +186,7 @@ Definition at line 32

    -Definition at line 34 of file modify_op.php. +Definition at line 37 of file modify_op.php.

    @@ -204,10 +211,10 @@ Definition at line 34

    -Definition at line 73 of file modify_op.php. +Definition at line 76 of file modify_op.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/namespaceCpdf.html b/doc/developper/html/namespaceCpdf.html index 16cce7a8a..270c71b83 100644 --- a/doc/developper/html/namespaceCpdf.html +++ b/doc/developper/html/namespaceCpdf.html @@ -4,7 +4,7 @@ - +

    Cpdf Namespace Reference

    @@ -21,7 +21,7 @@ LICENCE This code has been placed in the Public Domain for all to enjoy.

    Version:
    009

    -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/namespaces.html b/doc/developper/html/namespaces.html index 73456504a..d0fcd8fa2 100644 --- a/doc/developper/html/namespaces.html +++ b/doc/developper/html/namespaces.html @@ -4,11 +4,11 @@ - +

    phpcompta Namespace List

    Here is a list of all namespaces with brief descriptions:
    Cpdf
    -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/not__implemented_8php-source.html b/doc/developper/html/not__implemented_8php-source.html index 8f5cd4017..2a8d27a67 100644 --- a/doc/developper/html/not__implemented_8php-source.html +++ b/doc/developper/html/not__implemented_8php-source.html @@ -4,7 +4,7 @@ - +

    not_implemented.php

    Go to the documentation of this file.
    00001 <?
    @@ -32,7 +32,7 @@
     00023 echo '<H1 class="info"> Not Implemented</H1>';
     00024 html_page_stop();
     00025 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/not__implemented_8php.html b/doc/developper/html/not__implemented_8php.html index 16b390ad9..62dd28b96 100644 --- a/doc/developper/html/not__implemented_8php.html +++ b/doc/developper/html/not__implemented_8php.html @@ -4,7 +4,7 @@ - +

    not_implemented.php File Reference

    @@ -12,7 +12,7 @@ Go to the source code of this file.
    -
    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/parametre_8php-source.html b/doc/developper/html/parametre_8php-source.html index bc7b8a9c5..1b518668c 100644 --- a/doc/developper/html/parametre_8php-source.html +++ b/doc/developper/html/parametre_8php-source.html @@ -4,7 +4,7 @@ - +

    parametre.php

    Go to the documentation of this file.
    00001 <?
    @@ -28,161 +28,163 @@
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00021 /* $Revision$ */
    -00022 include_once ("ac_common.php");
    -00023 html_page_start($_SESSION['g_theme']);
    -00024 include_once ("postgres.php");
    -00025 require_once("class_widget.php");
    -00026 
    -00027 if ( isset ($_REQUEST['dos'] ) ) {
    -00028   $_SESSION['g_dossier']=$_REQUEST['dos'];
    -00029   $g_name=GetDossierName($_SESSION['g_dossier']);
    -00030   $_SESSION["g_name"]=$g_name;
    -00031 
    -00032 }
    -00033 
    -00034 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00035   echo "You must choose a Dossier ";
    -00036   exit -2;
    -00037 }
    -00038 include_once ("postgres.php");
    -00039 /* Admin. Dossier */
    -00040 $rep=DbConnect();
    -00041 include_once ("class_user.php");
    -00042 $User=new cl_user($rep);
    -00043 $User->Check();
    -00044 
    -00045 include("preference.php");
    -00046 include_once("user_menu.php");
    -00047 
    -00048 echo "<H2 class=\"info\"> Param&egrave;tre ".$_SESSION['g_name']." </H2>";
    -00049 
    -00050 include_once ("check_priv.php");
    +00026 include_once ("ac_common.php");
    +00027 html_page_start($_SESSION['g_theme']);
    +00028 include_once ("postgres.php");
    +00029 require_once("class_widget.php");
    +00030 
    +00031 if ( isset ($_REQUEST['dos'] ) ) {
    +00032   $_SESSION['g_dossier']=$_REQUEST['dos'];
    +00033   $g_name=GetDossierName($_SESSION['g_dossier']);
    +00034   $_SESSION["g_name"]=$g_name;
    +00035 
    +00036 }
    +00037 
    +00038 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00039   echo "You must choose a Dossier ";
    +00040   exit -2;
    +00041 }
    +00042 include_once ("postgres.php");
    +00043 /* Admin. Dossier */
    +00044 $rep=DbConnect();
    +00045 include_once ("class_user.php");
    +00046 $User=new cl_user($rep);
    +00047 $User->Check();
    +00048 
    +00049 include("preference.php");
    +00050 include_once("user_menu.php");
     00051 
    -00052 $cn=DbConnect($_SESSION['g_dossier']);
    +00052 echo "<H2 class=\"info\"> Param&egrave;tre ".$_SESSION['g_name']." </H2>";
     00053 
    -00054 if ( $User->CheckAction($cn,PARM) == 0 ) {
    -00055     /* Cannot Access */
    -00056     NoAccess();
    -00057   exit -1;                      
    -00058 
    -00059 }
    -00060 
    -00061 // First action
    -00062 $p_action="";
    -00063 if ( isset($_REQUEST["p_action"]) ) {
    -00064   $p_action=$_REQUEST["p_action"];
    -00065 }
    -00066 echo ShowMenuParam("parametre.php?p_action=".$p_action);
    -00067 
    -00068 
    -00069 // sub action
    -00070 $action="";
    -00071 if ( isset ($_POST['action']) ) {
    -00072   $action=$_POST['action'];
    -00073 }
    -00074 echo_debug("parametre",__LINE__,$_POST);
    -00076 // TVA RATE
    -00078 if ( $p_action == "tva" ) 
    -00079 {
    -00080   require_once("tva.inc.php");
    -00081   // 
    -00082 }
    -00084 // Account 
    -00086 if ( $p_action == "poste" ) 
    -00087 {
    -00088   require_once('poste.inc.php');
    -00089 
    -00090 }
    -00092 // fiche 
    -00094 if ( $p_action == "fiche" ) 
    -00095 {
    -00096   require_once('fiche_def.inc.php');
    -00097   return;
    -00098 }
    -00099 echo '<DIV CLASS="u_redcontent">';
    -00101 // Currency
    -00103 if ( $p_action == "change" ) {
    -00104   $p_mid=$_GET['p_mid'];
    -00105   $p_rate=$_GET['p_rate'];
    -00106   $p_code=$_GET['p_code'];
    -00107 
    -00108   echo '<TR> <FORM ACTION="parametre.php" METHOD="POST">';
    -00109   echo '<INPUT TYPE="HIDDEN" VALUE="'.$p_mid.'" NAME="p_id">';
    -00110   echo '<TD> <INPUT TYPE="text" NAME="p_devise" VALUE="'.$p_code.'"></TD>';
    -00111   echo '<TD> <INPUT TYPE="text" NAME="p_rate" VALUE="'.$p_rate.'"></TD>';
    -00112   echo '<TD> <INPUT TYPE="SUBMIT" NAME="action" Value="Change"</TD>';
    -00113   echo '</FORM></TR>';
    -00114 }
    -00115 if ( $action == "Change") {
    -00116   $p_devise=$_POST['p_devise'];
    -00117   $p_id=$_POST['p_id'];
    -00118   $p_rate=$_POST['p_rate'];
    -00119   $Res=ExecSql($cn,"update parm_money set pm_code='$p_devise',pm_rate=$p_rate where pm_id=$p_id");
    -00120   ShowDevise($cn);
    -00121 
    -00122 }
    -00123 if ( $action == "Ajout") {
    -00124   $p_devise=$_POST['p_devise'];
    -00125   $p_rate=$_POST['p_rate'];
    -00126   $Res=ExecSql($cn,"insert into parm_money ( pm_code,pm_rate) values ('$p_devise',$p_rate) ");
    -00127   ShowDevise($cn);
    -00128 
    -00129 }
    -00130 
    -00131 if ( $p_action == "delete") {
    -00132   $p_id=$_GET['p_mid'];
    -00133   $Res=ExecSql($cn,"delete from parm_money  where pm_id=$p_id");
    -00134   ShowDevise($cn);
    -00135 }
    -00136 
    -00137 
    -00138 if ( $p_action=="devise") {
    -00139   ShowDevise($cn);
    -00140 }
    +00054 include_once ("check_priv.php");
    +00055 
    +00056 $cn=DbConnect($_SESSION['g_dossier']);
    +00057 
    +00058 if ( $User->CheckAction($cn,PARM) == 0 ) {
    +00059     /* Cannot Access */
    +00060     NoAccess();
    +00061   exit -1;                      
    +00062 
    +00063 }
    +00064 
    +00065 // First action
    +00066 $p_action="";
    +00067 if ( isset($_REQUEST["p_action"]) ) {
    +00068   $p_action=$_REQUEST["p_action"];
    +00069 }
    +00070 echo ShowMenuParam("parametre.php?p_action=".$p_action);
    +00071 
    +00072 
    +00073 // sub action
    +00074 $action="";
    +00075 if ( isset ($_POST['action']) ) {
    +00076   $action=$_POST['action'];
    +00077 }
    +00078 echo_debug("parametre",__LINE__,$_POST);
    +00080 // TVA RATE
    +00082 if ( $p_action == "tva" ) 
    +00083 {
    +00084   require_once("tva.inc.php");
    +00085   // 
    +00086 }
    +00088 // Account 
    +00090 if ( $p_action == "poste" ) 
    +00091 {
    +00092   require_once('poste.inc.php');
    +00093 
    +00094 }
    +00096 // fiche 
    +00098 if ( $p_action == "fiche" ) 
    +00099 {
    +00100   require_once('fiche_def.inc.php');
    +00101   return;
    +00102 }
    +00103 echo '<DIV CLASS="u_redcontent">';
    +00105 // Currency
    +00107 if ( $p_action == "change" ) {
    +00108   $p_mid=$_GET['p_mid'];
    +00109   $p_rate=$_GET['p_rate'];
    +00110   $p_code=$_GET['p_code'];
    +00111 
    +00112   echo '<TR> <FORM ACTION="parametre.php" METHOD="POST">';
    +00113   echo '<INPUT TYPE="HIDDEN" VALUE="'.$p_mid.'" NAME="p_id">';
    +00114   echo '<TD> <INPUT TYPE="text" NAME="p_devise" VALUE="'.$p_code.'"></TD>';
    +00115   echo '<TD> <INPUT TYPE="text" NAME="p_rate" VALUE="'.$p_rate.'"></TD>';
    +00116   echo '<TD> <INPUT TYPE="SUBMIT" NAME="action" Value="Change"</TD>';
    +00117   echo '</FORM></TR>';
    +00118 }
    +00119 if ( $action == "Change") {
    +00120   $p_devise=$_POST['p_devise'];
    +00121   $p_id=$_POST['p_id'];
    +00122   $p_rate=$_POST['p_rate'];
    +00123   $Res=ExecSql($cn,"update parm_money set pm_code='$p_devise',pm_rate=$p_rate where pm_id=$p_id");
    +00124   ShowDevise($cn);
    +00125 
    +00126 }
    +00127 if ( $action == "Ajout") {
    +00128   $p_devise=$_POST['p_devise'];
    +00129   $p_rate=$_POST['p_rate'];
    +00130   $Res=ExecSql($cn,"insert into parm_money ( pm_code,pm_rate) values ('$p_devise',$p_rate) ");
    +00131   ShowDevise($cn);
    +00132 
    +00133 }
    +00134 
    +00135 if ( $p_action == "delete") {
    +00136   $p_id=$_GET['p_mid'];
    +00137   $Res=ExecSql($cn,"delete from parm_money  where pm_id=$p_id");
    +00138   ShowDevise($cn);
    +00139 }
    +00140 
     00141 
    -00143 // Coord societe
    -00145 if ( $p_action=='company') { 
    -00146   require_once("class_own.php");
    -00147   require_once("class_widget.php");
    -00148   if ( isset ($_POST['record_company'] )) {
    -00149     $m=new Own($cn);
    -00150     extract($_POST);
    -00151     $m->MY_NAME=$p_name;
    -00152     $m->MY_TVA=$p_tva;
    -00153     $m->MY_STREET=$p_street;
    -00154     $m->MY_NUMBER=$p_no;
    -00155     $m->MY_CP=$p_cp;
    -00156     $m->MY_COMMUNE=$p_Commune;
    -00157     $m->Save();
    -00158   }
    -00159 
    -00160   $my=new Own($cn);
    -00161   $all=new widget("text");
    -00162   $all->table=1;
    -00163   echo '<form method="post" action="?p_action=company">';
    -00164   echo "<table class=\"result\">";
    -00165   echo "<tr>".$all->IOValue("p_name",$my->MY_NAME,"Nom société")."</tr>";
    -00166 
    -00167   echo "<tr>".$all->IOValue("p_tva",$my->MY_TVA,"Numéro de Tva")."</tr>";
    -00168   echo "<tr>".$all->IOValue("p_street",$my->MY_STREET,"Rue ")."</tr>";
    -00169   echo "<tr>".$all->IOValue("p_no",$my->MY_NUMBER,"Numéro")."</tr>";
    -00170   echo "<tr>".$all->IOValue("p_cp",$my->MY_CP,"Code Postal")."</tr>";
    -00171   echo "<tr>".$all->IOValue("p_Commune",$my->MY_COMMUNE,"Commune")."</tr>";
    -00172   echo "</table>";
    -00173   $submit=new widget("submit");
    -00174   echo $submit->Submit("record_company","Enregistre");
    -00175   echo "</form>";
    -00176  }
    -00178 // Document 
    -00180 
    -00181 if ( $p_action == 'document' ) {
    -00182   require_once('document_modele.inc.php');
    -00183 }  
    -00184 
    -00185 echo "</DIV>";
    -00186 html_page_stop();
    -00187 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00142 if ( $p_action=="devise") { +00143 ShowDevise($cn); +00144 } +00145 +00147 // Coord societe +00149 if ( $p_action=='company') { +00150 require_once("class_own.php"); +00151 require_once("class_widget.php"); +00152 if ( isset ($_POST['record_company'] )) { +00153 $m=new Own($cn); +00154 extract($_POST); +00155 $m->MY_NAME=$p_name; +00156 $m->MY_TVA=$p_tva; +00157 $m->MY_STREET=$p_street; +00158 $m->MY_NUMBER=$p_no; +00159 $m->MY_CP=$p_cp; +00160 $m->MY_COMMUNE=$p_Commune; +00161 $m->Save(); +00162 } +00163 +00164 $my=new Own($cn); +00165 $all=new widget("text"); +00166 $all->table=1; +00167 echo '<form method="post" action="?p_action=company">'; +00168 echo "<table class=\"result\">"; +00169 echo "<tr>".$all->IOValue("p_name",$my->MY_NAME,"Nom société")."</tr>"; +00170 +00171 echo "<tr>".$all->IOValue("p_tva",$my->MY_TVA,"Numéro de Tva")."</tr>"; +00172 echo "<tr>".$all->IOValue("p_street",$my->MY_STREET,"Rue ")."</tr>"; +00173 echo "<tr>".$all->IOValue("p_no",$my->MY_NUMBER,"Numéro")."</tr>"; +00174 echo "<tr>".$all->IOValue("p_cp",$my->MY_CP,"Code Postal")."</tr>"; +00175 echo "<tr>".$all->IOValue("p_Commune",$my->MY_COMMUNE,"Commune")."</tr>"; +00176 echo "</table>"; +00177 $submit=new widget("submit"); +00178 echo $submit->Submit("record_company","Enregistre"); +00179 echo "</form>"; +00180 } +00182 // Document +00184 echo "</DIV>"; +00185 if ( $p_action == 'document' ) { +00186 echo '<div class="u_content">'; +00187 require_once('document_modele.inc.php'); +00188 echo '</div>'; +00189 } +00190 +00191 +00192 html_page_stop(); +00193 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/parametre_8php.html b/doc/developper/html/parametre_8php.html index 574adecf7..d6926ee94 100644 --- a/doc/developper/html/parametre_8php.html +++ b/doc/developper/html/parametre_8php.html @@ -4,10 +4,12 @@ - + -

    parametre.php File Reference

    +

    parametre.php File Reference

    Parametre module. More... +

    +

    Go to the source code of this file. @@ -49,7 +51,12 @@
     $submit = new widget("submit")
    -


    Variable Documentation

    +

    Detailed Description

    +Parametre module. +

    + +

    +Definition in file parametre.php.


    Variable Documentation

    @@ -72,7 +79,7 @@

    -Definition at line 30 of file parametre.php. +Definition at line 34 of file parametre.php.

    @@ -81,7 +88,7 @@ Definition at line 30 - +
    $action = "" $action = ""
    @@ -97,7 +104,7 @@ Definition at line 30

    -Definition at line 70 of file parametre.php. +Definition at line 74 of file parametre.php.

    @@ -122,7 +129,7 @@ Definition at line 70

    -Definition at line 161 of file parametre.php. +Definition at line 165 of file parametre.php.

    @@ -147,7 +154,7 @@ Definition at line 161

    -Definition at line 52 of file parametre.php. +Definition at line 56 of file parametre.php.

    @@ -172,7 +179,9 @@ Definition at line 52

    -Definition at line 160 of file parametre.php. +Definition at line 164 of file parametre.php. +

    +Referenced by MakeListingVat(), and Document::Replace().

    @@ -197,7 +206,7 @@ Definition at line 160

    -Definition at line 62 of file parametre.php. +Definition at line 66 of file parametre.php.

    @@ -222,7 +231,7 @@ Definition at line 62

    -Definition at line 40 of file parametre.php. +Definition at line 44 of file parametre.php.

    @@ -247,7 +256,7 @@ Definition at line 40

    -Definition at line 173 of file parametre.php. +Definition at line 177 of file parametre.php.

    @@ -272,7 +281,7 @@ Definition at line 173

    -Definition at line 42 of file parametre.php. +Definition at line 46 of file parametre.php.

    @@ -297,7 +306,7 @@ Definition at line 42

    -Definition at line 57 of file parametre.php. +Definition at line 61 of file parametre.php.

    @@ -322,7 +331,9 @@ Definition at line 57

    -Definition at line 156 of file parametre.php. +Definition at line 160 of file parametre.php. +

    +Referenced by Document::Replace(), and Own::Save().

    @@ -347,7 +358,9 @@ Definition at line 156

    -Definition at line 155 of file parametre.php. +Definition at line 159 of file parametre.php. +

    +Referenced by Document::Replace(), and Own::Save().

    @@ -372,7 +385,9 @@ Definition at line 155

    -Definition at line 151 of file parametre.php. +Definition at line 155 of file parametre.php. +

    +Referenced by Document::Replace(), and Own::Save().

    @@ -397,7 +412,9 @@ Definition at line 151

    -Definition at line 154 of file parametre.php. +Definition at line 158 of file parametre.php. +

    +Referenced by Document::Replace(), and Own::Save().

    @@ -422,7 +439,9 @@ Definition at line 154

    -Definition at line 153 of file parametre.php. +Definition at line 157 of file parametre.php. +

    +Referenced by Document::Replace(), and Own::Save().

    @@ -447,7 +466,9 @@ Definition at line 153

    -Definition at line 152 of file parametre.php. +Definition at line 156 of file parametre.php. +

    +Referenced by Document::Replace(), and Own::Save().

    @@ -472,7 +493,7 @@ Definition at line 152

    -Definition at line 97 of file parametre.php. +Definition at line 101 of file parametre.php.

    @@ -497,10 +518,10 @@ Definition at line 97

    -Definition at line 162 of file parametre.php. +Definition at line 166 of file parametre.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/pcmn__update_8php-source.html b/doc/developper/html/pcmn__update_8php-source.html index 4afd2ef10..86e7239ae 100644 --- a/doc/developper/html/pcmn__update_8php-source.html +++ b/doc/developper/html/pcmn__update_8php-source.html @@ -4,7 +4,7 @@ - +

    pcmn_update.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,170 +27,169 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 include_once ("ac_common.php");
    -00022 html_page_start($_SESSION['g_theme']);
    -00023 require_once("constant.php");
    -00024 
    -00025 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00026   echo "You must choose a Dossier ";
    -00027   phpinfo();
    -00028   exit -2;
    -00029 }
    -00030 include_once ("postgres.php");
    -00031 /* Admin. Dossier */
    -00032 $rep=DbConnect();
    -00033 include_once ("class_user.php");
    -00034 $User=new cl_user($rep);
    -00035 $User->Check();
    -00036 
    -00037 
    -00038 include_once ("user_menu.php");
    -00039 include_once ("check_priv.php");
    -00040 
    -00041 ShowMenuCompta($_SESSION['g_dossier']);
    +00024 include_once ("ac_common.php");
    +00025 html_page_start($_SESSION['g_theme']);
    +00026 require_once("constant.php");
    +00027 
    +00028 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00029   echo "You must choose a Dossier ";
    +00030   exit -2;
    +00031 }
    +00032 include_once ("postgres.php");
    +00033 /* Admin. Dossier */
    +00034 $rep=DbConnect();
    +00035 include_once ("class_user.php");
    +00036 $User=new cl_user($rep);
    +00037 $User->Check();
    +00038 
    +00039 
    +00040 include_once ("user_menu.php");
    +00041 include_once ("check_priv.php");
     00042 
    -00043 $cn=DbConnect($_SESSION['g_dossier']);
    -00044 if ( $User->CheckAction($cn,MPCMN) == 0 ) {
    -00045   /* Cannot Access */
    -00046   NoAccess();
    -00047   exit -1;                      
    -00048  }
    -00049 echo JS_UPDATE_PCMN;
    -00050 /* Store the p_start parameter */
    -00051 if ( ! isset ( $_SESSION['g_start']) ) {
    -00052   $_SESSION['g_start']="";
    -00053 
    -00054 }
    -00055 if ( isset ($_GET['p_start'])) { 
    -00056   $g_start=$_GET['p_start'];
    -00057   $_SESSION["g_start"]=$g_start; 
    -00058 
    -00059 }
    +00043 echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php");
    +00044 
    +00045 $cn=DbConnect($_SESSION['g_dossier']);
    +00046 if ( $User->CheckAction($cn,MPCMN) == 0 ) {
    +00047   /* Cannot Access */
    +00048   NoAccess();
    +00049   exit -1;                      
    +00050  }
    +00051 echo JS_UPDATE_PCMN;
    +00052 /* Store the p_start parameter */
    +00053 if ( ! isset ( $_SESSION['g_start']) ) {
    +00054   $_SESSION['g_start']="";
    +00055 
    +00056 }
    +00057 if ( isset ($_GET['p_start'])) { 
    +00058   $g_start=$_GET['p_start'];
    +00059   $_SESSION["g_start"]=$g_start; 
     00060 
    -00061 echo '<div class="u_subtmenu">';
    -00062 echo ShowMenuAdvanced("pcmn_update.php?p_start=1");
    -00063 echo '</div>';
    -00064 echo '<div class="lmenu">';
    -00065 ShowMenuPcmn($_SESSION['g_start']);
    -00066 echo '</div>';
    -00067 echo '<DIV CLASS="u_redcontent">';
    -00068 /* Analyse ce qui est demandé */
    -00069 /* Effacement d'une ligne */
    -00070 if (isset ($_GET['action'])) {
    -00071   if ( $_GET['action']=="del" ) {
    -00072     if ( isset ($_GET['l']) ) {
    -00073       /* Ligne a enfant*/
    -00074       $R=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val_parent=".$_GET['l']);
    -00075       if ( pg_NumRows($R) != 0 ) {
    -00076         echo "<SCRIPT> alert(\"Ne peut pas effacer le poste: d'autres postes en dépendent\");</SCRIPT>";
    -00077       } else {
    -00078         /* Vérifier que le poste n'est pas utilisé qq part dans les journaux */
    -00079         $Res=ExecSql($cn,"select * from jrnx where j_poste=".$_GET['l']);
    -00080         if ( pg_NumRows($R) != 0 ) {
    -00081           echo "<SCRIPT> alert(\"Ne peut pas effacer le poste: il est utilisé dans les journaux\");</SCRIPT>";
    -00082         }
    -00083         else {
    -00084           $Del=ExecSql($cn,"delete from tmp_pcmn where pcm_val=".$_GET['l']);
    -00085         } // if pg_NumRows
    -00086       } // if pg_NumRows
    -00087     } // isset ($l)
    -00088   } //$action == del
    -00089 } // isset action
    -00090 /* Ajout d'une ligne */
    -00091 if ( isset ( $_POST["Add"] ) ) {
    -00092         extract ($_POST);
    -00093   if ( isset ( $p_val) && isset ( $p_lib ) ) {
    -00094     $p_val=trim($p_val);
    -00095     $p_lib=FormatString(trim($p_lib));
    -00096     $p_parent=$_POST["p_parent"];
    -00097     if ( strlen ($p_val) != 0 && strlen ($p_lib) != 0 ) {
    -00098       if (strlen ($p_val) == 1 ) {
    -00099         $p_parent=0;
    -00100       } else {
    -00101         if ( strlen(trim($p_parent))==0 && 
    -00102              (string) $p_parent != (string)(int) $p_parent) {
    -00103           $p_parent=substr($p_val,0,strlen($p_val)-1);
    -00104         }
    -00105         echo_debug('pcmn_update.php',__LINE__,"Ajout valeur = $p_val parent = $p_parent");
    -00106       }
    -00107       /* Parent existe */
    -00108       $Ret=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val=$p_parent");
    -00109       if ( pg_NumRows($Ret) == 0 ) {
    -00110         echo '<SCRIPT> alert(" Ne peut pas modifier; aucune poste parent"); </SCRIPT>';
    -00111       } else {
    -00112         $Ret=ExecSql($cn,"insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) values ('$p_val','$p_lib',$p_parent)");
    -00113       }
    -00114     } else {
    -00115       echo '<H2 class="error"> Valeurs invalides </H3>';
    -00116     }
    -00117   }
    -00118 }
    -00119 
    -00120 $Ret=ExecSql($cn,"select pcm_val,pcm_lib,pcm_val_parent from tmp_pcmn where substr(pcm_val::text,1,1)='".$_SESSION['g_start']."' order by pcm_val::text");
    -00121 $MaxRow=pg_NumRows($Ret);
    -00122 
    -00123 ?>
    +00061 }
    +00062 
    +00063 echo '<div class="u_subtmenu">';
    +00064 echo ShowMenuAdvanced("pcmn_update.php?p_start=1");
    +00065 echo '</div>';
    +00066 echo '<div class="lmenu">';
    +00067 ShowMenuPcmn($_SESSION['g_start']);
    +00068 echo '</div>';
    +00069 echo '<DIV CLASS="u_redcontent">';
    +00070 /* Analyse ce qui est demandé */
    +00071 /* Effacement d'une ligne */
    +00072 if (isset ($_GET['action'])) {
    +00073   if ( $_GET['action']=="del" ) {
    +00074     if ( isset ($_GET['l']) ) {
    +00075       /* Ligne a enfant*/
    +00076       $R=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val_parent=".$_GET['l']);
    +00077       if ( pg_NumRows($R) != 0 ) {
    +00078         echo "<SCRIPT> alert(\"Ne peut pas effacer le poste: d'autres postes en dépendent\");</SCRIPT>";
    +00079       } else {
    +00080         /* Vérifier que le poste n'est pas utilisé qq part dans les journaux */
    +00081         $Res=ExecSql($cn,"select * from jrnx where j_poste=".$_GET['l']);
    +00082         if ( pg_NumRows($R) != 0 ) {
    +00083           echo "<SCRIPT> alert(\"Ne peut pas effacer le poste: il est utilisé dans les journaux\");</SCRIPT>";
    +00084         }
    +00085         else {
    +00086           $Del=ExecSql($cn,"delete from tmp_pcmn where pcm_val=".$_GET['l']);
    +00087         } // if pg_NumRows
    +00088       } // if pg_NumRows
    +00089     } // isset ($l)
    +00090   } //$action == del
    +00091 } // isset action
    +00092 /* Ajout d'une ligne */
    +00093 if ( isset ( $_POST["Add"] ) ) {
    +00094         extract ($_POST);
    +00095   if ( isset ( $p_val) && isset ( $p_lib ) ) {
    +00096     $p_val=trim($p_val);
    +00097     $p_lib=FormatString(trim($p_lib));
    +00098     $p_parent=$_POST["p_parent"];
    +00099     if ( strlen ($p_val) != 0 && strlen ($p_lib) != 0 ) {
    +00100       if (strlen ($p_val) == 1 ) {
    +00101         $p_parent=0;
    +00102       } else {
    +00103         if ( strlen(trim($p_parent))==0 && 
    +00104              (string) $p_parent != (string)(int) $p_parent) {
    +00105           $p_parent=substr($p_val,0,strlen($p_val)-1);
    +00106         }
    +00107         echo_debug('pcmn_update.php',__LINE__,"Ajout valeur = $p_val parent = $p_parent");
    +00108       }
    +00109       /* Parent existe */
    +00110       $Ret=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val=$p_parent");
    +00111       if ( pg_NumRows($Ret) == 0 ) {
    +00112         echo '<SCRIPT> alert(" Ne peut pas modifier; aucune poste parent"); </SCRIPT>';
    +00113       } else {
    +00114         $Ret=ExecSql($cn,"insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) values ('$p_val','$p_lib',$p_parent)");
    +00115       }
    +00116     } else {
    +00117       echo '<H2 class="error"> Valeurs invalides </H3>';
    +00118     }
    +00119   }
    +00120 }
    +00121 
    +00122 $Ret=ExecSql($cn,"select pcm_val,pcm_lib,pcm_val_parent from tmp_pcmn where substr(pcm_val::text,1,1)='".$_SESSION['g_start']."' order by pcm_val::text");
    +00123 $MaxRow=pg_NumRows($Ret);
     00124 
    -00125 <FORM ACTION="pcmn_update.php" METHOD="POST">
    -00126 <TABLE ALIGN="center" BORDER=0 CELLPADDING=0 CELLSPACING=0> 
    -00127 <TR>
    -00128 <TH> Classe </TH>
    -00129 <TH> Libellé </TH>
    -00130 <TH> Parent </TH>
    -00131 </TR>
    -00132 <TR>
    -00133 <TD>
    -00134 <INPUT TYPE="TEXT" NAME="p_val" SIZE=7>
    -00135 </TD>
    -00136 <TD>
    -00137 <INPUT TYPE="TEXT" NAME="p_lib" size=50>
    -00138 </TD>
    -00139 <TD>
    -00140 <INPUT TYPE="TEXT" NAME="p_parent" size=5>
    -00141 </TD>
    -00142 <TD>
    -00143 <INPUT TYPE="SUBMIT" Value="Add" Name="Add">
    -00144 </TD>
    -00145 </TR>
    -00146 <?
    -00147 for ($i=0; $i <$MaxRow; $i++) {
    -00148   $A=pg_fetch_array($Ret,$i);
    -00149 
    -00150   if ( $i%2 == 0 ) {
    -00151     $td ='<TD class="odd">';
    -00152   } else {
    -00153     $td='<TD class="even">';
    -00154   }
    -00155   echo "<TR> $td";
    -00156   echo $A['pcm_val'];
    -00157 
    -00158   echo "</td> $td";
    -00159   //  printf ("<A HREF=line_update.php?l=%d&n=%s&p=%s>",$A['pcm_val'],urlencode($A['pcm_lib']),$A['pcm_val_parent']);
    -00160   printf ("<A HREF=\"javascript:PcmnUpdate(%d,'%s','%s','%s')\">",
    -00161           $A['pcm_val'],
    -00162           FormatString($A['pcm_lib']),
    -00163           $A['pcm_val_parent'],
    -00164           $_REQUEST['PHPSESSID']);
    -00165   echo $A['pcm_lib'];
    -00166   echo '</A>';
    -00167   echo "</TD>";
    -00168 
    -00169   echo $td;
    -00170   echo $A['pcm_val_parent'];
    -00171   echo '</TD>';
    -00172 
    -00173   echo $td;
    -00174   printf ('<A href="pcmn_update.php?l=%d&action=del">Delete</A>',$A['pcm_val']);
    -00175   echo "</TD>";
    -00176   
    -00177   echo "</TR>";
    -00178 }
    -00179 echo "</TABLE>";
    -00180 echo "</FORM>";
    -00181 echo "</DIV>";
    -00182 html_page_stop();
    -00183 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00125 ?> +00126 +00127 <FORM ACTION="pcmn_update.php" METHOD="POST"> +00128 <TABLE ALIGN="center" BORDER=0 CELLPADDING=0 CELLSPACING=0> +00129 <TR> +00130 <TH> Classe </TH> +00131 <TH> Libellé </TH> +00132 <TH> Parent </TH> +00133 </TR> +00134 <TR> +00135 <TD> +00136 <INPUT TYPE="TEXT" NAME="p_val" SIZE=7> +00137 </TD> +00138 <TD> +00139 <INPUT TYPE="TEXT" NAME="p_lib" size=50> +00140 </TD> +00141 <TD> +00142 <INPUT TYPE="TEXT" NAME="p_parent" size=5> +00143 </TD> +00144 <TD> +00145 <INPUT TYPE="SUBMIT" Value="Add" Name="Add"> +00146 </TD> +00147 </TR> +00148 <? +00149 for ($i=0; $i <$MaxRow; $i++) { +00150 $A=pg_fetch_array($Ret,$i); +00151 +00152 if ( $i%2 == 0 ) { +00153 $td ='<TD class="odd">'; +00154 } else { +00155 $td='<TD class="even">'; +00156 } +00157 echo "<TR> $td"; +00158 echo $A['pcm_val']; +00159 +00160 echo "</td> $td"; +00161 // printf ("<A HREF=line_update.php?l=%d&n=%s&p=%s>",$A['pcm_val'],urlencode($A['pcm_lib']),$A['pcm_val_parent']); +00162 printf ("<A HREF=\"javascript:PcmnUpdate(%d,'%s','%s','%s')\">", +00163 $A['pcm_val'], +00164 FormatString($A['pcm_lib']), +00165 $A['pcm_val_parent'], +00166 $_REQUEST['PHPSESSID']); +00167 echo $A['pcm_lib']; +00168 echo '</A>'; +00169 echo "</TD>"; +00170 +00171 echo $td; +00172 echo $A['pcm_val_parent']; +00173 echo '</TD>'; +00174 +00175 echo $td; +00176 printf ('<A href="pcmn_update.php?l=%d&action=del">Delete</A>',$A['pcm_val']); +00177 echo "</TD>"; +00178 +00179 echo "</TR>"; +00180 } +00181 echo "</TABLE>"; +00182 echo "</FORM>"; +00183 echo "</DIV>"; +00184 html_page_stop(); +00185 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/pcmn__update_8php.html b/doc/developper/html/pcmn__update_8php.html index 9f50be51e..9f58ca302 100644 --- a/doc/developper/html/pcmn__update_8php.html +++ b/doc/developper/html/pcmn__update_8php.html @@ -4,27 +4,34 @@ - + -

    pcmn_update.php File Reference

    +

    pcmn_update.php File Reference

    concerns the management of the "Plan Comptable" More... +

    +

    Go to the source code of this file. - + - + - + - +

    Variables

     exit
     $rep = DbConnect()
     $rep = DbConnect()
     $User = new cl_user($rep)
     $User = new cl_user($rep)
     $cn = DbConnect($_SESSION['g_dossier'])
     $cn = DbConnect($_SESSION['g_dossier'])
     exit
     $MaxRow = pg_NumRows($Ret)
    -


    Variable Documentation

    -

    +


    Detailed Description

    +concerns the management of the "Plan Comptable" +

    + +

    +Definition in file pcmn_update.php.


    Variable Documentation

    +

    +Definition at line 45 of file pcmn_update.php.
    @@ -46,7 +53,7 @@

    -Definition at line 43 of file pcmn_update.php.

    @@ -71,10 +78,10 @@ Definition at line 43<

    -Definition at line 121 of file pcmn_update.php. +Definition at line 123 of file pcmn_update.php. -

    +

    +Definition at line 34 of file pcmn_update.php.
    @@ -96,10 +103,10 @@ Definition at line 121

    -Definition at line 32 of file pcmn_update.php.

    -

    +

    +Definition at line 36 of file pcmn_update.php.
    @@ -121,10 +128,10 @@ Definition at line 32<

    -Definition at line 34 of file pcmn_update.php.

    -

    +

    +Definition at line 49 of file pcmn_update.php.
    @@ -146,10 +153,10 @@ Definition at line 34<

    -Definition at line 28 of file pcmn_update.php.

    -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/periode_8inc_8php-source.html b/doc/developper/html/periode_8inc_8php-source.html index 679ecfe55..c3f628b66 100644 --- a/doc/developper/html/periode_8inc_8php-source.html +++ b/doc/developper/html/periode_8inc_8php-source.html @@ -4,7 +4,7 @@ - +

    periode.inc.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,92 +27,92 @@
     00018 */
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00021 require_once("preference.php");
    -00022 $cn=DbConnect($_SESSION['g_dossier']);
    -00024 // Periode
    -00026 $action="";
    -00027 if ( isset($_REQUEST['action'])) 
    -00028      $action=$_REQUEST['action'];
    -00029 
    -00030 if ( $action=="change_per") {
    -00031   foreach($HTTP_GET_VARS as $key=>$element) 
    -00032     ${"$key"}=$element;
    -00033   echo "<TABLE>";
    -00034   echo '<TR> <FORM ACTION="user_advanced.php?p_action=periode" METHOD="POST">';
    -00035   echo ' <INPUT TYPE="HIDDEN" NAME="p_per" VALUE="'.$p_per.'">';
    -00036   echo '<TD> <INPUT TYPE="text" NAME="p_date_start" VALUE="'.$p_date_start.'"></TD>';
    -00037   echo '<TD> <INPUT TYPE="text" NAME="p_date_end" VALUE="'.$p_date_end.'"></TD>';
    -00038   echo '<TD> <INPUT TYPE="text" NAME="p_exercice" VALUE="'.$p_exercice.'"></TD>';
    -00039   echo '<TD> <INPUT TYPE="SUBMIT" NAME="conf_chg_per" Value="Change"</TD>';
    -00040   echo '</FORM></TR>';
    -00041   echo "</TABLE>";
    -00042 
    -00043 }
    -00044 if ( isset ($_POST["conf_chg_per"] ) ) {
    -00045   foreach($HTTP_POST_VARS as $key=>$element) 
    -00046     ${"$key"}=$element;
    -00047   if (isDate($p_date_start) == null ||
    -00048       isDate($p_date_end) == null ||
    -00049       strlen (trim($p_exercice)) == 0 ||
    -00050      (string) $p_exercice != (string)(int) $p_exercice)
    -00051     { 
    -00052       echo "<H2 class=\"error\"> Valeurs invalides</H2>";
    -00053       ShowPeriode($cn);
    -00054       return;
    -00055     }
    -00056   $Res=ExecSql($cn," update parm_periode ".
    -00057                "set p_start=to_date('". $p_date_start."','DD.MM.YYYY'),".
    -00058                " p_end=to_date('". $p_date_end."','DD.MM.YYYY'),".
    -00059                " p_exercice='".$p_exercice."'".
    -00060                " where p_id=".$p_per);
    -00061 
    -00062 
    -00063 
    -00064 }
    -00065 if ( isset ($_POST["add_per"] )) {
    -00066   foreach($HTTP_POST_VARS as $key=>$element) 
    -00067     ${"$key"}=$element;
    -00068   if (isDate($p_date_start) == null ||
    -00069       isDate($p_date_end) == null ||
    -00070       strlen (trim($p_exercice)) == 0 ||
    -00071      (string) $p_exercice != (string)(int) $p_exercice)
    -00072     { 
    -00073       echo "<H2 class=\"error\"> Valeurs invalides</H2>";
    -00074       ShowPeriode($cn);
    -00075       return;
    -00076     }
    -00077   $Res=ExecSql($cn,sprintf(" insert into parm_periode(p_start,p_end,p_closed,p_exercice)".
    -00078                            "values (to_date('%s','DD.MM.YYYY'),to_date('%s','DD.MM.YYYY')".
    -00079                            ",'f','%s')",
    -00080                            $p_date_start,
    -00081                            $p_date_end,
    -00082                            $p_exercice));
    -00083 
    -00084 
    -00085 }
    -00086 
    -00087 echo_debug('periode.inc',__LINE__,"Action $p_action");
    -00088 if ( $action=="closed") {
    -00089   $p_per=$_GET['p_per'];
    -00090   $Res=ExecSql($cn,"update parm_periode set p_closed=true where p_id=$p_per");
    -00091 }
    -00092 
    -00093 if ( $action== "delete_per" ) {
    -00094   $p_per=$_GET["p_per"];
    -00095 // Check if the periode is not used
    -00096   if ( CountSql($cn,"select * from jrnx where j_tech_per=$p_per") != 0 ) {
    -00097   echo '<h2 class="error"> Désolé mais cette période est utilisée</h2>';
    -00098   } else
    -00099   {
    -00100   $Res=ExecSql($cn,"delete from parm_periode where p_id=$p_per");
    -00101   }
    -00102 }
    -00103 
    -00104 
    -00105 ShowPeriode($cn);
    -00106 
    -00107 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00026 require_once("preference.php"); +00027 $cn=DbConnect($_SESSION['g_dossier']); +00029 // Periode +00031 $action=""; +00032 if ( isset($_REQUEST['action'])) +00033 $action=$_REQUEST['action']; +00034 +00035 if ( $action=="change_per") { +00036 foreach($HTTP_GET_VARS as $key=>$element) +00037 ${"$key"}=$element; +00038 echo "<TABLE>"; +00039 echo '<TR> <FORM ACTION="user_advanced.php?p_action=periode" METHOD="POST">'; +00040 echo ' <INPUT TYPE="HIDDEN" NAME="p_per" VALUE="'.$p_per.'">'; +00041 echo '<TD> <INPUT TYPE="text" NAME="p_date_start" VALUE="'.$p_date_start.'"></TD>'; +00042 echo '<TD> <INPUT TYPE="text" NAME="p_date_end" VALUE="'.$p_date_end.'"></TD>'; +00043 echo '<TD> <INPUT TYPE="text" NAME="p_exercice" VALUE="'.$p_exercice.'"></TD>'; +00044 echo '<TD> <INPUT TYPE="SUBMIT" NAME="conf_chg_per" Value="Change"</TD>'; +00045 echo '</FORM></TR>'; +00046 echo "</TABLE>"; +00047 +00048 } +00049 if ( isset ($_POST["conf_chg_per"] ) ) { +00050 foreach($HTTP_POST_VARS as $key=>$element) +00051 ${"$key"}=$element; +00052 if (isDate($p_date_start) == null || +00053 isDate($p_date_end) == null || +00054 strlen (trim($p_exercice)) == 0 || +00055 (string) $p_exercice != (string)(int) $p_exercice) +00056 { +00057 echo "<H2 class=\"error\"> Valeurs invalides</H2>"; +00058 ShowPeriode($cn); +00059 return; +00060 } +00061 $Res=ExecSql($cn," update parm_periode ". +00062 "set p_start=to_date('". $p_date_start."','DD.MM.YYYY'),". +00063 " p_end=to_date('". $p_date_end."','DD.MM.YYYY'),". +00064 " p_exercice='".$p_exercice."'". +00065 " where p_id=".$p_per); +00066 +00067 +00068 +00069 } +00070 if ( isset ($_POST["add_per"] )) { +00071 foreach($HTTP_POST_VARS as $key=>$element) +00072 ${"$key"}=$element; +00073 if (isDate($p_date_start) == null || +00074 isDate($p_date_end) == null || +00075 strlen (trim($p_exercice)) == 0 || +00076 (string) $p_exercice != (string)(int) $p_exercice) +00077 { +00078 echo "<H2 class=\"error\"> Valeurs invalides</H2>"; +00079 ShowPeriode($cn); +00080 return; +00081 } +00082 $Res=ExecSql($cn,sprintf(" insert into parm_periode(p_start,p_end,p_closed,p_exercice)". +00083 "values (to_date('%s','DD.MM.YYYY'),to_date('%s','DD.MM.YYYY')". +00084 ",'f','%s')", +00085 $p_date_start, +00086 $p_date_end, +00087 $p_exercice)); +00088 +00089 +00090 } +00091 +00092 echo_debug('periode.inc',__LINE__,"Action $p_action"); +00093 if ( $action=="closed") { +00094 $p_per=$_GET['p_per']; +00095 $Res=ExecSql($cn,"update parm_periode set p_closed=true where p_id=$p_per"); +00096 } +00097 +00098 if ( $action== "delete_per" ) { +00099 $p_per=$_GET["p_per"]; +00100 // Check if the periode is not used +00101 if ( CountSql($cn,"select * from jrnx where j_tech_per=$p_per") != 0 ) { +00102 echo '<h2 class="error"> Désolé mais cette période est utilisée</h2>'; +00103 } else +00104 { +00105 $Res=ExecSql($cn,"delete from parm_periode where p_id=$p_per"); +00106 } +00107 } +00108 +00109 +00110 ShowPeriode($cn); +00111 +00112 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/periode_8inc_8php.html b/doc/developper/html/periode_8inc_8php.html index 1e628662c..7175b8776 100644 --- a/doc/developper/html/periode_8inc_8php.html +++ b/doc/developper/html/periode_8inc_8php.html @@ -4,10 +4,12 @@ - + -

    periode.inc.php File Reference

    +

    periode.inc.php File Reference

    Still used ? More... +

    +

    Go to the source code of this file. @@ -21,14 +23,20 @@
     $Res
    -


    Variable Documentation

    +

    Detailed Description

    +Still used ? +

    +

    Todo:
    check if obsolete
    + +

    +Definition in file periode.inc.php.


    Variable Documentation

    @@ -44,9 +52,9 @@

    -Definition at line 26 of file periode.inc.php. +Definition at line 31 of file periode.inc.php.

    -Referenced by Cpdf::o_catalog(), Cpdf::o_destination(), Cpdf::o_encryption(), Cpdf::o_image(), and ShowMenuJrn(). +Referenced by Cpdf::o_catalog(), Cpdf::o_destination(), Cpdf::o_encryption(), Cpdf::o_image(), and ShowMenuJrn().

    - +
    $action = "" $action = ""

    @@ -71,7 +79,7 @@ Referenced by Cpdf::o_ca

    -Definition at line 22 of file periode.inc.php. +Definition at line 27 of file periode.inc.php.

    @@ -101,7 +109,7 @@ Definition at line 22< " where p_id=".$p_per)

    -Definition at line 56 of file periode.inc.php. +Definition at line 61 of file periode.inc.php.

    @@ -126,10 +134,10 @@ Definition at line 56<

    -Definition at line 54 of file periode.inc.php. +Definition at line 59 of file periode.inc.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/poste_8inc_8php-source.html b/doc/developper/html/poste_8inc_8php-source.html index 86f605207..c12c51dba 100644 --- a/doc/developper/html/poste_8inc_8php-source.html +++ b/doc/developper/html/poste_8inc_8php-source.html @@ -4,7 +4,7 @@ - +

    poste.inc.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,61 +27,59 @@
     00018 */
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00021 //p_action contains the main action (always poste here)
    -00022 // action contains the sub action 
    -00023 require_once("class_parm_code.php");
    -00024 
    -00026 // confirm mod
    -00027 if ( isset( $_POST['confirm_mod'] ) )
    -00028 {
    -00029   extract($_POST);
    -00030   $update=new parm_code($cn,$p_code);
    -00031   $update->p_comment=$p_comment;
    -00032   $update->p_value=$p_value;
    -00033   $update->Save();
    -00034 }
    -00035 $object=new parm_code($cn);
    -00036 
    -00037 $all=$object->LoadAll();
    -00038 echo '<div style="position:float;align:right; ">';
    -00039 echo '<table align="left">';
    -00040 for ($i=0;$i<sizeof($all);$i++)  {
    -00041   echo '<TR>';
    -00042   echo $all[$i]->Display();
    -00043   echo '<TD><FORM method="POST">';
    -00044   $w=new widget('hidden');
    -00045   $w->name='id';
    -00046   $w->value=$i;
    -00047   echo $w->IOValue();
    -00048   echo $w->Submit('mod','modifie');
    -00049   echo '</FORM>';
    -00050   echo '</TD>';
    -00051   echo "</TR>";
    -00052 }
    -00053 echo "</table>";
    -00054 echo "</div>";
    -00056 // modifie
    -00057 if ( isset ($_POST['mod'] ))
    -00058 {
    -00059   echo '<div style="position:float;align:right;">';
    -00060   echo "Voulez-vous vraiment modifier ?";
    -00061   echo '<FORM METHOD="POST">';
    -00062 
    -00063   echo "<TABLE>";
    -00064   $id=$_POST['id'];
    -00065   echo $all[$id]->Input();
    -00066   echo "</TABLE>";
    -00067   $h=new widget('hidden');
    -00068   $h->name='p_action';
    -00069   $h->value='poste';
    -00070   echo $h->IOValue();
    -00071   echo $w->Submit('confirm_mod','Confirme');
    -00072   echo $w->Submit('no','Cancel');
    -00073   echo "</FORM>";
    -00074   echo "</div>";
    -00075 
    -00076 } 
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00025 require_once("class_parm_code.php"); +00026 +00028 // confirm mod +00029 if ( isset( $_POST['confirm_mod'] ) ) +00030 { +00031 extract($_POST); +00032 $update=new parm_code($cn,$p_code); +00033 $update->p_comment=$p_comment; +00034 $update->p_value=$p_value; +00035 $update->Save(); +00036 } +00037 $object=new parm_code($cn); +00038 +00039 $all=$object->LoadAll(); +00040 echo '<div style="position:float;align:right; ">'; +00041 echo '<table align="left">'; +00042 for ($i=0;$i<sizeof($all);$i++) { +00043 echo '<TR>'; +00044 echo $all[$i]->Display(); +00045 echo '<TD><FORM method="POST">'; +00046 $w=new widget('hidden'); +00047 $w->name='id'; +00048 $w->value=$i; +00049 echo $w->IOValue(); +00050 echo $w->Submit('mod','modifie'); +00051 echo '</FORM>'; +00052 echo '</TD>'; +00053 echo "</TR>"; +00054 } +00055 echo "</table>"; +00056 echo "</div>"; +00058 // modifie +00059 if ( isset ($_POST['mod'] )) +00060 { +00061 echo '<div style="position:float;align:right;">'; +00062 echo "Voulez-vous vraiment modifier ?"; +00063 echo '<FORM METHOD="POST">'; +00064 +00065 echo "<TABLE>"; +00066 $id=$_POST['id']; +00067 echo $all[$id]->Input(); +00068 echo "</TABLE>"; +00069 $h=new widget('hidden'); +00070 $h->name='p_action'; +00071 $h->value='poste'; +00072 echo $h->IOValue(); +00073 echo $w->Submit('confirm_mod','Confirme'); +00074 echo $w->Submit('no','Cancel'); +00075 echo "</FORM>"; +00076 echo "</div>"; +00077 +00078 } +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/poste_8inc_8php.html b/doc/developper/html/poste_8inc_8php.html index 732b323bb..98c198fb9 100644 --- a/doc/developper/html/poste_8inc_8php.html +++ b/doc/developper/html/poste_8inc_8php.html @@ -4,10 +4,12 @@ - + -

    poste.inc.php File Reference

    +

    poste.inc.php File Reference

    p_action contains the main action (always poste here) action contains the sub action More... +

    +

    Go to the source code of this file. @@ -31,7 +33,12 @@
     $h = new widget('hidden')
    -


    Variable Documentation

    +

    Detailed Description

    +p_action contains the main action (always poste here) action contains the sub action +

    + +

    +Definition in file poste.inc.php.


    Variable Documentation

    @@ -54,7 +61,7 @@

    -Definition at line 37 of file poste.inc.php. +Definition at line 39 of file poste.inc.php.

    @@ -79,9 +86,9 @@ Definition at line 37

    -Definition at line 67 of file poste.inc.php. +Definition at line 69 of file poste.inc.php.

    -Referenced by FormAchInput(), FormAchView(), FormFin(), Cpdf::getFontDecender(), Cpdf::getFontHeight(), fiche_def_ref::Input(), ListJrn(), and ros_logo(). +Referenced by Document_modele::form(), FormAchInput(), FormAchView(), FormFin(), Cpdf::getFontDecender(), Cpdf::getFontHeight(), fiche_def_ref::Input(), ListJrn(), Document::ParseDocument(), and ros_logo().

    @@ -106,7 +113,7 @@ Referenced by FormA

    -Definition at line 35 of file poste.inc.php. +Definition at line 37 of file poste.inc.php.

    @@ -131,7 +138,7 @@ Definition at line 35

    -Definition at line 30 of file poste.inc.php. +Definition at line 32 of file poste.inc.php.

    @@ -156,7 +163,7 @@ Definition at line 30

    -Definition at line 44 of file poste.inc.php. +Definition at line 46 of file poste.inc.php.

    @@ -181,7 +188,7 @@ Definition at line 44

    -Definition at line 45 of file poste.inc.php. +Definition at line 47 of file poste.inc.php.

    @@ -206,9 +213,9 @@ Definition at line 45

    -Definition at line 31 of file poste.inc.php. +Definition at line 33 of file poste.inc.php.

    -Referenced by parm_code::Get(), parm_code::Input(), InsertJrn(), parm_code::Save(), and UpdateComment(). +Referenced by parm_code::Get(), parm_code::Input(), InsertJrn(), parm_code::Save(), and UpdateComment().

    @@ -233,9 +240,9 @@ Referenced by par

    -Definition at line 32 of file poste.inc.php. +Definition at line 34 of file poste.inc.php.

    -Referenced by parm_code::Get(), parm_code::Input(), and parm_code::Save(). +Referenced by parm_code::Get(), parm_code::Input(), and parm_code::Save().

    @@ -260,10 +267,10 @@ Referenced by par

    -Definition at line 46 of file poste.inc.php. +Definition at line 48 of file poste.inc.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/poste_8php-source.html b/doc/developper/html/poste_8php-source.html index d7a4947ab..ccb8606ae 100644 --- a/doc/developper/html/poste_8php-source.html +++ b/doc/developper/html/poste_8php-source.html @@ -4,7 +4,7 @@ - +

    poste.php

    Go to the documentation of this file.
    00001 <?
    @@ -30,118 +30,68 @@
     00021 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00022 /* $Revision$ */
     00023 
    -00024 /* function GetPosteLibelle
    -00025  * Purpose : Return the label of a poste
    -00026  * 
    -00027  * parm : 
    -00028  *      - p_dossier
    -00029  *      - p_id tmp_pcmn (pcm_val)
    -00030  *      - is_cn conneciton
    -00031  * gen :
    -00032  *      - none
    -00033  * return:
    -00034  *      - string 
    -00035  *
    -00036  */ 
    -00037 function GetPosteLibelle($p_dossier,$p_id,$is_cn=0)
    -00038 {
    -00039   include_once("postgres.php");
    -00040   if ( ! isset($is_cn) ) $is_cn=0;
    -00041   if ( $is_cn == 0) {
    -00042     $cn=DbConnect($p_dossier);
    -00043   } else {
    -00044     $cn=$p_dossier;
    -00045   }
    -00046   $Res=ExecSql($cn,"select pcm_lib from tmp_pcmn where pcm_val=$p_id");
    -00047   if ( pg_NumRows($Res) == 0) { return "non existing poste";}
    -00048   $l_poste=pg_fetch_row($Res,0);
    -00049   return $l_poste[0];
    -00050 }
    -00051 /* function GetNumberLine
    -00052  * Purpose : Max of ligne definie dans le journal
    -00053  * 
    -00054  * parm : 
    -00055  *      - p_dossier
    -00056  *      - p_jrn
    -00057  * gen :
    -00058  *      - none
    -00059  * return:
    -00060  *      - 
    -00061  *
    -00062  */ 
    -00063 function GetNumberLine($p_dossier,$p_jrn) 
    -00064 {
    -00065   $cn=DbConnect($p_dossier);
    -00066   $Res=ExecSql($cn,"select jrn_deb_max_line,jrn_cred_max_line from jrn_def where jrn_def_id=$p_jrn");
    -00067   if ( pg_NumRows($Res) == 0 ) {
    -00068     echo "<H2 class=\"warning\"> Journal non trouvé </H2>";
    -00069     //    return (3,3);
    -00070   }
    -00071   $l_line=pg_fetch_array($Res,0);
    -00072   $l_deb=$l_line['jrn_deb_max_line'];
    -00073   $l_cred=$l_line['jrn_cred_max_line'];
    -00074   //  return ($l_deb,$l_cred);
    -00075 
    -00076 }
    -00077 /* function PosteForm
    -00078  * Purpose : Cree un form pour prendre les postes
    -00079  * 
    -00080  * parm : 
    -00081  *      -  connection
    -00082  * gen :
    -00083  *      - noen
    -00084  * return:
    -00085  *      - morceau de code d'html qui contient un multiselect
    -00086  *        pour les postes
    -00087  *
    -00088  */ 
    -00089 function PosteForm($p_cn) {
    -00090   $Res=ExecSql($p_cn,"select pcm_val,pcm_lib from tmp_pcmn 
    -00091          where pcm_val = any (select j_poste from jrnx) order by pcm_val::text");
    -00092   $Max=pg_NumRows($Res);
    -00093   if ($Max==0) return null;
    -00094   $ret='<SELECT NAME="poste[]" SIZE="15" MULTIPLE>';
    -00095   for ( $i = 0;$i< $Max;$i++) {
    -00096     $line=pg_fetch_array($Res,$i);
    -00097     $ret.=sprintf('<OPTION VALUE="%s" > %s - %s',
    -00098                   $line['pcm_val'],
    -00099                   $line['pcm_val'],
    -00100                   $line['pcm_lib']);
    -00101   }//for
    -00102   $ret.="</SELECT>";
    -00103   return $ret;
    -00104 }
    -00105 /* function GetSolde
    -00106  * Purpose : give the balance of an account
    -00107  * 
    -00108  * parm : 
    -00109  *      -  connection
    -00110  *      - account
    -00111  *      - cond
    -00112  * gen :
    -00113  *      - none
    -00114  * return:
    -00115  *      - balance of the account
    -00116  *
    -00117  */ 
    -00118 function GetSolde($p_cn,$p_account,$p_cond="") {
    -00119   $Res=ExecSql($p_cn,"select j_poste,sum(deb) as sum_deb, sum(cred) as sum_cred from 
    -00120           ( select j_poste, 
    -00121              case when j_debit='t' then j_montant else 0 end as deb, 
    -00122              case when j_debit='f' then j_montant else 0 end as cred 
    -00123           from jrnx join tmp_pcmn on j_poste=pcm_val 
    -00124               where  
    -00125             j_poste=$p_account
    -00126           ) as m group by j_poste ");
    -00127   $Max=pg_NumRows($Res);
    -00128   if ($Max==0) return 0;
    -00129   $r=pg_fetch_array($Res,0);
    -00130 
    -00131   return $r['sum_deb']-$r['sum_cred'];
    -00132 }
    -00133 
    -00134 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00036 function GetPosteLibelle($p_dossier,$p_id,$is_cn=0) +00037 { +00038 include_once("postgres.php"); +00039 if ( ! isset($is_cn) ) $is_cn=0; +00040 if ( $is_cn == 0) { +00041 $cn=DbConnect($p_dossier); +00042 } else { +00043 $cn=$p_dossier; +00044 } +00045 $Res=ExecSql($cn,"select pcm_lib from tmp_pcmn where pcm_val=$p_id"); +00046 if ( pg_NumRows($Res) == 0) { return "non existing poste";} +00047 $l_poste=pg_fetch_row($Res,0); +00048 return $l_poste[0]; +00049 } +00062 function GetNumberLine($p_dossier,$p_jrn) +00063 { +00064 $cn=DbConnect($p_dossier); +00065 $Res=ExecSql($cn,"select jrn_deb_max_line,jrn_cred_max_line from jrn_def where jrn_def_id=$p_jrn"); +00066 if ( pg_NumRows($Res) == 0 ) { +00067 echo "<H2 class=\"warning\"> Journal non trouvé </H2>"; +00068 // return (3,3); +00069 } +00070 $l_line=pg_fetch_array($Res,0); +00071 $l_deb=$l_line['jrn_deb_max_line']; +00072 $l_cred=$l_line['jrn_cred_max_line']; +00073 return ($l_deb,$l_cred); +00074 +00075 } +00087 function PosteForm($p_cn) { +00088 $Res=ExecSql($p_cn,"select pcm_val,pcm_lib from tmp_pcmn +00089 where pcm_val = any (select j_poste from jrnx) order by pcm_val::text"); +00090 $Max=pg_NumRows($Res); +00091 if ($Max==0) return null; +00092 $ret='<SELECT NAME="poste[]" SIZE="15" MULTIPLE>'; +00093 for ( $i = 0;$i< $Max;$i++) { +00094 $line=pg_fetch_array($Res,$i); +00095 $ret.=sprintf('<OPTION VALUE="%s" > %s - %s', +00096 $line['pcm_val'], +00097 $line['pcm_val'], +00098 $line['pcm_lib']); +00099 }//for +00100 $ret.="</SELECT>"; +00101 return $ret; +00102 } +00114 function GetSolde($p_cn,$p_account,$p_cond="") { +00115 $Res=ExecSql($p_cn,"select j_poste,sum(deb) as sum_deb, sum(cred) as sum_cred from +00116 ( select j_poste, +00117 case when j_debit='t' then j_montant else 0 end as deb, +00118 case when j_debit='f' then j_montant else 0 end as cred +00119 from jrnx join tmp_pcmn on j_poste=pcm_val +00120 where +00121 j_poste=$p_account +00122 ) as m group by j_poste "); +00123 $Max=pg_NumRows($Res); +00124 if ($Max==0) return 0; +00125 $r=pg_fetch_array($Res,0); +00126 +00127 return $r['sum_deb']-$r['sum_cred']; +00128 } +00129 +00130 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/poste_8php.html b/doc/developper/html/poste_8php.html index 76194e732..28ddf84ab 100644 --- a/doc/developper/html/poste_8php.html +++ b/doc/developper/html/poste_8php.html @@ -4,7 +4,7 @@ - +

    poste.php File Reference

    @@ -14,12 +14,16 @@

    Functions

     GetPosteLibelle ($p_dossier, $p_id, $is_cn=0) + Return the label of a poste.
     GetNumberLine ($p_dossier, $p_jrn) + Max of ligne definie dans le journal.
     PosteForm ($p_cn) + Cree un form pour prendre les postes.
     GetSolde ($p_cn, $p_account, $p_cond="") + give the balance of an account

    Function Documentation

    @@ -56,11 +60,22 @@

    +Max of ligne definie dans le journal. +

    +

    Parameters:
    + + + +
    $p_dossier dossier id
    $p_jrn ledger id gen :
      +
    • none return:
    +
    +
    +
    Todo:
    obsolete ?

    -Definition at line 63 of file poste.php. +Definition at line 62 of file poste.php.

    -References $cn, $l_line, $Res, DbConnect(), and ExecSql(). +References $cn, $l_line, $Res, DbConnect(), and ExecSql().

    @@ -103,13 +118,23 @@ References $cn,

    +Return the label of a poste. +

    +

    Parameters:
    + + + + +
    $p_dossier 
    $p_id tmp_pcmn (pcm_val)
    $is_cn conneciton
    +
    +
    Returns:
    string

    -Definition at line 37 of file poste.php. +Definition at line 36 of file poste.php.

    -References $cn, $Res, DbConnect(), and ExecSql(). +References $cn, $Res, DbConnect(), and ExecSql().

    -Referenced by FormODS(), Balance::GetRow(), ImpHtml(), and ViewRecord(). +Referenced by FormODS(), Balance::GetRow(), ImpHtml(), and ViewRecord().

    @@ -152,13 +177,23 @@ Referenced by FormO

    +give the balance of an account +

    +

    Parameters:
    + + + + +
    $p_cn connection
    $p_account account
    $p_cond sql condition
    +
    +
    Returns:
    balance of the account

    -Definition at line 118 of file poste.php. +Definition at line 114 of file poste.php.

    -References $Max, $r, $Res, and ExecSql(). +References $Max, $r, $Res, and ExecSql().

    -Referenced by FormFin(). +Referenced by FormFin().

    @@ -186,16 +221,24 @@ Referenced by FormF

    +Cree un form pour prendre les postes. +

    +

    Parameters:
    + + +
    connection 
    +
    +
    Returns:
    morceau de code d'html qui contient un multiselect pour les postes

    -Definition at line 89 of file poste.php. +Definition at line 87 of file poste.php.

    -References $Max, $Res, $ret, and ExecSql(). +References $Max, $Res, $ret, and ExecSql().

    Referenced by ViewImp(). -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/poste__csv_8php-source.html b/doc/developper/html/poste__csv_8php-source.html index 62c6294cc..5ae1766b8 100644 --- a/doc/developper/html/poste__csv_8php-source.html +++ b/doc/developper/html/poste__csv_8php-source.html @@ -4,7 +4,7 @@ - +

    poste_csv.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,58 +27,58 @@
     00018 */
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00021 include_once("ac_common.php");
    -00022 include_once ("postgres.php");
    -00023 include ('class_user.php');
    -00024 include("class_poste.php");
    -00025 header('Content-type: application/csv');
    -00026 header('Content-Disposition: attachment;filename="poste.csv"',FALSE);
    -00027 
    -00028 /* Admin. Dossier */
    -00029 $cn=DbConnect($_SESSION['g_dossier']);
    +00024 include_once("ac_common.php");
    +00025 include_once ("postgres.php");
    +00026 include ('class_user.php');
    +00027 include("class_poste.php");
    +00028 header('Content-type: application/csv');
    +00029 header('Content-Disposition: attachment;filename="poste.csv"',FALSE);
     00030 
    -00031 
    -00032 $User=new cl_user($cn);
    -00033 $User->Check();
    +00031 /* Admin. Dossier */
    +00032 $cn=DbConnect($_SESSION['g_dossier']);
    +00033 
     00034 
    -00035 
    -00036 $Poste=new poste($cn,$_POST['poste_id']);
    -00037 $Poste->GetName();
    -00038 list($array,$tot_deb,$tot_cred)=$Poste->GetRow( $_POST['from_periode'],
    -00039                                                 $_POST['to_periode']
    -00040                                                 );
    -00041 if ( count($Poste->row ) == 0 ) 
    -00042   exit;
    -00043 
    -00044  echo "\"Code interne\";".
    -00045      "\"Date\";".
    -00046       "\"Description\";".
    -00047       "\"Débit\";".
    -00048       "\"Crédit\"";
    -00049 printf("\n");
    -00050 
    -00051 
    -00052   foreach ( $Poste->row as $op ) { 
    -00053       echo '"'.$op['jr_internal'].'"'.";".
    -00054         '"'.$op['j_date'].'"'.";".
    -00055         '"'.$op['description'].'"'.";".
    -00056         sprintf("%8.4f",$op['deb_montant']).";".
    -00057         sprintf("%8.4f",$op['cred_montant']);
    -00058       printf("\n");
    -00059 
    -00060     
    -00061   }
    -00062   $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur";
    -00063   $diff=abs($tot_deb-$tot_cred);
    -00064 printf(
    -00065     '"'."$solde_type".'"'.";".
    -00066     sprintf("%8.4f",$diff).";".
    -00067     sprintf("%8.4f",$tot_deb).";".
    -00068   sprintf("%8.4f",$tot_cred)."\n");
    -00069 
    -00070   exit;
    -00071 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00035 $User=new cl_user($cn); +00036 $User->Check(); +00037 +00038 +00039 $Poste=new poste($cn,$_POST['poste_id']); +00040 $Poste->GetName(); +00041 list($array,$tot_deb,$tot_cred)=$Poste->GetRow( $_POST['from_periode'], +00042 $_POST['to_periode'] +00043 ); +00044 if ( count($Poste->row ) == 0 ) +00045 exit; +00046 +00047 echo "\"Code interne\";". +00048 "\"Date\";". +00049 "\"Description\";". +00050 "\"Débit\";". +00051 "\"Crédit\""; +00052 printf("\n"); +00053 +00054 +00055 foreach ( $Poste->row as $op ) { +00056 echo '"'.$op['jr_internal'].'"'.";". +00057 '"'.$op['j_date'].'"'.";". +00058 '"'.$op['description'].'"'.";". +00059 sprintf("%8.4f",$op['deb_montant']).";". +00060 sprintf("%8.4f",$op['cred_montant']); +00061 printf("\n"); +00062 +00063 +00064 } +00065 $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; +00066 $diff=abs($tot_deb-$tot_cred); +00067 printf( +00068 '"'."$solde_type".'"'.";". +00069 sprintf("%8.4f",$diff).";". +00070 sprintf("%8.4f",$tot_deb).";". +00071 sprintf("%8.4f",$tot_cred)."\n"); +00072 +00073 exit; +00074 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/poste__csv_8php.html b/doc/developper/html/poste__csv_8php.html index a6b2afb9b..ce70e86b1 100644 --- a/doc/developper/html/poste__csv_8php.html +++ b/doc/developper/html/poste__csv_8php.html @@ -4,10 +4,12 @@ - + -

    poste_csv.php File Reference

    +

    poste_csv.php File Reference

    Send the poste list in csv. More... +

    +

    Go to the source code of this file. @@ -25,7 +27,12 @@
     exit
    -


    Variable Documentation

    +

    Detailed Description

    +Send the poste list in csv. +

    + +

    +Definition in file poste_csv.php.


    Variable Documentation

    @@ -48,7 +55,7 @@

    -Definition at line 29 of file poste_csv.php. +Definition at line 32 of file poste_csv.php.

    @@ -73,9 +80,9 @@ Definition at line 29

    -Definition at line 63 of file poste_csv.php. +Definition at line 66 of file poste_csv.php.

    -Referenced by ViewStock(). +Referenced by ViewStock().

    @@ -100,7 +107,7 @@ Referenced by ViewStock(

    -Definition at line 36 of file poste_csv.php. +Definition at line 39 of file poste_csv.php.

    @@ -125,7 +132,7 @@ Definition at line 36

    -Definition at line 62 of file poste_csv.php. +Definition at line 65 of file poste_csv.php.

    @@ -150,7 +157,7 @@ Definition at line 62

    -Definition at line 32 of file poste_csv.php. +Definition at line 35 of file poste_csv.php.

    @@ -175,10 +182,10 @@ Definition at line 32

    -Definition at line 70 of file poste_csv.php. +Definition at line 73 of file poste_csv.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/poste__pdf_8php-source.html b/doc/developper/html/poste__pdf_8php-source.html index a0b588cd7..4915ae227 100644 --- a/doc/developper/html/poste__pdf_8php-source.html +++ b/doc/developper/html/poste__pdf_8php-source.html @@ -4,7 +4,7 @@ - +

    poste_pdf.php

    Go to the documentation of this file.
    00001 <?
    @@ -29,79 +29,78 @@
     00020 
     00021 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00022 // $Revision$
    -00023 
    -00024 include_once("class_poste.php");
    -00025 include_once("ac_common.php");
    -00026 include_once("postgres.php");
    -00027 include_once("class.ezpdf.php");
    -00028 include_once("impress_inc.php");
    -00029 include("poste.php");
    -00030 
    -00031     $cn=DbConnect($_SESSION['g_dossier']);
    -00032 foreach ($HTTP_POST_VARS as $key=>$element) {
    -00033   ${"$key"}=$element;
    -00034 }
    -00035 // if ( isset ( $all_poste) ){ //choisit de voir tous les postes
    -00036 //   $r_poste=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val = any ".
    -00037 //                 " (select j_poste from jrnx) order by pcm_val::text");
    -00038 //   $nPoste=pg_numRows($r_poste);
    -00039 //   for ( $i=0;$i<$nPoste;$i++) {
    -00040 //     $t_poste=pg_fetch_array($r_poste,$i);
    -00041 //     $poste[]=$t_poste['pcm_val'];
    -00042 //   } 
    -00043 // }      
    -00044 
    -00045 
    -00046     $ret="";
    -00047     $pdf=& new Cezpdf();
    -00048     $pdf->selectFont('./addon/fonts/Helvetica.afm');
    -00049 
    -00050 //$rap_deb=0;$rap_cred=0;
    -00051 //for ( $i =0;$i<count($poste);$i++) {
    -00052 $Poste=new poste($cn,$poste_id);
    -00053 list($array,$tot_deb,$tot_cred)=$Poste->GetRow($from_periode,$to_periode);
    -00054     // don't print empty account
    -00055 // if ( count($array) == 0 ) {
    -00056 //   continue;
    -00057 //  }
    -00058 $Libelle=sprintf("(%s) %s ",$Poste->id,$Poste->GetName());
    -00059     
    -00060     //  $pdf->ezText($Libelle,30);
    -00061     $pdf->ezTable($array,
    -00062                   array ('jr_internal'=>'Opération',
    -00063                        'j_date' => 'Date',
    -00064                        'jrn_name'=>'Journal',
    -00065                          'description'=>'Description',
    -00066                        'deb_montant'=> 'Montant',
    -00067                        'cred_montant'=> 'Montant'
    -00068                        ),$Libelle,
    -00069                 array('shaded'=>0,'showHeadings'=>1,'width'=>500,
    -00070                       'cols'=>array('montant'=> array('justification'=>'right'),
    -00071                                     )));
    -00072 $str_debit=sprintf("Débit  % 12.2f",$tot_deb);
    -00073 $str_cred=sprintf("Crédit % 12.2f",$tot_cred);
    -00074 $diff_solde=$tot_deb-$tot_cred;
    -00075 if ( $diff_solde < 0 ) {
    -00076         $solde=" C ";
    -00077         $diff_solde*=-1;
    -00078         } else 
    -00079         {
    -00080         $solde=" D ";
    -00081         }
    -00082 $str_solde=sprintf(" Solde %s %12.2f",$solde,$diff_solde);
    -00083 
    -00084  $pdf->ezText($str_debit,10,array('justification'=>'right'));
    -00085  $pdf->ezText($str_cred,10,array('justification'=>'right'));
    -00086  $pdf->ezText($str_solde,14,array('justification'=>'right'));
    -00087 
    -00088   //New page
    -00089   //$pdf->ezNewPage();
    -00090 //}    
    -00091 
    -00092 $pdf->ezStream();
    +00026 include_once("class_poste.php");
    +00027 include_once("ac_common.php");
    +00028 include_once("postgres.php");
    +00029 include_once("class.ezpdf.php");
    +00030 include_once("impress_inc.php");
    +00031 include("poste.php");
    +00032 
    +00033     $cn=DbConnect($_SESSION['g_dossier']);
    +00034 foreach ($HTTP_POST_VARS as $key=>$element) {
    +00035   ${"$key"}=$element;
    +00036 }
    +00037 // if ( isset ( $all_poste) ){ //choisit de voir tous les postes
    +00038 //   $r_poste=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val = any ".
    +00039 //                 " (select j_poste from jrnx) order by pcm_val::text");
    +00040 //   $nPoste=pg_numRows($r_poste);
    +00041 //   for ( $i=0;$i<$nPoste;$i++) {
    +00042 //     $t_poste=pg_fetch_array($r_poste,$i);
    +00043 //     $poste[]=$t_poste['pcm_val'];
    +00044 //   } 
    +00045 // }      
    +00046 
    +00047 
    +00048     $ret="";
    +00049     $pdf=& new Cezpdf();
    +00050     $pdf->selectFont('./addon/fonts/Helvetica.afm');
    +00051 
    +00052 //$rap_deb=0;$rap_cred=0;
    +00053 //for ( $i =0;$i<count($poste);$i++) {
    +00054 $Poste=new poste($cn,$poste_id);
    +00055 list($array,$tot_deb,$tot_cred)=$Poste->GetRow($from_periode,$to_periode);
    +00056     // don't print empty account
    +00057 // if ( count($array) == 0 ) {
    +00058 //   continue;
    +00059 //  }
    +00060 $Libelle=sprintf("(%s) %s ",$Poste->id,$Poste->GetName());
    +00061     
    +00062     //  $pdf->ezText($Libelle,30);
    +00063     $pdf->ezTable($array,
    +00064                   array ('jr_internal'=>'Opération',
    +00065                        'j_date' => 'Date',
    +00066                        'jrn_name'=>'Journal',
    +00067                          'description'=>'Description',
    +00068                        'deb_montant'=> 'Montant',
    +00069                        'cred_montant'=> 'Montant'
    +00070                        ),$Libelle,
    +00071                 array('shaded'=>0,'showHeadings'=>1,'width'=>500,
    +00072                       'cols'=>array('montant'=> array('justification'=>'right'),
    +00073                                     )));
    +00074 $str_debit=sprintf("Débit  % 12.2f",$tot_deb);
    +00075 $str_cred=sprintf("Crédit % 12.2f",$tot_cred);
    +00076 $diff_solde=$tot_deb-$tot_cred;
    +00077 if ( $diff_solde < 0 ) {
    +00078         $solde=" C ";
    +00079         $diff_solde*=-1;
    +00080         } else 
    +00081         {
    +00082         $solde=" D ";
    +00083         }
    +00084 $str_solde=sprintf(" Solde %s %12.2f",$solde,$diff_solde);
    +00085 
    +00086  $pdf->ezText($str_debit,10,array('justification'=>'right'));
    +00087  $pdf->ezText($str_cred,10,array('justification'=>'right'));
    +00088  $pdf->ezText($str_solde,14,array('justification'=>'right'));
    +00089 
    +00090   //New page
    +00091   //$pdf->ezNewPage();
    +00092 //}    
     00093 
    -00094 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00094 $pdf->ezStream(); +00095 +00096 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/poste__pdf_8php.html b/doc/developper/html/poste__pdf_8php.html index 8f8b00964..977d17811 100644 --- a/doc/developper/html/poste__pdf_8php.html +++ b/doc/developper/html/poste__pdf_8php.html @@ -4,10 +4,12 @@ - + -

    poste_pdf.php File Reference

    +

    poste_pdf.php File Reference

    send the account list in PDF More... +

    +

    Go to the source code of this file. @@ -25,7 +27,12 @@
     $diff_solde = $tot_deb-$tot_cred
    -


    Variable Documentation

    +

    Detailed Description

    +send the account list in PDF +

    + +

    +Definition in file poste_pdf.php.


    Variable Documentation

    @@ -48,7 +55,7 @@

    -Definition at line 31 of file poste_pdf.php. +Definition at line 33 of file poste_pdf.php.

    @@ -73,7 +80,7 @@ Definition at line 31

    -Definition at line 74 of file poste_pdf.php. +Definition at line 76 of file poste_pdf.php.

    @@ -98,7 +105,7 @@ Definition at line 74

    -Definition at line 58 of file poste_pdf.php. +Definition at line 60 of file poste_pdf.php.

    @@ -123,7 +130,7 @@ Definition at line 58

    -Definition at line 52 of file poste_pdf.php. +Definition at line 54 of file poste_pdf.php.

    @@ -148,7 +155,7 @@ Definition at line 52

    -Definition at line 73 of file poste_pdf.php. +Definition at line 75 of file poste_pdf.php.

    @@ -173,10 +180,10 @@ Definition at line 73

    -Definition at line 72 of file poste_pdf.php. +Definition at line 74 of file poste_pdf.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/poste__search_8php-source.html b/doc/developper/html/poste__search_8php-source.html index d9f036fa1..7b7e3820c 100644 --- a/doc/developper/html/poste__search_8php-source.html +++ b/doc/developper/html/poste__search_8php-source.html @@ -4,7 +4,7 @@ - +

    poste_search.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,170 +27,169 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 
    -00022 include_once ("ac_common.php");
    -00023 html_page_start($_SESSION['g_theme'],"onLoad='window.focus();'");
    -00024 include_once ("postgres.php");
    -00025 include_once("jrn.php");
    -00026 /* Admin. Dossier */
    -00027 $rep=DbConnect();
    -00028 include_once ("class_user.php");
    -00029 $User=new cl_user($rep);
    -00030 $User->Check();
    -00031 
    -00032 echo JS_SEARCH_POSTE;
    +00024 include_once ("ac_common.php");
    +00025 html_page_start($_SESSION['g_theme'],"onLoad='window.focus();'");
    +00026 include_once ("postgres.php");
    +00027 include_once("jrn.php");
    +00028 /* Admin. Dossier */
    +00029 $rep=DbConnect();
    +00030 include_once ("class_user.php");
    +00031 $User=new cl_user($rep);
    +00032 $User->Check();
     00033 
    -00034 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00035   echo "You must choose a Dossier ";
    -00036   exit -2;
    -00037 }
    -00038 
    -00039 $c_comment="";
    -00040 $c_class="";
    -00041 
    -00042 $condition="";
    -00043 $cn=DbConnect($_SESSION['g_dossier']);
    -00044 if ( isset($_POST['search']) ) {
    -00045   $c1=0;
    -00046   foreach( $HTTP_POST_VARS as $key=>$element){
    -00047     ${"$key"}=$element;
    -00048   }
    -00049   if ( strlen(trim($p_comment)) != 0 ) {
    -00050     $c_comment=" where upper(pcm_lib) like upper('%$p_comment%')";
    -00051     $c1=1;
    -00052   }
    -00053   if ( strlen(trim($p_class)) != 0 &&
    -00054        (string) $p_class == (int)(string) $p_class) {
    -00055     if ($c1==1) 
    -00056       $clause=" and ";
    -00057     else
    -00058       $clause = " where ";
    -00059     $c_class=sprintf(" %s pcm_val::text like '%s%%'",$clause,$p_class);
    -00060 
    -00061     }
    -00062   
    -00063 
    -00064   $condition=$c_comment.$c_class;
    -00065 }
    -00066 $url="";
    -00067 // Filter ???
    -00068 if ( isset($_GET['filter'])) {
    -00069   $url="?filter=1";
    -00070   // There is a filter, the value of the filter is the journal id, we
    -00071   // have to find what account are available
    -00072   $SqlCred="";
    -00073   // Load the property
    -00074   $l_line=GetJrnProperty($cn,$_GET['p_jrn']);
    -00075   if ( strlen(trim ($l_line['jrn_def_class_cred']) ) > 0 ) {
    -00076     $valid_cred=split(" ",$l_line['jrn_def_class_cred']);
    -00077 
    -00078     // Creation query
    -00079     foreach ( $valid_cred as $item_cred) {
    -00080       if ( strlen (trim($item_cred))) {
    -00081         echo_debug('poste_search.php',__LINE__,"l_line[jrn_def_class_cred] $l_line[jrn_def_class_cred] item_cred $item_cred");
    -00082         if ( strstr($item_cred,"*") == true ) {
    -00083           $item_cred=strtr($item_cred,"*","%");
    -00084           $Sql=" pcm_val like '$item_cred' or";
    -00085         } else {
    -00086           $Sql=" pcm_val = '$item_cred' or";
    -00087         }
    -00088         $SqlCred=$SqlCred.$Sql;
    -00089       }
    -00090     }//foreach
    -00091    
    -00092   }
    -00093   if ( strlen(trim ($l_line['jrn_def_class_deb']) ) > 0 ) {
    -00094     $valid_deb=split(" ",$l_line['jrn_def_class_deb']);
    -00095 
    -00096     // Creation query
    -00097     foreach ( $valid_deb as $item_deb) {
    -00098       if ( strlen (trim($item_deb))) {
    -00099         echo_debug('poste_search.php',__LINE__,"l_line[jrn_def_class_deb] $l_line[jrn_def_class_deb] item_deb $item_deb");
    -00100         if ( strstr($item_deb,"*") == true ) {
    -00101           $item_cred=strtr($item_deb,"*","%");
    -00102           $Sql=" pcm_val like '$item_deb' or";
    -00103         } else {
    -00104           $Sql=" pcm_val = '$item_deb' or";
    -00105         }
    -00106         $SqlCred=$SqlCred.$Sql;
    -00107       }
    -00108     }//foreach
    -00109        
    -00110   }
    -00111   if ( $condition=="") {
    -00112     $condition .= ($SqlCred=="")?"":" where  ".substr($SqlCred,0,strlen($SqlCred)-2);
    -00113   } else {
    -00114     $condition .= ($SqlCred=="")?"":" and (  ".substr($SqlCred,0,strlen($SqlCred)-2)." ) ";
    -00115   }
    -00116 }// if (isset($_GET['filter']))
    -00117 if ( isset($_GET['p_ctl'])) {
    -00118   $p_ctl=$_GET['p_ctl'];
    -00119 }
    -00120 if ( isset($_POST['p_ctl'])) {
    -00121   $p_ctl=$_POST['p_ctl'];
    -00122 }
    -00123 
    -00124 echo_debug('poste_search.php',__LINE__,"condition = $condition");
    +00034 echo JS_SEARCH_POSTE;
    +00035 
    +00036 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00037   echo "You must choose a Dossier ";
    +00038   exit -2;
    +00039 }
    +00040 
    +00041 $c_comment="";
    +00042 $c_class="";
    +00043 
    +00044 $condition="";
    +00045 $cn=DbConnect($_SESSION['g_dossier']);
    +00046 if ( isset($_POST['search']) ) {
    +00047   $c1=0;
    +00048   foreach( $HTTP_POST_VARS as $key=>$element){
    +00049     ${"$key"}=$element;
    +00050   }
    +00051   if ( strlen(trim($p_comment)) != 0 ) {
    +00052     $c_comment=" where upper(pcm_lib) like upper('%$p_comment%')";
    +00053     $c1=1;
    +00054   }
    +00055   if ( strlen(trim($p_class)) != 0 &&
    +00056        (string) $p_class == (int)(string) $p_class) {
    +00057     if ($c1==1) 
    +00058       $clause=" and ";
    +00059     else
    +00060       $clause = " where ";
    +00061     $c_class=sprintf(" %s pcm_val::text like '%s%%'",$clause,$p_class);
    +00062 
    +00063     }
    +00064   
    +00065 
    +00066   $condition=$c_comment.$c_class;
    +00067 }
    +00068 $url="";
    +00069 // Filter ???
    +00070 if ( isset($_GET['filter'])) {
    +00071   $url="?filter=1";
    +00072   // There is a filter, the value of the filter is the journal id, we
    +00073   // have to find what account are available
    +00074   $SqlCred="";
    +00075   // Load the property
    +00076   $l_line=GetJrnProperty($cn,$_GET['p_jrn']);
    +00077   if ( strlen(trim ($l_line['jrn_def_class_cred']) ) > 0 ) {
    +00078     $valid_cred=split(" ",$l_line['jrn_def_class_cred']);
    +00079 
    +00080     // Creation query
    +00081     foreach ( $valid_cred as $item_cred) {
    +00082       if ( strlen (trim($item_cred))) {
    +00083         echo_debug('poste_search.php',__LINE__,"l_line[jrn_def_class_cred] $l_line[jrn_def_class_cred] item_cred $item_cred");
    +00084         if ( strstr($item_cred,"*") == true ) {
    +00085           $item_cred=strtr($item_cred,"*","%");
    +00086           $Sql=" pcm_val like '$item_cred' or";
    +00087         } else {
    +00088           $Sql=" pcm_val = '$item_cred' or";
    +00089         }
    +00090         $SqlCred=$SqlCred.$Sql;
    +00091       }
    +00092     }//foreach
    +00093    
    +00094   }
    +00095   if ( strlen(trim ($l_line['jrn_def_class_deb']) ) > 0 ) {
    +00096     $valid_deb=split(" ",$l_line['jrn_def_class_deb']);
    +00097 
    +00098     // Creation query
    +00099     foreach ( $valid_deb as $item_deb) {
    +00100       if ( strlen (trim($item_deb))) {
    +00101         echo_debug('poste_search.php',__LINE__,"l_line[jrn_def_class_deb] $l_line[jrn_def_class_deb] item_deb $item_deb");
    +00102         if ( strstr($item_deb,"*") == true ) {
    +00103           $item_cred=strtr($item_deb,"*","%");
    +00104           $Sql=" pcm_val like '$item_deb' or";
    +00105         } else {
    +00106           $Sql=" pcm_val = '$item_deb' or";
    +00107         }
    +00108         $SqlCred=$SqlCred.$Sql;
    +00109       }
    +00110     }//foreach
    +00111        
    +00112   }
    +00113   if ( $condition=="") {
    +00114     $condition .= ($SqlCred=="")?"":" where  ".substr($SqlCred,0,strlen($SqlCred)-2);
    +00115   } else {
    +00116     $condition .= ($SqlCred=="")?"":" and (  ".substr($SqlCred,0,strlen($SqlCred)-2)." ) ";
    +00117   }
    +00118 }// if (isset($_GET['filter']))
    +00119 if ( isset($_GET['p_ctl'])) {
    +00120   $p_ctl=$_GET['p_ctl'];
    +00121 }
    +00122 if ( isset($_POST['p_ctl'])) {
    +00123   $p_ctl=$_POST['p_ctl'];
    +00124 }
     00125 
    -00126 echo '<FORM ACTION="poste_search.php'.$url.'" METHOD="POST">';
    -00127 if ( isset($p_ctl) ) {
    -00128   if ($p_ctl != 'not')   echo '<INPUT TYPE="hidden" name="p_ctl" value="'.$p_ctl.'">';
    -00129 }
    -00130 echo '<TABLE>';
    -00131 echo '<TR>';
    -00132 
    -00133 echo '<TD>Poste Comptable Commence par  </TD>';
    +00126 echo_debug('poste_search.php',__LINE__,"condition = $condition");
    +00127 
    +00128 echo '<FORM ACTION="poste_search.php'.$url.'" METHOD="POST">';
    +00129 if ( isset($p_ctl) ) {
    +00130   if ($p_ctl != 'not')   echo '<INPUT TYPE="hidden" name="p_ctl" value="'.$p_ctl.'">';
    +00131 }
    +00132 echo '<TABLE>';
    +00133 echo '<TR>';
     00134 
    -00135 if ( ! isset ($p_class) ) $p_class="";
    -00136 $opt=" <INPUT TYPE=\"text\" value=\"$p_class\" name=\"st_with\">";
    -00137 echo '<TD> <INPUT TYPE="text" name="p_class" VALUE="'.$p_class.'"></TD>';
    -00138 
    -00139 echo '<TD> Libellé </TD>';
    -00140 echo '<TD> contient </TD>';
    -00141 if ( ! isset ($p_comment) ) $p_comment="";
    -00142 echo '<TD> <INPUT TYPE="text" name="p_comment" VALUE="'.$p_comment.'"></TD></TR>';
    -00143 echo '</TABLE>';
    -00144 echo '<INPUT TYPE="submit" name="search" value="cherche">';
    -00145 echo '</FORM>';
    -00146 
    -00147 // if request search
    -00148 if ( isset($_POST['search']) or isset($_GET['filter']) ) {
    -00149   $Res=ExecSql($cn,"select * from tmp_pcmn $condition order by pcm_val::text");
    -00150   
    -00151   $MaxLine=pg_NumRows($Res);
    -00152   if ( $MaxLine==0) { 
    -00153     html_page_stop();
    -00154     return;
    -00155   }
    -00156   echo '<TABLE BORDER="0">';
    -00157   $l_id="";
    -00158   
    -00159   for ( $i=0; $i < $MaxLine; $i++) {
    -00160     $l_line=pg_fetch_array($Res,$i);
    -00161     echo "<TR>";
    -00162     // if p_ctl is set we need to be able to return the value
    -00163     if (isset($p_ctl) and $p_ctl != 'not' ){
    -00164       echo '<TD>';
    -00165       echo '<input type="checkbox" onClick="SetItChild(\''.$p_ctl.'\',\''.$l_line['pcm_val'].'\')">';
    -00166       echo '</td>';
    -00167     }
    -00168     echo '<TD>';
    -00169     echo $l_line['pcm_val'];
    -00170     echo '</TD>';
    -00171 
    -00172     echo '<TD>';
    -00173     echo $l_line['pcm_lib'];
    -00174     echo '</TD>';
    -00175     echo "</TR>";
    -00176 
    -00177   }
    -00178   
    -00179   echo '</TABLE>';
    -00180 }
    -00181 echo '<INPUT TYPE="BUTTON" Value="Close" onClick=\'GetIt()\'>';
    -00182 html_page_stop();
    -00183 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00135 echo '<TD>Poste Comptable Commence par </TD>'; +00136 +00137 if ( ! isset ($p_class) ) $p_class=""; +00138 $opt=" <INPUT TYPE=\"text\" value=\"$p_class\" name=\"st_with\">"; +00139 echo '<TD> <INPUT TYPE="text" name="p_class" VALUE="'.$p_class.'"></TD>'; +00140 +00141 echo '<TD> Libellé </TD>'; +00142 echo '<TD> contient </TD>'; +00143 if ( ! isset ($p_comment) ) $p_comment=""; +00144 echo '<TD> <INPUT TYPE="text" name="p_comment" VALUE="'.$p_comment.'"></TD></TR>'; +00145 echo '</TABLE>'; +00146 echo '<INPUT TYPE="submit" name="search" value="cherche">'; +00147 echo '</FORM>'; +00148 +00149 // if request search +00150 if ( isset($_POST['search']) or isset($_GET['filter']) ) { +00151 $Res=ExecSql($cn,"select * from tmp_pcmn $condition order by pcm_val::text"); +00152 +00153 $MaxLine=pg_NumRows($Res); +00154 if ( $MaxLine==0) { +00155 html_page_stop(); +00156 return; +00157 } +00158 echo '<TABLE BORDER="0">'; +00159 $l_id=""; +00160 +00161 for ( $i=0; $i < $MaxLine; $i++) { +00162 $l_line=pg_fetch_array($Res,$i); +00163 echo "<TR>"; +00164 // if p_ctl is set we need to be able to return the value +00165 if (isset($p_ctl) and $p_ctl != 'not' ){ +00166 echo '<TD>'; +00167 echo '<input type="checkbox" onClick="SetItChild(\''.$p_ctl.'\',\''.$l_line['pcm_val'].'\')">'; +00168 echo '</td>'; +00169 } +00170 echo '<TD>'; +00171 echo $l_line['pcm_val']; +00172 echo '</TD>'; +00173 +00174 echo '<TD>'; +00175 echo $l_line['pcm_lib']; +00176 echo '</TD>'; +00177 echo "</TR>"; +00178 +00179 } +00180 +00181 echo '</TABLE>'; +00182 } +00183 echo '<INPUT TYPE="BUTTON" Value="Close" onClick=\'GetIt()\'>'; +00184 html_page_stop(); +00185 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/poste__search_8php.html b/doc/developper/html/poste__search_8php.html index 732ac2671..5e7612919 100644 --- a/doc/developper/html/poste__search_8php.html +++ b/doc/developper/html/poste__search_8php.html @@ -4,10 +4,12 @@ - + -

    poste_search.php File Reference

    +

    poste_search.php File Reference

    Search a account in a popup window. More... +

    +

    Go to the source code of this file. @@ -29,7 +31,12 @@
     $Sql = " pcm_val like '$item_cred' or"
    -


    Variable Documentation

    +

    Detailed Description

    +Search a account in a popup window. +

    + +

    +Definition in file poste_search.php.


    Variable Documentation

    @@ -52,7 +59,7 @@

    -Definition at line 51 of file poste_search.php. +Definition at line 53 of file poste_search.php.

    Referenced by Cpdf::ellipse().

    @@ -79,7 +86,7 @@ Referenced by Cpdf::elli

    -Definition at line 59 of file poste_search.php. +Definition at line 61 of file poste_search.php.

    @@ -104,7 +111,7 @@ Definition at line 59

    -Definition at line 58 of file poste_search.php. +Definition at line 60 of file poste_search.php.

    @@ -129,7 +136,7 @@ Definition at line 58

    -Definition at line 64 of file poste_search.php. +Definition at line 66 of file poste_search.php.

    @@ -154,7 +161,7 @@ Definition at line 64

    -Definition at line 27 of file poste_search.php. +Definition at line 29 of file poste_search.php.

    @@ -179,7 +186,7 @@ Definition at line 27

    -Definition at line 84 of file poste_search.php. +Definition at line 86 of file poste_search.php.

    @@ -204,7 +211,7 @@ Definition at line 84

    -Definition at line 66 of file poste_search.php. +Definition at line 68 of file poste_search.php.

    @@ -229,10 +236,10 @@ Definition at line 66

    -Definition at line 29 of file poste_search.php. +Definition at line 31 of file poste_search.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/postgres_8php-source.html b/doc/developper/html/postgres_8php-source.html index 43818ea33..a38c22bd0 100644 --- a/doc/developper/html/postgres_8php-source.html +++ b/doc/developper/html/postgres_8php-source.html @@ -4,7 +4,7 @@ - +

    postgres.php

    Go to the documentation of this file.
    00001 <? //$Revision$
    @@ -28,56 +28,41 @@
     00019 
     00020  //$Revision$
     00021 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00022 /*++
    -00023  * function : ShowDossier
    -00024  * Parameter : p_type string : all for all dossiers lim for only the 
    -00025  *             dossier where we've got rights
    -00026  * Return    : nothing
    -00027  * Description :
    -00028  * Show the folder where user have access
    -00029 ++*/ 
    -00030 function ShowDossier($p_type,$p_first=0,$p_max=10,$p_Num=0) {
    -00031   $l_user=$_SESSION['g_user'];
    -00032   if ( $p_max == 0 ) {
    -00033     $l_step="";
    -00034   } else {
    -00035     $l_step="LIMIT $p_max OFFSET $p_first";
    -00036   }
    -00037   $cn=DbConnect();
    -00038   if ( $p_type == "all") {
    -00039     $l_sql="select *, 'W' as priv_priv from ac_dossier ORDER BY dos_name  ";
    -00040     $p_Num=CountSql($cn,$l_sql);
    -00041   } else {
    -00042     $l_sql="select * from jnt_use_dos 
    -00043                                natural join ac_dossier 
    -00044                                natural join ac_users 
    -00045                                inner join priv_user on priv_jnt=jnt_id where 
    -00046                                use_login='".$l_user."' and priv_priv !='NO'
    -00047                                order by dos_name ";
    -00048     $p_Num=CountSql($cn,$l_sql);
    -00049   }
    -00050   $l_sql=$l_sql.$l_step;
    -00051   $p_res=ExecSql($cn,$l_sql);
    -00052 
    -00053   echo_debug('postgres.php',__LINE__,"ShowDossier:".$p_res." Line = $p_Num");
    +00032 function ShowDossier($p_type,$p_first=0,$p_max=10,$p_Num=0) {
    +00033   $l_user=$_SESSION['g_user'];
    +00034   if ( $p_max == 0 ) {
    +00035     $l_step="";
    +00036   } else {
    +00037     $l_step="LIMIT $p_max OFFSET $p_first";
    +00038   }
    +00039   $cn=DbConnect();
    +00040   if ( $p_type == "all") {
    +00041     $l_sql="select *, 'W' as priv_priv from ac_dossier ORDER BY dos_name  ";
    +00042     $p_Num=CountSql($cn,$l_sql);
    +00043   } else {
    +00044     $l_sql="select * from jnt_use_dos 
    +00045                                natural join ac_dossier 
    +00046                                natural join ac_users 
    +00047                                inner join priv_user on priv_jnt=jnt_id where 
    +00048                                use_login='".$l_user."' and priv_priv !='NO'
    +00049                                order by dos_name ";
    +00050     $p_Num=CountSql($cn,$l_sql);
    +00051   }
    +00052   $l_sql=$l_sql.$l_step;
    +00053   $p_res=ExecSql($cn,$l_sql);
     00054 
    -00055   $Max=pg_NumRows($p_res);
    -00056   if ( $Max == 0 ) return null;
    -00057   for ( $i=0;$i<$Max; $i++) {   
    -00058     //    echo_debug ("i = $i");
    -00059     $row[]=pg_fetch_array($p_res,$i);
    -00060     //echo $row[dossier];
    -00061   }
    -00062   return $row;
    -00063 }
    -00064 
    -00065 /* function DbConnect
    -00066  * purpose : connect to the database
    -00067  * parameter : p_db : db_name
    -00068  * return the connection
    -00069  * todo : replace hardcoded by variable placed in
    -00070  *        constant.php
    -00071  */
    +00055   echo_debug('postgres.php',__LINE__,"ShowDossier:".$p_res." Line = $p_Num");
    +00056 
    +00057   $Max=pg_NumRows($p_res);
    +00058   if ( $Max == 0 ) return null;
    +00059   for ( $i=0;$i<$Max; $i++) {   
    +00060     //    echo_debug ("i = $i");
    +00061     $row[]=pg_fetch_array($p_res,$i);
    +00062     //echo $row[dossier];
    +00063   }
    +00064   return $row;
    +00065 }
    +00066 
     00072 function DbConnect($p_db=-1,$p_type='dossier') {
     00073   if ( $p_db==-1) 
     00074     $l_dossier=sprintf("%saccount_repository",domaine);
    @@ -99,12 +84,6 @@
     00090   echo_debug ('postgres.php',__LINE__,"connect to $p_db dbname $l_dossier");
     00091   return $a;
     00092 }
    -00093 /* function ExecSql
    -00094  * purpose : send a sql string to the database
    -00095  * parameter p_connection db connection 
    -00096  *           p_string     sql string
    -00097  * return false if error otherwise true
    -00098  */
     00099 function ExecSql($p_connection, $p_string) {
     00100   echo_debug('postgres.php',__LINE__,"SQL = $p_string");
     00101   // probl. with Ubuntu & UTF8
    @@ -119,14 +98,10 @@
     00110   return $ret;
     00111 }
     00112 
    -00113 /* function GetAllUser
    -00114  * Return all the users
    -00115  * as an array
    -00116  */
     00117 function GetAllUser() {
     00118   echo_debug('postgres.php',__LINE__,"GetUser");
     00119   $cn=DbConnect();
    -00120   $sql="select * from ac_users where use_login!='phpcompta'";
    +00120   $sql="select * from ac_users where use_login!='phpcompta'";
     00121   echo_debug('postgres.php',__LINE__,"ExecSql");
     00122   $Res=ExecSql($cn,$sql);
     00123   $Num=pg_NumRows($Res);
    @@ -136,10 +111,6 @@
     00127   }
     00128   return $User;
     00129 }
    -00130 /* function GetUid
    -00131  * Check if the User is valid
    -00132  * and return an array with his property
    -00133  */
     00134 function GetUid($p_uid) {
     00135   $cn=DbConnect();
     00136   $Res=ExecSql($cn,"select * from ac_users where use_id=".$p_uid);
    @@ -150,9 +121,6 @@
     00141   }
     00142   return $Prop;
     00143 }
    -00144 /* function GetPriv
    -00145  * Get the privilege of an user on a folder
    -00146  */
     00147 function GetPriv($p_dossier,$p_login)
     00148 {
     00149   $cn=DbConnect();
    @@ -169,11 +137,6 @@
     00160   }
     00161   return $Priv;
     00162 }
    -00163 /* function ExisteJnt
    -00164  * Get the number of rows
    -00165  * from table jnt_use_dos where $p_dossier = dos_id and 
    -00166  * use_id=$p_user
    -00167  */
     00168 function ExisteJnt($p_dossier,$p_user)
     00169 {
     00170   $cn=DbConnect();
    @@ -222,10 +185,10 @@
     00213      
     00214 }
     00215 /* CountSql
    -00216  * Count the number of row
    +00216  * \brief Count the number of row
     00217  * 
    -00218  * parm: p_conn connection handler
    -00219  *       p_sql sql string
    +00218  * \param $p_conn connection handler
    +00219  * \param $p_sql sql string
     00220  */
     00221 
     00222 function CountSql($p_conn,$p_sql)
    @@ -234,29 +197,21 @@
     00225   return pg_NumRows($r_sql);
     00226 
     00227 }
    -00228 /* function GetDossierName
    -00229  * Param: id of a dossier
    -00230  * return : Name of the dossier
    -00231  */
     00232 function GetDossierName($p_dossier)
     00233 {
     00234   $cn=DbConnect();
     00235   $Ret=ExecSql($cn,"select dos_name from ac_dossier where dos_id=".$p_dossier);
    -00236   $r= pg_fetch_array($Ret,0);
    -00237   return $r['dos_name'];
    +00236   $r= pg_fetch_array($Ret,0);
    +00237   return $r['dos_name'];
     00238 }
    -00239 /* function GetSequence
    -00240  * get the current sequence
    -00241  */
    +00239 
     00242 function GetSequence($p_cn,$p_seq)
     00243 {
     00244   $Res=ExecSql($p_cn,"select currval('$p_seq') as seq");
     00245   $seq=pg_fetch_array($Res,0);
     00246   return $seq['seq'];
     00247 }
    -00248 /* function NextSequence
    -00249  * get the current sequence
    -00250  */
    +00248 
     00251 function NextSequence($p_cn,$p_seq)
     00252 {
     00253   $Res=ExecSql($p_cn,"select nextval('$p_seq') as seq");
    @@ -277,153 +232,101 @@
     00268 }
     00269 function AlterSequence($p_cn,$p_name,$p_value) {
     00270   
    -00271   $Res=ExecSql($p_cn,"drop sequence $p_name");
    -00272   $Res=ExecSql($p_cn,"create sequence $p_name start $p_value");
    -00273 }
    -00274 function GetLogin($p_uid)
    -00275 {
    -00276   $cn=DbConnect();
    -00277   $Res=ExecSql($cn,"select use_login from ac_users where use_id=$p_uid");
    -00278   if ( pg_NumRows($Res) == 0 ) return null;
    -00279   $a_login=pg_fetch_array($Res,0);
    -00280   return $a_login['use_login'];
    -00281 }
    -00282 
    -00283 /* function SyncRight
    -00284  * Purpose : Synchronize les droits par défaut
    -00285  *           avec  les journaux existants
    -00286  * parm : 
    -00287  *      - 
    -00288  * gen :
    -00289  *      -
    -00290  * return:
    -00291  *      -
    -00292  *
    -00293  */ 
    -00294 function SyncRight($p_dossier,$p_user) {
    -00295   $priv=GetPriv($p_dossier,$p_user);
    -00296   $right=$priv[0];
    -00297 
    -00298   $cn=DbConnect($p_dossier);
    -00299 
    -00300  $sql="insert into user_sec_jrn(uj_login,uj_jrn_id,uj_priv) ".
    -00301    "select '".$p_user."',jrn_def_id,'".$right."' from jrn_def ".
    -00302    "where jrn_def_id not in ".
    -00303    "(select uj_jrn_id from user_sec_jrn where uj_login='".$p_user."')";
    -00304  $Res=ExecSql($cn,$sql);
    -00305 }
    -00306 /* function GetUserProperty
    -00307  * Purpose : Get the properties of an user
    -00308  *           it means theme, profile, admin...
    -00309  *        
    -00310  * parm : 
    -00311  *      - $p_user    user login
    -00312  *      - $p_cn      connection resource
    -00313  *      -
    -00314  * gen :
    -00315  *      -
    -00316  * return: an array
    -00317  *         containing use_admin
    -00318  *                    use_usertype
    -00319  *                    g_theme
    -00320  *                    use_name
    -00321  *                    use_login
    -00322  */
    -00323 function GetUserProperty($p_cn,$p_user)
    -00324 {
    -00325  $sql="select use_login,use_first_name,use_name,use_admin,use_usertype,g_theme
    -00326      from ac_users where use_login='$p_user'";
    -00327  $Ret=ExecSql($p_cn,$sql);
    -00328  if ( pg_NumRows($Ret) == 0) 
    -00329    return array('use_first_name'=>'?',
    -00330                 'use_name'=>'Unknown',
    -00331                 'use_admin'=>0,
    -00332                 'use_usertype'=>'user',
    -00333                 'g_theme'=>'classic',
    -00334                 'use_login'=>$p_user);
    -00335 
    -00336  $a=pg_fetch_array($Ret,0);
    -00337  return $a;
    -00338 }
    -00339 /* function GetModeleId
    -00340  * Purpose :  Give the mod_id from modeledef
    -00341  *        
    -00342  * parm : 
    -00343  *      - p_cn database connection (repository)
    -00344  *      - p_modname template name
    -00345  * gen :
    -00346  *      - none
    -00347  * return:
    -00348  *        template id or 0 if not found
    -00349  */
    -00350 function GetModeleId($p_cn,$p_modname) {
    -00351   $Res=ExecSql($p_cn,"select mod_id from modeledef where mod_name='$p_modname'");
    -00352   if (pg_NumRows($Res) == 0) return 0;
    -00353   $name=pg_fetch_array($Res,0);
    -00354   return $name['mod_id'];
    -00355 }
    -00356 
    -00357 /* function GetArray
    -00358  * purpose return the result of a sql statment 
    -00359  * in a array
    -00360  * param : $p_cn database connection
    -00361  *         $p_sql sql query
    -00362  */
    -00363 function GetArray($p_cn,$p_sql) {
    -00364   echo_debug('postgres.php',__LINE__,"GetArray");
    -00365   $r=ExecSql($p_cn,$p_sql);
    -00366   if ( ($Max=  pg_NumRows($r)) == 0 ) return null;
    -00367   $array=pg_fetch_all($r);
    -00368   echo_debug('postgres.php',__LINE__,var_export($array,true));
    -00369   return $array;
    -00370 }
    -00371 /* function save_upload_document
    -00372  * Save a picture of a rest_id
    -00373  * parameters 
    -00374  * - $cn database connection
    -00375  * - $file array (from $_FILES)
    -00376  * - $name ( name of the input)
    -00377  */
    -00378 function save_upload_document ($cn,$seq) {
    -00379 
    -00380   $new_name=tempnam('/tmp','pj');
    -00381   echo_debug('postgres.php',__LINE__,"new name=".$new_name);
    -00382   if ( strlen ($_FILES['pj']['tmp_name']) != 0 ) {
    -00383       if (move_uploaded_file($_FILES['pj']['tmp_name'],
    -00384                              $new_name)) {
    -00385         // echo "Image saved";
    -00386 
    -00387         $oid= pg_lo_import($cn,$new_name);
    -00388         if ( $oid == false ) {
    -00389           echo_error('postgres.php',__LINE__,"cannot upload document");
    -00390           Rollback($cn);
    -00391           return;
    -00392         }
    -00393         echo_debug('postgres.php',__LINE__,"Loading document");
    -00394         // Remove old document
    -00395         $ret=ExecSql($cn,"select jr_pj from jrn where jr_grpt_id=$seq");
    -00396         if (pg_num_rows($ret) != 0) {
    -00397           $r=pg_fetch_array($ret,0);
    -00398           $old_oid=$r['jr_pj'];
    -00399           if (strlen($old_oid) != 0) 
    -00400             pg_lo_unlink($cn,$old_oid);
    -00401         }
    -00402         // Load new document
    -00403         ExecSql($cn,"update jrn set jr_pj=".$oid.", jr_pj_name='".$_FILES['pj']['name']."', ".
    -00404                 "jr_pj_type='".$_FILES['pj']['type']."'  where jr_grpt_id=$seq");
    +00271   $Res=ExecSql($p_cn,"alter sequence $p_name restart $p_value");
    +00272 }
    +00273 function GetLogin($p_uid)
    +00274 {
    +00275   $cn=DbConnect();
    +00276   $Res=ExecSql($cn,"select use_login from ac_users where use_id=$p_uid");
    +00277   if ( pg_NumRows($Res) == 0 ) return null;
    +00278   $a_login=pg_fetch_array($Res,0);
    +00279   return $a_login['use_login'];
    +00280 }
    +00281 
    +00289 function SyncRight($p_dossier,$p_user) {
    +00290   $priv=GetPriv($p_dossier,$p_user);
    +00291   $right=$priv[0];
    +00292 
    +00293   $cn=DbConnect($p_dossier);
    +00294 
    +00295  $sql="insert into user_sec_jrn(uj_login,uj_jrn_id,uj_priv) ".
    +00296    "select '".$p_user."',jrn_def_id,'".$right."' from jrn_def ".
    +00297    "where jrn_def_id not in ".
    +00298    "(select uj_jrn_id from user_sec_jrn where uj_login='".$p_user."')";
    +00299  $Res=ExecSql($cn,$sql);
    +00300 }
    +00315 function GetUserProperty($p_cn,$p_user)
    +00316 {
    +00317  $sql="select use_login,use_first_name,use_name,use_admin,use_usertype,g_theme
    +00318      from ac_users where use_login='$p_user'";
    +00319  $Ret=ExecSql($p_cn,$sql);
    +00320  if ( pg_NumRows($Ret) == 0) 
    +00321    return array('use_first_name'=>'?',
    +00322                 'use_name'=>'Unknown',
    +00323                 'use_admin'=>0,
    +00324                 'use_usertype'=>'user',
    +00325                 'g_theme'=>'classic',
    +00326                 'use_login'=>$p_user);
    +00327 
    +00328  $a=pg_fetch_array($Ret,0);
    +00329  return $a;
    +00330 }
    +00340 function GetModeleId($p_cn,$p_modname) {
    +00341   $Res=ExecSql($p_cn,"select mod_id from modeledef where mod_name='$p_modname'");
    +00342   if (pg_NumRows($Res) == 0) return 0;
    +00343   $name=pg_fetch_array($Res,0);
    +00344   return $name['mod_id'];
    +00345 }
    +00346 
    +00347 
    +00353 function GetArray($p_cn,$p_sql) {
    +00354   echo_debug('postgres.php',__LINE__,"GetArray");
    +00355   $r=ExecSql($p_cn,$p_sql);
    +00356   if ( ($Max=  pg_NumRows($r)) == 0 ) return null;
    +00357   $array=pg_fetch_all($r);
    +00358   echo_debug('postgres.php',__LINE__,var_export($array,true));
    +00359   return $array;
    +00360 }
    +00368 function save_upload_document ($cn,$seq) {
    +00369 
    +00370   $new_name=tempnam('/tmp','pj');
    +00371   echo_debug('postgres.php',__LINE__,"new name=".$new_name);
    +00372   if ( strlen ($_FILES['pj']['tmp_name']) != 0 ) {
    +00373       if (move_uploaded_file($_FILES['pj']['tmp_name'],
    +00374                              $new_name)) {
    +00375         // echo "Image saved";
    +00376 
    +00377         $oid= pg_lo_import($cn,$new_name);
    +00378         if ( $oid == false ) {
    +00379           echo_error('postgres.php',__LINE__,"cannot upload document");
    +00380           Rollback($cn);
    +00381           return;
    +00382         }
    +00383         echo_debug('postgres.php',__LINE__,"Loading document");
    +00384         // Remove old document
    +00385         $ret=ExecSql($cn,"select jr_pj from jrn where jr_grpt_id=$seq");
    +00386         if (pg_num_rows($ret) != 0) {
    +00387           $r=pg_fetch_array($ret,0);
    +00388           $old_oid=$r['jr_pj'];
    +00389           if (strlen($old_oid) != 0) 
    +00390             pg_lo_unlink($cn,$old_oid);
    +00391         }
    +00392         // Load new document
    +00393         ExecSql($cn,"update jrn set jr_pj=".$oid.", jr_pj_name='".$_FILES['pj']['name']."', ".
    +00394                 "jr_pj_type='".$_FILES['pj']['type']."'  where jr_grpt_id=$seq");
    +00395 
    +00396       }      else {
    +00397         echo "<H1>Error</H1>";
    +00398         Rollback($cn);
    +00399         exit;
    +00400       }
    +00401     }
    +00402  }
    +00403 
    +00404 
     00405 
    -00406       }      else {
    -00407         echo "<H1>Error</H1>";
    -00408         Rollback($cn);
    -00409         exit;
    -00410       }
    -00411     }
    -00412  }
    -00413 
    -00414 
    -00415 
    -00416 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00406 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/postgres_8php.html b/doc/developper/html/postgres_8php.html index 28c72509b..b7ee7cc34 100644 --- a/doc/developper/html/postgres_8php.html +++ b/doc/developper/html/postgres_8php.html @@ -4,10 +4,12 @@ - + -

    postgres.php File Reference

    +

    postgres.php File Reference

    Contains the procedure for connecting to postgresql. More... +

    +

    Go to the source code of this file. @@ -16,16 +18,22 @@ + + + + + + @@ -38,8 +46,10 @@ + + @@ -54,16 +64,26 @@ + + + + +
     DbConnect ($p_db=-1, $p_type='dossier')
     connect to the database
     ExecSql ($p_connection, $p_string)
     send a sql string to the database
     GetAllUser ()
     Return all the users as an array.
     GetUid ($p_uid)
     Check if the User is valid and return an array with his property.
     GetPriv ($p_dossier, $p_login)
     Get the privilege of an user on a folder.
     ExisteJnt ($p_dossier, $p_user)
     Get the number of rows from table jnt_use_dos where $p_dossier = dos_id and use_id=$p_user.
     ExistePriv ($p_jntid)
     GetJnt ($p_dossier, $p_user)
     GetSequence ($p_cn, $p_seq)
     get the current sequence
     NextSequence ($p_cn, $p_seq)
     get the current sequence
     StartSql ($p_cn)
     EndSql ($p_cn)
     SyncRight ($p_dossier, $p_user)
     Synchronize les droits par défaut avec les journaux existants.
     GetUserProperty ($p_cn, $p_user)
     Get the properties of an user it means theme, profile, admin...
     GetModeleId ($p_cn, $p_modname)
     Give the mod_id from modeledef.
     GetArray ($p_cn, $p_sql)
     purpose return the result of a sql statment in a array
     save_upload_document ($cn, $seq)
     Save a "piece justificative".
    -


    Function Documentation

    +

    Detailed Description

    +Contains the procedure for connecting to postgresql. +

    + +

    +Definition in file postgres.php.


    Function Documentation

    @@ -108,7 +128,7 @@

    Definition at line 269 of file postgres.php.

    -References $Res, and ExecSql(). +References $Res, and ExecSql().

    @@ -140,9 +160,9 @@ References $Res, a

    Definition at line 263 of file postgres.php.

    -References $Res, and ExecSql(). +References $Res, and ExecSql().

    -Referenced by Centralise(), Invoice::Get(), Document_modele::Get(), ImportCSV(), RecordInvoice(), RecordSell(), and TransferCSV(). +Referenced by Centralise(), Document_modele::Delete(), Document::Generate(), Invoice::Get(), Document_modele::Get(), Document::Get(), ImportCSV(), fiche::insert(), RecordInvoice(), RecordSell(), Document_modele::Save(), Document::SaveGenerated(), TransferCSV(), and Document::Upload().

    @@ -185,7 +205,7 @@ Definition at line 222

    References ExecSql().

    -Referenced by cl_user::AccessJrn(), AddFiche(), cl_user::Admin(), CheckDossier(), CheckIsAdmin(), CheckJrn(), DeleteRapt(), form_verify_input(), FormODS(), GetParent(), GetRappel(), fiche_def::HasAttribute(), fiche::insert(), InsertRapt(), ListJrn(), NextJrn(), Remove(), ShowDossier(), fiche::update(), UpdateFiche(), and ViewFiche(). +Referenced by cl_user::AccessJrn(), AddFiche(), cl_user::Admin(), CheckDossier(), CheckIsAdmin(), CheckJrn(), DeleteRapt(), form_verify_input(), FormODS(), FormVenteView(), GetParent(), GetRappel(), fiche_def::HasAttribute(), fiche::insert(), InsertRapt(), ListJrn(), action::myList(), NextJrn(), Remove(), ShowDossier(), fiche::update(), UpdateFiche(), and ViewFiche().

    @@ -222,13 +242,21 @@ Referenced by cl_user::

    +connect to the database +

    +

    Parameters:
    + + +
    : p_db : db_name
    +
    +
    Returns:
    the connection

    Definition at line 72 of file postgres.php.

    -References $a, and echo_debug(). +References $a, and echo_debug().

    -Referenced by cl_user::Admin(), cl_user::Check(), CheckAction(), CheckDossier(), CheckIsAdmin(), CheckJrn(), cl_user::cl_user(), ExisteJnt(), ExistePriv(), GetAllUser(), GetAvailableFolder(), GetDbId(), GetDossierName(), GetFirstJrnIdForJrnType(), GetJnt(), GetJrnProp(), GetLogin(), GetNumberLine(), GetPosteLibelle(), GetPriv(), GetUid(), html_page_start(), ListJrn(), MenuJrn(), RecordJrn(), ShowDossier(), ShowMenuComptaForm(), ShowMenuFiche(), ShowMenuJrnUser(), SyncRight(), and ViewJrn(). +Referenced by cl_user::Admin(), cl_user::Check(), CheckAction(), CheckDossier(), CheckIsAdmin(), CheckJrn(), cl_user::cl_user(), ExisteJnt(), ExistePriv(), GetAllUser(), GetAvailableFolder(), GetDbId(), GetDossierName(), GetFirstJrnIdForJrnType(), GetJnt(), GetJrnProp(), GetLogin(), GetNumberLine(), GetPosteLibelle(), GetPriv(), GetUid(), html_page_start(), ListJrn(), MenuJrn(), RecordJrn(), ShowDossier(), ShowMenuComptaForm(), ShowMenuFiche(), ShowMenuJrnUser(), SyncRight(), and ViewJrn().

    @@ -260,7 +288,7 @@ Referenced by cl_user::

    Definition at line 260 of file postgres.php.

    -References $Res, and ExecSql(). +References $Res, and ExecSql().

    Referenced by Centralise(). @@ -299,13 +327,22 @@ Referenced by Centrali

    +send a sql string to the database +

    +

    Parameters:
    + + + +
    $p_connection db connection
    $p_string sql string
    +
    +
    Returns:
    false if error otherwise true

    Definition at line 99 of file postgres.php.

    -References $ret, echo_debug(), echo_error(), and exit. +References $ret, echo_debug(), echo_error(), and exit.

    -Referenced by AddFiche(), AddForm(), AddModele(), AlterSequence(), fiche::blank(), Centralise(), cl_user::CheckAction(), CheckAction(), CheckJrn(), Commit(), fiche::CountByDef(), CountSql(), DeleteForm(), DeleteRapt(), fiche::Display(), DisplayDetailModele(), EncodeFiche(), EndSql(), ExecuteScript(), ExisteJnt(), ExistePriv(), FormPeriode(), FormPeriodeMult(), parm_code::Get(), Invoice::Get(), fiche_def_ref::Get(), fiche_def::Get(), Document_modele::Get(), Get_attr_def(), Get_attr_min(), Get_fiche_def_ref(), fiche_def::GetAll(), GetAllUser(), GetAmount(), GetArray(), fiche::getAttribut(), fiche_def::GetAttribut(), GetAvailableFolder(), GetBaseFiche(), GetBaseFicheDefault(), fiche::GetByDef(), fiche::GetByType(), GetClass(), GetConcerned(), GetCreateAccount(), GetData(), GetDataForm(), GetDataGrpt(), GetDataJrn(), GetDataJrnJrId(), GetDataJrnPdf(), GetDataModele(), GetDataPoste(), GetDbId(), GetDossierName(), GetExercice(), getFicheAttribut(), GetFicheDef(), getFicheDefName(), GetFicheDefRef(), GetFicheJrn(), getFicheName(), getFicheNameById(), getFicheNameCode(), GetFirstJrnIdForJrnType(), GetFormName(), GetFormulaValue(), Customer::GetFromPoste(), cl_user::GetGlobalPref(), GetGrpt(), GetInternal(), GetJnt(), GetJrnName(), GetJrnProp(), GetJrnProperty(), GetLogin(), GetModeleId(), jrn::GetName(), GetNextFiche(), GetNumberLine(), GetPeriode(), getPeriodeFromDate(), getPeriodeFromMonth(), GetPosteLibelle(), cl_user::GetPreferences(), GetPriv(), GetQuantity(), GetRappel(), rapport::GetRow(), poste::GetRow(), jrn::GetRow(), Balance::GetRow(), jrn::GetRowSimple(), GetSequence(), GetSolde(), poste::GetSolde(), poste::GetSoldeDetail(), GetTvaPoste(), GetTvaRate(), GetUid(), GetUserProperty(), GetVersion(), html_page_start(), ImpHtml(), fiche::insert(), cl_user::insert_default_global_pref(), InsertJrn(), InsertJrnx(), InsertModeleLine(), InsertRapt(), InsertStockGoods(), isCentralize(), IsFicheOfJrn(), isValid(), ListJrn(), parm_code::LoadAll(), fiche_def_ref::LoadAll(), MenuJrn(), Invoice::myList(), Document_modele::myList(), new_fiche(), NextSequence(), Own::Own(), PeriodeClosed(), PosteForm(), RecordFin(), RecordInvoice(), RecordJrn(), RecordSell(), Remove(), fiche::remove(), Rollback(), parm_code::Save(), Invoice::Save(), fiche_def_ref::Save(), Document_modele::Save(), save_upload_document(), SaveModeleName(), SetInternalCode(), cl_user::SetPeriode(), ShowDevise(), ShowDossier(), ShowMenuComptaForm(), ShowMenuFiche(), ShowMenuJrn(), ShowMenuJrnUser(), ShowPeriode(), StartSql(), SyncRight(), TransferCSV(), fiche::update(), cl_user::update_global_pref(), UpdateComment(), UpdateCSV(), UpdateFiche(), UpdateForm(), Customer::VatListing(), VerifImport(), ViewDetailStock(), ViewFiche(), ViewFicheDetail(), ViewJrn(), and ViewStock(). +Referenced by AddFiche(), AddForm(), AddModele(), AlterSequence(), fiche::blank(), Centralise(), cl_user::CheckAction(), CheckAction(), CheckJrn(), Commit(), action::Confirm(), fiche::CountByDef(), CountSql(), Document_modele::Delete(), DeleteForm(), DeleteRapt(), fiche::Display(), action::Display(), DisplayDetailModele(), EncodeFiche(), EndSql(), ExecuteScript(), ExisteJnt(), ExistePriv(), FormPeriode(), FormPeriodeMult(), Document::Generate(), parm_code::Get(), Invoice::Get(), fiche_def_ref::Get(), fiche_def::Get(), Document_type::get(), Document_modele::Get(), Document::Get(), Get_attr_def(), Get_attr_min(), Get_fiche_def_ref(), fiche_def::GetAll(), GetAllUser(), GetAmount(), GetArray(), fiche::getAttribut(), fiche_def::GetAttribut(), GetAvailableFolder(), GetBaseFiche(), GetBaseFicheDefault(), fiche::GetByDef(), fiche::GetByQCode(), fiche::GetByType(), GetClass(), GetConcerned(), GetCreateAccount(), GetData(), GetDataForm(), GetDataGrpt(), GetDataJrn(), GetDataJrnJrId(), GetDataJrnPdf(), GetDataModele(), GetDataPoste(), GetDbId(), jrn::GetDefLine(), GetDossierName(), GetExercice(), getFicheAttribut(), GetFicheDef(), getFicheDefName(), GetFicheDefRef(), GetFicheJrn(), getFicheName(), getFicheNameById(), getFicheNameCode(), GetFirstJrnIdForJrnType(), GetFormName(), GetFormulaValue(), Customer::GetFromPoste(), cl_user::GetGlobalPref(), GetGrpt(), GetInternal(), GetJnt(), GetJrnName(), GetJrnProp(), GetJrnProperty(), GetLogin(), GetModeleId(), jrn::GetName(), fiche::getName(), GetNextFiche(), GetNumberLine(), GetPeriode(), getPeriodeFromDate(), getPeriodeFromMonth(), GetPosteLibelle(), cl_user::GetPreferences(), GetPriv(), GetQuantity(), GetRappel(), rapport::GetRow(), poste::GetRow(), jrn::GetRow(), Balance::GetRow(), jrn::GetRowSimple(), GetSequence(), GetSolde(), poste::GetSolde(), poste::GetSoldeDetail(), GetTvaPoste(), GetTvaRate(), GetUid(), GetUserProperty(), GetVersion(), html_page_start(), ImpHtml(), fiche::insert(), cl_user::insert_default_global_pref(), InsertJrn(), InsertJrnx(), InsertModeleLine(), InsertRapt(), InsertStockGoods(), isCentralize(), IsFicheOfJrn(), isValid(), ListJrn(), parm_code::LoadAll(), fiche_def_ref::LoadAll(), MenuJrn(), Invoice::myList(), Document_modele::myList(), action::myList(), new_fiche(), NextSequence(), Own::Own(), PeriodeClosed(), PosteForm(), RecordFin(), RecordInvoice(), RecordJrn(), RecordSell(), Remove(), fiche::remove(), Rollback(), parm_code::Save(), Invoice::Save(), fiche_def_ref::Save(), Document_modele::Save(), save_upload_document(), Document::SaveGenerated(), SaveModeleName(), action::SaveStage2(), SetInternalCode(), cl_user::SetPeriode(), ShowDevise(), ShowDossier(), ShowMenuComptaForm(), ShowMenuFiche(), ShowMenuJrn(), ShowMenuJrnUser(), ShowPeriode(), StartSql(), fiche::strAttribut(), SyncRight(), TransferCSV(), fiche::update(), cl_user::update_global_pref(), UpdateComment(), UpdateCSV(), UpdateFiche(), UpdateForm(), Document::Upload(), Customer::VatListing(), VerifImport(), ViewDetailStock(), ViewFiche(), ViewFicheDetail(), ViewJrn(), and ViewStock().

    @@ -342,11 +379,13 @@ Referenced by AddFiche()

    +Get the number of rows from table jnt_use_dos where $p_dossier = dos_id and use_id=$p_user. +

    Definition at line 168 of file postgres.php.

    -References $cn, $Res, DbConnect(), and ExecSql(). +References $cn, $Res, DbConnect(), and ExecSql().

    @@ -378,7 +417,7 @@ References $cn,

    Definition at line 179 of file postgres.php.

    -References $cn, $Res, DbConnect(), and ExecSql(). +References $cn, $Res, DbConnect(), and ExecSql().

    @@ -405,11 +444,13 @@ References $cn,

    +Return all the users as an array. +

    Definition at line 117 of file postgres.php.

    -References $cn, $Num, $Res, $sql, $User, DbConnect(), echo_debug(), and ExecSql(). +References $cn, $Num, $Res, $sql, $User, DbConnect(), echo_debug(), and ExecSql().

    @@ -446,13 +487,21 @@ References $cn,

    +purpose return the result of a sql statment in a array +

    +

    Parameters:
    + + + +
    $p_cn database connection
    $p_sql sql query
    +

    -Definition at line 363 of file postgres.php. +Definition at line 353 of file postgres.php.

    -References $array, $r, echo_debug(), and ExecSql(). +References $array, $r, echo_debug(), and ExecSql().

    -Referenced by FormAchInput(), and FormVenInput(). +Referenced by FormAchInput(), and FormVenInput().

    @@ -484,7 +533,7 @@ Referenced by FormA

    Definition at line 201 of file postgres.php.

    -References $cn, $num, DbConnect(), and ExecSql(). +References $cn, $num, DbConnect(), and ExecSql().

    @@ -512,11 +561,17 @@ References $cn,

    +

    Parameters:
    + + +
    id of a dossier
    +
    +
    Returns:
    Name of the dossier

    Definition at line 232 of file postgres.php.

    -References $cn, $r, $Ret, DbConnect(), and ExecSql(). +References $cn, $r, $Ret, DbConnect(), and ExecSql().

    @@ -557,7 +612,7 @@ References $cn,

    Definition at line 190 of file postgres.php.

    -References $cn, $Res, DbConnect(), and ExecSql(). +References $cn, $Res, DbConnect(), and ExecSql().

    @@ -587,9 +642,9 @@ References $cn,

    -Definition at line 274 of file postgres.php. +Definition at line 273 of file postgres.php.

    -References $cn, $Res, DbConnect(), and ExecSql(). +References $cn, $Res, DbConnect(), and ExecSql().

    @@ -626,11 +681,20 @@ References $cn,

    +Give the mod_id from modeledef. +

    +

    Parameters:
    + + + +
    $p_cn database connection (repository)
    $p_modname template name
    +
    +
    Returns:
    template id or 0 if not found

    -Definition at line 350 of file postgres.php. +Definition at line 340 of file postgres.php.

    -References $Res, and ExecSql(). +References $Res, and ExecSql().

    @@ -667,13 +731,15 @@ References $Res, a

    +Get the privilege of an user on a folder. +

    Definition at line 147 of file postgres.php.

    -References $cn, $i, $Num, $Res, DbConnect(), echo_debug(), and ExecSql(). +References $cn, $i, $Num, $Res, DbConnect(), echo_debug(), and ExecSql().

    -Referenced by SyncRight(). +Referenced by SyncRight().

    @@ -710,13 +776,15 @@ Referenced by SyncRight()<

    +get the current sequence +

    Definition at line 242 of file postgres.php.

    -References $Res, $seq, and ExecSql(). +References $Res, $seq, and ExecSql().

    -Referenced by AddFiche(), AddForm(), AddModele(), InsertJrn(), and InsertJrnx(). +Referenced by AddFiche(), AddForm(), AddModele(), InsertJrn(), InsertJrnx(), Document::SaveGenerated(), and action::SaveStage2().

    @@ -744,11 +812,13 @@ Referenced by AddFiche()

    +Check if the User is valid and return an array with his property. +

    Definition at line 134 of file postgres.php.

    -References $cn, $Num, $Res, DbConnect(), and ExecSql(). +References $cn, $Num, $Res, DbConnect(), and ExecSql().

    @@ -785,11 +855,22 @@ References $cn,

    +Get the properties of an user it means theme, profile, admin... +

    +

    Parameters:
    + + + +
    $p_user user login
    $p_cn connection
    +
    +
    Returns:
    an array containing
      +
    • use_admin
    • use_usertype
    • g_theme
    • use_name
    • use_login
    +

    -Definition at line 323 of file postgres.php. +Definition at line 315 of file postgres.php.

    -References $a, $Ret, $sql, and ExecSql(). +References $a, $Ret, $sql, and ExecSql().

    @@ -826,13 +907,15 @@ References $a,

    +get the current sequence +

    Definition at line 251 of file postgres.php.

    -References $Res, $seq, and ExecSql(). +References $Res, $seq, and ExecSql().

    -Referenced by fiche::insert(), RecordFin(), RecordInvoice(), RecordODS(), RecordSell(), Document_modele::Save(), SetInternalCode(), and TransferCSV(). +Referenced by Document::Generate(), fiche::insert(), RecordFin(), RecordInvoice(), RecordODS(), RecordSell(), Document_modele::Save(), SetInternalCode(), and TransferCSV().

    @@ -864,9 +947,9 @@ Referenced by fiche::i

    Definition at line 266 of file postgres.php.

    -References $Res, and ExecSql(). +References $Res, and ExecSql().

    -Referenced by ExecuteScript(), RecordFin(), RecordInvoice(), RecordSell(), Invoice::Save(), Document_modele::Save(), save_upload_document(), and TransferCSV(). +Referenced by ExecuteScript(), RecordFin(), RecordInvoice(), RecordSell(), Invoice::Save(), Document_modele::Save(), save_upload_document(), Document::SaveGenerated(), TransferCSV(), and Document::Upload().

    @@ -903,13 +986,22 @@ Referenced by ExecuteScript()

    +Save a "piece justificative". +

    +save_upload_document

    +

    Parameters:
    + + + +
    $cn database connection
    $seq jr_grpt_id
    +

    -Definition at line 378 of file postgres.php. +Definition at line 368 of file postgres.php.

    -References $old_oid, $r, $ret, echo_debug(), echo_error(), ExecSql(), exit, name, and Rollback(). +References $old_oid, $r, $ret, echo_debug(), echo_error(), ExecSql(), exit, name, and Rollback().

    -Referenced by RecordInvoice(), and RecordSell(). +Referenced by RecordInvoice(), and RecordSell().

    @@ -958,11 +1050,16 @@ Referenced by Recor

    - +

    Parameters:
    + + +
    p_type string : all for all dossiers lim for only the dossier where we've got rights
    +
    +Show the folder where user have access. Return : nothing ++

    -Definition at line 30 of file postgres.php. +Definition at line 32 of file postgres.php.

    -References $_SESSION, $cn, $Max, $row, CountSql(), DbConnect(), echo_debug(), and ExecSql(). +References $_SESSION, $cn, $Max, $row, CountSql(), DbConnect(), echo_debug(), and ExecSql().

    @@ -994,9 +1091,9 @@ References $_SESSION

    Definition at line 257 of file postgres.php.

    -References $Res, and ExecSql(). +References $Res, and ExecSql().

    -Referenced by Centralise(), Invoice::Get(), Document_modele::Get(), ImportCSV(), RecordFin(), RecordInvoice(), RecordODS(), RecordSell(), Invoice::Save(), Document_modele::Save(), and TransferCSV(). +Referenced by Centralise(), Document_modele::Delete(), Document::Generate(), Invoice::Get(), Document_modele::Get(), Document::Get(), ImportCSV(), fiche::insert(), RecordFin(), RecordInvoice(), RecordODS(), RecordSell(), Invoice::Save(), Document_modele::Save(), Document::SaveGenerated(), TransferCSV(), and Document::Upload().

    @@ -1033,14 +1130,22 @@ Referenced by Centrali

    +Synchronize les droits par défaut avec les journaux existants. +

    +SyncRight

    Parameters:
    + + + +
    $p_dossier dossier id
    $p_user user id
    +

    -Definition at line 294 of file postgres.php. +Definition at line 289 of file postgres.php.

    -References $cn, $priv, $Res, $right, $sql, DbConnect(), ExecSql(), and GetPriv(). +References $cn, $priv, $Res, $right, $sql, DbConnect(), ExecSql(), and GetPriv(). -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/pref_8inc_8php-source.html b/doc/developper/html/pref_8inc_8php-source.html index 38572c74c..c477694f1 100644 --- a/doc/developper/html/pref_8inc_8php-source.html +++ b/doc/developper/html/pref_8inc_8php-source.html @@ -4,7 +4,7 @@ - +

    pref.inc.php

    Go to the documentation of this file.
    00001 <?
    @@ -135,7 +135,7 @@
     00126 <option value="-1">Illimité
     00127 <?
     00128         $label=($_SESSION['g_pagesize'] == -1)?'Illimité':$_SESSION['g_pagesize'];
    -00129         echo '<option value="'.$_SESSION['g_pagesize'].'" selected>'.$label;
    +00129         echo '<option value="'.$_SESSION['g_pagesize'].'" selected>'.$label;
     00130 ?>
     00131 </SELECT>
     00132 </TD></TR>
    @@ -149,7 +149,7 @@
     00140      
     00141 echo "</DIV>";
     00142 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/pref_8inc_8php.html b/doc/developper/html/pref_8inc_8php.html index bdf8e5e00..5b6c81b8c 100644 --- a/doc/developper/html/pref_8inc_8php.html +++ b/doc/developper/html/pref_8inc_8php.html @@ -4,7 +4,7 @@ - +

    pref.inc.php File Reference

    @@ -127,7 +127,7 @@ Definition at line 101 Definition at line 128 of file pref.inc.php.

    -Referenced by EncodeFiche(), Cpdf::o_annotation(), Cpdf::o_fontEncoding(), and UpdateFiche(). +Referenced by fiche::blank(), fiche::Display(), EncodeFiche(), Cpdf::o_annotation(), Cpdf::o_fontEncoding(), and UpdateFiche().

    @@ -156,7 +156,7 @@ Referenced by EncodeFich

    Definition at line 56 of file pref.inc.php.

    -Referenced by cl_user::Admin(), cl_user::Check(), Cpdf::o_action(), Cpdf::o_annotation(), Cpdf::o_catalog(), Cpdf::o_contents(), Cpdf::o_destination(), Cpdf::o_encryption(), Cpdf::o_font(), Cpdf::o_fontDescriptor(), Cpdf::o_fontEncoding(), Cpdf::o_image(), Cpdf::o_info(), Cpdf::o_outlines(), Cpdf::o_page(), Cpdf::o_pages(), Cpdf::o_procset(), and Cpdf::o_viewerPreferences(). +Referenced by cl_user::Admin(), cl_user::Check(), Document_modele::Delete(), Cpdf::o_action(), Cpdf::o_annotation(), Cpdf::o_catalog(), Cpdf::o_contents(), Cpdf::o_destination(), Cpdf::o_encryption(), Cpdf::o_font(), Cpdf::o_fontDescriptor(), Cpdf::o_fontEncoding(), Cpdf::o_image(), Cpdf::o_info(), Cpdf::o_outlines(), Cpdf::o_page(), Cpdf::o_pages(), Cpdf::o_procset(), and Cpdf::o_viewerPreferences().

    @@ -183,7 +183,7 @@ Referenced by cl_user::

    Definition at line 60 of file pref.inc.php.

    -Referenced by html_page_start(). +Referenced by html_page_start().

    @@ -219,10 +219,10 @@ Referenced by html_page_

    Definition at line 45 of file pref.inc.php.

    -Referenced by DefModele(), EncodeModele(), FormAchView(), Invoice::FormAdd(), Document_modele::FormAdd(), FormVenteView(), RecordJrn(), ShowDevise(), ShowFormTransfert(), ShowPeriode(), u_ShowMenuRecherche(), VerifImport(), ViewFiche(), and ViewImp(). +Referenced by DefModele(), EncodeModele(), FormAchView(), Invoice::FormAdd(), FormVenteView(), RecordJrn(), ShowDevise(), ShowFormTransfert(), ShowPeriode(), u_ShowMenuRecherche(), VerifImport(), ViewFiche(), and ViewImp(). -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/preference_8php-source.html b/doc/developper/html/preference_8php-source.html index 8c2eee121..edcfd597a 100644 --- a/doc/developper/html/preference_8php-source.html +++ b/doc/developper/html/preference_8php-source.html @@ -4,7 +4,7 @@ - +

    preference.php

    Go to the documentation of this file.
    00001 <?
    @@ -29,23 +29,9 @@
     00020 
     00021 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00022 /* $Revision$ */
    -00023 
    -00024 /* function FormPeriodeMult
    -00025  * Purpose :
    -00026  *         Generate the form for the periode
    -00027  * 
    -00028  * parm : 
    -00029  *      - $p_cn connexion
    -00030  * gen :
    -00031  *      - none
    -00032  * return:
    -00033  *      - string containing html code for the
    -00034  *        form
    -00035  *
    -00036  */ 
     00037 function FormPeriodeMult($p_cn)
     00038 {
    -00039   $sql="select p_id,to_char(p_start,'DD.MM.YYYY') as p_start,
    +00039   $sql="select p_id,to_char(p_start,'DD.MM.YYYY') as p_start,
     00040                     to_char(p_end,'DD.MM.YYYY') as p_end 
     00041         from parm_periode  
     00042             order by p_exercice,p_start";
    @@ -63,239 +49,166 @@
     00054   return $ret;
     00055 }
     00056 
    -00057 /* function FormPeriode
    -00058  * Purpose :
    -00059  *         Generate the form for the periode
    -00060  * 
    -00061  * parm : 
    -00062  *      - $p_cn connexion
    -00063  *      - $p_default default periode
    -00064  *      - $p_type the type of the periode
    -00065  *      - $p_suff the suffix of the name 
    -00066  * gen :
    -00067  *      - none
    -00068  * return:
    -00069  *      - string containing html code for the
    -00070  *        form
    -00071  *
    -00072  */ 
    -00073 function FormPeriode($p_cn,$l_default=0,$p_type=OPEN,$p_suff="")
    -00074 {
    -00075   switch ($p_type) {
    -00076   case CLOSED:
    -00077     $sql_closed="p_closed=true and p_central = false ";
    -00078     break;
    -00079   case OPEN:
    -00080     $sql_closed="p_closed=false";
    -00081     break;
    -00082   case NOTCENTRALIZED:
    -00083     $sql_closed="p_closed=true and p_central = false ";
    -00084     break;
    -00085   default:
    -00086     error("invalide p_type in 'preference.php'#__LINE__");
    -00087   }
    -00088   $sql="select p_id,to_char(p_start,'DD.MM.YYYY') as p_start_string,
    -00089                     to_char(p_end,'DD.MM.YYYY') as p_end_string 
    -00090         from parm_periode where 
    -00091          $sql_closed 
    -00092           order by p_start";
    -00093           
    -00094   $Res=ExecSql($p_cn,$sql);
    -00095   $Max=pg_NumRows($Res);
    -00096   if ( $Max == 0 ) return null;
    -00097   $ret='<SELECT NAME="periode'.$p_suff.'">';
    -00098   for ( $i = 0; $i < $Max;$i++) {
    -00099     $l_line=pg_fetch_array($Res,$i);
    -00100     if ( $l_default == $l_line['p_id'] )
    -00101       $sel="SELECTED";
    -00102     else
    -00103       $sel="";
    -00104 
    -00105     $ret.=sprintf('<OPTION VALUE="%s" %s>%s - %s',$l_line['p_id']
    -00106                   ,$sel
    -00107                   ,$l_line['p_start_string']
    -00108                   ,$l_line['p_end_string']);
    -00109 
    -00110   }
    -00111   $ret.="</SELECT>";
    -00112   return $ret;
    -00113 }
    -00114 /* function GetPeriode
    -00115  * Purpose :Give the start & end date of a periode
    -00116  * 
    -00117  * parm : 
    -00118  *      - connection
    -00119  *      - p_periode
    -00120  * gen :
    -00121  *      - none
    -00122  * return:
    -00123  *      - array containing the start date & the end date
    -00124  *
    -00125  */ 
    -00126 function GetPeriode($p_cn,$p_periode) 
    -00127 {
    -00128  $sql="select to_char(p_start,'DD.MM.YYYY') as p_start,
    -00129               to_char(p_end,'DD.MM.YYYY')   as p_end
    -00130        from parm_periode
    -00131          where p_id=".$p_periode;
    -00132  $Res=ExecSql($p_cn,$sql);
    -00133  if ( pg_NumRows($Res) == 0) return null;
    -00134  return pg_fetch_array($Res,0);
    -00135 
    -00136 }
    -00137 /* function  PeriodeClosed($p_cn,$p_periode) 
    -00138  * Purpose :
    -00139  * 
    -00140  * parm : 
    -00141  *      - 
    -00142  * gen :
    -00143  *      -
    -00144  * return:
    -00145  *      - true if closed
    -00146  *
    -00147  */ 
    -00148 function PeriodeClosed($p_cn,$p_periode) 
    -00149 {
    -00150  $sql="select p_closed
    -00151        from parm_periode
    -00152          where p_id=".$p_periode;
    -00153  $Res=ExecSql($p_cn,$sql);
    -00154  if ( pg_NumRows($Res) == 0) return null;
    -00155  $l_line=pg_fetch_array($Res,0);
    -00156  return $l_line['p_closed'];
    -00157 
    -00158 }
    -00159 /* function GetExercice
    -00160  * Purpose :
    -00161  * 
    -00162  * parm : 
    -00163  *      - $p_cn connection
    -00164  *      - $p_periode periode
    -00165  * gen :
    -00166  *      -
    -00167  * return:
    -00168  *      - Exercice of the periode
    -00169  *
    -00170  */ 
    -00171 function GetExercice($p_cn,$p_periode)
    -00172 {
    -00173   $Res=ExecSql($p_cn,"select p_exercice from parm_periode".
    -00174                " where p_id=$p_periode");
    -00175   if ( pg_NumRows($Res) == 0 ) return "";
    -00176   $line=pg_fetch_array($Res,0);
    -00177   return $line['p_exercice'];
    -00178 }
    -00179 /* function ShowDevise
    -00180  * Purpose :
    -00181  * 
    -00182  * parm : 
    -00183  *      - 
    -00184  * gen :
    -00185  *      -
    -00186  * return:
    -00187  *      -
    -00188  *
    -00189  */ 
    -00190 function ShowDevise($p_cn)
    -00191 {
    -00192  echo "<h2 class=\"info\"> Devises </H2>";
    -00193   echo '<TABLE ALIGN="CENTER">';
    -00194   echo "<TR>";
    -00195   echo '<TH> CODE </TH>';
    -00196   echo '<TH> Valeur <BR>(par rapport à l\'euro) </TH>';
    -00197   echo "</TR>";
    -00198 
    -00199   $Res=ExecSql($p_cn,"select pm_id,pm_code,pm_rate  from parm_money order by pm_code");
    -00200   $Max=pg_NumRows($Res);
    -00201   
    -00202   for ($i=0;$i<$Max;$i++) {
    -00203     $l_line=pg_fetch_array($Res,$i);
    -00204     echo '<TR>'; 
    -00205     echo '<TD>'.$l_line['pm_code'].'</TD>';
    -00206     $l_rate=sprintf("% 10.6f",$l_line['pm_rate']);
    -00207     echo '<TD ALIGN="RIGHT">'.$l_rate.'</TD>';
    -00208     echo "<TD class=\"mtitle\"> <A class=\"mtitle\" HREF=\"dossier_prefs.php?p_mid=$l_line[pm_id]&p_action=change&p_code=$l_line[pm_code]&p_rate=$l_line[pm_rate]\">Change</A></TD>";
    -00209     echo "<TD class=\"mtitle\"> <A class=\"mtitle\" HREF=\"dossier_prefs.php?p_mid=$l_line[pm_id]&p_action=delete&p_code=$l_line[pm_code]\">Efface</A></TD>";
    -00210     echo '</TR>';
    -00211     
    -00212   }
    -00213   echo '<TR> <FORM ACTION="dossier_prefs.php" METHOD="POST">';
    -00214 echo '<TD> <INPUT TYPE="text" NAME="p_devise"></TD>';
    -00215  echo '<TD> <INPUT TYPE="text" NAME="p_rate"></TD>';
    -00216  echo '<TD> <INPUT TYPE="SUBMIT" NAME="action" Value="Ajout"</TD>';
    -00217  echo '</FORM></TR>';
    -00218  echo '</TABLE>';
    -00219 }
    -00220 /* function ShowPeriode
    -00221  * Purpose :
    -00222  * 
    -00223  * parm : 
    -00224  *      - 
    -00225  * gen :
    -00226  *      -
    -00227  * return:
    -00228  *      -
    -00229  *
    -00230  */ 
    -00231 function ShowPeriode($p_cn)
    -00232 {
    -00233   //  echo "<h2 class=\"info\"> Période </H2>";
    -00234   $Res=ExecSql($p_cn,"select p_id,to_char(p_start,'DD.MM.YYYY') as date_start,to_char(p_end,'DD.MM.YYYY') as date_end,p_central,p_closed,p_exercice
    -00235   from parm_periode order by p_start");
    -00236   $Max=pg_NumRows($Res);
    -00237   echo '<TABLE ALIGN="CENTER">';
    -00238   echo "</TR>";
    -00239   echo '<TH> Date début </TH>';
    -00240   echo '<TH> Date fin </TH>';
    -00241   echo '<TH> Exercice </TH>';
    -00242   echo "</TR>";
    -00243   
    -00244   for ($i=0;$i<$Max;$i++) {
    -00245     $l_line=pg_fetch_array($Res,$i);
    -00246     echo '<TR>'; 
    -00247     echo '<TD ALIGN="CENTER"> '.$l_line['date_start'].'</TD>';
    -00248     echo '<TD  ALIGN="CENTER"> '.$l_line['date_end'].'</TD>';
    -00249     echo '<TD  ALIGN="CENTER"> '.$l_line['p_exercice'].'</TD>';
    -00250     echo_debug('preference.php',__LINE__," closed : $l_line[p_closed]");
    -00251     if ( $l_line['p_closed'] == 't' )     { 
    -00252       $closed=($l_line['p_central']=='t')?'<TD>Centralisée</TD>':'<TD>Fermée</TD>';
    -00253       $change='<TD></TD>';
    -00254       $remove='<TD></TD>';
    -00255     } else {
    -00256       $closed='<TD class="mtitle">'; 
    -00257       $closed.='<A class="mtitle" HREF="user_advanced.php?p_action=periode&action=closed&p_per='.$l_line['p_id'].'"> Cloturer</A>';
    -00258     $change='<TD class="mtitle">';
    -00259     $change.='<A class="mtitle" HREF="user_advanced.php?p_action=periode&action=change_per&p_per='.
    -00260       $l_line['p_id']."&p_date_start=".$l_line['date_start'].
    -00261       "&p_date_end=".$l_line['date_end']."&p_exercice=".
    -00262       $l_line['p_exercice']."\"> Changer</A>";
    -00263     $remove='<TD class="mtitle">';
    -00264     $remove.='<A class="mtitle" HREF="user_advanced.php?p_action=periode&action=delete_per&p_per='.
    -00265       $l_line['p_id']."\"> Efface</A>";
    -00266 
    -00267     }
    -00268     echo "$closed";
    -00269     echo $change;
    -00270 
    -00271     echo $remove;
    -00272 
    -00273     echo '</TR>';
    -00274     
    -00275   }
    -00276   echo '<TR> <FORM ACTION="user_advanced.php?p_action=periode" METHOD="POST">';
    -00277   echo '<TD> <INPUT TYPE="text" NAME="p_date_start" SIZE="10"></TD>';
    -00278   echo '<TD> <INPUT TYPE="text" NAME="p_date_end" SIZE="10"></TD>';
    -00279   echo '<TD> <INPUT TYPE="text" NAME="p_exercice" SIZE="10"></TD>';
    -00280   echo '<TD> <INPUT TYPE="SUBMIT" NAME="add_per" Value="Ajout"</TD>';
    -00281   echo '<TD></TD>';
    -00282   echo '<TD></TD>';
    -00283   echo '</FORM></TR>';
    -00284 
    -00285   echo '</TABLE>';
    -00286 }
    -00287 
    -00288 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00071 function FormPeriode($p_cn,$l_default=0,$p_type=OPEN,$p_suff="") +00072 { +00073 switch ($p_type) { +00074 case CLOSED: +00075 $sql_closed="p_closed=true and p_central = false "; +00076 break; +00077 case OPEN: +00078 $sql_closed="p_closed=false"; +00079 break; +00080 case NOTCENTRALIZED: +00081 $sql_closed="p_closed=true and p_central = false "; +00082 break; +00083 default: +00084 error("invalide p_type in 'preference.php'#__LINE__"); +00085 } +00086 $sql="select p_id,to_char(p_start,'DD.MM.YYYY') as p_start_string, +00087 to_char(p_end,'DD.MM.YYYY') as p_end_string +00088 from parm_periode where +00089 $sql_closed +00090 order by p_start"; +00091 +00092 $Res=ExecSql($p_cn,$sql); +00093 $Max=pg_NumRows($Res); +00094 if ( $Max == 0 ) return null; +00095 $ret='<SELECT NAME="periode'.$p_suff.'">'; +00096 for ( $i = 0; $i < $Max;$i++) { +00097 $l_line=pg_fetch_array($Res,$i); +00098 if ( $l_default == $l_line['p_id'] ) +00099 $sel="SELECTED"; +00100 else +00101 $sel=""; +00102 +00103 $ret.=sprintf('<OPTION VALUE="%s" %s>%s - %s',$l_line['p_id'] +00104 ,$sel +00105 ,$l_line['p_start_string'] +00106 ,$l_line['p_end_string']); +00107 +00108 } +00109 $ret.="</SELECT>"; +00110 return $ret; +00111 } +00122 function GetPeriode($p_cn,$p_periode) +00123 { +00124 $sql="select to_char(p_start,'DD.MM.YYYY') as p_start, +00125 to_char(p_end,'DD.MM.YYYY') as p_end +00126 from parm_periode +00127 where p_id=".$p_periode; +00128 $Res=ExecSql($p_cn,$sql); +00129 if ( pg_NumRows($Res) == 0) return null; +00130 return pg_fetch_array($Res,0); +00131 +00132 } +00143 function PeriodeClosed($p_cn,$p_periode) +00144 { +00145 $sql="select p_closed +00146 from parm_periode +00147 where p_id=".$p_periode; +00148 $Res=ExecSql($p_cn,$sql); +00149 if ( pg_NumRows($Res) == 0) return null; +00150 $l_line=pg_fetch_array($Res,0); +00151 return $l_line['p_closed']; +00152 +00153 } +00165 function GetExercice($p_cn,$p_periode) +00166 { +00167 $Res=ExecSql($p_cn,"select p_exercice from parm_periode". +00168 " where p_id=$p_periode"); +00169 if ( pg_NumRows($Res) == 0 ) return ""; +00170 $line=pg_fetch_array($Res,0); +00171 return $line['p_exercice']; +00172 } +00182 function ShowDevise($p_cn) +00183 { +00184 echo "<h2 class=\"info\"> Devises </H2>"; +00185 echo '<TABLE ALIGN="CENTER">'; +00186 echo "<TR>"; +00187 echo '<TH> CODE </TH>'; +00188 echo '<TH> Valeur <BR>(par rapport à l\'euro) </TH>'; +00189 echo "</TR>"; +00190 +00191 $Res=ExecSql($p_cn,"select pm_id,pm_code,pm_rate from parm_money order by pm_code"); +00192 $Max=pg_NumRows($Res); +00193 +00194 for ($i=0;$i<$Max;$i++) { +00195 $l_line=pg_fetch_array($Res,$i); +00196 echo '<TR>'; +00197 echo '<TD>'.$l_line['pm_code'].'</TD>'; +00198 $l_rate=sprintf("% 10.6f",$l_line['pm_rate']); +00199 echo '<TD ALIGN="RIGHT">'.$l_rate.'</TD>'; +00200 echo "<TD class=\"mtitle\"> <A class=\"mtitle\" HREF=\"parametre.php?p_mid=$l_line[pm_id]&p_action=change&p_code=$l_line[pm_code]&p_rate=$l_line[pm_rate]\">Change</A></TD>"; +00201 echo "<TD class=\"mtitle\"> <A class=\"mtitle\" HREF=\"parametre.php?p_mid=$l_line[pm_id]&p_action=delete&p_code=$l_line[pm_code]\">Efface</A></TD>"; +00202 echo '</TR>'; +00203 +00204 } +00205 echo '<TR> <FORM ACTION="parametre.php" METHOD="POST">'; +00206 echo '<TD> <INPUT TYPE="text" NAME="p_devise"></TD>'; +00207 echo '<TD> <INPUT TYPE="text" NAME="p_rate"></TD>'; +00208 echo '<TD> <INPUT TYPE="SUBMIT" NAME="action" Value="Ajout"</TD>'; +00209 echo '</FORM></TR>'; +00210 echo '</TABLE>'; +00211 } +00221 function ShowPeriode($p_cn) +00222 { +00223 // echo "<h2 class=\"info\"> Période </H2>"; +00224 $Res=ExecSql($p_cn,"select p_id,to_char(p_start,'DD.MM.YYYY') as date_start,to_char(p_end,'DD.MM.YYYY') as date_end,p_central,p_closed,p_exercice +00225 from parm_periode order by p_start"); +00226 $Max=pg_NumRows($Res); +00227 echo '<TABLE ALIGN="CENTER">'; +00228 echo "</TR>"; +00229 echo '<TH> Date début </TH>'; +00230 echo '<TH> Date fin </TH>'; +00231 echo '<TH> Exercice </TH>'; +00232 echo "</TR>"; +00233 +00234 for ($i=0;$i<$Max;$i++) { +00235 $l_line=pg_fetch_array($Res,$i); +00236 echo '<TR>'; +00237 echo '<TD ALIGN="CENTER"> '.$l_line['date_start'].'</TD>'; +00238 echo '<TD ALIGN="CENTER"> '.$l_line['date_end'].'</TD>'; +00239 echo '<TD ALIGN="CENTER"> '.$l_line['p_exercice'].'</TD>'; +00240 echo_debug('preference.php',__LINE__," closed : $l_line[p_closed]"); +00241 if ( $l_line['p_closed'] == 't' ) { +00242 $closed=($l_line['p_central']=='t')?'<TD>Centralisée</TD>':'<TD>Fermée</TD>'; +00243 $change='<TD></TD>'; +00244 $remove='<TD></TD>'; +00245 } else { +00246 $closed='<TD class="mtitle">'; +00247 $closed.='<A class="mtitle" HREF="user_advanced.php?p_action=periode&action=closed&p_per='.$l_line['p_id'].'"> Cloturer</A>'; +00248 $change='<TD class="mtitle">'; +00249 $change.='<A class="mtitle" HREF="user_advanced.php?p_action=periode&action=change_per&p_per='. +00250 $l_line['p_id']."&p_date_start=".$l_line['date_start']. +00251 "&p_date_end=".$l_line['date_end']."&p_exercice=". +00252 $l_line['p_exercice']."\"> Changer</A>"; +00253 $remove='<TD class="mtitle">'; +00254 $remove.='<A class="mtitle" HREF="user_advanced.php?p_action=periode&action=delete_per&p_per='. +00255 $l_line['p_id']."\"> Efface</A>"; +00256 +00257 } +00258 echo "$closed"; +00259 echo $change; +00260 +00261 echo $remove; +00262 +00263 echo '</TR>'; +00264 +00265 } +00266 echo '<TR> <FORM ACTION="user_advanced.php?p_action=periode" METHOD="POST">'; +00267 echo '<TD> <INPUT TYPE="text" NAME="p_date_start" SIZE="10"></TD>'; +00268 echo '<TD> <INPUT TYPE="text" NAME="p_date_end" SIZE="10"></TD>'; +00269 echo '<TD> <INPUT TYPE="text" NAME="p_exercice" SIZE="10"></TD>'; +00270 echo '<TD> <INPUT TYPE="SUBMIT" NAME="add_per" Value="Ajout"</TD>'; +00271 echo '<TD></TD>'; +00272 echo '<TD></TD>'; +00273 echo '</FORM></TR>'; +00274 +00275 echo '</TABLE>'; +00276 } +00277 +00278 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/preference_8php.html b/doc/developper/html/preference_8php.html index 7ffa5c971..5806d7961 100644 --- a/doc/developper/html/preference_8php.html +++ b/doc/developper/html/preference_8php.html @@ -4,30 +4,44 @@ - + -

    preference.php File Reference

    +

    preference.php File Reference

    include file for the periode form, currency,... More... +

    +

    Go to the source code of this file. + + + + + + +

    Functions

     FormPeriodeMult ($p_cn)
     Generate the form for the periode.
     FormPeriode ($p_cn, $l_default=0, $p_type=OPEN, $p_suff="")
     Generate the form for the periode.
     GetPeriode ($p_cn, $p_periode)
     Give the start & end date of a periode.
     PeriodeClosed ($p_cn, $p_periode)
     get the status of a periode
     GetExercice ($p_cn, $p_periode)
     get the exercice of a periode
     ShowDevise ($p_cn)
     Show all the currency encoded.
     ShowPeriode ($p_cn)
     Show all the periode and their status.
    -


    Function Documentation

    +

    Detailed Description

    +include file for the periode form, currency,... +

    + +

    +Definition in file preference.php.


    Function Documentation

    @@ -74,11 +88,22 @@ +References $l_line, $Max, $Res, $ret, $sql, and ExecSql().

    +Generate the form for the periode. +

    +

    Parameters:
    + + + + + +
    $p_cn connexion
    $p_default default periode
    $p_type the type of the periode
    $p_suff the suffix of the name
    +
    +
    Returns:
    string containing html code for the HTML

    -Definition at line 73 of file preference.php. +Definition at line 71 of file preference.php.

    -References $l_line, $Max, $Res, $ret, $sql, and ExecSql().

    @@ -106,11 +131,20 @@ References $l_line,

    +Generate the form for the periode. +

    +FormPeriodeMult

    +

    Parameters:
    + + +
    $p_cn connexion
    +
    +
    Returns:
    string containing html code for the form

    Definition at line 37 of file preference.php.

    -References $l_line, $Max, $Res, $ret, $sql, and ExecSql(). +References $l_line, $Max, $Res, $ret, $sql, and ExecSql().

    Referenced by ViewImp(). @@ -149,11 +183,20 @@ Referenced by ViewImp(

    +get the exercice of a periode +

    +

    Parameters:
    + + + +
    $p_cn connection
    $p_periode periode
    +
    +
    Returns:
    Exercice of the periode

    -Definition at line 171 of file preference.php. +Definition at line 165 of file preference.php.

    -References $Res, and ExecSql(). +References $Res, and ExecSql().

    @@ -190,13 +233,23 @@ References $Res, a

    +Give the start & end date of a periode. +

    +GetPeriode

    +

    Parameters:
    + + + +
    p_connection 
    p_periode 
    +
    +
    Returns:
    array containing the start date & the end date

    -Definition at line 126 of file preference.php. +Definition at line 122 of file preference.php.

    -References $Res, $sql, and ExecSql(). +References $Res, $sql, and ExecSql().

    -Referenced by FormAchInput(), FormFin(), FormODS(), FormVenInput(), RecordJrn(), VerifData(), and VerifyOperationDate(). +Referenced by FormAchInput(), FormFin(), FormODS(), FormVenInput(), RecordJrn(), VerifData(), and VerifyOperationDate().

    @@ -233,13 +286,22 @@ Referenced by FormA

    +get the status of a periode +

    +

    Parameters:
    + + + +
    $p_cn database connex
    periode id
    +
    +
    Returns:
    true if closed

    -Definition at line 148 of file preference.php. +Definition at line 143 of file preference.php.

    -References $l_line, $Res, $sql, and ExecSql(). +References $l_line, $Res, $sql, and ExecSql().

    -Referenced by VerifData(), and VerifyOperationDate(). +Referenced by VerifData(), and VerifyOperationDate().

    @@ -267,11 +329,19 @@ Referenced by VerifData(),

    +Show all the currency encoded. +

    +

    Parameters:
    + + +
    $p_cn database connextion
    +
    +
    Returns:
    nothing

    -Definition at line 190 of file preference.php. +Definition at line 182 of file preference.php.

    -References $l_line, $Max, $Res, ExecSql(), and METHOD. +References $l_line, $Max, $Res, ExecSql(), and METHOD.

    @@ -299,14 +369,22 @@ References $l_line,

    +Show all the periode and their status. +

    +

    Parameters:
    + + +
    $p_cn database connection
    +
    +
    Returns:
    nothing

    -Definition at line 231 of file preference.php. +Definition at line 221 of file preference.php.

    -References $l_line, $Max, $Res, echo_debug(), ExecSql(), and METHOD. +References $l_line, $Max, $Res, echo_debug(), ExecSql(), and METHOD. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/print__balance_8php-source.html b/doc/developper/html/print__balance_8php-source.html index d828249a2..5858c46c5 100644 --- a/doc/developper/html/print__balance_8php-source.html +++ b/doc/developper/html/print__balance_8php-source.html @@ -4,7 +4,7 @@ - +

    print_balance.php

    Go to the documentation of this file.
    00001 <?
    @@ -26,78 +26,68 @@
     00017  *   along with PhpCompta; if not, write to the Free Software
     00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     00019  */
    -00020 /* received parameters
    -00021  e_date element 01.01.2003
    -00022  e_client element 3
    -00023  nb_item element 2
    -00024  e_march0 element 11
    -00025  e_quant0 element 1
    -00026  e_march1 element 6
    -00027  e_quant1 element 2
    -00028  e_comment  invoice number
    -00029 */
    -00030 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00031 // $Revision$
    -00032  
    -00033 include_once("ac_common.php");
    -00034 include_once("postgres.php");
    -00035 include_once("class.ezpdf.php");
    -00036 include_once("poste.php");
    -00037 include_once("class_balance.php");
    -00038 include_once("preference.php");
    -00039 
    -00040 $cn=DbConnect($_SESSION['g_dossier']);
    -00041 $rep=DbConnect();
    -00042 include ('class_user.php');
    -00043 $User=new cl_user($rep);
    -00044 $User->Check();
    -00045 
    -00046 $bal=new Balance($cn);
    -00047 if ( $User->CheckAction($cn,BALANCE) == 0)
    -00048   {
    -00049     NoAccess();
    -00050     exit;
    -00051   }
    -00052 echo_debug('print_balance.php',__LINE__,"imp pdf journaux");
    -00053 foreach ($HTTP_POST_VARS as $key=>$element) {
    -00054   ${"$key"}=$element;
    -00055   echo_debug('print_balance.php',__LINE__,"key => $key element $element");
    -00056 }
    -00057 // if centralized
    -00058 $t_cent="";
    -00059 
    -00060 if ( isset($central) ) {
    -00061     $bal->central='Y';
    -00062     $t_cent="centralisée";
    -00063  }
    -00064  else 
    -00065   $bal->central='N';
    -00066 
    -00067 $array=$bal->GetRow($from_periode,$to_periode);
    +00032 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    +00033 // $Revision$
    +00034  
    +00035 include_once("ac_common.php");
    +00036 include_once("postgres.php");
    +00037 include_once("class.ezpdf.php");
    +00038 include_once("poste.php");
    +00039 include_once("class_balance.php");
    +00040 include_once("preference.php");
    +00041 
    +00042 $cn=DbConnect($_SESSION['g_dossier']);
    +00043 $rep=DbConnect();
    +00044 include ('class_user.php');
    +00045 $User=new cl_user($rep);
    +00046 $User->Check();
    +00047 
    +00048 $bal=new Balance($cn);
    +00049 if ( $User->CheckAction($cn,BALANCE) == 0)
    +00050   {
    +00051     NoAccess();
    +00052     exit;
    +00053   }
    +00054 echo_debug('print_balance.php',__LINE__,"imp pdf journaux");
    +00055 foreach ($HTTP_POST_VARS as $key=>$element) {
    +00056   ${"$key"}=$element;
    +00057   echo_debug('print_balance.php',__LINE__,"key => $key element $element");
    +00058 }
    +00059 // if centralized
    +00060 $t_cent="";
    +00061 
    +00062 if ( isset($central) ) {
    +00063     $bal->central='Y';
    +00064     $t_cent="centralisée";
    +00065  }
    +00066  else 
    +00067   $bal->central='N';
     00068 
    -00069 if ( sizeof($array)  == 0 ) {
    -00070   $pdf=& new Cezpdf('a4');
    -00071   $pdf->selectFont('./addon/fonts/Helvetica.afm');
    -00072   $pdf->ezSetCmMargins(2,2,2,2);
    -00073   $pdf->ezText("Balance compte -- vide");
    -00074   $pdf->ezStream();
    -00075   exit();
    -00076   
    -00077  }
    -00078 $a=GetPeriode($cn,$from_periode);
    -00079 $b=GetPeriode($cn,$to_periode);
    -00080 $per_text=" période du ".$a['p_start']." au ".$b['p_end'];
    -00081 $pdf=& new Cezpdf('a4');
    -00082 $pdf->selectFont('./addon/fonts/Helvetica.afm');
    -00083 $pdf->ezSetCmMargins(2,2,2,2);
    -00084 $pdf->ezTable($array,array('poste'=>'Poste','label'=>'Libellé','sum_deb'=>'Total Débit',
    -00085                            'sum_cred'=>'Total crédit','solde_deb'=>'Solde débiteur',
    -00086                            'solde_cred'=>'Solde créditeur'),'Balance des comptes '.$t_cent.$per_text);
    -00087 $pdf->ezStream();
    -00088 
    -00089 
    -00090 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00069 $array=$bal->GetRow($from_periode,$to_periode); +00070 +00071 if ( sizeof($array) == 0 ) { +00072 $pdf=& new Cezpdf('a4'); +00073 $pdf->selectFont('./addon/fonts/Helvetica.afm'); +00074 $pdf->ezSetCmMargins(2,2,2,2); +00075 $pdf->ezText("Balance compte -- vide"); +00076 $pdf->ezStream(); +00077 exit(); +00078 +00079 } +00080 $a=GetPeriode($cn,$from_periode); +00081 $b=GetPeriode($cn,$to_periode); +00082 $per_text=" période du ".$a['p_start']." au ".$b['p_end']; +00083 $pdf=& new Cezpdf('a4'); +00084 $pdf->selectFont('./addon/fonts/Helvetica.afm'); +00085 $pdf->ezSetCmMargins(2,2,2,2); +00086 $pdf->ezTable($array,array('poste'=>'Poste','label'=>'Libellé','sum_deb'=>'Total Débit', +00087 'sum_cred'=>'Total crédit','solde_deb'=>'Solde débiteur', +00088 'solde_cred'=>'Solde créditeur'),'Balance des comptes '.$t_cent.$per_text); +00089 $pdf->ezStream(); +00090 +00091 +00092 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/print__balance_8php.html b/doc/developper/html/print__balance_8php.html index cb517db34..adc822e30 100644 --- a/doc/developper/html/print__balance_8php.html +++ b/doc/developper/html/print__balance_8php.html @@ -4,10 +4,12 @@ - + -

    print_balance.php File Reference

    +

    print_balance.php File Reference

    Print the balance in pdf format. More... +

    +

    Go to the source code of this file. @@ -33,7 +35,25 @@
     $pdf = & new Cezpdf('a4')
    -


    Variable Documentation

    +

    Detailed Description

    +Print the balance in pdf format. +

    +

    Parameters:
    + + + + + + + + + + +
    received parameters
    e_date element 01.01.2003
    e_client element 3
    nb_item element 2
    e_march0 element 11
    e_quant0 element 1
    e_march1 element 6
    e_quant1 element 2
    e_comment invoice number
    +
    + +

    +Definition in file print_balance.php.


    Variable Documentation

    @@ -56,7 +76,7 @@

    -Definition at line 78 of file print_balance.php. +Definition at line 80 of file print_balance.php.

    @@ -81,7 +101,7 @@ Definition at line 7

    -Definition at line 79 of file print_balance.php. +Definition at line 81 of file print_balance.php.

    @@ -106,7 +126,7 @@ Definition at line 7

    -Definition at line 46 of file print_balance.php. +Definition at line 48 of file print_balance.php.

    @@ -131,7 +151,7 @@ Definition at line 4

    -Definition at line 40 of file print_balance.php. +Definition at line 42 of file print_balance.php.

    @@ -156,7 +176,7 @@ Definition at line 4

    -Definition at line 81 of file print_balance.php. +Definition at line 83 of file print_balance.php.

    @@ -181,7 +201,7 @@ Definition at line 8

    -Definition at line 80 of file print_balance.php. +Definition at line 82 of file print_balance.php.

    @@ -206,7 +226,7 @@ Definition at line 8

    -Definition at line 41 of file print_balance.php. +Definition at line 43 of file print_balance.php.

    @@ -231,7 +251,7 @@ Definition at line 4

    -Definition at line 58 of file print_balance.php. +Definition at line 60 of file print_balance.php.

    @@ -256,7 +276,7 @@ Definition at line 5

    -Definition at line 43 of file print_balance.php. +Definition at line 45 of file print_balance.php.

    @@ -281,10 +301,10 @@ Definition at line 4

    -Definition at line 50 of file print_balance.php. +Definition at line 52 of file print_balance.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/print__invoice_8php-source.html b/doc/developper/html/print__invoice_8php-source.html index 99dd39da1..6692a5b68 100644 --- a/doc/developper/html/print__invoice_8php-source.html +++ b/doc/developper/html/print__invoice_8php-source.html @@ -4,7 +4,7 @@ - +

    print_invoice.php

    Go to the documentation of this file.
    00001 <?
    @@ -26,133 +26,123 @@
     00017  *   along with PhpCompta; if not, write to the Free Software
     00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     00019  */
    -00020 /* received parameters
    -00021  e_date element 01.01.2003
    -00022  e_client element 3
    -00023  nb_item element 2
    -00024  e_march0 element 11
    -00025  e_quant0 element 1
    -00026  e_march1 element 6
    -00027  e_quant1 element 2
    -00028  e_comment  invoice number
    -00029 */
    -00030 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00031 // $Revision$
    -00032 
    -00033 include_once("jrn.php");
    -00034 include_once("ac_common.php");
    -00035 include_once("postgres.php");
    -00036 include_once("class.ezpdf.php");
    -00037 include_once("impress_inc.php");
    -00038 include_once("fiche_inc.php");
    -00039 include_once("user_common.php");
    -00040 echo_debug('print_invoice.php',__LINE__,"imp pdf journaux");
    -00041 $cn=DbConnect($g_dossier);
    -00042 foreach ($HTTP_POST_VARS as $key=>$element) {
    -00043   ${"$key"}=$element;
    -00044   echo_debug('print_invoice.php',__LINE__,"key => $key element $element");
    -00045 }
    -00046 
    -00047 $amount=0.0;
    -00048 for ($i=0;$i<$nb_item;$i++) {
    -00049   // store quantity & goods in array
    -00050   $a_good[$i]=${"e_march$i"};
    -00051   $a_quant[$i]=${"e_quant$i"};
    -00052   $a_vat[$i]=${"e_march$i"."_tva_id"};
    -00053  if ( isNumber(${"e_march$i"."_sell"}) == 0 ) {
    -00054       // If the price is not set we have to find it from the database
    -00055       $a_price[$i]=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_PRIX_VENTE);
    -00056     } else {
    -00057       // The price is valid
    -00058       $a_price[$i]=${"e_march$i"."_sell"};
    -00059  }
    -00060 
    -00061   $a_amount[$i]=$a_price[$i]*$a_quant[$i];
    -00062   $amount+=$a_amount[$i];
    -00063   $tva=GetTvaRate($cn,GetFicheAttribut($cn,$a_good[$i],ATTR_DEF_TVA));
    -00064   // Prepare the array to print
    -00065   $a_good_detail[]=array('id'=>$i+1,
    -00066                          'name'=>GetFicheAttribut($cn,$a_good[$i],ATTR_DEF_NAME),
    -00067                          'quantity'=>$a_quant[$i],
    -00068                          'Unit'        =>$a_price[$i],
    -00069                          'Total HTVA' => $a_amount[$i],
    -00070                          'tva'=>$tva['tva_label'],
    -00071                          'Total' => $a_amount[$i]+$a_amount[$i]*$a_quant[$i]*$tva['tva_rate']);
    -00072 }
    -00073 
    -00074 $a_vat=ComputeVat($cn,  $a_good,$a_quant,$a_price,$a_vat);
    -00075 $sum_vat=0.0;
    -00076 foreach ( $a_vat as $element => $t) {
    -00077   echo_debug('print_invoice.php',__LINE__," a_vat element $element t $t");
    -00078   $sum_vat+=$t;
    -00079   echo_debug('print_invoice.php',__LINE__,"sum_vat = $sum_vat");
    -00080 }
    -00081 
    -00082 $ret="";
    -00083 $pdf=& new Cezpdf('a4');
    -00084 $pdf->selectFont('./addon/fonts/Helvetica.afm');
    -00085 $pdf->ezSetCmMargins(2,2,2,2);
    -00086 // Write the date
    -00087 $pdf->ezText("Date : ".$e_date,10,array('justification'=>'right'));
    -00088          
    -00089 // write the customer data
    -00090 $info[0]=array('info'=>GetFicheAttribut($cn,$e_client,ATTR_DEF_NAME));
    -00091 $info[1]=array('info'=>GetFicheAttribut($cn,$e_client,ATTR_DEF_ADRESS));
    -00092 $info[2]=array('info'=>GetFicheAttribut($cn,$e_client,ATTR_DEF_CP));
    -00093 $info[3]=array('info'=>GetFicheAttribut($cn,$e_client,ATTR_DEF_PAYS));
    -00094 $pdf->ezSetDy(-50);
    -00095 $pdf->ezTable($info, null, "Informations"
    -00096               , array('width'=>200,'fontSize'=>12,'shaded'=>0,'xOrientation'=>'left','xPos'=>'right','showHeadings'=>0));       
    -00097         
    -00098 // Write the invoice number
    -00099 $pdf->ezSetDy(-50);
    -00100 $pdf->ezText ($e_comment,14,array('justification'=>'center'));
    +00034 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    +00035 // $Revision$
    +00036 
    +00037 include_once("jrn.php");
    +00038 include_once("ac_common.php");
    +00039 include_once("postgres.php");
    +00040 include_once("class.ezpdf.php");
    +00041 include_once("impress_inc.php");
    +00042 include_once("fiche_inc.php");
    +00043 include_once("user_common.php");
    +00044 echo_debug('print_invoice.php',__LINE__,"imp pdf journaux");
    +00045 $cn=DbConnect($g_dossier);
    +00046 foreach ($HTTP_POST_VARS as $key=>$element) {
    +00047   ${"$key"}=$element;
    +00048   echo_debug('print_invoice.php',__LINE__,"key => $key element $element");
    +00049 }
    +00050 
    +00051 $amount=0.0;
    +00052 for ($i=0;$i<$nb_item;$i++) {
    +00053   // store quantity & goods in array
    +00054   $a_good[$i]=${"e_march$i"};
    +00055   $a_quant[$i]=${"e_quant$i"};
    +00056   $a_vat[$i]=${"e_march$i"."_tva_id"};
    +00057  if ( isNumber(${"e_march$i"."_sell"}) == 0 ) {
    +00058       // If the price is not set we have to find it from the database
    +00059       $a_price[$i]=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_PRIX_VENTE);
    +00060     } else {
    +00061       // The price is valid
    +00062       $a_price[$i]=${"e_march$i"."_sell"};
    +00063  }
    +00064 
    +00065   $a_amount[$i]=$a_price[$i]*$a_quant[$i];
    +00066   $amount+=$a_amount[$i];
    +00067   $tva=GetTvaRate($cn,GetFicheAttribut($cn,$a_good[$i],ATTR_DEF_TVA));
    +00068   // Prepare the array to print
    +00069   $a_good_detail[]=array('id'=>$i+1,
    +00070                          'name'=>GetFicheAttribut($cn,$a_good[$i],ATTR_DEF_NAME),
    +00071                          'quantity'=>$a_quant[$i],
    +00072                          'Unit'        =>$a_price[$i],
    +00073                          'Total HTVA' => $a_amount[$i],
    +00074                          'tva'=>$tva['tva_label'],
    +00075                          'Total' => $a_amount[$i]+$a_amount[$i]*$a_quant[$i]*$tva['tva_rate']);
    +00076 }
    +00077 
    +00078 $a_vat=ComputeVat($cn,  $a_good,$a_quant,$a_price,$a_vat);
    +00079 $sum_vat=0.0;
    +00080 foreach ( $a_vat as $element => $t) {
    +00081   echo_debug('print_invoice.php',__LINE__," a_vat element $element t $t");
    +00082   $sum_vat+=$t;
    +00083   echo_debug('print_invoice.php',__LINE__,"sum_vat = $sum_vat");
    +00084 }
    +00085 
    +00086 $ret="";
    +00087 $pdf=& new Cezpdf('a4');
    +00088 $pdf->selectFont('./addon/fonts/Helvetica.afm');
    +00089 $pdf->ezSetCmMargins(2,2,2,2);
    +00090 // Write the date
    +00091 $pdf->ezText("Date : ".$e_date,10,array('justification'=>'right'));
    +00092          
    +00093 // write the customer data
    +00094 $info[0]=array('info'=>GetFicheAttribut($cn,$e_client,ATTR_DEF_NAME));
    +00095 $info[1]=array('info'=>GetFicheAttribut($cn,$e_client,ATTR_DEF_ADRESS));
    +00096 $info[2]=array('info'=>GetFicheAttribut($cn,$e_client,ATTR_DEF_CP));
    +00097 $info[3]=array('info'=>GetFicheAttribut($cn,$e_client,ATTR_DEF_PAYS));
    +00098 $pdf->ezSetDy(-50);
    +00099 $pdf->ezTable($info, null, "Informations"
    +00100               , array('width'=>200,'fontSize'=>12,'shaded'=>0,'xOrientation'=>'left','xPos'=>'right','showHeadings'=>0));       
     00101         
    -00102 // Write the goods details                                              
    +00102 // Write the invoice number
     00103 $pdf->ezSetDy(-50);
    -00104 $pdf->ezTable($a_good_detail,null,'Detail invoice',
    -00105               array('width'=>400,'cols'=>array(
    -00106                                                'quantity'=>array('justification'=>'right'),
    -00107                                                'Unit'=>array('justification'=>'right'),
    -00108                                                'Total HTVA'=>array('justification'=>'right'),
    -00109                                                'tva'=>array('justification'=>'right'),
    -00110                                                'Total'=>array('justification'=>'right')
    -00111                                                )));
    -00112         
    -00113         
    -00114 // Write the sum detail 
    -00115 $sum_detail[0] = array ('label'=>'Total HTVA ','amount'=>$amount);
    -00116 $index=1;
    -00117 foreach ( $a_vat as $element => $t) {
    -00118   echo_debug('print_invoice.php',__LINE__," a_vat element $element t $t");
    -00119   $a_tva_sum=GetTvaRate($cn,$element);
    -00120   $sum_detail[++$index]=array('label'=>"tva ". $a_tva_sum['tva_label'],'amount'=>$t);
    -00121 }
    -00122 $total=$amount+$sum_vat;
    -00123 $sum_detail[++$index]=array('label'=>"Total", 'amount'=>$total);
    -00124 $pdf->ezSetDy(-50);
    -00125 $pdf->ezTable($sum_detail,null,'',
    -00126               array('width'=>200,'showHeadings'=>0,'shaded'=>0,'cols'=>array('amount'=>array('justification'=>'right'))));
    -00127 
    -00128 
    -00129 // WRITE THE DATE LIMIT
    -00130 $pdf->ezSetDy(-50);
    -00131 $pdf->ezText(" Limit date : ".$e_ech);
    +00104 $pdf->ezText ($e_comment,14,array('justification'=>'center'));
    +00105         
    +00106 // Write the goods details                                              
    +00107 $pdf->ezSetDy(-50);
    +00108 $pdf->ezTable($a_good_detail,null,'Detail invoice',
    +00109               array('width'=>400,'cols'=>array(
    +00110                                                'quantity'=>array('justification'=>'right'),
    +00111                                                'Unit'=>array('justification'=>'right'),
    +00112                                                'Total HTVA'=>array('justification'=>'right'),
    +00113                                                'tva'=>array('justification'=>'right'),
    +00114                                                'Total'=>array('justification'=>'right')
    +00115                                                )));
    +00116         
    +00117         
    +00118 // Write the sum detail 
    +00119 $sum_detail[0] = array ('label'=>'Total HTVA ','amount'=>$amount);
    +00120 $index=1;
    +00121 foreach ( $a_vat as $element => $t) {
    +00122   echo_debug('print_invoice.php',__LINE__," a_vat element $element t $t");
    +00123   $a_tva_sum=GetTvaRate($cn,$element);
    +00124   $sum_detail[++$index]=array('label'=>"tva ". $a_tva_sum['tva_label'],'amount'=>$t);
    +00125 }
    +00126 $total=$amount+$sum_vat;
    +00127 $sum_detail[++$index]=array('label'=>"Total", 'amount'=>$total);
    +00128 $pdf->ezSetDy(-50);
    +00129 $pdf->ezTable($sum_detail,null,'',
    +00130               array('width'=>200,'showHeadings'=>0,'shaded'=>0,'cols'=>array('amount'=>array('justification'=>'right'))));
    +00131 
     00132 
    -00133 
    -00134 
    -00135 // Make a file of it
    -00136 //$pdfcode=" I don't know whether the prob comes from the ezPdf or from Apache or from Mysql";
    -00137 //$pdfcode=$pdf->ezOutput();
    -00138 //$fp=fopen("invoice.pdf","wb+");
    -00139 //fwrite($fp,$pdfcode);
    -00140 //fclose ($fp);
    -00141 
    -00142 $pdf->ezStream();
    -00143 
    -00144 
    -00145 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00133 // WRITE THE DATE LIMIT +00134 $pdf->ezSetDy(-50); +00135 $pdf->ezText(" Limit date : ".$e_ech); +00136 +00137 +00138 +00139 // Make a file of it +00140 //$pdfcode=" I don't know whether the prob comes from the ezPdf or from Apache or from Mysql"; +00141 //$pdfcode=$pdf->ezOutput(); +00142 //$fp=fopen("invoice.pdf","wb+"); +00143 //fwrite($fp,$pdfcode); +00144 //fclose ($fp); +00145 +00146 $pdf->ezStream(); +00147 +00148 +00149 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/print__invoice_8php.html b/doc/developper/html/print__invoice_8php.html index f224a099f..8e0c08a1b 100644 --- a/doc/developper/html/print__invoice_8php.html +++ b/doc/developper/html/print__invoice_8php.html @@ -4,10 +4,12 @@ - + -

    print_invoice.php File Reference

    +

    print_invoice.php File Reference

    Print invoice. More... +

    +

    Go to the source code of this file. @@ -39,7 +41,26 @@
     $total = $amount+$sum_vat
    -


    Variable Documentation

    +

    Detailed Description

    +Print invoice. +

    +

    Todo:
    Obsolete ?
    +
    Parameters:
    + + + + + + + + + + +
    received parameters
    e_date element 01.01.2003
    e_client element 3
    nb_item element 2
    e_march0 element 11
    e_quant0 element 1
    e_march1 element 6
    e_quant1 element 2
    e_comment invoice number
    +
    + +

    +Definition in file print_invoice.php.


    Variable Documentation

    @@ -69,7 +90,7 @@ 'Total' => $a_amount[$i]+$a_amount[$i]*$a_quant[$i]*$tva['tva_rate'])

    -Definition at line 65 of file print_invoice.php. +Definition at line 69 of file print_invoice.php.

    @@ -94,7 +115,7 @@ Definition at line 6

    -Definition at line 119 of file print_invoice.php. +Definition at line 123 of file print_invoice.php.

    @@ -119,9 +140,9 @@ Definition at line 1

    -Definition at line 74 of file print_invoice.php. +Definition at line 78 of file print_invoice.php.

    -Referenced by ComputeTotalVat(), ComputeVat(), FormAchView(), FormVenteView(), RecordInvoice(), and RecordSell(). +Referenced by ComputeTotalVat(), ComputeVat(), FormAchView(), FormVenteView(), RecordInvoice(), and RecordSell().

    @@ -146,9 +167,9 @@ Referenced by ComputeT

    -Definition at line 47 of file print_invoice.php. +Definition at line 51 of file print_invoice.php.

    -Referenced by RecordFin(), RecordInvoice(), RecordODS(), RecordSell(), and Customer::VatListing(). +Referenced by RecordFin(), RecordInvoice(), RecordODS(), RecordSell(), and Customer::VatListing().

    @@ -173,7 +194,7 @@ Referenced by Recor

    -Definition at line 41 of file print_invoice.php. +Definition at line 45 of file print_invoice.php.

    @@ -198,7 +219,7 @@ Definition at line 4

    -Definition at line 116 of file print_invoice.php. +Definition at line 120 of file print_invoice.php.

    @@ -223,7 +244,7 @@ Definition at line 1

    -Definition at line 90 of file print_invoice.php. +Definition at line 94 of file print_invoice.php.

    Referenced by Cpdf::addInternalLink(), Cpdf::addLink(), Cezpdf::alink(), Creport::dots(), Cezpdf::ezPRVTaddPageNumbers(), Creport::rf(), and Cezpdf::uline(). @@ -250,7 +271,7 @@ Referenced by Cpdf::addI

    -Definition at line 83 of file print_invoice.php. +Definition at line 87 of file print_invoice.php.

    @@ -275,7 +296,7 @@ Definition at line 8

    -Definition at line 82 of file print_invoice.php. +Definition at line 86 of file print_invoice.php.

    @@ -300,7 +321,7 @@ Definition at line 8

    -Definition at line 115 of file print_invoice.php. +Definition at line 119 of file print_invoice.php.

    @@ -325,9 +346,9 @@ Definition at line 1

    -Definition at line 75 of file print_invoice.php. +Definition at line 79 of file print_invoice.php.

    -Referenced by RecordInvoice(). +Referenced by RecordInvoice().

    @@ -352,7 +373,7 @@ Referenced by Recor

    -Definition at line 122 of file print_invoice.php. +Definition at line 126 of file print_invoice.php.

    Referenced by Cezpdf::ezPRVTaddPageNumbers(). @@ -379,12 +400,12 @@ Referenced by Cezpdf::

    -Definition at line 63 of file print_invoice.php. +Definition at line 67 of file print_invoice.php.

    -Referenced by Customer::VatListing(). +Referenced by Document::Replace(), and Customer::VatListing(). -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/priv__user_8php-source.html b/doc/developper/html/priv__user_8php-source.html index 842c028e1..22f973421 100644 --- a/doc/developper/html/priv__user_8php-source.html +++ b/doc/developper/html/priv__user_8php-source.html @@ -4,7 +4,7 @@ - +

    priv_user.php

    Go to the documentation of this file.
    00001 <?
    @@ -26,216 +26,213 @@
     00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00020 include_once("ac_common.php");
    -00021 include_once("postgres.php");
    -00022 include_once("debug.php");
    -00023 include_once("user_menu.php");
    -00024 html_page_start($_SESSION['g_theme']);
    -00025 echo_debug('priv_user.php',__LINE__,"entering priv_users");
    -00026 
    -00027 
    -00028 $rep=DbConnect();
    -00029 include_once ("class_user.php");
    -00030 $User=new cl_user($rep);
    -00031 $User->Check();
    -00032 
    -00033 if ($User->admin != 1) {
    -00034   html_page_stop();
    -00035   return;
    -00036 }
    -00037 
    -00038 if (! isset ($_GET['UID']) && ! isset($_POST['UID']) ) {
    -00039   //Message d'erreur si UID non positionné
    -00040   echo_debug('priv_user.php',__LINE__,"UID NOT DEFINED");
    -00041   html_page_stop();
    -00042   return;
    -00043 }
    -00044 $uid=( isset ($_GET['UID']))? $_GET['UID']: $_POST['UID'];
    -00045 echo_debug('priv_user.php',__LINE__,"UID IS DEFINED");
    -00046 
    -00047 $r_UID=GetUid($uid);
    -00048 if ( $r_UID == false ) {
    -00049   echo_debug('priv_user.php',__LINE__,"UID NOT VALID");
    -00050   // Message d'erreur
    -00051   html_page_stop();
    -00052   return;
    -00053 }
    -00054 echo_debug('priv_user.php',__LINE__,"UID IS VALID");
    -00055 echo '<H2 class="info"> Administration Globale</H2>';
    -00056 
    -00057 echo "<div>".MenuAdmin()."</div>";
    -00058 
    -00059 echo '<DIV>';
    -00060 
    -00061 echo '<h2>Gestion Utilisateurs</h2>';
    -00062 
    -00063 // User is valid and you're an admin 
    -00064 
    +00023 include_once("ac_common.php");
    +00024 include_once("postgres.php");
    +00025 include_once("debug.php");
    +00026 include_once("user_menu.php");
    +00027 html_page_start($_SESSION['g_theme']);
    +00028 echo_debug('priv_user.php',__LINE__,"entering priv_users");
    +00029 
    +00030 
    +00031 $rep=DbConnect();
    +00032 include_once ("class_user.php");
    +00033 $User=new cl_user($rep);
    +00034 $User->Check();
    +00035 
    +00036 if ($User->admin != 1) {
    +00037   html_page_stop();
    +00038   return;
    +00039 }
    +00040 
    +00041 if (! isset ($_GET['UID']) && ! isset($_POST['UID']) ) {
    +00042   //Message d'erreur si UID non positionné
    +00043   echo_debug('priv_user.php',__LINE__,"UID NOT DEFINED");
    +00044   html_page_stop();
    +00045   return;
    +00046 }
    +00047 $uid=( isset ($_GET['UID']))? $_GET['UID']: $_POST['UID'];
    +00048 echo_debug('priv_user.php',__LINE__,"UID IS DEFINED");
    +00049 
    +00050 $r_UID=GetUid($uid);
    +00051 if ( $r_UID == false ) {
    +00052   echo_debug('priv_user.php',__LINE__,"UID NOT VALID");
    +00053   // Message d'erreur
    +00054   html_page_stop();
    +00055   return;
    +00056 }
    +00057 echo_debug('priv_user.php',__LINE__,"UID IS VALID");
    +00058 echo '<H2 class="info"> Administration Globale</H2>';
    +00059 
    +00060 echo "<div>".MenuAdmin()."</div>";
    +00061 
    +00062 echo '<DIV>';
    +00063 
    +00064 echo '<h2>Gestion Utilisateurs</h2>';
     00065 
    -00066 ?>
    +00066 // User is valid and you're an admin 
     00067 
     00068 
    -00069 
    -00070 <?
    -00071 /* Parse the changes */
    -00072 if ( isset ( $_GET['reset_passwd']) ){
    -00073   $cn=DbConnect();
    -00074   $l_pass=md5('phpcompta');
    -00075   $Res=ExecSql($cn, "update ac_users set use_pass='$l_pass' where use_id=$uid");
    -00076   echo '<H2 class="info"> Password remis à phpcompta</H2>';
    -00077 }
    -00078 if ( isset ($_POST['SAVE']) ){
    -00079   $uid = $_POST['UID'];
    -00080   echo_debug('priv_user.php',__LINE__,"SAVE is set");
    -00081   // Update User 
    -00082   $cn=DbConnect();
    -00083   $Sql="update ac_users set use_first_name='".$_POST['fname']."', use_name='".$_POST['lname']."'
    -00084         ,use_login='".$_POST['login']."',use_active=".$_POST['Actif'].",use_admin=".$_POST['Admin']." where
    -00085          use_id=".$uid;
    -00086   $Res=ExecSql($cn,$Sql);
    -00087   // Update Priv on Folder
    -00088   foreach ($HTTP_POST_VARS as $name=>$elem)
    -00089     { 
    -00090       echo_debug('priv_user.php',__LINE__,"HTTP_POST_VARS $name $elem");
    -00091       if ( substr_count($name,'PRIV')!=0 )
    -00092       {
    -00093         echo_debug('priv_user.php',__LINE__,"Found a priv");
    -00094         $db_id=substr($name,4);
    -00095         $cn=DbConnect();
    -00096         if ( ExisteJnt($db_id,$uid) != 1 ) 
    -00097           {
    -00098           $Res=ExecSql($cn,"insert into jnt_use_dos(dos_id,use_id) values(".$db_id.",".$uid.")"); 
    -00099           }
    -00100         $jnt=GetJnt($db_id,$uid);
    -00101         if (ExistePriv($jnt) > 0) 
    -00102           {
    -00103           $Res=ExecSql($cn,"update priv_user set priv_priv='".$elem."' where priv_jnt=".$jnt);
    -00104           } else {
    -00105            $Res=ExecSql($cn,"insert into  priv_user(priv_jnt,priv_priv) values (".$jnt.",'".$elem."')");
    -00106           }
    -00107         
    -00108       }
    -00109 
    -00110     }
    -00111 } else {
    -00112   if ( isset ($DELETE) ) {
    -00113     $cn=DbConnect();
    -00114     $Res=ExecSql($cn,"delete from priv_user where priv_jnt in ( select jnt_id from jnt_use_dos where use_id=".$uid.")");
    -00115     $Res=ExecSql($cn,"delete from jnt_use_dos where use_id=".$uid);
    -00116     $Res=ExecSql($cn,"delete from ac_users where use_id=".$uid);
    -00117 
    -00118     echo "<center><H2 class=\"info\"> User $fname $lname ($login) is deleted </H2></CENTER>";
    -00119     html_page_stop();
    -00120     return;
    -00121   }
    -00122 }
    -00123 $r_UID=GetUid($uid);
    -00124 ?>
    -00125 <FORM ACTION="priv_user.php" METHOD="POST">
    -00126 
    -00127 <? printf('<INPUT TYPE=HIDDEN NAME=UID VALUE="%s">',$uid); ?>
    -00128 <TABLE BORDER=0>
    -00129 <TR><TD>
    -00130 <?printf('First name <INPUT type="text" NAME="fname" value="%s"> ',$r_UID[0]['use_first_name']); ?>
    -00131 </TD><TD>
    -00132 <?printf('Name <INPUT type="text" NAME="lname" value="%s"> ',$r_UID[0]['use_name']); ?>
    -00133 </TD>
    -00134 </TR><TR>
    -00135 <TD>
    -00136 <?printf('login <INPUT type="text" NAME="login" value="%s">',$r_UID[0]['use_login']); ?>
    -00137 </TD>
    -00138 <TD class="mtitle"> 
    -00139 <?printf('<A class="mtitle" HREF="priv_user.php?reset_passwd&UID=%s">Reset Password</A>',$uid); ?>
    +00069 ?>
    +00070 
    +00071 
    +00072 
    +00073 <?
    +00074 /* Parse the changes */
    +00075 if ( isset ( $_GET['reset_passwd']) ){
    +00076   $cn=DbConnect();
    +00077   $l_pass=md5('phpcompta');
    +00078   $Res=ExecSql($cn, "update ac_users set use_pass='$l_pass' where use_id=$uid");
    +00079   echo '<H2 class="info"> Password remis à phpcompta</H2>';
    +00080 }
    +00081 if ( isset ($_POST['SAVE']) ){
    +00082   $uid = $_POST['UID'];
    +00083   echo_debug('priv_user.php',__LINE__,"SAVE is set");
    +00084   // Update User 
    +00085   $cn=DbConnect();
    +00086   $Sql="update ac_users set use_first_name='".$_POST['fname']."', use_name='".$_POST['lname']."'
    +00087         ,use_login='".$_POST['login']."',use_active=".$_POST['Actif'].",use_admin=".$_POST['Admin']." where
    +00088          use_id=".$uid;
    +00089   $Res=ExecSql($cn,$Sql);
    +00090   // Update Priv on Folder
    +00091   foreach ($HTTP_POST_VARS as $name=>$elem)
    +00092     { 
    +00093       echo_debug('priv_user.php',__LINE__,"HTTP_POST_VARS $name $elem");
    +00094       if ( substr_count($name,'PRIV')!=0 )
    +00095       {
    +00096         echo_debug('priv_user.php',__LINE__,"Found a priv");
    +00097         $db_id=substr($name,4);
    +00098         $cn=DbConnect();
    +00099         if ( ExisteJnt($db_id,$uid) != 1 ) 
    +00100           {
    +00101           $Res=ExecSql($cn,"insert into jnt_use_dos(dos_id,use_id) values(".$db_id.",".$uid.")"); 
    +00102           }
    +00103         $jnt=GetJnt($db_id,$uid);
    +00104         if (ExistePriv($jnt) > 0) 
    +00105           {
    +00106           $Res=ExecSql($cn,"update priv_user set priv_priv='".$elem."' where priv_jnt=".$jnt);
    +00107           } else {
    +00108            $Res=ExecSql($cn,"insert into  priv_user(priv_jnt,priv_priv) values (".$jnt.",'".$elem."')");
    +00109           }
    +00110         
    +00111       }
    +00112 
    +00113     }
    +00114 } else {
    +00115   if ( isset ($DELETE) ) {
    +00116     $cn=DbConnect();
    +00117     $Res=ExecSql($cn,"delete from priv_user where priv_jnt in ( select jnt_id from jnt_use_dos where use_id=".$uid.")");
    +00118     $Res=ExecSql($cn,"delete from jnt_use_dos where use_id=".$uid);
    +00119     $Res=ExecSql($cn,"delete from ac_users where use_id=".$uid);
    +00120 
    +00121     echo "<center><H2 class=\"info\"> User $fname $lname ($login) is deleted </H2></CENTER>";
    +00122     html_page_stop();
    +00123     return;
    +00124   }
    +00125 }
    +00126 $r_UID=GetUid($uid);
    +00127 ?>
    +00128 <FORM ACTION="priv_user.php" METHOD="POST">
    +00129 
    +00130 <? printf('<INPUT TYPE=HIDDEN NAME=UID VALUE="%s">',$uid); ?>
    +00131 <TABLE BORDER=0>
    +00132 <TR><TD>
    +00133 <?printf('First name <INPUT type="text" NAME="fname" value="%s"> ',$r_UID[0]['use_first_name']); ?>
    +00134 </TD><TD>
    +00135 <?printf('Name <INPUT type="text" NAME="lname" value="%s"> ',$r_UID[0]['use_name']); ?>
    +00136 </TD>
    +00137 </TR><TR>
    +00138 <TD>
    +00139 <?printf('login <INPUT type="text" NAME="login" value="%s">',$r_UID[0]['use_login']); ?>
     00140 </TD>
    -00141 </TR>
    -00142 <TR><TD>
    -00143 <TABLE>
    -00144 <?
    -00145 if ( $r_UID[0]['use_active'] == 1 ) {
    -00146   $ACT="CHECKED";$NACT="UNCHECKED";
    -00147 } else {
    -00148   $ACT="UNCHECKED";$NACT="CHECKED";
    -00149 }
    -00150 echo "<TR><TD>";
    -00151 printf('<INPUT type="RADIO" NAME="Actif" VALUE="1" %s> Actif',$ACT); 
    -00152 echo "</TD><TD>";
    -00153 printf('<INPUT type="RADIO" NAME="Actif" VALUE="0" %s> Non Actif',$NACT); 
    -00154 echo "</TD></TR>";
    -00155 ?>
    -00156 </TABLE>
    -00157 </TD>
    -00158 <TD>
    -00159 <TABLE>
    -00160 <?
    -00161 if ( $r_UID[0]['use_admin'] == 1 ) {
    -00162   $ACT="CHECKED";$NACT="UNCHECKED";
    -00163 } else {
    -00164   $ACT="UNCHECKED";$NACT="CHECKED";
    -00165 }
    -00166 echo "<TR><TD>";
    -00167 printf('<INPUT type="RADIO" NAME="Admin" VALUE="1" %s> Administrator',$ACT); 
    -00168 echo "</TD><TD>";
    -00169 printf('<INPUT type="RADIO" NAME="Admin" VALUE="0" %s> Normal user',$NACT); 
    -00170 echo "</TD></TR>";
    -00171 ?>
    -00172 </TABLE>
    -00173 </TD>
    -00174 </TR>
    -00175 <TR>
    -00176 <TD>
    -00177 <!-- Show all database and rights -->
    -00178 <H2 class="info"> Droit par défaut </H2>
    -00179 <TABLE>
    -00180 <? 
    -00181 $Dossier=ShowDossier('all',1,0);
    -00182 foreach ( $Dossier as $rDossier) {
    -00183   $NORIGHT="";$Write="";$Read="";
    -00184   echo_debug('priv_user.php',__LINE__,"Dossier : ".$rDossier['dos_id']);
    -00185   $login_name=GetLogin($uid);
    -00186   $priv=GetPriv($rDossier['dos_id'],$login_name);
    -00187   printf("<TR><TD> Dossier : %s </TD>",$rDossier['dos_name']);
    -00188   if ( $priv==0 ) 
    -00189     { $NORIGHT="CHECKED";} 
    -00190   else { 
    -00191     $A=$priv[0]['priv_priv'];
    -00192     echo_debug('priv_user.php',__LINE__,"Priv = $A");
    -00193     if ( $priv[0]['priv_priv']=='W' ) 
    -00194       {$Write="CHECKED";}
    -00195     else {
    -00196       if ( $priv[0]['priv_priv']=='R' ) 
    -00197         { $Read="CHECKED";}
    -00198       else {
    -00199         if ($priv[0]['priv_priv']=='N') {
    -00200         $NORIGHT="CHECKED";
    -00201       }
    -00202     }
    -00203     }
    -00204 
    -00205   }
    -00206 
    -00207   printf('</TD><TD>No Right<INPUT TYPE="RADIO" NAME="PRIV%s" VALUE="NO" %s>',$rDossier['dos_id'],$NORIGHT);
    -00208   printf('</TD><TD>Read/Write <INPUT TYPE="RADIO" NAME="PRIV%s" VALUE="W" %s>',$rDossier['dos_id'],$Write);
    -00209   printf('</TD><TD>Read<INPUT TYPE="RADIO" NAME="PRIV%s" VALUE="R" %s>',$rDossier['dos_id'],$Read);
    -00210   echo "</TD></TR>";
    -00211 }
    -00212 
    -00213 ?>
    -00214 </TABLE>
    -00215 </TD>
    -00216 </TR>
    -00217 
    -00218 
    -00219 
    -00220 <TR><TD><input type="Submit" NAME="SAVE" VALUE="Save changes"></TD>
    -00221 <TD><input type="RESET" NAME="Reset" VALUE="Cancel Change"></TD>
    -00222 <TD><input type="Submit" NAME="DELETE" VALUE="Delete User"></TD>
    -00223 </TR>
    -00224 </FORM>
    -00225 </TABLE>
    -00226 </DIV>
    -00227 
    -00228 
    -00229 
    +00141 <TD class="mtitle"> 
    +00142 <?printf('<A class="mtitle" HREF="priv_user.php?reset_passwd&UID=%s">Reset Password</A>',$uid); ?>
    +00143 </TD>
    +00144 </TR>
    +00145 <TR><TD>
    +00146 <TABLE>
    +00147 <?
    +00148 if ( $r_UID[0]['use_active'] == 1 ) {
    +00149   $ACT="CHECKED";$NACT="UNCHECKED";
    +00150 } else {
    +00151   $ACT="UNCHECKED";$NACT="CHECKED";
    +00152 }
    +00153 echo "<TR><TD>";
    +00154 printf('<INPUT type="RADIO" NAME="Actif" VALUE="1" %s> Actif',$ACT); 
    +00155 echo "</TD><TD>";
    +00156 printf('<INPUT type="RADIO" NAME="Actif" VALUE="0" %s> Non Actif',$NACT); 
    +00157 echo "</TD></TR>";
    +00158 ?>
    +00159 </TABLE>
    +00160 </TD>
    +00161 <TD>
    +00162 <TABLE>
    +00163 <?
    +00164 if ( $r_UID[0]['use_admin'] == 1 ) {
    +00165   $ACT="CHECKED";$NACT="UNCHECKED";
    +00166 } else {
    +00167   $ACT="UNCHECKED";$NACT="CHECKED";
    +00168 }
    +00169 echo "<TR><TD>";
    +00170 printf('<INPUT type="RADIO" NAME="Admin" VALUE="1" %s> Administrator',$ACT); 
    +00171 echo "</TD><TD>";
    +00172 printf('<INPUT type="RADIO" NAME="Admin" VALUE="0" %s> Normal user',$NACT); 
    +00173 echo "</TD></TR>";
    +00174 ?>
    +00175 </TABLE>
    +00176 </TD>
    +00177 </TR>
    +00178 <TR>
    +00179 <TD>
    +00180 <!-- Show all database and rights -->
    +00181 <H2 class="info"> Droit par défaut </H2>
    +00182 <TABLE>
    +00183 <? 
    +00184 $Dossier=ShowDossier('all',1,0);
    +00185 foreach ( $Dossier as $rDossier) {
    +00186   $NORIGHT="";$Write="";$Read="";
    +00187   echo_debug('priv_user.php',__LINE__,"Dossier : ".$rDossier['dos_id']);
    +00188   $login_name=GetLogin($uid);
    +00189   $priv=GetPriv($rDossier['dos_id'],$login_name);
    +00190   printf("<TR><TD> Dossier : %s </TD>",$rDossier['dos_name']);
    +00191   if ( $priv==0 ) 
    +00192     { $NORIGHT="CHECKED";} 
    +00193   else { 
    +00194     $A=$priv[0]['priv_priv'];
    +00195     echo_debug('priv_user.php',__LINE__,"Priv = $A");
    +00196     if ( $priv[0]['priv_priv']=='W' ) 
    +00197       {$Write="CHECKED";}
    +00198     else {
    +00199       if ( $priv[0]['priv_priv']=='R' ) 
    +00200         { $Read="CHECKED";}
    +00201       else {
    +00202         if ($priv[0]['priv_priv']=='N') {
    +00203         $NORIGHT="CHECKED";
    +00204       }
    +00205     }
    +00206     }
    +00207 
    +00208   }
    +00209 
    +00210   printf('</TD><TD>No Right<INPUT TYPE="RADIO" NAME="PRIV%s" VALUE="NO" %s>',$rDossier['dos_id'],$NORIGHT);
    +00211   printf('</TD><TD>Read/Write <INPUT TYPE="RADIO" NAME="PRIV%s" VALUE="W" %s>',$rDossier['dos_id'],$Write);
    +00212   printf('</TD><TD>Read<INPUT TYPE="RADIO" NAME="PRIV%s" VALUE="R" %s>',$rDossier['dos_id'],$Read);
    +00213   echo "</TD></TR>";
    +00214 }
    +00215 
    +00216 ?>
    +00217 </TABLE>
    +00218 </TD>
    +00219 </TR>
    +00220 
    +00221 
    +00222 
    +00223 <TR><TD><input type="Submit" NAME="SAVE" VALUE="Save changes"></TD>
    +00224 <TD><input type="RESET" NAME="Reset" VALUE="Cancel Change"></TD>
    +00225 <TD><input type="Submit" NAME="DELETE" VALUE="Delete User"></TD>
    +00226 </TR>
    +00227 </FORM>
    +00228 </TABLE>
    +00229 </DIV>
     00230 
     00231 
     00232 
    @@ -243,12 +240,15 @@
     00234 
     00235 
     00236 
    -00237 <?
    -00238 html_page_stop();
    -00239 ?>
    -00240 
    -00241 
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00237 +00238 +00239 +00240 <? +00241 html_page_stop(); +00242 ?> +00243 +00244 +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/priv__user_8php.html b/doc/developper/html/priv__user_8php.html index 26edbc1db..bb6370030 100644 --- a/doc/developper/html/priv__user_8php.html +++ b/doc/developper/html/priv__user_8php.html @@ -4,10 +4,12 @@ - + -

    priv_user.php File Reference

    +

    priv_user.php File Reference

    Users Security. More... +

    +

    Go to the source code of this file. @@ -41,7 +43,12 @@
     $priv = GetPriv($rDossier['dos_id'],$login_name)
    -


    Variable Documentation

    +

    Detailed Description

    +Users Security. +

    + +

    +Definition in file priv_user.php.


    Variable Documentation

    @@ -64,7 +71,7 @@

    -Definition at line 82 of file priv_user.php. +Definition at line 85 of file priv_user.php.

    @@ -89,7 +96,7 @@ Definition at line 82

    -Definition at line 94 of file priv_user.php. +Definition at line 97 of file priv_user.php.

    @@ -114,7 +121,7 @@ Definition at line 94

    -Definition at line 181 of file priv_user.php. +Definition at line 184 of file priv_user.php.

    @@ -139,7 +146,7 @@ Definition at line 181

    -Definition at line 100 of file priv_user.php. +Definition at line 103 of file priv_user.php.

    @@ -164,7 +171,7 @@ Definition at line 100

    -Definition at line 74 of file priv_user.php. +Definition at line 77 of file priv_user.php.

    @@ -189,7 +196,7 @@ Definition at line 74

    -Definition at line 185 of file priv_user.php. +Definition at line 188 of file priv_user.php.

    @@ -214,9 +221,9 @@ Definition at line 185

    -Definition at line 186 of file priv_user.php. +Definition at line 189 of file priv_user.php.

    -Referenced by SyncRight(). +Referenced by SyncRight().

    @@ -241,7 +248,7 @@ Referenced by SyncRight()<

    -Definition at line 47 of file priv_user.php. +Definition at line 50 of file priv_user.php.

    @@ -266,7 +273,7 @@ Definition at line 47

    -Definition at line 28 of file priv_user.php. +Definition at line 31 of file priv_user.php.

    @@ -291,7 +298,7 @@ Definition at line 28

    -Definition at line 75 of file priv_user.php. +Definition at line 78 of file priv_user.php.

    @@ -319,7 +326,7 @@ Definition at line 75 use_id=".$uid

    -Definition at line 83 of file priv_user.php. +Definition at line 86 of file priv_user.php.

    @@ -344,7 +351,7 @@ Definition at line 83

    -Definition at line 44 of file priv_user.php. +Definition at line 47 of file priv_user.php.

    @@ -369,7 +376,7 @@ Definition at line 44

    -Definition at line 30 of file priv_user.php. +Definition at line 33 of file priv_user.php.

    @@ -394,10 +401,10 @@ Definition at line 30

    -Definition at line 35 of file priv_user.php. +Definition at line 38 of file priv_user.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/readme_8php-source.html b/doc/developper/html/readme_8php-source.html index 945177827..c0b7df696 100644 --- a/doc/developper/html/readme_8php-source.html +++ b/doc/developper/html/readme_8php-source.html @@ -4,7 +4,7 @@ - +

    readme.php

    Go to the documentation of this file.
    00001 <?php
    @@ -41,8 +41,8 @@
     00032 function rf($info){
     00033   // this callback records all of the table of contents entries, it also places a destination marker there
     00034   // so that it can be linked too
    -00035   $tmp = $info['p'];
    -00036   $lvl = $tmp[0];
    +00035   $tmp = $info['p'];
    +00036   $lvl = $tmp[0];
     00037   $lbl = rawurldecode(substr($tmp,1));
     00038   $num=$this->ezWhatPageNumber($this->ezGetCurrentPageNumber());
     00039   $this->reportContents[] = array($lbl,$num,$lvl );
    @@ -51,8 +51,8 @@
     00042 
     00043 function dots($info){
     00044   // draw a dotted line over to the right and put on a page number
    -00045   $tmp = $info['p'];
    -00046   $lvl = $tmp[0];
    +00045   $tmp = $info['p'];
    +00046   $lvl = $tmp[0];
     00047   $lbl = substr($tmp,1);
     00048   $xpos = 520;
     00049 
    @@ -170,16 +170,16 @@
     00161     $data[] = "2<".$v['t'].">\n";
     00162     // these are some VERY rough conversions, I am not recommending others do this
     00163     $s = array('<br>','<p>','<pre>','</pre>','<ul>','</ul>','<li>');
    -00164     $r = array("\n","\n\n","\n#C","\n#c","","","   - ");
    +00164     $r = array("\n","\n\n","\n#C","\n#c","","","   - ");
     00165     if (is_array($v['d'])){
    -00166       $tmp='';
    +00166       $tmp='';
     00167       foreach($v['d'] as $section){
    -00168         $tmp.=$section."\n\n";
    +00168         $tmp.=$section."\n\n";
     00169       }
     00170     } else {
    -00171       $tmp = $v['d'];
    +00171       $tmp = $v['d'];
     00172     }
    -00173     $tmp = str_replace($s,$r,$tmp);
    +00173     $tmp = str_replace($s,$r,$tmp);
     00174     $bits = explode("\n",$tmp);
     00175     foreach($bits as $bit){
     00176       $data[] = $bit."\n";
    @@ -236,15 +236,15 @@
     00227     // then this is a title
     00228     switch($line[0]){
     00229       case '1':
    -00230         $tmp = substr($line,2,strlen($line)-3);
    -00231         $tmp2 = $tmp.'<C:rf:1'.rawurlencode($tmp).'>';
    +00230         $tmp = substr($line,2,strlen($line)-3);
    +00231         $tmp2 = $tmp.'<C:rf:1'.rawurlencode($tmp).'>';
     00232         $pdf->ezText($tmp2,26,array('justification'=>'centre'));
     00233         break;
     00234       default:
    -00235         $tmp = substr($line,2,strlen($line)-3);
    +00235         $tmp = substr($line,2,strlen($line)-3);
     00236         // add a grey bar, highlighting the change
    -00237         $tmp2 = $tmp.'<C:rf:2'.rawurlencode($tmp).'>';
    -00238         $pdf->transaction('start');
    +00237         $tmp2 = $tmp.'<C:rf:2'.rawurlencode($tmp).'>';
    +00238         $pdf->transaction('start');
     00239         $ok=0;
     00240         while (!$ok){
     00241           $thisPageNum = $pdf->ezPageCount;
    @@ -303,7 +303,7 @@
     00294   $pdf->ezStream();
     00295 }
     00296 ?>
    -

    Generated on Wed May 31 21:39:14 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/readme_8php.html b/doc/developper/html/readme_8php.html index 01d327b27..a1372da2e 100644 --- a/doc/developper/html/readme_8php.html +++ b/doc/developper/html/readme_8php.html @@ -4,7 +4,7 @@ - +

    readme.php File Reference

    @@ -132,7 +132,7 @@

    Definition at line 112 of file readme.php.

    -References $h, $height, and $pdf. +References $h, $height, and $pdf.


    Variable Documentation

    @@ -312,7 +312,7 @@ Definition at line 273 o

    Definition at line 150 of file readme.php.

    -Referenced by FormAchView(), FormVenteView(), Cpdf::openFont(), and Cpdf::selectFont(). +Referenced by FormAchView(), FormVenteView(), Cpdf::openFont(), and Cpdf::selectFont().

    @@ -772,10 +772,12 @@ Definition at line 281 o

    -Definition at line 200 of file readme.php. +Definition at line 200 of file readme.php. +

    +Referenced by Document::Replace(). -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/recherche_8php-source.html b/doc/developper/html/recherche_8php-source.html index c97d5e95f..380763027 100644 --- a/doc/developper/html/recherche_8php-source.html +++ b/doc/developper/html/recherche_8php-source.html @@ -4,7 +4,7 @@ - +

    recherche.php

    Go to the documentation of this file.
    00001 <?
    @@ -33,56 +33,54 @@
     00024 include_once("jrn.php");
     00025 include_once("user_common.php");
     00026 include_once("class_widget.php");
    -00027 
    -00028 
    -00029 html_page_start($_SESSION['g_theme']);
    -00030 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00031   echo "You must choose a Dossier ";
    -00032   exit -2;
    -00033 }
    -00034 include_once ("postgres.php");
    -00035 include_once ("check_priv.php");
    -00036 /* Admin. Dossier */
    -00037 
    -00038 $cn=DbConnect($_SESSION['g_dossier']);
    -00039 include ('class_user.php');
    -00040 $User=new cl_user($cn);
    -00041 $User->Check();
    -00042 echo '<div class="u_tmenu">';
    -00043 echo ShowMenuCompta($_SESSION['g_dossier']);
    -00044 echo '</div>';
    -00045    // PhpSessid
    -00046    $sessid=$_REQUEST['PHPSESSID'];
    -00047 
    -00048 // display a search box
    -00049 $search_box=u_ShowMenuRecherche($cn,0,$sessid,$_GET);
    -00050 echo '<DIV class="lextmenu">'; // class="recherche_form">';
    -00051 echo $search_box;
    -00052 echo "</div>";
    -00054 // Display search result
    -00056 if ( isset ($_GET['viewsearch'])) {
    -00057   // Navigation bar
    -00058   $step=$_SESSION['g_pagesize'];
    -00059   $page=(isset($_GET['offset']))?$_GET['page']:1;
    -00060   $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    -00061   if (count ($_GET) == 0) 
    -00062     $array=null;
    -00063   else
    -00064      $array=$_GET;
    -00065   
    -00066   list($max_line,$a)=ListJrn($cn,0,"",$array,$offset,2);
    -00067   $bar=jrn_navigation_bar($offset,$max_line,$step,$page);
    -00068 
    -00069   echo '<div class="u_redcontent">';
    -00070   echo $bar;
    -00071   echo $a;
    -00072   echo $bar;
    -00073   echo '</div>';
    -00074 }
    -00075 echo '</DIV>'; 
    -00076  
    -00077 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00031 html_page_start($_SESSION['g_theme']); +00032 if ( ! isset ( $_SESSION['g_dossier'] ) ) { +00033 echo "You must choose a Dossier "; +00034 exit -2; +00035 } +00036 include_once ("postgres.php"); +00037 include_once ("check_priv.php"); +00038 /* Admin. Dossier */ +00039 +00040 $cn=DbConnect($_SESSION['g_dossier']); +00041 include ('class_user.php'); +00042 $User=new cl_user($cn); +00043 $User->Check(); +00044 echo '<div class="u_tmenu">'; +00045 echo ShowMenuCompta($_SESSION['g_dossier']); +00046 echo '</div>'; +00047 // PhpSessid +00048 $sessid=$_REQUEST['PHPSESSID']; +00049 +00050 // display a search box +00051 $search_box=u_ShowMenuRecherche($cn,0,$sessid,$_GET); +00052 echo '<DIV class="lextmenu">'; // class="recherche_form">'; +00053 echo $search_box; +00054 echo "</div>"; +00056 // Display search result +00058 if ( isset ($_GET['viewsearch'])) { +00059 // Navigation bar +00060 $step=$_SESSION['g_pagesize']; +00061 $page=(isset($_GET['offset']))?$_GET['page']:1; +00062 $offset=(isset($_GET['offset']))?$_GET['offset']:0; +00063 if (count ($_GET) == 0) +00064 $array=null; +00065 else +00066 $array=$_GET; +00067 +00068 list($max_line,$a)=ListJrn($cn,0,"",$array,$offset,2); +00069 $bar=jrn_navigation_bar($offset,$max_line,$step,$page); +00070 +00071 echo '<div class="u_redcontent">'; +00072 echo $bar; +00073 echo $a; +00074 echo $bar; +00075 echo '</div>'; +00076 } +00077 echo '</DIV>'; +00078 +00079 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/recherche_8php.html b/doc/developper/html/recherche_8php.html index d901e6cea..ae95a51f7 100644 --- a/doc/developper/html/recherche_8php.html +++ b/doc/developper/html/recherche_8php.html @@ -4,10 +4,12 @@ - + -

    recherche.php File Reference

    +

    recherche.php File Reference

    Search module. More... +

    +

    Go to the source code of this file. @@ -25,7 +27,12 @@
     $bar = jrn_navigation_bar($offset,$max_line,$step,$page)
    -


    Variable Documentation

    +

    Detailed Description

    +Search module. +

    + +

    +Definition in file recherche.php.


    Variable Documentation

    @@ -48,9 +55,9 @@

    -Definition at line 64 of file recherche.php. +Definition at line 66 of file recherche.php.

    -Referenced by fiche::blank(), Get_attr_def(), Get_attr_min(), Get_fiche_def_ref(), GetArray(), GetAvailableFolder(), GetDataForm(), GetDataGrpt(), GetDataJrn(), GetDataJrnJrId(), GetDataJrnPdf(), GetDataModele(), GetDataPoste(), cl_user::GetPeriode(), poste::GetRow(), jrn::GetRow(), Balance::GetRow(), jrn::GetRowSimple(), ImpHtml(), parm_code::LoadAll(), fiche_def_ref::LoadAll(), UpdateModele(), and ViewForm(). +Referenced by fiche::blank(), Get_attr_def(), Get_attr_min(), Get_fiche_def_ref(), GetArray(), GetAvailableFolder(), GetDataForm(), GetDataGrpt(), GetDataJrn(), GetDataJrnJrId(), GetDataJrnPdf(), GetDataModele(), GetDataPoste(), cl_user::GetPeriode(), poste::GetRow(), jrn::GetRow(), Balance::GetRow(), jrn::GetRowSimple(), ImpHtml(), parm_code::LoadAll(), fiche_def_ref::LoadAll(), UpdateModele(), and ViewForm().

    @@ -75,7 +82,7 @@ Referenced by fiche::b

    -Definition at line 67 of file recherche.php. +Definition at line 69 of file recherche.php.

    @@ -100,7 +107,7 @@ Definition at line 67

    -Definition at line 38 of file recherche.php. +Definition at line 40 of file recherche.php.

    @@ -125,7 +132,7 @@ Definition at line 38

    -Definition at line 49 of file recherche.php. +Definition at line 51 of file recherche.php.

    @@ -150,7 +157,7 @@ Definition at line 49

    -Definition at line 46 of file recherche.php. +Definition at line 48 of file recherche.php.

    @@ -175,10 +182,10 @@ Definition at line 46

    -Definition at line 40 of file recherche.php. +Definition at line 42 of file recherche.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/sec__pdf_8php-source.html b/doc/developper/html/sec__pdf_8php-source.html index f7801f211..44cae5eb9 100644 --- a/doc/developper/html/sec__pdf_8php-source.html +++ b/doc/developper/html/sec__pdf_8php-source.html @@ -4,7 +4,7 @@ - +

    sec_pdf.php

    Go to the documentation of this file.
    00001 <?
    @@ -29,111 +29,109 @@
     00020 // Copyright Stanislas Pinte stanpinte@sauvages.be
     00021 
     00022 // $Revision$
    -00023 
    -00024 
    -00025 if ( ! isset($_SESSION['g_dossier']) ) {
    -00026   echo "INVALID G_DOSSIER UNKNOWN !!! ";
    -00027   exit();
    -00028 }
    -00029 include_once("ac_common.php");
    -00030 include_once("postgres.php");
    -00031 include_once("class.ezpdf.php");
    -00032 require_once("check_priv.php");
    -00033 echo_debug('sec_pdf.php',__LINE__,"imp pdf securité");
    -00034 $cn=DbConnect($_SESSION['g_dossier']);
    -00036 // Security 
    -00037 
    -00038 // Check User
    -00039 $rep=DbConnect();
    -00040 include_once ("class_user.php");
    -00041 $User=new cl_user($rep);
    -00042 $User->Check();
    -00043 // Check Priv
    -00044 if ( $User->CheckAction($cn,SECU) == 0 ) {
    -00045   /* Cannot Access */
    -00046   NoAccess();
    -00047   exit -1;
    -00048  }
    -00050 // Get User's info
    -00051 if ( ! isset($_GET['user_id']) ) 
    -00052   return;
    -00053 
    -00054 $SecUser=new cl_user($rep,$_GET['user_id']);
    +00027 if ( ! isset($_SESSION['g_dossier']) ) {
    +00028   echo "INVALID G_DOSSIER UNKNOWN !!! ";
    +00029   exit();
    +00030 }
    +00031 include_once("ac_common.php");
    +00032 include_once("postgres.php");
    +00033 include_once("class.ezpdf.php");
    +00034 require_once("check_priv.php");
    +00035 echo_debug('sec_pdf.php',__LINE__,"imp pdf securité");
    +00036 $cn=DbConnect($_SESSION['g_dossier']);
    +00038 // Security 
    +00039 
    +00040 // Check User
    +00041 $rep=DbConnect();
    +00042 include_once ("class_user.php");
    +00043 $User=new cl_user($rep);
    +00044 $User->Check();
    +00045 // Check Priv
    +00046 if ( $User->CheckAction($cn,SECU) == 0 ) {
    +00047   /* Cannot Access */
    +00048   NoAccess();
    +00049   exit -1;
    +00050  }
    +00052 // Get User's info
    +00053 if ( ! isset($_GET['user_id']) ) 
    +00054   return;
     00055 
    -00056 
    -00058 // Print result
    -00059 
    -00060 $pdf=& new Cezpdf("A4");
    -00061 $pdf->selectFont('./addon/fonts/Helvetica.afm');
    -00062 $str_user=sprintf("( %d ) %s %s [ %s ]",
    -00063                   $SecUser->id,
    -00064                   $SecUser->first_name,
    -00065                   $SecUser->name,
    -00066                   $SecUser->login);
    -00067 
    -00068 $pdf->ezText($str_user,14,array('justification'=>'center'));
    +00056 $SecUser=new cl_user($rep,$_GET['user_id']);
    +00057 
    +00058 
    +00060 // Print result
    +00061 
    +00062 $pdf=& new Cezpdf("A4");
    +00063 $pdf->selectFont('./addon/fonts/Helvetica.afm');
    +00064 $str_user=sprintf("( %d ) %s %s [ %s ]",
    +00065                   $SecUser->id,
    +00066                   $SecUser->first_name,
    +00067                   $SecUser->name,
    +00068                   $SecUser->login);
     00069 
    -00070 if ( $SecUser->active==0)
    -00071   $pdf->ezText('Bloqué',12,array('justification'=>'center'));
    -00072 
    -00073 if ( $SecUser->admin==1)
    -00074   $pdf->ezText('Administrateur',12,array('justification'=>'center'));
    -00076 // Journal
    -00077 $Res=ExecSql($cn,"select jrn_def_id,jrn_def_name  from jrn_def ");
    -00078 for ($e=0;$e < pg_NumRows($Res);$e++) {
    -00079   $row=pg_fetch_array($Res,$e);
    -00080   $a_jrn[$e]['jrn_name']=$row['jrn_def_name'];
    -00081   $priv=CheckJrn($_SESSION['g_dossier'],$SecUser->login,$row['jrn_def_id']);
    -00082   switch($priv) {
    -00083   case 0:
    -00084     $a_jrn[$e]['priv']="pas d'accès";
    -00085     break;
    -00086   case 1:
    -00087     $a_jrn[$e]['priv']="lecture";
    -00088     break;
    -00089   case 2:
    -00090   case 3:
    -00091     $a_jrn[$e]['priv']="Ecriture";
    -00092     break;
    -00093   }
    -00094 
    -00095  }
    -00096 $pdf->ezTable($a_jrn,
    -00097                 array ('jrn_name'=>' Journal',
    -00098                        'priv'=>'Privilège')," ",
    -00099                 array('shaded'=>0,'showHeadings'=>1,'width'=>500));
    -00100 
    -00102 // Action
    -00103 $Res=ExecSql($cn,
    -00104              "select ac_id, ac_description from action   order by ac_description ");
    -00105 
    -00106 $Max=pg_NumRows($Res);
    +00070 $pdf->ezText($str_user,14,array('justification'=>'center'));
    +00071 
    +00072 if ( $SecUser->active==0)
    +00073   $pdf->ezText('Bloqué',12,array('justification'=>'center'));
    +00074 
    +00075 if ( $SecUser->admin==1)
    +00076   $pdf->ezText('Administrateur',12,array('justification'=>'center'));
    +00078 // Journal
    +00079 $Res=ExecSql($cn,"select jrn_def_id,jrn_def_name  from jrn_def ");
    +00080 for ($e=0;$e < pg_NumRows($Res);$e++) {
    +00081   $row=pg_fetch_array($Res,$e);
    +00082   $a_jrn[$e]['jrn_name']=$row['jrn_def_name'];
    +00083   $priv=CheckJrn($_SESSION['g_dossier'],$SecUser->login,$row['jrn_def_id']);
    +00084   switch($priv) {
    +00085   case 0:
    +00086     $a_jrn[$e]['priv']="pas d'accès";
    +00087     break;
    +00088   case 1:
    +00089     $a_jrn[$e]['priv']="lecture";
    +00090     break;
    +00091   case 2:
    +00092   case 3:
    +00093     $a_jrn[$e]['priv']="Ecriture";
    +00094     break;
    +00095   }
    +00096 
    +00097  }
    +00098 $pdf->ezTable($a_jrn,
    +00099                 array ('jrn_name'=>' Journal',
    +00100                        'priv'=>'Privilège')," ",
    +00101                 array('shaded'=>0,'showHeadings'=>1,'width'=>500));
    +00102 
    +00104 // Action
    +00105 $Res=ExecSql($cn,
    +00106              "select ac_id, ac_description from action   order by ac_description ");
     00107 
    -00108 for ( $i =0 ; $i < $Max; $i++ ) {
    -00109    $l_line=pg_fetch_array($Res,$i);
    -00110    $action['lib']=$l_line['ac_description'];
    -00111    $right=CheckAction($_SESSION['g_dossier'],$SecUser->login,$l_line['ac_id']);
    -00112    switch ($right) {
    -00113    case 0:
    -00114      $action['priv']="Pas d'accès";
    -00115      break;
    -00116    case 1:
    -00117    case 2:
    -00118      $action['priv']="Accès";
    -00119      break;
    -00120    }
    -00121    $a_action[$i]=$action;
    -00122  }
    -00123 $pdf->ezTable($a_action ,
    -00124                 array ('lib'=>'Description',
    -00125                        'priv'=>'Privilège')," ",
    -00126                 array('shaded'=>0,'showHeadings'=>1,'width'=>500));
    -00127 
    -00128 
    -00129 $pdf->ezStream();
    +00108 $Max=pg_NumRows($Res);
    +00109 
    +00110 for ( $i =0 ; $i < $Max; $i++ ) {
    +00111    $l_line=pg_fetch_array($Res,$i);
    +00112    $action['lib']=$l_line['ac_description'];
    +00113    $right=CheckAction($_SESSION['g_dossier'],$SecUser->login,$l_line['ac_id']);
    +00114    switch ($right) {
    +00115    case 0:
    +00116      $action['priv']="Pas d'accès";
    +00117      break;
    +00118    case 1:
    +00119    case 2:
    +00120      $action['priv']="Accès";
    +00121      break;
    +00122    }
    +00123    $a_action[$i]=$action;
    +00124  }
    +00125 $pdf->ezTable($a_action ,
    +00126                 array ('lib'=>'Description',
    +00127                        'priv'=>'Privilège')," ",
    +00128                 array('shaded'=>0,'showHeadings'=>1,'width'=>500));
    +00129 
     00130 
    -00131 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00131 $pdf->ezStream(); +00132 +00133 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/sec__pdf_8php.html b/doc/developper/html/sec__pdf_8php.html index 4ba717ee1..c49cffddf 100644 --- a/doc/developper/html/sec__pdf_8php.html +++ b/doc/developper/html/sec__pdf_8php.html @@ -4,10 +4,12 @@ - + -

    sec_pdf.php File Reference

    +

    sec_pdf.php File Reference

    Print the user security in pdf. More... +

    +

    Go to the source code of this file. @@ -33,7 +35,12 @@
     $priv = CheckJrn($_SESSION['g_dossier'],$SecUser->login,$row['jrn_def_id'])
    -


    Variable Documentation

    +

    Detailed Description

    +Print the user security in pdf. +

    + +

    +Definition in file sec_pdf.php.


    Variable Documentation

    @@ -56,7 +63,7 @@

    -Definition at line 80 of file sec_pdf.php. +Definition at line 82 of file sec_pdf.php.

    @@ -81,7 +88,7 @@ Definition at line 80

    -Definition at line 34 of file sec_pdf.php. +Definition at line 36 of file sec_pdf.php.

    @@ -106,7 +113,7 @@ Definition at line 34

    -Definition at line 60 of file sec_pdf.php. +Definition at line 62 of file sec_pdf.php.

    @@ -131,7 +138,7 @@ Definition at line 60

    -Definition at line 81 of file sec_pdf.php. +Definition at line 83 of file sec_pdf.php.

    @@ -156,7 +163,7 @@ Definition at line 81

    -Definition at line 39 of file sec_pdf.php. +Definition at line 41 of file sec_pdf.php.

    @@ -181,7 +188,7 @@ Definition at line 39

    -Definition at line 77 of file sec_pdf.php. +Definition at line 79 of file sec_pdf.php.

    @@ -206,7 +213,7 @@ Definition at line 77

    -Definition at line 54 of file sec_pdf.php. +Definition at line 56 of file sec_pdf.php.

    @@ -236,7 +243,7 @@ Definition at line 54 $SecUser->login)

    -Definition at line 62 of file sec_pdf.php. +Definition at line 64 of file sec_pdf.php.

    @@ -261,7 +268,7 @@ Definition at line 62

    -Definition at line 41 of file sec_pdf.php. +Definition at line 43 of file sec_pdf.php.

    @@ -286,10 +293,10 @@ Definition at line 41

    -Definition at line 47 of file sec_pdf.php. +Definition at line 49 of file sec_pdf.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/send__jrn__pdf_8php-source.html b/doc/developper/html/send__jrn__pdf_8php-source.html index 36729c6f7..d6a587305 100644 --- a/doc/developper/html/send__jrn__pdf_8php-source.html +++ b/doc/developper/html/send__jrn__pdf_8php-source.html @@ -4,7 +4,7 @@ - +

    send_jrn_pdf.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,136 +27,135 @@
     00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     00019 */
     00020 
    -00021 
    -00022 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00023 // $Revision$
    -00024 
    -00025 if ( ! isset($g_dossier) ) {
    -00026   echo "INVALID G_DOSSIER UNKNOWN !!! ";
    -00027   exit();
    -00028 }
    -00029 
    -00030 include_once("jrn.php");
    -00031 include_once("ac_common.php");
    -00032 include_once("postgres.php");
    -00033 include_once("class.ezpdf.php");
    -00034 include_once("impress_inc.php");
    -00035 include_once("preference.php");
    -00036 echo_debug('send_jrn_pdf.php',__LINE__,"imp pdf journaux");
    -00037 $l_Db=sprintf("dossier%d",$g_dossier);
    -00038 $cn=DbConnect($g_dossier);
    -00039 $l_type="JRN";
    -00040 $centr=" Non centralisé";
    -00041 $l_centr=0;
    -00042 if ( isset ($_POST['central']) ) {
    -00043   $centr=" centralisé ";
    -00044   $l_centr=1;
    -00045 }
    -00046 
    -00047 if ( $_GET["filter"] == YES) {
    -00048   $name_jrn=GetJrnName($cn,$_GET["p_id"]).$centr;
    -00049 } else {
    -00050   $name_jrn="Grand livre ".$centr;
    -00051 }
    -00052     $ret="";
    -00053     $pdf=& new Cezpdf("A4");
    -00054     $pdf->selectFont('./addon/fonts/Helvetica.afm');
    -00055 
    -00056 $offset=0;$limit=25;$step=25;
    -00057 $rap_deb=0;$rap_cred=0;
    -00058 while (1) {
    -00059   $a=0;
    -00060   list ($a_jrn,$tot_deb,$tot_cred)=GetDataJrnPdf($cn,$HTTP_GET_VARS,$limit,$offset);
    -00061   echo_debug('send_jrn_pdf.php',__LINE__,"Total debit $tot_deb,credit $tot_cred");
    -00062 
    -00063   if ( $a_jrn==null) break;
    -00064   $offset+=$step; 
    -00065   foreach ($a_jrn as $key=>$element) {
    -00066     echo_debug('send_jrn_pdf.php',__LINE__,"$key => $element");
    -00067     foreach ($element as $c1=>$c2) 
    -00068       echo_debug('send_jrn_pdf.php',__LINE__,"Array is $c1 => $c2");
    -00069   }
    -00070   $first_id=$a_jrn[0]['j_id'];
    -00071    $Exercice=GetExercice($cn,$a_jrn[0]['periode']);
    -00072 
    -00073 
    -00074   list($rap_deb,$rap_cred)=GetRappel($cn,$first_id,$_GET["p_id"],$Exercice,FIRST,
    -00075                                      $_GET['filter'],
    -00076                                      $l_centr
    -00077                                      );
    -00078   echo_debug('send_jrn_pdf.php',__LINE__,"MONTANT $rap_deb,$rap_cred");
    -00079   echo_debug('send_jrn_pdf.php',__LINE__,"  list($rap_deb,$rap_cred)=GetRappel($cn,$first_id,".$_GET["p_id"].",$Exercice,FIRST)");
    -00080   $pdf->ezText($name_jrn,30);
    -00081 
    -00082   if (  $l_centr == 1 ) {
    -00083     // si centralisé montre les montants de rappel
    -00084   $str_debit=sprintf( "report Débit  % 10.2f",$rap_deb);
    -00085   $str_credit=sprintf("report Crédit % 10.2f",$rap_cred);
    -00086   $pdf->ezText($str_debit,12,array('justification'=>'right'));
    -00087   $pdf->ezText($str_credit,12,array('justification'=>'right'));
    -00088   }
    -00089 
    -00090   $pdf->ezTable($a_jrn,
    -00091                 array ('internal'=>'Opération',
    -00092                        'j_date' => 'Date',
    -00093                        'poste'=>'Poste',
    -00094                        'description' => 'Description',
    -00095                        'deb_montant'=> 'Débit',
    -00096                        'cred_montant'=>'Crédit')," ",
    -00097                 array('shaded'=>0,'showHeadings'=>1,'width'=>500,
    -00098                       'cols'=>array('deb_montant'=> array('justification'=>'right'),
    -00099                       'cred_montant'=> array('justification'=>'right'))));
    -00100   $a=1;
    -00101   // Total Page
    -00102   $apage=array(array('deb'=>sprintf("%8.2f",$tot_deb),'cred'=>$tot_cred));
    -00103   foreach ($apage as $key=>$element) echo_debug('send_jrn_pdf.php',__LINE__,"apage $key => $element");
    -00104   $pdf->ezTable($apage,
    -00105                 array (
    -00106                        'deb'=> 'Total Débit',
    -00107                        'cred'=>'Total Crédit')," ",
    -00108                 array('shaded'=>0,'showHeadings'=>1,'width'=>200,
    -00109                       'xPos'=>'right','xOrientation'=>'left',
    -00110                       'cols'=>array('deb'=> array('justification'=>'right'),
    -00111                       'cred'=> array('justification'=>'right'))));
    -00112 
    -00113   $count=count($a_jrn)-1;
    -00114   $last_id=$a_jrn[$count]['j_id'];
    -00115   $Exercice=GetExercice($cn,$a_jrn[$count]['periode']);
    -00116   if ( $l_centr == 1) {
    -00117     // Montant de rappel si centralisé
    -00118     list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$_GET["p_id"],$Exercice,LAST,$_GET['filter'],$l_centr);
    -00119     $str_debit=sprintf( "à reporter Débit  % 10.2f",$rap_deb);
    -00120     $str_credit=sprintf("à reporter Crédit % 10.2f",$rap_cred);
    -00121     $pdf->ezText($str_debit,12,array('justification'=>'right'));
    -00122     $pdf->ezText($str_credit,12,array('justification'=>'right'));
    -00123   }
    -00124   //New page
    -00125   $pdf->ezNewPage();
    -00126 }    
    -00127 if ( $a == 1 )   {
    -00128   $apage=array('deb'=>$tot_deb,'cred'=>$tot_cred);
    -00129 $pdf->ezTable($apage,
    -00130                 array (
    -00131                        'deb'=> 'Total Débit',
    -00132                        'cred'=>'Total Crédit')," ",
    -00133                 array('shaded'=>0,'showHeadings'=>1,'width'=>500,
    -00134                       'cols'=>array('deb'=> array('justification'=>'right'),
    -00135                       'cred'=> array('justification'=>'right'))));
    -00136   $count=count($a_jrn)-1;
    -00137   $last_id=$a_jrn[$count]['j_id'];
    -00138   $Exercice=GetExercice($cn,$a_jrn[$count]['periode']);
    -00139 
    -00140   list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$_GET["p_id"],$Exercice,LAST,$l_GET['filter'],$l_centr);
    -00141   $str_debit=sprintf( "à reporter  Débit % 10.2f",$rap_deb);
    -00142   $str_credit=sprintf("à reporter Crédit % 10.2f",$rap_cred);
    -00143   $pdf->ezText($str_debit,12,array('justification'=>'right'));
    -00144   $pdf->ezText($str_credit,12,array('justification'=>'right'));
    -00145 
    -00146 }
    -00147 $pdf->ezStream();
    +00025 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    +00026 // $Revision$
    +00027 
    +00028 if ( ! isset($g_dossier) ) {
    +00029   echo "INVALID G_DOSSIER UNKNOWN !!! ";
    +00030   exit();
    +00031 }
    +00032 
    +00033 include_once("jrn.php");
    +00034 include_once("ac_common.php");
    +00035 include_once("postgres.php");
    +00036 include_once("class.ezpdf.php");
    +00037 include_once("impress_inc.php");
    +00038 include_once("preference.php");
    +00039 echo_debug('send_jrn_pdf.php',__LINE__,"imp pdf journaux");
    +00040 $l_Db=sprintf("dossier%d",$g_dossier);
    +00041 $cn=DbConnect($g_dossier);
    +00042 $l_type="JRN";
    +00043 $centr=" Non centralisé";
    +00044 $l_centr=0;
    +00045 if ( isset ($_POST['central']) ) {
    +00046   $centr=" centralisé ";
    +00047   $l_centr=1;
    +00048 }
    +00049 
    +00050 if ( $_GET["filter"] == YES) {
    +00051   $name_jrn=GetJrnName($cn,$_GET["p_id"]).$centr;
    +00052 } else {
    +00053   $name_jrn="Grand livre ".$centr;
    +00054 }
    +00055     $ret="";
    +00056     $pdf=& new Cezpdf("A4");
    +00057     $pdf->selectFont('./addon/fonts/Helvetica.afm');
    +00058 
    +00059 $offset=0;$limit=25;$step=25;
    +00060 $rap_deb=0;$rap_cred=0;
    +00061 while (1) {
    +00062   $a=0;
    +00063   list ($a_jrn,$tot_deb,$tot_cred)=GetDataJrnPdf($cn,$HTTP_GET_VARS,$limit,$offset);
    +00064   echo_debug('send_jrn_pdf.php',__LINE__,"Total debit $tot_deb,credit $tot_cred");
    +00065 
    +00066   if ( $a_jrn==null) break;
    +00067   $offset+=$step; 
    +00068   foreach ($a_jrn as $key=>$element) {
    +00069     echo_debug('send_jrn_pdf.php',__LINE__,"$key => $element");
    +00070     foreach ($element as $c1=>$c2) 
    +00071       echo_debug('send_jrn_pdf.php',__LINE__,"Array is $c1 => $c2");
    +00072   }
    +00073   $first_id=$a_jrn[0]['j_id'];
    +00074    $Exercice=GetExercice($cn,$a_jrn[0]['periode']);
    +00075 
    +00076 
    +00077   list($rap_deb,$rap_cred)=GetRappel($cn,$first_id,$_GET["p_id"],$Exercice,FIRST,
    +00078                                      $_GET['filter'],
    +00079                                      $l_centr
    +00080                                      );
    +00081   echo_debug('send_jrn_pdf.php',__LINE__,"MONTANT $rap_deb,$rap_cred");
    +00082   echo_debug('send_jrn_pdf.php',__LINE__,"  list($rap_deb,$rap_cred)=GetRappel($cn,$first_id,".$_GET["p_id"].",$Exercice,FIRST)");
    +00083   $pdf->ezText($name_jrn,30);
    +00084 
    +00085   if (  $l_centr == 1 ) {
    +00086     // si centralisé montre les montants de rappel
    +00087   $str_debit=sprintf( "report Débit  % 10.2f",$rap_deb);
    +00088   $str_credit=sprintf("report Crédit % 10.2f",$rap_cred);
    +00089   $pdf->ezText($str_debit,12,array('justification'=>'right'));
    +00090   $pdf->ezText($str_credit,12,array('justification'=>'right'));
    +00091   }
    +00092 
    +00093   $pdf->ezTable($a_jrn,
    +00094                 array ('internal'=>'Opération',
    +00095                        'j_date' => 'Date',
    +00096                        'poste'=>'Poste',
    +00097                        'description' => 'Description',
    +00098                        'deb_montant'=> 'Débit',
    +00099                        'cred_montant'=>'Crédit')," ",
    +00100                 array('shaded'=>0,'showHeadings'=>1,'width'=>500,
    +00101                       'cols'=>array('deb_montant'=> array('justification'=>'right'),
    +00102                       'cred_montant'=> array('justification'=>'right'))));
    +00103   $a=1;
    +00104   // Total Page
    +00105   $apage=array(array('deb'=>sprintf("%8.2f",$tot_deb),'cred'=>$tot_cred));
    +00106   foreach ($apage as $key=>$element) echo_debug('send_jrn_pdf.php',__LINE__,"apage $key => $element");
    +00107   $pdf->ezTable($apage,
    +00108                 array (
    +00109                        'deb'=> 'Total Débit',
    +00110                        'cred'=>'Total Crédit')," ",
    +00111                 array('shaded'=>0,'showHeadings'=>1,'width'=>200,
    +00112                       'xPos'=>'right','xOrientation'=>'left',
    +00113                       'cols'=>array('deb'=> array('justification'=>'right'),
    +00114                       'cred'=> array('justification'=>'right'))));
    +00115 
    +00116   $count=count($a_jrn)-1;
    +00117   $last_id=$a_jrn[$count]['j_id'];
    +00118   $Exercice=GetExercice($cn,$a_jrn[$count]['periode']);
    +00119   if ( $l_centr == 1) {
    +00120     // Montant de rappel si centralisé
    +00121     list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$_GET["p_id"],$Exercice,LAST,$_GET['filter'],$l_centr);
    +00122     $str_debit=sprintf( "à reporter Débit  % 10.2f",$rap_deb);
    +00123     $str_credit=sprintf("à reporter Crédit % 10.2f",$rap_cred);
    +00124     $pdf->ezText($str_debit,12,array('justification'=>'right'));
    +00125     $pdf->ezText($str_credit,12,array('justification'=>'right'));
    +00126   }
    +00127   //New page
    +00128   $pdf->ezNewPage();
    +00129 }    
    +00130 if ( $a == 1 )   {
    +00131   $apage=array('deb'=>$tot_deb,'cred'=>$tot_cred);
    +00132 $pdf->ezTable($apage,
    +00133                 array (
    +00134                        'deb'=> 'Total Débit',
    +00135                        'cred'=>'Total Crédit')," ",
    +00136                 array('shaded'=>0,'showHeadings'=>1,'width'=>500,
    +00137                       'cols'=>array('deb'=> array('justification'=>'right'),
    +00138                       'cred'=> array('justification'=>'right'))));
    +00139   $count=count($a_jrn)-1;
    +00140   $last_id=$a_jrn[$count]['j_id'];
    +00141   $Exercice=GetExercice($cn,$a_jrn[$count]['periode']);
    +00142 
    +00143   list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$_GET["p_id"],$Exercice,LAST,$l_GET['filter'],$l_centr);
    +00144   $str_debit=sprintf( "à reporter  Débit % 10.2f",$rap_deb);
    +00145   $str_credit=sprintf("à reporter Crédit % 10.2f",$rap_cred);
    +00146   $pdf->ezText($str_debit,12,array('justification'=>'right'));
    +00147   $pdf->ezText($str_credit,12,array('justification'=>'right'));
     00148 
    -00149 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00149 } +00150 $pdf->ezStream(); +00151 +00152 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/send__jrn__pdf_8php.html b/doc/developper/html/send__jrn__pdf_8php.html index 078666ecc..212c2f043 100644 --- a/doc/developper/html/send__jrn__pdf_8php.html +++ b/doc/developper/html/send__jrn__pdf_8php.html @@ -4,10 +4,12 @@ - + -

    send_jrn_pdf.php File Reference

    +

    send_jrn_pdf.php File Reference

    Print the ledger in pdf. More... +

    +

    Go to the source code of this file. @@ -49,7 +51,12 @@
     $str_debit = sprintf( "à reporter Débit % 10.2f",$rap_deb)
    -


    Variable Documentation

    +

    Detailed Description

    +Print the ledger in pdf. +

    + +

    +Definition in file send_jrn_pdf.php.


    Variable Documentation

    @@ -72,7 +79,7 @@

    -Definition at line 100 of file send_jrn_pdf.php. +Definition at line 103 of file send_jrn_pdf.php.

    @@ -97,7 +104,7 @@ Definition at line 1

    -Definition at line 102 of file send_jrn_pdf.php. +Definition at line 105 of file send_jrn_pdf.php.

    @@ -122,7 +129,7 @@ Definition at line 1

    -Definition at line 40 of file send_jrn_pdf.php. +Definition at line 43 of file send_jrn_pdf.php.

    @@ -147,7 +154,7 @@ Definition at line 4

    -Definition at line 38 of file send_jrn_pdf.php. +Definition at line 41 of file send_jrn_pdf.php.

    @@ -172,7 +179,7 @@ Definition at line 3

    -Definition at line 113 of file send_jrn_pdf.php. +Definition at line 116 of file send_jrn_pdf.php.

    @@ -197,7 +204,7 @@ Definition at line 1

    -Definition at line 115 of file send_jrn_pdf.php. +Definition at line 118 of file send_jrn_pdf.php.

    @@ -222,7 +229,7 @@ Definition at line 1

    -Definition at line 41 of file send_jrn_pdf.php. +Definition at line 44 of file send_jrn_pdf.php.

    @@ -247,7 +254,7 @@ Definition at line 4

    -Definition at line 37 of file send_jrn_pdf.php. +Definition at line 40 of file send_jrn_pdf.php.

    @@ -272,7 +279,7 @@ Definition at line 3

    -Definition at line 39 of file send_jrn_pdf.php. +Definition at line 42 of file send_jrn_pdf.php.

    @@ -297,7 +304,7 @@ Definition at line 3

    -Definition at line 114 of file send_jrn_pdf.php. +Definition at line 117 of file send_jrn_pdf.php.

    @@ -322,7 +329,7 @@ Definition at line 1

    -Definition at line 56 of file send_jrn_pdf.php. +Definition at line 59 of file send_jrn_pdf.php.

    @@ -347,7 +354,7 @@ Definition at line 5

    -Definition at line 56 of file send_jrn_pdf.php. +Definition at line 59 of file send_jrn_pdf.php.

    @@ -372,7 +379,7 @@ Definition at line 5

    -Definition at line 53 of file send_jrn_pdf.php. +Definition at line 56 of file send_jrn_pdf.php.

    @@ -397,7 +404,7 @@ Definition at line 5

    -Definition at line 57 of file send_jrn_pdf.php. +Definition at line 60 of file send_jrn_pdf.php.

    @@ -422,7 +429,7 @@ Definition at line 5

    -Definition at line 57 of file send_jrn_pdf.php. +Definition at line 60 of file send_jrn_pdf.php.

    @@ -447,7 +454,7 @@ Definition at line 5

    -Definition at line 56 of file send_jrn_pdf.php. +Definition at line 59 of file send_jrn_pdf.php.

    @@ -472,7 +479,7 @@ Definition at line 5

    -Definition at line 85 of file send_jrn_pdf.php. +Definition at line 88 of file send_jrn_pdf.php.

    @@ -497,10 +504,10 @@ Definition at line 8

    -Definition at line 119 of file send_jrn_pdf.php. +Definition at line 122 of file send_jrn_pdf.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/send__poste__pdf_8php-source.html b/doc/developper/html/send__poste__pdf_8php-source.html index 03b2a2cc4..5f13261ed 100644 --- a/doc/developper/html/send__poste__pdf_8php-source.html +++ b/doc/developper/html/send__poste__pdf_8php-source.html @@ -4,7 +4,7 @@ - +

    send_poste_pdf.php

    Go to the documentation of this file.
    00001 <?
    @@ -26,82 +26,81 @@
     00017  *   along with PhpCompta; if not, write to the Free Software
     00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     00019 */
    -00020 
    -00021 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00022 // $Revision$
    -00023 
    -00024     include_once("jrn.php");
    -00025     include_once("ac_common.php");
    -00026     include_once("postgres.php");
    -00027     include_once("class.ezpdf.php");
    -00028     include_once("impress_inc.php");
    -00029 include("poste.php");
    -00030     echo_debug('send_poste_pdf.php',__LINE__,"imp pdf journaux");
    -00031     $cn=DbConnect($g_dossier);
    -00032 foreach ($HTTP_POST_VARS as $key=>$element) {
    -00033   ${"$key"}=$element;
    -00034 }
    -00035 if ( isset ( $all_poste) ){ //choisit de voir tous les postes
    -00036   $r_poste=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val = any ".
    -00037                    " (select j_poste from jrnx) order by pcm_val::text");
    -00038   $nPoste=pg_numRows($r_poste);
    -00039   for ( $i=0;$i<$nPoste;$i++) {
    -00040     $t_poste=pg_fetch_array($r_poste,$i);
    -00041     $poste[]=$t_poste['pcm_val'];
    -00042   } 
    -00043 }      
    -00044 
    -00045 
    -00046     $ret="";
    -00047     $pdf=& new Cezpdf();
    -00048     $pdf->selectFont('./addon/fonts/Helvetica.afm');
    -00049 $cond=CreatePeriodeCond($periode);
    -00050 //$rap_deb=0;$rap_cred=0;
    -00051 for ( $i =0;$i<count($poste);$i++) {
    -00052   
    -00053     list($array,$tot_deb,$tot_cred)=GetDataPoste($cn,$poste[$i],$cond);
    -00054     // don't print empty account
    -00055     if ( count($array) == 0 ) {
    -00056     continue;
    -00057     }
    -00058     $Libelle=sprintf("(%s) %s ",$poste[$i],GetPosteLibelle($cn,$poste[$i],1));
    -00059     
    -00060     //  $pdf->ezText($Libelle,30);
    -00061     $pdf->ezTable($array,
    -00062                   array ('jr_internal'=>'Opération',
    -00063                        'j_date' => 'Date',
    -00064                        'jrn_name'=>'Journal',
    -00065                          'description'=>'Description',
    -00066                        'deb_montant'=> 'Montant',
    -00067                        'cred_montant'=> 'Montant'
    -00068                        ),$Libelle,
    -00069                 array('shaded'=>0,'showHeadings'=>1,'width'=>500,
    -00070                       'cols'=>array('montant'=> array('justification'=>'right'),
    -00071                                     )));
    -00072 $str_debit=sprintf("Débit  % 12.2f",$tot_deb);
    -00073 $str_cred=sprintf("Crédit % 12.2f",$tot_cred);
    -00074 $diff_solde=$tot_deb-$tot_cred;
    -00075 if ( $diff_solde < 0 ) {
    -00076         $solde=" C ";
    -00077         $diff_solde*=-1;
    -00078         } else 
    -00079         {
    -00080         $solde=" D ";
    -00081         }
    -00082 $str_solde=sprintf(" Solde %s %12.2f",$solde,$diff_solde);
    -00083 
    -00084  $pdf->ezText($str_debit,10,array('justification'=>'right'));
    -00085  $pdf->ezText($str_cred,10,array('justification'=>'right'));
    -00086  $pdf->ezText($str_solde,14,array('justification'=>'right'));
    -00087 
    -00088   //New page
    -00089   //$pdf->ezNewPage();
    -00090 }    
    -00091 
    -00092 $pdf->ezStream();
    -00093 
    -00094 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00024 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +00025 // $Revision$ +00026 +00027 include_once("jrn.php"); +00028 include_once("ac_common.php"); +00029 include_once("postgres.php"); +00030 include_once("class.ezpdf.php"); +00031 include_once("impress_inc.php"); +00032 include("poste.php"); +00033 echo_debug('send_poste_pdf.php',__LINE__,"imp pdf journaux"); +00034 $cn=DbConnect($g_dossier); +00035 foreach ($HTTP_POST_VARS as $key=>$element) { +00036 ${"$key"}=$element; +00037 } +00038 if ( isset ( $all_poste) ){ //choisit de voir tous les postes +00039 $r_poste=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val = any ". +00040 " (select j_poste from jrnx) order by pcm_val::text"); +00041 $nPoste=pg_numRows($r_poste); +00042 for ( $i=0;$i<$nPoste;$i++) { +00043 $t_poste=pg_fetch_array($r_poste,$i); +00044 $poste[]=$t_poste['pcm_val']; +00045 } +00046 } +00047 +00048 +00049 $ret=""; +00050 $pdf=& new Cezpdf(); +00051 $pdf->selectFont('./addon/fonts/Helvetica.afm'); +00052 $cond=CreatePeriodeCond($periode); +00053 //$rap_deb=0;$rap_cred=0; +00054 for ( $i =0;$i<count($poste);$i++) { +00055 +00056 list($array,$tot_deb,$tot_cred)=GetDataPoste($cn,$poste[$i],$cond); +00057 // don't print empty account +00058 if ( count($array) == 0 ) { +00059 continue; +00060 } +00061 $Libelle=sprintf("(%s) %s ",$poste[$i],GetPosteLibelle($cn,$poste[$i],1)); +00062 +00063 // $pdf->ezText($Libelle,30); +00064 $pdf->ezTable($array, +00065 array ('jr_internal'=>'Opération', +00066 'j_date' => 'Date', +00067 'jrn_name'=>'Journal', +00068 'description'=>'Description', +00069 'deb_montant'=> 'Montant', +00070 'cred_montant'=> 'Montant' +00071 ),$Libelle, +00072 array('shaded'=>0,'showHeadings'=>1,'width'=>500, +00073 'cols'=>array('montant'=> array('justification'=>'right'), +00074 ))); +00075 $str_debit=sprintf("Débit % 12.2f",$tot_deb); +00076 $str_cred=sprintf("Crédit % 12.2f",$tot_cred); +00077 $diff_solde=$tot_deb-$tot_cred; +00078 if ( $diff_solde < 0 ) { +00079 $solde=" C "; +00080 $diff_solde*=-1; +00081 } else +00082 { +00083 $solde=" D "; +00084 } +00085 $str_solde=sprintf(" Solde %s %12.2f",$solde,$diff_solde); +00086 +00087 $pdf->ezText($str_debit,10,array('justification'=>'right')); +00088 $pdf->ezText($str_cred,10,array('justification'=>'right')); +00089 $pdf->ezText($str_solde,14,array('justification'=>'right')); +00090 +00091 //New page +00092 //$pdf->ezNewPage(); +00093 } +00094 +00095 $pdf->ezStream(); +00096 +00097 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/send__poste__pdf_8php.html b/doc/developper/html/send__poste__pdf_8php.html index 51ac715c6..59d78448d 100644 --- a/doc/developper/html/send__poste__pdf_8php.html +++ b/doc/developper/html/send__poste__pdf_8php.html @@ -4,10 +4,12 @@ - + -

    send_poste_pdf.php File Reference

    +

    send_poste_pdf.php File Reference

    Print the account in pdf. More... +

    +

    Go to the source code of this file. @@ -31,7 +33,12 @@
     $diff_solde = $tot_deb-$tot_cred
    -


    Variable Documentation

    +

    Detailed Description

    +Print the account in pdf. +

    + +

    +Definition in file send_poste_pdf.php.


    Variable Documentation

    @@ -54,7 +61,7 @@

    -Definition at line 31 of file send_poste_pdf.php. +Definition at line 34 of file send_poste_pdf.php.

    @@ -79,7 +86,7 @@ Definition at line

    -Definition at line 49 of file send_poste_pdf.php. +Definition at line 52 of file send_poste_pdf.php.

    Referenced by CreatePeriodeCond(), GetDataGrpt(), GetDataJrn(), GetDataJrnPdf(), ImpHtml(), and ParseFormula(). @@ -106,7 +113,7 @@ Referenced by CreatePe

    -Definition at line 74 of file send_poste_pdf.php. +Definition at line 77 of file send_poste_pdf.php.

    @@ -131,7 +138,7 @@ Definition at line

    -Definition at line 38 of file send_poste_pdf.php. +Definition at line 41 of file send_poste_pdf.php.

    Referenced by ImpHtml(). @@ -158,7 +165,7 @@ Referenced by ImpHtml(

    -Definition at line 47 of file send_poste_pdf.php. +Definition at line 50 of file send_poste_pdf.php.

    @@ -183,9 +190,9 @@ Definition at line

    -Definition at line 41 of file send_poste_pdf.php. +Definition at line 44 of file send_poste_pdf.php.

    -Referenced by form_verify_input(), ImpHtml(), parm_code::Input(), RecordFin(), RecordInvoice(), RecordJrn(), and RecordSell(). +Referenced by form_verify_input(), ImpHtml(), parm_code::Input(), RecordFin(), RecordInvoice(), RecordJrn(), and RecordSell().

    @@ -210,7 +217,7 @@ Referenced by form_

    -Definition at line 46 of file send_poste_pdf.php. +Definition at line 49 of file send_poste_pdf.php.

    @@ -235,7 +242,7 @@ Definition at line

    -Definition at line 73 of file send_poste_pdf.php. +Definition at line 76 of file send_poste_pdf.php.

    @@ -260,10 +267,10 @@ Definition at line

    -Definition at line 72 of file send_poste_pdf.php. +Definition at line 75 of file send_poste_pdf.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/setup_8php-source.html b/doc/developper/html/setup_8php-source.html index 4a54986ab..ace4191f7 100644 --- a/doc/developper/html/setup_8php-source.html +++ b/doc/developper/html/setup_8php-source.html @@ -4,7 +4,7 @@ - +

    setup.php

    Go to the documentation of this file.
    00001 
    @@ -105,7 +105,7 @@
     00096  */
     00097 function ExecuteScript($p_cn,$script) {
     00098   $hf=fopen($script,'r');
    -00099   $sql="";
    +00099   $sql="";
     00100   $flag_function=false;
     00101   while (!feof($hf)) {
     00102     $buffer=fgets($hf);
    @@ -124,37 +124,37 @@
     00115     if ( strpos(strtolower($buffer),"create function")===0 ) {
     00116             echo "found a function";
     00117             $flag_function=true;
    -00118             $sql=$buffer;
    +00118             $sql=$buffer;
     00119             continue;
     00120     }
     00121  if ( strpos(strtolower($buffer),"create or replace function")===0 ) {
     00122             echo "found a function";
     00123             $flag_function=true;
    -00124             $sql=$buffer;
    +00124             $sql=$buffer;
     00125             continue;
     00126     }
     00127     // No semi colon -> multiline command
     00128     if ( $flag_function== false && strpos($buffer,';') == false ) {
    -00129       $sql.=$buffer;
    +00129       $sql.=$buffer;
     00130       continue;
     00131     } 
     00132     if ( $flag_function ) {
     00133       if ( strpos(strtolower($buffer), "language plpgsql") === false ) {
    -00134                 $sql.=$buffer;
    +00134                 $sql.=$buffer;
     00135                 continue;
     00136             }
     00137     } else  {
     00138             // cut the semi colon
     00139             $buffer=str_replace (';','',$buffer);
     00140             }
    -00141     $sql.=$buffer;
    +00141     $sql.=$buffer;
     00142     if ( ExecSql($p_cn,$sql) == false ) {
     00143             Rollback($p_cn);
     00144             if ( DEBUG=='false' ) ob_end_flush();
     00145             print "ERROR : $sql";
     00146             exit();
     00147             }
    -00148     $sql="";
    +00148     $sql="";
     00149     $flag_function=false;
     00150     print "<hr>";
     00151   } // while (feof)
    @@ -225,7 +225,7 @@
     00216 <?
     00217  // Verify Psql version
     00218  //--
    -00219 $sql="select setting from pg_settings where name='server_version'";
    +00219 $sql="select setting from pg_settings where name='server_version'";
     00220 $Res=ExecSql($cn,$sql);
     00221 $row=pg_fetch_array($Res,0);
     00222 $version=$row[0];
    @@ -296,7 +296,7 @@
     00287  }
     00288 if ( ! isset($_POST['go']) ) {
     00289 ?>
    -00290 <FORM action="setup.php" METHOD="post">
    +00290 <FORM action="setup.php" METHOD="post">
     00291 <input type="submit" name="go" value="Prêt à commencer la mise à jour ou l'installation?">
     00292 </form>
     00293 <?
    @@ -517,7 +517,7 @@
     00508  }
     00509 if (DEBUG=='false') ob_end_clean();
     00510 echo "<h2 class=\"info\">Voilà tout est installé ;-)</h2>";
    -

    Generated on Wed May 31 21:39:14 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/setup_8php.html b/doc/developper/html/setup_8php.html index 293f6bd53..4ca3148be 100644 --- a/doc/developper/html/setup_8php.html +++ b/doc/developper/html/setup_8php.html @@ -4,7 +4,7 @@ - +

    setup.php File Reference

    @@ -87,7 +87,7 @@

    Definition at line 97 of file setup.php.

    -References $sql, ExecSql(), exit, print, and Rollback(). +References $sql, ExecSql(), exit, print, and Rollback().

    @@ -119,7 +119,7 @@ References $sql

    Definition at line 80 of file setup.php.

    -References $a, $Res, and ExecSql(). +References $a, $Res, and ExecSql().


    Variable Documentation

    @@ -197,7 +197,7 @@ Definition at line 360 of

    Definition at line 366 of file setup.php.

    -Referenced by ViewJrn(). +Referenced by ViewJrn().

    @@ -224,7 +224,7 @@ Referenced by ViewJrn().

    Definition at line 255 of file setup.php.

    -Referenced by AddFiche(), ComputeTotalVat(), FormFin(), FormODS(), and fiche::getAttribut(). +Referenced by AddFiche(), ComputeTotalVat(), FormFin(), FormODS(), and fiche::getAttribut().

    @@ -301,7 +301,7 @@ Definition at line 56 of

    Definition at line 408 of file setup.php.

    -Referenced by DisplayDetailModele(), and Balance::GetRow(). +Referenced by DisplayDetailModele(), and Balance::GetRow().

    @@ -328,7 +328,7 @@ Referenced by DisplayDet

    Definition at line 374 of file setup.php.

    -Referenced by EncodeFiche(), FormPeriode(), FormPeriodeMult(), Get_fiche_def_ref(), fiche::getAttribut(), GetDataForm(), GetDataGrpt(), GetDataJrn(), GetDataJrnPdf(), GetDataModele(), GetDataPoste(), GetFicheJrn(), cl_user::GetGlobalPref(), GetJrnName(), jrn::GetName(), GetNextFiche(), rapport::GetRow(), poste::GetRow(), jrn::GetRow(), GetSolde(), poste::GetSolde(), poste::GetSoldeDetail(), ImpHtml(), IsFicheOfJrn(), ListJrn(), MenuJrn(), new_fiche(), PosteForm(), ShowDevise(), ShowDossier(), ShowMenuComptaForm(), ShowMenuFiche(), ShowMenuJrnUser(), ShowPeriode(), TransferCSV(), and ViewFiche(). +Referenced by EncodeFiche(), FormPeriode(), FormPeriodeMult(), Get_fiche_def_ref(), fiche::getAttribut(), GetDataForm(), GetDataGrpt(), GetDataJrn(), GetDataJrnPdf(), GetDataModele(), GetDataPoste(), GetFicheJrn(), cl_user::GetGlobalPref(), GetJrnName(), jrn::GetName(), GetNextFiche(), rapport::GetRow(), poste::GetRow(), jrn::GetRow(), GetSolde(), poste::GetSolde(), poste::GetSoldeDetail(), ImpHtml(), IsFicheOfJrn(), ListJrn(), MenuJrn(), new_fiche(), PosteForm(), ShowDevise(), ShowDossier(), ShowMenuComptaForm(), ShowMenuFiche(), ShowMenuJrnUser(), ShowPeriode(), TransferCSV(), and ViewFiche().

    @@ -430,7 +430,7 @@ Definition at line 239 of

    Definition at line 403 of file setup.php.

    -Referenced by Centralise(), CheckJrn(), TransferCSV(), and Customer::VatListing(). +Referenced by Centralise(), CheckJrn(), TransferCSV(), and Customer::VatListing().

    @@ -508,7 +508,7 @@ Definition at line 238 of Definition at line 355 of file setup.php. -


    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/show__document_8php-source.html b/doc/developper/html/show__document_8php-source.html index deecc249e..652902f71 100644 --- a/doc/developper/html/show__document_8php-source.html +++ b/doc/developper/html/show__document_8php-source.html @@ -4,7 +4,7 @@ - +

    show_document.php

    Go to the documentation of this file.
    00001 <?
    @@ -28,63 +28,20 @@
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00021 // Verify parameters
    -00022 include_once ("ac_common.php");
    -00023 if ( !isset ($_GET['jrn'] ) ||
    -00024      !isset($_GET['jr_grpt_id'])) {
    -00025         echo_error("Missing parameters");
    -00026 }
    -00027 
    -00028 include_once ("postgres.php");
    +00026 include_once ("postgres.php");
    +00027 require_once("ac_common.php");
    +00028 require_once( "class_document.php");
     00029 
    -00030 
    -00031 $jr_grpt_id=$_GET['jr_grpt_id'];
    +00030 $cn=DbConnect($_SESSION['g_dossier']);
    +00031 
     00032 
    -00033 $cn=DbConnect($_SESSION['g_dossier']);
    -00034 
    -00035 
    -00036 include ('class_user.php');
    -00037 $User=new cl_user(DbConnect());
    -00038 $User->Check();
    -00039 // retrieve the jrn
    -00040 $r=ExecSql($cn,"select jr_def_id from jrn where jr_grpt_id=$jr_grpt_id");
    -00041 if ( pg_num_rows($r) == 0 ) {
    -00042   echo_error("Invalid operation id jr_grpt_id=$jr_grpt_id");
    -00043   exit;
    -00044  }
    -00045 $a=pg_fetch_array($r,0);
    -00046 $jrn=$a['jr_def_id'];
    -00047 
    -00048 if ($User->AccessJrn($cn,$jrn) == false ){
    -00049   /* Cannot Access */
    -00050   NoAccess();
    -00051   exit -1;
    -00052  }
    -00053 
    -00054 StartSql($cn);
    -00055 $ret=ExecSql($cn,"select jr_pj,jr_pj_name,jr_pj_type from jrn where jr_grpt_id=$jr_grpt_id");
    -00056 if ( pg_num_rows ($ret) == 0 )
    -00057         return;
    -00058 $row=pg_fetch_array($ret,0);
    -00059 $tmp=tempnam('/tmp/','document_');
    -00060 pg_lo_export($cn,$row['jr_pj'],$tmp);
    -00061 ini_set('zlib.output_compression','Off');
    -00062 header("Pragma: public");
    -00063 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    -00064 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    -00065 header("Cache-Control: must-revalidate");
    -00066 header('Content-type: '.$row['jr_pj_type']);
    -00067 header('Content-Disposition: attachment;filename="'.$row['jr_pj_name'].'"',FALSE);
    -00068 header("Accept-Ranges: bytes");
    -00069 $file=fopen($tmp,'r');
    -00070 while ( !feof ($file) )
    -00071         echo fread($file,8192);
    -00072 
    -00073 fclose($file);
    -00074 
    -00075 unlink ($tmp);
    -00076 
    -00077 Commit($cn);
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00033 include ('class_user.php'); +00034 $User=new cl_user(DbConnect()); +00037 $User->Check(); +00038 // retrieve the document +00039 $doc=new Document($cn,$_REQUEST['d_id']); +00040 $doc->Get(); +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/show__document_8php.html b/doc/developper/html/show__document_8php.html index cf1962ab0..de5d2024c 100644 --- a/doc/developper/html/show__document_8php.html +++ b/doc/developper/html/show__document_8php.html @@ -4,64 +4,30 @@ - + -

    show_document.php File Reference

    +

    show_document.php File Reference

    retrieve a document More... +

    +

    Go to the source code of this file. - + - + - - - - - - - - - - - - - - - - - +

    Variables

     $jr_grpt_id = $_GET['jr_grpt_id']
     $cn = DbConnect($_SESSION['g_dossier'])
     $cn = DbConnect($_SESSION['g_dossier'])
     $User = new cl_user(DbConnect())
     $User = new cl_user(DbConnect())
     $r = ExecSql($cn,"select jr_def_id from jrn where jr_grpt_id=$jr_grpt_id")
     exit
     $a = pg_fetch_array($r,0)
     $jrn = $a['jr_def_id']
     $ret = ExecSql($cn,"select jr_pj,jr_pj_name,jr_pj_type from jrn where jr_grpt_id=$jr_grpt_id")
     $row = pg_fetch_array($ret,0)
     $tmp = tempnam('/tmp/','document_')
     $file = fopen($tmp,'r')
     $doc = new Document($cn,$_REQUEST['d_id'])
    -


    Variable Documentation

    -

    - - - - -
    - - - - -
    $a = pg_fetch_array($r,0)
    -
    - - - - - -
    -   - - +

    Detailed Description

    +retrieve a document

    -Definition at line 45 of file show_document.php.

    -

    +Definition in file show_document.php.


    Variable Documentation

    +

    +Definition at line 30 of file show_document.php.
    @@ -83,16 +49,16 @@ Definition at line 4

    -Definition at line 33 of file show_document.php.

    -

    +

    @@ -108,166 +74,10 @@ Definition at line 3

    -Definition at line 69 of file show_document.php. -

    -Referenced by FormAchView(), FormFin(), FormVenteView(), Invoice::Get(), Document_modele::Get(), Cpdf::openFont(), and UpdateJrn(). +Definition at line 39 of file show_document.php.

    - +
    $file = fopen($tmp,'r') $doc = new Document($cn,$_REQUEST['d_id'])
    -

    - - - - -
    - - - - -
    $jr_grpt_id = $_GET['jr_grpt_id']
    -
    - - - - - -
    -   - - -

    - -

    -Definition at line 31 of file show_document.php.

    -

    - - - - -
    - - - - -
    $jrn = $a['jr_def_id']
    -
    - - - - - -
    -   - - -

    - -

    -Definition at line 46 of file show_document.php. -

    -Referenced by jrn::GetRowSimple(), ShowFormTransfert(), and TransferCSV().

    -

    - - - - -
    - - - - -
    $r = ExecSql($cn,"select jr_def_id from jrn where jr_grpt_id=$jr_grpt_id")
    -
    - - - - - -
    -   - - -

    - -

    -Definition at line 40 of file show_document.php.

    -

    - - - - -
    - - - - -
    $ret = ExecSql($cn,"select jr_pj,jr_pj_name,jr_pj_type from jrn where jr_grpt_id=$jr_grpt_id")
    -
    - - - - - -
    -   - - -

    - -

    -Definition at line 55 of file show_document.php.

    -

    - - - - -
    - - - - -
    $row = pg_fetch_array($ret,0)
    -
    - - - - - -
    -   - - -

    - -

    -Definition at line 58 of file show_document.php.

    -

    - - - - -
    - - - - -
    $tmp = tempnam('/tmp/','document_')
    -
    - - - - - -
    -   - - -

    - -

    -Definition at line 59 of file show_document.php. -

    -Referenced by Creport::dots(), Cpdf::ellipse(), Cpdf::encryptInit(), Cezpdf::ezPRVTaddPageNumbers(), Invoice::Get(), Document_modele::Get(), Cpdf::md5_16(), Cpdf::o_contents(), Cpdf::o_destination(), Cpdf::o_encryption(), Cpdf::o_image(), Cpdf::o_pages(), Cpdf::openFont(), Cpdf::output(), Creport::rf(), Cpdf::selectFont(), Cpdf::stream(), and fiche::update().

    -

    +

    +Definition at line 34 of file show_document.php.
    @@ -289,35 +99,10 @@ Referenced by Creport::dots(

    -Definition at line 37 of file show_document.php.

    -

    - - - - -
    - - - - -
    exit
    -
    - - - - - -
    -   - - -

    - -

    -Definition at line 43 of file show_document.php.

    -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/show__tva_8php-source.html b/doc/developper/html/show__tva_8php-source.html index 7b32f751a..6d7bc6454 100644 --- a/doc/developper/html/show__tva_8php-source.html +++ b/doc/developper/html/show__tva_8php-source.html @@ -4,7 +4,7 @@ - +

    show_tva.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,53 +27,52 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 
    -00022 include_once ("ac_common.php");
    -00023 include_once ("postgres.php");
    -00024 /* Admin. Dossier */
    -00025 $rep=DbConnect();
    -00026 include_once ("class_user.php");
    -00027 $User=new cl_user($rep);
    -00028 $User->Check();
    -00029 
    -00030 html_page_start($User->theme,"onLoad='window.focus();'");
    -00031 
    -00032 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00033   echo "You must choose a Dossier ";
    -00034   phpinfo();
    -00035   exit -2;
    -00036 }
    -00037 ?>
    -00038 <script>
    -00039 function GetIt(ctl,tva_id) {
    -00040            self.opener.SetValue(ctl,tva_id)
    -00041            window.close();      
    -00042         } 
    -00043 </script>
    -00044 <?
    -00045 
    -00046 $condition="";
    -00047 $cn=DbConnect($_SESSION['g_dossier']);
    -00048 $Res=ExecSql($cn,"select * from tva_rate order by tva_rate desc");
    -00049 $Max=pg_NumRows($Res);
    -00050 echo "<TABLE BORDER=\"1\">";
    -00051 for ($i=0;$i<$Max;$i++) {
    -00052   $row=pg_fetch_array($Res,$i);
    -00053   $set=sprintf( '<INPUT TYPE="BUTTON" Value="select" onClick="GetIt(\'%s\',\'%s\');">',
    -00054              $_GET['ctl'],$row['tva_id']);
    -00055   printf("<tr><TD BGCOLOR=\LIGHTGREEN\" >%s %d</TD><TD>%s</TD><TD>%s</TD></TR>",
    -00056          $set,
    -00057          $row['tva_id'],
    -00058          $row['tva_label'],
    -00059          $row['tva_comment']);
    -00060 }
    -00061 echo '</TABLE>';
    -00062 ?>
    -00063 <input type='button' Value="fermer" onClick='window.close();'>
    -00064 <?
    -00065 html_page_stop();
    -00066 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00025 include_once ("ac_common.php"); +00026 include_once ("postgres.php"); +00027 /* Admin. Dossier */ +00028 $rep=DbConnect(); +00029 include_once ("class_user.php"); +00030 $User=new cl_user($rep); +00031 $User->Check(); +00032 +00033 html_page_start($User->theme,"onLoad='window.focus();'"); +00034 +00035 if ( ! isset ( $_SESSION['g_dossier'] ) ) { +00036 echo "You must choose a Dossier "; +00037 phpinfo(); +00038 exit -2; +00039 } +00040 ?> +00041 <script> +00042 function GetIt(ctl,tva_id) { +00043 self.opener.SetValue(ctl,tva_id) +00044 window.close(); +00045 } +00046 </script> +00047 <? +00048 +00049 $condition=""; +00050 $cn=DbConnect($_SESSION['g_dossier']); +00051 $Res=ExecSql($cn,"select * from tva_rate order by tva_rate desc"); +00052 $Max=pg_NumRows($Res); +00053 echo "<TABLE BORDER=\"1\">"; +00054 for ($i=0;$i<$Max;$i++) { +00055 $row=pg_fetch_array($Res,$i); +00056 $set=sprintf( '<INPUT TYPE="BUTTON" Value="select" onClick="GetIt(\'%s\',\'%s\');">', +00057 $_GET['ctl'],$row['tva_id']); +00058 printf("<tr><TD BGCOLOR=\LIGHTGREEN\" >%s %d</TD><TD>%s</TD><TD>%s</TD></TR>", +00059 $set, +00060 $row['tva_id'], +00061 $row['tva_label'], +00062 $row['tva_comment']); +00063 } +00064 echo '</TABLE>'; +00065 ?> +00066 <input type='button' Value="fermer" onClick='window.close();'> +00067 <? +00068 html_page_stop(); +00069 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/show__tva_8php.html b/doc/developper/html/show__tva_8php.html index c3b330878..0b9c20841 100644 --- a/doc/developper/html/show__tva_8php.html +++ b/doc/developper/html/show__tva_8php.html @@ -4,10 +4,12 @@ - + -

    show_tva.php File Reference

    +

    show_tva.php File Reference

    Popup window to let the user choose the vat. More... +

    +

    Go to the source code of this file. @@ -29,7 +31,12 @@
     $set
    -


    Variable Documentation

    +

    Detailed Description

    +Popup window to let the user choose the vat. +

    + +

    +Definition in file show_tva.php.


    Variable Documentation

    @@ -52,7 +59,7 @@

    -Definition at line 47 of file show_tva.php. +Definition at line 50 of file show_tva.php.

    @@ -77,7 +84,7 @@ Definition at line 47

    -Definition at line 46 of file show_tva.php. +Definition at line 49 of file show_tva.php.

    @@ -102,7 +109,7 @@ Definition at line 46

    -Definition at line 49 of file show_tva.php. +Definition at line 52 of file show_tva.php.

    @@ -127,7 +134,7 @@ Definition at line 49

    -Definition at line 25 of file show_tva.php. +Definition at line 28 of file show_tva.php.

    @@ -152,7 +159,7 @@ Definition at line 25

    -Definition at line 48 of file show_tva.php. +Definition at line 51 of file show_tva.php.

    @@ -179,7 +186,7 @@ Definition at line 48 $_GET['ctl'],$row['tva_id'])

    -Definition at line 53 of file show_tva.php. +Definition at line 56 of file show_tva.php.

    @@ -204,7 +211,7 @@ Definition at line 53

    -Definition at line 27 of file show_tva.php. +Definition at line 30 of file show_tva.php.

    @@ -229,10 +236,10 @@ Definition at line 27

    -Definition at line 35 of file show_tva.php. +Definition at line 38 of file show_tva.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/stock_8php-source.html b/doc/developper/html/stock_8php-source.html index 9899fd942..606336c59 100644 --- a/doc/developper/html/stock_8php-source.html +++ b/doc/developper/html/stock_8php-source.html @@ -4,7 +4,7 @@ - +

    stock.php

    Go to the documentation of this file.
    00001 
    @@ -28,159 +28,159 @@
     00019 */
     00020 // Auteur Dany De Bontridder ddebontridder@yahoo.fr
     00021 /* $Revision$ */
    -00022 include_once("preference.php");
    -00023 include_once ("ac_common.php");
    -00024 include_once("postgres.php");
    -00025 include_once("stock_inc.php");
    -00026 include_once("check_priv.php");
    -00027 
    -00028 html_page_start($_SESSION['g_theme']);
    -00029 
    -00030 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00031   echo "You must choose a Dossier ";
    -00032   exit -2;
    -00033 }
    -00034 include_once ("postgres.php");
    -00035 /* Admin. Dossier */
    -00036 
    -00037 $cn=DbConnect($_SESSION['g_dossier']);
    -00038 include_once ("class_user.php");
    -00039 $User=new cl_user($cn);
    -00040 $User->Check();
    -00041 
    -00042 // Synchronize rights
    -00043 SyncRight($_SESSION['g_dossier'],$_SESSION['g_user']);
    -00044 
    -00045 // Get The priv on the selected folder
    -00046 if ( $User->admin == 0 ) {
    -00047   
    -00048   $r=GetPriv($_SESSION['g_dossier'],$_SESSION['g_user']);
    -00049   if ($r == 0 ){
    -00050     /* Cannot Access */
    -00051     NoAccess();
    -00052   }
    -00053 
    -00054 }
    -00055 
    -00056 
    -00057 //Show the top menu
    -00058 include_once ("user_menu.php");
    +00026 include_once("preference.php");
    +00027 include_once ("ac_common.php");
    +00028 include_once("postgres.php");
    +00029 include_once("stock_inc.php");
    +00030 include_once("check_priv.php");
    +00031 
    +00032 html_page_start($_SESSION['g_theme']);
    +00033 
    +00034 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00035   echo "You must choose a Dossier ";
    +00036   exit -2;
    +00037 }
    +00038 include_once ("postgres.php");
    +00039 /* Admin. Dossier */
    +00040 
    +00041 $cn=DbConnect($_SESSION['g_dossier']);
    +00042 include_once ("class_user.php");
    +00043 $User=new cl_user($cn);
    +00044 $User->Check();
    +00045 
    +00046 // Synchronize rights
    +00047 SyncRight($_SESSION['g_dossier'],$_SESSION['g_user']);
    +00048 
    +00049 // Get The priv on the selected folder
    +00050 if ( $User->admin == 0 ) {
    +00051   
    +00052   $r=GetPriv($_SESSION['g_dossier'],$_SESSION['g_user']);
    +00053   if ($r == 0 ){
    +00054     /* Cannot Access */
    +00055     NoAccess();
    +00056   }
    +00057 
    +00058 }
     00059 
    -00060 ShowMenuCompta($_SESSION['g_dossier']);
    -00061 
    -00062 // Show Menu Left
    -00063 $left_menu=ShowMenuAdvanced("stock.php");
    -00064 //echo '<div class="lmenu">';
    -00065 echo $left_menu;
    -00066 //echo '</DIV>';
    -00067 $action= ( isset ($_GET['action']))? $_GET['action']:"";
    -00068 include_once("stock_inc.php");
    -00069 
    -00070 // Adjust the stock
    -00071 if ( isset ($_POST['sub_change'])) {
    -00072   $change=$_POST['stock_change'];
    -00073   $sg_code=$_POST['sg_code'];
    -00074   $sg_date=$_POST['sg_date'];
    -00075   if ( isDate($sg_date) == null 
    -00076        or isNumber($change) == 0 ) {
    -00077     $msg="Stock données non conformes";
    -00078     echo "<script> alert('$msg');</script>";
    -00079     echo_error($msg);
    -00080   } else {
    -00081     // Check if User Can change the stock 
    -00082     if ( CheckAction($g_dossier,$g_user,STOCK_WRITE) == 0 ) {
    -00083       NoAccess();
    -00084       exit (-1);
    -00085     }
    -00086 
    -00087     // if neg the stock decrease => credit
    -00088     $type=( $change < 0 )?'c':'d';
    -00089     if ( $change != 0)
    -00090       $Res=ExecSql($cn,"insert into stock_goods
    -00091                      (  j_id,
    -00092                         f_id, 
    -00093                         sg_code,
    -00094                         sg_quantity,
    -00095                         sg_type,
    -00096                         sg_date,
    -00097                          sg_tech_user)
    -00098                     values (
    -00099                         null,
    -00100                         0,
    -00101                         '$sg_code',
    -00102                         abs($change),
    -00103                         '$type',
    -00104                         to_date('$sg_date','DD.MM.YYYY'),
    -00105                         '$g_user');
    -00106                      ");
    -00107   // to update the view
    -00108   $action="detail";
    -00109   }
    -00110 }
    -00111 
    -00112 // View the summary
    -00113 
    -00114 // if year is not set then use the year of the user's periode
    -00115 if ( ! isset ($_GET['year']) ) {
    -00116   // get defaut periode
    -00117   $a=$User->GetPeriode();
    -00118   // get exercice of periode
    -00119   $year=GetExercice($cn,$a);
    -00120   } else
    -00121   { 
    -00122     $year=$_GET['year'];
    -00123   }
    -00124 
    -00125 // View details
    -00126 if ( $action == 'detail' ) {
    -00127   // Check if User Can see the stock 
    -00128   if ( CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],STOCK_READ) == 0 ) {
    -00129     NoAccess();
    -00130     exit (-1);
    -00131   }
    -00132   $sg_code=(isset ($_GET['sg_code'] ))?$_GET['sg_code']:$_POST['sg_code'];
    -00133   $year=(isset($_GET['year']))?$_GET['year']:$_POST['year'];
    -00134   $a=ViewDetailStock($cn,$sg_code,$year);
    -00135   $b=ChangeStock($sg_code,$year);
    -00136     echo '<div class="u_redcontent">' ;
    -00137     echo $a;
    -00138     echo 'Entrer la valeur qui doit augmenter ou diminuer le stock';
    -00139     echo '<form action="stock.php" method="POST">';
    -00140     echo $b;
    -00141     echo '<input type="submit" name="sub_change" value="Ok">';
    -00142     echo '</form>';
    -00143     echo '</div>';
    -00144     exit();
    -00145 }
    -00146 
    -00147 // Show the possible years
    -00148 $sql="select distinct (p_exercice) as exercice from parm_periode ";
    -00149 $Res=ExecSql($cn,$sql);
    -00150 $r="";
    -00151 for ( $i = 0; $i < pg_NumRows($Res);$i++) {
    -00152   $l=pg_fetch_array($Res,$i);
    -00153   $r.=sprintf('<A class="one" HREF="stock.php?year=%d">%d</a> - ',
    -00154               $l['exercice'],
    -00155               $l['exercice']);
    -00156  
    -00157 }
    -00158 // Check if User Can see the stock 
    -00159 if ( CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],STOCK_READ) == 0 ) {
    -00160   NoAccess();
    -00161   exit (-1);
    -00162 }
    -00163 
    -00164 // Show the current stock
    -00165 echo '<div class="u_redcontent">';
    -00166 echo $r;
    -00167 $a=ViewStock($cn,$year);
    -00168 if ( $a != null ) {
    -00169   echo $a;
    -00170 }
    -00171 echo '</div>';
    -00172 html_page_stop();
    -00173 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00060 +00061 //Show the top menu +00062 include_once ("user_menu.php"); +00063 +00064 echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php"); +00065 +00066 // Show Menu Left +00067 $left_menu=ShowMenuAdvanced("stock.php"); +00068 //echo '<div class="lmenu">'; +00069 echo $left_menu; +00070 //echo '</DIV>'; +00071 $action= ( isset ($_GET['action']))? $_GET['action']:""; +00072 include_once("stock_inc.php"); +00073 +00074 // Adjust the stock +00075 if ( isset ($_POST['sub_change'])) { +00076 $change=$_POST['stock_change']; +00077 $sg_code=$_POST['sg_code']; +00078 $sg_date=$_POST['sg_date']; +00079 if ( isDate($sg_date) == null +00080 or isNumber($change) == 0 ) { +00081 $msg="Stock données non conformes"; +00082 echo "<script> alert('$msg');</script>"; +00083 echo_error($msg); +00084 } else { +00085 // Check if User Can change the stock +00086 if ( CheckAction($g_dossier,$g_user,STOCK_WRITE) == 0 ) { +00087 NoAccess(); +00088 exit (-1); +00089 } +00090 +00091 // if neg the stock decrease => credit +00092 $type=( $change < 0 )?'c':'d'; +00093 if ( $change != 0) +00094 $Res=ExecSql($cn,"insert into stock_goods +00095 ( j_id, +00096 f_id, +00097 sg_code, +00098 sg_quantity, +00099 sg_type, +00100 sg_date, +00101 sg_tech_user) +00102 values ( +00103 null, +00104 0, +00105 '$sg_code', +00106 abs($change), +00107 '$type', +00108 to_date('$sg_date','DD.MM.YYYY'), +00109 '$g_user'); +00110 "); +00111 // to update the view +00112 $action="detail"; +00113 } +00114 } +00115 +00116 // View the summary +00117 +00118 // if year is not set then use the year of the user's periode +00119 if ( ! isset ($_GET['year']) ) { +00120 // get defaut periode +00121 $a=$User->GetPeriode(); +00122 // get exercice of periode +00123 $year=GetExercice($cn,$a); +00124 } else +00125 { +00126 $year=$_GET['year']; +00127 } +00128 +00129 // View details +00130 if ( $action == 'detail' ) { +00131 // Check if User Can see the stock +00132 if ( CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],STOCK_READ) == 0 ) { +00133 NoAccess(); +00134 exit (-1); +00135 } +00136 $sg_code=(isset ($_GET['sg_code'] ))?$_GET['sg_code']:$_POST['sg_code']; +00137 $year=(isset($_GET['year']))?$_GET['year']:$_POST['year']; +00138 $a=ViewDetailStock($cn,$sg_code,$year); +00139 $b=ChangeStock($sg_code,$year); +00140 echo '<div class="u_redcontent">' ; +00141 echo $a; +00142 echo 'Entrer la valeur qui doit augmenter ou diminuer le stock'; +00143 echo '<form action="stock.php" method="POST">'; +00144 echo $b; +00145 echo '<input type="submit" name="sub_change" value="Ok">'; +00146 echo '</form>'; +00147 echo '</div>'; +00148 exit(); +00149 } +00150 +00151 // Show the possible years +00152 $sql="select distinct (p_exercice) as exercice from parm_periode "; +00153 $Res=ExecSql($cn,$sql); +00154 $r=""; +00155 for ( $i = 0; $i < pg_NumRows($Res);$i++) { +00156 $l=pg_fetch_array($Res,$i); +00157 $r.=sprintf('<A class="one" HREF="stock.php?year=%d">%d</a> - ', +00158 $l['exercice'], +00159 $l['exercice']); +00160 +00161 } +00162 // Check if User Can see the stock +00163 if ( CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],STOCK_READ) == 0 ) { +00164 NoAccess(); +00165 exit (-1); +00166 } +00167 +00168 // Show the current stock +00169 echo '<div class="u_redcontent">'; +00170 echo $r; +00171 $a=ViewStock($cn,$year); +00172 if ( $a != null ) { +00173 echo $a; +00174 } +00175 echo '</div>'; +00176 html_page_stop(); +00177 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/stock_8php.html b/doc/developper/html/stock_8php.html index 61cd295df..b69fdab7b 100644 --- a/doc/developper/html/stock_8php.html +++ b/doc/developper/html/stock_8php.html @@ -4,10 +4,12 @@ - + -

    stock.php File Reference

    +

    stock.php File Reference

    Manage the stock by year. More... +

    +

    Go to the source code of this file. @@ -18,7 +20,7 @@ - + @@ -27,7 +29,12 @@
     $left_menu = ShowMenuAdvanced("stock.php")
     $action = ( isset ($_GET['action']))? $_GET['action']:""
     $action = ( isset ($_GET['action']))? $_GET['action']:""
     $Res = ExecSql($cn,$sql)
     $a = ViewStock($cn,$year)
    -


    Variable Documentation

    +

    Detailed Description

    +Manage the stock by year. +

    + +

    +Definition in file stock.php.


    Variable Documentation

    @@ -50,7 +57,7 @@

    -Definition at line 167 of file stock.php. +Definition at line 171 of file stock.php.

    @@ -59,7 +66,7 @@ Definition at line 167 of - +
    $action = ( isset ($_GET['action']))? $_GET['action']:"" $action = ( isset ($_GET['action']))? $_GET['action']:""
    @@ -75,7 +82,7 @@ Definition at line 167 of

    -Definition at line 67 of file stock.php. +Definition at line 71 of file stock.php.

    @@ -100,7 +107,7 @@ Definition at line 67 of

    -Definition at line 37 of file stock.php. +Definition at line 41 of file stock.php.

    @@ -125,9 +132,9 @@ Definition at line 37 of

    -Definition at line 63 of file stock.php. +Definition at line 67 of file stock.php.

    -Referenced by ShowMenuAdvanced(). +Referenced by ShowMenuAdvanced().

    @@ -152,7 +159,7 @@ Referenced by ShowMenuAd

    -Definition at line 150 of file stock.php. +Definition at line 154 of file stock.php.

    @@ -177,7 +184,7 @@ Definition at line 150 of

    -Definition at line 149 of file stock.php. +Definition at line 153 of file stock.php.

    @@ -202,10 +209,10 @@ Definition at line 149 of

    -Definition at line 39 of file stock.php. +Definition at line 43 of file stock.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/stock__inc_8php-source.html b/doc/developper/html/stock__inc_8php-source.html index 055c638a1..57cd73b6f 100644 --- a/doc/developper/html/stock__inc_8php-source.html +++ b/doc/developper/html/stock__inc_8php-source.html @@ -4,7 +4,7 @@ - +

    stock_inc.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,99 +27,75 @@
     00018 */
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00021 
    -00022 
    -00023 /* function ViewStock ($p_cn)
    -00024  **************************************************
    -00025  * Purpose : show the listing of all goods 
    -00026  *        
    -00027  * parm : 
    -00028  *      - database connection
    -00029  * gen :
    -00030  *      -
    -00031  * return: string containing the table
    -00032  */
    -00033 function ViewStock($p_cn,$p_year) {
    -00034  // build sql -- get the different merchandise sold or bought
    -00035   // during the p_year
    -00036 $sql=" select distinct sg_code
    -00037       from stock_goods 
    -00038       join jrnx on (stock_goods.j_id=jrnx.j_id)
    -00039       join parm_periode on (parm_periode.p_id=jrnx.j_tech_per)
    -00040     where
    -00041       p_exercice= '$p_year'
    -00042       and sg_code is not null and sg_code != '' and sg_code!='null'";
    -00043 
    -00044 
    -00045   // send the sql
    -00046   $Res=ExecSql($p_cn,$sql);
    -00047 
    -00048   
    -00049   if ( ( $M = pg_NumRows($Res)) == 0 ) return null;
    -00050   // store it in a HTLM table
    -00051   $result="<table>";
    -00052   $result.="<tr>";
    -00053   $result.='<th>Code</th>';
    -00054   $result.='<th>Noms</th>';
    -00055   $result.='<th>Entrée</th>';
    -00056   $result.='<th>Sortie</th>';
    -00057   $result.='<th>Solde</th>';
    -00058   $result.="</tr>";
    -00059 
    -00060   // Sql result => table
    -00061   for ($i = 0; $i < $M ; $i++ ) {
    -00062     $r=pg_fetch_array($Res,$i);
    -00063     $result.="<TR>";
    -00064 
    -00065     // sg_code  and link to details
    -00066     $result.="<td>".'<a class="one" 
    -00067               HREF="stock.php?action=detail&sg_code='.$r['sg_code'].'&year='.$p_year.'">'. 
    -00068               $r['sg_code']."</A></td>";
    -00069 
    -00070     // name
    -00071     $a_name=getFicheNameCode($p_cn,$r['sg_code']);
    -00072     $name="";
    -00073     if ( $a_name != null ) {
    -00074       foreach ($a_name as $key=>$element) {
    -00075         $name.=$element['av_text'].",";
    -00076       }
    -00077     }// if ( $a_name
    -00078     $result.="<td> $name </td>";
    -00079 
    -00080     // Debit (in)
    -00081     $deb=GetQuantity($p_cn,$r['sg_code'],$p_year,'d');
    -00082     $result.="<td>".$deb."</td>";
    -00083 
    -00084     // Credit (out)
    -00085     $cred=GetQuantity($p_cn,$r['sg_code'],$p_year,'c');
    -00086     $result.="<td>".$cred."</td>";
    -00087 
    -00088 
    -00089     // diff
    -00090     $diff=$deb-$cred;
    -00091     $result.="<td>".$diff."</td>";
    -00092     $result.="</tr>";
    -00093 
    -00094   }
    -00095       $result.="</table>";
    -00096 
    -00097   return $result;
    -00098 }
    -00099 /* function  getFicheNameCode ($p_cn,$p_sg_code)
    -00100  ************************************************************
    -00101  * Purpose : return an array of f_id and f_name
    -00102  *        
    -00103  * parm : 
    -00104  *      - p_cn database connection
    -00105  *      - stock_goods.sg_code
    -00106  * gen :
    -00107  *      - none
    -00108  * return:
    -00109  *      - array (f_id, f_label) or null if nothing is found 
    -00110  */
    +00035 function ViewStock($p_cn,$p_year) {
    +00036  // build sql -- get the different merchandise sold or bought
    +00037   // during the p_year
    +00038 $sql=" select distinct sg_code
    +00039       from stock_goods 
    +00040       join jrnx on (stock_goods.j_id=jrnx.j_id)
    +00041       join parm_periode on (parm_periode.p_id=jrnx.j_tech_per)
    +00042     where
    +00043       p_exercice= '$p_year'
    +00044       and sg_code is not null and sg_code != '' and sg_code!='null'";
    +00045 
    +00046 
    +00047   // send the sql
    +00048   $Res=ExecSql($p_cn,$sql);
    +00049 
    +00050   
    +00051   if ( ( $M = pg_NumRows($Res)) == 0 ) return null;
    +00052   // store it in a HTLM table
    +00053   $result="<table>";
    +00054   $result.="<tr>";
    +00055   $result.='<th>Code</th>';
    +00056   $result.='<th>Noms</th>';
    +00057   $result.='<th>Entrée</th>';
    +00058   $result.='<th>Sortie</th>';
    +00059   $result.='<th>Solde</th>';
    +00060   $result.="</tr>";
    +00061 
    +00062   // Sql result => table
    +00063   for ($i = 0; $i < $M ; $i++ ) {
    +00064     $r=pg_fetch_array($Res,$i);
    +00065     $result.="<TR>";
    +00066 
    +00067     // sg_code  and link to details
    +00068     $result.="<td>".'<a class="one" 
    +00069               HREF="stock.php?action=detail&sg_code='.$r['sg_code'].'&year='.$p_year.'">'. 
    +00070               $r['sg_code']."</A></td>";
    +00071 
    +00072     // name
    +00073     $a_name=getFicheNameCode($p_cn,$r['sg_code']);
    +00074     $name="";
    +00075     if ( $a_name != null ) {
    +00076       foreach ($a_name as $key=>$element) {
    +00077         $name.=$element['av_text'].",";
    +00078       }
    +00079     }// if ( $a_name
    +00080     $result.="<td> $name </td>";
    +00081 
    +00082     // Debit (in)
    +00083     $deb=GetQuantity($p_cn,$r['sg_code'],$p_year,'d');
    +00084     $result.="<td>".$deb."</td>";
    +00085 
    +00086     // Credit (out)
    +00087     $cred=GetQuantity($p_cn,$r['sg_code'],$p_year,'c');
    +00088     $result.="<td>".$cred."</td>";
    +00089 
    +00090 
    +00091     // diff
    +00092     $diff=$deb-$cred;
    +00093     $result.="<td>".$diff."</td>";
    +00094     $result.="</tr>";
    +00095 
    +00096   }
    +00097       $result.="</table>";
    +00098 
    +00099   return $result;
    +00100 }
     00111 function getFicheNameCode ($p_cn,$p_sg_code) {
     00112   // Sql stmt
    -00113 $sql="select distinct f_id,av_text
    +00113 $sql="select distinct f_id,av_text
     00114          from stock_goods
     00115          join jnt_fic_att_value using (f_id )
     00116          join attr_value using (jft_id)
    @@ -133,9 +109,9 @@
     00124  
     00125  // Store in an array
     00126  for ( $i=0; $i<$M;$i++) {
    -00127    $r=pg_fetch_array($Res,$i);
    -00128    $a['f_id']=$r['f_id'];
    -00129    $a['av_text']=$r['av_text'];
    +00127    $r=pg_fetch_array($Res,$i);
    +00128    $a['f_id']=$r['f_id'];
    +00129    $a['av_text']=$r['av_text'];
     00130    $result[$i]=$a;
     00131 
     00132  }
    @@ -143,163 +119,136 @@
     00134  return $result;
     00135   
     00136 }
    -00137 /* function ViewDetailStock($cn,$sg_code,$year)
    -00138  **************************************************
    -00139  * Purpose : 
    -00140  *        
    -00141  * parm : 
    -00142  *      - cn database connection
    -00143  *      - sg_code
    -00144  *      - year
    -00145  * gen :
    -00146  *      -
    -00147  * return: HTML code
    -00148  */
    -00149 function ViewDetailStock($p_cn,$p_sg_code,$p_year) {
    -00150 $sql="select sg_code,
    -00151              j_montant,
    -00152              j_date,
    -00153              sg_quantity,
    -00154              sg_type,
    -00155              jr_comment,
    -00156              jr_internal,
    -00157              jr_id,
    -00158         case when sg_date is not null then sg_date else j_date end as stock_date
    -00159       from stock_goods
    -00160       left outer join jrnx using (j_id)
    -00161       left outer join jrn on jr_grpt_id=j_grpt
    -00162            where 
    -00163       sg_code='$p_sg_code' and (
    -00164           to_char(sg_date,'YYYY') = '$p_year'
    -00165        or to_char(j_date,'YYYY') = '$p_year'
    -00166        )
    -00167       order by stock_date
    -00168  " ;
    -00169 // $r.=sprintf('<input TYPE="button" onClick="modifyOperation(\'%s\',\'%s\')" value="%s">',
    -00170 //                  $row['jr_id'],$l_sessid,$row['jr_internal']);
    -00171     // name
    -00172 
    -00173 
    -00174   $r="";
    -00175   $a_name=getFicheNameCode($p_cn,$p_sg_code);
    -00176   $name="";
    -00177   if ( $a_name != null ) {
    -00178     foreach ($a_name as $key=>$element) {
    -00179       $name.=$element['av_text'].",";
    -00180     }
    -00181   }// if ( $a_name
    -00182   // Add java script for detail
    -00183   $r.=JS_VIEW_JRN_DETAIL;
    -00184 
    -00185  $r.='<H2 class="info">'.$p_sg_code."  Noms : ".$name.'</H2>';
    -00186   
    -00187   $Res=ExecSql($p_cn,$sql);
    -00188   if ( ($M=pg_NumRows($Res)) == 0 ) return "no rows";
    -00189   $r.="<table>";
    -00190   $r.="<TR>";
    -00191   $r.="<th>Date </th>";
    -00192   $r.="<th>Entrée / Sortie </th>";
    -00193   $r.="<th></th>";
    -00194   $r.="<th>Description</th>";
    -00195   $r.="<th>Montant</th>";
    -00196   $r.="<th>Quantité</th>";
    -00197   $r.="<th>Prix/Cout Unitaire</th>";
    -00198   $r.="</TR>";
    -00199   // compute sessid
    -00200   $l_sessid=$_REQUEST['PHPSESSID'];
    -00201 
    -00202   for ( $i=0; $i < $M;$i++) {
    -00203     $l=pg_fetch_array($Res,$i);
    -00204     $r.="<tR>";
    -00205 
    -00206     // date
    -00207     $r.="<TD>";
    -00208     $r.=$l['j_date'];
    -00209     $r.="</TD>";
    -00210 
    -00211     //type (deb = out cred=in)
    -00212     $r.="<TD>";
    -00213     $r.=($l['sg_type']=='c')?'OUT':'IN';
    -00214     $r.="</TD>";
    -00215 
    -00216     // jr_internal
    -00217     $r.="<TD>";
    -00218     $r.="</TD>";
    -00219 
    -00220 
    -00221     // comment
    -00222     $r.="<TD>";
    -00223     $r.=$l['jr_comment'];
    -00224     $r.="</TD>";
    -00225 
    -00226     //amount
    -00227     $r.="<TD>";
    -00228     $r.=$l['j_montant'];
    -00229     $r.="</TD>";
    -00230 
    -00231     //quantity
    -00232     $r.="<TD>";
    -00233     $r.=$l['sg_quantity'];
    -00234     $r.="</TD>";
    -00235 
    -00236     // Unit Price
    -00237     $r.="<TD>";
    -00238     $up=$l['j_montant']/$l['sg_quantity'];
    -00239     $r.=$up;
    -00240     $r.="</TD>";
    -00241 
    -00242     $r.="</TR>";
    -00243   }// for ($i
    -00244   $r.="</table>";
    +00147 function ViewDetailStock($p_cn,$p_sg_code,$p_year) {
    +00148 $sql="select sg_code,
    +00149              j_montant,
    +00150              j_date,
    +00151              sg_quantity,
    +00152              sg_type,
    +00153              jr_comment,
    +00154              jr_internal,
    +00155              jr_id,
    +00156         case when sg_date is not null then sg_date else j_date end as stock_date
    +00157       from stock_goods
    +00158       left outer join jrnx using (j_id)
    +00159       left outer join jrn on jr_grpt_id=j_grpt
    +00160            where 
    +00161       sg_code='$p_sg_code' and (
    +00162           to_char(sg_date,'YYYY') = '$p_year'
    +00163        or to_char(j_date,'YYYY') = '$p_year'
    +00164        )
    +00165       order by stock_date
    +00166  " ;
    +00167 // $r.=sprintf('<input TYPE="button" onClick="modifyOperation(\'%s\',\'%s\')" value="%s">',
    +00168 //                  $row['jr_id'],$l_sessid,$row['jr_internal']);
    +00169     // name
    +00170 
    +00171 
    +00172   $r="";
    +00173   $a_name=getFicheNameCode($p_cn,$p_sg_code);
    +00174   $name="";
    +00175   if ( $a_name != null ) {
    +00176     foreach ($a_name as $key=>$element) {
    +00177       $name.=$element['av_text'].",";
    +00178     }
    +00179   }// if ( $a_name
    +00180   // Add java script for detail
    +00181   $r.=JS_VIEW_JRN_DETAIL;
    +00182 
    +00183  $r.='<H2 class="info">'.$p_sg_code."  Noms : ".$name.'</H2>';
    +00184   
    +00185   $Res=ExecSql($p_cn,$sql);
    +00186   if ( ($M=pg_NumRows($Res)) == 0 ) return "no rows";
    +00187   $r.="<table>";
    +00188   $r.="<TR>";
    +00189   $r.="<th>Date </th>";
    +00190   $r.="<th>Entrée / Sortie </th>";
    +00191   $r.="<th></th>";
    +00192   $r.="<th>Description</th>";
    +00193   $r.="<th>Montant</th>";
    +00194   $r.="<th>Quantité</th>";
    +00195   $r.="<th>Prix/Cout Unitaire</th>";
    +00196   $r.="</TR>";
    +00197   // compute sessid
    +00198   $l_sessid=$_REQUEST['PHPSESSID'];
    +00199 
    +00200   for ( $i=0; $i < $M;$i++) {
    +00201     $l=pg_fetch_array($Res,$i);
    +00202     $r.="<tR>";
    +00203 
    +00204     // date
    +00205     $r.="<TD>";
    +00206     $r.=$l['j_date'];
    +00207     $r.="</TD>";
    +00208 
    +00209     //type (deb = out cred=in)
    +00210     $r.="<TD>";
    +00211     $r.=($l['sg_type']=='c')?'OUT':'IN';
    +00212     $r.="</TD>";
    +00213 
    +00214     // jr_internal
    +00215     $r.="<TD>";
    +00216     $r.="</TD>";
    +00217 
    +00218 
    +00219     // comment
    +00220     $r.="<TD>";
    +00221     $r.=$l['jr_comment'];
    +00222     $r.="</TD>";
    +00223 
    +00224     //amount
    +00225     $r.="<TD>";
    +00226     $r.=$l['j_montant'];
    +00227     $r.="</TD>";
    +00228 
    +00229     //quantity
    +00230     $r.="<TD>";
    +00231     $r.=$l['sg_quantity'];
    +00232     $r.="</TD>";
    +00233 
    +00234     // Unit Price
    +00235     $r.="<TD>";
    +00236     $up=$l['j_montant']/$l['sg_quantity'];
    +00237     $r.=$up;
    +00238     $r.="</TD>";
    +00239 
    +00240     $r.="</TR>";
    +00241   }// for ($i
    +00242   $r.="</table>";
    +00243 
    +00244 
     00245 
    -00246 
    -00247 
    -00248   return $r;
    -00249          
    -00250 }
    -00251 /* function ChangeStock($cn,$sg_code,$sg_date)
    -00252  **************************************************
    -00253  * Purpose : 
    -00254  *        
    -00255  * parm : 
    -00256  *      -
    -00257  * gen :
    -00258  *      -
    -00259  * return:
    -00260  */
    -00261 function ChangeStock($p_sg_code,$p_year){
    -00262 $sg_date=date("d.m.Y");
    -00263 $r='
    -00264 <input type="text" name="stock_change" value="0">
    -00265 <input type="hidden" name="sg_code" value="'.$p_sg_code.'">
    -00266 <input type="text" name="sg_date" value="'.$sg_date.'">
    -00267 <input type="hidden" name="year" value="'.$p_year.'">
    -00268 <br>
    -00269  ';
    -00270  return $r;
    -00271 
    -00272 }
    -00273 /* function GetQuantity($p_cn,$p_sg_code,$year,$p_type 'd' or 'c'
    -00274  * purpose return the quantity of a sg_code for the period 
    -00275  *
    -00276  * Return number or NULL
    -00277  */ 
    -00278 function GetQuantity($p_cn,$p_sg_code,$p_year,$p_type) {
    -00279   $sql="select sum(sg_quantity) as result
    -00280         from stock_goods
    -00281       join jrnx on (stock_goods.j_id=jrnx.j_id)
    -00282       join parm_periode on (parm_periode.p_id=jrnx.j_tech_per)
    -00283         where
    -00284         sg_code='$p_sg_code' and 
    -00285          p_exercice = '$p_year' and 
    -00286          sg_type='$p_type'";
    -00287   $Res=ExecSql($p_cn,$sql);
    -00288   if ( pg_NumRows($Res)== 0) return null;
    -00289   $value=pg_fetch_array($Res,0);
    -00290   return $value['result'];
    -00291     
    -00292 }
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00246 return $r; +00247 +00248 } +00259 function ChangeStock($p_sg_code,$p_year){ +00260 $sg_date=date("d.m.Y"); +00261 $r=' +00262 <input type="text" name="stock_change" value="0"> +00263 <input type="hidden" name="sg_code" value="'.$p_sg_code.'"> +00264 <input type="text" name="sg_date" value="'.$sg_date.'"> +00265 <input type="hidden" name="year" value="'.$p_year.'"> +00266 <br> +00267 '; +00268 return $r; +00269 +00270 } +00276 function GetQuantity($p_cn,$p_sg_code,$p_year,$p_type) { +00277 $sql="select sum(sg_quantity) as result +00278 from stock_goods +00279 join jrnx on (stock_goods.j_id=jrnx.j_id) +00280 join parm_periode on (parm_periode.p_id=jrnx.j_tech_per) +00281 where +00282 sg_code='$p_sg_code' and +00283 p_exercice = '$p_year' and +00284 sg_type='$p_type'"; +00285 $Res=ExecSql($p_cn,$sql); +00286 if ( pg_NumRows($Res)== 0) return null; +00287 $value=pg_fetch_array($Res,0); +00288 return $value['result']; +00289 +00290 } +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/stock__inc_8php.html b/doc/developper/html/stock__inc_8php.html index da00921b9..57e498968 100644 --- a/doc/developper/html/stock__inc_8php.html +++ b/doc/developper/html/stock__inc_8php.html @@ -4,26 +4,40 @@ - + -

    stock_inc.php File Reference

    +

    stock_inc.php File Reference

    Function for managing the stock. More... +

    +

    Go to the source code of this file. + + + + +

    Functions

     ViewStock ($p_cn, $p_year)
     show the listing of all goods
     getFicheNameCode ($p_cn, $p_sg_code)
     return an array of f_id and f_name
     ViewDetailStock ($p_cn, $p_sg_code, $p_year)
     View the details of a stock.
     ChangeStock ($p_sg_code, $p_year)
     parm :
      +
    • gen :
    • return:
    +
     GetQuantity ($p_cn, $p_sg_code, $p_year, $p_type)
     return the quantity of a sg_code for the period
    -


    Function Documentation

    +

    Detailed Description

    +Function for managing the stock. +

    + +

    +Definition in file stock_inc.php.


    Function Documentation

    @@ -58,11 +72,15 @@ +Definition at line 259 of file stock_inc.php. +

    +References $r, name, and value.

    +parm :

      +
    • gen :
    • return:

    -Definition at line 261 of file stock_inc.php. +

    -References $r, name, and value.

    @@ -99,13 +117,24 @@ References $r

    +return an array of f_id and f_name +

    +

    Parameters:
    + + + +
    $p_cn database connection
    _sg_code stock_goods.sg_code
    +
    +
    Returns:
      +
    • array (f_id, f_label) or null if nothing is found
    +

    Definition at line 111 of file stock_inc.php.

    -References $a, $i, $r, $Res, $result, $sql, and ExecSql(). +References $a, $i, $r, $Res, $result, $sql, ExecSql(), and f_id.

    -Referenced by ViewDetailStock(), and ViewStock(). +Referenced by ViewDetailStock(), and ViewStock().

    @@ -154,13 +183,16 @@ Referenced by ViewDetail

    +return the quantity of a sg_code for the period +

    +

    Returns:
    number or NULL

    -Definition at line 278 of file stock_inc.php. +Definition at line 276 of file stock_inc.php.

    -References $Res, $sql, and ExecSql(). +References $Res, $sql, and ExecSql().

    -Referenced by ViewStock(). +Referenced by ViewStock().

    @@ -203,11 +235,21 @@ Referenced by ViewStock(

    +View the details of a stock. +

    +

    Parameters:
    + + + + +
    $p_cn database connection
    p_sg_code 
    $p_year 
    +
    +
    Returns:
    HTML code

    -Definition at line 149 of file stock_inc.php. +Definition at line 147 of file stock_inc.php.

    -References $l, $r, $Res, $sql, ExecSql(), and getFicheNameCode(). +References $l, $r, $Res, $sql, ExecSql(), and getFicheNameCode().

    @@ -244,14 +286,24 @@ References $l, <

    +show the listing of all goods +

    +

    Parameters:
    + + +
    - database connection
      +
    +
    +
    +
    Returns:
    string containing the table

    -Definition at line 33 of file stock_inc.php. +Definition at line 35 of file stock_inc.php.

    -References $diff, $r, $Res, $result, $sql, ExecSql(), getFicheNameCode(), and GetQuantity(). +References $diff, $r, $Res, $result, $sql, ExecSql(), getFicheNameCode(), and GetQuantity(). -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/test_8php-source.html b/doc/developper/html/test_8php-source.html index e4c0082b6..4f0ab9a74 100644 --- a/doc/developper/html/test_8php-source.html +++ b/doc/developper/html/test_8php-source.html @@ -4,7 +4,7 @@ - +

    test.php

    Go to the documentation of this file.
    00001 
    @@ -75,7 +75,7 @@
     00066 echo "<h2 class=\"info\"> Congratulation : Test successfull</h2>";
     00067 
     00068 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/test_8php.html b/doc/developper/html/test_8php.html index 43a9c2f69..3619ad3ba 100644 --- a/doc/developper/html/test_8php.html +++ b/doc/developper/html/test_8php.html @@ -4,7 +4,7 @@ - +

    test.php File Reference

    @@ -68,7 +68,7 @@ Definition at line 37 of f Definition at line 45 of file test.php. -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/test__smarty_8php-source.html b/doc/developper/html/test__smarty_8php-source.html index 5da7c606c..020c7f997 100644 --- a/doc/developper/html/test__smarty_8php-source.html +++ b/doc/developper/html/test__smarty_8php-source.html @@ -4,7 +4,7 @@ - +

    test_smarty.php

    Go to the documentation of this file.
    00001 <?php
    @@ -22,7 +22,7 @@
     00013 
     00014 ?>
     00015 
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/test__smarty_8php.html b/doc/developper/html/test__smarty_8php.html index 736064372..f5ac667cf 100644 --- a/doc/developper/html/test__smarty_8php.html +++ b/doc/developper/html/test__smarty_8php.html @@ -4,7 +4,7 @@ - +

    test_smarty.php File Reference

    @@ -149,7 +149,7 @@ Definition at line 96 of file test_smarty.php. -
    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/tva_8inc_8php-source.html b/doc/developper/html/tva_8inc_8php-source.html index 44329c4e2..4f3eb25f6 100644 --- a/doc/developper/html/tva_8inc_8php-source.html +++ b/doc/developper/html/tva_8inc_8php-source.html @@ -4,7 +4,7 @@ - +

    tva.inc.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,237 +27,236 @@
     00018 */
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00021 
    -00022   // Confirm remove
    -00023   if ( isset ($_POST['confirm_rm'])) 
    -00024   {
    -00025     ExecSql($cn,'select tva_delete('.$_POST['tva_id'].')');
    -00026   }
    -00028 // Record Change
    -00029   if ( isset ($_POST['confirm_mod'])
    -00030        || isset ($_POST['confirm_add'])) 
    -00031     {
    -00032       extract($_POST);
    -00033       $tva_id=FormatString($tva_id);
    -00034       $tva_label=FormatString($tva_label);
    -00035       $tva_rate=FormatString($tva_rate);
    -00036       $tva_comment=FormatString($tva_comment);
    -00037       $tva_poste=FormatString($tva_poste);
    -00038       $err=0; // Error code
    -00039       if ( isNumber($tva_id) == 0 ) {
    -00040         $err=1;
    -00041         
    -00042      } 
    -00043       if ( isNumber($tva_rate) == 0 ) {
    -00044         $err=2;
    +00025   // Confirm remove
    +00026   if ( isset ($_POST['confirm_rm'])) 
    +00027   {
    +00028     ExecSql($cn,'select tva_delete('.$_POST['tva_id'].')');
    +00029   }
    +00031 // Record Change
    +00032   if ( isset ($_POST['confirm_mod'])
    +00033        || isset ($_POST['confirm_add'])) 
    +00034     {
    +00035       extract($_POST);
    +00036       $tva_id=FormatString($tva_id);
    +00037       $tva_label=FormatString($tva_label);
    +00038       $tva_rate=FormatString($tva_rate);
    +00039       $tva_comment=FormatString($tva_comment);
    +00040       $tva_poste=FormatString($tva_poste);
    +00041       $err=0; // Error code
    +00042       if ( isNumber($tva_id) == 0 ) {
    +00043         $err=1;
    +00044         
     00045      } 
    -00046 
    -00047       if ( $err == 0 ) 
    -00048         {
    -00049           if (  isset ($_POST['confirm_add']) ) 
    -00050             {
    -00051           $Res=ExecSql($cn,
    -00052                        "select tva_insert($tva_id,'$tva_label',
    -00053                         '$tva_rate','$tva_comment','$tva_poste')");
    -00054 
    -00055             }
    -00056           if (  isset ($_POST['confirm_mod']) ) 
    -00057             {
    -00058           $Res=ExecSql($cn,
    -00059                        "select tva_modify($tva_id,'$tva_label',
    -00060                        '$tva_rate','$tva_comment','$tva_poste')");
    -00061             }
    -00062           $ret_sql=pg_fetch_row($Res);
    -00063           $err=$ret_sql[0];
    -00064         }
    -00065       if ( $err != 0 ) 
    -00066         {
    -00067           $err_code=array(1=>"Tva id n\'est pas un nombre",
    -00068                           2=>"Taux tva invalide",
    -00069                           3=>"Label ne peut être vide",
    -00070                           4=>"Poste invalide",
    -00071                           5=>"Tva id doit être unique");
    -00072           $str_err=$err_code[$err];
    -00073           echo "<script>alert ('$str_err'); </script>";;
    -00074         }
    -00075   }
    -00076 
    -00078   // Display
    -00079   $sql="select tva_id,tva_label,tva_rate,tva_comment,tva_poste from tva_rate order by tva_id";
    -00080   $Res=ExecSql($cn,$sql);
    -00081   ?>
    -00082 <TABLE>
    -00083 <TR>
    -00084 <th>Id</th>
    -00085 <th>Label</TH>
    -00086 <th>Taux</th>
    -00087 <th>Commentaire</th>
    -00088 <th>Poste</th>
    -00089 </tr>
    -00090 <?
    -00091   $val=pg_fetch_all($Res);
    -00092   echo_debug('parametre',__LINE__,$val);
    -00093   foreach ( $val as $row)
    -00094     {
    -00095       // load value into an array
    -00096       $index=$row['tva_id']     ;
    -00097       $a[$index]=array(
    -00098                        'tva_label'=> $row['tva_label'],
    -00099                        'tva_rate'=>$row['tva_rate'],
    -00100                        'tva_comment'=>$row['tva_comment'],
    -00101                        'tva_poste'=>$row['tva_poste']
    -00102                        );
    -00103       echo "<TR>";
    -00104       echo '<FORM METHOD="POST">';
    -00105 
    -00106       echo "<TD>";
    -00107       echo $row['tva_id'];
    -00108       echo "</TD>";
    -00109 
    -00110       echo "<TD>";
    -00111       echo $row['tva_label'];
    -00112       echo "</TD>";
    -00113 
    -00114       echo "<TD>";
    -00115       echo $row['tva_rate'];
    -00116       echo "</TD>";
    -00117 
    -00118       echo "<TD>";
    -00119       echo $row['tva_comment'];
    -00120       echo "</TD>";
    -00121 
    -00122       echo "<TD>";
    -00123       echo $row['tva_poste'];
    -00124       echo "</TD>";
    -00125 
    -00126       echo "<TD>";
    -00127       echo '<input type="submit" name="rm" value="Efface">';
    -00128       echo '<input type="submit" name="mod" value="Modifie">';
    -00129       $w=new widget("hidden");
    -00130       $w->name="tva_id";
    -00131       $w->value=$row['tva_id'];
    -00132       echo $w->IOValue();
    -00133       $w=new widget("hidden");
    -00134       $w->name="p_action";
    -00135       $w->value="tva";
    -00136       echo $w->IOValue();
    -00137 
    -00138       echo "</TD>";
    -00139 
    -00140       echo '</FORM>';
    -00141       echo "</TR>";
    -00142     }
    -00143 ?>
    -00144 </TABLE>
    -00145     <? // if we add / remove or modify a vat we don't show this button
    -00146 if (   ! isset ($_POST['add'])
    -00147   &&   ! isset ($_POST['mod'])
    -00148   &&   ! isset ($_POST['rm'])
    -00149 
    -00150 ) { ?>
    -00151     <form method="post">
    -00152     <input type="submit" name="add" value="Ajouter un taux de tva">
    -00153     <input type="hidden" name="p_action" value="tva">
    -00154      </form>
    -00155 <?
    -00156        } 
    -00157 
    -00158 
    -00160     // remove
    -00161     if ( isset ( $_REQUEST['rm'])) 
    -00162       {
    -00163         echo_debug("parametre",__LINE__,"efface ".$_POST['tva_id']);
    -00164         echo "Voulez-vous vraiment effacer ce taux ? ";
    -00165         $index=$_POST['tva_id'];
    -00166         
    -00167 ?>
    -00168 <table>
    -00169    <TR>
    -00170    <th>Label</TH>
    -00171    <th>Taux</th>
    -00172    <th>Commentaire</th>
    -00173    <th>Poste</th>
    -00174    </tr>
    -00175 <tr>
    -00176    <td> <? echo $a[$index]['tva_label']; ?></td>
    -00177    <td> <? echo $a[$index]['tva_rate']; ?></td>
    -00178    <td> <? echo $a[$index]['tva_comment']; ?></td>
    -00179    <td> <? echo $a[$index]['tva_poste']; ?></td>
    -00180 </Tr>
    -00181 </table>
    -00182 <?
    -00183     echo '<FORM method="post">';
    -00184     echo '<input type="hidden" name="tva_id" value="'.$index.'">';
    -00185     echo '<input type="submit" name="confirm_rm" value="Confirme">';
    -00186     echo '<input type="submit" value="Cancel" name="no">';
    -00187     echo "</form>"; 
    -00188 
    -00189   }
    -00191   // add
    -00192   if ( isset ( $_REQUEST['add'])) 
    -00193   {
    -00194     echo_debug("parametre",__LINE__,"add a line ");
    -00195     echo "Tva à ajouter, l'id doit être différent pour chaque taux";
    -00196     echo '<FORM method="post">';
    -00197 
    -00198 
    -00199 ?>
    -00200 <table >
    -00201    <TR>
    -00202    <th>id</TH>
    -00203    <th>Label</TH>
    -00204    <th>Taux</th>
    -00205    <th>Commentaire</th>
    -00206    <th>Poste</th>
    -00207    </tr>
    -00208 <tr valign="top">
    -00209    <td> <? $w=new widget("text");$w->size=5; echo $w->IOValue('tva_id','') ?></td>
    -00210    <td> <? $w=new widget("text");$w->size=20; echo $w->IOValue('tva_label','') ?></td>
    -00211    <td> <? $w=new widget("text");$w->size=5; echo $w->IOValue('tva_rate','') ?></td>
    -00212    <td> <? $w=new widget("textarea"); $w->heigh=2;$w->width=20;echo $w->IOValue('tva_comment','') ?></td>
    -00213    <td> <? $w=new widget("text"); $w->size=10;echo $w->IOValue('tva_poste','') ?></td>
    -00214 </Tr>
    -00215 </table>
    -00216 <input type="submit" value="Confirme" name="confirm_add">
    -00217 <input type="submit" value="Cancel" name="no">
    -00218 
    -00219  </FORM>
    -00220 <?  }
    +00046       if ( isNumber($tva_rate) == 0 ) {
    +00047         $err=2;
    +00048      } 
    +00049 
    +00050       if ( $err == 0 ) 
    +00051         {
    +00052           if (  isset ($_POST['confirm_add']) ) 
    +00053             {
    +00054           $Res=ExecSql($cn,
    +00055                        "select tva_insert($tva_id,'$tva_label',
    +00056                         '$tva_rate','$tva_comment','$tva_poste')");
    +00057 
    +00058             }
    +00059           if (  isset ($_POST['confirm_mod']) ) 
    +00060             {
    +00061           $Res=ExecSql($cn,
    +00062                        "select tva_modify($tva_id,'$tva_label',
    +00063                        '$tva_rate','$tva_comment','$tva_poste')");
    +00064             }
    +00065           $ret_sql=pg_fetch_row($Res);
    +00066           $err=$ret_sql[0];
    +00067         }
    +00068       if ( $err != 0 ) 
    +00069         {
    +00070           $err_code=array(1=>"Tva id n\'est pas un nombre",
    +00071                           2=>"Taux tva invalide",
    +00072                           3=>"Label ne peut être vide",
    +00073                           4=>"Poste invalide",
    +00074                           5=>"Tva id doit être unique");
    +00075           $str_err=$err_code[$err];
    +00076           echo "<script>alert ('$str_err'); </script>";;
    +00077         }
    +00078   }
    +00079 
    +00081   // Display
    +00082   $sql="select tva_id,tva_label,tva_rate,tva_comment,tva_poste from tva_rate order by tva_id";
    +00083   $Res=ExecSql($cn,$sql);
    +00084   ?>
    +00085 <TABLE>
    +00086 <TR>
    +00087 <th>Id</th>
    +00088 <th>Label</TH>
    +00089 <th>Taux</th>
    +00090 <th>Commentaire</th>
    +00091 <th>Poste</th>
    +00092 </tr>
    +00093 <?
    +00094   $val=pg_fetch_all($Res);
    +00095   echo_debug('parametre',__LINE__,$val);
    +00096   foreach ( $val as $row)
    +00097     {
    +00098       // load value into an array
    +00099       $index=$row['tva_id']     ;
    +00100       $a[$index]=array(
    +00101                        'tva_label'=> $row['tva_label'],
    +00102                        'tva_rate'=>$row['tva_rate'],
    +00103                        'tva_comment'=>$row['tva_comment'],
    +00104                        'tva_poste'=>$row['tva_poste']
    +00105                        );
    +00106       echo "<TR>";
    +00107       echo '<FORM METHOD="POST">';
    +00108 
    +00109       echo "<TD>";
    +00110       echo $row['tva_id'];
    +00111       echo "</TD>";
    +00112 
    +00113       echo "<TD>";
    +00114       echo $row['tva_label'];
    +00115       echo "</TD>";
    +00116 
    +00117       echo "<TD>";
    +00118       echo $row['tva_rate'];
    +00119       echo "</TD>";
    +00120 
    +00121       echo "<TD>";
    +00122       echo $row['tva_comment'];
    +00123       echo "</TD>";
    +00124 
    +00125       echo "<TD>";
    +00126       echo $row['tva_poste'];
    +00127       echo "</TD>";
    +00128 
    +00129       echo "<TD>";
    +00130       echo '<input type="submit" name="rm" value="Efface">';
    +00131       echo '<input type="submit" name="mod" value="Modifie">';
    +00132       $w=new widget("hidden");
    +00133       $w->name="tva_id";
    +00134       $w->value=$row['tva_id'];
    +00135       echo $w->IOValue();
    +00136       $w=new widget("hidden");
    +00137       $w->name="p_action";
    +00138       $w->value="tva";
    +00139       echo $w->IOValue();
    +00140 
    +00141       echo "</TD>";
    +00142 
    +00143       echo '</FORM>';
    +00144       echo "</TR>";
    +00145     }
    +00146 ?>
    +00147 </TABLE>
    +00148     <? // if we add / remove or modify a vat we don't show this button
    +00149 if (   ! isset ($_POST['add'])
    +00150   &&   ! isset ($_POST['mod'])
    +00151   &&   ! isset ($_POST['rm'])
    +00152 
    +00153 ) { ?>
    +00154     <form method="post">
    +00155     <input type="submit" name="add" value="Ajouter un taux de tva">
    +00156     <input type="hidden" name="p_action" value="tva">
    +00157      </form>
    +00158 <?
    +00159        } 
    +00160 
    +00161 
    +00163     // remove
    +00164     if ( isset ( $_REQUEST['rm'])) 
    +00165       {
    +00166         echo_debug("parametre",__LINE__,"efface ".$_POST['tva_id']);
    +00167         echo "Voulez-vous vraiment effacer ce taux ? ";
    +00168         $index=$_POST['tva_id'];
    +00169         
    +00170 ?>
    +00171 <table>
    +00172    <TR>
    +00173    <th>Label</TH>
    +00174    <th>Taux</th>
    +00175    <th>Commentaire</th>
    +00176    <th>Poste</th>
    +00177    </tr>
    +00178 <tr>
    +00179    <td> <? echo $a[$index]['tva_label']; ?></td>
    +00180    <td> <? echo $a[$index]['tva_rate']; ?></td>
    +00181    <td> <? echo $a[$index]['tva_comment']; ?></td>
    +00182    <td> <? echo $a[$index]['tva_poste']; ?></td>
    +00183 </Tr>
    +00184 </table>
    +00185 <?
    +00186     echo '<FORM method="post">';
    +00187     echo '<input type="hidden" name="tva_id" value="'.$index.'">';
    +00188     echo '<input type="submit" name="confirm_rm" value="Confirme">';
    +00189     echo '<input type="submit" value="Cancel" name="no">';
    +00190     echo "</form>"; 
    +00191 
    +00192   }
    +00194   // add
    +00195   if ( isset ( $_REQUEST['add'])) 
    +00196   {
    +00197     echo_debug("parametre",__LINE__,"add a line ");
    +00198     echo "Tva à ajouter, l'id doit être différent pour chaque taux";
    +00199     echo '<FORM method="post">';
    +00200 
    +00201 
    +00202 ?>
    +00203 <table >
    +00204    <TR>
    +00205    <th>id</TH>
    +00206    <th>Label</TH>
    +00207    <th>Taux</th>
    +00208    <th>Commentaire</th>
    +00209    <th>Poste</th>
    +00210    </tr>
    +00211 <tr valign="top">
    +00212    <td> <? $w=new widget("text");$w->size=5; echo $w->IOValue('tva_id','') ?></td>
    +00213    <td> <? $w=new widget("text");$w->size=20; echo $w->IOValue('tva_label','') ?></td>
    +00214    <td> <? $w=new widget("text");$w->size=5; echo $w->IOValue('tva_rate','') ?></td>
    +00215    <td> <? $w=new widget("textarea"); $w->heigh=2;$w->width=20;echo $w->IOValue('tva_comment','') ?></td>
    +00216    <td> <? $w=new widget("text"); $w->size=10;echo $w->IOValue('tva_poste','') ?></td>
    +00217 </Tr>
    +00218 </table>
    +00219 <input type="submit" value="Confirme" name="confirm_add">
    +00220 <input type="submit" value="Cancel" name="no">
     00221 
    -00223   // mod
    -00224   if ( isset ( $_REQUEST['mod'])) 
    -00225     {
    -00226 
    -00227       echo_debug("parametre",__LINE__,"modifie ".$_POST['tva_id']);
    -00228       echo "Tva à modifier";
    -00229       $index=$_POST['tva_id'];
    -00230 
    -00231       echo '<FORM method="post">';
    -00232       echo '<input type="hidden" name="tva_id" value="'.$index.'">';
    -00233 ?>
    -00234 <table>
    -00235    <TR>
    -00236    <th>Label</TH>
    -00237    <th>Taux</th>
    -00238    <th>Commentaire</th>
    -00239    <th>Poste</th>
    -00240    </tr>
    -00241 <tr valign="top">
    -00242    <td> <? $w=new widget("text");$w->size=20; echo $w->IOValue('tva_label',$a[$index]['tva_label']) ?></td>
    -00243    <td> <? $w=new widget("text");$w->size=5; echo $w->IOValue('tva_rate',$a[$index]['tva_rate']) ?></td>
    -00244    <td> <? $w=new widget("textarea"); $w->heigh=2;$w->width=20;
    -00245    echo $w->IOValue('tva_comment',$a[$index]['tva_comment']) ?></td>
    -00246    <td> <? $w=new widget("text");$w->size=5; echo $w->IOValue('tva_poste',$a[$index]['tva_poste']) ?></td>
    -00247 </Tr>
    -00248 </table>
    -00249 <input type="submit" value="Confirme" name="confirm_mod">
    -00250 <input type="submit" value="Cancel" name="no">
    -00251  </FORM>
    -00252 <? 
    -00253     }
    -00254 
    -00255 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00222 </FORM> +00223 <? } +00224 +00226 // mod +00227 if ( isset ( $_REQUEST['mod'])) +00228 { +00229 +00230 echo_debug("parametre",__LINE__,"modifie ".$_POST['tva_id']); +00231 echo "Tva à modifier"; +00232 $index=$_POST['tva_id']; +00233 +00234 echo '<FORM method="post">'; +00235 echo '<input type="hidden" name="tva_id" value="'.$index.'">'; +00236 ?> +00237 <table> +00238 <TR> +00239 <th>Label</TH> +00240 <th>Taux</th> +00241 <th>Commentaire</th> +00242 <th>Poste</th> +00243 </tr> +00244 <tr valign="top"> +00245 <td> <? $w=new widget("text");$w->size=20; echo $w->IOValue('tva_label',$a[$index]['tva_label']) ?></td> +00246 <td> <? $w=new widget("text");$w->size=5; echo $w->IOValue('tva_rate',$a[$index]['tva_rate']) ?></td> +00247 <td> <? $w=new widget("textarea"); $w->heigh=2;$w->width=20; +00248 echo $w->IOValue('tva_comment',$a[$index]['tva_comment']) ?></td> +00249 <td> <? $w=new widget("text");$w->size=5; echo $w->IOValue('tva_poste',$a[$index]['tva_poste']) ?></td> +00250 </Tr> +00251 </table> +00252 <input type="submit" value="Confirme" name="confirm_mod"> +00253 <input type="submit" value="Cancel" name="no"> +00254 </FORM> +00255 <? +00256 } +00257 +00258 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/tva_8inc_8php.html b/doc/developper/html/tva_8inc_8php.html index 30044552d..ba59fbbd4 100644 --- a/doc/developper/html/tva_8inc_8php.html +++ b/doc/developper/html/tva_8inc_8php.html @@ -4,10 +4,12 @@ - + -

    tva.inc.php File Reference

    +

    tva.inc.php File Reference

    included file for customizing with the vat (account,rate...) More... +

    +

    Go to the source code of this file. @@ -49,7 +51,12 @@
    $w width = 20
    -


    Variable Documentation

    +

    Detailed Description

    +included file for customizing with the vat (account,rate...) +

    + +

    +Definition in file tva.inc.php.


    Variable Documentation

    @@ -72,7 +79,7 @@

    -Definition at line 38 of file tva.inc.php. +Definition at line 41 of file tva.inc.php.

    @@ -97,7 +104,7 @@ Definition at line 38

    -Definition at line 165 of file tva.inc.php. +Definition at line 168 of file tva.inc.php.

    @@ -122,7 +129,7 @@ Definition at line 165

    -Definition at line 80 of file tva.inc.php. +Definition at line 83 of file tva.inc.php.

    @@ -147,9 +154,9 @@ Definition at line 80

    -Definition at line 62 of file tva.inc.php. +Definition at line 65 of file tva.inc.php.

    -Referenced by fiche::blank(), and fiche::Display(). +Referenced by fiche::blank(), and fiche::Display().

    @@ -174,7 +181,7 @@ Referenced by fiche::b

    -Definition at line 79 of file tva.inc.php. +Definition at line 82 of file tva.inc.php.

    @@ -199,7 +206,7 @@ Definition at line 79

    -Definition at line 72 of file tva.inc.php. +Definition at line 75 of file tva.inc.php.

    @@ -224,7 +231,7 @@ Definition at line 72

    -Definition at line 36 of file tva.inc.php. +Definition at line 39 of file tva.inc.php.

    @@ -249,9 +256,9 @@ Definition at line 36

    -Definition at line 33 of file tva.inc.php. +Definition at line 36 of file tva.inc.php.

    -Referenced by ComputeTotalVat(), and ComputeVat(). +Referenced by ComputeTotalVat(), and ComputeVat().

    @@ -276,7 +283,7 @@ Referenced by ComputeT

    -Definition at line 34 of file tva.inc.php. +Definition at line 37 of file tva.inc.php.

    @@ -301,7 +308,7 @@ Definition at line 34

    -Definition at line 37 of file tva.inc.php. +Definition at line 40 of file tva.inc.php.

    @@ -326,7 +333,7 @@ Definition at line 37

    -Definition at line 35 of file tva.inc.php. +Definition at line 38 of file tva.inc.php.

    @@ -351,9 +358,9 @@ Definition at line 35

    -Definition at line 91 of file tva.inc.php. +Definition at line 94 of file tva.inc.php.

    -Referenced by TransferCSV(), and VerifImport(). +Referenced by TransferCSV(), and VerifImport().

    @@ -378,7 +385,7 @@ Referenced by TransferC

    -Definition at line 129 of file tva.inc.php. +Definition at line 132 of file tva.inc.php.

    @@ -403,9 +410,9 @@ Definition at line 129

    -Definition at line 212 of file tva.inc.php. +Definition at line 215 of file tva.inc.php.

    -Referenced by widget::widget(). +Referenced by widget::widget().

    @@ -430,7 +437,7 @@ Referenced by widget:

    -Definition at line 130 of file tva.inc.php. +Definition at line 133 of file tva.inc.php.

    @@ -455,9 +462,9 @@ Definition at line 130

    -Definition at line 209 of file tva.inc.php. +Definition at line 212 of file tva.inc.php.

    -Referenced by Cezpdf::Cezpdf(), Creport::dots(), EncodeForm(), Cezpdf::ezPRVTaddPageNumbers(), Cezpdf::ezPrvtGetTextWidth(), Cezpdf::ezPrvtTableColumnHeadings(), Cezpdf::ezStartPageNumbers(), Cezpdf::ezText(), jrn_navigation_bar(), ShowFormTransfert(), u_ShowMenuRecherche(), VerifImport(), and widget::widget(). +Referenced by Cezpdf::Cezpdf(), Creport::dots(), EncodeForm(), Cezpdf::ezPRVTaddPageNumbers(), Cezpdf::ezPrvtGetTextWidth(), Cezpdf::ezPrvtTableColumnHeadings(), Cezpdf::ezStartPageNumbers(), Cezpdf::ezText(), jrn_navigation_bar(), ShowFormTransfert(), u_ShowMenuRecherche(), VerifImport(), and widget::widget().

    @@ -482,7 +489,7 @@ Referenced by Cezpdf::

    -Definition at line 131 of file tva.inc.php. +Definition at line 134 of file tva.inc.php.

    @@ -507,12 +514,12 @@ Definition at line 131

    -Definition at line 212 of file tva.inc.php. +Definition at line 215 of file tva.inc.php.

    -Referenced by Cezpdf::ezColumnsStart(), Cezpdf::ezImage(), Cezpdf::ezNewPage(), Cezpdf::ezTable(), Cpdf::filledRectangle(), Cpdf::rectangle(), Cpdf::selectFont(), Cpdf::setLineStyle(), ShowMenuCompta(), ShowMenuParam(), VerifImport(), and widget::widget(). +Referenced by Cezpdf::ezColumnsStart(), Cezpdf::ezImage(), Cezpdf::ezNewPage(), Cezpdf::ezTable(), Cpdf::filledRectangle(), Cpdf::rectangle(), Cpdf::selectFont(), Cpdf::setLineStyle(), ShowMenuCompta(), ShowMenuParam(), VerifImport(), and widget::widget(). -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__action__ach_8php-source.html b/doc/developper/html/user__action__ach_8php-source.html index e064f8c83..cd70ae603 100644 --- a/doc/developper/html/user__action__ach_8php-source.html +++ b/doc/developper/html/user__action__ach_8php-source.html @@ -4,7 +4,7 @@ - +

    user_action_ach.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,297 +27,301 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 echo_debug('user_action_ach.php',__LINE__,"include user_action_ach.php");
    -00022 require_once("user_form_ach.php");
    -00023 require_once ("preference.php");
    -00024 require_once ("user_common.php");
    -00025 require_once("class_widget.php");
    -00026 $cn=DbConnect($_SESSION['g_dossier']);
    -00027 
    -00028 if ( ! isset ($_GET['action']) && ! isset ($_POST["action"]) ) {
    -00029   exit;
    -00030 
    -00031 }
    -00032 $action=(isset($_GET['action']))?$_GET['action']:$_POST['action'];
    -00033 
    -00034 // action = new
    -00035 if ( $action == 'new' ) {
    -00036 // We request a new form
    -00037   // Check privilege
    -00038   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
    -00039        NoAccess();
    -00040        exit -1;
    -00041   }
    -00042 
    -00043         if ( isset($_GET['blank'] )) {
    -00044           // Submit button in the form
    -00045           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    -00046                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver" ID="SubmitButton">';
    -00047           $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,false);
    -00048           echo '<div class="u_redcontent">';
    -00049           echo $r;
    -00050           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    -00051           echo "</div>";
    -00052 
    -00053 
    -00054         }
    -00055 
    -00056         // Add an item
    -00057         if ( isset ($_POST['add_item'])) {
    -00058           // Add a line
    -00059           $nb_number=$_POST["nb_item"];
    -00060           $nb_number++;
    -00061 
    -00062           // submit button in the form
    -00063           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    -00064                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    -00065 
    -00066           $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,false,  
    -00067                           $nb_number);
    -00068           echo '<div class="u_redcontent">';
    -00069           echo $r;
    -00070           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    -00071           echo "</div>";
    -00072         }
    -00073         // Correct it
    -00074         if ( isset ($_POST['correct'])) {
    -00075           // Get number of  lines
    -00076           $nb_number=$_POST["nb_item"];
    -00077 
    -00078           // submit button in the form
    -00079           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    -00080                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    -00081 
    -00082           $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,false,  $nb_number);
    -00083           echo '<div class="u_redcontent">';
    -00084           echo $r;
    -00085           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    -00086           echo "</div>";
    -00087           return;
    -00088         }
    -00089 
    -00090 
    -00091         // View the charge and show a submit button to save it 
    -00092         if ( isset ($_POST['view_invoice']) and 
    -00093              ! isset ($_POST['save'])) {
    -00094         $nb_number=$_POST["nb_item"];
    -00095         $submit='<INPUT TYPE="SUBMIT" name="save" value="Confirmer">';
    -00096         $submit.='<INPUT TYPE="SUBMIT" name="correct" value="Corriger">';
    -00097         if ( form_verify_input ($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number) == true ) {
    -00098           // Should use a read only view instead of FormAch
    -00099           // where we can check
    -00100           $r=FormAchView($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,$nb_number);
    -00101         } else {
    -00102           // if something goes wrong, correct it
    -00103           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    -00104                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    -00105           $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit, false, $nb_number);
    -00106         }
    -00107         echo '<div class="u_redcontent">';
    -00108         echo $r;
    -00109         echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    -00110         echo "</div>";
    +00024 echo_debug('user_action_ach.php',__LINE__,"include user_action_ach.php");
    +00025 require_once("user_form_ach.php");
    +00026 require_once ("preference.php");
    +00027 require_once ("user_common.php");
    +00028 require_once("class_widget.php");
    +00029 require_once("class_jrn.php");
    +00030 $cn=DbConnect($_SESSION['g_dossier']);
    +00031 
    +00032 if ( ! isset ($_GET['action']) && ! isset ($_POST["action"]) ) {
    +00033   exit;
    +00034 
    +00035 }
    +00036 $action=(isset($_GET['action']))?$_GET['action']:$_POST['action'];
    +00037 
    +00038 // action = new
    +00039 if ( $action == 'new' ) {
    +00040 // We request a new form
    +00041   // Check privilege
    +00042   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
    +00043        NoAccess();
    +00044        exit -1;
    +00045   }
    +00046 
    +00047         if ( isset($_GET['blank'] )) {
    +00048           // Submit button in the form
    +00049           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    +00050                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver" ID="SubmitButton">';
    +00051           $jrn=new jrn($cn,  $_GET['p_jrn']);
    +00052           $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,false,$jrn->getDefLine('deb'));
    +00053           echo '<div class="u_redcontent">';
    +00054           echo $r;
    +00055           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    +00056           echo "</div>";
    +00057 
    +00058 
    +00059         }
    +00060 
    +00061         // Add an item
    +00062         if ( isset ($_POST['add_item'])) {
    +00063           // Add a line
    +00064           $nb_number=$_POST["nb_item"];
    +00065           $nb_number++;
    +00066 
    +00067           // submit button in the form
    +00068           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    +00069                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00070 
    +00071           $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,false,  
    +00072                           $nb_number);
    +00073           echo '<div class="u_redcontent">';
    +00074           echo $r;
    +00075           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    +00076           echo "</div>";
    +00077         }
    +00078         // Correct it
    +00079         if ( isset ($_POST['correct'])) {
    +00080           // Get number of  lines
    +00081           $nb_number=$_POST["nb_item"];
    +00082 
    +00083           // submit button in the form
    +00084           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    +00085                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00086 
    +00087           $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,false,  $nb_number);
    +00088           echo '<div class="u_redcontent">';
    +00089           echo $r;
    +00090           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    +00091           echo "</div>";
    +00092           return;
    +00093         }
    +00094 
    +00095 
    +00096         // View the charge and show a submit button to save it 
    +00097         if ( isset ($_POST['view_invoice']) and 
    +00098              ! isset ($_POST['save'])) {
    +00099         $nb_number=$_POST["nb_item"];
    +00100         $submit='<INPUT TYPE="SUBMIT" name="save" value="Confirmer">';
    +00101         $submit.='<INPUT TYPE="SUBMIT" name="correct" value="Corriger">';
    +00102         if ( form_verify_input ($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number) == true ) {
    +00103           // Should use a read only view instead of FormAch
    +00104           // where we can check
    +00105           $r=FormAchView($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,$nb_number);
    +00106         } else {
    +00107           // if something goes wrong, correct it
    +00108           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    +00109                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00110           $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit, false, $nb_number);
     00111         }
    -00112         // Save the charge into database
    -00113         if ( isset($_POST['save'] )) {
    -00114           // Get number of  lines
    -00115           $nb_number=$_POST["nb_item"];
    -00116 
    -00117           // submit button in the form
    -00118           $submit='<h2 class="info">Recorded</h2>';
    -00119           $r=RecordSell($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']);
    -00120           $r=FormAchView($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,"",$nb_number,false);
    -00121           echo '<div class="u_redcontent">';
    -00122           echo $submit;
    -00123           echo $r;
    -00124           echo "</div>";
    -00125           
    -00126         }
    -00127         
    -00128 
    -00129 }
    -00130 if ( $action == 'voir_jrn' ) {
    -00131   // Check privilege
    -00132   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1  )    {
    -00133        NoAccess();
    -00134        exit -1;
    -00135   }
    -00136 ?>
    -00137 <div class="u_redcontent">
    -00138 <form method= "get" action="user_jrn.php">
    -00139 
    -00140 <?
    -00141 $hid=new widget("hidden");
    -00142 
    -00143 $hid->name="p_jrn";
    -00144 $hid->value=$p_jrn;
    -00145 echo $hid->IOValue();
    -00146 
    -00147 $hid->name="jrn_type";
    -00148 $hid->value=$jrn_type;
    -00149 echo $hid->IOValue();
    -00150 
    -00151 $hid->name="action";
    -00152 $hid->value="voir_jrn";
    -00153 echo $hid->IOValue();
    -00154 
    +00112         echo '<div class="u_redcontent">';
    +00113         echo $r;
    +00114         echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    +00115         echo "</div>";
    +00116         }
    +00117         // Save the charge into database
    +00118         if ( isset($_POST['save'] )) {
    +00119           // Get number of  lines
    +00120           $nb_number=$_POST["nb_item"];
    +00121 
    +00122           // submit button in the form
    +00123           $submit='<h2 class="info">Recorded</h2>';
    +00124           $r=RecordSell($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']);
    +00125           $r=FormAchView($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,"",$nb_number,false);
    +00126           echo '<div class="u_redcontent">';
    +00127           echo $submit;
    +00128           echo $r;
    +00129           echo "</div>";
    +00130           
    +00131         }
    +00132         
    +00133 
    +00134 }
    +00135 if ( $action == 'voir_jrn' ) {
    +00136   // Check privilege
    +00137   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1  )    {
    +00138        NoAccess();
    +00139        exit -1;
    +00140   }
    +00141 ?>
    +00142 <div class="u_redcontent">
    +00143 <form method= "get" action="user_jrn.php">
    +00144 
    +00145 <?
    +00146 $hid=new widget("hidden");
    +00147 
    +00148 $hid->name="p_jrn";
    +00149 $hid->value=$p_jrn;
    +00150 echo $hid->IOValue();
    +00151 
    +00152 $hid->name="jrn_type";
    +00153 $hid->value=$jrn_type;
    +00154 echo $hid->IOValue();
     00155 
    -00156 $w=new widget("select");
    -00157 $w->name="p_periode";
    -00158 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
    -00159 $User=new cl_user($cn);
    -00160 $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode();
    -00161 $w->selected=$current;
    -00162 
    -00163 echo 'Période  '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider');
    -00164 ?>
    -00165 </form>
    -00166 <?
    -00167     // Ask to update payment
    -00168     if ( isset ( $_POST['paid'])) 
    -00169       {
    -00170         // reset all the paid flag because the checkbox is post only
    -00171         // when checked
    -00172         foreach ($_POST as $name=>$paid) 
    -00173           {
    -00174             list($ad) = sscanf($name,"set_jr_id%d");
    -00175             if ( $ad == null ) continue;
    -00176             $sql="update jrn set jr_rapt='' where jr_id=$ad";
    -00177             $Res=ExecSql($cn,$sql);
    -00178 
    -00179           }
    -00180         // set a paid flag for the checked box
    -00181         foreach ($_POST as $name=>$paid) 
    -00182           {
    -00183             list ($id) = sscanf ($name,"rd_paid%d");
    -00184 
    -00185             if ( $id == null ) continue;
    -00186             echo "Mise à jour $id";
    -00187             $paid=($paid=='on')?'paid':'';
    -00188             $sql="update jrn set jr_rapt='$paid' where jr_id=$id";
    -00189             $Res=ExecSql($cn,$sql);
    -00190           }
    -00191 
    -00192       }
    -00193 
    -00194  // Show list of sell
    -00195   echo_debug ("user_action_ach.php");
    -00196  // Date - date of payment - Customer - amount
    -00197    $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn'];
    +00156 $hid->name="action";
    +00157 $hid->value="voir_jrn";
    +00158 echo $hid->IOValue();
    +00159 
    +00160 
    +00161 $w=new widget("select");
    +00162 $w->name="p_periode";
    +00163 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
    +00164 $User=new cl_user($cn);
    +00165 $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode();
    +00166 $w->selected=$current;
    +00167 
    +00168 echo 'Période  '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider');
    +00169 ?>
    +00170 </form>
    +00171 <?
    +00172     // Ask to update payment
    +00173     if ( isset ( $_POST['paid'])) 
    +00174       {
    +00175         // reset all the paid flag because the checkbox is post only
    +00176         // when checked
    +00177         foreach ($_POST as $name=>$paid) 
    +00178           {
    +00179             list($ad) = sscanf($name,"set_jr_id%d");
    +00180             if ( $ad == null ) continue;
    +00181             $sql="update jrn set jr_rapt='' where jr_id=$ad";
    +00182             $Res=ExecSql($cn,$sql);
    +00183 
    +00184           }
    +00185         // set a paid flag for the checked box
    +00186         foreach ($_POST as $name=>$paid) 
    +00187           {
    +00188             list ($id) = sscanf ($name,"rd_paid%d");
    +00189 
    +00190             if ( $id == null ) continue;
    +00191             echo "Mise à jour $id";
    +00192             $paid=($paid=='on')?'paid':'';
    +00193             $sql="update jrn set jr_rapt='$paid' where jr_id=$id";
    +00194             $Res=ExecSql($cn,$sql);
    +00195           }
    +00196 
    +00197       }
     00198 
    -00199    $step=$_SESSION['g_pagesize'];
    -00200    $page=(isset($_GET['offset']))?$_GET['page']:1;
    -00201    $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    -00202 
    -00203    list ($max_ligne,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    -00204    $bar=jrn_navigation_bar($offset,$max_ligne,$step,$page);
    -00205    echo '<form method="POST">';
    -00206 
    -00207    echo $bar;
    -00208    echo $list;
    -00209    echo $bar;
    -00210    $hid=new widget();
    -00211    echo $hid->Submit('paid','Mis à jour paiement');
    -00212    echo '</form>';
    -00213    echo '</div>';
    -00214 }
    -00215 if ( $action == 'voir_jrn_non_paye' ) {
    -00216   // Check privilege
    -00217   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    -00218        NoAccess();
    -00219        exit -1;
    -00220   }
    -00221   // Ask to update payment
    -00222   if ( isset ( $_POST['paid'])) 
    -00223     {
    -00224       // reset all the paid flag because the checkbox is post only
    -00225       // when checked
    -00226       foreach ($_POST as $name=>$paid) 
    -00227         {
    -00228           list($ad) = sscanf($name,"set_jr_id%d");
    -00229           if ( $ad == null ) continue;
    -00230           $sql="update jrn set jr_rapt='' where jr_id=$ad";
    -00231           $Res=ExecSql($cn,$sql);
    -00232           
    -00233         }
    -00234       // set a paid flag for the checked box
    -00235       foreach ($_POST as $name=>$paid) 
    -00236           {
    -00237             list ($id) = sscanf ($name,"rd_paid%d");
    -00238             
    -00239             if ( $id == null ) continue;
    -00240             echo "Mise à jour $id";
    -00241             $paid=($paid=='on')?'paid':'';
    -00242             $sql="update jrn set jr_rapt='$paid' where jr_id=$id";
    -00243             $Res=ExecSql($cn,$sql);
    -00244           }
    -00245       
    -00246     }
    -00247 
    -00248 // Show list of unpaid sell
    -00249 // Date - date of payment - Customer - amount
    -00250   $sql=SQL_LIST_UNPAID_INVOICE_DATE_LIMIT." and jr_def_id=".$_GET['p_jrn']  ;
    -00251   $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    -00252   $step=$_SESSION['g_pagesize'];
    -00253   $page=(isset($_GET['offset']))?$_GET['page']:1;
    -00254 
    -00255   list ($max_line,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    -00256   //  $bar=jrn_navigation_bar($offset,$max_ligne,$step,$page);
    -00257 
    -00258 
    -00259   $sql=SQL_LIST_UNPAID_INVOICE." and jr_def_id=".$_GET['p_jrn']  ;
    -00260   list ($max_line2,$list2)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    -00261 
    -00262   // Get the max line
    -00263   $m=($max_line2>$max_line)?$max_line2:$max_line;
    -00264   $bar2=jrn_navigation_bar($offset,$m,$step,$page);
    -00265 
    -00266     echo '<div class="u_redcontent">';
    -00267     echo '<h2 class="info"> Echeance dépassée </h2>';
    -00268     echo '<FORM METHOD="POST">';
    -00269     echo $bar2;
    -00270     echo $list;
    +00199  // Show list of sell
    +00200   echo_debug ("user_action_ach.php");
    +00201  // Date - date of payment - Customer - amount
    +00202    $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn'];
    +00203 
    +00204    $step=$_SESSION['g_pagesize'];
    +00205    $page=(isset($_GET['offset']))?$_GET['page']:1;
    +00206    $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    +00207 
    +00208    list ($max_ligne,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    +00209    $bar=jrn_navigation_bar($offset,$max_ligne,$step,$page);
    +00210    echo '<form method="POST">';
    +00211 
    +00212    echo "<hr> $bar";
    +00213    echo $list;
    +00214    echo "$bar <hr>";
    +00215    $hid=new widget();
    +00216    if ( $max_ligne != 0 )
    +00217      echo $hid->Submit('paid','Mise à jour paiement');
    +00218    echo '</form>';
    +00219    echo '</div>';
    +00220 }
    +00221 if ( $action == 'voir_jrn_non_paye' ) {
    +00222   // Check privilege
    +00223   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    +00224        NoAccess();
    +00225        exit -1;
    +00226   }
    +00227   // Ask to update payment
    +00228   if ( isset ( $_POST['paid'])) 
    +00229     {
    +00230       // reset all the paid flag because the checkbox is post only
    +00231       // when checked
    +00232       foreach ($_POST as $name=>$paid) 
    +00233         {
    +00234           list($ad) = sscanf($name,"set_jr_id%d");
    +00235           if ( $ad == null ) continue;
    +00236           $sql="update jrn set jr_rapt='' where jr_id=$ad";
    +00237           $Res=ExecSql($cn,$sql);
    +00238           
    +00239         }
    +00240       // set a paid flag for the checked box
    +00241       foreach ($_POST as $name=>$paid) 
    +00242           {
    +00243             list ($id) = sscanf ($name,"rd_paid%d");
    +00244             
    +00245             if ( $id == null ) continue;
    +00246             echo "Mise à jour $id";
    +00247             $paid=($paid=='on')?'paid':'';
    +00248             $sql="update jrn set jr_rapt='$paid' where jr_id=$id";
    +00249             $Res=ExecSql($cn,$sql);
    +00250           }
    +00251       
    +00252     }
    +00253 
    +00254 // Show list of unpaid sell
    +00255 // Date - date of payment - Customer - amount
    +00256   $sql=SQL_LIST_UNPAID_INVOICE_DATE_LIMIT." and jr_def_id=".$_GET['p_jrn']  ;
    +00257   $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    +00258   $step=$_SESSION['g_pagesize'];
    +00259   $page=(isset($_GET['offset']))?$_GET['page']:1;
    +00260 
    +00261   list ($max_line,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    +00262   //  $bar=jrn_navigation_bar($offset,$max_ligne,$step,$page);
    +00263 
    +00264 
    +00265   $sql=SQL_LIST_UNPAID_INVOICE." and jr_def_id=".$_GET['p_jrn']  ;
    +00266   list ($max_line2,$list2)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    +00267 
    +00268   // Get the max line
    +00269   $m=($max_line2>$max_line)?$max_line2:$max_line;
    +00270   $bar2=jrn_navigation_bar($offset,$m,$step,$page);
     00271 
    -00272 
    -00273     echo  '<h2 class="info"> Non Payée </h2>';
    -00274     echo $list2;
    -00275     echo $bar2;
    -00276     $hid=new widget();
    -00277     echo $hid->Submit('paid','Mis à jour paiement');
    -00278     echo '</form>';
    -00279 
    -00280     echo '</div>';
    -00281 }
    -00282 
    -00283 //Search
    -00284 if ( $action == 'search' ) {
    -00285   // Check privilege
    -00286   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    -00287        NoAccess();
    -00288        exit -1;
    -00289   }
    -00290 
    -00291   // PhpSessid
    -00292   $sessid=$_REQUEST['PHPSESSID'];
    -00293   // Search modules
    -00294   $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    -00295   $step=$_SESSION['g_pagesize'];
    -00296   $page=(isset($_GET['offset']))?$_GET['page']:1;
    +00272     echo '<div class="u_redcontent">';
    +00273     echo '<h2 class="info"> Echeance dépassée </h2>';
    +00274     echo '<FORM METHOD="POST">';
    +00275     echo $bar2;
    +00276     echo $list;
    +00277 
    +00278 
    +00279     echo  '<h2 class="info"> Non Payée </h2>';
    +00280     echo $list2;
    +00281     echo $bar2;
    +00282     $hid=new widget();
    +00283    if ( $m != 0 )
    +00284      echo $hid->Submit('paid','Mise à jour paiement');
    +00285     echo '</form>';
    +00286 
    +00287     echo '</div>';
    +00288 }
    +00289 
    +00290 //Search
    +00291 if ( $action == 'search' ) {
    +00292   // Check privilege
    +00293   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    +00294        NoAccess();
    +00295        exit -1;
    +00296   }
     00297 
    -00298 // display a search box
    -00299   $search_box=u_ShowMenuRecherche($cn,$_GET['p_jrn'],$sessid,$_POST);
    -00300   echo '<DIV class="u_redcontent">';
    -00301   echo $search_box; 
    -00302   // if nofirst is set then show result
    -00303   if ( isset ($_GET['nofirst'] ) )     {
    -00304     list ($max_line,$a)=ListJrn($cn,$_GET['p_jrn'],"",$_POST);
    -00305     echo $a;
    -00306   }
    -00307   echo '</DIV>'; 
    -00308 }
    -00309 include("user_update.php");
    -00310 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00298 // PhpSessid +00299 $sessid=$_REQUEST['PHPSESSID']; +00300 // Search modules +00301 $offset=(isset($_GET['offset']))?$_GET['offset']:0; +00302 $step=$_SESSION['g_pagesize']; +00303 $page=(isset($_GET['offset']))?$_GET['page']:1; +00304 +00305 // display a search box +00306 $search_box=u_ShowMenuRecherche($cn,$_GET['p_jrn'],$sessid,$_POST); +00307 echo '<DIV class="u_redcontent">'; +00308 echo $search_box; +00309 // if nofirst is set then show result +00310 if ( isset ($_GET['nofirst'] ) ) { +00311 list ($max_line,$a)=ListJrn($cn,$_GET['p_jrn'],"",$_POST); +00312 echo $a; +00313 } +00314 echo '</DIV>'; +00315 } +00316 include("user_update.php"); +00317 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__action__ach_8php.html b/doc/developper/html/user__action__ach_8php.html index aee8b8f99..0d6e4ebb7 100644 --- a/doc/developper/html/user__action__ach_8php.html +++ b/doc/developper/html/user__action__ach_8php.html @@ -4,10 +4,12 @@ - + -

    user_action_ach.php File Reference

    +

    user_action_ach.php File Reference

    included file for the ledger of expenses More... +

    +

    Go to the source code of this file. @@ -16,9 +18,9 @@ - + - + @@ -59,7 +61,12 @@
     exit
     return
     $r = FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,false,$jrn->getDefLine('deb'))
     $r = FormAchView($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,"",$nb_number,false)
     return
     $hid = new widget("hidden")
     $search_box = u_ShowMenuRecherche($cn,$_GET['p_jrn'],$sessid,$_POST)
    -


    Variable Documentation

    +

    Detailed Description

    +included file for the ledger of expenses +

    + +

    +Definition in file user_action_ach.php.


    Variable Documentation

    @@ -82,9 +89,7 @@

    -Definition at line 204 of file user_action_ach.php. -

    -Referenced by Customer::Summary(), and ViewFiche(). +Definition at line 209 of file user_action_ach.php.

    @@ -109,7 +114,7 @@ Referenced by Custo

    -Definition at line 264 of file user_action_ach.php. +Definition at line 270 of file user_action_ach.php.

    @@ -134,7 +139,7 @@ Definition at line 26 of file user_action_ach.php. +Definition at line 30 of file user_action_ach.php.

    @@ -159,7 +164,7 @@ Definition at line 160 of file user_action_ach.php. +Definition at line 165 of file user_action_ach.php.

    @@ -184,7 +189,7 @@ Definition at line 141 of file user_action_ach.php. +Definition at line 146 of file user_action_ach.php.

    @@ -209,7 +214,7 @@ Definition at line 263 of file user_action_ach.php. +Definition at line 269 of file user_action_ach.php.

    @@ -234,9 +239,7 @@ Definition at line 201 of file user_action_ach.php. -

    -Referenced by jrn_navigation_bar(), ListJrn(), Customer::Summary(), and ViewFiche(). +Definition at line 206 of file user_action_ach.php.

    @@ -261,9 +264,7 @@ Referenced by jrn_navi

    -Definition at line 200 of file user_action_ach.php. -

    -Referenced by Customer::Summary(), and ViewFiche(). +Definition at line 205 of file user_action_ach.php.

    @@ -288,7 +289,7 @@ Referenced by Custo

    -Definition at line 187 of file user_action_ach.php. +Definition at line 192 of file user_action_ach.php.

    @@ -313,16 +314,16 @@ Definition at line 158 of file user_action_ach.php. +Definition at line 163 of file user_action_ach.php. -

    +

    @@ -338,9 +339,9 @@ Definition at line 120 of file user_action_ach.php. +Definition at line 52 of file user_action_ach.php.

    -Referenced by fiche::blank(), ChangeStock(), cl_user::Check(), ComputeTotalVat(), parm_code::Display(), fiche_def_ref::Display(), fiche::Display(), fiche_def::Display(), FormAchInput(), FormAchView(), Invoice::FormAdd(), Document_modele::FormAdd(), FormFin(), FormODS(), FormVenInput(), FormVenteView(), fiche_def_ref::Get(), GetArray(), GetConcerned(), GetDossierName(), getFicheNameCode(), GetGrpt(), poste::GetName(), Balance::GetRow(), GetSolde(), poste::GetSolde(), poste::GetSoldeDetail(), GetTvaRate(), parm_code::Input(), fiche_def_ref::Input(), InsertStockGoods(), widget::IOValue(), jrn_navigation_bar(), ListJrn(), parm_code::LoadAll(), make_array(), new_fiche(), RecordInvoice(), RecordSell(), Invoice::Save(), Document_modele::Save(), save_upload_document(), ShowMenuAdvanced(), ShowMenuCompta(), Customer::Summary(), TransferCSV(), u_ShowMenuRecherche(), UpdateJrn(), ViewDetailStock(), and ViewStock(). +Referenced by Document::a_ref(), fiche::blank(), ChangeStock(), cl_user::Check(), ComputeTotalVat(), action::Confirm(), Document_modele::Delete(), parm_code::Display(), fiche_def_ref::Display(), fiche::Display(), fiche_def::Display(), action::Display(), Document_modele::form(), FormAchInput(), FormAchView(), Invoice::FormAdd(), FormFin(), FormODS(), FormVenInput(), FormVenteView(), fiche_def_ref::Get(), Document_type::get(), GetArray(), fiche::GetByQCode(), GetConcerned(), jrn::GetDefLine(), GetDossierName(), getFicheNameCode(), GetGrpt(), poste::GetName(), fiche::getName(), Balance::GetRow(), GetSolde(), poste::GetSolde(), poste::GetSoldeDetail(), GetTvaRate(), parm_code::Input(), fiche_def_ref::Input(), InsertStockGoods(), widget::IOValue(), jrn_navigation_bar(), ListJrn(), parm_code::LoadAll(), make_array(), Document_modele::myList(), action::myList(), new_fiche(), RecordInvoice(), RecordSell(), Document::Replace(), Invoice::Save(), Document_modele::Save(), save_upload_document(), action::SaveStage2(), ShowMenuAdvanced(), ShowMenuCompta(), Customer::Summary(), contact::Summary(), TransferCSV(), u_ShowMenuRecherche(), UpdateJrn(), Document::Upload(), ViewDetailStock(), and ViewStock().

    - +
    $r = FormAchView($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,"",$nb_number,false) $r = FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,false,$jrn->getDefLine('deb'))

    @@ -365,7 +366,7 @@ Referenced by fiche::b

    -Definition at line 177 of file user_action_ach.php. +Definition at line 182 of file user_action_ach.php.

    @@ -390,7 +391,7 @@ Definition at line 299 of file user_action_ach.php. +Definition at line 306 of file user_action_ach.php.

    @@ -415,9 +416,9 @@ Definition at line 292 of file user_action_ach.php. +Definition at line 299 of file user_action_ach.php.

    -Referenced by RecordJrn(), UpdateJrn(), and ViewJrn(). +Referenced by RecordJrn(), UpdateJrn(), and ViewJrn().

    @@ -442,7 +443,7 @@ Referenced by RecordJrn(),

    -Definition at line 176 of file user_action_ach.php. +Definition at line 181 of file user_action_ach.php.

    @@ -467,9 +468,7 @@ Definition at line 199 of file user_action_ach.php. -

    -Referenced by jrn_navigation_bar(), and ViewFiche(). +Definition at line 204 of file user_action_ach.php.

    @@ -494,9 +493,9 @@ Referenced by jrn_navi

    -Definition at line 159 of file user_action_ach.php. +Definition at line 164 of file user_action_ach.php.

    -Referenced by GetAllUser(), ListJrn(), and ShowMenuJrnUser(). +Referenced by GetAllUser(), ListJrn(), and ShowMenuJrnUser().

    @@ -521,7 +520,7 @@ Referenced by GetAllUser()

    -Definition at line 156 of file user_action_ach.php. +Definition at line 161 of file user_action_ach.php.

    @@ -546,7 +545,7 @@ Definition at line 40 of file user_action_ach.php. +Definition at line 44 of file user_action_ach.php.

    @@ -571,10 +570,10 @@ Definition at line 143 of file user_action_ach.php. +Definition at line 148 of file user_action_ach.php. -

    +

    +Definition at line 88 of file user_action_ach.php.
    @@ -596,7 +595,7 @@ Definition at line 83 of file user_action_ach.php.

    @@ -621,7 +620,7 @@ Definition at line 161 of file user_action_ach.php. +Definition at line 166 of file user_action_ach.php.

    @@ -646,10 +645,10 @@ Definition at line 144 of file user_action_ach.php. +Definition at line 149 of file user_action_ach.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__action__fin_8php-source.html b/doc/developper/html/user__action__fin_8php-source.html index 35e32dc07..dc1a43712 100644 --- a/doc/developper/html/user__action__fin_8php-source.html +++ b/doc/developper/html/user__action__fin_8php-source.html @@ -4,7 +4,7 @@ - +

    user_action_fin.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,228 +27,228 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 echo_debug('user_action_fin.php',__LINE__,"include user_action_fin.php");
    -00022 // include_once("form_input.php");
    -00023 require_once("user_form_fin.php");
    -00024 include_once("class_widget.php");
    -00025 require_once("class_parm_code.php");
    -00026 
    -00027 $cn=DbConnect($_SESSION['g_dossier']);
    -00028 
    -00029 if ( ! isset ($_GET['action']) && ! isset ($_POST["action"]) ) {  
    -00030   return;
    -00031 }
    -00032 include_once ("preference.php");
    -00033 include_once ("user_common.php");
    -00034 
    -00035 $action=(isset($_GET['action']))?$_GET['action']:$_POST['action'];
    -00037 // action = new
    -00039 if ( $action == 'new' ) {
    -00040   // Check privilege
    -00041   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
    -00042        NoAccess();
    -00043        exit -1;
    -00044   }
    -00045 
    -00046 // We request a new form
    -00047         if ( isset($_GET['blank'] )) {
    -00048           // Submit button in the form
    -00049           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    -00050                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    -00051           // add a one-line calculator
    -00052 
    -00053 
    -00054           $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,null,false);
    -00055           echo '<div class="u_redcontent">';
    -00056           echo $r;
    -00057           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";
    -00058         
    -00059           echo "</div>";
    -00060 
    -00061 
    -00062         }
    -00063 
    -00064         // Add an item
    -00065         if ( isset ($_POST['add_item'])) {
    -00066           // Add a line
    -00067           $nb_number=$_POST["nb_item"];
    -00068           $nb_number++;
    -00069 
    -00070           // submit button in the form
    -00071           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    -00072                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00025 echo_debug('user_action_fin.php',__LINE__,"include user_action_fin.php");
    +00026 // include_once("form_input.php");
    +00027 require_once("user_form_fin.php");
    +00028 include_once("class_widget.php");
    +00029 require_once("class_parm_code.php");
    +00030 
    +00031 $cn=DbConnect($_SESSION['g_dossier']);
    +00032 
    +00033 if ( ! isset ($_GET['action']) && ! isset ($_POST["action"]) ) {  
    +00034   return;
    +00035 }
    +00036 include_once ("preference.php");
    +00037 include_once ("user_common.php");
    +00038 
    +00039 $action=(isset($_GET['action']))?$_GET['action']:$_POST['action'];
    +00041 // action = new
    +00043 if ( $action == 'new' ) {
    +00044   // Check privilege
    +00045   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
    +00046        NoAccess();
    +00047        exit -1;
    +00048   }
    +00049 
    +00050 // We request a new form
    +00051         if ( isset($_GET['blank'] )) {
    +00052           // Submit button in the form
    +00053           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    +00054                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00055           // add a one-line calculator
    +00056 
    +00057 
    +00058           $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,null,false);
    +00059           echo '<div class="u_redcontent">';
    +00060           echo $r;
    +00061           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";
    +00062         
    +00063           echo "</div>";
    +00064 
    +00065 
    +00066         }
    +00067 
    +00068         // Add an item
    +00069         if ( isset ($_POST['add_item'])) {
    +00070           // Add a line
    +00071           $nb_number=$_POST["nb_item"];
    +00072           $nb_number++;
     00073 
    -00074           $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
    -00075           echo '<div class="u_redcontent">';
    -00076           echo $r;
    -00077           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";
    -00078 
    -00079           echo "</div>";
    -00080         }
    -00081         // Correct it
    -00082         if ( isset ($_POST['correct'])) {
    -00083           // Get number of  lines
    -00084           $nb_number=$_POST["nb_item"];
    -00085 
    -00086           // submit button in the form
    -00087           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    -00088                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00074           // submit button in the form
    +00075           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    +00076                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00077 
    +00078           $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
    +00079           echo '<div class="u_redcontent">';
    +00080           echo $r;
    +00081           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";
    +00082 
    +00083           echo "</div>";
    +00084         }
    +00085         // Correct it
    +00086         if ( isset ($_POST['correct'])) {
    +00087           // Get number of  lines
    +00088           $nb_number=$_POST["nb_item"];
     00089 
    -00090           $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
    -00091           echo '<div class="u_redcontent">';
    -00092           echo $r;
    -00093           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";
    -00094 
    -00095           echo "</div>";
    -00096         }
    -00097 
    +00090           // submit button in the form
    +00091           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    +00092                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00093 
    +00094           $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
    +00095           echo '<div class="u_redcontent">';
    +00096           echo $r;
    +00097           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";
     00098 
    -00099         // View the charge and show a submit button to save it 
    -00100         if ( isset ($_POST['view_invoice']) ) {
    -00101         $nb_number=$_POST["nb_item"];
    -00102         $submit='<INPUT TYPE="SUBMIT" name="save" value="Confirmer">';
    -00103         $submit.='<INPUT TYPE="SUBMIT" name="correct" value="Corriger">';
    -00104         $r=form_verify_input($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number);
    -00105         // if something goes wrong correct it
    -00106         if ( $r == null ) 
    -00107         {
    -00108           // submit button in the form
    -00109           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    -00110                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    -00111 
    -00112           $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
    -00113         }
    -00114         else 
    -00115         {
    -00116                 $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,$nb_number);
    +00099           echo "</div>";
    +00100         }
    +00101 
    +00102 
    +00103         // View the charge and show a submit button to save it 
    +00104         if ( isset ($_POST['view_invoice']) ) {
    +00105         $nb_number=$_POST["nb_item"];
    +00106         $submit='<INPUT TYPE="SUBMIT" name="save" value="Confirmer">';
    +00107         $submit.='<INPUT TYPE="SUBMIT" name="correct" value="Corriger">';
    +00108         $r=form_verify_input($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number);
    +00109         // if something goes wrong correct it
    +00110         if ( $r == null ) 
    +00111         {
    +00112           // submit button in the form
    +00113           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article">
    +00114                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00115 
    +00116           $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
     00117         }
    -00118 
    -00119         echo '<div class="u_redcontent">';
    -00120         echo $r;
    -00121         echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";
    -00122         echo "</div>";
    -00123         }
    -00124         // Save the charge into database
    -00125         if ( isset($_POST['save'] )) {
    -00126           $r=RecordFin($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']);
    -00127           // Get number of  lines
    -00128           $nb_number=$_POST["nb_item"];
    -00129 
    -00130           // submit button in the form
    -00131           $submit='<h2 class="info">Recorded</h2>';
    -00132 
    -00133           $r.=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,  $nb_number,true);
    -00134           echo '<div class="u_redcontent">';
    -00135           echo $r;
    -00136           echo "</div>";
    -00137           
    -00138         }
    -00139         
    -00140 
    -00141 }
    -00143 // see jrn
    -00145 if ( $action == 'voir_jrn' ) {
    -00146   // Check privilege
    -00147   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    -00148        NoAccess();
    -00149        exit -1;
    -00150   }
    -00151 ?>
    -00152 <div class="u_redcontent">
    -00153 
    -00154 <form method= "get" action="user_jrn.php">
    -00155 
    -00156 <?
    -00157 $hid=new widget("hidden");
    -00158 
    -00159 $hid->name="p_jrn";
    -00160 $hid->value=$p_jrn;
    -00161 echo $hid->IOValue();
    +00118         else 
    +00119         {
    +00120                 $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,$nb_number);
    +00121         }
    +00122 
    +00123         echo '<div class="u_redcontent">';
    +00124         echo $r;
    +00125         echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."</div>";
    +00126         echo "</div>";
    +00127         }
    +00128         // Save the charge into database
    +00129         if ( isset($_POST['save'] )) {
    +00130           $r=RecordFin($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']);
    +00131           // Get number of  lines
    +00132           $nb_number=$_POST["nb_item"];
    +00133 
    +00134           // submit button in the form
    +00135           $submit='<h2 class="info">Recorded</h2>';
    +00136 
    +00137           $r.=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,  $nb_number,true);
    +00138           echo '<div class="u_redcontent">';
    +00139           echo $r;
    +00140           echo "</div>";
    +00141           
    +00142         }
    +00143         
    +00144 
    +00145 }
    +00147 // see jrn
    +00149 if ( $action == 'voir_jrn' ) {
    +00150   // Check privilege
    +00151   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    +00152        NoAccess();
    +00153        exit -1;
    +00154   }
    +00155 ?>
    +00156 <div class="u_redcontent">
    +00157 
    +00158 <form method= "get" action="user_jrn.php">
    +00159 
    +00160 <?
    +00161 $hid=new widget("hidden");
     00162 
    -00163 $hid->name="action";
    -00164 $hid->value="voir_jrn";
    +00163 $hid->name="p_jrn";
    +00164 $hid->value=$p_jrn;
     00165 echo $hid->IOValue();
     00166 
    -00167 
    -00168 $hid->name="jrn_type";
    -00169 $hid->value=$jrn_type;
    -00170 echo $hid->IOValue();
    +00167 $hid->name="action";
    +00168 $hid->value="voir_jrn";
    +00169 echo $hid->IOValue();
    +00170 
     00171 
    -00172 
    -00173 $w=new widget("select");
    -00174 
    -00175 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
    -00176 $User=new cl_user($cn);
    -00177 $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode();
    -00178 $w->selected=$current;
    -00179 
    -00180 echo 'Période  '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider');
    -00181 ?>
    -00182 </form>
    -00183 <?
    -00184 
    -00185  // Show list of sell
    -00186   echo_debug ("user_action_jrn.php");
    -00187  // Date - date of payment - Customer - amount
    -00188    $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn'];
    -00189 
    -00190   // Nav. bar 
    -00191    $step=$_SESSION['g_pagesize'];
    -00192    $page=(isset($_GET['offset']))?$_GET['page']:1;
    -00193    $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    -00194    // SQL
    -00195    list($max_line,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset);
    -00196 
    -00197    $bar=jrn_navigation_bar($offset,$max_line,$step,$page);
    -00198         
    -00199         echo $bar;
    -00200         echo $list;
    -00201         echo $bar;
    -00202    echo '</div>';
    -00203 }
    -00205 // balance
    -00207 if ( $action == 'solde' ) {
    -00208   require_once("poste.php");
    -00209   // find the bank account
    -00210  // TODO : those values should be in a table because
    -00211  // they are _national_ parameters
    -00212   $banque=new parm_code($cn,'BANQUE');
    -00213   $caisse=new parm_code($cn,'CAISSE');
    -00214   $vir_interne=new parm_code($cn,'VIREMENT_INTERNE');
    -00215   $accountSql="select distinct pcm_val::text,pcm_lib from 
    -00216             tmp_pcmn 
    -00217             where pcm_val like '".$banque->p_value."%' or pcm_val like '".$vir_interne->p_value."%' 
    -00218             or pcm_val like '".$caisse->p_value."%'
    -00219             order by pcm_val::text";
    -00220   $ResAccount=ExecSql($cn,$accountSql);
    -00221   echo '<div class="u_redcontent">';
    -00222   echo "<table>";
    -00223   // for each account
    -00224   for ( $i = 0; $i < pg_NumRows($ResAccount);$i++) {
    -00225     // get the saldo
    -00226     $l=pg_fetch_array($ResAccount,$i);
    -00227     $m=GetSolde($cn,$l['pcm_val']);
    -00228     // print the result if the saldo is not equal to 0
    -00229     if ( $m != 0.0 ) {
    -00230       echo "<tr>";
    -00231       echo "<TD>".
    -00232         $l['pcm_val'].
    -00233         "</TD>".
    -00234         "<TD>".
    -00235         $l['pcm_lib'].
    -00236         "</TD>"."<TD>".
    -00237         $m.
    -00238         "</TD>"."</TR>";
    -00239     }
    -00240   }// for
    -00241   echo "</table>";
    -00242   echo "</div>";
    -00243  }
    -00245 include("user_update.php");
    -00246 
    -00247 
    -00248 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00172 $hid->name="jrn_type"; +00173 $hid->value=$jrn_type; +00174 echo $hid->IOValue(); +00175 +00176 +00177 $w=new widget("select"); +00178 +00179 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id"); +00180 $User=new cl_user($cn); +00181 $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode(); +00182 $w->selected=$current; +00183 +00184 echo 'Période '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider'); +00185 ?> +00186 </form> +00187 <? +00188 +00189 // Show list of sell +00190 echo_debug ("user_action_jrn.php"); +00191 // Date - date of payment - Customer - amount +00192 $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn']; +00193 +00194 // Nav. bar +00195 $step=$_SESSION['g_pagesize']; +00196 $page=(isset($_GET['offset']))?$_GET['page']:1; +00197 $offset=(isset($_GET['offset']))?$_GET['offset']:0; +00198 // SQL +00199 list($max_line,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset); +00200 +00201 $bar=jrn_navigation_bar($offset,$max_line,$step,$page); +00202 +00203 echo $bar; +00204 echo $list; +00205 echo $bar; +00206 echo '</div>'; +00207 } +00209 // balance +00211 if ( $action == 'solde' ) { +00212 require_once("poste.php"); +00213 // find the bank account +00214 // TODO : those values should be in a table because +00215 // they are _national_ parameters +00216 $banque=new parm_code($cn,'BANQUE'); +00217 $caisse=new parm_code($cn,'CAISSE'); +00218 $vir_interne=new parm_code($cn,'VIREMENT_INTERNE'); +00219 $accountSql="select distinct pcm_val::text,pcm_lib from +00220 tmp_pcmn +00221 where pcm_val like '".$banque->p_value."%' or pcm_val like '".$vir_interne->p_value."%' +00222 or pcm_val like '".$caisse->p_value."%' +00223 order by pcm_val::text"; +00224 $ResAccount=ExecSql($cn,$accountSql); +00225 echo '<div class="u_redcontent">'; +00226 echo "<table>"; +00227 // for each account +00228 for ( $i = 0; $i < pg_NumRows($ResAccount);$i++) { +00229 // get the saldo +00230 $l=pg_fetch_array($ResAccount,$i); +00231 $m=GetSolde($cn,$l['pcm_val']); +00232 // print the result if the saldo is not equal to 0 +00233 if ( $m != 0.0 ) { +00234 echo "<tr>"; +00235 echo "<TD>". +00236 $l['pcm_val']. +00237 "</TD>". +00238 "<TD>". +00239 $l['pcm_lib']. +00240 "</TD>"."<TD>". +00241 $m. +00242 "</TD>"."</TR>"; +00243 } +00244 }// for +00245 echo "</table>"; +00246 echo "</div>"; +00247 } +00249 include("user_update.php"); +00250 +00251 +00252 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__action__fin_8php.html b/doc/developper/html/user__action__fin_8php.html index 2dea85560..64d2ac9ba 100644 --- a/doc/developper/html/user__action__fin_8php.html +++ b/doc/developper/html/user__action__fin_8php.html @@ -4,17 +4,19 @@ - + -

    user_action_fin.php File Reference

    +

    user_action_fin.php File Reference

    included file for the financial ledger More... +

    +

    Go to the source code of this file. - + @@ -63,7 +65,12 @@

    Variables

     $cn = DbConnect($_SESSION['g_dossier'])
     $action = (isset($_GET['action']))?$_GET['action']:$_POST['action']
     $action = (isset($_GET['action']))?$_GET['action']:$_POST['action']
     exit
     $m = GetSolde($cn,$l['pcm_val'])
    -


    Variable Documentation

    +

    Detailed Description

    +included file for the financial ledger +

    + +

    +Definition in file user_action_fin.php.


    Variable Documentation

    @@ -91,7 +98,7 @@ order by pcm_val::text"

    -Definition at line 215 of file user_action_fin.php. +Definition at line 219 of file user_action_fin.php.

    @@ -100,7 +107,7 @@ Definition at line - +
    $action = (isset($_GET['action']))?$_GET['action']:$_POST['action'] $action = (isset($_GET['action']))?$_GET['action']:$_POST['action']
    @@ -116,7 +123,7 @@ Definition at line
    35 of file user_action_fin.php. +Definition at line 39 of file user_action_fin.php.

    @@ -141,7 +148,7 @@ Definition at line 212 of file user_action_fin.php. +Definition at line 216 of file user_action_fin.php.

    @@ -166,7 +173,7 @@ Definition at line 197 of file user_action_fin.php. +Definition at line 201 of file user_action_fin.php.

    @@ -191,7 +198,7 @@ Definition at line 213 of file user_action_fin.php. +Definition at line 217 of file user_action_fin.php.

    @@ -216,7 +223,7 @@ Definition at line 27 of file user_action_fin.php. +Definition at line 31 of file user_action_fin.php.

    @@ -241,7 +248,7 @@ Definition at line 177 of file user_action_fin.php. +Definition at line 181 of file user_action_fin.php.

    @@ -266,7 +273,7 @@ Definition at line 157 of file user_action_fin.php. +Definition at line 161 of file user_action_fin.php.

    @@ -291,7 +298,7 @@ Definition at line 227 of file user_action_fin.php. +Definition at line 231 of file user_action_fin.php.

    @@ -316,7 +323,7 @@ Definition at line 128 of file user_action_fin.php. +Definition at line 132 of file user_action_fin.php.

    @@ -341,7 +348,7 @@ Definition at line 193 of file user_action_fin.php. +Definition at line 197 of file user_action_fin.php.

    @@ -366,7 +373,7 @@ Definition at line 192 of file user_action_fin.php. +Definition at line 196 of file user_action_fin.php.

    @@ -391,7 +398,7 @@ Definition at line 175 of file user_action_fin.php. +Definition at line 179 of file user_action_fin.php.

    @@ -416,7 +423,7 @@ Definition at line 133 of file user_action_fin.php. +Definition at line 137 of file user_action_fin.php.

    @@ -441,7 +448,7 @@ Definition at line 220 of file user_action_fin.php. +Definition at line 224 of file user_action_fin.php.

    @@ -466,7 +473,7 @@ Definition at line 188 of file user_action_fin.php. +Definition at line 192 of file user_action_fin.php.

    @@ -491,7 +498,7 @@ Definition at line 191 of file user_action_fin.php. +Definition at line 195 of file user_action_fin.php.

    @@ -516,7 +523,7 @@ Definition at line 131 of file user_action_fin.php. +Definition at line 135 of file user_action_fin.php.

    @@ -541,7 +548,7 @@ Definition at line 176 of file user_action_fin.php. +Definition at line 180 of file user_action_fin.php.

    @@ -566,7 +573,7 @@ Definition at line 214 of file user_action_fin.php. +Definition at line 218 of file user_action_fin.php.

    @@ -591,7 +598,7 @@ Definition at line 173 of file user_action_fin.php. +Definition at line 177 of file user_action_fin.php.

    @@ -616,7 +623,7 @@ Definition at line 43 of file user_action_fin.php. +Definition at line 47 of file user_action_fin.php.

    @@ -641,7 +648,7 @@ Definition at line 159 of file user_action_fin.php. +Definition at line 163 of file user_action_fin.php.

    @@ -666,7 +673,7 @@ Definition at line 178 of file user_action_fin.php. +Definition at line 182 of file user_action_fin.php.

    @@ -691,10 +698,10 @@ Definition at line 160 of file user_action_fin.php. +Definition at line 164 of file user_action_fin.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__action__gl_8php-source.html b/doc/developper/html/user__action__gl_8php-source.html index 6291e02a2..aefd5ecc0 100644 --- a/doc/developper/html/user__action__gl_8php-source.html +++ b/doc/developper/html/user__action__gl_8php-source.html @@ -4,7 +4,7 @@ - +

    user_action_gl.php

    Go to the documentation of this file.
    00001 <?
    @@ -28,60 +28,59 @@
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
     00021 echo_debug('user_action_gl.php',__LINE__,"include user_action_gl.php");
    -00022 
    -00023 include_once ("preference.php");
    -00024 include_once ("user_common.php");
    -00025 include_once ("class_widget.php");
    -00026 include_once("class_user.php");
    -00027 require_once("jrn.php");
    -00028 
    -00029 $cn=DbConnect($_SESSION['g_dossier']);
    -00030 if (CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],0)  < 1 )
    -00031   {NoAccess();exit -1;}
    -00032 
    -00033 ?>
    -00034 <div class="u_redcontent">
    -00035 <form method="GET" action="user_jrn.php">
    -00036 <?
    -00037 
    -00038 $hid=new widget("hidden");
    -00039 
    -00040 $hid->name="jrn_type";
    -00041 $hid->value="NONE";
    -00042 echo $hid->IOValue();
    -00043 
    -00044 $hid->name="action";
    -00045 $hid->value="voir_jrn";
    -00046 echo $hid->IOValue();
    -00047 
    -00048 $w=new widget("select");
    -00049 
    -00050 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
    -00051 $User=new cl_user($cn);
    -00052 $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode();
    -00053 $w->selected=$current;
    -00054 echo 'Période  '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider');
    -00055 ?>
    -00056 </form>
    -00057 <?
    -00058 
    -00059 $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current;
    -00060 // Nav. bar 
    -00061 $step=$_SESSION['g_pagesize'];
    -00062 $page=(isset($_GET['offset']))?$_GET['page']:1;
    -00063 $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    -00064 
    -00065 list ($max_line,$list)=ListJrn($cn,0,$sql,null,$offset);
    -00066 
    -00067 $bar=jrn_navigation_bar($offset,$max_line,$step,$page);
    -00068 
    -00069 echo $bar;
    -00070 echo $list;
    -00071 echo $bar;
    -00072 
    -00073 ?>
    -00074 </div>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00026 include_once ("preference.php"); +00027 include_once ("user_common.php"); +00028 include_once ("class_widget.php"); +00029 include_once("class_user.php"); +00030 require_once("jrn.php"); +00031 +00032 $cn=DbConnect($_SESSION['g_dossier']); +00033 if (CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],0) < 1 ) +00034 {NoAccess();exit -1;} +00035 +00036 ?> +00037 <div class="u_redcontent"> +00038 <form method="GET" action="user_jrn.php"> +00039 <? +00040 +00041 $hid=new widget("hidden"); +00042 +00043 $hid->name="jrn_type"; +00044 $hid->value="NONE"; +00045 echo $hid->IOValue(); +00046 +00047 $hid->name="action"; +00048 $hid->value="voir_jrn"; +00049 echo $hid->IOValue(); +00050 +00051 $w=new widget("select"); +00052 +00053 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id"); +00054 $User=new cl_user($cn); +00055 $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode(); +00056 $w->selected=$current; +00057 echo 'Période '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider'); +00058 ?> +00059 </form> +00060 <? +00061 +00062 $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current; +00063 // Nav. bar +00064 $step=$_SESSION['g_pagesize']; +00065 $page=(isset($_GET['offset']))?$_GET['page']:1; +00066 $offset=(isset($_GET['offset']))?$_GET['offset']:0; +00067 +00068 list ($max_line,$list)=ListJrn($cn,0,$sql,null,$offset); +00069 +00070 $bar=jrn_navigation_bar($offset,$max_line,$step,$page); +00071 +00072 echo $bar; +00073 echo $list; +00074 echo $bar; +00075 +00076 ?> +00077 </div> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__action__gl_8php.html b/doc/developper/html/user__action__gl_8php.html index 6f219e77f..fa021c414 100644 --- a/doc/developper/html/user__action__gl_8php.html +++ b/doc/developper/html/user__action__gl_8php.html @@ -4,10 +4,12 @@ - + -

    user_action_gl.php File Reference

    +

    user_action_gl.php File Reference

    included file for the great ledger More... +

    +

    Go to the source code of this file. @@ -43,7 +45,12 @@
     $bar = jrn_navigation_bar($offset,$max_line,$step,$page)
    -


    Variable Documentation

    +

    Detailed Description

    +included file for the great ledger +

    + +

    +Definition in file user_action_gl.php.


    Variable Documentation

    @@ -66,7 +73,7 @@

    -Definition at line 67 of file user_action_gl.php. +Definition at line 70 of file user_action_gl.php.

    @@ -91,7 +98,7 @@ Definition at line

    -Definition at line 29 of file user_action_gl.php. +Definition at line 32 of file user_action_gl.php.

    @@ -116,7 +123,7 @@ Definition at line

    -Definition at line 52 of file user_action_gl.php. +Definition at line 55 of file user_action_gl.php.

    @@ -141,7 +148,7 @@ Definition at line

    -Definition at line 38 of file user_action_gl.php. +Definition at line 41 of file user_action_gl.php.

    @@ -166,7 +173,7 @@ Definition at line

    -Definition at line 63 of file user_action_gl.php. +Definition at line 66 of file user_action_gl.php.

    @@ -191,7 +198,7 @@ Definition at line

    -Definition at line 62 of file user_action_gl.php. +Definition at line 65 of file user_action_gl.php.

    @@ -216,7 +223,7 @@ Definition at line

    -Definition at line 50 of file user_action_gl.php. +Definition at line 53 of file user_action_gl.php.

    @@ -241,7 +248,7 @@ Definition at line

    -Definition at line 59 of file user_action_gl.php. +Definition at line 62 of file user_action_gl.php.

    @@ -266,7 +273,7 @@ Definition at line

    -Definition at line 61 of file user_action_gl.php. +Definition at line 64 of file user_action_gl.php.

    @@ -291,7 +298,7 @@ Definition at line

    -Definition at line 51 of file user_action_gl.php. +Definition at line 54 of file user_action_gl.php.

    @@ -316,7 +323,7 @@ Definition at line

    -Definition at line 48 of file user_action_gl.php. +Definition at line 51 of file user_action_gl.php.

    @@ -341,7 +348,7 @@ Definition at line

    -Definition at line 31 of file user_action_gl.php. +Definition at line 34 of file user_action_gl.php.

    @@ -366,7 +373,7 @@ Definition at line

    -Definition at line 40 of file user_action_gl.php. +Definition at line 43 of file user_action_gl.php.

    @@ -391,7 +398,7 @@ Definition at line

    -Definition at line 53 of file user_action_gl.php. +Definition at line 56 of file user_action_gl.php.

    @@ -416,10 +423,10 @@ Definition at line

    -Definition at line 41 of file user_action_gl.php. +Definition at line 44 of file user_action_gl.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__action__ods_8php-source.html b/doc/developper/html/user__action__ods_8php-source.html index a590b1c47..589868f68 100644 --- a/doc/developper/html/user__action__ods_8php-source.html +++ b/doc/developper/html/user__action__ods_8php-source.html @@ -4,7 +4,7 @@ - +

    user_action_ods.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,203 +27,203 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 echo_debug('user_action_ods.php',__LINE__,"include user_action_ods.php");
    -00022 include_once("user_form_ods.php");
    -00023 include_once("class_widget.php");
    -00024 
    -00025 $cn=DbConnect($_SESSION['g_dossier']);
    -00026 
    -00027 if ( ! isset ($_GET['action']) && ! isset ($_POST["action"]) ) {
    -00028   exit;
    -00029 
    -00030 }
    -00031 include_once ("preference.php");
    -00032 include_once ("user_common.php");
    +00025 echo_debug('user_action_ods.php',__LINE__,"include user_action_ods.php");
    +00026 include_once("user_form_ods.php");
    +00027 include_once("class_widget.php");
    +00028 
    +00029 $cn=DbConnect($_SESSION['g_dossier']);
    +00030 
    +00031 if ( ! isset ($_GET['action']) && ! isset ($_POST["action"]) ) {
    +00032   exit;
     00033 
    -00034 
    -00035 $action=(isset($_GET['action']))?$_GET['action']:$_POST['action'];
    -00036 
    -00037 // action = new
    -00038 if ( $action == 'new' ) {
    -00039 
    -00040   // Check privilege
    -00041   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
    -00042        NoAccess();
    -00043        exit -1;
    -00044   }
    -00045 
    -00046 // We request a new form
    -00047   if ( isset($_GET['blank'] )) {
    -00048     // Submit button in the form
    -00049     $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout poste">
    -00050                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Confirmer">';
    -00051     // add a one-line calculator
    -00052 
    -00053     
    -00054     $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,null,false);
    -00055     echo '<div class="u_redcontent">';
    -00056     echo $r;
    -00057     echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    -00058     echo "</div>";
    -00059           
    -00060     
    -00061   }
    -00062 
    -00063         // Add an item
    -00064         if ( isset ($_POST['add_item'])) {
    -00065           // Add a line
    -00066           $nb_number=$_POST["nb_item"];
    -00067           $nb_number++;
    -00068 
    -00069           // submit button in the form
    -00070           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">
    -00071                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00034 }
    +00035 include_once ("preference.php");
    +00036 include_once ("user_common.php");
    +00037 
    +00038 
    +00039 $action=(isset($_GET['action']))?$_GET['action']:$_POST['action'];
    +00040 
    +00041 // action = new
    +00042 if ( $action == 'new' ) {
    +00043 
    +00044   // Check privilege
    +00045   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
    +00046        NoAccess();
    +00047        exit -1;
    +00048   }
    +00049 
    +00050 // We request a new form
    +00051   if ( isset($_GET['blank'] )) {
    +00052     // Submit button in the form
    +00053     $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout poste">
    +00054                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Confirmer">';
    +00055     // add a one-line calculator
    +00056 
    +00057     
    +00058     $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,null,false);
    +00059     echo '<div class="u_redcontent">';
    +00060     echo $r;
    +00061     echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    +00062     echo "</div>";
    +00063           
    +00064     
    +00065   }
    +00066 
    +00067         // Add an item
    +00068         if ( isset ($_POST['add_item'])) {
    +00069           // Add a line
    +00070           $nb_number=$_POST["nb_item"];
    +00071           $nb_number++;
     00072 
    -00073           $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
    -00074           echo '<div class="u_redcontent">';
    -00075           echo $r;
    -00076           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    -00077           echo "</div>";
    -00078         }
    -00079         // Correct it
    -00080         if ( isset ($_POST['correct'])) {
    -00081           // Get number of  lines
    -00082           $nb_number=$_POST["nb_item"];
    -00083 
    -00084           // submit button in the form
    -00085           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">
    -00086                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00073           // submit button in the form
    +00074           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">
    +00075                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00076 
    +00077           $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
    +00078           echo '<div class="u_redcontent">';
    +00079           echo $r;
    +00080           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    +00081           echo "</div>";
    +00082         }
    +00083         // Correct it
    +00084         if ( isset ($_POST['correct'])) {
    +00085           // Get number of  lines
    +00086           $nb_number=$_POST["nb_item"];
     00087 
    -00088           $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
    -00089           echo '<div class="u_redcontent">';
    -00090           echo $r;
    -00091           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    -00092           echo "</div>";
    -00093         }
    -00094 
    -00095 
    -00096         // View the charge and show a submit button to save it 
    -00097   // TODO: the name 'view_invoice' should be changed to something more self-explaining, like
    -00098   // 'submit_od', no? 
    -00099         if ( isset ($_POST['view_invoice']) ) {
    -00100           $nb_number=$_POST["nb_item"];
    -00101           $submit='<INPUT TYPE="SUBMIT" name="save" value="Confirmer">';
    -00102           $submit.='<INPUT TYPE="SUBMIT" name="correct" value="Corriger">';
    -00103 
    -00104           $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,$nb_number);
    -00105 
    -00106         // if something goes wrong, correct it
    -00107           if ( $r == null ) {
    -00108             // submit button in the form
    -00109             $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">
    -00110                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    -00111             
    -00112             $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
    -00113           }
    -00114           echo '<div class="u_redcontent">';
    -00115           echo $r;
    -00116           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    -00117           echo "</div>";
    -00118         }
    -00119         // Save the change into database
    -00120         if ( isset($_POST['save'] )) {
    -00121           $r=RecordODS($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']);
    -00122           // Get number of  lines
    -00123           $nb_number=$_POST["nb_item"];
    -00124 
    -00125           // submit button in the form
    -00126           $submit='<h2 class="info">Recorded</h2>';
    -00127 
    -00128           $r.=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,  $nb_number,true);
    -00129           echo '<div class="u_redcontent">';
    -00130           echo $r;
    -00131           echo "</div>";
    -00132           
    -00133         }
    -00134         
    -00135 
    -00136 }
    -00137 if ( $action == 'voir_jrn' ) {
    -00138   // Check privilege
    -00139   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    -00140        NoAccess();
    -00141        exit -1;
    -00142   }
    -00143 
    -00144  // Show list of cells
    -00145   echo_debug ("user_action_ods.php");
    -00146  // Date - date of payment - Customer - amount
    -00147 ?>
    -00148 <div class="u_redcontent">
    -00149 
    -00150 <form method= "get" action="user_jrn.php">
    -00151 
    -00152 <?
    -00153 $hid=new widget("hidden");
    -00154 
    -00155 $hid->name="p_jrn";
    -00156 $hid->value=$p_jrn;
    -00157 echo $hid->IOValue();
    +00088           // submit button in the form
    +00089           $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">
    +00090                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00091 
    +00092           $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
    +00093           echo '<div class="u_redcontent">';
    +00094           echo $r;
    +00095           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    +00096           echo "</div>";
    +00097         }
    +00098 
    +00099 
    +00100         // View the charge and show a submit button to save it 
    +00101   // TODO: the name 'view_invoice' should be changed to something more self-explaining, like
    +00102   // 'submit_od', no? 
    +00103         if ( isset ($_POST['view_invoice']) ) {
    +00104           $nb_number=$_POST["nb_item"];
    +00105           $submit='<INPUT TYPE="SUBMIT" name="save" value="Confirmer">';
    +00106           $submit.='<INPUT TYPE="SUBMIT" name="correct" value="Corriger">';
    +00107 
    +00108           $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,$nb_number);
    +00109 
    +00110         // if something goes wrong, correct it
    +00111           if ( $r == null ) {
    +00112             // submit button in the form
    +00113             $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">
    +00114                     <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
    +00115             
    +00116             $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
    +00117           }
    +00118           echo '<div class="u_redcontent">';
    +00119           echo $r;
    +00120           echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
    +00121           echo "</div>";
    +00122         }
    +00123         // Save the change into database
    +00124         if ( isset($_POST['save'] )) {
    +00125           $r=RecordODS($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']);
    +00126           // Get number of  lines
    +00127           $nb_number=$_POST["nb_item"];
    +00128 
    +00129           // submit button in the form
    +00130           $submit='<h2 class="info">Recorded</h2>';
    +00131 
    +00132           $r.=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,  $nb_number,true);
    +00133           echo '<div class="u_redcontent">';
    +00134           echo $r;
    +00135           echo "</div>";
    +00136           
    +00137         }
    +00138         
    +00139 
    +00140 }
    +00141 if ( $action == 'voir_jrn' ) {
    +00142   // Check privilege
    +00143   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    +00144        NoAccess();
    +00145        exit -1;
    +00146   }
    +00147 
    +00148  // Show list of cells
    +00149   echo_debug ("user_action_ods.php");
    +00150  // Date - date of payment - Customer - amount
    +00151 ?>
    +00152 <div class="u_redcontent">
    +00153 
    +00154 <form method= "get" action="user_jrn.php">
    +00155 
    +00156 <?
    +00157 $hid=new widget("hidden");
     00158 
    -00159 $hid->name="action";
    -00160 $hid->value="voir_jrn";
    +00159 $hid->name="p_jrn";
    +00160 $hid->value=$p_jrn;
     00161 echo $hid->IOValue();
     00162 
    -00163 
    -00164 $hid->name="jrn_type";
    -00165 $hid->value=$jrn_type;
    -00166 echo $hid->IOValue();
    +00163 $hid->name="action";
    +00164 $hid->value="voir_jrn";
    +00165 echo $hid->IOValue();
    +00166 
     00167 
    -00168 
    -00169 
    -00170 $w=new widget("select");
    +00168 $hid->name="jrn_type";
    +00169 $hid->value=$jrn_type;
    +00170 echo $hid->IOValue();
     00171 
    -00172 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
    -00173 $User=new cl_user($cn);
    -00174 $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode();
    -00175 $w->selected=$current;
    -00176 
    -00177 echo 'Période  '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider');
    -00178 ?>
    -00179 </form>
    -00180 <?
    -00181         $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn'] ;
    -00182         $step=$_SESSION['g_pagesize'];
    -00183         $page=(isset($_GET['offset']))?$_GET['page']:1;
    -00184         $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    -00185         list ($max_line,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset);
    -00186         $bar=jrn_navigation_bar($offset,$max_line,$step,$page);
    -00187         echo $bar;
    -00188         echo $list;
    -00189         echo $bar;
    -00190         echo '</div>';
    -00191 }
    -00192 
    -00193 //Search
    -00194 if ( $action == 'search' ) {
    -00195   // Check privilege
    -00196   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) <1 )    {
    -00197        NoAccess();
    -00198        exit -1;
    -00199   }
    -00200 
    -00201   // PhpSessid
    -00202   $sessid=(isset ($_POST['PHPSESSID']))?$_POST['PHPSESSID']:$_GET['PHPSESSID'];
    -00203 
    -00204 // display a search box
    -00205   $search_box=u_ShowMenuRecherche($cn,$_GET['p_jrn'],$sessid,$HTTP_POST_VARS);
    -00206   echo '<DIV class="u_redcontent">';
    -00207   echo $search_box; 
    -00208   // if nofirst is set then show result
    -00209   if ( isset ($_GET['nofirst'] ) )     {
    -00210     list ($max_line,$a)=ListJrn($cn,$_GET['p_jrn'],"",$HTTP_POST_VARS);
    -00211     echo $a;
    -00212   }
    -00213   echo '</DIV>'; 
    -00214 }
    -00215 include("user_update.php");
    -00216 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00172 +00173 +00174 $w=new widget("select"); +00175 +00176 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id"); +00177 $User=new cl_user($cn); +00178 $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode(); +00179 $w->selected=$current; +00180 +00181 echo 'Période '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider'); +00182 ?> +00183 </form> +00184 <? +00185 $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn'] ; +00186 $step=$_SESSION['g_pagesize']; +00187 $page=(isset($_GET['offset']))?$_GET['page']:1; +00188 $offset=(isset($_GET['offset']))?$_GET['offset']:0; +00189 list ($max_line,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset); +00190 $bar=jrn_navigation_bar($offset,$max_line,$step,$page); +00191 echo $bar; +00192 echo $list; +00193 echo $bar; +00194 echo '</div>'; +00195 } +00196 +00197 //Search +00198 if ( $action == 'search' ) { +00199 // Check privilege +00200 if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) <1 ) { +00201 NoAccess(); +00202 exit -1; +00203 } +00204 +00205 // PhpSessid +00206 $sessid=(isset ($_POST['PHPSESSID']))?$_POST['PHPSESSID']:$_GET['PHPSESSID']; +00207 +00208 // display a search box +00209 $search_box=u_ShowMenuRecherche($cn,$_GET['p_jrn'],$sessid,$HTTP_POST_VARS); +00210 echo '<DIV class="u_redcontent">'; +00211 echo $search_box; +00212 // if nofirst is set then show result +00213 if ( isset ($_GET['nofirst'] ) ) { +00214 list ($max_line,$a)=ListJrn($cn,$_GET['p_jrn'],"",$HTTP_POST_VARS); +00215 echo $a; +00216 } +00217 echo '</DIV>'; +00218 } +00219 include("user_update.php"); +00220 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__action__ods_8php.html b/doc/developper/html/user__action__ods_8php.html index a9c47a581..ca53acfc7 100644 --- a/doc/developper/html/user__action__ods_8php.html +++ b/doc/developper/html/user__action__ods_8php.html @@ -4,17 +4,19 @@ - + -

    user_action_ods.php File Reference

    +

    user_action_ods.php File Reference

    included file for the miscellaneous operation ledger More... +

    +

    Go to the source code of this file. - + @@ -55,14 +57,19 @@

    Variables

     $cn = DbConnect($_SESSION['g_dossier'])
     $action = (isset($_GET['action']))?$_GET['action']:$_POST['action']
     $action = (isset($_GET['action']))?$_GET['action']:$_POST['action']
     exit
     $search_box = u_ShowMenuRecherche($cn,$_GET['p_jrn'],$sessid,$HTTP_POST_VARS)
    -


    Variable Documentation

    +

    Detailed Description

    +included file for the miscellaneous operation ledger +

    + +

    +Definition in file user_action_ods.php.


    Variable Documentation

    @@ -78,7 +85,7 @@

    -Definition at line 35 of file user_action_ods.php. +Definition at line 39 of file user_action_ods.php.

    - +
    $action = (isset($_GET['action']))?$_GET['action']:$_POST['action'] $action = (isset($_GET['action']))?$_GET['action']:$_POST['action']

    @@ -103,7 +110,7 @@ Definition at line 186 of file user_action_ods.php. +Definition at line 190 of file user_action_ods.php.

    @@ -128,7 +135,7 @@ Definition at line 25 of file user_action_ods.php. +Definition at line 29 of file user_action_ods.php.

    @@ -153,7 +160,7 @@ Definition at line 174 of file user_action_ods.php. +Definition at line 178 of file user_action_ods.php.

    @@ -178,7 +185,7 @@ Definition at line 153 of file user_action_ods.php. +Definition at line 157 of file user_action_ods.php.

    @@ -203,7 +210,7 @@ Definition at line 123 of file user_action_ods.php. +Definition at line 127 of file user_action_ods.php.

    @@ -228,7 +235,7 @@ Definition at line 184 of file user_action_ods.php. +Definition at line 188 of file user_action_ods.php.

    @@ -253,7 +260,7 @@ Definition at line 183 of file user_action_ods.php. +Definition at line 187 of file user_action_ods.php.

    @@ -278,7 +285,7 @@ Definition at line 172 of file user_action_ods.php. +Definition at line 176 of file user_action_ods.php.

    @@ -303,7 +310,7 @@ Definition at line 128 of file user_action_ods.php. +Definition at line 132 of file user_action_ods.php.

    @@ -328,7 +335,7 @@ Definition at line 205 of file user_action_ods.php. +Definition at line 209 of file user_action_ods.php.

    @@ -353,7 +360,7 @@ Definition at line 202 of file user_action_ods.php. +Definition at line 206 of file user_action_ods.php.

    @@ -378,7 +385,7 @@ Definition at line 181 of file user_action_ods.php. +Definition at line 185 of file user_action_ods.php.

    @@ -403,7 +410,7 @@ Definition at line 182 of file user_action_ods.php. +Definition at line 186 of file user_action_ods.php.

    @@ -428,7 +435,7 @@ Definition at line 126 of file user_action_ods.php. +Definition at line 130 of file user_action_ods.php.

    @@ -453,7 +460,7 @@ Definition at line 173 of file user_action_ods.php. +Definition at line 177 of file user_action_ods.php.

    @@ -478,7 +485,7 @@ Definition at line 170 of file user_action_ods.php. +Definition at line 174 of file user_action_ods.php.

    @@ -503,7 +510,7 @@ Definition at line 43 of file user_action_ods.php. +Definition at line 47 of file user_action_ods.php.

    @@ -528,7 +535,7 @@ Definition at line 155 of file user_action_ods.php. +Definition at line 159 of file user_action_ods.php.

    @@ -553,7 +560,7 @@ Definition at line 175 of file user_action_ods.php. +Definition at line 179 of file user_action_ods.php.

    @@ -578,10 +585,10 @@ Definition at line 156 of file user_action_ods.php. +Definition at line 160 of file user_action_ods.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__action__ven_8php-source.html b/doc/developper/html/user__action__ven_8php-source.html index 417149a67..d50f47b26 100644 --- a/doc/developper/html/user__action__ven_8php-source.html +++ b/doc/developper/html/user__action__ven_8php-source.html @@ -4,7 +4,7 @@ - +

    user_action_ven.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,303 +27,307 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 echo_debug('user_action_ven.php',__LINE__,"include user_action_ven.php");
    -00022 require_once("user_form_ven.php");
    -00023 include_once("class_widget.php");
    -00024 $cn=DbConnect($_SESSION['g_dossier']);
    -00025 // default action is insert_vente
    -00026 if ( ! isset ($_GET['action']) && ! isset ($_POST["action"]) ) {
    -00027   exit;
    -00028    } else {
    -00029   $action=(isset($_GET['action']))?$_GET['action']:$_POST['action'];
    -00030   $blank=(isset($_GET["blank"]))?1:0;
    -00031 }
    -00032 
    -00033 if ( $action == 'insert_vente' ) {
    -00034    
    -00035     // Add item
    -00036         if (isset($_POST["add_item"]) ) {
    -00037           echo_debug('user_action_ven.php',__LINE__,"Add an item");
    -00038           $nb_number=$_POST["nb_item"];
    -00039           $nb_number++;
    -00040           
    -00041           $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,false,$nb_number);
    -00042           echo '<div class="u_redcontent">';
    -00043           echo   $form;
    -00044           echo '</div>';
    -00045 
    -00046         } // add an item
    -00047 
    -00048     // We want to see the encoded invoice 
    -00049     if ( isset ($_POST["view_invoice"])) {
    -00050       $nb_number=$_POST["nb_item"];
    -00051       if ( form_verify_input($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number) == true)
    -00052         {
    -00053           $form=FormVenteView($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number);
    -00054           // Check failed : invalid date or quantity
    -00055         } else {
    -00056             echo_error("Cannot validate ");
    -00057             $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,false,$nb_number);
    -00058           }
    -00059       echo '<div class="u_redcontent">';
    -00060       echo         $form;
    -00061       echo '</div>';
    -00062       
    -00063     } 
    -00064 
    -00065     // We want a blank form
    -00066     if ( $blank==1)
    -00067       {
    -00068       echo_debug('user_action_ven.php',__LINE__,"Blank form");
    -00069       // Show an empty form of invoice
    -00070       $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),null,false);
    -00071       echo '<div class="u_redcontent">';
    -00072       echo $form;
    -00073       echo '</div>';
    -00074     }
    -00075 
    -00076 }
    -00077 
    -00078 
    -00079     // Save the invoice 
    -00080 if ( isset($_POST["record_invoice"])) {
    -00081   // Check privilege
    -00082   if ( CheckJrn($_SESSION['g_dossier'],$User,$_GET['p_jrn']) != 2 )    {
    -00083     NoAccess();
    -00084     exit -1;
    -00085   }
    -00086 
    -00087   // echo "RECORD INVOICE";
    -00088    RecordInvoice($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']);
    -00089 }
    -00090 if (isset ($_POST['correct_new_invoice'])) {
    -00091   // Check privilege
    -00092   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
    -00093     NoAccess();
    -00094     exit -1;
    -00095   }
    -00096   
    -00097   $nb=$_POST['nb_item'];
    -00098   $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,false,$nb);
    -00099   echo '<div class="u_redcontent">';
    -00100   echo $form;
    -00101   echo '</div>';
    -00102 }
    -00103 // Save and print the invoice
    -00104 if ( isset($_POST["record_and_print_invoice"])) {
    -00105   // Check privilege
    -00106   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
    -00107     NoAccess();
    -00108     exit -1;
    -00109   }
    -00110   
    -00111   //  echo "RECORD AND PRINT INVOICE";
    -00112 
    -00113   $comment=RecordInvoice($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']);
    -00114 
    -00115   $nb_number=$_POST["nb_item"];
    -00116   if ( form_verify_input($cn,$p_jrn,$User->GetPeriode(),$HTTP_POST_VARS,$nb_number)== true) {
    -00117     $form=FormVenteView($cn,$p_jrn,$User->GetPeriode(),$HTTP_POST_VARS,$nb_number,'noform',$comment);
    -00118   } else {
    -00119             echo_error("Cannot validate ");
    -00120             $form=FormVenInput($cn,$_GET['p_jrn'],$User,$HTTP_POST_VARS,false,$nb_number);
    -00121   }
    -00122   
    -00123   echo '<div class="u_redcontent">';
    -00124   echo $form;
    -00125   echo "</div>  ";
    -00126 }
    -00127 
    -00128 
    -00129  if ( $action == 'voir_jrn' ) {
    -00130    // Check privilege
    -00131    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    -00132      NoAccess();
    -00133      exit -1;
    -00134    }
    -00135    // Extract the page number we want
    -00136    $debut=(isset($_REQUEST['p_page']))?$_REQUEST['p_page']:0;
    -00137 
    -00138 
    -00139 ?>
    -00140 <div class="u_redcontent">
    -00141 
    -00142 <form method= "get" action="user_jrn.php">
    +00024 echo_debug('user_action_ven.php',__LINE__,"include user_action_ven.php");
    +00025 require_once("user_form_ven.php");
    +00026 include_once("class_widget.php");
    +00027 require_once("class_jrn.php");
    +00028 $cn=DbConnect($_SESSION['g_dossier']);
    +00029 // default action is insert_vente
    +00030 if ( ! isset ($_GET['action']) && ! isset ($_POST["action"]) ) {
    +00031   exit;
    +00032    } else {
    +00033   $action=(isset($_GET['action']))?$_GET['action']:$_POST['action'];
    +00034   $blank=(isset($_GET["blank"]))?1:0;
    +00035 }
    +00036 
    +00037 if ( $action == 'insert_vente' ) {
    +00038    
    +00039     // Add item
    +00040         if (isset($_POST["add_item"]) ) {
    +00041           echo_debug('user_action_ven.php',__LINE__,"Add an item");
    +00042           $nb_number=$_POST["nb_item"];
    +00043           $nb_number++;
    +00044           
    +00045           $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,false,$nb_number);
    +00046           echo '<div class="u_redcontent">';
    +00047           echo   $form;
    +00048           echo '</div>';
    +00049 
    +00050         } // add an item
    +00051 
    +00052     // We want to see the encoded invoice 
    +00053     if ( isset ($_POST["view_invoice"])) {
    +00054       $nb_number=$_POST["nb_item"];
    +00055       if ( form_verify_input($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number) == true)
    +00056         {
    +00057           $form=FormVenteView($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number);
    +00058           // Check failed : invalid date or quantity
    +00059         } else {
    +00060             echo_error("Cannot validate ");
    +00061             $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,false,$nb_number);
    +00062           }
    +00063       echo '<div class="u_redcontent">';
    +00064       echo         $form;
    +00065       echo '</div>';
    +00066       
    +00067     } 
    +00068 
    +00069     // We want a blank form
    +00070     if ( $blank==1)
    +00071       {
    +00072        $jrn=new jrn($cn,  $_GET['p_jrn']);
    +00073       echo_debug('user_action_ven.php',__LINE__,"Blank form");
    +00074       // Show an empty form of invoice
    +00075       $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),null,false,$jrn->GetDefLine('cred'));
    +00076       echo '<div class="u_redcontent">';
    +00077       echo $form;
    +00078       echo '</div>';
    +00079     }
    +00080 
    +00081 }
    +00082 
    +00083 
    +00084     // Save the invoice 
    +00085 if ( isset($_POST["record_invoice"])) {
    +00086   // Check privilege
    +00087   if ( CheckJrn($_SESSION['g_dossier'],$User,$_GET['p_jrn']) != 2 )    {
    +00088     NoAccess();
    +00089     exit -1;
    +00090   }
    +00091 
    +00092   // echo "RECORD INVOICE";
    +00093    RecordInvoice($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']);
    +00094 }
    +00095 if (isset ($_POST['correct_new_invoice'])) {
    +00096   // Check privilege
    +00097   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
    +00098     NoAccess();
    +00099     exit -1;
    +00100   }
    +00101   
    +00102   $nb=$_POST['nb_item'];
    +00103   $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,false,$nb);
    +00104   echo '<div class="u_redcontent">';
    +00105   echo $form;
    +00106   echo '</div>';
    +00107 }
    +00108 // Save and print the invoice
    +00109 if ( isset($_POST["record_and_print_invoice"])) {
    +00110   // Check privilege
    +00111   if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 )    {
    +00112     NoAccess();
    +00113     exit -1;
    +00114   }
    +00115   
    +00116   //  echo "RECORD AND PRINT INVOICE";
    +00117 
    +00118   $comment=RecordInvoice($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']);
    +00119 
    +00120   $nb_number=$_POST["nb_item"];
    +00121   if ( form_verify_input($cn,$p_jrn,$User->GetPeriode(),$HTTP_POST_VARS,$nb_number)== true) {
    +00122     $form=FormVenteView($cn,$p_jrn,$User->GetPeriode(),$HTTP_POST_VARS,$nb_number,'noform',$comment);
    +00123   } else {
    +00124             echo_error("Cannot validate ");
    +00125             $form=FormVenInput($cn,$_GET['p_jrn'],$User,$HTTP_POST_VARS,false,$nb_number);
    +00126   }
    +00127   
    +00128   echo '<div class="u_redcontent">';
    +00129   echo $form;
    +00130   echo "</div>  ";
    +00131 }
    +00132 
    +00133 
    +00134  if ( $action == 'voir_jrn' ) {
    +00135    // Check privilege
    +00136    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    +00137      NoAccess();
    +00138      exit -1;
    +00139    }
    +00140    // Extract the page number we want
    +00141    $debut=(isset($_REQUEST['p_page']))?$_REQUEST['p_page']:0;
    +00142 
     00143 
    -00144 <?
    -00145 $hid=new widget("hidden");
    +00144 ?>
    +00145 <div class="u_redcontent">
     00146 
    -00147 $hid->name="p_jrn";
    -00148 $hid->value=$p_jrn;
    -00149 echo $hid->IOValue();
    -00150 
    -00151 $hid->name="action";
    -00152 $hid->value="voir_jrn";
    -00153 echo $hid->IOValue();
    -00154 
    +00147 <form method= "get" action="user_jrn.php">
    +00148 
    +00149 <?
    +00150 $hid=new widget("hidden");
    +00151 
    +00152 $hid->name="p_jrn";
    +00153 $hid->value=$p_jrn;
    +00154 echo $hid->IOValue();
     00155 
    -00156 $hid->name="jrn_type";
    -00157 $hid->value=$jrn_type;
    +00156 $hid->name="action";
    +00157 $hid->value="voir_jrn";
     00158 echo $hid->IOValue();
     00159 
     00160 
    -00161 
    -00162 $w=new widget("select");
    -00163 
    -00164 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
    -00165 // User is already set User=new cl_user($cn);
    -00166 $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode();
    -00167 $w->selected=$current;
    +00161 $hid->name="jrn_type";
    +00162 $hid->value=$jrn_type;
    +00163 echo $hid->IOValue();
    +00164 
    +00165 
    +00166 
    +00167 $w=new widget("select");
     00168 
    -00169 echo 'Période  '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider');
    -00170 ?>
    -00171 </form>
    -00172 <?
    -00173     // Ask to update payment
    -00174     if ( isset ( $_POST['paid'])) 
    -00175       {
    -00176         // reset all the paid flag because the checkbox is post only
    -00177         // when checked
    -00178         foreach ($_POST as $name=>$paid) 
    -00179           {
    -00180             list($ad) = sscanf($name,"set_jr_id%d");
    -00181             if ( $ad == null ) continue;
    -00182             $sql="update jrn set jr_rapt='' where jr_id=$ad";
    -00183             $Res=ExecSql($cn,$sql);
    -00184 
    -00185           }
    -00186         // set a paid flag for the checked box
    -00187         foreach ($_POST as $name=>$paid) 
    -00188           {
    -00189             list ($id) = sscanf ($name,"rd_paid%d");
    -00190 
    -00191             if ( $id == null ) continue;
    -00192             echo "Mise à jour $id";
    -00193             $paid=($paid=='on')?'paid':'';
    -00194             $sql="update jrn set jr_rapt='$paid' where jr_id=$id";
    -00195             $Res=ExecSql($cn,$sql);
    -00196           }
    -00197 
    -00198       }
    -00199  // Show list of sell
    -00200  // Date - date of payment - Customer - amount
    -00201    $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn'] ;
    -00202    $step=$_SESSION['g_pagesize'];
    -00203    $page=(isset($_GET['offset']))?$_GET['page']:1;
    -00204    $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    -00205 
    -00206    list($max_line,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    -00207    $bar=jrn_navigation_bar($offset,$max_line,$step,$page);
    -00208 
    -00209    echo $bar;
    -00210    echo '<form method="POST">';
    -00211    $hid=new widget("hidden");
    -00212 
    -00213    $hid->name="p_jrn";
    -00214    $hid->value=$p_jrn;
    -00215    echo $hid->IOValue();
    -00216 
    -00217    $hid->name="action";
    -00218    $hid->value="voir_jrn";
    -00219    echo $hid->IOValue();
    -00220 
    +00169 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
    +00170 // User is already set User=new cl_user($cn);
    +00171 $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode();
    +00172 $w->selected=$current;
    +00173 
    +00174 echo 'Période  '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider');
    +00175 ?>
    +00176 </form>
    +00177 <?
    +00178     // Ask to update payment
    +00179     if ( isset ( $_POST['paid'])) 
    +00180       {
    +00181         // reset all the paid flag because the checkbox is post only
    +00182         // when checked
    +00183         foreach ($_POST as $name=>$paid) 
    +00184           {
    +00185             list($ad) = sscanf($name,"set_jr_id%d");
    +00186             if ( $ad == null ) continue;
    +00187             $sql="update jrn set jr_rapt='' where jr_id=$ad";
    +00188             $Res=ExecSql($cn,$sql);
    +00189 
    +00190           }
    +00191         // set a paid flag for the checked box
    +00192         foreach ($_POST as $name=>$paid) 
    +00193           {
    +00194             list ($id) = sscanf ($name,"rd_paid%d");
    +00195 
    +00196             if ( $id == null ) continue;
    +00197             echo "Mise à jour $id";
    +00198             $paid=($paid=='on')?'paid':'';
    +00199             $sql="update jrn set jr_rapt='$paid' where jr_id=$id";
    +00200             $Res=ExecSql($cn,$sql);
    +00201           }
    +00202 
    +00203       }
    +00204  // Show list of sell
    +00205  // Date - date of payment - Customer - amount
    +00206    $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn'] ;
    +00207    $step=$_SESSION['g_pagesize'];
    +00208    $page=(isset($_GET['offset']))?$_GET['page']:1;
    +00209    $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    +00210 
    +00211    list($max_line,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    +00212    $bar=jrn_navigation_bar($offset,$max_line,$step,$page);
    +00213 
    +00214    echo "<hr>$bar";
    +00215    echo '<form method="POST">';
    +00216    $hid=new widget("hidden");
    +00217 
    +00218    $hid->name="p_jrn";
    +00219    $hid->value=$p_jrn;
    +00220    echo $hid->IOValue();
     00221 
    -00222    $hid->name="jrn_type";
    -00223    $hid->value=$jrn_type;
    +00222    $hid->name="action";
    +00223    $hid->value="voir_jrn";
     00224    echo $hid->IOValue();
     00225 
     00226 
    -00227    echo $list;
    -00228    echo $hid->Submit('paid','Mis à jour paiement');
    -00229    echo '</FORM>';
    -00230    echo $bar;
    +00227    $hid->name="jrn_type";
    +00228    $hid->value=$jrn_type;
    +00229    echo $hid->IOValue();
    +00230 
     00231 
    -00232    echo '</div>';
    -00233 }
    -00234 if ( $action == 'voir_jrn_non_paye' ) {
    -00235    // Check privilege
    -00236    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    -00237      NoAccess();
    -00238      exit -1;
    -00239    }
    -00240     // Ask to update payment
    -00241     if ( isset ( $_POST['paid'])) 
    -00242       {
    -00243         // reset all the paid flag because the checkbox is post only
    -00244         // when checked
    -00245         foreach ($_POST as $name=>$paid) 
    -00246           {
    -00247             list($ad) = sscanf($name,"set_jr_id%d");
    -00248             if ( $ad == null ) continue;
    -00249             $sql="update jrn set jr_rapt='' where jr_id=$ad";
    -00250             $Res=ExecSql($cn,$sql);
    -00251 
    -00252           }
    -00253         // set a paid flag for the checked box
    -00254         foreach ($_POST as $name=>$paid) 
    -00255           {
    -00256             list ($id) = sscanf ($name,"rd_paid%d");
    +00232    echo $list;
    +00233    if ( $max_line !=0 )
    +00234      echo $hid->Submit('paid','Mise à jour paiement');
    +00235    echo '</FORM>';
    +00236    echo "$bar <hr>";
    +00237 
    +00238    echo '</div>';
    +00239 }
    +00240 if ( $action == 'voir_jrn_non_paye' ) {
    +00241    // Check privilege
    +00242    if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) < 1 )    {
    +00243      NoAccess();
    +00244      exit -1;
    +00245    }
    +00246     // Ask to update payment
    +00247     if ( isset ( $_POST['paid'])) 
    +00248       {
    +00249         // reset all the paid flag because the checkbox is post only
    +00250         // when checked
    +00251         foreach ($_POST as $name=>$paid) 
    +00252           {
    +00253             list($ad) = sscanf($name,"set_jr_id%d");
    +00254             if ( $ad == null ) continue;
    +00255             $sql="update jrn set jr_rapt='' where jr_id=$ad";
    +00256             $Res=ExecSql($cn,$sql);
     00257 
    -00258             if ( $id == null ) continue;
    -00259             echo "Mise à jour $id";
    -00260             $paid=($paid=='on')?'paid':'';
    -00261             $sql="update jrn set jr_rapt='$paid' where jr_id=$id";
    -00262             $Res=ExecSql($cn,$sql);
    -00263           }
    -00264 
    -00265       }
    -00266 
    -00267 // Show list of unpaid sell
    -00268 // Date - date of payment - Customer - amount
    -00269   // Nav. bar 
    -00270    $step=$_SESSION['g_pagesize'];
    -00271    $page=(isset($_GET['offset']))?$_GET['page']:1;
    -00272    $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    -00273 
    -00274   $sql=SQL_LIST_UNPAID_INVOICE_DATE_LIMIT." and jr_def_id=".$_GET['p_jrn'] ;
    -00275   list($max_line,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    -00276   $sql=SQL_LIST_UNPAID_INVOICE." and jr_def_id=".$_GET['p_jrn'] ;
    -00277   list($max_line2,$list2)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    -00278 
    -00279   // Get the max line
    -00280    $m=($max_line2>$max_line)?$max_line2:$max_line;
    -00281    $bar2=jrn_navigation_bar($offset,$m,$step,$page);
    -00282    
    -00283     echo '<div class="u_redcontent">';
    -00284     echo '<FORM METHOD="POST">';
    -00285     echo $bar2;
    -00286     echo '<h2 class="info"> Echeance dépassée </h2>';
    -00287     echo $list;
    -00288     echo  '<h2 class="info"> Non Payée </h2>';
    -00289     echo $list2;
    -00290     echo $bar2;
    -00291     // Add hidden parameter
    -00292     $hid=new widget("hidden");
    -00293 
    -00294     $hid->name="p_jrn";
    -00295     $hid->value=$p_jrn;
    -00296     echo $hid->IOValue();
    -00297 
    -00298     $hid->name="action";
    -00299     $hid->value="voir_jrn_non_paye";
    -00300     echo $hid->IOValue();
    -00301 
    -00302 
    -00303     $hid->name="jrn_type";
    -00304     $hid->value=$jrn_type;
    -00305     echo $hid->IOValue();
    -00306 
    +00258           }
    +00259         // set a paid flag for the checked box
    +00260         foreach ($_POST as $name=>$paid) 
    +00261           {
    +00262             list ($id) = sscanf ($name,"rd_paid%d");
    +00263 
    +00264             if ( $id == null ) continue;
    +00265             echo "Mise à jour $id";
    +00266             $paid=($paid=='on')?'paid':'';
    +00267             $sql="update jrn set jr_rapt='$paid' where jr_id=$id";
    +00268             $Res=ExecSql($cn,$sql);
    +00269           }
    +00270 
    +00271       }
    +00272 
    +00273 // Show list of unpaid sell
    +00274 // Date - date of payment - Customer - amount
    +00275   // Nav. bar 
    +00276    $step=$_SESSION['g_pagesize'];
    +00277    $page=(isset($_GET['offset']))?$_GET['page']:1;
    +00278    $offset=(isset($_GET['offset']))?$_GET['offset']:0;
    +00279 
    +00280   $sql=SQL_LIST_UNPAID_INVOICE_DATE_LIMIT." and jr_def_id=".$_GET['p_jrn'] ;
    +00281   list($max_line,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    +00282   $sql=SQL_LIST_UNPAID_INVOICE." and jr_def_id=".$_GET['p_jrn'] ;
    +00283   list($max_line2,$list2)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1);
    +00284 
    +00285   // Get the max line
    +00286    $m=($max_line2>$max_line)?$max_line2:$max_line;
    +00287    $bar2=jrn_navigation_bar($offset,$m,$step,$page);
    +00288    
    +00289     echo '<div class="u_redcontent">';
    +00290     echo '<FORM METHOD="POST">';
    +00291     echo $bar2;
    +00292     echo '<h2 class="info"> Echeance dépassée </h2>';
    +00293     echo $list;
    +00294     echo  '<h2 class="info"> Non Payée </h2>';
    +00295     echo $list2;
    +00296     echo $bar2;
    +00297     // Add hidden parameter
    +00298     $hid=new widget("hidden");
    +00299 
    +00300     $hid->name="p_jrn";
    +00301     $hid->value=$p_jrn;
    +00302     echo $hid->IOValue();
    +00303 
    +00304     $hid->name="action";
    +00305     $hid->value="voir_jrn_non_paye";
    +00306     echo $hid->IOValue();
     00307 
    -00308     echo $list;
    -00309     echo $hid->Submit('paid','Mis à jour paiement');
    -00310 
    -00311     echo '</FORM>';
    -00312     echo '</div>';
    -00313 }
    -00314 
    -00315 include("user_update.php");
    -00316 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00308 +00309 $hid->name="jrn_type"; +00310 $hid->value=$jrn_type; +00311 echo $hid->IOValue(); +00312 +00313 +00314 echo $list; +00315 if ( $m != 0 ) +00316 echo $hid->Submit('paid','Mise à jour paiement'); +00317 +00318 echo '</FORM>'; +00319 echo '</div>'; +00320 } +00321 +00322 include("user_update.php"); +00323 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__action__ven_8php.html b/doc/developper/html/user__action__ven_8php.html index 68f506578..986895668 100644 --- a/doc/developper/html/user__action__ven_8php.html +++ b/doc/developper/html/user__action__ven_8php.html @@ -4,10 +4,12 @@ - + -

    user_action_ven.php File Reference

    +

    user_action_ven.php File Reference

    Manage the ledger of type VEN. More... +

    +

    Go to the source code of this file. @@ -59,7 +61,12 @@
     $bar2 = jrn_navigation_bar($offset,$m,$step,$page)
    -


    Variable Documentation

    +

    Detailed Description

    +Manage the ledger of type VEN. +

    + +

    +Definition in file user_action_ven.php.


    Variable Documentation

    @@ -82,7 +89,7 @@

    -Definition at line 207 of file user_action_ven.php. +Definition at line 212 of file user_action_ven.php.

    @@ -107,7 +114,7 @@ Definition at line 281 of file user_action_ven.php. +Definition at line 287 of file user_action_ven.php.

    @@ -132,7 +139,7 @@ Definition at line 24 of file user_action_ven.php. +Definition at line 28 of file user_action_ven.php.

    @@ -157,9 +164,9 @@ Definition at line 113 of file user_action_ven.php. +Definition at line 118 of file user_action_ven.php.

    -Referenced by parm_code::Input(), RecordInvoice(), and RecordSell(). +Referenced by parm_code::Input(), RecordInvoice(), and RecordSell().

    @@ -184,7 +191,7 @@ Referenced by par

    -Definition at line 166 of file user_action_ven.php. +Definition at line 171 of file user_action_ven.php.

    @@ -209,7 +216,7 @@ Definition at line 136 of file user_action_ven.php. +Definition at line 141 of file user_action_ven.php.

    @@ -234,7 +241,7 @@ Definition at line 41 of file user_action_ven.php. +Definition at line 45 of file user_action_ven.php.

    @@ -259,7 +266,7 @@ Definition at line 145 of file user_action_ven.php. +Definition at line 150 of file user_action_ven.php.

    @@ -284,7 +291,7 @@ Definition at line 280 of file user_action_ven.php. +Definition at line 286 of file user_action_ven.php.

    @@ -309,7 +316,7 @@ Definition at line 97 of file user_action_ven.php. +Definition at line 102 of file user_action_ven.php.

    @@ -334,7 +341,7 @@ Definition at line 38 of file user_action_ven.php. +Definition at line 42 of file user_action_ven.php.

    @@ -359,7 +366,7 @@ Definition at line 204 of file user_action_ven.php. +Definition at line 209 of file user_action_ven.php.

    @@ -384,7 +391,7 @@ Definition at line 203 of file user_action_ven.php. +Definition at line 208 of file user_action_ven.php.

    @@ -409,7 +416,7 @@ Definition at line 193 of file user_action_ven.php. +Definition at line 198 of file user_action_ven.php.

    @@ -434,7 +441,7 @@ Definition at line 164 of file user_action_ven.php. +Definition at line 169 of file user_action_ven.php.

    @@ -459,7 +466,7 @@ Definition at line 183 of file user_action_ven.php. +Definition at line 188 of file user_action_ven.php.

    @@ -484,7 +491,7 @@ Definition at line 182 of file user_action_ven.php. +Definition at line 187 of file user_action_ven.php.

    @@ -509,7 +516,7 @@ Definition at line 202 of file user_action_ven.php. +Definition at line 207 of file user_action_ven.php.

    @@ -534,7 +541,7 @@ Definition at line 162 of file user_action_ven.php. +Definition at line 167 of file user_action_ven.php.

    @@ -559,7 +566,7 @@ Definition at line 84 of file user_action_ven.php. +Definition at line 89 of file user_action_ven.php.

    @@ -584,7 +591,7 @@ Definition at line 147 of file user_action_ven.php. +Definition at line 152 of file user_action_ven.php.

    @@ -609,7 +616,7 @@ Definition at line 167 of file user_action_ven.php. +Definition at line 172 of file user_action_ven.php.

    @@ -634,10 +641,10 @@ Definition at line 148 of file user_action_ven.php. +Definition at line 153 of file user_action_ven.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__advanced_8php-source.html b/doc/developper/html/user__advanced_8php-source.html index be1eb7312..7b784c75d 100644 --- a/doc/developper/html/user__advanced_8php-source.html +++ b/doc/developper/html/user__advanced_8php-source.html @@ -4,7 +4,7 @@ - +

    user_advanced.php

    Go to the documentation of this file.
    00001 <?
    @@ -28,51 +28,50 @@
     00019 // Auteur Dany De Bontridder ddebontridder@yahoo.fr
     00020 include_once ("ac_common.php");
     00021 /* $Revision$ */
    -00022 
    -00023 html_page_start($_SESSION['g_theme']);
    -00024 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00025   echo "You must choose a Dossier ";
    -00026   exit -2;
    -00027 }
    -00028 include_once ("postgres.php");
    -00029 /* Admin. Dossier */
    -00030 $rep=DbConnect();
    -00031 include_once ("class_user.php");
    -00032 $User=new cl_user($rep);
    -00033 $User->Check();
    -00034 
    -00035 include_once ("postgres.php");
    -00036 echo_debug('user_advanced.php',__LINE__,"user is ".$_SESSION['g_user']);
    -00037 $rep=DbConnect();
    -00038 include_once ("class_user.php");
    -00039 $User=new cl_user($rep);
    -00040 $User->Check();
    +00027 html_page_start($_SESSION['g_theme']);
    +00028 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00029   echo "You must choose a Dossier ";
    +00030   exit -2;
    +00031 }
    +00032 include_once ("postgres.php");
    +00033 /* Admin. Dossier */
    +00034 $rep=DbConnect();
    +00035 include_once ("class_user.php");
    +00036 $User=new cl_user($rep);
    +00037 $User->Check();
    +00038 
    +00039 include_once ("postgres.php");
    +00040 echo_debug('user_advanced.php',__LINE__,"user is ".$_SESSION['g_user']);
     00041 $rep=DbConnect();
     00042 include_once ("class_user.php");
     00043 $User=new cl_user($rep);
     00044 $User->Check();
    -00045 
    -00046 // We don't check permissions here in fact, permission are tested in the
    -00047 // functions 
    -00048 
    -00049 // Show the top menus
    -00050 include_once ("user_menu.php");
    -00051 echo '<div class="u_tmenu">';
    +00045 $rep=DbConnect();
    +00046 include_once ("class_user.php");
    +00047 $User=new cl_user($rep);
    +00048 $User->Check();
    +00049 
    +00050 // We don't check permissions here in fact, permission are tested in the
    +00051 // functions 
     00052 
    -00053 echo ShowMenuCompta($_SESSION['g_dossier']);
    -00054 echo '</div>';
    -00055 
    -00056 echo ShowMenuAdvanced();
    -00057 
    -00058 
    -00059 if ( isset($_REQUEST['p_action']) && $_REQUEST['p_action'] == "periode" ) {
    -00060   $p_action=$_REQUEST['p_action'];
    -00061   include_once("periode.inc.php");
    -00062 }
    -00063 
    -00064 html_page_stop();
    -00065 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00053 // Show the top menus +00054 include_once ("user_menu.php"); +00055 echo '<div class="u_tmenu">'; +00056 +00057 echo ShowMenuCompta($_SESSION['g_dossier']); +00058 echo '</div>'; +00059 +00060 echo ShowMenuAdvanced(); +00061 +00062 +00063 if ( isset($_REQUEST['p_action']) && $_REQUEST['p_action'] == "periode" ) { +00064 $p_action=$_REQUEST['p_action']; +00065 include_once("periode.inc.php"); +00066 } +00067 +00068 html_page_stop(); +00069 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__advanced_8php.html b/doc/developper/html/user__advanced_8php.html index c0020f0fc..be8fa47db 100644 --- a/doc/developper/html/user__advanced_8php.html +++ b/doc/developper/html/user__advanced_8php.html @@ -4,10 +4,12 @@ - + -

    user_advanced.php File Reference

    +

    user_advanced.php File Reference

    Obsolete. More... +

    +

    Go to the source code of this file. @@ -17,7 +19,13 @@
     $User = new cl_user($rep)
    -


    Variable Documentation

    +

    Detailed Description

    +Obsolete. +

    +

    Todo:
    Obsolete ?
    + +

    +Definition in file user_advanced.php.


    Variable Documentation

    @@ -40,7 +48,7 @@

    -Definition at line 30 of file user_advanced.php. +Definition at line 34 of file user_advanced.php.

    @@ -65,10 +73,10 @@ Definition at line 3

    -Definition at line 32 of file user_advanced.php. +Definition at line 36 of file user_advanced.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__common_8php-source.html b/doc/developper/html/user__common_8php-source.html index 5380ae45d..e4f92cd76 100644 --- a/doc/developper/html/user__common_8php-source.html +++ b/doc/developper/html/user__common_8php-source.html @@ -4,7 +4,7 @@ - +

    user_common.php

    Go to the documentation of this file.
    00001 <?
    @@ -29,927 +29,675 @@
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00021 
     00022 include_once("postgres.php");
    -00023 
    -00024 /* function GetTvaRate
    -00025  **************************************************
    -00026  * Purpose : Return the rate of the p_tva_id
    -00027  *        
    -00028  * parm : 
    -00029  * -  p_cn database connection
    -00030  *      - p_tva_id tva.tva_id
    -00031  * gen :
    -00032  *      - none
    -00033  * return:
    -00034  *       an array containing the rate and the label
    -00035  *       the tva rate or null if a problem occured
    -00036  */
    -00037 
    -00038 function GetTvaRate($p_cn,$p_tva_id) {
    -00039   // $p_tva_id is an empty string, returns 0
    -00040   if (strlen(trim($p_tva_id))==0) return 0;
    -00041 
    -00042   // Get vat info from the database
    -00043   $Res=ExecSql($p_cn,"select tva_id,tva_rate,tva_label from tva_rate where tva_id=".$p_tva_id);
    -00044   if (pg_NumRows($Res) == 0 ) return null;
    -00045 
    -00046   $r=pg_fetch_array($Res,0);
    -00047   return $r;
    -00048 
    -00049 }
    -00050 /* function ComputeTotalVat($p_cn,$a_fiche,$a_quant,$a_price,$ap_vat)
    -00051  **************************************************
    -00052  * Purpose : Compute the vat,
    -00053  *           the fiche.f_id are in a_fiche
    -00054  *           the quantity in a_quant
    -00055  *           
    -00056  *        
    -00057  * parm : 
    -00058  *      - database connection
    -00059  *      - fiche id array
    -00060  *      1- quantity array 
    -00061  *      - price array 
    -00062  *      - $ap_vat Array of tva id
    -00063  *      - $all = false if we reduce VAT
    -00064  * gen :
    -00065  *      -
    -00066  * return: array
    -00067  *       a[tva_id] =  amount vat
    -00068  */
    -00069 function ComputeTotalVat($p_cn, $a_fiche,$a_quant,$a_price,$ap_vat,$all=false ) {
    -00070 echo_debug('user_common.php',__LINE__,"ComputeTotalVat $a_fiche $a_quant $a_price");
    -00071  foreach ( $a_fiche as $t=>$el) {
    -00072    echo_debug('user_common.php',__LINE__,"t $t e $el");
    -00073  }
    -00074  $r=null;
    -00075 // foreach goods 
    -00076 //--
    -00077  foreach ( $a_fiche as $idx=>$element) {
    -00078    echo_debug ('user_common.php',__LINE__,"idx $idx element $element");
    -00079   // if the card id is null or empty 
    -00080     if (  strlen(trim($element))==0) continue;
    -00081    
    -00082     // Get the tva_id
    -00083     if ( $ap_vat != null and
    -00084          isNumber($ap_vat[$idx])== 1 and $ap_vat[$idx] != -1 ) 
    -00085       {
    -00086         $tva_id=$ap_vat[$idx];
    -00087         echo_debug('user_common',__LINE__,' tva_id is given');
    -00088         echo_debug('user_common',__LINE__,$ap_vat);
    -00089       }
    -00090     else
    -00091       {
    -00092         $tva_id=GetFicheAttribut($p_cn,$element,ATTR_DEF_TVA);
    -00093         echo_debug('user_common',__LINE__,'retrieve tva_id');
    -00094       }
    -00095     echo_debug('user_common',__LINE__,"tva id $tva_id");
    -00096     if ( $tva_id == null ) continue;
    -00097     // for each fiche find the tva_rate and tva_id
    -00098     $a_vat=GetTvaRate($p_cn,$tva_id);
    -00099    
    -00100         // Get the attribut price of the card(fiche)
    -00101         if ( $a_vat != null  and  $a_vat['tva_id'] != "" ) 
    -00102         {  
    -00103                 $flag=true;
    -00104                 $a=$a_vat['tva_id'];
    -00105                 // Compute vat for this item
    -00106                 $vat_amount=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx],2);
    -00107         
    -00108                 // only the deductible vat
    -00109                  if ( $all == false ) 
    -00110                    {
    -00111                      //variable containing the nd part 
    -00112                      // used when a card has both special rule for vat 
    -00113                      $nd1=0;
    -00114                      // if a part is not deductible then reduce vat_amount
    -00115                      $nd=GetFicheAttribut($p_cn,$a_fiche[$idx],ATTR_DEF_TVA_NON_DEDUCTIBLE);
    -00116                      if ( $nd != null && strlen(trim($nd)) != 0 && $nd != 0 )
    -00117                        {
    -00118                          $nd_amount=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx]*$nd,2);
    -00119                          // problem with round
    -00120                          $vat_amount=$vat_amount-$nd_amount;
    -00121                          echo_debug('user_common.php',__LINE__,
    -00122                                     "A - TVA Attr fiche [$nd] nd amount [ $nd_amount ]".
    -00123                                     "vat amount [ $vat_amount]");
    -00124                          $flag=false;
    -00125                          // save nd into nd1
    -00126                          $nd1=$nd;
    -00127                         }       
    -00128                         // if a part is not deductible then reduce vat_amount
    -00129                         $nd=GetFicheAttribut($p_cn,$a_fiche[$idx],ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP);
    -00130                         if ( $nd != null && strlen(trim($nd)) != 0 && $nd != 0 )
    -00131                         {
    -00132                           $nd_amount2=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx]*$nd,2);
    -00133                          
    -00134                           $vat_amount=$vat_amount-$nd_amount2;
    -00135                           // when using both vat, their sum cannot exceed 1, if = 1 then vat = 0
    -00136                           if ( ($nd+$nd1) == 1)
    -00137                             $vat_amount=0;
    -00138                           echo_debug('user_common.php',__LINE__,
    -00139                                      "B - TVA Attr fiche [$nd] nd amount [ $nd_amount2 ]".
    -00140                                      "vat amount [ $vat_amount]");
    -00141                           
    -00142                           $flag=false;
    -00143                         }       
    -00144                 }
    -00145                  
    -00146                 $r[$a]=isset ( $r[$a] )?$r[$a]+$vat_amount:$vat_amount; 
    -00147         }
    -00148     
    -00149  }
    -00150  echo_debug('user_common.php',__LINE__," return ".var_export($r,true));
    -00151  return $r;
    +00039 function GetTvaRate($p_cn,$p_tva_id) {
    +00040   // $p_tva_id is an empty string, returns 0
    +00041   if (strlen(trim($p_tva_id))==0) return 0;
    +00042 
    +00043   // Get vat info from the database
    +00044   $Res=ExecSql($p_cn,"select tva_id,tva_rate,tva_label from tva_rate where tva_id=".$p_tva_id);
    +00045   if (pg_NumRows($Res) == 0 ) return null;
    +00046 
    +00047   $r=pg_fetch_array($Res,0);
    +00048   return $r;
    +00049 
    +00050 }
    +00068 function ComputeTotalVat($p_cn, $a_fiche,$a_quant,$a_price,$ap_vat,$all=false ) {
    +00069 echo_debug('user_common.php',__LINE__,"ComputeTotalVat $a_fiche $a_quant $a_price");
    +00070  foreach ( $a_fiche as $t=>$el) {
    +00071    echo_debug('user_common.php',__LINE__,"t $t e $el");
    +00072  }
    +00073  $r=null;
    +00074 // foreach goods 
    +00075 //--
    +00076  foreach ( $a_fiche as $idx=>$element) {
    +00077    echo_debug ('user_common.php',__LINE__,"idx $idx element $element");
    +00078   // if the card id is null or empty 
    +00079     if (  strlen(trim($element))==0) continue;
    +00080    
    +00081     // Get the tva_id
    +00082     if ( $ap_vat != null and
    +00083          isNumber($ap_vat[$idx])== 1 and $ap_vat[$idx] != -1 ) 
    +00084       {
    +00085         $tva_id=$ap_vat[$idx];
    +00086         echo_debug('user_common',__LINE__,' tva_id is given');
    +00087         echo_debug('user_common',__LINE__,$ap_vat);
    +00088       }
    +00089     else
    +00090       {
    +00091         $tva_id=GetFicheAttribut($p_cn,$element,ATTR_DEF_TVA);
    +00092         echo_debug('user_common',__LINE__,'retrieve tva_id');
    +00093       }
    +00094     echo_debug('user_common',__LINE__,"tva id $tva_id");
    +00095     if ( $tva_id == null ) continue;
    +00096     // for each fiche find the tva_rate and tva_id
    +00097     $a_vat=GetTvaRate($p_cn,$tva_id);
    +00098    
    +00099         // Get the attribut price of the card(fiche)
    +00100         if ( $a_vat != null  and  $a_vat['tva_id'] != "" ) 
    +00101         {  
    +00102                 $flag=true;
    +00103                 $a=$a_vat['tva_id'];
    +00104                 // Compute vat for this item
    +00105                 $vat_amount=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx],2);
    +00106         
    +00107                 // only the deductible vat
    +00108                  if ( $all == false ) 
    +00109                    {
    +00110                      //variable containing the nd part 
    +00111                      // used when a card has both special rule for vat 
    +00112                      $nd1=0;
    +00113                      // if a part is not deductible then reduce vat_amount
    +00114                      $nd=GetFicheAttribut($p_cn,$a_fiche[$idx],ATTR_DEF_TVA_NON_DEDUCTIBLE);
    +00115                      if ( $nd != null && strlen(trim($nd)) != 0 && $nd != 0 )
    +00116                        {
    +00117                          $nd_amount=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx]*$nd,2);
    +00118                          // problem with round
    +00119                          $vat_amount=$vat_amount-$nd_amount;
    +00120                          echo_debug('user_common.php',__LINE__,
    +00121                                     "A - TVA Attr fiche [$nd] nd amount [ $nd_amount ]".
    +00122                                     "vat amount [ $vat_amount]");
    +00123                          $flag=false;
    +00124                          // save nd into nd1
    +00125                          $nd1=$nd;
    +00126                         }       
    +00127                         // if a part is not deductible then reduce vat_amount
    +00128                         $nd=GetFicheAttribut($p_cn,$a_fiche[$idx],ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP);
    +00129                         if ( $nd != null && strlen(trim($nd)) != 0 && $nd != 0 )
    +00130                         {
    +00131                           $nd_amount2=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx]*$nd,2);
    +00132                          
    +00133                           $vat_amount=$vat_amount-$nd_amount2;
    +00134                           // when using both vat, their sum cannot exceed 1, if = 1 then vat = 0
    +00135                           if ( ($nd+$nd1) == 1)
    +00136                             $vat_amount=0;
    +00137                           echo_debug('user_common.php',__LINE__,
    +00138                                      "B - TVA Attr fiche [$nd] nd amount [ $nd_amount2 ]".
    +00139                                      "vat amount [ $vat_amount]");
    +00140                           
    +00141                           $flag=false;
    +00142                         }       
    +00143                 }
    +00144                  
    +00145                 $r[$a]=isset ( $r[$a] )?$r[$a]+$vat_amount:$vat_amount; 
    +00146         }
    +00147     
    +00148  }
    +00149  echo_debug('user_common.php',__LINE__," return ".var_export($r,true));
    +00150  return $r;
    +00151  
     00152  
    -00153  
    -00154 }
    -00155 
    -00156 /* function ComputeVat($p_cn,$a_fiche,$a_quant,$a_price,$ap_vat)
    -00157  **************************************************
    -00158  * Purpose : Compute the vat for only one elt,
    -00159  *           the fiche.f_id are in p_fiche
    -00160  *           the quantity in p_quant
    -00161  *           
    -00162  *        
    -00163  * parm : 
    -00164  *      - database connection
    -00165  *      - fiche id int
    -00166  *      1- quantity int
    -00167  *      - price float 
    -00168  *      - Tva_id
    -00169  * gen :
    -00170  *      -
    -00171  * return: the amount of vat
    -00172  */
    -00173 function ComputeVat($p_cn,      $p_fiche,$p_quant,$p_price,$p_vat ) 
    -00174 {
    -00175   echo_debug('user_common.php',__LINE__,"function ComputeVat($p_cn,$p_fiche,$p_quant,$p_price,$p_vat )");
    -00176   // Get the tva_id
    -00177   if ( $p_vat != null and  isNumber($p_vat)== 1 and $p_vat != -1)
    -00178     $tva_id=$p_vat;
    -00179   else
    -00180     $tva_id=GetFicheAttribut($p_cn,$p_fiche,ATTR_DEF_TVA);
    -00181  
    -00182   echo_debug('user_common',__LINE__,"ComputeVat tva id = $tva_id"); 
    -00183   if ( $tva_id == null  ) return -1;
    -00184   // find the tva_rate and tva_id
    -00185   $a_vat=GetTvaRate($p_cn,$tva_id);
    -00186   $vat_amount=null;
    -00187   // Get the attribut price of the card(fiche)
    -00188   if ( $a_vat != null  and  $a_vat['tva_id'] != "" ) 
    -00189     {
    -00190       $a=$a_vat['tva_id'];
    -00191       $vat_amount=$p_price*$a_vat['tva_rate']*$p_quant;
    -00192     } 
    -00193   echo_debug('user_common',__LINE__,'return '.round($vat_amount,2));
    -00194   return round($vat_amount,2);
    -00195   
    -00196   
    -00197 }
    -00198 
    -00199 
    -00200 /* function GetTvaPoste($p_cn,$tva_id,$p_type);
    -00201  **************************************************
    -00202  * Purpose : Get the account of tva_rate.tva_poste
    -00203  *        return the credit or the debit account
    -00204  * parm : connection
    -00205  *      -     tva_rate.tva_id
    -00206  *        type ( d or credit)
    -00207  * gen :
    -00208  *      -
    -00209  * return:
    -00210  *        return the credit or the debit account
    -00211  *        null if error
    -00212  */
    -00213 function GetTvaPoste($p_cn,$p_tva_id,$p_cred) {
    -00214         $Res=ExecSql($p_cn,"select tva_poste from tva_rate where tva_id=$p_tva_id");
    -00215         if ( pg_NumRows($Res) == 0 ) return null;
    -00216         $a=pg_fetch_array($Res,0);
    -00217         list ($deb,$cred)=split(",",$a['tva_poste']);
    -00218         if ( $p_cred=='c' ) return $cred;
    -00219         if ($p_cred=='d') return $deb;
    -00220         echo_error ("Invalid $p_cred in GetTvaRate");
    -00221         return null;
    -00222 }
    +00153 }
    +00154 
    +00171 function ComputeVat($p_cn,      $p_fiche,$p_quant,$p_price,$p_vat ) 
    +00172 {
    +00173   echo_debug('user_common.php',__LINE__,"function ComputeVat($p_cn,$p_fiche,$p_quant,$p_price,$p_vat )");
    +00174   // Get the tva_id
    +00175   if ( $p_vat != null and  isNumber($p_vat)== 1 and $p_vat != -1)
    +00176     $tva_id=$p_vat;
    +00177   else
    +00178     $tva_id=GetFicheAttribut($p_cn,$p_fiche,ATTR_DEF_TVA);
    +00179  
    +00180   echo_debug('user_common',__LINE__,"ComputeVat tva id = $tva_id"); 
    +00181   if ( $tva_id == null  ) return -1;
    +00182   // find the tva_rate and tva_id
    +00183   $a_vat=GetTvaRate($p_cn,$tva_id);
    +00184   $vat_amount=null;
    +00185   // Get the attribut price of the card(fiche)
    +00186   if ( $a_vat != null  and  $a_vat['tva_id'] != "" ) 
    +00187     {
    +00188       $a=$a_vat['tva_id'];
    +00189       $vat_amount=$p_price*$a_vat['tva_rate']*$p_quant;
    +00190     } 
    +00191   echo_debug('user_common',__LINE__,'return '.round($vat_amount,2));
    +00192   return round($vat_amount,2);
    +00193   
    +00194   
    +00195 }
    +00196 
    +00197 
    +00210 function GetTvaPoste($p_cn,$p_tva_id,$p_cred) {
    +00211         $Res=ExecSql($p_cn,"select tva_poste from tva_rate where tva_id=$p_tva_id");
    +00212         if ( pg_NumRows($Res) == 0 ) return null;
    +00213         $a=pg_fetch_array($Res,0);
    +00214         list ($deb,$cred)=split(",",$a['tva_poste']);
    +00215         if ( $p_cred=='c' ) return $cred;
    +00216         if ($p_cred=='d') return $deb;
    +00217         echo_error ("Invalid $p_cred in GetTvaRate");
    +00218         return null;
    +00219 }
    +00220 
    +00221 
    +00222 
     00223 
    -00224 
    -00225 
    -00226 
    -00227 /* function InsertJrnx($p_cn,$p_type,$p_user,$p_jrn,$p_poste,$p_date,$p_amount,$p_grpt,$p_periode
    -00228  **************************************************
    -00229  * Purpose : Insert into the table Jrn
    -00230  *        
    -00231  * parm : 
    -00232  *      - $p_cn database connection
    -00233  *  - $p_type debit or credit
    -00234  *  - $p_user the current user
    -00235  *  - $p_jrn the current 'journal' (folder)
    -00236  *  - $p_poste the account
    -00237  *  - $p_date
    -00238  *  - $p_amount amount to insert
    -00239  *  - $p_periode the concerned periode
    -00240  * gen :
    -00241  *      - none
    -00242  * return:
    -00243  *   - nothing
    -00244  */
    -00245 
    -00246 function InsertJrnx($p_cn,$p_type,$p_user,$p_jrn,$p_poste,$p_date,$p_amount,$p_grpt,$p_periode,$p_qcode="")
    -00247 {
    -00248   echo_debug ('user_common.php',__LINE__,"InsertJrnx param 
    -00249             type = $p_type p_user $p_user 
    -00250             p_date $p_date p_poste $p_poste 
    -00251             p_amount $p_amount p_grpt = $p_grpt p_periode = $p_periode");
    -00252 
    -00253   if ( $p_amount == 0) return true;
    -00254 
    -00255   $debit=($p_type=='c')?'false':'true';
    -00256 
    -00257   // if negative value the operation is inversed
    -00258   if ( $p_amount < 0 ) {
    -00259     $debit=($debit=='false')?'true':'false';
    -00260   }
    -00261 
    -00262   $sql=sprintf("select insert_jrnx
    -00263                  ('%s',abs(%.2f),%d,%d,%d,%s,'%s',%d,'%s')",
    -00264                   $p_date,round($p_amount,2),$p_poste,$p_grpt,$p_jrn,$debit,$p_user,$p_periode,$p_qcode);
    -00265 
    -00266   echo_debug('user_common.php',__LINE__,"InsertJrnx $sql");
    -00267   $Res=ExecSql($p_cn,$sql);
    -00268   if ( $Res==false) return $Res;
    -00269   return GetSequence($p_cn,'s_jrn_op');
    -00270 
    -00271 }
    -00272 /* function InsertJrn($p_cn,$p_date,$p_jrn,$p_comment,$p_amount,$p_grpt,$p_periode
    -00273  **************************************************
    -00274  * Purpose : Insert into the table Jrnx
    -00275  *        
    -00276  * parm : 
    -00277  *      - $p_cn database connection
    -00278  *  - $p_date date
    -00279  *  - $p_jrn the current 'journal' (folder)
    -00280  *  - $p_poste the account
    -00281  *  - $p_amount amount to insert
    -00282  *  - $p_periode the concerned periode
    -00283  *  - $p_comment comment
    -00284  * gen :
    -00285  *      - none
    -00286  * return:
    -00287  *   - nothing
    -00288  */
    -00289 
    -00290 function InsertJrn($p_cn,$p_date,$p_echeance,$p_jrn,$p_comment,$p_amount,$p_grpt,$p_periode)
    -00291 {
    -00292         echo_debug ('user_common.php',__LINE__,"InsertJrn param 
    -00293             p_date $p_date p_poste $p_comment p_amount $p_amount p_grpt = $p_grpt p_periode = $p_periode p_echeance = $p_echeance
    -00294 comment = $p_comment");
    -00295         $p_comment=FormatString($p_comment);
    -00296 
    -00297         if ( $p_echeance == "" or $p_echeance==null) {
    -00298                 $p_echeance='null';
    -00299         } else {
    -00300                 $p_echeance=sprintf("to_date('%s','DD.MM.YYYY')",$p_echeance);
    -00301         }
    -00302         $sql=sprintf("insert into jrn (jr_def_id,jr_montant,jr_comment,jr_date,jr_ech,jr_grpt_id,jr_tech_per)
    -00303                  values ( %d,abs(%.2f),'%s',to_date('%s','DD.MM.YYYY'),%s,%d,%d)",
    -00304                      $p_jrn, round($p_amount,2),$p_comment,$p_date,$p_echeance,$p_grpt,$p_periode);
    -00305         echo_debug('user_common.php',__LINE__,"InsertJrn $sql");
    -00306         $Res=ExecSql($p_cn,$sql);                                
    -00307         if ( $Res == false)  return false;
    -00308         return GetSequence($p_cn,'s_jrn');
    -00309 }
    -00310 /* function ListJrn($p_cn,$p_jrn,$p_wherel)
    -00311  **************************************************
    -00312  * Purpose : show all the lines of the asked jrn
    -00313  *        
    -00314  * parm : 
    -00315  *      - $p_cn database connection
    -00316  *      - $p_jrn jrn_id jrn.jrn_def_id
    -00317  *      - $p_where the sql query where clause
    -00318  *      - $p_array param. for a search
    -00319  *      - $p_value offset
    -00320  *      - $p_paid value : 0 nothing is shown, 1 check box; 2 check_box disable
    -00321  * return: array (entryCount,generatedHTML);
    -00322  * 
    -00323  */
    -00324 function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null,$p_value=0,$p_paid=0)
    -00325 {
    -00326 
    -00327   include_once("central_inc.php");
    -00328   $limit=($_SESSION['g_pagesize']!=-1)?" LIMIT ".$_SESSION['g_pagesize']:"";
    -00329   $offset=($_SESSION['g_pagesize']!=-1)?" OFFSET ".$p_value:"";
    -00330   if ( $p_array == null ) {
    -00331 
    -00332   //que fait cette requête??? 
    -00333     
    -00334    $sql="select jr_id   ,
    -00335                         jr_montant,
    -00336                         jr_comment,
    -00337                         jr_ech,
    -00338                         to_char(jr_date,'DD.MM.YYYY') as jr_date,
    -00339                         jr_date as jr_date_order,
    -00340                         jr_grpt_id,
    -00341                         jr_rapt,
    -00342                         jr_internal,
    -00343                         jrn_def_id,
    -00344                         jrn_def_name,
    -00345                         jrn_def_ech,
    -00346                         jrn_def_type,
    -00347                         jr_valid,
    -00348                         jr_tech_per,
    -00349                         jr_pj_name,
    -00350                         p_closed
    -00351                        from 
    -00352                         jrn 
    -00353                             join jrn_def on jrn_def_id=jr_def_id 
    -00354                             join parm_periode on p_id=jr_tech_per
    -00355                        $p_where 
    -00356                          order by jr_date_order asc";
    -00357   }
    -00358   if ( $p_array != null ) {
    -00359     // Construction Query 
    -00360     foreach ( $p_array as $key=>$element) {
    -00361       ${"l_$key"}=$element;
    -00362     }
    -00363     $sql="select jr_id  ,
    -00364                 jr_montant,
    -00365                 jr_comment,
    -00366                 jr_ech,
    -00367                 to_char(jr_date,'DD.MM.YYYY') as jr_date,
    -00368                 jr_date as jr_date_order,
    -00369                 jr_grpt_id,
    -00370                 jr_rapt,
    -00371                 jr_internal,
    -00372                 jrn_def_id,
    -00373                 jrn_def_name,
    -00374                 jrn_def_ech,
    -00375                 jrn_def_type,
    -00376                 jr_valid,
    -00377                 jr_tech_per,
    -00378                 jr_pj_name,
    -00379                 p_closed
    -00380                       from 
    -00381                 jrn join jrn_def on jrn_def_id=jr_def_id 
    -00382                     join parm_periode on p_id=jr_tech_per
    -00383                 ";
    -00384     $jrn_sql=($p_jrn =0)?"1=1":"jrn_def_id=$p_jrn ";
    -00385     $l_and=" where ";
    -00386     // amount
    -00387     if ( ereg("^[0-9]+$", $l_s_montant) || ereg ("^[0-9]+\.[0-9]+$", $l_s_montant) ) 
    -00388     {
    -00389       $sql.=$l_and."  jr_montant $l_mont_sel $l_s_montant";
    -00390       $l_and=" and ";
    -00391     }
    -00392     // date
    -00393     if ( isDate($l_date_start) != null ) 
    -00394     {
    -00395       $sql.=$l_and." jr_date >= to_date('".$l_date_start."','DD.MM.YYYY')";
    -00396       $l_and=" and ";
    -00397     }
    -00398     if ( isDate($l_date_end) != null ) {
    -00399       $sql.=$l_and." jr_date <= to_date('".$l_date_end."','DD.MM.YYYY')";
    -00400       $l_and=" and ";
    -00401     }
    -00402     // comment
    -00403     $l_s_comment=FormatString($l_s_comment);
    -00404     if ( $l_s_comment != null ) 
    -00405     {
    -00406       $sql.=$l_and." upper(jr_comment) like upper('%".$l_s_comment."%') ";
    -00407       $l_and=" and ";
    -00408     }
    -00409     // internal
    -00410     $l_s_internal=FormatString($l_s_internal);
    -00411     if ( $l_s_internal != null ) {
    -00412       $sql.=$l_and."  jr_internal like ('%$l_s_internal%')  ";
    -00413       $l_and=" and ";
    -00414     }
    -00415     // Poste
    -00416     $l_poste=FormatString($l_poste);
    -00417     if ( $l_poste != null ) {
    -00418       $sql.=$l_and."  jr_grpt_id in (select j_grpt 
    -00419              from jrnx where j_poste = $l_poste)  ";
    -00420       $l_and=" and ";
    -00421     }
    -00422     // Quick Code
    -00423     if ( $l_qcode != null ) 
    -00424       {
    -00425         $sql.=$l_and."  jr_grpt_id in ( select j_grpt from 
    -00426              jrnx where j_qcode = '$l_qcode')";
    -00427         $l_and=" and ";
    -00428       }
    -00429     // if not admin check filter 
    -00430     $User=new cl_user(DbConnect());
    -00431     $User->Check();
    -00432     if ( $User->admin == 0 ) 
    -00433     {
    -00434       $sql.=$l_and." jr_def_id in ( select uj_jrn_id ".
    -00435         " from user_sec_jrn where ".
    -00436         " uj_login='".$_SESSION['g_user']."'".
    -00437         " and uj_priv in ('R','W'))";
    -00438     }
    -00439     $sql.=" order by jr_date_order asc";
    -00440   }// p_array != null
    -00441   // Count 
    -00442   $count=CountSql($p_cn,$sql);
    -00443   // Add the limit 
    -00444   $sql.=$limit.$offset;
    +00243 function InsertJrnx($p_cn,$p_type,$p_user,$p_jrn,$p_poste,$p_date,$p_amount,$p_grpt,$p_periode,$p_qcode="")
    +00244 {
    +00245   echo_debug ('user_common.php',__LINE__,"InsertJrnx param 
    +00246             type = $p_type p_user $p_user 
    +00247             p_date $p_date p_poste $p_poste 
    +00248             p_amount $p_amount p_grpt = $p_grpt p_periode = $p_periode");
    +00249 
    +00250   if ( $p_amount == 0) return true;
    +00251 
    +00252   $debit=($p_type=='c')?'false':'true';
    +00253 
    +00254   // if negative value the operation is inversed
    +00255   if ( $p_amount < 0 ) {
    +00256     $debit=($debit=='false')?'true':'false';
    +00257   }
    +00258 
    +00259   $sql=sprintf("select insert_jrnx
    +00260                  ('%s',abs(%.2f),%d,%d,%d,%s,'%s',%d,'%s')",
    +00261                   $p_date,round($p_amount,2),$p_poste,$p_grpt,$p_jrn,$debit,$p_user,$p_periode,$p_qcode);
    +00262 
    +00263   echo_debug('user_common.php',__LINE__,"InsertJrnx $sql");
    +00264   $Res=ExecSql($p_cn,$sql);
    +00265   if ( $Res==false) return $Res;
    +00266   return GetSequence($p_cn,'s_jrn_op');
    +00267 
    +00268 }
    +00287 function InsertJrn($p_cn,$p_date,$p_echeance,$p_jrn,$p_comment,$p_amount,$p_grpt,$p_periode)
    +00288 {
    +00289         echo_debug ('user_common.php',__LINE__,"InsertJrn param 
    +00290             p_date $p_date p_poste $p_comment p_amount $p_amount p_grpt = $p_grpt p_periode = $p_periode p_echeance = $p_echeance
    +00291 comment = $p_comment");
    +00292         $p_comment=FormatString($p_comment);
    +00293 
    +00294         if ( $p_echeance == "" or $p_echeance==null) {
    +00295                 $p_echeance='null';
    +00296         } else {
    +00297                 $p_echeance=sprintf("to_date('%s','DD.MM.YYYY')",$p_echeance);
    +00298         }
    +00299         $sql=sprintf("insert into jrn (jr_def_id,jr_montant,jr_comment,jr_date,jr_ech,jr_grpt_id,jr_tech_per)
    +00300                  values ( %d,abs(%.2f),'%s',to_date('%s','DD.MM.YYYY'),%s,%d,%d)",
    +00301                      $p_jrn, round($p_amount,2),$p_comment,$p_date,$p_echeance,$p_grpt,$p_periode);
    +00302         echo_debug('user_common.php',__LINE__,"InsertJrn $sql");
    +00303         $Res=ExecSql($p_cn,$sql);                                
    +00304         if ( $Res == false)  return false;
    +00305         return GetSequence($p_cn,'s_jrn');
    +00306 }
    +00321 function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null,$p_value=0,$p_paid=0)
    +00322 {
    +00323 
    +00324   include_once("central_inc.php");
    +00325   $limit=($_SESSION['g_pagesize']!=-1)?" LIMIT ".$_SESSION['g_pagesize']:"";
    +00326   $offset=($_SESSION['g_pagesize']!=-1)?" OFFSET ".$p_value:"";
    +00327   if ( $p_array == null ) {
    +00328 
    +00329   //que fait cette requête??? 
    +00330     
    +00331    $sql="select jr_id   ,
    +00332                         jr_montant,
    +00333                         jr_comment,
    +00334                         jr_ech,
    +00335                         to_char(jr_date,'DD.MM.YYYY') as jr_date,
    +00336                         jr_date as jr_date_order,
    +00337                         jr_grpt_id,
    +00338                         jr_rapt,
    +00339                         jr_internal,
    +00340                         jrn_def_id,
    +00341                         jrn_def_name,
    +00342                         jrn_def_ech,
    +00343                         jrn_def_type,
    +00344                         jr_valid,
    +00345                         jr_tech_per,
    +00346                         jr_pj_name,
    +00347                         p_closed
    +00348                        from 
    +00349                         jrn 
    +00350                             join jrn_def on jrn_def_id=jr_def_id 
    +00351                             join parm_periode on p_id=jr_tech_per
    +00352                        $p_where 
    +00353                          order by jr_date_order asc,jr_internal asc";
    +00354   }
    +00355   if ( $p_array != null ) {
    +00356     // Construction Query 
    +00357     foreach ( $p_array as $key=>$element) {
    +00358       ${"l_$key"}=$element;
    +00359     }
    +00360     $sql="select jr_id  ,
    +00361                 jr_montant,
    +00362                 jr_comment,
    +00363                 jr_ech,
    +00364                 to_char(jr_date,'DD.MM.YYYY') as jr_date,
    +00365                 jr_date as jr_date_order,
    +00366                 jr_grpt_id,
    +00367                 jr_rapt,
    +00368                 jr_internal,
    +00369                 jrn_def_id,
    +00370                 jrn_def_name,
    +00371                 jrn_def_ech,
    +00372                 jrn_def_type,
    +00373                 jr_valid,
    +00374                 jr_tech_per,
    +00375                 jr_pj_name,
    +00376                 p_closed
    +00377                       from 
    +00378                 jrn join jrn_def on jrn_def_id=jr_def_id 
    +00379                     join parm_periode on p_id=jr_tech_per
    +00380                 ";
    +00381     $jrn_sql=($p_jrn =0)?"1=1":"jrn_def_id=$p_jrn ";
    +00382     $l_and=" where ";
    +00383     // amount
    +00384     if ( ereg("^[0-9]+$", $l_s_montant) || ereg ("^[0-9]+\.[0-9]+$", $l_s_montant) ) 
    +00385     {
    +00386       $sql.=$l_and."  jr_montant $l_mont_sel $l_s_montant";
    +00387       $l_and=" and ";
    +00388     }
    +00389     // date
    +00390     if ( isDate($l_date_start) != null ) 
    +00391     {
    +00392       $sql.=$l_and." jr_date >= to_date('".$l_date_start."','DD.MM.YYYY')";
    +00393       $l_and=" and ";
    +00394     }
    +00395     if ( isDate($l_date_end) != null ) {
    +00396       $sql.=$l_and." jr_date <= to_date('".$l_date_end."','DD.MM.YYYY')";
    +00397       $l_and=" and ";
    +00398     }
    +00399     // comment
    +00400     $l_s_comment=FormatString($l_s_comment);
    +00401     if ( $l_s_comment != null ) 
    +00402     {
    +00403       $sql.=$l_and." upper(jr_comment) like upper('%".$l_s_comment."%') ";
    +00404       $l_and=" and ";
    +00405     }
    +00406     // internal
    +00407     $l_s_internal=FormatString($l_s_internal);
    +00408     if ( $l_s_internal != null ) {
    +00409       $sql.=$l_and."  jr_internal like ('%$l_s_internal%')  ";
    +00410       $l_and=" and ";
    +00411     }
    +00412     // Poste
    +00413     $l_poste=FormatString($l_poste);
    +00414     if ( $l_poste != null ) {
    +00415       $sql.=$l_and."  jr_grpt_id in (select j_grpt 
    +00416              from jrnx where j_poste = $l_poste)  ";
    +00417       $l_and=" and ";
    +00418     }
    +00419     // Quick Code
    +00420     if ( $l_qcode != null ) 
    +00421       {
    +00422         $sql.=$l_and."  jr_grpt_id in ( select j_grpt from 
    +00423              jrnx where j_qcode = '$l_qcode')";
    +00424         $l_and=" and ";
    +00425       }
    +00426     // if not admin check filter 
    +00427     $User=new cl_user(DbConnect());
    +00428     $User->Check();
    +00429     if ( $User->admin == 0 ) 
    +00430     {
    +00431       $sql.=$l_and." jr_def_id in ( select uj_jrn_id ".
    +00432         " from user_sec_jrn where ".
    +00433         " uj_login='".$_SESSION['g_user']."'".
    +00434         " and uj_priv in ('R','W'))";
    +00435     }
    +00436     $sql.=" order by jr_date_order asc";
    +00437   }// p_array != null
    +00438   // Count 
    +00439   $count=CountSql($p_cn,$sql);
    +00440   // Add the limit 
    +00441   $sql.=$limit.$offset;
    +00442 
    +00443   // Execute SQL stmt
    +00444   $Res=ExecSql($p_cn,$sql);
     00445 
    -00446   // Execute SQL stmt
    -00447   $Res=ExecSql($p_cn,$sql);
    -00448 
    -00449   //starting from here we can refactor, so that instead of returning the generated HTML, 
    -00450   //this function returns a tree structure.
    -00451   
    -00452   $r="";
    -00453   $r.=JS_VIEW_JRN_DETAIL;
    -00454   $r.=JS_VIEW_JRN_CANCEL;
    -00455   $r.=JS_VIEW_JRN_MODIFY;
    -00456 
    -00457   $Max=pg_NumRows($Res);
    +00446   //starting from here we can refactor, so that instead of returning the generated HTML, 
    +00447   //this function returns a tree structure.
    +00448   
    +00449   $r="";
    +00450   $r.=JS_VIEW_JRN_DETAIL;
    +00451   $r.=JS_VIEW_JRN_CANCEL;
    +00452   $r.=JS_VIEW_JRN_MODIFY;
    +00453 
    +00454   $Max=pg_NumRows($Res);
    +00455 
    +00456   //TODO: correct this message. 
    +00457   if ($Max==0) return array(0,"Aucun enregistrement trouvé");
     00458 
    -00459   //TODO: correct this message. 
    -00460   if ($Max==0) return array(0,"No row selected");
    -00461   echo "p_paid=$p_paid";
    -00462   $r.='<table style="width:100%;border:solid blue 2px ;border-style:outset;">';
    -00463   $l_sessid=$_REQUEST['PHPSESSID'];
    -00464   $r.="<tr class=\"even\">";
    -00465  $r.="<th> Internal </th>";
    -00466   $r.="<th> Date </th>";
    -00467   $r.="<th> Echéance </th>";
    -00468   $r.="<th> Description</th>";
    -00469   $r.="<th> Montant </th>";
    -00470   // if $p_paid is not equal to 0 then we have a paid column
    -00471   if ( $p_paid != 0 ) 
    -00472     {
    -00473       $r.="<th> Pay&eacute;</th>";
    -00474     }
    -00475   $r.="<th>Op. Concernée</th>";
    -00476   $r.="<th>Document</th>";
    -00477   $r.="</tr>";
    -00478 
    -00479   for ($i=0; $i < $Max;$i++) {
    -00480 
    -00481     //STAN the rows here must be stored in an array
    -00482     
    -00483     $row=pg_fetch_array($Res,$i);
    -00484     
    -00485     if ( $i % 2 == 0 ) $tr='<TR class="odd">'; 
    -00486                 else $tr='<TR class="even">';
    -00487     $r.=$tr;
    -00488     //internal code
    -00489         // button  modify
    -00490     $r.="<TD>";
    -00491     $r.=sprintf('<A class="detail" HREF="javascript:modifyOperation(\'%s\',\'%s\',\'%s\')" >%s</A>',
    -00492                 $row['jr_id'], $l_sessid, $p_jrn, $row['jr_internal']);
    -00493     $r.="</TD>";
    -00494     // date
    -00495     $r.="<TD>";
    -00496     $r.=$row['jr_date'];
    -00497     $r.="</TD>";
    -00498     // echeance
    -00499     $r.="<TD>";
    -00500     $r.=$row['jr_ech'];
    -00501     $r.="</TD>";
    -00502     
    -00503     // comment
    -00504     $r.="<TD>";
    -00505     $r.=$row['jr_comment'];
    -00506     $r.="</TD>";
    -00507     
    -00508     // Amount
    -00509     // If the ledger is financial :
    -00510     // the credit must be negative and written in red
    -00511     // Get the jrn type
    -00512     $jrn_prop=GetJrnProp($p_cn,$row['jrn_def_id'],1);  
    -00513     $positive=0;
    -00514 
    -00515     // Check ledger type
    -00516      if (  $jrn_prop['jrn_def_type'] == 'FIN' ) 
    -00517      {
    -00518        $positive = CountSql($p_cn,"select * from jrn inner join jrnx on jr_grpt_id=j_grpt ".
    -00519                            " where jr_id=".$row['jr_id']." and (j_poste like '55%' or j_poste like '57%' )".
    -00520                            " and j_debit='f'");
    -00521      }
    -00522     $r.="<TD align=\"right\">";
    -00523     //STAN $positive always == 0
    -00524      $r.=( $positive != 0 )?"<font color=\"red\">  - ".sprintf("%8.2f",$row['jr_montant'])."</font>":sprintf("%8.2f",$row['jr_montant']);
    -00525     $r.="</TD>";
    -00526 
    -00527 
    -00528     // Show the paid column if p_paid is not null
    -00529     if ( $p_paid !=0 )
    -00530       {
    -00531         $w=new widget("checkbox");
    -00532         $w->name="rd_paid".$row['jr_id'];
    -00533         $w->selected=($row['jr_rapt']=='paid')?true:false;
    -00534         // if p_paid == 2 then readonly
    -00535         $w->readonly=( $p_paid == 2)?true:false;
    -00536         $h=new widget("hidden");
    -00537         $h->name="set_jr_id".$row['jr_id'];
    -00538         $r.='<TD>'.$w->IOValue().$h->IOValue().'</TD>';
    -00539       }
    -00540     
    -00541     // Rapprochement
    -00542     $a=GetConcerned($p_cn,$row['jr_id']);
    -00543     $r.="<TD>";
    -00544     if ( $a != null ) {
    -00545       // $r.="operation concernée ";
    -00546       
    -00547       foreach ($a as $key => $element) 
    -00548       {      
    -00549               $r.= "<A class=\"detail\" HREF=\"javascript:viewDetail('".GetGrpt($p_cn,$element)."','$l_sessid')\" > ".GetInternal($p_cn,$element)."</A>";
    -00550       }//for
    -00551     }// if ( $a != null ) {
    -00552     $r.="</TD>";
    -00553 
    -00554     if ( $row['jr_valid'] == 'f'  ) {
    -00555       $r.="<TD> Opération annulée</TD>";
    -00556     }    else {
    -00557       // all operations can be removed either by setting to 0 the amount
    -00558       // or by writing the opposite operation if the period is closed
    -00559       $r.="<TD>";
    -00560       // cancel operation
    -00561       $r.=sprintf('<input TYPE="BUTTON" VALUE="%s" onClick="cancelOperation(\'%s\',\'%s\',\'%s\')">',
    -00562                   "Annuler",$row['jr_grpt_id'],$l_sessid,$p_jrn);
    -00563       $r.="</TD>";
    -00564     } // else
    -00565     //document
    -00566     $r.="<TD>".sprintf('<A class="detail" HREF="show_document.php?jrn=%s&jr_grpt_id=%s">%s</A>',
    -00567                        $p_jrn,
    -00568                        $row['jr_grpt_id'],
    -00569                        $row['jr_pj_name'])."</TD>";
    +00459   $r.='<table style="width:100%;border:solid blue 2px ;border-style:outset;">';
    +00460   $l_sessid=$_REQUEST['PHPSESSID'];
    +00461   $r.="<tr class=\"even\">";
    +00462  $r.="<th> Internal </th>";
    +00463   $r.="<th> Date </th>";
    +00464   $r.="<th> Echéance </th>";
    +00465   $r.="<th> Description</th>";
    +00466   $r.="<th> Montant </th>";
    +00467   // if $p_paid is not equal to 0 then we have a paid column
    +00468   if ( $p_paid != 0 ) 
    +00469     {
    +00470       $r.="<th> Pay&eacute;</th>";
    +00471     }
    +00472   $r.="<th>Op. Concernée</th>";
    +00473   $r.="<th>Document</th>";
    +00474   $r.="</tr>";
    +00475 
    +00476   for ($i=0; $i < $Max;$i++) {
    +00477 
    +00478     //STAN the rows here must be stored in an array
    +00479     
    +00480     $row=pg_fetch_array($Res,$i);
    +00481     
    +00482     if ( $i % 2 == 0 ) $tr='<TR class="odd">'; 
    +00483                 else $tr='<TR class="even">';
    +00484     $r.=$tr;
    +00485     //internal code
    +00486         // button  modify
    +00487     $r.="<TD>";
    +00488     $r.=sprintf('<A class="detail" HREF="javascript:modifyOperation(\'%s\',\'%s\',\'%s\')" >%s</A>',
    +00489                 $row['jr_id'], $l_sessid, $p_jrn, $row['jr_internal']);
    +00490     $r.="</TD>";
    +00491     // date
    +00492     $r.="<TD>";
    +00493     $r.=$row['jr_date'];
    +00494     $r.="</TD>";
    +00495     // echeance
    +00496     $r.="<TD>";
    +00497     $r.=$row['jr_ech'];
    +00498     $r.="</TD>";
    +00499     
    +00500     // comment
    +00501     $r.="<TD>";
    +00502     $r.=$row['jr_comment'];
    +00503     $r.="</TD>";
    +00504     
    +00505     // Amount
    +00506     // If the ledger is financial :
    +00507     // the credit must be negative and written in red
    +00508     // Get the jrn type
    +00509     $jrn_prop=GetJrnProp($p_cn,$row['jrn_def_id'],1);  
    +00510     $positive=0;
    +00511 
    +00512     // Check ledger type
    +00513      if (  $jrn_prop['jrn_def_type'] == 'FIN' ) 
    +00514      {
    +00515        $positive = CountSql($p_cn,"select * from jrn inner join jrnx on jr_grpt_id=j_grpt ".
    +00516                            " where jr_id=".$row['jr_id']." and (j_poste like '55%' or j_poste like '57%' )".
    +00517                            " and j_debit='f'");
    +00518      }
    +00519     $r.="<TD align=\"right\">";
    +00520     //STAN $positive always == 0
    +00521      $r.=( $positive != 0 )?"<font color=\"red\">  - ".sprintf("%8.2f",$row['jr_montant'])."</font>":sprintf("%8.2f",$row['jr_montant']);
    +00522     $r.="</TD>";
    +00523 
    +00524 
    +00525     // Show the paid column if p_paid is not null
    +00526     if ( $p_paid !=0 )
    +00527       {
    +00528         $w=new widget("checkbox");
    +00529         $w->name="rd_paid".$row['jr_id'];
    +00530         $w->selected=($row['jr_rapt']=='paid')?true:false;
    +00531         // if p_paid == 2 then readonly
    +00532         $w->readonly=( $p_paid == 2)?true:false;
    +00533         $h=new widget("hidden");
    +00534         $h->name="set_jr_id".$row['jr_id'];
    +00535         $r.='<TD>'.$w->IOValue().$h->IOValue().'</TD>';
    +00536       }
    +00537     
    +00538     // Rapprochement
    +00539     $a=GetConcerned($p_cn,$row['jr_id']);
    +00540     $r.="<TD>";
    +00541     if ( $a != null ) {
    +00542       // $r.="operation concernée ";
    +00543       
    +00544       foreach ($a as $key => $element) 
    +00545       {      
    +00546               $r.= "<A class=\"detail\" HREF=\"javascript:viewDetail('".GetGrpt($p_cn,$element)."','$l_sessid')\" > ".GetInternal($p_cn,$element)."</A>";
    +00547       }//for
    +00548     }// if ( $a != null ) {
    +00549     $r.="</TD>";
    +00550 
    +00551     if ( $row['jr_valid'] == 'f'  ) {
    +00552       $r.="<TD> Opération annulée</TD>";
    +00553     }    else {
    +00554       // all operations can be removed either by setting to 0 the amount
    +00555       // or by writing the opposite operation if the period is closed
    +00556       $r.="<TD>";
    +00557       // cancel operation
    +00558       $r.=sprintf('<input TYPE="BUTTON" VALUE="%s" onClick="cancelOperation(\'%s\',\'%s\',\'%s\')">',
    +00559                   "Annuler",$row['jr_grpt_id'],$l_sessid,$p_jrn);
    +00560       $r.="</TD>";
    +00561     } // else
    +00562     //document
    +00563     $r.="<TD>".sprintf('<A class="detail" HREF="show_pj.php?jrn=%s&jr_grpt_id=%s">%s</A>',
    +00564                        $p_jrn,
    +00565                        $row['jr_grpt_id'],
    +00566                        $row['jr_pj_name'])."</TD>";
    +00567     
    +00568     // end row
    +00569     $r.="</tr>";
     00570     
    -00571     // end row
    -00572     $r.="</tr>";
    -00573     
    -00574   }
    -00575   $r.="</table>";
    -00576   
    -00577 return array ($count,$r);
    -00578 }
    -00579 
    -00580 
    -00581 
    -00582 /* function InsertStockGoods($p_cn,$j_id,$a_good[$i],$a_quant[$i],'c');
    -00583  **************************************************
    -00584  * Purpose : Insert data into stock_goods,
    -00585  *        
    -00586  * parm : 
    -00587  *      - $p_cn database connection
    -00588  *      - $p_j_id the j_id
    -00589  *      - $p_goods the goods
    -00590  *      - $p_quant  quantity
    -00591  *      - $p_type c for credit or d for debit
    -00592  * gen :
    -00593  *      - none
    -00594  * return:
    -00595  *       none
    -00596  * TODO ADD A DATE !!!
    -00597  */
    -00598 function InsertStockGoods($p_cn,$p_j_id,$p_good,$p_quant,$p_type)
    -00599 {
    -00600   echo_debug('user_common.php',__LINE__,"function InsertStockGoods($p_cn,$p_j_id,$p_good,$p_quant,$p_type)");
    -00601   // Retrieve the good account for stock
    -00602   $code_marchandise=GetFicheAttribut($p_cn,$p_good,ATTR_DEF_STOCK);
    -00603   $sql="select f_id from vw_poste_qcode where j_qcode='$p_good'";
    -00604   $Res=ExecSql($p_cn,$sql);
    -00605   $r=pg_fetch_array($Res,0);
    -00606   $f_id=$r['f_id'];
    -00607   $Res=ExecSql($p_cn,"insert into stock_goods (
    -00608                             j_id,
    -00609                             f_id,
    -00610                             sg_code, 
    -00611                             sg_quantity,
    -00612                              sg_type ) values (
    -00613                             $p_j_id,
    -00614                             $f_id,
    -00615                             '$code_marchandise',
    -00616                             $p_quant, '$p_type') 
    -00617                      ");
    -00618  return $Res;
    -00619 }
    -00620 /* function withStock($p_cn,$p_f_id)
    -00621  **************************************************
    -00622  * Purpose : return true if we manage stock for it
    -00623  *          value is stored in attr_value
    -00624  *        
    -00625  * parm : 
    -00626  *      - $p_cn database connection
    -00627  *      - $p_f_id fiche.f_id
    -00628  * gen :
    -00629  *      - none
    -00630  * return:
    -00631  *       none
    -00632  */
    -00633 function withStock($p_cn,$p_f_id)
    -00634 {
    -00635   $a=getFicheAttribut($p_cn,$p_f_id, ATTR_DEF_STOCK);
    -00636   if ( $a == "1" ) return true;
    -00637   return false;
    -00638 
    -00639 }
    -00640 /* function  VerifyOperationDate ($p_cn,$p_user,$p_date) 
    -00641  **************************************************
    -00642  * Purpose : Verify if 
    -00643  *    the date is a valid date
    -00644  *    the date is in the default period
    -00645  *    the period is not closed
    -00646  *        
    -00647  * parm : 
    -00648  *      - db connection
    -00649  *      - user
    -00650  *      - date
    -00651  * gen :
    -00652  *      - none
    -00653  * return:
    -00654  *     - null if error or date if ok
    -00655  */
    -00656 function VerifyOperationDate($p_cn,$p_periode,$p_date) {
    -00657 
    -00658   // Verify the date
    -00659   if ( isDate($p_date) == null ) { 
    -00660           echo_error("Invalid date $p_date");
    -00661           echo_debug('user_common.php',__LINE__,"Invalid date $p_date");
    -00662           echo "<SCRIPT> alert('INVALID DATE $p_date !!!!');</SCRIPT>";
    -00663           return null;
    -00664                 }
    -00665 // userPref contient la periode par default
    -00666     list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    -00667 
    -00668     // Date dans la periode active
    -00669     echo_debug ("date start periode $l_date_start date fin periode $l_date_end date demandée $p_date");
    -00670     if ( cmpDate($p_date,$l_date_start)<0 || 
    -00671          cmpDate($p_date,$l_date_end)>0 )
    -00672       {
    -00673                   $msg="Not in the active periode please change your preference";
    -00674                         echo_error($msg); echo_error($msg);     
    -00675                         echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00676                         return null;
    -00677       }
    -00678     // Periode fermée 
    -00679     if ( PeriodeClosed ($p_cn,$p_periode)=='t' )
    -00680       {
    -00681                 $msg="This periode is closed please change your preference";
    -00682                 echo_error($msg); echo_error($msg);     
    -00683                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00684                 return null;
    -00685       }
    -00686     return $p_date;
    -00687 }
    -00688 
    -00689 /* function InsertRapt($p_cn,$jr_id,$jr_id2)
    -00690  **************************************************
    -00691  * Purpose :  Insert into jrn_rapt the concerned operations
    -00692  *        
    -00693  * parm : 
    -00694  *      - p_cn database connection
    -00695  *      - jr_id (jrn.jr_id) => jrn_rapt.jr_id
    -00696  *      - jr_id2 (jrn.jr_id) => jrn_rapt.jra_concerned
    -00697  * gen :
    -00698  *      - none
    -00699  * return:
    -00700  *      - none
    -00701  */
    -00702 function InsertRapt($p_cn,$jr_id,$jr_id2) {
    -00703   if ( isNumber($jr_id)  == 0 or 
    -00704        isNumber($jr_id2) == 0 )
    -00705     {
    -00706       echo_error(" InsertRapt : invalid jr_id $jr_id, jr_id2 $jr_id2");
    -00707       echo_debug('user_common.php',__LINE__," InsertRapt : invalid jr_id $jr_id, jr_id2 $jr_id2");
    -00708       return false;
    -00709     }
    -00710   // verify if exists
    -00711   if ( CountSql($p_cn,"select jra_id from jrn_rapt where jra_concerned=$jr_id and jr_id=$jr_id2
    -00712                    union
    -00713                  select jra_id from jrn_rapt where jra_concerned=$jr_id2 and jr_id=$jr_id ") ==0) 
    -00714     {
    -00715       // Ok we can insert 
    -00716       $Res=ExecSql($p_cn,"insert into jrn_rapt(jr_id,jra_concerned) values ($jr_id,$jr_id2)");
    -00717     }
    -00718   return true;
    -00719 }
    -00720 /* function DeleteRapt($p_cn,$jr_id,$jr_id2)
    -00721  **************************************************
    -00722  * Purpose :  Insert into jrn_rapt the concerned operations
    -00723  *        
    -00724  * parm : 
    -00725  *      - p_cn database connection
    -00726  *      - jr_id (jrn.jr_id) => jrn_rapt.jr_id
    -00727  *      - jr_id2 (jrn.jr_id) => jrn_rapt.jra_concerned
    -00728  * gen :
    -00729  *      - none
    -00730  * return:
    -00731  *      - none
    -00732  */
    -00733 function DeleteRapt($p_cn,$jr_id,$jr_id2) {
    -00734   echo_debug('user_common.php',__LINE__,"DeleteRapt($p_cn,$jr_id,$jr_id2) ");
    -00735   if ( isNumber($jr_id)  == 0 or 
    -00736        isNumber($jr_id2) == 0 )
    -00737     {
    -00738       echo_error(" InsertRapt : invalid jr_id jr_id = $jr_id jr_id2 = $jr_id2");
    -00739       return;
    -00740     }
    -00741   // verify if exists
    -00742   if ( CountSql($p_cn,"select jra_id from jrn_rapt where jra_concerned=$jr_id and jr_id=$jr_id2
    -00743                    union
    -00744                  select jra_id from jrn_rapt where jra_concerned=$jr_id2 and jr_id=$jr_id ") !=0) 
    -00745     {
    -00746       // Ok we can insert 
    -00747       $Res=ExecSql($p_cn,"delete from jrn_rapt where (jra_concerned=$jr_id2 and jr_id=$jr_id) or 
    -00748                                (jra_concerned=$jr_id and jr_id=$jr_id2) ");
    -00749     }
    -00750 }
    -00751 
    -00752 /* function GetConcerned (p_cn ,jr_id)
    -00753  **************************************************
    -00754  * Purpose :  Return an array of the concerned operation
    -00755  *        
    -00756  * parm : 
    -00757  *      - database connection
    -00758  *      - jrn.jr_id
    -00759  * gen : 
    -00760  *      - none
    -00761  * return:
    -00762  *      - array if something is found
    -00763  */
    -00764 function GetConcerned ($p_cn, $jr_id) {
    -00765 $sql=" select jr_id as cn from jrn_rapt where jra_concerned=$jr_id
    -00766       union
    -00767        select jra_concerned as cn from jrn_rapt where jr_id=$jr_id";
    -00768  $Res=ExecSql($p_cn,$sql);
    +00571   }
    +00572   $r.="</table>";
    +00573   
    +00574 return array ($count,$r);
    +00575 }
    +00576 
    +00577 
    +00578 
    +00595 function InsertStockGoods($p_cn,$p_j_id,$p_good,$p_quant,$p_type)
    +00596 {
    +00597   echo_debug('user_common.php',__LINE__,"function InsertStockGoods($p_cn,$p_j_id,$p_good,$p_quant,$p_type)");
    +00598   // Retrieve the good account for stock
    +00599   $code_marchandise=GetFicheAttribut($p_cn,$p_good,ATTR_DEF_STOCK);
    +00600   $sql="select f_id from vw_poste_qcode where j_qcode='$p_good'";
    +00601   $Res=ExecSql($p_cn,$sql);
    +00602   $r=pg_fetch_array($Res,0);
    +00603   $f_id=$r['f_id'];
    +00604   $Res=ExecSql($p_cn,"insert into stock_goods (
    +00605                             j_id,
    +00606                             f_id,
    +00607                             sg_code, 
    +00608                             sg_quantity,
    +00609                              sg_type ) values (
    +00610                             $p_j_id,
    +00611                             $f_id,
    +00612                             '$code_marchandise',
    +00613                             $p_quant, '$p_type') 
    +00614                      ");
    +00615  return $Res;
    +00616 }
    +00630 function withStock($p_cn,$p_f_id)
    +00631 {
    +00632   $a=getFicheAttribut($p_cn,$p_f_id, ATTR_DEF_STOCK);
    +00633   if ( $a == "1" ) return true;
    +00634   return false;
    +00635 
    +00636 }
    +00653 function VerifyOperationDate($p_cn,$p_periode,$p_date) {
    +00654 
    +00655   // Verify the date
    +00656   if ( isDate($p_date) == null ) { 
    +00657           echo_error("Invalid date $p_date");
    +00658           echo_debug('user_common.php',__LINE__,"Invalid date $p_date");
    +00659           echo "<SCRIPT> alert('INVALID DATE $p_date !!!!');</SCRIPT>";
    +00660           return null;
    +00661                 }
    +00662 // userPref contient la periode par default
    +00663     list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    +00664 
    +00665     // Date dans la periode active
    +00666     echo_debug ("date start periode $l_date_start date fin periode $l_date_end date demandée $p_date");
    +00667     if ( cmpDate($p_date,$l_date_start)<0 || 
    +00668          cmpDate($p_date,$l_date_end)>0 )
    +00669       {
    +00670                   $msg="Not in the active periode please change your preference";
    +00671                         echo_error($msg); echo_error($msg);     
    +00672                         echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00673                         return null;
    +00674       }
    +00675     // Periode fermée 
    +00676     if ( PeriodeClosed ($p_cn,$p_periode)=='t' )
    +00677       {
    +00678                 $msg="This periode is closed please change your preference";
    +00679                 echo_error($msg); echo_error($msg);     
    +00680                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00681                 return null;
    +00682       }
    +00683     return $p_date;
    +00684 }
    +00685 
    +00699 function InsertRapt($p_cn,$jr_id,$jr_id2) {
    +00700   if ( isNumber($jr_id)  == 0 or 
    +00701        isNumber($jr_id2) == 0 )
    +00702     {
    +00703       echo_error(" InsertRapt : invalid jr_id $jr_id, jr_id2 $jr_id2");
    +00704       echo_debug('user_common.php',__LINE__," InsertRapt : invalid jr_id $jr_id, jr_id2 $jr_id2");
    +00705       return false;
    +00706     }
    +00707   // verify if exists
    +00708   if ( CountSql($p_cn,"select jra_id from jrn_rapt where jra_concerned=$jr_id and jr_id=$jr_id2
    +00709                    union
    +00710                  select jra_id from jrn_rapt where jra_concerned=$jr_id2 and jr_id=$jr_id ") ==0) 
    +00711     {
    +00712       // Ok we can insert 
    +00713       $Res=ExecSql($p_cn,"insert into jrn_rapt(jr_id,jra_concerned) values ($jr_id,$jr_id2)");
    +00714     }
    +00715   return true;
    +00716 }
    +00730 function DeleteRapt($p_cn,$jr_id,$jr_id2) {
    +00731   echo_debug('user_common.php',__LINE__,"DeleteRapt($p_cn,$jr_id,$jr_id2) ");
    +00732   if ( isNumber($jr_id)  == 0 or 
    +00733        isNumber($jr_id2) == 0 )
    +00734     {
    +00735       echo_error(" InsertRapt : invalid jr_id jr_id = $jr_id jr_id2 = $jr_id2");
    +00736       return;
    +00737     }
    +00738   // verify if exists
    +00739   if ( CountSql($p_cn,"select jra_id from jrn_rapt where jra_concerned=$jr_id and jr_id=$jr_id2
    +00740                    union
    +00741                  select jra_id from jrn_rapt where jra_concerned=$jr_id2 and jr_id=$jr_id ") !=0) 
    +00742     {
    +00743       // Ok we can insert 
    +00744       $Res=ExecSql($p_cn,"delete from jrn_rapt where (jra_concerned=$jr_id2 and jr_id=$jr_id) or 
    +00745                                (jra_concerned=$jr_id and jr_id=$jr_id2) ");
    +00746     }
    +00747 }
    +00748 
    +00761 function GetConcerned ($p_cn, $jr_id) {
    +00762 $sql=" select jr_id as cn from jrn_rapt where jra_concerned=$jr_id
    +00763       union
    +00764        select jra_concerned as cn from jrn_rapt where jr_id=$jr_id";
    +00765  $Res=ExecSql($p_cn,$sql);
    +00766 
    +00767  // If nothing is found return null
    +00768  $n=pg_NumRows($Res);
     00769 
    -00770  // If nothing is found return null
    -00771  $n=pg_NumRows($Res);
    -00772 
    -00773  if ($n ==0 ) return null;
    -00774 
    -00775  // put everything in an array
    -00776  for ($i=0;$i<$n;$i++) {
    -00777    $l=pg_fetch_array($Res,$i);
    -00778    $r[$i]=$l['cn'];
    -00779  }
    -00780  return $r;
    -00781 }
    -00782 /* function GetGrpt($p_cn,$p_jr_id)
    -00783  **************************************************
    -00784  * Purpose :  Return the jr_grpt_id from jrn where
    -00785  *            jr_id = $p_jr_id
    -00786  *        
    -00787  * parm : 
    -00788  *      - $p_jr_id jrn.jr_id
    -00789  *      - $p_cn database connection
    -00790  * gen :
    -00791  *      - none
    -00792  * return:
    -00793  *      - return the jrn.jr_grpt_id or null 
    -00794  */
    -00795 function  GetGrpt($p_cn,$p_jr_id)
    -00796 {
    -00797   $Res=ExecSql($p_cn,"select jr_grpt_id from jrn where jr_id=".$p_jr_id);
    -00798   if ( pg_NumRows($Res) == 0 ) {
    -00799     return null;
    -00800   }
    -00801   $r=pg_fetch_array($Res,0);
    -00802   return $r['jr_grpt_id'];
    -00803 }
    -00804 /* function UpdateComment ($p_cn,$p_jr_id,$p_comment)
    -00805  **************************************************
    -00806  * Purpose : Update comment in jrn 
    -00807  *         
    -00808  * parm : 
    -00809  *      - database conn.
    -00810  *              -  jrn.jr_id
    -00811  *              - comment
    -00812  * gen :
    -00813  *      - none
    -00814  * return:
    -00815  *              - none
    -00816  */
    -00817 function UpdateComment ($p_cn,$p_jr_id,$p_comment) {
    -00818   $p_comment=FormatString($p_comment);
    -00819   $Res=ExecSql($p_cn,"update jrn set jr_comment='".$p_comment."'
    -00820                                where jr_id = $p_jr_id"); 
    -00821 
    -00822 }
    -00823 
    -00824 /* function isValid ($p_cn, $p_grpt_id
    -00825  **************************************************
    -00826  * Purpose :  test if a jrn op is valid
    -00827  *        
    -00828  * parm : 
    -00829  *      - db connection 
    -00830  *      - p_grpt_id
    -00831  * gen :
    -00832  *      - none
    -00833  * return:
    -00834  *        1 is valid
    -00835  *        0 is not valid
    -00836  */
    -00837 function isValid ($p_cn,$p_grpt_id) {
    -00838   $Res=ExecSql($p_cn,"select jr_valid from jrn where jr_grpt_id=$p_grpt_id");
    -00839 
    -00840   if ( ( $M = pg_NumRows($Res)) == 0 ) return 0;
    -00841 
    -00842   $a=pg_fetch_array($Res,0);
    +00770  if ($n ==0 ) return null;
    +00771 
    +00772  // put everything in an array
    +00773  for ($i=0;$i<$n;$i++) {
    +00774    $l=pg_fetch_array($Res,$i);
    +00775    $r[$i]=$l['cn'];
    +00776  }
    +00777  return $r;
    +00778 }
    +00792 function  GetGrpt($p_cn,$p_jr_id)
    +00793 {
    +00794   $Res=ExecSql($p_cn,"select jr_grpt_id from jrn where jr_id=".$p_jr_id);
    +00795   if ( pg_NumRows($Res) == 0 ) {
    +00796     return null;
    +00797   }
    +00798   $r=pg_fetch_array($Res,0);
    +00799   return $r['jr_grpt_id'];
    +00800 }
    +00814 function UpdateComment ($p_cn,$p_jr_id,$p_comment) {
    +00815   $p_comment=FormatString($p_comment);
    +00816   $Res=ExecSql($p_cn,"update jrn set jr_comment='".$p_comment."'
    +00817                                where jr_id = $p_jr_id"); 
    +00818 
    +00819 }
    +00820 
    +00834 function isValid ($p_cn,$p_grpt_id) {
    +00835   $Res=ExecSql($p_cn,"select jr_valid from jrn where jr_grpt_id=$p_grpt_id");
    +00836 
    +00837   if ( ( $M = pg_NumRows($Res)) == 0 ) return 0;
    +00838 
    +00839   $a=pg_fetch_array($Res,0);
    +00840 
    +00841   if ( $a['jr_valid'] == 't') return 1;
    +00842   if ( $a['jr_valid'] == 'f') return 0;
     00843 
    -00844   if ( $a['jr_valid'] == 't') return 1;
    -00845   if ( $a['jr_valid'] == 'f') return 0;
    +00844   echo_error ("Invalid result = ".$a['result']);
    +00845 
     00846 
    -00847   echo_error ("Invalid result = ".$a['result']);
    +00847 }
     00848 
    -00849 
    -00850 }
    -00851 
    -00852 /* function  jrn_navigation_bar
    -00853  **************************************************
    -00854  * Purpose : 
    -00855  *     Create a navigation_bar (pagesize)
    -00856  *        
    -00857  * parm : 
    -00858  *      - p_offset first record number
    -00859  *      - p_line total of returned row
    -00860  *      - p_size current g_pagesize
    -00861  *      - p_page number of the page
    -00862  * gen :
    -00863  *      -none
    -00864  * return:
    -00865  *     string
    -00866  */
    -00867 function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1)
    -00868 {
    -00869   // if the pagesize is unlimited return ""
    -00870   // in that case there is no nav. bar
    -00871   if ( $_SESSION['g_pagesize'] == -1  ) return "";
    -00872   if ( $p_size==0) {
    -00873     $p_size= $_SESSION['g_pagesize'];
    -00874   }
    -00875   // if there is no row return an empty string
    -00876   if ( $p_line == 0 ) return "";
    -00877 
    -00878   // Compute the url
    -00879   $url="";
    -00880   $and="";
    -00881   $get=$_GET;
    -00882   if ( isset ($get) ) {
    -00883     foreach ($get as $name=>$value ) {
    -00884       // we clean the parameter offset, step, page and size
    -00885       if (  ! in_array($name,array('offset','step','page','size'))) {
    -00886         $url.=$and.$name."=".$value;
    -00887         $and="&";
    -00888       }// if
    -00889     }//foreach
    -00890   }// if
    -00891   // compute max of page
    -00892   $nb_page=($p_line-($p_line%$p_size))/$p_size;
    +00861 function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1)
    +00862 {
    +00863   // if the pagesize is unlimited return ""
    +00864   // in that case there is no nav. bar
    +00865   if ( $_SESSION['g_pagesize'] == -1  ) return "";
    +00866   if ( $p_size==0) {
    +00867     $p_size= $_SESSION['g_pagesize'];
    +00868   }
    +00869   // if there is no row return an empty string
    +00870   if ( $p_line == 0 ) return "";
    +00871 
    +00872   // Compute the url
    +00873   $url="";
    +00874   $and="";
    +00875   $get=$_GET;
    +00876   if ( isset ($get) ) {
    +00877     foreach ($get as $name=>$value ) {
    +00878       // we clean the parameter offset, step, page and size
    +00879       if (  ! in_array($name,array('offset','step','page','size'))) {
    +00880         $url.=$and.$name."=".$value;
    +00881         $and="&";
    +00882       }// if
    +00883     }//foreach
    +00884   }// if
    +00885   // compute max of page
    +00886   $nb_page=($p_line-($p_line%$p_size))/$p_size;
    +00887 
    +00888   // if something remains
    +00889   if ( $p_line % $p_size != 0 ) $nb_page+=1;
    +00890 
    +00891   // if max page == 1 then return a empty string
    +00892   if ( $nb_page == 1) return "";
     00893 
    -00894   // if something remains
    -00895   if ( $p_line % $p_size != 0 ) $nb_page+=1;
    -00896 
    -00897   // if max page == 1 then return a empty string
    -00898   if ( $nb_page == 1) return "";
    -00899 
    -00900   $r="";
    -00901   // previous
    -00902   if ($p_page !=1) {
    -00903     $e=$p_page-1;
    -00904     $step=$_SESSION['g_pagesize'];
    -00905     $offset=($e-1)*$step;
    -00906 
    -00907     $r='<A class="one" href="'.$_SERVER['PHP_SELF']."?".$url."&offset=$offset&step=$step&page=$e&size=$step".'">';
    -00908     $r.="Pr&eacute;c&eacute;dent";
    -00909     $r.="</A>&nbsp;&nbsp;";
    -00910   }
    -00911 
    -00912   // Create the bar
    -00913   for ($e=1;$e<=$nb_page;$e++) {
    -00914     // do not included current page
    -00915     if ( $e != $p_page ) {
    -00916     $step=$_SESSION['g_pagesize'];
    -00917     $offset=($e-1)*$step;
    -00918     $go=sprintf($_SERVER['PHP_SELF']."?".$url."&offset=$offset&step=$step&page=$e&size=$step");
    -00919     $r.=sprintf('<A HREF="%s" CLASS="one">%d</A>&nbsp;',$go,$e);
    -00920     } else {
    -00921       $r.="<b> $e </b>";
    -00922     } //else
    -00923     // add a break if e > 80
    -00924     if ( $e % 57 == 0 ) {
    -00925       $r.="<br>";
    -00926     }
    -00927   } //for
    -00928   // next
    -00929   if ($p_page !=$nb_page) {
    -00930     $e=$p_page+1;
    -00931     $step=$_SESSION['g_pagesize'];
    -00932     $offset=($e-1)*$step;
    +00894   $r="";
    +00895   // previous
    +00896   if ($p_page !=1) {
    +00897     $e=$p_page-1;
    +00898     $step=$_SESSION['g_pagesize'];
    +00899     $offset=($e-1)*$step;
    +00900 
    +00901     $r='<A class="one" href="'.$_SERVER['PHP_SELF']."?".$url."&offset=$offset&step=$step&page=$e&size=$step".'">';
    +00902     $r.="Pr&eacute;c&eacute;dent";
    +00903     $r.="</A>&nbsp;&nbsp;";
    +00904   }
    +00905 
    +00906   // Create the bar
    +00907   for ($e=1;$e<=$nb_page;$e++) {
    +00908     // do not included current page
    +00909     if ( $e != $p_page ) {
    +00910     $step=$_SESSION['g_pagesize'];
    +00911     $offset=($e-1)*$step;
    +00912     $go=sprintf($_SERVER['PHP_SELF']."?".$url."&offset=$offset&step=$step&page=$e&size=$step");
    +00913     $r.=sprintf('<A HREF="%s" CLASS="one">%d</A>&nbsp;',$go,$e);
    +00914     } else {
    +00915       $r.="<b> $e </b>";
    +00916     } //else
    +00917     // add a break if e > 80
    +00918     if ( $e % 57 == 0 ) {
    +00919       $r.="<br>";
    +00920     }
    +00921   } //for
    +00922   // next
    +00923   if ($p_page !=$nb_page) {
    +00924     $e=$p_page+1;
    +00925     $step=$_SESSION['g_pagesize'];
    +00926     $offset=($e-1)*$step;
    +00927 
    +00928     $r.='&nbsp;<A class="one" href="'.$_SERVER['PHP_SELF']."?".$url."&offset=$offset&step=$step&page=$e&size=$step".'">';
    +00929     $r.="Suivant";
    +00930     $r.="</A>";
    +00931   }
    +00932 
     00933 
    -00934     $r.='&nbsp;<A class="one" href="'.$_SERVER['PHP_SELF']."?".$url."&offset=$offset&step=$step&page=$e&size=$step".'">';
    -00935     $r.="Suivant";
    -00936     $r.="</A>";
    -00937   }
    -00938 
    -00939 
    -00940   return $r;
    -00941   
    -00942 }
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00934 return $r; +00935 +00936 } +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__common_8php.html b/doc/developper/html/user__common_8php.html index 629f5614b..bacc3e2a2 100644 --- a/doc/developper/html/user__common_8php.html +++ b/doc/developper/html/user__common_8php.html @@ -4,50 +4,74 @@ - + -

    user_common.php File Reference

    +

    user_common.php File Reference

    Common functions. More... +

    +

    Go to the source code of this file. + + + + + + + + + + + + + + + + +

    Functions

     GetTvaRate ($p_cn, $p_tva_id)
     Return the rate of the p_tva_id.
     ComputeTotalVat ($p_cn, $a_fiche, $a_quant, $a_price, $ap_vat, $all=false)
     Compute the vat, the fiche.f_id are in a_fiche the quantity in a_quant.
     ComputeVat ($p_cn, $p_fiche, $p_quant, $p_price, $p_vat)
     Compute the vat for only one elt, the fiche.f_id are in p_fiche the quantity in p_quant.
     GetTvaPoste ($p_cn, $p_tva_id, $p_cred)
     Get the account of tva_rate.tva_poste return the credit or the debit account.
     InsertJrnx ($p_cn, $p_type, $p_user, $p_jrn, $p_poste, $p_date, $p_amount, $p_grpt, $p_periode, $p_qcode="")
     Insert into the table Jrn.
     InsertJrn ($p_cn, $p_date, $p_echeance, $p_jrn, $p_comment, $p_amount, $p_grpt, $p_periode)
     Insert into the table Jrnx.
     ListJrn ($p_cn, $p_jrn, $p_where="", $p_array=null, $p_value=0, $p_paid=0)
     show all the lines of the asked jrn
     InsertStockGoods ($p_cn, $p_j_id, $p_good, $p_quant, $p_type)
     Insert data into stock_goods,.
     withStock ($p_cn, $p_f_id)
     return true if we manage stock for it value is stored in attr_value
     VerifyOperationDate ($p_cn, $p_periode, $p_date)
     Verify if the date is a valid date the date is in the default period the period is not closed.
     InsertRapt ($p_cn, $jr_id, $jr_id2)
     Insert into jrn_rapt the concerned operations.
     DeleteRapt ($p_cn, $jr_id, $jr_id2)
     Insert into jrn_rapt the concerned operations.
     GetConcerned ($p_cn, $jr_id)
     Return an array of the concerned operation.
     GetGrpt ($p_cn, $p_jr_id)
     Return the jr_grpt_id from jrn where jr_id = $p_jr_id.
     UpdateComment ($p_cn, $p_jr_id, $p_comment)
     Update comment in jrn.
     isValid ($p_cn, $p_grpt_id)
     test if a jrn op is valid
     jrn_navigation_bar ($p_offset, $p_line, $p_size=0, $p_page=1)
     Create a navigation_bar (pagesize).
    -


    Function Documentation

    +

    Detailed Description

    +Common functions. +

    + +

    +Definition in file user_common.php.


    Function Documentation

    @@ -106,13 +130,26 @@ +Referenced by RecordInvoice(), and RecordSell().

    +Compute the vat, the fiche.f_id are in a_fiche the quantity in a_quant. +

    +

    Parameters:
    + + + + + + + +
    $p_cn database connection
    $a_fiche fiche id array
    $a_quantity array
    $a_price array
    $ap_vat Array of tva id
    $all = false if we reduce VAT
    +
    +
    Returns:
    : array a[tva_id] = amount vat

    -Definition at line 69 of file user_common.php. +Definition at line 68 of file user_common.php.

    -References $a, $a_vat, $flag, $idx, $r, $tva_id, echo_debug(), GetTvaRate(), and isNumber(). +References $a, $a_vat, $flag, $idx, $r, $tva_id, echo_debug(), GetTvaRate(), and isNumber().

    -Referenced by RecordInvoice(), and RecordSell().

    @@ -167,13 +204,27 @@ Referenced by Recor

    +Compute the vat for only one elt, the fiche.f_id are in p_fiche the quantity in p_quant. +

    +

    Parameters:
    + + + + + + +
    $p_cn database connection
    $p_fiche fiche id int
    $p_quantity int
    $p_price float
    $p_tva_id 
      +
    +
    +
    +
    Returns:
    the amount of vat

    -Definition at line 173 of file user_common.php. +Definition at line 171 of file user_common.php.

    -References $a, $a_vat, $tva_id, echo_debug(), GetTvaRate(), and isNumber(). +References $a, $a_vat, $tva_id, echo_debug(), GetTvaRate(), and isNumber().

    -Referenced by RecordInvoice(), and RecordSell(). +Referenced by RecordInvoice(), and RecordSell().

    @@ -216,11 +267,21 @@ Referenced by Recor

    +Insert into jrn_rapt the concerned operations. +

    +DeleteRapt($p_cn,$jr_id,$jr_id2)

    +parm :

    +

    +jr_id (jrn.jr_id) => jrn_rapt.jr_id

      +
    • jr_id2 (jrn.jr_id) => jrn_rapt.jra_concerned gen :
        +
      • none return:
      +
    • none

    -Definition at line 733 of file user_common.php. +Definition at line 730 of file user_common.php.

    -References $Res, CountSql(), echo_debug(), echo_error(), ExecSql(), and isNumber(). +References $Res, CountSql(), echo_debug(), echo_error(), ExecSql(), and isNumber().

    @@ -257,13 +318,22 @@ References $Res, <

    - +Return an array of the concerned operation.

    -Definition at line 764 of file user_common.php. +GetConcerned (p_cn ,jr_id)

    +parm :

      +
    • database connection

    -References $i, $l, $n, $r, $Res, $sql, and ExecSql(). +jrn.jr_id gen :

      +
    • none return:

    -Referenced by ListJrn(), and UpdateJrn(). +array if something is found +

    +Definition at line 761 of file user_common.php. +

    +References $i, $l, $n, $r, $Res, $sql, and ExecSql(). +

    +Referenced by ListJrn(), and UpdateJrn().

    @@ -300,13 +370,22 @@ Referenced by ListJrn(

    - +Return the jr_grpt_id from jrn where jr_id = $p_jr_id.

    -Definition at line 795 of file user_common.php. +GetGrpt($p_cn,$p_jr_id)

    +parm :

      +
    • $p_jr_id jrn.jr_id

    -References $r, $Res, and ExecSql(). +$p_cn database connection gen :

      +
    • none return:

    -Referenced by UpdateJrn(). +return the jrn.jr_grpt_id or null +

    +Definition at line 792 of file user_common.php. +

    +References $r, $Res, and ExecSql(). +

    +Referenced by UpdateJrn().

    @@ -349,13 +428,23 @@ Referenced by UpdateJrn().

    +Get the account of tva_rate.tva_poste return the credit or the debit account. +

    +

    Parameters:
    + + + + +
    $p_cn connection
    $p_tva_id tva_rate.tva_id
    $p_cred type ( d or credit)
    +
    +
    Returns:
    return the credit or the debit account null if error

    -Definition at line 213 of file user_common.php. +Definition at line 210 of file user_common.php.

    -References $a, $Res, echo_error(), and ExecSql(). +References $a, $Res, echo_error(), and ExecSql().

    -Referenced by RecordInvoice(), and RecordSell(). +Referenced by RecordInvoice(), and RecordSell().

    @@ -392,13 +481,22 @@ Referenced by Recor

    +Return the rate of the p_tva_id. +

    +

    Parameters:
    + + + +
    $p_cn database connection
    $p_tva_id tva.tva_id
    +
    +
    Returns:
    an array containing the rate and the label the tva rate or null if a problem occured

    -Definition at line 38 of file user_common.php. +Definition at line 39 of file user_common.php.

    -References $r, $Res, and ExecSql(). +References $r, $Res, and ExecSql().

    -Referenced by ComputeTotalVat(), ComputeVat(), FormAchView(), and FormVenteView(). +Referenced by ComputeTotalVat(), ComputeVat(), FormAchView(), FormVenteView(), and Document::Replace().

    @@ -471,13 +569,24 @@ Referenced by ComputeT

    - +Insert into the table Jrnx.

    -Definition at line 290 of file user_common.php. +InsertJrn($p_cn,$p_date,$p_jrn,$p_comment,$p_amount,$p_grpt,$p_periode

    +parm :

      +
    • $p_cn database connection

    -References $Res, $sql, echo_debug(), ExecSql(), FormatString(), GetSequence(), and p_comment. +$p_date date

      +
    • $p_jrn the current 'journal' (folder)
    • $p_poste the account
    • $p_amount amount to insert
    • $p_periode the concerned periode
    • $p_comment comment gen :
        +
      • none return:
      +

    -Referenced by RecordFin(), RecordInvoice(), RecordSell(), and TransferCSV(). +nothing +

    +Definition at line 287 of file user_common.php. +

    +References $Res, $sql, echo_debug(), ExecSql(), FormatString(), GetSequence(), and p_comment. +

    +Referenced by RecordFin(), RecordInvoice(), RecordSell(), and TransferCSV().

    @@ -562,13 +671,24 @@ Referenced by Recor

    - +Insert into the table Jrn.

    -Definition at line 246 of file user_common.php. +InsertJrnx($p_cn,$p_type,$p_user,$p_jrn,$p_poste,$p_date,$p_amount,$p_grpt,$p_periode

    +parm :

      +
    • $p_cn database connection

    -References $Res, $sql, echo_debug(), ExecSql(), and GetSequence(). +$p_type debit or credit

      +
    • $p_user the current user
    • $p_jrn the current 'journal' (folder)
    • $p_poste the account
    • $p_date
    • $p_amount amount to insert
    • $p_periode the concerned periode gen :
        +
      • none return:
      +

    -Referenced by RecordFin(), RecordInvoice(), RecordODS(), RecordSell(), and TransferCSV(). +nothing +

    +Definition at line 243 of file user_common.php. +

    +References $Res, $sql, echo_debug(), ExecSql(), and GetSequence(). +

    +Referenced by RecordFin(), RecordInvoice(), RecordODS(), RecordSell(), and TransferCSV().

    @@ -611,13 +731,23 @@ Referenced by Recor

    +Insert into jrn_rapt the concerned operations. +

    +InsertRapt($p_cn,$jr_id,$jr_id2)

    +parm :

    +

    +jr_id (jrn.jr_id) => jrn_rapt.jr_id

      +
    • jr_id2 (jrn.jr_id) => jrn_rapt.jra_concerned gen :
        +
      • none return:
      +
    • none

    -Definition at line 702 of file user_common.php. +Definition at line 699 of file user_common.php.

    -References $Res, CountSql(), echo_debug(), echo_error(), ExecSql(), and isNumber(). +References $Res, CountSql(), echo_debug(), echo_error(), ExecSql(), and isNumber().

    -Referenced by RecordFin(). +Referenced by RecordFin().

    @@ -672,13 +802,23 @@ Referenced by Recor

    +Insert data into stock_goods,. +

    +InsertStockGoods($p_cn,$j_id,$a_good[$i],$a_quant[$i],'c');

    +parm :

    +

    +$p_j_id the j_id

      +
    • $p_goods the goods
    • $p_quant quantity
    • $p_type c for credit or d for debit gen :
        +
      • none return: none TODO ADD A DATE !!!
      +

    -Definition at line 598 of file user_common.php. +Definition at line 595 of file user_common.php.

    -References $r, $Res, $sql, echo_debug(), and ExecSql(). +References $r, $Res, $sql, echo_debug(), ExecSql(), and f_id.

    -Referenced by RecordInvoice(), and RecordSell(). +Referenced by RecordInvoice(), and RecordSell().

    @@ -715,13 +855,21 @@ Referenced by Recor

    +test if a jrn op is valid +

    +isValid ($p_cn, $p_grpt_id

    +parm :

    +

    +p_grpt_id gen :

      +
    • none return: 1 is valid 0 is not valid

    -Definition at line 837 of file user_common.php. +Definition at line 834 of file user_common.php.

    -References $a, $Res, echo_error(), and ExecSql(). +References $a, $Res, echo_error(), and ExecSql().

    -Referenced by cl_user::cl_user(). +Referenced by cl_user::cl_user().

    @@ -770,13 +918,24 @@ Referenced by cl_user::

    +Create a navigation_bar (pagesize). +

    +jrn_navigation_bar

    +

    Parameters:
    + + +
    p_offset first record number
      +
    • p_line total of returned row
    • p_size current g_pagesize
    • p_page number of the page
    +
    +
    +
    Returns:
    string

    -Definition at line 867 of file user_common.php. +Definition at line 861 of file user_common.php.

    -References $_SESSION, $e, $offset, $r, $step, $url, name, size, and value. +References $_SESSION, $e, $offset, $r, $step, $url, name, size, and value.

    -Referenced by Customer::Summary(), and ViewFiche(). +Referenced by action::myList(), Customer::Summary(), contact::Summary(), and ViewFiche().

    @@ -837,11 +996,19 @@ Referenced by Custo

    +show all the lines of the asked jrn +

    +ListJrn($p_cn,$p_jrn,$p_wherel)

    +parm :

    +

    +$p_jrn jrn_id jrn.jrn_def_id

      +
    • $p_where the sql query where clause
    • $p_array param. for a search
    • $p_value offset
    • $p_paid value : 0 nothing is shown, 1 check box; 2 check_box disable return: array (entryCount,generatedHTML);

    -Definition at line 324 of file user_common.php. +Definition at line 321 of file user_common.php.

    -References $_SESSION, $a, $count, $h, $limit, $Max, $offset, $p_jrn, $r, $Res, $row, $sql, $tr, $User, $w, CountSql(), DbConnect(), ExecSql(), FormatString(), GetConcerned(), GetInternal(), GetJrnProp(), isDate(), and table. +References $_SESSION, $a, $count, $h, $limit, $Max, $offset, $p_jrn, $r, $Res, $row, $sql, $tr, $User, $w, CountSql(), DbConnect(), ExecSql(), FormatString(), GetConcerned(), GetInternal(), GetJrnProp(), isDate(), and table.

    @@ -884,11 +1051,20 @@ References $_SESSION

    +Update comment in jrn. +

    +UpdateComment ($p_cn,$p_jr_id,$p_comment)

    +parm :

      +
    • database conn.
        +
      • jrn.jr_id
      • comment gen :
      +
    • none return:
        +
      • none
      +

    -Definition at line 817 of file user_common.php. +Definition at line 814 of file user_common.php.

    -References $Res, ExecSql(), FormatString(), and p_comment. +References $Res, ExecSql(), FormatString(), and p_comment.

    @@ -931,13 +1107,24 @@ References $Res, <

    - +Verify if the date is a valid date the date is in the default period the period is not closed.

    -Definition at line 656 of file user_common.php. +VerifyOperationDate ($p_cn,$p_user,$p_date)

    +parm :

      +
    • db connection

    -References cmpDate(), echo_debug(), echo_error(), GetPeriode(), isDate(), and PeriodeClosed(). +user

      +
    • date gen :
        +
      • none return:
      +

    -Referenced by FormFin(), and FormODS(). +null if error or date if ok +

    +Definition at line 653 of file user_common.php. +

    +References cmpDate(), echo_debug(), echo_error(), GetPeriode(), isDate(), and PeriodeClosed(). +

    +Referenced by FormFin(), and FormODS().

    @@ -974,14 +1161,22 @@ Referenced by FormF

    +return true if we manage stock for it value is stored in attr_value +

    +withStock($p_cn,$p_f_id)

    +parm :

    +

    +$p_f_id fiche.f_id gen :

      +
    • none return: none

    -Definition at line 633 of file user_common.php. +Definition at line 630 of file user_common.php.

    -References $a, and getFicheAttribut(). +References $a, and getFicheAttribut(). -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__compta_8php-source.html b/doc/developper/html/user__compta_8php-source.html index 3f457d818..563574773 100644 --- a/doc/developper/html/user__compta_8php-source.html +++ b/doc/developper/html/user__compta_8php-source.html @@ -4,7 +4,7 @@ - +

    user_compta.php

    Go to the documentation of this file.
    00001 <?
    @@ -30,52 +30,51 @@
     00021 /* $Revision$ */
     00022 include_once ("class_user.php");
     00023 include_once ("postgres.php");
    -00024 
    -00025 $rep=DbConnect();
    -00026 
    -00027 $User=new cl_user($rep);
    -00028 $User->Check();
    +00028 $rep=DbConnect();
     00029 
    -00030 html_page_start($User->theme);
    -00031 
    -00032 if ( isset ( $_GET['dos'] ) ) {
    -00033   $g_dossier=$_GET['dos'];
    -00034   $_SESSION[ "g_dossier"]=$g_dossier;
    -00035   echo_debug('user_compta.php',__LINE__,"admin_dossier = $g_dossier ");
    -00036   $g_name=GetDossierName($g_dossier);
    -00037   $_SESSION["g_name"]=$g_name;
    -00038 
    -00039 } else {
    -00040   echo "You must choose a Dossier ";
    -00041   exit -2;
    -00042 }
    -00043 echo_debug('user_compta.php',__LINE__,"user is ".$_SESSION['g_user']);
    -00044 
    -00045 // Synchronize rights
    -00046 SyncRight($_SESSION['g_dossier'],$_SESSION['g_user']);
    +00030 $User=new cl_user($rep);
    +00031 $User->Check();
    +00032 
    +00033 html_page_start($User->theme);
    +00034 
    +00035 if ( isset ( $_GET['dos'] ) ) {
    +00036   $g_dossier=$_GET['dos'];
    +00037   $_SESSION[ "g_dossier"]=$g_dossier;
    +00038   echo_debug('user_compta.php',__LINE__,"admin_dossier = $g_dossier ");
    +00039   $g_name=GetDossierName($g_dossier);
    +00040   $_SESSION["g_name"]=$g_name;
    +00041 
    +00042 } else {
    +00043   echo "You must choose a Dossier ";
    +00044   exit -2;
    +00045 }
    +00046 echo_debug('user_compta.php',__LINE__,"user is ".$_SESSION['g_user']);
     00047 
    -00048 // Get The priv on the selected folder
    -00049 if ( $User->admin == 0 ) {
    -00050   
    -00051   $r=GetPriv($_SESSION['g_dossier'],$_SESSION['g_user']);
    -00052   if ($r == 0 ){
    -00053     /* Cannot Access */
    -00054     NoAccess();
    -00055   }
    -00056 }
    -00057 
    -00058 
    -00059 
    +00048 // Synchronize rights
    +00049 SyncRight($_SESSION['g_dossier'],$_SESSION['g_user']);
    +00050 
    +00051 // Get The priv on the selected folder
    +00052 if ( $User->admin == 0 ) {
    +00053   
    +00054   $r=GetPriv($_SESSION['g_dossier'],$_SESSION['g_user']);
    +00055   if ($r == 0 ){
    +00056     /* Cannot Access */
    +00057     NoAccess();
    +00058   }
    +00059 }
     00060 
    -00061 include_once ("user_menu.php");
    -00062 echo '<div class="u_tmenu">';
    +00061 
    +00062 
     00063 
    -00064 echo ShowMenuCompta($g_dossier);
    -00065 echo '</div>';
    -00066 html_page_stop();
    -00067 
    -00068 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00064 include_once ("user_menu.php"); +00065 echo '<div class="u_tmenu">'; +00066 +00067 echo ShowMenuCompta($g_dossier); +00068 echo '</div>'; +00069 html_page_stop(); +00070 +00071 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__compta_8php.html b/doc/developper/html/user__compta_8php.html index 229d5e5c9..967e5d6bb 100644 --- a/doc/developper/html/user__compta_8php.html +++ b/doc/developper/html/user__compta_8php.html @@ -4,10 +4,12 @@ - + -

    user_compta.php File Reference

    +

    user_compta.php File Reference

    main page of the accountancy module More... +

    +

    Go to the source code of this file. @@ -21,7 +23,12 @@
     $_SESSION ["g_name"] = $g_name
    -


    Variable Documentation

    +

    Detailed Description

    +main page of the accountancy module +

    + +

    +Definition in file user_compta.php.


    Variable Documentation

    @@ -44,7 +51,7 @@

    -Definition at line 37 of file user_compta.php. +Definition at line 40 of file user_compta.php.

    @@ -69,7 +76,7 @@ Definition at line 37<

    -Definition at line 36 of file user_compta.php. +Definition at line 39 of file user_compta.php.

    @@ -94,7 +101,7 @@ Definition at line 36<

    -Definition at line 25 of file user_compta.php. +Definition at line 28 of file user_compta.php.

    @@ -119,10 +126,10 @@ Definition at line 25<

    -Definition at line 27 of file user_compta.php. +Definition at line 30 of file user_compta.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__form__ach_8php-source.html b/doc/developper/html/user__form__ach_8php-source.html index bf2aaa45f..262a64c4c 100644 --- a/doc/developper/html/user__form__ach_8php-source.html +++ b/doc/developper/html/user__form__ach_8php-source.html @@ -4,7 +4,7 @@ - +

    user_form_ach.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,236 +27,207 @@
     00018 */
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00021 require_once("constant.php");
    -00022 require_once("class_widget.php");
    -00023 require_once("preference.php");
    -00024 require_once("fiche_inc.php");
    -00025 require_once("user_common.php");
    -00026 require_once("class_parm_code.php");
    -00027 /* function FormAchInput
    -00028  * Purpose : Display the form for a sell
    -00029  *           Used to show detail, encode a new invoice 
    -00030  *           or update one
    -00031  *        
    -00032  * parm : 
    -00033  *      - $p_array which can be empty (normally = $_POST)
    -00034  *      - $p_jrn the ledger
    -00035  *      - $p_periode = periode
    -00036  *      - $pview_only if we cannot change it (no right or centralized op)
    -00037  *      - $p_article number of article
    -00038  * gen :
    -00039  *      -
    -00040  * return: string with the form
    -00041  */
    -00042 function FormAchInput($p_cn,$p_jrn,$p_periode,$p_array=null,$p_submit="",$pview_only=true,$p_article=1)
    -00043 { 
    -00044 echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_periode,$p_array,$p_submit,$pview_only,$p_article");
    -00045   if ( $p_array != null) {
    -00046     // array contains old value
    -00047     extract($p_array);
    -00048   }
    -00049   // The date
    -00050   list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    -00051   $op_date=( ! isset($e_date) ) ?substr($l_date_start,2,8):$e_date;
    -00052   $e_ech=(isset($e_ech))?$e_ech:"";
    -00053   $e_comm=(isset($e_comm))?$e_comm:"";
    -00054 
    -00055   // Save old value and set a new one
    -00056   echo_debug('user_form_ach.php',__LINE__,"form_input.php.FormSell_op_date is $op_date");
    -00057   $r="";
    -00058   if ( $pview_only == false) {
    -00059     $r.=JS_SEARCH_CARD;
    -00060     $r.=JS_SHOW_TVA;    
    -00061     $r.=JS_TVA;
    -00062     $r.="<FORM NAME=\"form_detail\"  enctype=\"multipart/form-data\" ACTION=\"user_jrn.php?action=new&p_jrn=$p_jrn\" METHOD=\"POST\">";
    -00063   }
    -00064 
    -00065   $sql="select jrn_def_id as value,jrn_def_name as label from jrn_def where jrn_def_type='VEN'";
    -00066   $list=GetArray($p_cn,$sql);
    -00067   $r.='<TABLE>';
    -00068   // Date widget
    -00069   //--
    -00070   $Date=new widget("text");
    -00071   $Date->SetReadOnly($pview_only);
    -00072   $Date->table=1;
    -00073   $r.="<tr>";
    -00074   $r.=$Date->IOValue("e_date",$op_date,"Date");
    -00075   $r.="</tr>";
    -00076   // Payment limit widget
    -00077   //--
    -00078   $Echeance=new widget("text");
    -00079   $Echeance->SetReadOnly($pview_only);
    -00080   $Echeance->table=1;
    -00081   $r.="<tr>";
    -00082   $r.=$Echeance->IOValue("e_ech",$e_ech,"Echeance");
    -00083   $r.="</tr>";
    -00084   // Comment
    -00085   //--
    -00086   $Commentaire=new widget("text");
    -00087   $Commentaire->table=1;
    -00088   $Commentaire->SetReadOnly($pview_only);
    -00089   $Commentaire->size=80;
    -00090   $r.="<tr>";
    -00091   $r.=$Commentaire->IOValue("e_comm",$e_comm,"Description");
    -00092   $r.="</tr>";
    -00093   include_once("fiche_inc.php");
    -00094   // Display the supplier
    -00095   //--
    -00096   $fiche='cred';
    -00097   echo_debug('user_form_ach.php',__LINE__,"Fournisseurs Nombre d'enregistrement ".sizeof($fiche));
    -00098   // Save old value and set a new one
    -00099   $e_client=( isset ($e_client) )?$e_client:"";
    -00100 
    -00101   $e_client_label="";  
    +00024 require_once("constant.php");
    +00025 require_once("class_widget.php");
    +00026 require_once("preference.php");
    +00027 require_once("fiche_inc.php");
    +00028 require_once("user_common.php");
    +00029 require_once("class_parm_code.php");
    +00044 function FormAchInput($p_cn,$p_jrn,$p_periode,$p_array=null,$p_submit="",$pview_only=true,$p_article=1)
    +00045 { 
    +00046 echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_periode,$p_array,$p_submit,$pview_only,$p_article");
    +00047   if ( $p_array != null) {
    +00048     // array contains old value
    +00049     extract($p_array);
    +00050   }
    +00051   // The date
    +00052   list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    +00053   $op_date=( ! isset($e_date) ) ?substr($l_date_start,2,8):$e_date;
    +00054   $e_ech=(isset($e_ech))?$e_ech:"";
    +00055   $e_comm=(isset($e_comm))?$e_comm:"";
    +00056 
    +00057   // Save old value and set a new one
    +00058   echo_debug('user_form_ach.php',__LINE__,"form_input.php.FormSell_op_date is $op_date");
    +00059   $r="";
    +00060   if ( $pview_only == false) {
    +00061     $r.=JS_SEARCH_CARD;
    +00062     $r.=JS_SHOW_TVA;    
    +00063     $r.=JS_TVA;
    +00064     $r.="<FORM NAME=\"form_detail\"  enctype=\"multipart/form-data\" ACTION=\"user_jrn.php?action=new&p_jrn=$p_jrn\" METHOD=\"POST\">";
    +00065   }
    +00066 
    +00067   $sql="select jrn_def_id as value,jrn_def_name as label from jrn_def where jrn_def_type='VEN'";
    +00068   $list=GetArray($p_cn,$sql);
    +00069   $r.='<TABLE>';
    +00070   // Date widget
    +00071   //--
    +00072   $Date=new widget("text");
    +00073   $Date->SetReadOnly($pview_only);
    +00074   $Date->table=1;
    +00075   $r.="<tr>";
    +00076   $r.=$Date->IOValue("e_date",$op_date,"Date");
    +00077   $r.="</tr>";
    +00078   // Payment limit widget
    +00079   //--
    +00080   $Echeance=new widget("text");
    +00081   $Echeance->SetReadOnly($pview_only);
    +00082   $Echeance->table=1;
    +00083   $r.="<tr>";
    +00084   $r.=$Echeance->IOValue("e_ech",$e_ech,"Echeance");
    +00085   $r.="</tr>";
    +00086   // Comment
    +00087   //--
    +00088   $Commentaire=new widget("text");
    +00089   $Commentaire->table=1;
    +00090   $Commentaire->SetReadOnly($pview_only);
    +00091   $Commentaire->size=80;
    +00092   $r.="<tr>";
    +00093   $r.=$Commentaire->IOValue("e_comm",$e_comm,"Description");
    +00094   $r.="</tr>";
    +00095   include_once("fiche_inc.php");
    +00096   // Display the supplier
    +00097   //--
    +00098   $fiche='cred';
    +00099   echo_debug('user_form_ach.php',__LINE__,"Fournisseurs Nombre d'enregistrement ".sizeof($fiche));
    +00100   // Save old value and set a new one
    +00101   $e_client=( isset ($e_client) )?$e_client:"";
     00102 
    -00103   // retrieve e_client_label
    -00104   if ( isNumber($e_client) == 1 ) {
    -00105     if ( isFicheOfJrn($p_cn,$p_jrn,$e_client,'cred') == 0 ) {
    -00106       $msg="Fiche inexistante !!! ";
    -00107       echo_error($msg); echo_error($msg);       
    -00108       //      echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00109       $e_client="";
    -00110     } else {
    -00111       $a_client=GetFicheAttribut($p_cn,$e_client);
    -00112       if ( $a_client != null)   
    -00113           $e_client_label=$a_client['vw_name']."  adresse ".$a_client['vw_addr']."  ".$a_client['vw_cp'];
    -00114     }
    -00115   }
    -00116   // widget search
    -00117   $W1=new widget("js_search");
    -00118   $W1->label="Fournisseur";
    -00119   $W1->name="e_client";
    -00120   $W1->value=$e_client;
    -00121   $W1->extra=$fiche;  // list of card
    -00122   $W1->extra2=$p_jrn;
    -00123   $r.="<TR>".$W1->IOValue();
    -00124   $client_label=new widget("span");
    -00125   $r.= $client_label->IOValue("e_client_label",$e_client_label)."</TD></TR>";
    -00126   $r.="</TABLE>";
    -00127   // Set correctly the REQUEST param for jrn_type 
    -00128   $h=new widget('hidden');
    -00129   $h->name='jrn_type';
    -00130   $h->value=$_REQUEST['jrn_type'];
    -00131   $r.=$h->IOValue();
    -00132 
    -00133   // Record the current number of article
    -00134   $Hid=new widget('hidden');
    -00135   $r.=$Hid->IOValue("nb_item",$p_article);
    -00136   $e_comment=(isset($e_comment))?$e_comment:"";
    -00137 
    -00138 
    -00139   // Start the div for item to sell
    -00140   $r.="<DIV>";
    -00141   $r.='<H2 class="info">Articles</H2>';
    -00142   $r.='<TABLE>';
    -00143   $r.='<TR>';
    -00144   $r.="<th></th>";
    -00145   $r.="<th>Code</th>";
    -00146   $r.="<th>Dénomination</th>";
    -00147   $r.="<th>prix</th>";
    -00148   $r.="<th>tva</th>";
    -00149   $r.="<th>quantité</th>";
    -00150   $r.='</TR>';
    -00151   // For each article
    -00152   // compute amount
    -00153   // verify if card exists
    -00154   // retrieve vat label
    -00155   //--
    -00156   for ($i=0;$i< $p_article;$i++) {
    -00157     // Code id
    -00158     $march=(isset(${"e_march$i"}))?${"e_march$i"}:"";
    -00159     $march_sell=(isset(${"e_march".$i."_sell"}))?${"e_march".$i."_sell"}:"";
    -00160     $march_tva_id=(isset(${"e_march$i"."_tva_id"}))?${"e_march$i"."_tva_id"}:"";
    -00161 
    -00162     $march_tva_label="";
    -00163     $march_label="";
    -00164 
    -00165     // If $march has a value
    -00166     if ( isFicheOfJrn($p_cn,$p_jrn,$march,'deb') == 0 ) {
    -00167         $msg="Fiche inexistante !!! ";
    -00168         echo_error($msg); echo_error($msg);     
    -00169         $march="";
    -00170     } else {
    -00171         // retrieve the tva label and name
    -00172       $a_fiche=GetFicheAttribut($p_cn, $march);
    -00173       if ( $a_fiche != null ) {
    -00174         if ( $march_tva_id == "" ) {
    -00175           $march_tva_id=$a_fiche['tva_id'];
    -00176           $march_tva_label=$a_fiche['tva_label'];
    -00177         }
    -00178         $march_label=$a_fiche['vw_name'];
    -00179       }
    -00180     }
    -00181   
    -00182     // Show input
    -00183 
    -00184     $W1=new widget("js_search");
    -00185     $W1->label="";
    -00186     $W1->name="e_march".$i;
    -00187     $W1->value=$march;
    -00188     $W1->extra='deb';  // credits
    -00189     $W1->extra2=$p_jrn;
    -00190     $W1->readonly=$pview_only;
    -00191     $r.="<TR>".$W1->IOValue()."</TD>";
    -00192     $Span=new widget ("span");
    -00193     $Span->SetReadOnly($pview_only);
    -00194     // card's name
    -00195     $r.="<TD>".$Span->IOValue("e_march".$i."_label",$march_label)."</TD>";
    -00196    // price
    -00197     $Price=new widget("text");
    -00198     $Price->SetReadOnly($pview_only);
    -00199     $Price->table=1;
    -00200     $r.=$Price->IOValue("e_march".$i."_sell",$march_sell);
    -00201     // vat label
    -00202     $select_tva=make_array($p_cn,"select tva_id,tva_label from tva_rate order by tva_id",1);
    -00203     $Tva=new widget("select");
    -00204     $Tva->table=1;
    -00205     $Tva->selected=$march_tva_id;
    -00206     $r.=$Tva->IOValue("e_march$i"."_tva_id",$select_tva);
    -00207 
    -00208     // quantity
    -00209     $quant=(isset(${"e_quant$i"}))?${"e_quant$i"}:"1";
    -00210     $Quantity=new widget("text");
    -00211     $Quantity->SetReadOnly($pview_only);
    -00212     $Quantity->table=1;
    -00213     $r.=$Quantity->IOValue("e_quant".$i,$quant);
    -00214     $r.='</TR>';
    -00215   }
    -00216 
    -00217 
    +00103   $e_client_label="";  
    +00104 
    +00105   // retrieve e_client_label
    +00106   if ( isNumber($e_client) == 1 ) {
    +00107     if ( isFicheOfJrn($p_cn,$p_jrn,$e_client,'cred') == 0 ) {
    +00108       $msg="Fiche inexistante !!! ";
    +00109       echo_error($msg); echo_error($msg);       
    +00110       //      echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00111       $e_client="";
    +00112     } else {
    +00113       $a_client=GetFicheAttribut($p_cn,$e_client);
    +00114       if ( $a_client != null)   
    +00115           $e_client_label=$a_client['vw_name']."  adresse ".$a_client['vw_addr']."  ".$a_client['vw_cp'];
    +00116     }
    +00117   }
    +00118   // widget search
    +00119   $W1=new widget("js_search");
    +00120   $W1->label="Fournisseur";
    +00121   $W1->name="e_client";
    +00122   $W1->value=$e_client;
    +00123   $W1->extra=$fiche;  // list of card
    +00124   $W1->extra2=$p_jrn;
    +00125   $r.="<TR>".$W1->IOValue();
    +00126   $client_label=new widget("span");
    +00127   $r.= $client_label->IOValue("e_client_label",$e_client_label)."</TD></TR>";
    +00128   $r.="</TABLE>";
    +00129   // Set correctly the REQUEST param for jrn_type 
    +00130   $h=new widget('hidden');
    +00131   $h->name='jrn_type';
    +00132   $h->value=$_REQUEST['jrn_type'];
    +00133   $r.=$h->IOValue();
    +00134 
    +00135   // Record the current number of article
    +00136   $Hid=new widget('hidden');
    +00137   $r.=$Hid->IOValue("nb_item",$p_article);
    +00138   $e_comment=(isset($e_comment))?$e_comment:"";
    +00139 
    +00140 
    +00141   // Start the div for item to sell
    +00142   $r.="<DIV>";
    +00143   $r.='<H2 class="info">Articles</H2>';
    +00144   $r.='<TABLE>';
    +00145   $r.='<TR>';
    +00146   $r.="<th></th>";
    +00147   $r.="<th>Code</th>";
    +00148   $r.="<th>Dénomination</th>";
    +00149   $r.="<th>prix</th>";
    +00150   $r.="<th>tva</th>";
    +00151   $r.="<th>quantité</th>";
    +00152   $r.='</TR>';
    +00153   // For each article
    +00154   // compute amount
    +00155   // verify if card exists
    +00156   // retrieve vat label
    +00157   //--
    +00158   for ($i=0;$i< $p_article;$i++) {
    +00159     // Code id
    +00160     $march=(isset(${"e_march$i"}))?${"e_march$i"}:"";
    +00161     $march_sell=(isset(${"e_march".$i."_sell"}))?${"e_march".$i."_sell"}:"";
    +00162     $march_tva_id=(isset(${"e_march$i"."_tva_id"}))?${"e_march$i"."_tva_id"}:"";
    +00163 
    +00164     $march_tva_label="";
    +00165     $march_label="";
    +00166 
    +00167     // If $march has a value
    +00168     if ( isFicheOfJrn($p_cn,$p_jrn,$march,'deb') == 0 ) {
    +00169         $msg="Fiche inexistante !!! ";
    +00170         echo_error($msg); echo_error($msg);     
    +00171         $march="";
    +00172     } else {
    +00173         // retrieve the tva label and name
    +00174       $a_fiche=GetFicheAttribut($p_cn, $march);
    +00175       if ( $a_fiche != null ) {
    +00176         if ( $march_tva_id == "" ) {
    +00177           $march_tva_id=$a_fiche['tva_id'];
    +00178           $march_tva_label=$a_fiche['tva_label'];
    +00179         }
    +00180         $march_label=$a_fiche['vw_name'];
    +00181       }
    +00182     }
    +00183   
    +00184     // Show input
    +00185 
    +00186     $W1=new widget("js_search");
    +00187     $W1->label="";
    +00188     $W1->name="e_march".$i;
    +00189     $W1->value=$march;
    +00190     $W1->extra='deb';  // credits
    +00191     $W1->extra2=$p_jrn;
    +00192     $W1->readonly=$pview_only;
    +00193     $r.="<TR>".$W1->IOValue()."</TD>";
    +00194     $Span=new widget ("span");
    +00195     $Span->SetReadOnly($pview_only);
    +00196     // card's name
    +00197     $r.="<TD>".$Span->IOValue("e_march".$i."_label",$march_label)."</TD>";
    +00198    // price
    +00199     $Price=new widget("text");
    +00200     $Price->SetReadOnly($pview_only);
    +00201     $Price->table=1;
    +00202     $r.=$Price->IOValue("e_march".$i."_sell",$march_sell);
    +00203     // vat label
    +00204     $select_tva=make_array($p_cn,"select tva_id,tva_label from tva_rate order by tva_id",1);
    +00205     $Tva=new widget("select");
    +00206     $Tva->table=1;
    +00207     $Tva->selected=$march_tva_id;
    +00208     $r.=$Tva->IOValue("e_march$i"."_tva_id",$select_tva);
    +00209 
    +00210     // quantity
    +00211     $quant=(isset(${"e_quant$i"}))?${"e_quant$i"}:"1";
    +00212     $Quantity=new widget("text");
    +00213     $Quantity->SetReadOnly($pview_only);
    +00214     $Quantity->table=1;
    +00215     $r.=$Quantity->IOValue("e_quant".$i,$quant);
    +00216     $r.='</TR>';
    +00217   }
     00218 
    -00219   $r.="</TABLE>";
    -00220   $r.="<hr>";
    -00221 
    -00222   if ($pview_only == false ) {
    -00223     $r.=$p_submit;
    -00224     $r.="</DIV>";
    -00225     $r.="</FORM>";
    -00226   } else {
    -00227      $r.="</div>";
    -00228 
    -00229   }
    +00219 
    +00220 
    +00221   $r.="</TABLE>";
    +00222   $r.="<hr>";
    +00223 
    +00224   if ($pview_only == false ) {
    +00225     $r.=$p_submit;
    +00226     $r.="</DIV>";
    +00227     $r.="</FORM>";
    +00228   } else {
    +00229      $r.="</div>";
     00230 
    -00231 
    +00231   }
     00232 
    -00233   return $r;
    +00233 
     00234 
    -00235 
    -00236 }
    -00237 /* function form_verify_input
    -00238  **************************************************
    -00239  * Purpose : verify if the data to insert are valid
    -00240  *        
    -00241  * parm : 
    -00242  *      - p_cn database connection
    -00243  *      - p_jrn concerned ledger
    -00244  *      - User periode
    -00245  *      - array with the post data
    -00246  *      - p_number number of items
    -00247  * gen :
    -00248  *      -
    -00249  * return:
    -00250  */
    +00235   return $r;
    +00236 
    +00237 
    +00238 }
     00251 function form_verify_input($p_cn,$p_jrn,$p_periode,$p_array,$p_number)
     00252 {
     00253   echo_debug('user_form_ach.php',__LINE__,"Enter form_verify_input $p_cn,$p_jrn,$p_periode,".var_export($p_array,true).",$p_number");
    @@ -331,7 +302,7 @@
     00322    }
     00323 
     00324  // Check if the fiche is in the jrn
    -00325  if (IsFicheOfJrn($p_cn , $p_jrn, $e_client,'cred') == 0 ) 
    +00325  if (IsFicheOfJrn($p_cn , $p_jrn, $e_client,'cred') == 0 ) 
     00326    {
     00327      $msg="Client invalid please recheck";
     00328      echo_error($msg);
    @@ -381,7 +352,7 @@
     00372       }
     00373     
     00374     // Check if the percentage indicated in this field is valid
    -00375     $non_dedu=GetFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_DEPENSE_NON_DEDUCTIBLE);
    +00375     $non_dedu=GetFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_DEPENSE_NON_DEDUCTIBLE);
     00376     if ( $non_dedu != null && strlen(trim($non_dedu)) != 0 )
     00377       {
     00378         if ( isNumber($non_dedu) == 0 || $non_dedu > 1.00 ) 
    @@ -394,7 +365,7 @@
     00385                 }
     00386         }
     00387     // Check if the percentage indicated in this field is valid
    -00388     $non_dedu=GetFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_TVA_NON_DEDUCTIBLE);
    +00388     $non_dedu=GetFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_TVA_NON_DEDUCTIBLE);
     00389     if ( $non_dedu != null && strlen(trim($non_dedu)) != 0 )
     00390       {
     00391         if ( isNumber($non_dedu) == 0 || $non_dedu > 1.00 ) 
    @@ -406,7 +377,7 @@
     00397             
     00398           }
     00399       } // Check if the percentage indicated in this field is valid
    -00400     $non_dedu=GetFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP);
    +00400     $non_dedu=GetFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP);
     00401     if ( $non_dedu != null && strlen(trim($non_dedu)) != 0 )
     00402         {
     00403           if ( isNumber($non_dedu) == 0 || $non_dedu > 1.00 ) 
    @@ -445,378 +416,330 @@
     00436       }
     00437     return true;
     00438 }
    -00439 /* function FormAchView ($p_cn,$p_jrn,$p_periode,$p_array,$p_number,$p_doc='html',$p_comment='') 
    -00440  **************************************************
    -00441  * Purpose : Show the invoice before inserting it 
    -00442  *           the database
    -00443  *        
    -00444  * parm : 
    -00445  *      - p_cn database connection
    -00446  *      - p_jrn journal
    -00447  *      - p_periode
    -00448  *      - array of value
    -00449  *      - nb of item
    -00450  *      - p_doc type pdf or html
    -00451  * gen :
    -00452  *      - none
    -00453  * return:
    -00454  *     - string
    -00455  * 
    -00456  */
    -00457 
    -00458 function FormAchView ($p_cn,$p_jrn,$p_periode,$p_array,$p_submit,$p_number,$p_piece=true)
    -00459 {
    -00460   $r="";
    -00461   $data="";
    -00462   // Keep all the data if hidden
    -00463   // and store the array in variables
    -00464   $hidden=new widget("hidden");
    -00465   foreach ($p_array as $name=>$content) {
    -00466     $data.=$hidden->IOValue($name,$content);
    -00467     ${"$name"}=$content;
    -00468   }
    -00469   
    -00470   // start table
    -00471   $r.='<TABLE>';
    -00472   // Show the Date
    -00473   $r.="<tr>";
    -00474   $r.="<TD>Date : $e_date</TD>";
    -00475   $r.="</tr>";
    -00476   // Show the customer Name
    -00477   $r.="<tr>";
    -00478   $r.="<TD>Client : ".getFicheName($p_cn,$e_client)."</TD>";
    -00479   $r.="</tr>";
    -00480   
    -00481   // show date limit
    -00482   $r.="<tr>";
    -00483   $r.="<TD> Echeance : $e_ech </TD>";
    -00484   $r.="</tr>";
    -00485   // Show desc
    -00486   $r.="<tr>";
    -00487   $r.="<TD> Description : $e_comm</TD>";
    -00488   $r.="</tr>";
    -00489   
    -00490   $sum_with_vat=0.0;
    -00491   $sum_march=0.0;
    -00492   // show all article, price vat and sum
    -00493   $r.="<TR>";
    -00494   $r.="<TH>Article</TH>";
    -00495   $r.="<TH>quantité</TH>";
    -00496   $r.="<TH>prix unit.</TH>";
    -00497   $r.="<TH>taux tva</TH>";
    -00498   $r.="<TH>Montant HTVA</TH>";
    -00499   $r.="<TH>Montant TVA</TH>";
    -00500   $r.="<TH>Total</TH>";
    -00501   $r.="</TR>";
    -00502   for ($i=0;$i<$p_number;$i++) 
    -00503     {
    -00504       if ( trim(${"e_march$i"})  == "" ) 
    -00505         {
    -00506           // no goods to sell 
    -00507           continue;
    -00508         }
    -00509       
    -00510       // Get the name
    -00511       $fiche_name=getFicheName($p_cn,${"e_march$i"});
    -00512       
    -00513       // Quantity
    -00514       $fiche_quant=${"e_quant$i"};
    -00515       
    -00516       // No  row if there is quantity
    -00517       if ( $fiche_quant == 0.0 ) continue;
    -00518       
    -00519 
    -00520       // If the price is not a number, retrieve the price from the database
    -00521       if ( isNumber(${"e_march$i"."_sell"}) == 0 ) {
    -00522         $fiche_price=getFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_PRIX_VENTE);
    -00523       } else {
    -00524         $fiche_price=${"e_march$i"."_sell"};
    -00525       }
    -00526       
    -00527     
    -00528       // VAT 
    -00529       $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"};
    -00530       
    -00531     // vat label
    -00532     // vat rate
    -00533       $a_vat=GetTvaRate($p_cn,$vat);
    -00534       if ( $a_vat == null ) 
    -00535         {
    -00536           $vat_label="";
    -00537           $vat_rate=0.0;
    -00538         } 
    -00539       else 
    -00540         { 
    -00541           $vat_label=$a_vat['tva_label'];
    -00542           $vat_rate=$a_vat['tva_rate'];
    -00543         }               
    -00544       
    -00545       // Total card without vat
    -00546       $fiche_sum=$fiche_price*$fiche_quant;
    -00547       // Sum of invoice
    -00548       $sum_march+=$fiche_sum;
    -00549       // vat of the card
    -00550       $fiche_amount_vat=$fiche_price*$fiche_quant*$vat_rate;
    -00551       // value card + vat
    -00552       $fiche_with_vat=$fiche_price*$fiche_quant*(1+$vat_rate);
    -00553       // Sum of invoice vat 
    -00554       $sum_with_vat+=$fiche_with_vat;
    -00555       // Show the data
    -00556       $r.='<TR>';
    -00557       $r.='<TD>'.$fiche_name.'</TD>';
    -00558       $r.='<TD ALIGN="CENTER">'.$fiche_quant.'</TD>';
    -00559       $r.='<TD ALIGN="right">'.$fiche_price.'</TD>';
    -00560       $r.="<TD  ALIGN=\"RIGHT\"> $vat_label </TD>";
    -00561       $r.='<TD  ALIGN="RIGHT">'.round($fiche_sum,2).'</TD>';
    -00562       $r.='<TD ALIGN="RIGHT">'.round($fiche_amount_vat,2).'</TD>';
    -00563       
    -00564       $r.='<TD>'.round($fiche_with_vat,2).'</TD>';
    -00565 
    -00566       $r.="</TR>";
    -00567     }
    -00568   
    -00569   // end table
    -00570   $r.='</TABLE> ';
    -00571   $r.='<DIV style="padding:30px;font-size:14px">';
    -00572   $r.="Total HTVA =".round( $sum_march,2)." <br>";
    -00573   $r.="Total = ".round($sum_with_vat,2);
    -00574 
    -00575  
    -00576   $r.="</DIV>";
    -00577 
    -00578   $r.='<FORM METHOD="POST" enctype="multipart/form-data" ACTION="user_jrn.php?action=new&p_jrn='.$p_jrn.'">';
    -00579   // check for upload piece
    -00580   // Set correctly the REQUEST param for jrn_type 
    -00581   $h=new widget('hidden');
    -00582   $h->name='jrn_type';
    -00583   $h->value=$_REQUEST['jrn_type'];
    -00584   $r.=$h->IOValue();
    -00585 
    -00586   $file=new widget("file");
    -00587   $file->table=1;
    -00588   $r.="<hr>";
    -00589   $r.= "<table>"; 
    -00590   if ( $p_piece) $r.="<TR>".$file->IOValue("pj","","Pièce justificative")."</TR>";
    -00591   $r.="</table>";
    -00592   $r.="<hr>";
    +00453 function FormAchView ($p_cn,$p_jrn,$p_periode,$p_array,$p_submit,$p_number,$p_piece=true)
    +00454 {
    +00455   $r="";
    +00456   $data="";
    +00457   // Keep all the data if hidden
    +00458   // and store the array in variables
    +00459   $hidden=new widget("hidden");
    +00460   foreach ($p_array as $name=>$content) {
    +00461     $data.=$hidden->IOValue($name,$content);
    +00462     ${"$name"}=$content;
    +00463   }
    +00464   
    +00465   // start table
    +00466   $r.='<TABLE>';
    +00467   // Show the Date
    +00468   $r.="<tr>";
    +00469   $r.="<TD>Date : $e_date</TD>";
    +00470   $r.="</tr>";
    +00471   // Show the customer Name
    +00472   $r.="<tr>";
    +00473   $r.="<TD>Client : ".getFicheName($p_cn,$e_client)."</TD>";
    +00474   $r.="</tr>";
    +00475   
    +00476   // show date limit
    +00477   $r.="<tr>";
    +00478   $r.="<TD> Echeance : $e_ech </TD>";
    +00479   $r.="</tr>";
    +00480   // Show desc
    +00481   $r.="<tr>";
    +00482   $r.="<TD> Description : $e_comm</TD>";
    +00483   $r.="</tr>";
    +00484   
    +00485   $sum_with_vat=0.0;
    +00486   $sum_march=0.0;
    +00487   // show all article, price vat and sum
    +00488   $r.="<TR>";
    +00489   $r.="<TH>Article</TH>";
    +00490   $r.="<TH>quantité</TH>";
    +00491   $r.="<TH>prix unit.</TH>";
    +00492   $r.="<TH>taux tva</TH>";
    +00493   $r.="<TH>Montant HTVA</TH>";
    +00494   $r.="<TH>Montant TVA</TH>";
    +00495   $r.="<TH>Total</TH>";
    +00496   $r.="</TR>";
    +00497   for ($i=0;$i<$p_number;$i++) 
    +00498     {
    +00499       if ( trim(${"e_march$i"})  == "" ) 
    +00500         {
    +00501           // no goods to sell 
    +00502           continue;
    +00503         }
    +00504       
    +00505       // Get the name
    +00506       $fiche_name=getFicheName($p_cn,${"e_march$i"});
    +00507       
    +00508       // Quantity
    +00509       $fiche_quant=${"e_quant$i"};
    +00510       
    +00511       // No  row if there is quantity
    +00512       if ( $fiche_quant == 0.0 ) continue;
    +00513       
    +00514 
    +00515       // If the price is not a number, retrieve the price from the database
    +00516       if ( isNumber(${"e_march$i"."_sell"}) == 0 ) {
    +00517         $fiche_price=getFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_PRIX_VENTE);
    +00518       } else {
    +00519         $fiche_price=${"e_march$i"."_sell"};
    +00520       }
    +00521       
    +00522     
    +00523       // VAT 
    +00524       $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"};
    +00525       
    +00526     // vat label
    +00527     // vat rate
    +00528       $a_vat=GetTvaRate($p_cn,$vat);
    +00529       if ( $a_vat == null ) 
    +00530         {
    +00531           $vat_label="";
    +00532           $vat_rate=0.0;
    +00533         } 
    +00534       else 
    +00535         { 
    +00536           $vat_label=$a_vat['tva_label'];
    +00537           $vat_rate=$a_vat['tva_rate'];
    +00538         }               
    +00539       
    +00540       // Total card without vat
    +00541       $fiche_sum=$fiche_price*$fiche_quant;
    +00542       // Sum of invoice
    +00543       $sum_march+=$fiche_sum;
    +00544       // vat of the card
    +00545       $fiche_amount_vat=$fiche_price*$fiche_quant*$vat_rate;
    +00546       // value card + vat
    +00547       $fiche_with_vat=$fiche_price*$fiche_quant*(1+$vat_rate);
    +00548       // Sum of invoice vat 
    +00549       $sum_with_vat+=$fiche_with_vat;
    +00550       // Show the data
    +00551       $r.='<TR>';
    +00552       $r.='<TD>'.$fiche_name.'</TD>';
    +00553       $r.='<TD ALIGN="CENTER">'.$fiche_quant.'</TD>';
    +00554       $r.='<TD ALIGN="right">'.$fiche_price.'</TD>';
    +00555       $r.="<TD  ALIGN=\"RIGHT\"> $vat_label </TD>";
    +00556       $r.='<TD  ALIGN="RIGHT">'.round($fiche_sum,2).'</TD>';
    +00557       $r.='<TD ALIGN="RIGHT">'.round($fiche_amount_vat,2).'</TD>';
    +00558       
    +00559       $r.='<TD>'.round($fiche_with_vat,2).'</TD>';
    +00560 
    +00561       $r.="</TR>";
    +00562     }
    +00563   
    +00564   // end table
    +00565   $r.='</TABLE> ';
    +00566   $r.='<DIV style="padding:30px;font-size:14px">';
    +00567   $r.="Total HTVA =".round( $sum_march,2)." <br>";
    +00568   $r.="Total = ".round($sum_with_vat,2);
    +00569 
    +00570  
    +00571   $r.="</DIV>";
    +00572 
    +00573   $r.='<FORM METHOD="POST" enctype="multipart/form-data" ACTION="user_jrn.php?action=new&p_jrn='.$p_jrn.'">';
    +00574   // check for upload piece
    +00575   // Set correctly the REQUEST param for jrn_type 
    +00576   $h=new widget('hidden');
    +00577   $h->name='jrn_type';
    +00578   $h->value=$_REQUEST['jrn_type'];
    +00579   $r.=$h->IOValue();
    +00580 
    +00581   $file=new widget("file");
    +00582   $file->table=1;
    +00583   $r.="<hr>";
    +00584   $r.= "<table>"; 
    +00585   if ( $p_piece) $r.="<TR>".$file->IOValue("pj","","Pièce justificative")."</TR>";
    +00586   $r.="</table>";
    +00587   $r.="<hr>";
    +00588   
    +00589   $r.=$data;
    +00590   $r.=$p_submit;
    +00591   
    +00592   $r.='</FORM>';
     00593   
    -00594   $r.=$data;
    -00595   $r.=$p_submit;
    -00596   
    -00597   $r.='</FORM>';
    -00598   
    -00599   return $r;
    -00600   
    -00601 }
    -00602 
    -00603 /* function RecordSell
    -00604  **************************************************
    -00605  * Purpose : Record an invoice in the table jrn &
    -00606  *           jrnx
    -00607  *        
    -00608  * parm : 
    -00609  *      - $p_cn Database connection
    -00610  *  - $p_array contains all the invoice data
    -00611  * e_date => e : 01.01.2003
    -00612  * e_client => e : 3
    -00613  * nb_item => e : 3
    -00614  * e_march0 => e : 6
    -00615  * e_quant0 => e : 0
    -00616  * e_march0_sell=>e:1
    -00617  * e_march1 => e : 6
    -00618  * e_quant1 => e : 2
    -00619  * e_march1_sell=>e:1
    -00620  * e_march2 => e : 7
    -00621  * e_quant2 => e : 3
    -00622  * e_march2_sell=>e:1
    -00623 V : view_invoice => e : Voir cette facture
    -00624 V : record_invoice => e : Sauver 
    -00625  *  - $p_periode periode
    -00626  *  - $p_jrn current folder (journal)
    -00627  * gen :
    -00628  *      - none
    -00629  * return:
    -00630  *            true on success
    -00631  */
    -00632 function RecordSell($p_cn,$p_array,$p_user,$p_jrn)
    -00633 {
    -00634   echo_debug('user_form_ach',__LINE__,"function RecordSell($p_cn,$p_array,$p_user,$p_jrn)");
    -00635   foreach ( $p_array as $v => $e)
    -00636   {
    -00637     ${"$v"}=$e;
    -00638   }
    -00639 
    -00640   // Get the default period
    -00641   $periode=$p_user->GetPeriode();
    -00642   $amount=0.0;
    -00643   $amount_jrn=0.0;
    -00644   $sum_tva_nd=0.0;
    -00645   // Computing total customer
    -00646   for ($i=0;$i<$nb_item;$i++) {
    -00647     // store quantity & goods in array
    -00648     $a_good[$i]=${"e_march$i"};
    -00649     $a_quant[$i]=${"e_quant$i"};
    -00650     $a_price[$i]=0;
    -00651     $a_vat_good[$i]=${"e_march$i"."_tva_id"};
    -00652     // check wether the price is set or no
    -00653     if ( isNumber(${"e_march$i"."_sell"}) == 0 ) {
    -00654       if ( $a_good[$i] !="" ) {
    -00655              // If the price is not set we have to find it from the database
    -00656              $a_price[$i]=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_PRIX_VENTE);
    -00657            } 
    -00658     } else {
    -00659       // The price is valid
    -00660       $a_price[$i]=${"e_march$i"."_sell"};
    -00661     }
    -00662     $cost=$a_price[$i]*$a_quant[$i];
    -00663     $amount+=$cost;
    -00664     $amount_jrn+=$cost;
    -00665     echo_debug('user_form_ach.php',__LINE__,'Total customer:'.$amount_jrn);
    -00666   }
    -00667   //  $amount_jrn=round(
    -00668   $comm=FormatString($e_comm);
    -00669 
    -00670   // Compute vat with ded
    -00671   echo_debug('user_form_achat.php',__LINE__,"Call ComputeTotalVat");
    -00672   $a_vat=ComputeTotalVat($p_cn,$a_good,$a_quant,$a_price,$a_vat_good,false);
    -00673         
    -00674   StartSql($p_cn);      
    +00594   return $r;
    +00595   
    +00596 }
    +00597 
    +00627 function RecordSell($p_cn,$p_array,$p_user,$p_jrn)
    +00628 {
    +00629   echo_debug('user_form_ach',__LINE__,"function RecordSell($p_cn,$p_array,$p_user,$p_jrn)");
    +00630   foreach ( $p_array as $v => $e)
    +00631   {
    +00632     ${"$v"}=$e;
    +00633   }
    +00634 
    +00635   // Get the default period
    +00636   $periode=$p_user->GetPeriode();
    +00637   $amount=0.0;
    +00638   $amount_jrn=0.0;
    +00639   $sum_tva_nd=0.0;
    +00640   // Computing total customer
    +00641   for ($i=0;$i<$nb_item;$i++) {
    +00642     // store quantity & goods in array
    +00643     $a_good[$i]=${"e_march$i"};
    +00644     $a_quant[$i]=${"e_quant$i"};
    +00645     $a_price[$i]=0;
    +00646     $a_vat_good[$i]=${"e_march$i"."_tva_id"};
    +00647     // check wether the price is set or no
    +00648     if ( isNumber(${"e_march$i"."_sell"}) == 0 ) {
    +00649       if ( $a_good[$i] !="" ) {
    +00650              // If the price is not set we have to find it from the database
    +00651              $a_price[$i]=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_PRIX_VENTE);
    +00652            } 
    +00653     } else {
    +00654       // The price is valid
    +00655       $a_price[$i]=${"e_march$i"."_sell"};
    +00656     }
    +00657     $cost=$a_price[$i]*$a_quant[$i];
    +00658     $amount+=$cost;
    +00659     $amount_jrn+=$cost;
    +00660     echo_debug('user_form_ach.php',__LINE__,'Total customer:'.$amount_jrn);
    +00661   }
    +00662   //  $amount_jrn=round(
    +00663   $comm=FormatString($e_comm);
    +00664 
    +00665   // Compute vat with ded
    +00666   echo_debug('user_form_achat.php',__LINE__,"Call ComputeTotalVat");
    +00667   $a_vat=ComputeTotalVat($p_cn,$a_good,$a_quant,$a_price,$a_vat_good,false);
    +00668         
    +00669   StartSql($p_cn);      
    +00670 
    +00671   // Compute the j_grpt
    +00672   $seq=NextSequence($p_cn,'s_grpt');
    +00673 
    +00674 
     00675 
    -00676   // Compute the j_grpt
    -00677   $seq=NextSequence($p_cn,'s_grpt');
    +00676   // Credit = goods 
    +00677   for ( $i = 0; $i < $nb_item;$i++) {
     00678 
    -00679 
    -00680 
    -00681   // Credit = goods 
    -00682   for ( $i = 0; $i < $nb_item;$i++) {
    +00679     $poste=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_ACCOUNT);
    +00680           
    +00681     // don't record operation of 0
    +00682     if ( $a_price[$i]*$a_quant[$i] == 0 ) continue;
     00683 
    -00684     $poste=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_ACCOUNT);
    -00685           
    -00686     // don't record operation of 0
    -00687     if ( $a_price[$i]*$a_quant[$i] == 0 ) continue;
    -00688 
    -00689     $amount=$a_price[$i]*$a_quant[$i];
    -00690     // Put the non deductible part into a special account
    -00691     $non_dedu=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_DEPENSE_NON_DEDUCTIBLE);
    -00692     echo_debug('user_form_ach.php',__LINE__,"value non ded : $non_dedu");
    -00693     if ( $non_dedu != null && strlen(trim($non_dedu)) != 0)
    -00694       {
    -00695         $nd_amount=round($a_quant[$i]*$a_price[$i]*$non_dedu,2);
    -00696 
    -00697         // save it
    -00698           echo_debug('user_form_ach.php',__LINE__,"InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,'6740',$e_date,round($nd_amount,2),$seq,$periode);");
    -00699           $dna=new parm_code($p_cn,'DNA');
    -00700         $j_id=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$dna->p_value,$e_date,round($nd_amount,2),$seq,$periode);
    -00701         if ( $j_id == false) { Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    -00702         $amount=$amount-$nd_amount;
    -00703       }
    -00704     // Put the non deductible part into a special account
    -00705     $non_dedu=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_TVA_NON_DEDUCTIBLE);
    -00706     echo_debug('user_form_ach.php',__LINE__,"TVA value non ded : $non_dedu");
    -00707     if ( $non_dedu != null && strlen(trim($non_dedu)) != 0)
    -00708       {
    -00709         $lvat=ComputeVat($p_cn, $a_good[$i],$a_quant[$i],$a_price[$i],
    -00710                             $a_vat_good[$i] );
    -00711         $ded_vat=($lvat != null )?$lvat*$non_dedu:0;
    -00712         $ded_vat=round($ded_vat,2);
    -00713         $sum_tva_nd+=$ded_vat;
    +00684     $amount=$a_price[$i]*$a_quant[$i];
    +00685     // Put the non deductible part into a special account
    +00686     $non_dedu=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_DEPENSE_NON_DEDUCTIBLE);
    +00687     echo_debug('user_form_ach.php',__LINE__,"value non ded : $non_dedu");
    +00688     if ( $non_dedu != null && strlen(trim($non_dedu)) != 0)
    +00689       {
    +00690         $nd_amount=round($a_quant[$i]*$a_price[$i]*$non_dedu,2);
    +00691 
    +00692         // save it
    +00693           echo_debug('user_form_ach.php',__LINE__,"InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,'6740',$e_date,round($nd_amount,2),$seq,$periode);");
    +00694           $dna=new parm_code($p_cn,'DNA');
    +00695         $j_id=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$dna->p_value,$e_date,round($nd_amount,2),$seq,$periode);
    +00696         if ( $j_id == false) { Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    +00697         $amount=$amount-$nd_amount;
    +00698       }
    +00699     // Put the non deductible part into a special account
    +00700     $non_dedu=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_TVA_NON_DEDUCTIBLE);
    +00701     echo_debug('user_form_ach.php',__LINE__,"TVA value non ded : $non_dedu");
    +00702     if ( $non_dedu != null && strlen(trim($non_dedu)) != 0)
    +00703       {
    +00704         $lvat=ComputeVat($p_cn, $a_good[$i],$a_quant[$i],$a_price[$i],
    +00705                             $a_vat_good[$i] );
    +00706         $ded_vat=($lvat != null )?$lvat*$non_dedu:0;
    +00707         $ded_vat=round($ded_vat,2);
    +00708         $sum_tva_nd+=$ded_vat;
    +00709 
    +00710         // compute the NDA TVA
    +00711         $tva_dna=new parm_code($p_cn,'TVA_DNA');
    +00712         echo_debug('user_form_ach.php',__LINE__,
    +00713                    "InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,".$tva_dna->p_value.",$e_date,round($ded_vat,2),$seq,$periode);");
     00714 
    -00715         // compute the NDA TVA
    -00716         $tva_dna=new parm_code($p_cn,'TVA_DNA');
    -00717         echo_debug('user_form_ach.php',__LINE__,
    -00718                    "InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,".$tva_dna->p_value.",$e_date,round($ded_vat,2),$seq,$periode);");
    -00719 
    -00720         $j_id=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$tva_dna->p_value,$e_date,round($ded_vat,2),$seq,$periode);
    -00721         if ( $j_id == false) { Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    -00722       }
    -00723     
    -00724     // Put the non deductible part into a special account
    -00725     $non_dedu=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP);
    -00726     echo_debug('user_form_ach.php',__LINE__,"TVA value non ded : $non_dedu");
    -00727     if ( $non_dedu != null && strlen(trim($non_dedu)) != 0 )
    -00728         {
    -00729           $lvat=ComputeVat($p_cn,       $a_good[$i],$a_quant[$i],$a_price[$i],
    -00730                            $a_vat_good[$i] );
    -00731           $ded_vat=($lvat != null )?$lvat*$non_dedu:0;
    -00732           
    -00733           $sum_tva_nd+=round($ded_vat,2);
    +00715         $j_id=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$tva_dna->p_value,$e_date,round($ded_vat,2),$seq,$periode);
    +00716         if ( $j_id == false) { Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    +00717       }
    +00718     
    +00719     // Put the non deductible part into a special account
    +00720     $non_dedu=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP);
    +00721     echo_debug('user_form_ach.php',__LINE__,"TVA value non ded : $non_dedu");
    +00722     if ( $non_dedu != null && strlen(trim($non_dedu)) != 0 )
    +00723         {
    +00724           $lvat=ComputeVat($p_cn,       $a_good[$i],$a_quant[$i],$a_price[$i],
    +00725                            $a_vat_good[$i] );
    +00726           $ded_vat=($lvat != null )?$lvat*$non_dedu:0;
    +00727           
    +00728           $sum_tva_nd+=round($ded_vat,2);
    +00729 
    +00730           // Save it 
    +00731           $tva_ded_impot=new parm_code($p_cn,'TVA_DED_IMPOT');
    +00732           echo_debug('user_form_ach.php',__LINE__,
    +00733                      "InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,".$tva_ded_impot->p_value.",$e_date,round($ded_vat,2),$seq,$periode);");
     00734 
    -00735           // Save it 
    -00736           $tva_ded_impot=new parm_code($p_cn,'TVA_DED_IMPOT');
    -00737           echo_debug('user_form_ach.php',__LINE__,
    -00738                      "InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,".$tva_ded_impot->p_value.",$e_date,round($ded_vat,2),$seq,$periode);");
    +00735           $j_id=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$tva_ded_impot->p_value,$e_date,round($ded_vat,2),$seq,$periode);
    +00736           if ( $j_id == false) { Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    +00737         }
    +00738 
     00739 
    -00740           $j_id=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$tva_ded_impot->p_value,$e_date,round($ded_vat,2),$seq,$periode);
    -00741           if ( $j_id == false) { Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    -00742         }
    -00743 
    -00744 
    -00745 
    -00746 
    -00747     // record into jrnx
    -00748     echo_debug('user_form_ach.php',__LINE__,"InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($amount,2),$seq,$periode);");
    -00749     $j_id=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($amount,2),$seq,$periode);
    -00750     if ( $j_id == false) { Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    -00751     // always save quantity but in withStock we can find what card need a stock management
    -00752     if (  InsertStockGoods($p_cn,$j_id,$a_good[$i],$a_quant[$i],'c') == false ) {
    -00753       $Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    -00754         echo_debug('user_form_ach.php',__LINE__,"value non ded : ".$a_good[$i]."is");           
    -00755 
    -00756   }
    +00740 
    +00741 
    +00742     // record into jrnx
    +00743     echo_debug('user_form_ach.php',__LINE__,"InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($amount,2),$seq,$periode);");
    +00744     $j_id=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($amount,2),$seq,$periode);
    +00745     if ( $j_id == false) { Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    +00746     // always save quantity but in withStock we can find what card need a stock management
    +00747     if (  InsertStockGoods($p_cn,$j_id,$a_good[$i],$a_quant[$i],'c') == false ) {
    +00748       $Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    +00749         echo_debug('user_form_ach.php',__LINE__,"value non ded : ".$a_good[$i]."is");           
    +00750 
    +00751   }
    +00752 
    +00753   
    +00754   // Insert Vat
    +00755   $sum_tva=0.0;
    +00756   if ( $a_vat  !=  null  ) // no vat
     00757 
    -00758   
    -00759   // Insert Vat
    -00760   $sum_tva=0.0;
    -00761   if ( $a_vat  !=  null  ) // no vat
    -00762 
    -00763     {
    -00764 
    -00765       echo_debug('user_form_ach',__LINE__,'a_vat = '.var_export($a_vat,true));
    -00766       foreach ($a_vat as $tva_id => $tva_amount ) 
    -00767         {
    -00768           echo_debug('user_form_ach',__LINE__," tva_amount = $tva_amount tva_id=$tva_id");
    -00769           $poste=GetTvaPoste($p_cn,$tva_id,'d');
    -00770           if ($tva_amount == 0 ) continue;
    -00771           echo_debug('user_form_ach',__LINE__,"InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($tva_amount,2),$seq,$periode);");
    -00772           $r=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($tva_amount,2),$seq,$periode);
    -00773           if ( $r == false ) { Rollback($p_cn); exit(" Error 'user_form_ach.php' __LINE__");}
    -00774           $sum_tva+=round($tva_amount,2);
    -00775         }
    -00776     }
    -00777   echo_debug('user_form_ach.php',__LINE__,"echeance = $e_ech");
    -00778   echo_debug('user_form_ach.php',__LINE__,"sum_tva = $sum_tva");
    -00779   echo_debug('user_form_ach.php',__LINE__,"amount_jrn = $amount_jrn");
    -00780   echo_debug('user_form_ach.php',__LINE__,"sum_tva_nd = $sum_tva_nd");
    +00758     {
    +00759 
    +00760       echo_debug('user_form_ach',__LINE__,'a_vat = '.var_export($a_vat,true));
    +00761       foreach ($a_vat as $tva_id => $tva_amount ) 
    +00762         {
    +00763           echo_debug('user_form_ach',__LINE__," tva_amount = $tva_amount tva_id=$tva_id");
    +00764           $poste=GetTvaPoste($p_cn,$tva_id,'d');
    +00765           if ($tva_amount == 0 ) continue;
    +00766           echo_debug('user_form_ach',__LINE__,"InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($tva_amount,2),$seq,$periode);");
    +00767           $r=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($tva_amount,2),$seq,$periode);
    +00768           if ( $r == false ) { Rollback($p_cn); exit(" Error 'user_form_ach.php' __LINE__");}
    +00769           $sum_tva+=round($tva_amount,2);
    +00770         }
    +00771     }
    +00772   echo_debug('user_form_ach.php',__LINE__,"echeance = $e_ech");
    +00773   echo_debug('user_form_ach.php',__LINE__,"sum_tva = $sum_tva");
    +00774   echo_debug('user_form_ach.php',__LINE__,"amount_jrn = $amount_jrn");
    +00775   echo_debug('user_form_ach.php',__LINE__,"sum_tva_nd = $sum_tva_nd");
    +00776 
    +00777   // Debit = client
    +00778   $poste=GetFicheAttribut($p_cn,$e_client,ATTR_DEF_ACCOUNT);
    +00779   echo_debug('user_form_achat.php',__LINE__,"get e_client $e_client poste $poste");
    +00780   echo_debug('user_form_achat.php',__LINE__,"insert client");
     00781 
    -00782   // Debit = client
    -00783   $poste=GetFicheAttribut($p_cn,$e_client,ATTR_DEF_ACCOUNT);
    -00784   echo_debug('user_form_achat.php',__LINE__,"get e_client $e_client poste $poste");
    -00785   echo_debug('user_form_achat.php',__LINE__,"insert client");
    -00786 
    -00787   $r=InsertJrnx($p_cn,'c',$p_user->id,$p_jrn,$poste,$e_date,round($amount_jrn+$sum_tva+$sum_tva_nd,2),$seq,$periode);
    -00788   if ( $r == false) { $Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    -00789 
    -00790   $r=InsertJrn($p_cn,$e_date,$e_ech,$p_jrn,"--",round($amount_jrn+$sum_tva+$sum_tva_nd,2),$seq,$periode);
    -00791   if ( $r == false ) { Rollback($p_cn); exit(" Error 'user_form_ach.php' __LINE__");}
    -00792   // Set Internal code and Comment
    -00793   $internal=SetInternalCode($p_cn,$seq,$p_jrn);
    -00794   $comment=(FormatString($e_comm) == null )?$internal."  client : ".GetFicheName($p_cn,$e_client):FormatString($e_comm);
    -00795 
    -00796   // Update and set the invoice's comment 
    -00797   $Res=ExecSql($p_cn,"update jrn set jr_comment='".$comment."' where jr_grpt_id=".$seq);
    -00798   if ( $Res == false ) { Rollback($p_cn); exit(" Error 'user_form_ach.php' __LINE__"); };
    -00799 
    -00800   if ( isset ($_FILES))
    -00801     save_upload_document($p_cn,$seq);
    -00802 
    +00782   $r=InsertJrnx($p_cn,'c',$p_user->id,$p_jrn,$poste,$e_date,round($amount_jrn+$sum_tva+$sum_tva_nd,2),$seq,$periode);
    +00783   if ( $r == false) { $Rollback($p_cn);exit("error 'user_form_ach.php' __LINE__");}
    +00784 
    +00785   $r=InsertJrn($p_cn,$e_date,$e_ech,$p_jrn,"--",round($amount_jrn+$sum_tva+$sum_tva_nd,2),$seq,$periode);
    +00786   if ( $r == false ) { Rollback($p_cn); exit(" Error 'user_form_ach.php' __LINE__");}
    +00787   // Set Internal code and Comment
    +00788   $internal=SetInternalCode($p_cn,$seq,$p_jrn);
    +00789   $comment=(FormatString($e_comm) == null )?$internal."  client : ".GetFicheName($p_cn,$e_client):FormatString($e_comm);
    +00790 
    +00791   // Update and set the invoice's comment 
    +00792   $Res=ExecSql($p_cn,"update jrn set jr_comment='".$comment."' where jr_grpt_id=".$seq);
    +00793   if ( $Res == false ) { Rollback($p_cn); exit(" Error 'user_form_ach.php' __LINE__"); };
    +00794 
    +00795   if ( isset ($_FILES))
    +00796     save_upload_document($p_cn,$seq);
    +00797 
    +00798 
    +00799   Commit($p_cn);
    +00800 
    +00801   return $comment;
    +00802 }
     00803 
    -00804   Commit($p_cn);
    -00805 
    -00806   return $comment;
    -00807 }
    -00808 
    -00809 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00804 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__form__ach_8php.html b/doc/developper/html/user__form__ach_8php.html index 92ff3c86f..27fb5ff21 100644 --- a/doc/developper/html/user__form__ach_8php.html +++ b/doc/developper/html/user__form__ach_8php.html @@ -4,24 +4,35 @@ - + -

    user_form_ach.php File Reference

    +

    user_form_ach.php File Reference

    Functions for the ledger of expenses. More... +

    +

    Go to the source code of this file. + + + +

    Functions

     FormAchInput ($p_cn, $p_jrn, $p_periode, $p_array=null, $p_submit="", $pview_only=true, $p_article=1)
     Display the form for a sell Used to show detail, encode a new invoice or update one.
     form_verify_input ($p_cn, $p_jrn, $p_periode, $p_array, $p_number)
     verify if the data to insert are valid
     FormAchView ($p_cn, $p_jrn, $p_periode, $p_array, $p_submit, $p_number, $p_piece=true)
     Show the invoice before inserting it the database.
     RecordSell ($p_cn, $p_array, $p_user, $p_jrn)
     Record an invoice in the table jrn & jrnx.
    -


    Function Documentation

    +

    Detailed Description

    +Functions for the ledger of expenses. +

    + +

    +Definition in file user_form_ach.php.


    Function Documentation

    @@ -74,11 +85,23 @@ +References CountSql(), echo_debug(), echo_error(), isDate(), isNumber(), and name.

    +verify if the data to insert are valid +

    +

    Parameters:
    + + + + + + +
    $p_cn database connection
    $p_jrn concerned ledger
    $p_periode User periode
    $p_array array with the post data
    $p_number number of items
    +
    +
    Returns:
    null if error

    Definition at line 251 of file user_form_ach.php.

    -References CountSql(), echo_debug(), echo_error(), isDate(), isNumber(), and name.

    @@ -145,11 +168,23 @@ References CountSql(),

    +Display the form for a sell Used to show detail, encode a new invoice or update one. +

    +

    Parameters:
    + + + + + + +
    $p_array which can be empty (normally = $_POST)
    $p_jrn the ledger
    $p_periode = periode
    $pview_only if we cannot change it (no right or centralized op)
    $p_article number of article
    +
    +
    Returns:
    : string with the form

    -Definition at line 42 of file user_form_ach.php. +Definition at line 44 of file user_form_ach.php.

    -References $fiche, $h, $list, $p_jrn, $r, $sql, echo_debug(), echo_error(), GetArray(), GetPeriode(), isNumber(), and make_array(). +References $fiche, $h, $list, $p_jrn, $r, $sql, echo_debug(), echo_error(), GetArray(), GetPeriode(), isNumber(), and make_array().

    @@ -216,11 +251,23 @@ References $fiche

    +Show the invoice before inserting it the database. +

    +

    Parameters:
    + + + + + + + +
    $p_cn database connection
    p_jrn journal
    $p_periode 
    $p_array array of value
    $p_number nb of item
    $piece == true we can upload a doc.
    +

    -Definition at line 458 of file user_form_ach.php. +Definition at line 453 of file user_form_ach.php.

    -References $a_vat, $data, $file, $h, $r, getFicheAttribut(), getFicheName(), GetTvaRate(), isNumber(), METHOD, and name. +References $a_vat, $data, $file, $h, $r, getFicheAttribut(), getFicheName(), GetTvaRate(), isNumber(), METHOD, and name.

    @@ -269,14 +316,23 @@ References $a_vat

    +Record an invoice in the table jrn & jrnx. +

    +parm :

      +
    • $p_cn Database connection
    +

    +$p_array contains all the invoice data e_date => e : 01.01.2003 e_client => e : 3 nb_item => e : 3 e_march0 => e : 6 e_quant0 => e : 0 e_march0_sell=>e:1 e_march1 => e : 6 e_quant1 => e : 2 e_march1_sell=>e:1 e_march2 => e : 7 e_quant2 => e : 3 e_march2_sell=>e:1 V : view_invoice => e : Voir cette facture V : record_invoice => e : Sauver

      +
    • $p_periode periode
    • $p_jrn current folder (journal) gen :
        +
      • none return: true on success
      +

    -Definition at line 632 of file user_form_ach.php. +Definition at line 627 of file user_form_ach.php.

    -References $a_vat, $amount, $comment, $e, $i, $poste, $r, $Res, $seq, Commit(), ComputeTotalVat(), ComputeVat(), echo_debug(), ExecSql(), exit, FormatString(), GetTvaPoste(), InsertJrn(), InsertJrnx(), InsertStockGoods(), isNumber(), NextSequence(), Rollback(), save_upload_document(), SetInternalCode(), and StartSql(). +References $a_vat, $amount, $comment, $e, $i, $poste, $r, $Res, $seq, Commit(), ComputeTotalVat(), ComputeVat(), echo_debug(), ExecSql(), exit, FormatString(), GetTvaPoste(), InsertJrn(), InsertJrnx(), InsertStockGoods(), isNumber(), NextSequence(), Rollback(), save_upload_document(), SetInternalCode(), and StartSql(). -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__form__fin_8php-source.html b/doc/developper/html/user__form__fin_8php-source.html index b50083cdc..047dbc581 100644 --- a/doc/developper/html/user__form__fin_8php-source.html +++ b/doc/developper/html/user__form__fin_8php-source.html @@ -4,7 +4,7 @@ - +

    user_form_fin.php

    Go to the documentation of this file.
    00001 <?
    @@ -32,398 +32,350 @@
     00023 require_once("preference.php");
     00024 require_once("fiche_inc.php");
     00025 require_once("user_common.php");
    -00026 /* function form_verify_input
    -00027  **************************************************
    -00028  * Purpose : verify if the data to insert are valid
    -00029  *        
    -00030  * parm : 
    -00031  *      - p_cn database connection
    -00032  *      - p_jrn concerned ledger
    -00033  *      - User periode
    -00034  *      - array with the post data
    -00035  *      - p_number number of items
    -00036  * gen :
    -00037  *      -
    -00038  * return:
    -00039  */
    -00040 function form_verify_input($p_cn,$p_jrn,$p_periode,$p_array,$p_number)
    -00041 {
    -00042   foreach ($p_array as $name=>$content) {
    -00043     ${"$name"}=$content;
    -00044   }
    -00045   // Verify the date
    -00046   if ( isDate($e_date) == null ) { 
    -00047           echo_error("Invalid date $e_date");
    -00048           echo_debug('user_form_fin.php',__LINE__,"Invalid date $e_date");
    -00049           echo "<SCRIPT> alert('INVALID DATE $e_date !!!!');</SCRIPT>";
    -00050           return null;
    -00051                 }
    -00052 
    -00053 
    -00054  // Check if the fiche is in the jrn
    -00055  if (IsFicheOfJrn($p_cn , $p_jrn, $e_bank_account,'deb') == 0 ) 
    -00056    {
    -00057      $msg="Mauvais compte en banque";
    -00058      echo_error($msg);echo_debug('user_form_fin.php',__LINE__,$msg);    
    -00059      echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00060      return null;
    -00061    }
    -00062 
    -00063  // check if all e_march are in fiche
    -00064   for ($i=0;$i<$p_number;$i++) {
    -00065     if ( trim(${"e_other$i"})  == "" ) {
    -00066       // nothing to do
    -00067       continue;
    -00068     }
    -00069         // Check amount
    -00070     if ( isNumber(${"e_other".$i."_amount"}) == 0) {
    -00071                 $msg="Montant invalide !!! ";
    -00072                 echo_error($msg); echo_debug('user_form_fin.php',__LINE__,$msg);        
    -00073                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00074                 return null;
    -00075         }
    -00076     // Check 
    -00077     if ( isFicheOfJrn($p_cn,$p_jrn,${"e_other$i"},'cred') == 0 ) {
    -00078       $msg="Fiche inexistante !!! ";
    -00079       echo_error($msg);echo_debug('user_form_fin.php',__LINE__,$msg);   
    -00080       echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00081       return null;
    -00082     }
    -00083         // check if the  ATTR_DEF_ACCOUNT is set
    -00084         $poste=GetFicheAttribut($p_cn,${"e_other$i"},ATTR_DEF_ACCOUNT);
    -00085         if ( $poste == null ) 
    -00086         {       
    -00087                 $msg="La fiche ".${"e_other$i"}." n\'a pas de poste comptable";
    -00088       echo_error($msg); echo_debug('user_form_fin.php',__LINE__,$msg);  
    -00089       echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00090       return null;
    -00091         
    -00092         }
    -00093         if ( strlen(trim($poste))==0 )
    -00094         {
    -00095                 $msg="La fiche ".${"e_other$i"}." n\'a pas de poste comptable";
    -00096                 echo_error($msg); echo_debug('user_form_fin.php',__LINE__,$msg);        
    -00097                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00098         }
    -00099 
    -00100   }
    -00101 // Verify the userperiode
    +00043 function form_verify_input($p_cn,$p_jrn,$p_periode,$p_array,$p_number)
    +00044 {
    +00045   foreach ($p_array as $name=>$content) {
    +00046     ${"$name"}=$content;
    +00047   }
    +00048   // Verify the date
    +00049   if ( isDate($e_date) == null ) { 
    +00050           echo_error("Invalid date $e_date");
    +00051           echo_debug('user_form_fin.php',__LINE__,"Invalid date $e_date");
    +00052           echo "<SCRIPT> alert('INVALID DATE $e_date !!!!');</SCRIPT>";
    +00053           return null;
    +00054                 }
    +00055 
    +00056 
    +00057  // Check if the fiche is in the jrn
    +00058  if (IsFicheOfJrn($p_cn , $p_jrn, $e_bank_account,'deb') == 0 ) 
    +00059    {
    +00060      $msg="Mauvais compte en banque";
    +00061      echo_error($msg);echo_debug('user_form_fin.php',__LINE__,$msg);    
    +00062      echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00063      return null;
    +00064    }
    +00065 
    +00066  // check if all e_march are in fiche
    +00067   for ($i=0;$i<$p_number;$i++) {
    +00068     if ( trim(${"e_other$i"})  == "" ) {
    +00069       // nothing to do
    +00070       continue;
    +00071     }
    +00072         // Check amount
    +00073     if ( isNumber(${"e_other".$i."_amount"}) == 0) {
    +00074                 $msg="Montant invalide !!! ";
    +00075                 echo_error($msg); echo_debug('user_form_fin.php',__LINE__,$msg);        
    +00076                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00077                 return null;
    +00078         }
    +00079     // Check 
    +00080     if ( isFicheOfJrn($p_cn,$p_jrn,${"e_other$i"},'cred') == 0 ) {
    +00081       $msg="Fiche inexistante !!! ";
    +00082       echo_error($msg);echo_debug('user_form_fin.php',__LINE__,$msg);   
    +00083       echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00084       return null;
    +00085     }
    +00086         // check if the  ATTR_DEF_ACCOUNT is set
    +00087         $poste=GetFicheAttribut($p_cn,${"e_other$i"},ATTR_DEF_ACCOUNT);
    +00088         if ( $poste == null ) 
    +00089         {       
    +00090                 $msg="La fiche ".${"e_other$i"}." n\'a pas de poste comptable";
    +00091       echo_error($msg); echo_debug('user_form_fin.php',__LINE__,$msg);  
    +00092       echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00093       return null;
    +00094         
    +00095         }
    +00096         if ( strlen(trim($poste))==0 )
    +00097         {
    +00098                 $msg="La fiche ".${"e_other$i"}." n\'a pas de poste comptable";
    +00099                 echo_error($msg); echo_debug('user_form_fin.php',__LINE__,$msg);        
    +00100                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00101         }
     00102 
    -00103 // p_periode contient la periode par default
    -00104   list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    -00105   
    -00106   // Date dans la periode active
    -00107   echo_debug ('user_form_fin',__LINE__,"date start periode $l_date_start date fin periode $l_date_end date demande $e_date");
    -00108   if ( cmpDate($e_date,$l_date_start)<0 || 
    -00109        cmpDate($e_date,$l_date_end)>0 )
    -00110     {
    -00111       $msg="Not in the active periode please change your preference";
    -00112       echo_error($msg); echo_error($msg);       
    -00113       echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00114       return null;
    -00115     }
    -00116     // Periode ferm� 
    -00117     if ( PeriodeClosed ($p_cn,$p_periode)=='t' )
    -00118       {
    -00119                 $msg="This periode is closed please change your preference";
    -00120                 echo_error($msg); echo_error($msg);     
    -00121                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00122                 return null;
    -00123       }
    -00124     return true;
    -00125 }
    -00126 
    -00127 
    -00128 /* function FormFin($p_cn,$p_jrn,$p_user,$p_array=null,$pview_only=true,$p_item=1) 
    -00129  * Purpose : Display the form for financial 
    -00130  *           Used to show detail, encode a new fin op 
    -00131  *           or update one
    -00132  *        
    -00133  * parm : 
    -00134  *      - p_array which can be empty
    -00135  *      - the "journal"
    -00136  *      - $p_user = $g_user
    -00137  *      - $p_submit contains the submit string
    -00138  *      - view_only if we cannot change it (no right or centralized op)
    -00139  *      - $p_item number of article
    -00140  * gen :
    -00141  *      -
    -00142  * return: string with the form
    -00143  */
    -00144 function FormFin($p_cn,$p_jrn,$p_periode,$p_submit,$p_array=null,$pview_only=true,$p_item=4,$p_save=false)
    -00145 { 
    -00146   include_once("poste.php");
    -00147   if ( $p_array != null ) {
    -00148     // array contains old value
    -00149     foreach ( $p_array as $a=>$v) {
    -00150       ${"$a"}=$v;
    -00151     }
    -00152   }
    -00153   // The date
    -00154   list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    -00155   $flag=(isset($e_date))?1:0;
    -00156   $e_date=( ! isset($e_date) ) ? substr($l_date_start,2,8):$e_date;
    -00157 
    -00158   // Verify if valid date
    -00159   if ($flag ==1 and   VerifyOperationDate($p_cn,$p_periode,$e_date)   == null) {
    -00160         $e_date=substr($l_date_start,2,8);
    -00161   }
    -00162 
    -00163 
    -00164   $e_comment=(isset($e_comment))?$e_comment:"";
    +00103   }
    +00104 // Verify the userperiode
    +00105 
    +00106 // p_periode contient la periode par default
    +00107   list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    +00108   
    +00109   // Date dans la periode active
    +00110   echo_debug ('user_form_fin',__LINE__,"date start periode $l_date_start date fin periode $l_date_end date demande $e_date");
    +00111   if ( cmpDate($e_date,$l_date_start)<0 || 
    +00112        cmpDate($e_date,$l_date_end)>0 )
    +00113     {
    +00114       $msg="Not in the active periode please change your preference";
    +00115       echo_error($msg); echo_error($msg);       
    +00116       echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00117       return null;
    +00118     }
    +00119     // Periode ferm� 
    +00120     if ( PeriodeClosed ($p_cn,$p_periode)=='t' )
    +00121       {
    +00122                 $msg="This periode is closed please change your preference";
    +00123                 echo_error($msg); echo_error($msg);     
    +00124                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00125                 return null;
    +00126       }
    +00127     return true;
    +00128 }
    +00129 
    +00130 
    +00147 function FormFin($p_cn,$p_jrn,$p_periode,$p_submit,$p_array=null,$pview_only=true,$p_item=4,$p_save=false)
    +00148 { 
    +00149   include_once("poste.php");
    +00150   if ( $p_array != null ) {
    +00151     // array contains old value
    +00152     foreach ( $p_array as $a=>$v) {
    +00153       ${"$a"}=$v;
    +00154     }
    +00155   }
    +00156   // The date
    +00157   list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    +00158   $flag=(isset($e_date))?1:0;
    +00159   $e_date=( ! isset($e_date) ) ? substr($l_date_start,2,8):$e_date;
    +00160 
    +00161   // Verify if valid date
    +00162   if ($flag ==1 and   VerifyOperationDate($p_cn,$p_periode,$e_date)   == null) {
    +00163         $e_date=substr($l_date_start,2,8);
    +00164   }
     00165 
    -00166   $r="";
    -00167   if ( $pview_only == false) {
    -00168     $r.=JS_SEARCH_CARD;
    -00169     $r.=JS_CONCERNED_OP;
    -00170   }
    -00171 
    -00172   $r.="<FORM NAME=\"form_detail\" enctype=\"multipart/form-data\" ACTION=\"user_jrn.php?action=new&p_jrn=$p_jrn\" METHOD=\"POST\">";
    -00173   $r.='<TABLE>';
    -00174   $Date=new widget("text");
    -00175   $Date->SetReadOnly($pview_only);
    -00176   $Date->table=1;
    -00177   $r.="<tr>";
    -00178   $r.=$Date->IOValue("e_date",$e_date,"Date");
    -00179   $r.="</tr>";
    -00180 
    -00181 
    -00182   include_once("fiche_inc.php");
    -00183   $r.='<INPUT TYPE="HIDDEN" name="nb_item" value="'.$p_item.'">';
    +00166 
    +00167   $e_comment=(isset($e_comment))?$e_comment:"";
    +00168 
    +00169   $r="";
    +00170   if ( $pview_only == false) {
    +00171     $r.=JS_SEARCH_CARD;
    +00172     $r.=JS_CONCERNED_OP;
    +00173   }
    +00174 
    +00175   $r.="<FORM NAME=\"form_detail\" enctype=\"multipart/form-data\" ACTION=\"user_jrn.php?action=new&p_jrn=$p_jrn\" METHOD=\"POST\">";
    +00176   $r.='<TABLE>';
    +00177   $Date=new widget("text");
    +00178   $Date->SetReadOnly($pview_only);
    +00179   $Date->table=1;
    +00180   $r.="<tr>";
    +00181   $r.=$Date->IOValue("e_date",$e_date,"Date");
    +00182   $r.="</tr>";
    +00183 
     00184 
    -00185   // bank_account operation
    -00186   // Save old value and set a new one
    -00187   $e_bank_account=( isset ($e_bank_account) )?$e_bank_account:"";
    -00188   $e_bank_account_label="";  
    -00189 
    -00190     // retrieve e_bank_account_label
    -00191   if ( $e_bank_account != ""  ) {
    -00192       $a_client=GetFicheAttribut($p_cn,$e_bank_account);
    -00193       if ( $a_client != null)   
    -00194         $e_bank_account_label=$a_client['vw_name']."  adresse ".$a_client['vw_addr']."  ".$a_client['vw_cp'];
    -00195           }  
    -00196   //  search widget
    -00197     $W1=new widget("js_search");
    -00198     $W1->readonly=$pview_only;
    -00199     $W1->label="Banque";
    -00200     $W1->name="e_bank_account";
    -00201     $W1->value=$e_bank_account;
    -00202     $W1->extra=FICHE_TYPE_FIN;  // credits
    -00203     $W1->extra2=$p_jrn;
    -00204     $r.="<TR>".$W1->IOValue()."</TD>";
    -00205 
    -00206     $r.="</TABLE>";
    -00207   
    -00208     $Span=new widget ("span");
    -00209     $Span->SetReadOnly($pview_only);
    -00210     $r.="<TD>".$Span->IOValue("e_bank_account_label",$e_bank_account_label)."</TD>";
    -00211 
    -00212   
    -00213   // ComputeBanqueSaldo
    -00214   // 
    -00215   if ( $pview_only == true ) {
    -00216     $solde=GetSolde($p_cn,GetFicheAttribut($p_cn,$e_bank_account,ATTR_DEF_ACCOUNT));
    -00217     $r.=" <b> Solde = ".$solde." </b>";
    -00218     $new_solde=$solde;
    -00219   }
    -00220 
    -00221   // Start the div for item to move money
    -00222   $r.="<DIV>";
    -00223   $r.='<H2 class="info">Actions</H2>';
    -00224   $r.='<TABLE>';
    -00225   $r.="<TR>";
    -00226   $r.="<th></TH>";
    -00227   $r.="<th>code</TH>";
    -00228   $r.="<th>D&eacute;nomination</TH>";
    -00229   $r.="<th>Description</TH>";
    -00230   $r.="<th>Montant</TH>";
    -00231   $r.='<th colspan="2"> Op. Concern&eacute;</th>';
    -00232   $r.="</TR>";
    -00233   // Parse each " tiers" 
    -00234     for ($i=0; $i < $p_item; $i++) {
    -00235       $tiers=(isset(${"e_other".$i}))?${"e_other".$i}:"";
    -00236       $tiers_label="";
    -00237       $tiers_amount=(isset(${"e_other$i"."_amount"}))?${"e_other$i"."_amount"}:0;
    -00238   
    -00239       $tiers_comment=(isset (${"e_other$i"."_comment"}))?${"e_other$i"."_comment"}:"";
    -00240     // If $tiers has a value
    -00241     if ( $tiers != ""  ) 
    -00242         {
    -00243                 // retrieve the tva label and name
    -00244                 $a_fiche=GetFicheAttribut($p_cn, $tiers);
    -00245                 if ( $a_fiche != null ) {
    -00246                 $tiers_label=$a_fiche['vw_name'];
    -00247                 }
    -00248         }
    -00249     ${"e_other$i"."_amount"}=(isset (${"e_other$i"."_amount"}))?${"e_other$i"."_amount"}:0;
    -00250 
    -00251     $W1=new widget("js_search");
    -00252     $W1->label="";
    -00253     $W1->name="e_other".$i;
    -00254     $W1->value=$tiers;
    -00255     $W1->extra='cred';  // credits
    -00256     $W1->extra2=$p_jrn;
    -00257     $W1->readonly=$pview_only;
    -00258     $r.="<TR>".$W1->IOValue()."</TD>";
    -00259     // label
    -00260     $other=new widget("span");
    -00261     $r.="<TD>";
    -00262     $r.=$other->IOValue("e_other$i"."_label", $tiers_label);
    -00263     // Comment
    -00264     $wComment=new widget("text");
    -00265     $wComment->table=1;
    -00266     $wComment->SetReadOnly($pview_only);
    -00267     $r.=$wComment->IOValue("e_other$i"."_comment",$tiers_comment);
    -00268     // amount
    -00269     $wAmount=new widget("text");
    -00270     $wAmount->table=1;
    -00271     $wAmount->size=7;
    -00272     $wAmount->SetReadOnly($pview_only);
    -00273     $r.=$wAmount->IOValue("e_other$i"."_amount",$tiers_amount);
    -00274     // concerned
    -00275     ${"e_concerned".$i}=(isset(${"e_concerned".$i}))?${"e_concerned".$i}:"";
    -00276     $wConcerned=new widget("js_concerned");
    -00277     $wConcerned->SetReadOnly($pview_only);
    -00278     $r.=$wConcerned->IOValue("e_concerned".$i,${"e_concerned".$i});
    -00279     $r.='</TR>';
    -00280    // if not recorded the new amount must be recalculate
    -00281    // if recorded the old amount is recalculated
    -00282     if ( $pview_only == true)      
    -00283       $new_solde=($p_save==false)?$new_solde+$tiers_amount:$new_solde-$tiers_amount;
    -00284  }
    -00285 
    -00286 $r.="</TABLE>";
    -00287 
    -00288  if ( $pview_only==true && $p_save==false) {
    -00289    // check for upload piece
    -00290    $file=new widget("file");
    -00291    $file->table=1;
    -00292    $r.="<hr>";
    -00293    $r.= "<table>"; 
    -00294    $r.="<TR>".$file->IOValue("pj","","Pi&egrave;ce justificative")."</TR>";
    -00295    $r.="</table>";
    -00296    $r.="<hr>";
    -00297  }
    -00298  // Set correctly the REQUEST param for jrn_type 
    -00299  $h=new widget('hidden');
    -00300  $h->name='jrn_type';
    -00301  $h->value=$_REQUEST['jrn_type'];
    -00302  $r.=$h->IOValue();
    -00303 
    -00304 $r.=$p_submit;
    -00305 $r.="</DIV>";
    -00306 $r.="</FORM>";
    -00307 
    -00308 // if view_only is true
    -00309 //Put the new saldo here (old saldo - operation)
    -00310  if ( $pview_only==true)  {
    -00311    // if not recorded the new amount must be recalculate
    -00312    if ( $p_save == false) {
    -00313      $r.=" <b> Ancien Solde = ".$solde." </b><br>";
    -00314      $r.=" <b> Nouveau Solde = ".$new_solde." </b><br>";
    -00315    }
    -00316    // if recorded the old amount is recalculated
    -00317    if ($p_save == true ) {
    -00318      $r.=" <b> Ancien Solde = ".$new_solde." </b><br>";
    -00319      $r.=" <b> Nouveau Solde = ".$solde." </b><br>";
    -00320    }
    -00321  }
    -00322  
    -00323 return $r;
    -00324 
    -00325 
    -00326 }
    +00185   include_once("fiche_inc.php");
    +00186   $r.='<INPUT TYPE="HIDDEN" name="nb_item" value="'.$p_item.'">';
    +00187 
    +00188   // bank_account operation
    +00189   // Save old value and set a new one
    +00190   $e_bank_account=( isset ($e_bank_account) )?$e_bank_account:"";
    +00191   $e_bank_account_label="";  
    +00192 
    +00193     // retrieve e_bank_account_label
    +00194   if ( $e_bank_account != ""  ) {
    +00195       $a_client=GetFicheAttribut($p_cn,$e_bank_account);
    +00196       if ( $a_client != null)   
    +00197         $e_bank_account_label=$a_client['vw_name']."  adresse ".$a_client['vw_addr']."  ".$a_client['vw_cp'];
    +00198           }  
    +00199   //  search widget
    +00200     $W1=new widget("js_search");
    +00201     $W1->readonly=$pview_only;
    +00202     $W1->label="Banque";
    +00203     $W1->name="e_bank_account";
    +00204     $W1->value=$e_bank_account;
    +00205     $W1->extra=FICHE_TYPE_FIN;  // credits
    +00206     $W1->extra2=$p_jrn;
    +00207     $r.="<TR>".$W1->IOValue()."</TD>";
    +00208 
    +00209     $r.="</TABLE>";
    +00210   
    +00211     $Span=new widget ("span");
    +00212     $Span->SetReadOnly($pview_only);
    +00213     $r.="<TD>".$Span->IOValue("e_bank_account_label",$e_bank_account_label)."</TD>";
    +00214 
    +00215   
    +00216   // ComputeBanqueSaldo
    +00217   // 
    +00218   if ( $pview_only == true ) {
    +00219     $solde=GetSolde($p_cn,GetFicheAttribut($p_cn,$e_bank_account,ATTR_DEF_ACCOUNT));
    +00220     $r.=" <b> Solde = ".$solde." </b>";
    +00221     $new_solde=$solde;
    +00222   }
    +00223 
    +00224   // Start the div for item to move money
    +00225   $r.="<DIV>";
    +00226   $r.='<H2 class="info">Actions</H2>';
    +00227   $r.='<TABLE>';
    +00228   $r.="<TR>";
    +00229   $r.="<th></TH>";
    +00230   $r.="<th>code</TH>";
    +00231   $r.="<th>D&eacute;nomination</TH>";
    +00232   $r.="<th>Description</TH>";
    +00233   $r.="<th>Montant</TH>";
    +00234   $r.='<th colspan="2"> Op. Concern&eacute;</th>';
    +00235   $r.="</TR>";
    +00236   // Parse each " tiers" 
    +00237     for ($i=0; $i < $p_item; $i++) {
    +00238       $tiers=(isset(${"e_other".$i}))?${"e_other".$i}:"";
    +00239       $tiers_label="";
    +00240       $tiers_amount=(isset(${"e_other$i"."_amount"}))?${"e_other$i"."_amount"}:0;
    +00241   
    +00242       $tiers_comment=(isset (${"e_other$i"."_comment"}))?${"e_other$i"."_comment"}:"";
    +00243     // If $tiers has a value
    +00244     if ( $tiers != ""  ) 
    +00245         {
    +00246                 // retrieve the tva label and name
    +00247                 $a_fiche=GetFicheAttribut($p_cn, $tiers);
    +00248                 if ( $a_fiche != null ) {
    +00249                 $tiers_label=$a_fiche['vw_name'];
    +00250                 }
    +00251         }
    +00252     ${"e_other$i"."_amount"}=(isset (${"e_other$i"."_amount"}))?${"e_other$i"."_amount"}:0;
    +00253 
    +00254     $W1=new widget("js_search");
    +00255     $W1->label="";
    +00256     $W1->name="e_other".$i;
    +00257     $W1->value=$tiers;
    +00258     $W1->extra='cred';  // credits
    +00259     $W1->extra2=$p_jrn;
    +00260     $W1->readonly=$pview_only;
    +00261     $r.="<TR>".$W1->IOValue()."</TD>";
    +00262     // label
    +00263     $other=new widget("span");
    +00264     $r.="<TD>";
    +00265     $r.=$other->IOValue("e_other$i"."_label", $tiers_label);
    +00266     // Comment
    +00267     $wComment=new widget("text");
    +00268     $wComment->table=1;
    +00269     $wComment->SetReadOnly($pview_only);
    +00270     $r.=$wComment->IOValue("e_other$i"."_comment",$tiers_comment);
    +00271     // amount
    +00272     $wAmount=new widget("text");
    +00273     $wAmount->table=1;
    +00274     $wAmount->size=7;
    +00275     $wAmount->SetReadOnly($pview_only);
    +00276     $r.=$wAmount->IOValue("e_other$i"."_amount",$tiers_amount);
    +00277     // concerned
    +00278     ${"e_concerned".$i}=(isset(${"e_concerned".$i}))?${"e_concerned".$i}:"";
    +00279     $wConcerned=new widget("js_concerned");
    +00280     $wConcerned->SetReadOnly($pview_only);
    +00281     $r.=$wConcerned->IOValue("e_concerned".$i,${"e_concerned".$i});
    +00282     $r.='</TR>';
    +00283    // if not recorded the new amount must be recalculate
    +00284    // if recorded the old amount is recalculated
    +00285     if ( $pview_only == true)      
    +00286       $new_solde=($p_save==false)?$new_solde+$tiers_amount:$new_solde-$tiers_amount;
    +00287  }
    +00288 
    +00289 $r.="</TABLE>";
    +00290 
    +00291  if ( $pview_only==true && $p_save==false) {
    +00292    // check for upload piece
    +00293    $file=new widget("file");
    +00294    $file->table=1;
    +00295    $r.="<hr>";
    +00296    $r.= "<table>"; 
    +00297    $r.="<TR>".$file->IOValue("pj","","Pi&egrave;ce justificative")."</TR>";
    +00298    $r.="</table>";
    +00299    $r.="<hr>";
    +00300  }
    +00301  // Set correctly the REQUEST param for jrn_type 
    +00302  $h=new widget('hidden');
    +00303  $h->name='jrn_type';
    +00304  $h->value=$_REQUEST['jrn_type'];
    +00305  $r.=$h->IOValue();
    +00306 
    +00307 $r.=$p_submit;
    +00308 $r.="</DIV>";
    +00309 $r.="</FORM>";
    +00310 
    +00311 // if view_only is true
    +00312 //Put the new saldo here (old saldo - operation)
    +00313  if ( $pview_only==true)  {
    +00314    // if not recorded the new amount must be recalculate
    +00315    if ( $p_save == false) {
    +00316      $r.=" <b> Ancien Solde = ".$solde." </b><br>";
    +00317      $r.=" <b> Nouveau Solde = ".$new_solde." </b><br>";
    +00318    }
    +00319    // if recorded the old amount is recalculated
    +00320    if ($p_save == true ) {
    +00321      $r.=" <b> Ancien Solde = ".$new_solde." </b><br>";
    +00322      $r.=" <b> Nouveau Solde = ".$solde." </b><br>";
    +00323    }
    +00324  }
    +00325  
    +00326 return $r;
     00327 
    -00328 /* function RecordFin
    -00329  **************************************************
    -00330  * Purpose : Record an invoice in the table jrn &
    -00331  *           jrnx
    -00332  *        
    -00333  * parm : 
    -00334  *      - $p_cn Database connection
    -00335  *  - $p_array contains all the invoice data
    -00336  * e_date => e : 01.01.2003
    -00337  * e_bank_account => e : 3
    -00338  *  - $p_user userid
    -00339  *  - $p_jrn current folder (journal)
    -00340  *  - array e_other$i, e_other$i_amount, e_other$i_label
    -00341  * gen : 
    -00342  *      - none
    -00343  * return:
    -00344  *            true on success
    -00345  */
    -00346 function RecordFin($p_cn,$p_array,$p_user,$p_jrn) {
    -00347   echo_debug('user_form_fin.php',__LINE__,"RecordFin");
    -00348   foreach ( $p_array as $v => $e)
    -00349   {
    -00350     ${"$v"}=$e;
    -00351   }
    -00352   // Get the default period
    -00353   $periode=$p_user->GetPeriode();
    -00354 
    -00355   // Test if the data are correct
    -00356   // Verify the date
    -00357   if ( isDate($e_date) == null ) { 
    -00358           echo_error("Invalid date $e_date");
    -00359           echo_debug('user_form_fin.php',__LINE__,"Invalid date $e_date");
    -00360           echo "<SCRIPT> alert('INVALID DATE $e_date !!!!');</SCRIPT>";
    -00361           return null;
    -00362                 }
    -00363   
    -00364   // Debit = banque
    -00365   $poste_bq=GetFicheAttribut($p_cn,$e_bank_account,ATTR_DEF_ACCOUNT);
    -00366   StartSql($p_cn);
    -00367   $amount=0.0;  
    -00368   // Credit = goods 
    -00369   for ( $i = 0; $i < $nb_item;$i++) {
    -00370     // if tiers is set and amount != 0 insert it into the database 
    -00371     // and quit the loop ?
    -00372     if ( ${"e_other$i"."_amount"} == 0 ) continue;
    -00373     $poste=GetFicheAttribut($p_cn,${"e_other$i"},ATTR_DEF_ACCOUNT);
    -00374 
    -00375     $amount+=${"e_other$i"."_amount"};
    -00376     // Record a line for the bank
    +00328 
    +00329 }
    +00330 
    +00349 function RecordFin($p_cn,$p_array,$p_user,$p_jrn) {
    +00350   echo_debug('user_form_fin.php',__LINE__,"RecordFin");
    +00351   foreach ( $p_array as $v => $e)
    +00352   {
    +00353     ${"$v"}=$e;
    +00354   }
    +00355   // Get the default period
    +00356   $periode=$p_user->GetPeriode();
    +00357 
    +00358   // Test if the data are correct
    +00359   // Verify the date
    +00360   if ( isDate($e_date) == null ) { 
    +00361           echo_error("Invalid date $e_date");
    +00362           echo_debug('user_form_fin.php',__LINE__,"Invalid date $e_date");
    +00363           echo "<SCRIPT> alert('INVALID DATE $e_date !!!!');</SCRIPT>";
    +00364           return null;
    +00365                 }
    +00366   
    +00367   // Debit = banque
    +00368   $poste_bq=GetFicheAttribut($p_cn,$e_bank_account,ATTR_DEF_ACCOUNT);
    +00369   StartSql($p_cn);
    +00370   $amount=0.0;  
    +00371   // Credit = goods 
    +00372   for ( $i = 0; $i < $nb_item;$i++) {
    +00373     // if tiers is set and amount != 0 insert it into the database 
    +00374     // and quit the loop ?
    +00375     if ( ${"e_other$i"."_amount"} == 0 ) continue;
    +00376     $poste=GetFicheAttribut($p_cn,${"e_other$i"},ATTR_DEF_ACCOUNT);
     00377 
    -00378     // Compute the j_grpt
    -00379     $seq=NextSequence($p_cn,'s_grpt');
    +00378     $amount+=${"e_other$i"."_amount"};
    +00379     // Record a line for the bank
     00380 
    -00381     if ( InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste_bq,$e_date,round(${"e_other$i"."_amount"},2),$seq,$periode) == false ) {
    -00382       $Rollback($p_cn);exit("error 'user_form_fin.php' __LINE__");
    -00383     }
    -00384 
    -00385 
    -00386     // Record a line for the other account
    -00387     if ( ($j_id=InsertJrnx($p_cn,'c',$p_user->id,$p_jrn,$poste,$e_date,round(${"e_other$i"."_amount"},2),$seq,$periode)) == false )
    -00388       { $Rollback($p_cn);exit("error 'user_form_fin.php' __LINE__");}
    -00389 
    -00390     echo_debug('user_form_fin.php',__LINE__,"   $j_id=InsertJrnx($p_cn,'d',$p_user,$p_jrn,$poste,$e_date,".${"e_other$i"}."_amount".",$seq,$periode);");
    -00391 
    -00392     if ( ($jr_id=InsertJrn($p_cn,$e_date,'',$p_jrn,FormatString(${"e_other$i"."_comment"}),
    -00393                            round(${"e_other$i"."_amount"},2),$seq,$periode))==false) {
    -00394       $Rollback($p_cn);exit("error 'user_form_fin.php' __LINE__");}
    -00395   
    -00396     if ( isNumber(${"e_concerned".$i}) == 1 ) {
    -00397 
    -00398       InsertRapt($p_cn,$jr_id,${"e_concerned$i"});
    -00399     }
    +00381     // Compute the j_grpt
    +00382     $seq=NextSequence($p_cn,'s_grpt');
    +00383 
    +00384     if ( InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste_bq,$e_date,round(${"e_other$i"."_amount"},2),$seq,$periode) == false ) {
    +00385       $Rollback($p_cn);exit("error 'user_form_fin.php' __LINE__");
    +00386     }
    +00387 
    +00388 
    +00389     // Record a line for the other account
    +00390     if ( ($j_id=InsertJrnx($p_cn,'c',$p_user->id,$p_jrn,$poste,$e_date,round(${"e_other$i"."_amount"},2),$seq,$periode)) == false )
    +00391       { $Rollback($p_cn);exit("error 'user_form_fin.php' __LINE__");}
    +00392 
    +00393     echo_debug('user_form_fin.php',__LINE__,"   $j_id=InsertJrnx($p_cn,'d',$p_user,$p_jrn,$poste,$e_date,".${"e_other$i"}."_amount".",$seq,$periode);");
    +00394 
    +00395     if ( ($jr_id=InsertJrn($p_cn,$e_date,'',$p_jrn,FormatString(${"e_other$i"."_comment"}),
    +00396                            round(${"e_other$i"."_amount"},2),$seq,$periode))==false) {
    +00397       $Rollback($p_cn);exit("error 'user_form_fin.php' __LINE__");}
    +00398   
    +00399     if ( isNumber(${"e_concerned".$i}) == 1 ) {
     00400 
    -00401 
    -00402   // Set Internal code and Comment
    -00403     $internal_code=SetInternalCode($p_cn,$seq,$p_jrn);
    -00404     $comment=$internal_code."  client : ".GetFicheName($p_cn,$e_bank_account);
    -00405     if ( FormatString(${"e_other$i"."_comment"}) == null ) {
    -00406       // Update comment if comment is blank
    -00407       $Res=ExecSql($p_cn,"update jrn set jr_comment='".$comment."' where jr_grpt_id=".$seq);
    -00408     }
    -00409     
    -00410   } // for nbitem
    -00411   if ( isset ($_FILES))
    -00412     save_upload_document($p_cn,$seq);
    -00413 
    -00414   Commit($p_cn);
    -00415 }
    -00416 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00401 InsertRapt($p_cn,$jr_id,${"e_concerned$i"}); +00402 } +00403 +00404 +00405 // Set Internal code and Comment +00406 $internal_code=SetInternalCode($p_cn,$seq,$p_jrn); +00407 $comment=$internal_code." client : ".GetFicheName($p_cn,$e_bank_account); +00408 if ( FormatString(${"e_other$i"."_comment"}) == null ) { +00409 // Update comment if comment is blank +00410 $Res=ExecSql($p_cn,"update jrn set jr_comment='".$comment."' where jr_grpt_id=".$seq); +00411 } +00412 +00413 } // for nbitem +00414 if ( isset ($_FILES)) +00415 save_upload_document($p_cn,$seq); +00416 +00417 Commit($p_cn); +00418 } +00419 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__form__fin_8php.html b/doc/developper/html/user__form__fin_8php.html index 89ffdf22b..fc48ff985 100644 --- a/doc/developper/html/user__form__fin_8php.html +++ b/doc/developper/html/user__form__fin_8php.html @@ -4,10 +4,12 @@ - + -

    user_form_fin.php File Reference

    +

    user_form_fin.php File Reference

    Functions for the financial ledger. More... +

    +

    Go to the source code of this file. @@ -19,7 +21,12 @@
     RecordFin ($p_cn, $p_array, $p_user, $p_jrn)
    -


    Function Documentation

    +

    Detailed Description

    +Functions for the financial ledger. +

    + +

    +Definition in file user_form_fin.php.


    Function Documentation

    @@ -72,11 +79,20 @@ +References $poste, echo_debug(), echo_error(), isDate(), IsFicheOfJrn(), isNumber(), and name.

    +form_verify_input

    +verify if the data to insert are valid

    +parm :

      +
    • p_cn database connection
    +

    +p_jrn concerned ledger

      +
    • User periode
    • array with the post data
    • p_number number of items gen :
        +
      • return:
      +

    -Definition at line 40 of file user_form_fin.php. +Definition at line 43 of file user_form_fin.php.

    -References $poste, echo_debug(), echo_error(), isDate(), IsFicheOfJrn(), isNumber(), and name.

    @@ -149,11 +165,19 @@ References $poste<

    +FormFin($p_cn,$p_jrn,$p_user,$p_array=null,$pview_only=true,$p_item=1) Display the form for financial Used to show detail, encode a new fin op or update one

    +parm :

    +

    +the "journal"

      +
    • $p_user = $g_user
    • $p_submit contains the submit string
    • view_only if we cannot change it (no right or centralized op)
    • $p_item number of article gen :
        +
      • return: string with the form
      +

    -Definition at line 144 of file user_form_fin.php. +Definition at line 147 of file user_form_fin.php.

    -References $file, $flag, $h, $p_jrn, $r, $solde, eacute, GetPeriode(), GetSolde(), name, value, and VerifyOperationDate(). +References $file, $flag, $h, $p_jrn, $r, $solde, GetPeriode(), GetSolde(), name, value, and VerifyOperationDate().

    @@ -202,14 +226,23 @@ References $file

    +RecordFin

    +Record an invoice in the table jrn & jrnx

    +parm :

      +
    • $p_cn Database connection
    +

    +$p_array contains all the invoice data e_date => e : 01.01.2003 e_bank_account => e : 3

      +
    • $p_user userid
    • $p_jrn current folder (journal)
    • array e_other$i, e_other$i_amount, e_other$i_label gen :
        +
      • none return: true on success
      +

    -Definition at line 346 of file user_form_fin.php. +Definition at line 349 of file user_form_fin.php.

    -References $amount, $e, $poste, $seq, echo_debug(), echo_error(), ExecSql(), exit, FormatString(), InsertJrn(), InsertJrnx(), InsertRapt(), isDate(), isNumber(), NextSequence(), Rollback(), SetInternalCode(), and StartSql(). +References $amount, $e, $poste, $seq, echo_debug(), echo_error(), ExecSql(), exit, FormatString(), InsertJrn(), InsertJrnx(), InsertRapt(), isDate(), isNumber(), NextSequence(), Rollback(), SetInternalCode(), and StartSql(). -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__form__ods_8php-source.html b/doc/developper/html/user__form__ods_8php-source.html index 4a52c81c5..af8237a46 100644 --- a/doc/developper/html/user__form__ods_8php-source.html +++ b/doc/developper/html/user__form__ods_8php-source.html @@ -4,7 +4,7 @@ - +

    user_form_ods.php

    Go to the documentation of this file.
    00001 <?
    @@ -32,274 +32,238 @@
     00023 require_once("preference.php");
     00024 require_once("fiche_inc.php");
     00025 require_once("user_common.php");
    -00026 
    -00027 /* function FormODS($p_cn,$p_jrn,$p_user,$p_array=null,$pview_only=true,$p_article=1)
    -00028  * Purpose : Display the miscellaneous operation
    -00029  *           Used to show detail, encode a new oper
    -00030  *           or update one
    -00031  *        
    -00032  * parm : 
    -00033  *      - p_array which can be empty
    -00034  *      - the "journal"
    -00035  *      - $p_user = $g_user
    -00036  *      - $p_submit contains the submit string
    -00037  *      - view_only if we cannot change it (no right or centralized op)
    -00038  *      - $p_article number of article
    -00039  * gen :
    -00040  *      -
    -00041  * return: string with the form
    -00042  */
    -00043 function FormODS($p_cn,$p_jrn,$p_periode,$p_submit,$p_array=null,$pview_only=true,$p_article=6,$p_saved=false)
    -00044 { 
    -00045    include_once("poste.php");
    -00046   if ( $p_array != null ) {
    -00047     // array contains old value
    -00048     foreach ( $p_array as $a=>$v) {
    -00049       ${"$a"}=$v;
    -00050     }
    -00051   }
    -00052   // The date
    -00053    list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    -00054    $flag=(isset($e_date))?1:0;
    -00055    $e_date=( ! isset($e_date) ) ? substr($l_date_start,2,8):$e_date;
    -00056 
    -00057   // Verify if valid date
    -00058   if (  $flag==1 and VerifyOperationDate($p_cn,$p_periode,$e_date)   == null) {
    -00059     if ( $pview_only == true) 
    -00060       return null;
    -00061     else 
    -00062       $e_date=substr($l_date_start,2,8);
    -00063   }    
    -00064   
    -00065   $e_comm=(isset($e_comm))?$e_comm:"";
    -00066   // Save old value and set a new one
    -00067 
    -00068   $r="";
    -00069   if ( $pview_only == false) {
    -00070     $r.=JS_SEARCH_POSTE;
    -00071   }
    -00072   $r.="<FORM NAME=\"form_detail\" enctype=\"multipart/form-data\" ACTION=\"user_jrn.php?action=new&p_jrn=$p_jrn\" METHOD=\"POST\">";
    -00073   $r.='<TABLE>';
    -00074   // Date
    -00075   $wDate=new widget('text');
    -00076   $wDate->SetReadOnly($pview_only);
    -00077   $wDate->table=1;
    -00078   $r.="<TR>".$wDate->IOValue("e_date",$e_date,'Date')."</TR>";
    -00079 
    -00080   // Description
    -00081   $Commentaire=new widget("text");
    -00082   $Commentaire->table=1;
    -00083   $Commentaire->SetReadOnly($pview_only);
    -00084   $Commentaire->size=80;
    -00085   $r.="<tr>";
    -00086   $r.=$Commentaire->IOValue("e_comm",$e_comm,"Description");
    -00087   $r.="</tr>";
    -00088 
    -00089   include_once("fiche_inc.php");
    +00045 function FormODS($p_cn,$p_jrn,$p_periode,$p_submit,$p_array=null,$pview_only=true,$p_article=6,$p_saved=false)
    +00046 { 
    +00047    include_once("poste.php");
    +00048   if ( $p_array != null ) {
    +00049     // array contains old value
    +00050     foreach ( $p_array as $a=>$v) {
    +00051       ${"$a"}=$v;
    +00052     }
    +00053   }
    +00054   // The date
    +00055    list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    +00056    $flag=(isset($e_date))?1:0;
    +00057    $e_date=( ! isset($e_date) ) ? substr($l_date_start,2,8):$e_date;
    +00058 
    +00059   // Verify if valid date
    +00060   if (  $flag==1 and VerifyOperationDate($p_cn,$p_periode,$e_date)   == null) {
    +00061     if ( $pview_only == true) 
    +00062       return null;
    +00063     else 
    +00064       $e_date=substr($l_date_start,2,8);
    +00065   }    
    +00066   
    +00067   $e_comm=(isset($e_comm))?$e_comm:"";
    +00068   // Save old value and set a new one
    +00069 
    +00070   $r="";
    +00071   if ( $pview_only == false) {
    +00072     $r.=JS_SEARCH_POSTE;
    +00073   }
    +00074   $r.="<FORM NAME=\"form_detail\" enctype=\"multipart/form-data\" ACTION=\"user_jrn.php?action=new&p_jrn=$p_jrn\" METHOD=\"POST\">";
    +00075   $r.='<TABLE>';
    +00076   // Date
    +00077   $wDate=new widget('text');
    +00078   $wDate->SetReadOnly($pview_only);
    +00079   $wDate->table=1;
    +00080   $r.="<TR>".$wDate->IOValue("e_date",$e_date,'Date')."</TR>";
    +00081 
    +00082   // Description
    +00083   $Commentaire=new widget("text");
    +00084   $Commentaire->table=1;
    +00085   $Commentaire->SetReadOnly($pview_only);
    +00086   $Commentaire->size=80;
    +00087   $r.="<tr>";
    +00088   $r.=$Commentaire->IOValue("e_comm",$e_comm,"Description");
    +00089   $r.="</tr>";
     00090 
    -00091   // Record the current number of article
    -00092   $r.='<INPUT TYPE="HIDDEN" name="nb_item" value="'.$p_article.'">';
    -00093   $e_comment=(isset($e_comment))?$e_comment:"";
    -00094 
    -00095 
    -00096   // Start the div for item to encode
    -00097   $r.="<DIV>";
    -00098   $r.='<H2 class="info">Op&eacute;rations Diverses</H2>';
    -00099   $r.='<TABLE border="0">';
    -00100   $r.="<tr>";
    -00101   $r.="<th></th>";
    -00102   $r.="<th>Compte</th>";
    -00103   $r.="<th>Poste</th>";
    -00104   $r.="<th>Montant</th>";
    -00105   $r.="<th>Cr&eacute;dit ou d&eacute;dit</th>";
    -00106   $r.="</tr>";
    -00107   $sum_deb=0.0;
    -00108   $sum_cred=0.0;
    -00109 
    -00110   // for each good
    -00111   for ($i=0;$i< $p_article;$i++) {
    -00112 
    -00113     $account=(isset(${"e_account$i"}))?${"e_account$i"}:"";
    +00091   include_once("fiche_inc.php");
    +00092 
    +00093   // Record the current number of article
    +00094   $r.='<INPUT TYPE="HIDDEN" name="nb_item" value="'.$p_article.'">';
    +00095   $e_comment=(isset($e_comment))?$e_comment:"";
    +00096 
    +00097 
    +00098   // Start the div for item to encode
    +00099   $r.="<DIV>";
    +00100   $r.='<H2 class="info">Op&eacute;rations Diverses</H2>';
    +00101   $r.='<TABLE border="0">';
    +00102   $r.="<tr>";
    +00103   $r.="<th></th>";
    +00104   $r.="<th>Compte</th>";
    +00105   $r.="<th>Poste</th>";
    +00106   $r.="<th>Montant</th>";
    +00107   $r.="<th>Cr&eacute;dit ou d&eacute;dit</th>";
    +00108   $r.="</tr>";
    +00109   $sum_deb=0.0;
    +00110   $sum_cred=0.0;
    +00111 
    +00112   // for each good
    +00113   for ($i=0;$i< $p_article;$i++) {
     00114 
    -00115     $lib="";
    -00116     // If $account has a value
    -00117     if ( isNumber($account) == 1 ) {
    -00118       if ( CountSql($p_cn,"select * from tmp_pcmn where pcm_val=$account") == 0 ) {
    -00119         $msg="Poste comptable inexistant !!! ";
    -00120         echo_error($msg); echo_error($msg);
    -00121         echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00122         $account="";
    -00123         if ( $pview_only == true ) return null;
    -00124       } else {
    -00125         // retrieve the tva label and name
    -00126         $lib=GetPosteLibelle($p_cn, $account,1);
    -00127       }
    -00128     }
    -00129 
    -00130     ${"e_account$i"."_amount"}=(isset(${"e_account$i"."_amount"}))?${"e_account$i"."_amount"}:0;
    -00131     if ( isNumber(${"e_account$i"."_amount"}) == 0 ) {
    -00132       if ( $pview_only==true) {
    -00133         $msg="Montant invalide !!! ";
    -00134         echo_error($msg); echo_error($msg);
    -00135         echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00136         return null;
    -00137       }
    -00138         ${"e_account$i"."_amount"}=0;
    -00139     }
    -00140     // code
    -00141     // Do we need a filter ?
    -00142     $l_line=GetJrnProperty($p_cn,$p_jrn);
    -00143     if(  strlen(trim ($l_line['jrn_def_class_cred']) ) > 0 or
    -00144          strlen(trim ($l_line['jrn_def_class_deb']) ) > 0 ) {
    -00145       $filter=1;
    -00146     }
    -00147     else
    -00148       $filter=null;
    -00149     $W = new widget('js_search_poste');
    -00150     $W->readonly=$pview_only;
    -00151     $W->label="";
    -00152     $W->extra=$p_jrn;
    -00153     $W->extra2=$filter;
    -00154     //    $r.='<TR>'.InputType("","js_search_poste","e_account".$i,$account,$pview_only,$filter);
    -00155     $r.="<TR>".$W->IOValue("e_account".$i, $account); 
    -00156     //libelle
    -00157     $r.="<td> $lib </td>";
    -00158     //amount
    -00159     $wAmount=new widget("text");
    -00160     $wAmount->table=1;
    -00161     $wAmount->SetReadOnly($pview_only);
    -00162     $r.=$wAmount->IOValue("e_account".$i."_amount",${"e_account$i"."_amount"});
    -00163 
    -00164 
    -00165     // Type is debit or credit, retrieve the old values
    -00166     ${"e_account$i"."_type"}=(isset (${"e_account$i"."_type"}))?${"e_account$i"."_type"}:'d';
    -00167     $c_check=( ${"e_account$i"."_type"} == 'c')?"CHECKED":"";
    -00168     $d_check=( ${"e_account$i"."_type"} == 'd' )?"CHECKED":"";
    -00169     $r.='<td>';
    -00170     if ( $pview_only == false ) {
    -00171       $r.='  <input type="radio" name="'."e_account"."$i"."_type".'" value="d" '.$d_check.'> D&eacute;bit ou ';
    -00172       $r.='  <input type="radio" name="'."e_account"."$i"."_type".'" value="c" '.$c_check.'> Cr&eacute;dit ';
    -00173     }else {
    -00174       $r.=(${"e_account$i"."_type"} == 'c' )?"Cr&eacute;dit":"D&eacute;dit";
    -00175       $r.='<input type="hidden" name="e_account'.$i.'_type" value="'.${"e_account$i"."_type"}.'">';
    -00176     }
    -00177     $r.='</td>';
    -00178     $r.='</TR>';
    -00179     $sum_deb+=(${"e_account$i"."_type"}=='d')?${"e_account$i"."_amount"}:0;
    -00180     $sum_cred+=(${"e_account$i"."_type"}=='c')?${"e_account$i"."_amount"}:0;
    -00181   } // End for 
    -00182 
    -00183   $r.="</TABLE>";
    +00115     $account=(isset(${"e_account$i"}))?${"e_account$i"}:"";
    +00116 
    +00117     $lib="";
    +00118     // If $account has a value
    +00119     if ( isNumber($account) == 1 ) {
    +00120       if ( CountSql($p_cn,"select * from tmp_pcmn where pcm_val=$account") == 0 ) {
    +00121         $msg="Poste comptable inexistant !!! ";
    +00122         echo_error($msg); echo_error($msg);
    +00123         echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00124         $account="";
    +00125         if ( $pview_only == true ) return null;
    +00126       } else {
    +00127         // retrieve the tva label and name
    +00128         $lib=GetPosteLibelle($p_cn, $account,1);
    +00129       }
    +00130     }
    +00131 
    +00132     ${"e_account$i"."_amount"}=(isset(${"e_account$i"."_amount"}))?${"e_account$i"."_amount"}:0;
    +00133     if ( isNumber(${"e_account$i"."_amount"}) == 0 ) {
    +00134       if ( $pview_only==true) {
    +00135         $msg="Montant invalide !!! ";
    +00136         echo_error($msg); echo_error($msg);
    +00137         echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00138         return null;
    +00139       }
    +00140         ${"e_account$i"."_amount"}=0;
    +00141     }
    +00142     // code
    +00143     // Do we need a filter ?
    +00144     $l_line=GetJrnProperty($p_cn,$p_jrn);
    +00145     if(  strlen(trim ($l_line['jrn_def_class_cred']) ) > 0 or
    +00146          strlen(trim ($l_line['jrn_def_class_deb']) ) > 0 ) {
    +00147       $filter=1;
    +00148     }
    +00149     else
    +00150       $filter=null;
    +00151     $W = new widget('js_search_poste');
    +00152     $W->readonly=$pview_only;
    +00153     $W->label="";
    +00154     $W->extra=$p_jrn;
    +00155     $W->extra2=$filter;
    +00156     //    $r.='<TR>'.InputType("","js_search_poste","e_account".$i,$account,$pview_only,$filter);
    +00157     $r.="<TR>".$W->IOValue("e_account".$i, $account); 
    +00158     //libelle
    +00159     $r.="<td> $lib </td>";
    +00160     //amount
    +00161     $wAmount=new widget("text");
    +00162     $wAmount->table=1;
    +00163     $wAmount->SetReadOnly($pview_only);
    +00164     $r.=$wAmount->IOValue("e_account".$i."_amount",${"e_account$i"."_amount"});
    +00165 
    +00166 
    +00167     // Type is debit or credit, retrieve the old values
    +00168     ${"e_account$i"."_type"}=(isset (${"e_account$i"."_type"}))?${"e_account$i"."_type"}:'d';
    +00169     $c_check=( ${"e_account$i"."_type"} == 'c')?"CHECKED":"";
    +00170     $d_check=( ${"e_account$i"."_type"} == 'd' )?"CHECKED":"";
    +00171     $r.='<td>';
    +00172     if ( $pview_only == false ) {
    +00173       $r.='  <input type="radio" name="'."e_account"."$i"."_type".'" value="d" '.$d_check.'> D&eacute;bit ou ';
    +00174       $r.='  <input type="radio" name="'."e_account"."$i"."_type".'" value="c" '.$c_check.'> Cr&eacute;dit ';
    +00175     }else {
    +00176       $r.=(${"e_account$i"."_type"} == 'c' )?"Cr&eacute;dit":"D&eacute;dit";
    +00177       $r.='<input type="hidden" name="e_account'.$i.'_type" value="'.${"e_account$i"."_type"}.'">';
    +00178     }
    +00179     $r.='</td>';
    +00180     $r.='</TR>';
    +00181     $sum_deb+=(${"e_account$i"."_type"}=='d')?${"e_account$i"."_amount"}:0;
    +00182     $sum_cred+=(${"e_account$i"."_type"}=='c')?${"e_account$i"."_amount"}:0;
    +00183   } // End for 
     00184 
    -00185  if ( $pview_only==true && $p_saved==false) {
    -00186 // check for upload piece
    -00187    $file=new widget("file");
    -00188    $file->table=1;
    -00189    $r.="<hr>";
    -00190    $r.= "<table>"; 
    -00191    $r.="<TR>".$file->IOValue("pj","","Pi&egrave;ce justificative")."</TR>";
    -00192    $r.="</table>";
    -00193    $r.="<hr>";
    -00194  }
    -00195   // Set correctly the REQUEST param for jrn_type 
    -00196   $h=new widget('hidden');
    -00197   $h->name='jrn_type';
    -00198   $h->value=$_REQUEST['jrn_type'];
    -00199   $r.=$h->IOValue();
    -00200 
    -00201   $r.=$p_submit;
    -00202   //  $r.="</DIV>";
    -00203   $r.="</FORM>";
    -00204   //TODO if view only show total
    -00205   $tmp= abs($sum_deb-$sum_cred);
    -00206   echo_debug('user_form_ods.php',__LINE__,"Diff = ".$tmp);
    -00207   if ( abs($sum_deb-$sum_cred) > 0.0001  and $pview_only==true) {
    -00208     $msg=sprintf("Montant non correspondant credit = %.5f debit = %.5f diff = %.5f",
    -00209                  $sum_cred,$sum_deb,$sum_cred-$sum_deb);
    -00210     echo "<script> alert('$msg'); </script>";
    -00211     return null;
    -00212   }
    -00213 
    -00214   // Verify that we have a non-null operation
    -00215   if ($pview_only==true and $sum_cred == 0)
    -00216   {
    -00217     $msg=sprintf("Montant null");
    -00218     echo "<script> alert('$msg'); </script>";
    -00219     return null;
    -00220   }
    -00221   
    -00222   return $r;
    -00223 
    -00224 
    -00225 }
    +00185   $r.="</TABLE>";
    +00186 
    +00187  if ( $pview_only==true && $p_saved==false) {
    +00188 // check for upload piece
    +00189    $file=new widget("file");
    +00190    $file->table=1;
    +00191    $r.="<hr>";
    +00192    $r.= "<table>"; 
    +00193    $r.="<TR>".$file->IOValue("pj","","Pi&egrave;ce justificative")."</TR>";
    +00194    $r.="</table>";
    +00195    $r.="<hr>";
    +00196  }
    +00197   // Set correctly the REQUEST param for jrn_type 
    +00198   $h=new widget('hidden');
    +00199   $h->name='jrn_type';
    +00200   $h->value=$_REQUEST['jrn_type'];
    +00201   $r.=$h->IOValue();
    +00202 
    +00203   $r.=$p_submit;
    +00204   //  $r.="</DIV>";
    +00205   $r.="</FORM>";
    +00206   //TODO if view only show total
    +00207   $tmp= abs($sum_deb-$sum_cred);
    +00208   echo_debug('user_form_ods.php',__LINE__,"Diff = ".$tmp);
    +00209   if ( abs($sum_deb-$sum_cred) > 0.0001  and $pview_only==true) {
    +00210     $msg=sprintf("Montant non correspondant credit = %.5f debit = %.5f diff = %.5f",
    +00211                  $sum_cred,$sum_deb,$sum_cred-$sum_deb);
    +00212     echo "<script> alert('$msg'); </script>";
    +00213     return null;
    +00214   }
    +00215 
    +00216   // Verify that we have a non-null operation
    +00217   if ($pview_only==true and $sum_cred == 0)
    +00218   {
    +00219     $msg=sprintf("Montant null");
    +00220     echo "<script> alert('$msg'); </script>";
    +00221     return null;
    +00222   }
    +00223   
    +00224   return $r;
    +00225 
     00226 
    -00227 /* function RecordODS
    -00228  **************************************************
    -00229  * Purpose : Record an buy in the table jrn &
    -00230  *           jrnx
    -00231  *
    -00232  * parm :
    -00233  *      - $p_cn Database connection
    -00234  *  - $p_array contains all the invoice data
    -00235  * e_date => e : 01.01.2003
    -00236  * nb_item => e : 3
    -00237  * e_account0 => e : 6
    -00238  * e_account0_amount=>e:1
    -00239  *  - $p_user userid
    -00240  *  - $p_jrn current folder (journal)
    -00241  * gen :
    -00242  *      - none
    -00243  * return:
    -00244  *            true on success
    -00245  */
    -00246 function RecordODS($p_cn,$p_array,$p_user,$p_jrn)
    -00247 {
    -00248   foreach ( $p_array as $v => $e)
    -00249   {
    -00250     ${"$v"}=$e;
    -00251   }
    -00252   // Get the default period
    -00253   $periode=$p_user->GetPeriode();
    -00254   $amount=0.0;
    -00255   // Computing total customer
    -00256 
    -00257   $sum_deb=0.0;
    -00258   $sum_cred=0.0;
    -00259 
    -00260         // Compute the j_grpt
    -00261   $seq=NextSequence($p_cn,'s_grpt');
    -00262 
    -00263   StartSql($p_cn);
    -00264   // store into the database
    -00265   for ( $i = 0; $i < $nb_item;$i++) {
    -00266     if ( isNumber(${"e_account$i"}) == 0 ) continue;
    -00267     $sum_deb+=(${"e_account$i"."_type"}=='d')?round(${"e_account$i"."_amount"},2):0;
    -00268     $sum_cred+=(${"e_account$i"."_type"}=='c')?round(${"e_account$i"."_amount"},2):0;
    -00269 
    -00270     if ( ${"e_account$i"."_amount"} == 0 ) continue;
    -00271     if ( ($j_id=InsertJrnx($p_cn,${"e_account$i"."_type"},$p_user->id,$p_jrn,${"e_account$i"},$e_date,${"e_account$i"."_amount"},$seq,$periode)) == false ) {
    -00272       $Rollback($p_cn);exit("error 'user_form_ods.php' __LINE__");}
    -00273   }
    -00274 
    -00275   if ( InsertJrn($p_cn,$e_date,"",$p_jrn,$e_comm,$sum_deb,$seq,$periode) == false ) {
    -00276     $Rollback($p_cn);exit("error 'user_form_ods.php' __LINE__");}
    -00277 
    -00278   // Set Internal code and Comment
    -00279   $internal_code=SetInternalCode($p_cn,$seq,$p_jrn);
    -00280   if ( $e_comm=="" ) {
    -00281     // Update comment if comment is blank
    -00282     $Res=ExecSql($p_cn,"update jrn set jr_comment='".$internal_code."' where jr_grpt_id=".$seq);
    -00283   }
    -00284   if ( isset ($_FILES))
    -00285     save_upload_document($p_cn,$seq);
    -00286 
    -00287   Commit($p_cn);
    -00288   return $internal_code;
    -00289 }
    -00290 
    +00227 }
    +00228 
    +00247 function RecordODS($p_cn,$p_array,$p_user,$p_jrn)
    +00248 {
    +00249   foreach ( $p_array as $v => $e)
    +00250   {
    +00251     ${"$v"}=$e;
    +00252   }
    +00253   // Get the default period
    +00254   $periode=$p_user->GetPeriode();
    +00255   $amount=0.0;
    +00256   // Computing total customer
    +00257 
    +00258   $sum_deb=0.0;
    +00259   $sum_cred=0.0;
    +00260 
    +00261         // Compute the j_grpt
    +00262   $seq=NextSequence($p_cn,'s_grpt');
    +00263 
    +00264   StartSql($p_cn);
    +00265   // store into the database
    +00266   for ( $i = 0; $i < $nb_item;$i++) {
    +00267     if ( isNumber(${"e_account$i"}) == 0 ) continue;
    +00268     $sum_deb+=(${"e_account$i"."_type"}=='d')?round(${"e_account$i"."_amount"},2):0;
    +00269     $sum_cred+=(${"e_account$i"."_type"}=='c')?round(${"e_account$i"."_amount"},2):0;
    +00270 
    +00271     if ( ${"e_account$i"."_amount"} == 0 ) continue;
    +00272     if ( ($j_id=InsertJrnx($p_cn,${"e_account$i"."_type"},$p_user->id,$p_jrn,${"e_account$i"},$e_date,${"e_account$i"."_amount"},$seq,$periode)) == false ) {
    +00273       $Rollback($p_cn);exit("error 'user_form_ods.php' __LINE__");}
    +00274   }
    +00275 
    +00276   if ( InsertJrn($p_cn,$e_date,"",$p_jrn,$e_comm,$sum_deb,$seq,$periode) == false ) {
    +00277     $Rollback($p_cn);exit("error 'user_form_ods.php' __LINE__");}
    +00278 
    +00279   // Set Internal code and Comment
    +00280   $internal_code=SetInternalCode($p_cn,$seq,$p_jrn);
    +00281   if ( $e_comm=="" ) {
    +00282     // Update comment if comment is blank
    +00283     $Res=ExecSql($p_cn,"update jrn set jr_comment='".$internal_code."' where jr_grpt_id=".$seq);
    +00284   }
    +00285   if ( isset ($_FILES))
    +00286     save_upload_document($p_cn,$seq);
    +00287 
    +00288   Commit($p_cn);
    +00289   return $internal_code;
    +00290 }
     00291 
    -00292 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00292 +00293 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__form__ods_8php.html b/doc/developper/html/user__form__ods_8php.html index 5cb1f05e2..4e1f93614 100644 --- a/doc/developper/html/user__form__ods_8php.html +++ b/doc/developper/html/user__form__ods_8php.html @@ -4,20 +4,29 @@ - + -

    user_form_ods.php File Reference

    +

    user_form_ods.php File Reference

    Functions for the ledger of misc. operation. More... +

    +

    Go to the source code of this file. + +

    Functions

     FormODS ($p_cn, $p_jrn, $p_periode, $p_submit, $p_array=null, $pview_only=true, $p_article=6, $p_saved=false)
     Display the miscellaneous operation Used to show detail, encode a new oper or update one.
     RecordODS ($p_cn, $p_array, $p_user, $p_jrn)
     Record an buy in the table jrn & jrnx.
    -


    Function Documentation

    +

    Detailed Description

    +Functions for the ledger of misc. operation. +

    + +

    +Definition in file user_form_ods.php.


    Function Documentation

    @@ -88,11 +97,27 @@ +References $filter, $flag, $i, $l_line, $p_jrn, $r, CountSql(), echo_error(), GetJrnProperty(), GetPeriode(), GetPosteLibelle(), isNumber(), name, value, and VerifyOperationDate().

    +Display the miscellaneous operation Used to show detail, encode a new oper or update one. +

    +

    Parameters:
    + + + + + + + + + +
    $p_cn database connextion
    $p_array which can be empty
    $p_jrn the "journal"
    $p_user = $g_user
    $p_submit contains the submit string
    $pview_only if we cannot change it (no right or centralized op)
    $p_article number of article
    $p_saved if true propose to upload a piece gen :
      +
    • return: string with the form
    +
    +

    -Definition at line 43 of file user_form_ods.php. +Definition at line 45 of file user_form_ods.php.

    -References $filter, $flag, $i, $l_line, $p_jrn, $r, CountSql(), eacute, echo_error(), GetJrnProperty(), GetPeriode(), GetPosteLibelle(), isNumber(), name, value, and VerifyOperationDate().

    @@ -141,14 +166,25 @@ References $filter,

    +Record an buy in the table jrn & jrnx. +

    +

    Parameters:
    + + + +
    $p_cn Database connection
    $p_array contains all the data e_date => e : 01.01.2003 nb_item => e : 3 e_account0 => e : 6 e_account0_amount=>e:1
      +
    • $p_user userid
    • $p_jrn current folder (journal)
    +
    +
    +
    Returns:
    true on success

    -Definition at line 246 of file user_form_ods.php. +Definition at line 247 of file user_form_ods.php.

    -References $amount, $e, $seq, exit, InsertJrnx(), isNumber(), NextSequence(), and StartSql(). +References $amount, $e, $seq, exit, InsertJrnx(), isNumber(), NextSequence(), and StartSql(). -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__form__ven_8php-source.html b/doc/developper/html/user__form__ven_8php-source.html index 934b5ec0a..d56341f21 100644 --- a/doc/developper/html/user__form__ven_8php-source.html +++ b/doc/developper/html/user__form__ven_8php-source.html @@ -4,7 +4,7 @@ - +

    user_form_ven.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,691 +27,672 @@
     00018 */
     00019 /* $Revision$ */
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00021 require_once("constant.php");
    -00022 require_once("class_widget.php");
    -00023 require_once("preference.php");
    -00024 require_once("fiche_inc.php");
    -00025 require_once("user_common.php");
    -00026 /* function FormVenInput
    -00027  * Purpose : Display the form for a sell
    -00028  *           Used to show detail, encode a new invoice 
    -00029  *           or update one
    -00030  *        
    -00031  * parm : 
    -00032  *      - p_array which can be empty
    -00033  *      - the "journal"
    -00034  *      - $p_periode = periode
    -00035  *      - view_only if we cannot change it (no right or centralized op)
    -00036  *      - $p_article number of article
    -00037  * gen :
    -00038  *      -
    -00039  * return: string with the form
    -00040  * TODO Add in parameters the infos about the company for making the invoice
    -00041  */
    -00042 function FormVenInput($p_cn,$p_jrn,$p_periode,$p_array=null,$pview_only=true,$p_article=1)
    -00043 { 
    -00044 
    -00045   if ( $p_array != null ) {
    -00046     // array contains old value
    -00047     foreach ( $p_array as $a=>$v) {
    -00048       ${"$a"}=$v;
    -00049     }
    -00050   }
    -00051   // The date
    -00052   list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    -00053   $op_date=( ! isset($e_date) ) ?substr($l_date_start,2,8):$e_date;
    -00054   $e_ech=(isset($e_ech))?$e_ech:"";
    -00055   $e_comm=(isset($e_comm))?$e_comm:"";
    -00056   //  $e_jrn=(isset($e_jrn))?$e_jrn:"";
    -00057   // Save old value and set a new one
    -00058   echo_debug('user_form_ven.php',__LINE__,"form_input.php.FormVentep_op_date is $op_date");
    -00059   $r="";
    -00060   if ( $pview_only == false) {
    -00061     $r.=JS_SEARCH_CARD;
    -00062     $r.=JS_SHOW_TVA;    
    -00063     $r.=JS_TVA;
    -00064     $r.="<FORM NAME=\"form_detail\" ACTION=\"user_jrn.php?action=insert_vente&p_jrn=$p_jrn\" METHOD=\"POST\">";
    -00065 
    -00066     
    -00067   }
    -00068   $sql="select jrn_def_id as value,jrn_def_name as label from jrn_def where jrn_def_type='VEN'";
    -00069   $list=GetArray($p_cn,$sql);
    -00070   $r.='<TABLE>';
    -00071   //  Date
    -00072   //--
    -00073   $Date=new widget("text");
    -00074   $Date->SetReadOnly($pview_only);
    -00075   $Date->table=1;
    -00076   $Date->tabindex=1;
    -00077   $r.="<tr>";
    -00078   $r.=$Date->IOValue("e_date",$op_date,"Date");
    -00079   $r.="</tr>";
    -00080   // Payment limit
    -00081   //--
    -00082   $Echeance=new widget("text");
    -00083   $Echeance->SetReadOnly($pview_only);
    -00084   $Echeance->table=1;
    -00085   $Echeance->tabindex=2;
    -00086   $r.="<tr>";
    -00087   $r.=$Echeance->IOValue("e_ech",$e_ech,"Echeance");
    -00088   $r.="</tr>";
    -00089   // Comment
    -00090   //--
    -00091   $Commentaire=new widget("text");
    -00092   $Commentaire->table=1;
    -00093   $Commentaire->SetReadOnly($pview_only);
    -00094   $Commentaire->size=80;
    -00095   $Commentaire->tabindex=3;
    -00096   $r.="<tr>";
    -00097   $r.=$Commentaire->IOValue("e_comm",$e_comm,"Description");
    -00098   $r.="</tr>";
    -00099   include_once("fiche_inc.php");
    -00100   // Display the customer
    -00101   //--
    -00102   $fiche='deb';
    -00103   echo_debug('user_form_ven.php',__LINE__,"Client Nombre d'enregistrement ".sizeof($fiche));
    -00104   // Save old value and set a new one
    -00105   //--
    -00106   $e_client=( isset ($e_client) )?$e_client:"";
    -00107   $e_client_label="";  
    -00108 
    -00109   // retrieve e_client_label
    -00110   //--
    -00111   if ( isNumber($e_client) == 1 ) {
    -00112     if ( isFicheOfJrn($p_cn,$p_jrn,$e_client,'deb') == 0 ) {
    -00113       $msg="Fiche inexistante !!! ";
    -00114       echo_error($msg); echo_error($msg);       
    -00115       echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00116       $e_client="";
    -00117     } else {
    -00118       $a_client=GetFicheAttribut($p_cn,$e_client);
    -00119       if ( $a_client != null)   
    -00120           $e_client_label=$a_client['vw_name']."  adresse ".$a_client['vw_addr']."  ".$a_client['vw_cp'];
    -00121     }
    -00122   }
    -00123 
    -00124   $W1=new widget("js_search");
    -00125   $W1->label="Client";
    -00126   $W1->name="e_client";
    -00127   $W1->tabindex=3;
    -00128   $W1->value=$e_client;
    -00129   $W1->extra=$fiche;  // list of card
    -00130   $W1->extra2=$p_jrn;
    -00131   $r.="<TR>".$W1->IOValue();
    -00132   $client_label=new widget("span");
    -00133   $r.= $client_label->IOValue("e_client_label",$e_client_label)."</TD></TR>";
    -00134   $r.="</TABLE>";
    -00135 
    -00136   // Record the current number of article
    -00137   $Hid=new widget('hidden');
    -00138   $r.=$Hid->IOValue("nb_item",$p_article);
    -00139   $e_comment=(isset($e_comment))?$e_comment:"";
    +00024 require_once("constant.php");
    +00025 require_once("class_widget.php");
    +00026 require_once("preference.php");
    +00027 require_once("fiche_inc.php");
    +00028 require_once("user_common.php");
    +00043 function FormVenInput($p_cn,$p_jrn,$p_periode,$p_array=null,$pview_only=true,$p_article=1)
    +00044 { 
    +00045 
    +00046   if ( $p_array != null ) {
    +00047     // array contains old value
    +00048     foreach ( $p_array as $a=>$v) {
    +00049       ${"$a"}=$v;
    +00050     }
    +00051   }
    +00052   // The date
    +00053   list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    +00054   $op_date=( ! isset($e_date) ) ?substr($l_date_start,2,8):$e_date;
    +00055   $e_ech=(isset($e_ech))?$e_ech:"";
    +00056   $e_comm=(isset($e_comm))?$e_comm:"";
    +00057   //  $e_jrn=(isset($e_jrn))?$e_jrn:"";
    +00058   // Save old value and set a new one
    +00059   echo_debug('user_form_ven.php',__LINE__,"form_input.php.FormVentep_op_date is $op_date");
    +00060   $r="";
    +00061   if ( $pview_only == false) {
    +00062     $r.=JS_SEARCH_CARD;
    +00063     $r.=JS_SHOW_TVA;    
    +00064     $r.=JS_TVA;
    +00065     // Compute href
    +00066     $href=$_SERVER['SCRIPT_NAME'];
    +00067     switch ($href)
    +00068       {
    +00069         // user_jrn.php
    +00070       case '/user_jrn.php':
    +00071         $href="user_jrn.php?action=insert_vente&p_jrn=$p_jrn";
    +00072         break;
    +00073       case '/commercial.php':
    +00074         $href="commercial.php?p_action=facture&p_jrn=$p_jrn";
    +00075         break;
    +00076       default:
    +00077         echo_error('user_form_ven.php',__LINE__,'Erreur invalid request uri');
    +00078         exit (-1);
    +00079       }
    +00080       
    +00081     $r.="<FORM NAME=\"form_detail\" ACTION=\"$href\" METHOD=\"POST\">";
    +00082 
    +00083     
    +00084   }
    +00085   $sql="select jrn_def_id as value,jrn_def_name as label from jrn_def where jrn_def_type='VEN'";
    +00086   $list=GetArray($p_cn,$sql);
    +00087   $r.='<TABLE>';
    +00088   //  Date
    +00089   //--
    +00090   $Date=new widget("text");
    +00091   $Date->SetReadOnly($pview_only);
    +00092   $Date->table=1;
    +00093   $Date->tabindex=1;
    +00094   $r.="<tr>";
    +00095   $r.=$Date->IOValue("e_date",$op_date,"Date");
    +00096   $r.="</tr>";
    +00097   // Payment limit
    +00098   //--
    +00099   $Echeance=new widget("text");
    +00100   $Echeance->SetReadOnly($pview_only);
    +00101   $Echeance->table=1;
    +00102   $Echeance->tabindex=2;
    +00103   $r.="<tr>";
    +00104   $r.=$Echeance->IOValue("e_ech",$e_ech,"Echeance");
    +00105   $r.="</tr>";
    +00106   // Comment
    +00107   //--
    +00108   $Commentaire=new widget("text");
    +00109   $Commentaire->table=1;
    +00110   $Commentaire->SetReadOnly($pview_only);
    +00111   $Commentaire->size=80;
    +00112   $Commentaire->tabindex=3;
    +00113   $r.="<tr>";
    +00114   $r.=$Commentaire->IOValue("e_comm",$e_comm,"Description");
    +00115   $r.="</tr>";
    +00116   include_once("fiche_inc.php");
    +00117   // Display the customer
    +00118   //--
    +00119   $fiche='deb';
    +00120   echo_debug('user_form_ven.php',__LINE__,"Client Nombre d'enregistrement ".sizeof($fiche));
    +00121   // Save old value and set a new one
    +00122   //--
    +00123   $e_client=( isset ($e_client) )?$e_client:"";
    +00124   $e_client_label="";  
    +00125 
    +00126   // retrieve e_client_label
    +00127   //--
    +00128   if ( isNumber($e_client) == 1 ) {
    +00129     if ( isFicheOfJrn($p_cn,$p_jrn,$e_client,'deb') == 0 ) {
    +00130       $msg="Fiche inexistante !!! ";
    +00131       echo_error($msg); echo_error($msg);       
    +00132       echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00133       $e_client="";
    +00134     } else {
    +00135       $a_client=GetFicheAttribut($p_cn,$e_client);
    +00136       if ( $a_client != null)   
    +00137           $e_client_label=$a_client['vw_name']."  adresse ".$a_client['vw_addr']."  ".$a_client['vw_cp'];
    +00138     }
    +00139   }
     00140 
    -00141 
    -00142   // Start the div for item to sell
    -00143   $r.="<DIV>";
    -00144   $r.='<H2 class="info">Articles</H2>';
    -00145   $r.='<TABLE>';
    -00146   $r.='<TR>';
    -00147   $r.="<th></th>";
    -00148   $r.="<th>Code</th>";
    -00149   $r.="<th>Dénomination</th>";
    -00150   $r.="<th>prix</th>";
    -00151   $r.="<th>tva</th>";
    -00152   $r.="<th>quantité</th>";
    -00153   $r.='</TR>';
    -00154   // For each article
    -00155   //--
    -00156   for ($i=0;$i< $p_article;$i++) {
    -00157     // Code id, price & vat code
    -00158     //--
    -00159     $march=(isset(${"e_march$i"}))?${"e_march$i"}:"";
    -00160     $march_sell=(isset(${"e_march".$i."_sell"}))?${"e_march".$i."_sell"}:"";
    -00161     $march_tva_id=(isset(${"e_march$i"."_tva_id"}))?${"e_march$i"."_tva_id"}:"";
    -00162 
    -00163     $march_tva_label="";
    -00164     $march_label="";
    -00165 
    -00166     // If $march has a value
    -00167     //--
    -00168     if ( isNumber($march) == 1 ) {
    -00169       if ( isFicheOfJrn($p_cn,$p_jrn,$march,'cred') == 0 ) {
    -00170         $msg="Fiche inexistante !!! ";
    -00171         echo_error($msg); echo_error($msg);     
    -00172         echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00173         $march="";
    -00174       } else {
    -00175         // retrieve the tva label and name
    -00176         //--
    -00177         $a_fiche=GetFicheAttribut($p_cn, $march);
    -00178         if ( $a_fiche != null ) {
    -00179           if ( $march_tva_id == "" ) {
    -00180             $march_tva_id=$a_fiche['tva_id'];
    -00181             $march_tva_label=$a_fiche['tva_label'];
    -00182           }
    -00183           $march_label=$a_fiche['vw_name'];
    -00184         }
    -00185       }
    -00186     }
    -00187     // Show input
    -00188     //--
    -00189     $W1=new widget("js_search");
    -00190     $W1->label="";
    -00191     $W1->name="e_march".$i;
    -00192     $W1->value=$march;
    -00193     $W1->extra='cred';  // credits
    -00194     $W1->extra2=$p_jrn;
    -00195     $W1->readonly=$pview_only;
    -00196     $r.="<TR>".$W1->IOValue()."</TD>";
    -00197     $Span=new widget ("span");
    -00198     $Span->SetReadOnly($pview_only);
    -00199     // card's name, price
    -00200     //--
    -00201     $r.="<TD>".$Span->IOValue("e_march".$i."_label",$march_label)."</TD>";
    -00202    // price
    -00203     $Price=new widget("text");
    -00204     $Price->SetReadOnly($pview_only);
    -00205     $Price->table=1;
    -00206     $r.=$Price->IOValue("e_march".$i."_sell",$march_sell);
    -00207     // vat label
    -00208     //--
    -00209     $select_tva=make_array($p_cn,"select tva_id,tva_label from tva_rate order by tva_id",1);
    -00210     $Tva=new widget("select");
    -00211     $Tva->table=1;
    -00212     $Tva->selected=$march_tva_id;
    -00213     $r.=$Tva->IOValue("e_march$i"."_tva_id",$select_tva);
    -00214 
    -00215     // quantity
    -00216     //--
    -00217     $quant=(isset(${"e_quant$i"}))?${"e_quant$i"}:"1";
    -00218     $Quantity=new widget("text");
    -00219     $Quantity->SetReadOnly($pview_only);
    -00220     $Quantity->table=1;
    -00221     //$r.=InputType("","TEXT","e_quant".$i,$quant,$pview_only);
    -00222     $r.=$Quantity->IOValue("e_quant".$i,$quant);
    -00223     $r.='</TR>';
    -00224   }
    -00225 
    -00226 
    -00227 
    -00228   $r.="</TABLE>";
    -00229   $r.="<hr>";
    -00230   // Set correctly the REQUEST param for jrn_type 
    -00231   $h=new widget('hidden');
    -00232   $h->name='jrn_type';
    -00233   $h->value=$_REQUEST['jrn_type'];
    -00234   $r.=$h->IOValue();
    -00235 
    -00236   if ($pview_only == false ) {
    -00237     $r.='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article" TABINDEX="32767">';
    -00238     $r.='<INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Enregistrer" TABINDEX="32767" ID="SubmitButton">';
    -00239     $r.="</DIV>";
    -00240     $r.="</FORM>";
    -00241     $r.=JS_CALC_LINE;
    -00242   } else {
    -00243      $r.="</div>";
    +00141   $W1=new widget("js_search");
    +00142   $W1->label="Client";
    +00143   $W1->name="e_client";
    +00144   $W1->tabindex=3;
    +00145   $W1->value=$e_client;
    +00146   $W1->extra=$fiche;  // list of card
    +00147   $W1->extra2=$p_jrn;
    +00148   $r.="<TR>".$W1->IOValue();
    +00149   $client_label=new widget("span");
    +00150   $r.= $client_label->IOValue("e_client_label",$e_client_label)."</TD></TR>";
    +00151   $r.="</TABLE>";
    +00152 
    +00153   // Record the current number of article
    +00154   $Hid=new widget('hidden');
    +00155   $r.=$Hid->IOValue("nb_item",$p_article);
    +00156   $e_comment=(isset($e_comment))?$e_comment:"";
    +00157 
    +00158 
    +00159   // Start the div for item to sell
    +00160   $r.="<DIV>";
    +00161   $r.='<H2 class="info">Articles</H2>';
    +00162   $r.='<TABLE>';
    +00163   $r.='<TR>';
    +00164   $r.="<th></th>";
    +00165   $r.="<th>Code</th>";
    +00166   $r.="<th>Dénomination</th>";
    +00167   $r.="<th>prix</th>";
    +00168   $r.="<th>tva</th>";
    +00169   $r.="<th>quantité</th>";
    +00170   $r.='</TR>';
    +00171   // For each article
    +00172   //--
    +00173   for ($i=0;$i< $p_article;$i++) {
    +00174     // Code id, price & vat code
    +00175     //--
    +00176     $march=(isset(${"e_march$i"}))?${"e_march$i"}:"";
    +00177     $march_sell=(isset(${"e_march".$i."_sell"}))?${"e_march".$i."_sell"}:"";
    +00178     $march_tva_id=(isset(${"e_march$i"."_tva_id"}))?${"e_march$i"."_tva_id"}:"";
    +00179 
    +00180     $march_tva_label="";
    +00181     $march_label="";
    +00182 
    +00183     // If $march has a value
    +00184     //--
    +00185     if ( isNumber($march) == 1 ) {
    +00186       if ( isFicheOfJrn($p_cn,$p_jrn,$march,'cred') == 0 ) {
    +00187         $msg="Fiche inexistante !!! ";
    +00188         echo_error($msg); echo_error($msg);     
    +00189         echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00190         $march="";
    +00191       } else {
    +00192         // retrieve the tva label and name
    +00193         //--
    +00194         $a_fiche=GetFicheAttribut($p_cn, $march);
    +00195         if ( $a_fiche != null ) {
    +00196           if ( $march_tva_id == "" ) {
    +00197             $march_tva_id=$a_fiche['tva_id'];
    +00198             $march_tva_label=$a_fiche['tva_label'];
    +00199           }
    +00200           $march_label=$a_fiche['vw_name'];
    +00201         }
    +00202       }
    +00203     }
    +00204     // Show input
    +00205     //--
    +00206     $W1=new widget("js_search");
    +00207     $W1->label="";
    +00208     $W1->name="e_march".$i;
    +00209     $W1->value=$march;
    +00210     $W1->extra='cred';  // credits
    +00211     $W1->extra2=$p_jrn;
    +00212     $W1->readonly=$pview_only;
    +00213     $r.="<TR>".$W1->IOValue()."</TD>";
    +00214     $Span=new widget ("span");
    +00215     $Span->SetReadOnly($pview_only);
    +00216     // card's name, price
    +00217     //--
    +00218     $r.="<TD>".$Span->IOValue("e_march".$i."_label",$march_label)."</TD>";
    +00219    // price
    +00220     $Price=new widget("text");
    +00221     $Price->SetReadOnly($pview_only);
    +00222     $Price->table=1;
    +00223     $r.=$Price->IOValue("e_march".$i."_sell",$march_sell);
    +00224     // vat label
    +00225     //--
    +00226     $select_tva=make_array($p_cn,"select tva_id,tva_label from tva_rate order by tva_id",1);
    +00227     $Tva=new widget("select");
    +00228     $Tva->table=1;
    +00229     $Tva->selected=$march_tva_id;
    +00230     $r.=$Tva->IOValue("e_march$i"."_tva_id",$select_tva);
    +00231 
    +00232     // quantity
    +00233     //--
    +00234     $quant=(isset(${"e_quant$i"}))?${"e_quant$i"}:"1";
    +00235     $Quantity=new widget("text");
    +00236     $Quantity->SetReadOnly($pview_only);
    +00237     $Quantity->table=1;
    +00238     //$r.=InputType("","TEXT","e_quant".$i,$quant,$pview_only);
    +00239     $r.=$Quantity->IOValue("e_quant".$i,$quant);
    +00240     $r.='</TR>';
    +00241   }
    +00242 
    +00243 
     00244 
    -00245   }
    -00246 
    -00247 
    -00248 
    -00249   return $r;
    -00250 
    -00251 
    -00252 }
    -00253 /* function form_verify_input
    -00254  **************************************************
    -00255  * Purpose : verify if the data to insert are valid
    -00256  *        
    -00257  * parm : 
    -00258  *      - p_cn database connection
    -00259  *      - p_jrn concerned ledger
    -00260  *      - User periode
    -00261  *      - array with the post data
    -00262  *      - p_number number of items
    -00263  * gen :
    -00264  *      -
    -00265  * return:
    -00266  */
    -00267 function form_verify_input($p_cn,$p_jrn,$p_periode,$p_array,$p_number)
    -00268 {
    -00269   foreach ($p_array as $name=>$content) {
    -00270     ${"$name"}=$content;
    -00271   }
    -00272   // Verify the date
    -00273   if ( isDate($e_date) == null ) { 
    -00274           echo_error("Invalid date $e_date");
    -00275           echo_debug('user_form_ven.php',__LINE__,"Invalid date $e_date");
    -00276           echo "<SCRIPT> alert('INVALID DATE $e_date !!!!');</SCRIPT>";
    -00277           return null;
    -00278                 }
    -00279 // Verify the quantity
    -00280 for ($o = 0;$o < $p_number; $o++) {
    -00281         if ( isNumber(${"e_quant$o"}) == 0 ) {
    -00282                 echo_debug('user_form_ven.php',__LINE__,"invalid quantity ".${"e_quant$o"});
    -00283                 echo_error("invalid quantity ".${"e_quant$o"});
    -00284                 echo "<SCRIPT> alert('INVALID QUANTITY !!!');</SCRIPT>";
    -00285                 return null;
    -00286         }       
    -00287     // check if vat is correct
    -00288     if ( strlen(trim(${"e_march$o"."_tva_id"})) !=0 
    -00289          and 
    -00290          ${"e_march$o"."_tva_id"} != "-1")
    -00291       {
    -00292       // vat is given we check it now check if valid
    -00293       if (isNumber(${"e_march$o"."_tva_id"}) == 0
    -00294                or CountSql($p_cn,"select tva_id from tva_rate where tva_id=".${"e_march$o"."_tva_id"}) ==0)
    -00295         {
    -00296           $msg="Invalid TVA !!! e_march".$o."_tva_id = ".${"e_march".$o."_tva_id"};
    -00297           echo_error($msg); echo_error($msg);   
    -00298           echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00299           return null;
    -00300         
    -00301       }
    -00302     }
    -00303     
    -00304  }
    -00305 
    -00306 // Verify the ech
    -00307  if (strlen($e_ech) != 0 and isNumber($e_ech)  == 0 and  isDate ($e_ech) == null ) {
    -00308         $msg="Echeance invalide";
    -00309                 echo_error($msg); echo_error($msg);     
    -00310                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00311                 return null;
    -00312  } 
    -00313 
    -00314  // if ech is a number of days then compute date limit
    -00315  if ( strlen($e_ech) != 0 and isNumber($e_ech) == 1) {
    -00316  list($day,$month,$year)=explode(".",$e_date);
    -00317   echo_debug('user_form_ven.php',__LINE__," date $e_date = $day.$month.$year");
    -00318   $p_ech=date('d.m.Y',mktime(0,0,0,$month,$day+$e_ech,$year));
    -00319   echo_debug('user_form_ven.php',__LINE__,"p_ech = $e_ech $p_ech");
    -00320   $e_ech=$p_ech;
    -00321   $wHidden=new widget("hidden");
    -00322   $data.=$wHidden->IOValue("e_ech",$e_ech);
    -00323  }
    -00324 
    -00325  // Check if the fiche is in the jrn
    -00326  if (IsFicheOfJrn($p_cn , $p_jrn, $e_client,'deb') == 0 ) 
    -00327    {
    -00328      $msg="Client invalid please recheck";
    -00329      echo_error($msg);
    -00330      echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00331      return null;
    -00332    }
    -00333 
    -00334  // check if all e_march are in fiche
    -00335   for ($i=0;$i<$p_number;$i++) {
    -00336     if ( trim(${"e_march$i"})  == "" ) {
    -00337       // no goods to sell 
    -00338       continue;
    -00339     }
    -00340   
    +00245   $r.="</TABLE>";
    +00246   $r.="<hr>";
    +00247   // Set correctly the REQUEST param for jrn_type 
    +00248   $h=new widget('hidden');
    +00249   $h->name='jrn_type';
    +00250   $h->value=$_REQUEST['jrn_type'];
    +00251   $r.=$h->IOValue();
    +00252 
    +00253   if ($pview_only == false ) {
    +00254     $r.='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout article" TABINDEX="32767">';
    +00255     $r.='<INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Enregistrer" TABINDEX="32767" ID="SubmitButton">';
    +00256     $r.="</DIV>";
    +00257     $r.="</FORM>";
    +00258     $r.=JS_CALC_LINE;
    +00259   } else {
    +00260      $r.="</div>";
    +00261 
    +00262   }
    +00263 
    +00264 
    +00265 
    +00266   return $r;
    +00267 
    +00268 
    +00269 }
    +00284 function form_verify_input($p_cn,$p_jrn,$p_periode,$p_array,$p_number)
    +00285 {
    +00286   foreach ($p_array as $name=>$content) {
    +00287     ${"$name"}=$content;
    +00288   }
    +00289   // Verify the date
    +00290   if ( isDate($e_date) == null ) { 
    +00291           echo_error("Invalid date $e_date");
    +00292           echo_debug('user_form_ven.php',__LINE__,"Invalid date $e_date");
    +00293           echo "<SCRIPT> alert('INVALID DATE $e_date !!!!');</SCRIPT>";
    +00294           return null;
    +00295                 }
    +00296 // Verify the quantity
    +00297 for ($o = 0;$o < $p_number; $o++) {
    +00298         if ( isNumber(${"e_quant$o"}) == 0 ) {
    +00299                 echo_debug('user_form_ven.php',__LINE__,"invalid quantity ".${"e_quant$o"});
    +00300                 echo_error("invalid quantity ".${"e_quant$o"});
    +00301                 echo "<SCRIPT> alert('INVALID QUANTITY !!!');</SCRIPT>";
    +00302                 return null;
    +00303         }       
    +00304     // check if vat is correct
    +00305     if ( strlen(trim(${"e_march$o"."_tva_id"})) !=0 
    +00306          and 
    +00307          ${"e_march$o"."_tva_id"} != "-1")
    +00308       {
    +00309       // vat is given we check it now check if valid
    +00310       if (isNumber(${"e_march$o"."_tva_id"}) == 0
    +00311                or CountSql($p_cn,"select tva_id from tva_rate where tva_id=".${"e_march$o"."_tva_id"}) ==0)
    +00312         {
    +00313           $msg="Invalid TVA !!! e_march".$o."_tva_id = ".${"e_march".$o."_tva_id"};
    +00314           echo_error($msg); echo_error($msg);   
    +00315           echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00316           return null;
    +00317         
    +00318       }
    +00319     }
    +00320     
    +00321  }
    +00322 
    +00323 // Verify the ech
    +00324  if (strlen($e_ech) != 0 and isNumber($e_ech)  == 0 and  isDate ($e_ech) == null ) {
    +00325         $msg="Echeance invalide";
    +00326                 echo_error($msg); echo_error($msg);     
    +00327                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    +00328                 return null;
    +00329  } 
    +00330 
    +00331  // if ech is a number of days then compute date limit
    +00332  if ( strlen($e_ech) != 0 and isNumber($e_ech) == 1) {
    +00333  list($day,$month,$year)=explode(".",$e_date);
    +00334   echo_debug('user_form_ven.php',__LINE__," date $e_date = $day.$month.$year");
    +00335   $p_ech=date('d.m.Y',mktime(0,0,0,$month,$day+$e_ech,$year));
    +00336   echo_debug('user_form_ven.php',__LINE__,"p_ech = $e_ech $p_ech");
    +00337   $e_ech=$p_ech;
    +00338   $wHidden=new widget("hidden");
    +00339   $data.=$wHidden->IOValue("e_ech",$e_ech);
    +00340  }
     00341 
    -00342     // Check 
    -00343     if ( isFicheOfJrn($p_cn,$p_jrn,${"e_march$i"},'cred') == 0 ) {
    -00344       $msg="Fiche inexistante !!! ";
    -00345       echo_error($msg); echo_error($msg);       
    -00346       echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00347       return null;
    -00348     }
    -00349         // check if the  ATTR_DEF_ACCOUNT is set
    -00350         $poste=GetFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_ACCOUNT);
    -00351         if ( $poste == null ) 
    -00352         {       
    -00353                 $msg="La fiche ".${"e_march$i"}." n\'a pas de poste comptable";
    -00354       echo_error($msg); echo_debug('user_form_ven.php',__LINE__,$msg);  
    -00355       echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00356       return null;
    -00357         
    -00358         }
    -00359         if ( strlen(trim($poste))==0 )
    -00360         {
    -00361                 $msg="La fiche ".$tiers." n\'a pas de poste comptable";
    -00362                 echo_error($msg); echo_debug('user_form_ven.php',__LINE__,$msg);        
    -00363                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00364         }
    -00365 
    -00366   }
    -00367 // Verify the userperiode
    -00368 
    -00369 // p_periode contient la periode par default
    -00370   list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
    -00371   
    -00372   // Date dans la periode active
    -00373   echo_debug ('user_form_ven',__LINE__,"date start periode $l_date_start date fin periode $l_date_end date demande $e_date");
    -00374   if ( cmpDate($e_date,$l_date_start)<0 || 
    -00375        cmpDate($e_date,$l_date_end)>0 )
    -00376     {
    -00377       $msg="Not in the active periode please change your preference";
    -00378       echo_error($msg); echo_error($msg);       
    -00379       echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00380       return null;
    -00381     }
    -00382     // Periode ferm� 
    -00383     if ( PeriodeClosed ($p_cn,$p_periode)=='t' )
    -00384       {
    -00385                 $msg="This periode is closed please change your preference";
    -00386                 echo_error($msg); echo_error($msg);     
    -00387                 echo "<SCRIPT>alert('$msg');</SCRIPT>";
    -00388                 return null;
    -00389       }
    -00390     return true;
    -00391 }
    -00392 /* function FormVenteView ($p_cn,$p_jrn,$p_periode,$p_array,$p_number,$p_doc='html',$p_comment='') 
    -00393  **************************************************
    -00394  * Purpose : Show the invoice before inserting it 
    -00395  *           the database
    -00396  *        
    -00397  * parm : 
    -00398  *      - p_cn database connection
    -00399  *      - p_jrn journal
    -00400  *      - p_periode
    -00401  *      - array of value
    -00402  *      - nb of item
    -00403  *      - p_doc type pdf or html
    -00404  * gen :
    -00405  *      - none
    -00406  * return:
    -00407  *     - string
    -00408  * 
    -00409  */
    -00410 
    -00411 function FormVenteView ($p_cn,$p_jrn,$p_periode,$p_array,$p_number,$p_doc='form',$p_comment='') 
    -00412 {
    -00413   $r="";
    -00414   $data="";
    -00415   // Keep all the data if hidden
    -00416   // and store the array in variables
    -00417   $hidden=new widget("hidden");
    -00418   foreach ($p_array as $name=>$content) {
    -00419     $data.=$hidden->IOValue($name,$content);
    -00420     ${"$name"}=$content;
    -00421   }
    -00422   
    -00423   // start table
    -00424   $r.='<TABLE>';
    -00425   // Show the Date
    -00426   $r.="<tr>";
    -00427   $r.="<TD>Date : $e_date</TD>";
    -00428   $r.="</tr>";
    -00429   // Show the customer Name
    -00430   $r.="<tr>";
    -00431   $r.="<TD>Client : ".getFicheName($p_cn,$e_client)."</TD>";
    -00432   $r.="</tr>";
    -00433   
    -00434   // show date limit
    -00435   $r.="<tr>";
    -00436   $r.="<TD> Echeance : $e_ech </TD>";
    -00437   $r.="</tr>";
    -00438   // Show desc
    -00439   $r.="<tr>";
    -00440   $r.="<TD> Description : $e_comm</TD>";
    -00441   $r.="</tr>";
    -00442   
    -00443   $sum_with_vat=0.0;
    -00444     $sum_march=0.0;
    -00445   // show all article, price vat and sum
    -00446     $r.="<TR>";
    -00447     $r.="<TH>Article</TH>";
    -00448     $r.="<TH>quantité</TH>";
    -00449     $r.="<TH>prix unit.</TH>";
    -00450     $r.="<TH>taux tva</TH>";
    -00451     $r.="<TH>Montant HTVA</TH>";
    -00452     $r.="<TH>Montant TVA</TH>";
    -00453     $r.="<TH>Total</TH>";
    -00454     $r.="</TR>";
    -00455   for ($i=0;$i<$p_number;$i++) {
    -00456     if ( trim(${"e_march$i"})  == "" ) {
    -00457       // no goods to sell 
    -00458       continue;
    -00459     }
    -00460   
    -00461     // Get the name
    -00462     $fiche_name=getFicheName($p_cn,${"e_march$i"});
    -00463 
    -00464     // Quantity
    -00465     $fiche_quant=${"e_quant$i"};
    -00466 
    -00467     // No  row if there is quantity
    -00468     if ( $fiche_quant == 0.0 ) continue;
    -00469 
    -00470 
    -00471     // If the price is not a number, retrieve the price from the database
    -00472     if ( isNumber(${"e_march$i"."_sell"}) == 0 ) {
    -00473            $fiche_price=getFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_PRIX_VENTE);
    -00474          } else {
    -00475       $fiche_price=${"e_march$i"."_sell"};
    -00476     }
    -00477     
    -00478     
    -00479     // VAT 
    -00480     $vat=(isNumber(${"e_march$i"."_tva_id"})==0)?getFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_TVA):${"e_march$i"."_tva_id"};
    -00481         
    -00482     // vat label
    -00483     // vat rate
    -00484     $a_vat=GetTvaRate($p_cn,$vat);
    -00485     if ( $a_vat == null ) {
    -00486       $vat_label="";
    -00487       $vat_rate=0.0;
    -00488     } else { 
    -00489       $vat_label=$a_vat['tva_label'];
    -00490       $vat_rate=$a_vat['tva_rate'];
    -00491     }           
    -00492         
    -00493     // Total card without vat
    -00494     $fiche_sum=$fiche_price*$fiche_quant;
    -00495     // Sum of invoice
    -00496     $sum_march+=$fiche_sum;
    -00497     // vat of the card
    -00498     $fiche_amount_vat=$fiche_price*$fiche_quant*$vat_rate;
    -00499     // value card + vat
    -00500     $fiche_with_vat=$fiche_price*$fiche_quant*(1+$vat_rate);
    -00501     // Sum of invoice vat 
    -00502     $sum_with_vat+=$fiche_with_vat;
    -00503     // Show the data
    -00504     $r.='<TR>';
    -00505     $r.='<TD>'.$fiche_name.'</TD>';
    -00506     $r.='<TD ALIGN="CENTER">'.$fiche_quant.'</TD>';
    -00507     $r.='<TD ALIGN="right">'.$fiche_price.'</TD>';
    -00508     $r.="<TD  ALIGN=\"RIGHT\"> $vat_label </TD>";
    -00509     $r.='<TD  ALIGN="RIGHT">'.round($fiche_sum,2).'</TD>';
    -00510     $r.='<TD ALIGN="RIGHT">'.round($fiche_amount_vat,2).'</TD>';
    -00511 
    -00512     $r.='<TD>'.round($fiche_with_vat,2).'</TD>';
    -00513 
    -00514     $r.="</TR>";
    -00515   }
    -00516   
    -00517   // end table
    -00518   $r.='</TABLE> ';
    -00519   $r.='<DIV style="padding:30px;font-size:14px">';
    -00520   $r.="Total HTVA =".round( $sum_march,2)." <br>";
    -00521   $r.="Total = ".round($sum_with_vat,2);
    -00522 
    -00523  
    -00524   $r.="</DIV>";
    -00525   if ( $p_doc == 'form' ) {
    -00526           $r.='<FORM METHOD="POST" enctype="multipart/form-data" ACTION="user_jrn.php?action=record&p_jrn='.$p_jrn.'">';
    -00527           // check for upload piece
    -00528           $file=new widget("file");
    -00529           $file->table=1;
    -00530           $r.="<hr>";
    -00531           $r.= "<table>"; 
    -00532           $r.="<TR>".$file->IOValue("pj","","Pièce justificative")."</TR>";
    -00533           $r.="</table>";
    -00534           $r.="<hr>";
    -00535 
    -00536           $r.=$data;
    -00537           if ( $sum_with_vat != 0 ) {
    -00538             $r.='<INPUT TYPE="SUBMIT" name="record_and_print_invoice" value="Sauver" >';
    -00539           }
    -00540           $r.='<INPUT TYPE="SUBMIT" name="correct_new_invoice" value="Corriger">';
    -00541 
    -00542           $r.='</FORM>';
    -00543           } 
    -00544   return $r;
    -00545   
    -00546 }
    -00547 
    -00548 /* function RecordInvoice
    -00549  **************************************************
    -00550  * Purpose : Record an invoice in the table jrn &
    -00551  *           jrnx
    -00552  *        
    -00553  * parm : 
    -00554  *      - $p_cn Database connection
    -00555  *  - $p_array contains all the invoice data
    -00556  * e_date => e : 01.01.2003
    -00557  * e_client => e : 3
    -00558  * nb_item => e : 3
    -00559  * e_march0 => e : 6
    -00560  * e_quant0 => e : 0
    -00561  * e_march0_sell=>e:1
    -00562  * e_march1 => e : 6
    -00563  * e_quant1 => e : 2
    -00564  * e_march1_sell=>e:1
    -00565  * e_march2 => e : 7
    -00566  * e_quant2 => e : 3
    -00567  * e_march2_sell=>e:1
    -00568 V : view_invoice => e : Voir cette facture
    -00569 V : record_invoice => e : Sauver 
    -00570  *  - $p_periode periode
    -00571  *  - $p_jrn current folder (journal)
    -00572  * gen :
    -00573  *      - none
    -00574  * return:
    -00575  *            true on success
    -00576  */
    -00577 function RecordInvoice($p_cn,$p_array,$p_user,$p_jrn)
    -00578 {
    -00579   foreach ( $p_array as $v => $e)
    -00580   {
    -00581     ${"$v"}=$e;
    -00582   }
    -00583 
    -00584   // Get the default period
    -00585   $periode=$p_user->GetPeriode();
    -00586   $amount=0.0;
    -00587   $amount_jrn=0.0;
    -00588   // Computing total customer
    -00589   //--
    -00590   for ($i=0;$i<$nb_item;$i++) {
    -00591     // store quantity & goods in array
    -00592     $a_good[$i]=${"e_march$i"};
    -00593     $a_quant[$i]=${"e_quant$i"};
    -00594     $a_price[$i]=0;
    -00595     $a_vat[$i]=${"e_march$i"."_tva_id"};
    -00596     // check whether the price is set or no
    -00597     if ( isNumber(${"e_march$i"."_sell"}) == 0 ) {
    -00598       if ( $a_good[$i] != "" ) {
    -00599              // If the price is not set we have to find it from the database
    -00600              $a_price[$i]=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_PRIX_VENTE);
    -00601            } 
    -00602     } else {
    -00603       // The price is valid
    -00604       $a_price[$i]=${"e_march$i"."_sell"};
    -00605     }
    -00606     $cost=$a_price[$i]*$a_quant[$i];
    -00607     $amount+=$cost;
    -00608     $amount_jrn+=$cost;
    -00609   }// for
    -00610 
    -00611   $comm=FormatString($e_comm);
    -00612   // Compute VAT
    -00613   //--
    -00614   $a_vat_new=ComputeTotalVat($p_cn,$a_good,$a_quant,$a_price,$a_vat);
    -00615   $sum_vat=0.0;
    -00616   if ( $a_vat_new != null ){
    -00617     foreach ( $a_vat_new as $element => $t) {
    -00618       echo_debug('user_form_ven.php',__LINE__," a_vat element $element t $t");
    -00619       $sum_vat+=$t;
    -00620       echo_debug('user_form_ven.php',__LINE__,"sum_vat = $sum_vat");
    -00621     }
    -00622   }
    -00623   // First we add in jrnx
    -00624         
    -00625   // Compute the j_grpt
    -00626   $seq=NextSequence($p_cn,'s_grpt');
    -00627 
    -00628 
    -00629   // Debit = client
    -00630   $poste=GetFicheAttribut($p_cn,$e_client,ATTR_DEF_ACCOUNT);
    -00631   StartSql($p_cn);      
    -00632   $r=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($amount,2)+round($sum_vat,2),$seq,$periode);
    -00633   if ( $r == false) { $Rollback($p_cn);exit("error 'user_form_ven.php' __LINE__");}
    -00634 
    -00635   // Credit = goods 
    -00636   for ( $i = 0; $i < $nb_item;$i++) {
    -00637     if ( $a_good[$i] == ""  ) continue;
    -00638     $poste=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_ACCOUNT);
    -00639           
    -00640     // don't record operation of 0
    -00641     if ( $a_price[$i]*$a_quant[$i] == 0 ) continue;
    -00642           
    -00643     // record into jrnx
    -00644     $j_id=InsertJrnx($p_cn,'c',$p_user->id,$p_jrn,$poste,$e_date,round($a_price[$i]*$a_quant[$i],2),$seq,$periode);
    -00645     if ( $j_id == false) { $Rollback($p_cn);exit("error 'user_form_ven.php' __LINE__");}
    -00646     // always save quantity but in withStock we can find what card need a stock management
    -00647     if (  InsertStockGoods($p_cn,$j_id,$a_good[$i],$a_quant[$i],'c') == false ) {
    -00648       $Rollback($p_cn);exit("error 'user_form_ven.php' __LINE__");}
    -00649     } // end loop
    -00650   
    -00651   // Insert Vat
    -00652 
    -00653   if ( $a_vat_new  !=  null  ) // no vat
    -00654 
    -00655     {
    -00656       foreach ($a_vat_new as $tva_id => $tva_amount ) {
    -00657         $poste=GetTvaPoste($p_cn,$tva_id,'c');
    -00658         if ($tva_amount == 0 ) continue;
    -00659         $r=InsertJrnx($p_cn,'c',$p_user->id,$p_jrn,$poste,$e_date,round($tva_amount,2),$seq,$periode);
    -00660         if ( $r == false ) { Rollback($p_cn); exit(" Error 'user_form_ven.php' __LINE__");}
    -00661       
    -00662       }
    -00663     }
    -00664   echo_debug('user_form_ven.php',__LINE__,"echeance = $e_ech");
    -00665   $r=InsertJrn($p_cn,$e_date,$e_ech,$p_jrn,"Invoice",round($amount_jrn,2)+round($sum_vat,2),$seq,$periode);
    -00666   if ( $r == false ) { Rollback($p_cn); exit(" Error 'user_form_ven.php' __LINE__");}
    -00667   // Set Internal code and Comment
    -00668   $internal=SetInternalCode($p_cn,$seq,$p_jrn);
    -00669   $comment=(FormatString($e_comm) == null )?$internal."  client : ".GetFicheName($p_cn,$e_client):FormatString($e_comm);
    -00670 
    -00671   // Update and set the invoice's comment 
    -00672   $Res=ExecSql($p_cn,"update jrn set jr_comment='".$comment."' where jr_grpt_id=".$seq);
    -00673   if ( $Res == false ) { Rollback($p_cn); exit(" Error 'user_form_ven.php' __LINE__"); };
    -00674 
    -00675   if ( isset ($_FILES))
    -00676     save_upload_document($p_cn,$seq);
    -00677 
    -00678 // save the quantity, then we can make an invoice
    -00679   for ( $i=0;$i < $nb_item;$i++) 
    -00680         {
    -00681         // don't record operation of 0
    -00682         if ( $a_price[$i]*$a_quant[$i] == 0 ) continue;
    -00683         
    -00684         // insert into the table quant_sold
    -00685         // Note that negative value are also saved but not the vat !
    -00686         if (  $a_vat[$i] == -1) {
    -00687                 $computed_vat=0;
    -00688                 $vat_code="null";
    -00689         } else {
    -00690                 $computed_vat=ComputeVat($p_cn,$a_good[$i],$a_quant[$i],$a_price[$i],$a_vat[$i]);
    -00691                 $vat_code=$a_vat[$i];
    -00692         }
    -00693          $r=ExecSql($p_cn,"select insert_quant_sold ".
    -00694                     "('".$internal."','".$a_good[$i]."',".$a_quant[$i].",".$a_price[$i]*$a_quant[$i].
    -00695                     ",".$computed_vat.
    -00696                     ",".$vat_code.",'".$e_client."')");
    -00697          if ( $r == false ) { Rollback($p_cn); exit(" Error 'user_form_ven.php' __LINE__"); };
    -00698         }
    -00699   Commit($p_cn);
    -00700 
    -00701   return $comment;
    -00702 }
    -00703 
    -00704 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00342 // Check if the fiche is in the jrn +00343 if (IsFicheOfJrn($p_cn , $p_jrn, $e_client,'deb') == 0 ) +00344 { +00345 $msg="Client invalid please recheck"; +00346 echo_error($msg); +00347 echo "<SCRIPT>alert('$msg');</SCRIPT>"; +00348 return null; +00349 } +00350 +00351 // check if all e_march are in fiche +00352 for ($i=0;$i<$p_number;$i++) { +00353 if ( trim(${"e_march$i"}) == "" ) { +00354 // no goods to sell +00355 continue; +00356 } +00357 +00358 +00359 // Check +00360 if ( isFicheOfJrn($p_cn,$p_jrn,${"e_march$i"},'cred') == 0 ) { +00361 $msg="Fiche inexistante !!! "; +00362 echo_error($msg); echo_error($msg); +00363 echo "<SCRIPT>alert('$msg');</SCRIPT>"; +00364 return null; +00365 } +00366 // check if the ATTR_DEF_ACCOUNT is set +00367 $poste=GetFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_ACCOUNT); +00368 if ( $poste == null ) +00369 { +00370 $msg="La fiche ".${"e_march$i"}." n\'a pas de poste comptable"; +00371 echo_error($msg); echo_debug('user_form_ven.php',__LINE__,$msg); +00372 echo "<SCRIPT>alert('$msg');</SCRIPT>"; +00373 return null; +00374 +00375 } +00376 if ( strlen(trim($poste))==0 ) +00377 { +00378 $msg="La fiche ".$tiers." n\'a pas de poste comptable"; +00379 echo_error($msg); echo_debug('user_form_ven.php',__LINE__,$msg); +00380 echo "<SCRIPT>alert('$msg');</SCRIPT>"; +00381 } +00382 +00383 } +00384 // Verify the userperiode +00385 +00386 // p_periode contient la periode par default +00387 list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode); +00388 +00389 // Date dans la periode active +00390 echo_debug ('user_form_ven',__LINE__,"date start periode $l_date_start date fin periode $l_date_end date demande $e_date"); +00391 if ( cmpDate($e_date,$l_date_start)<0 || +00392 cmpDate($e_date,$l_date_end)>0 ) +00393 { +00394 $msg="Not in the active periode please change your preference"; +00395 echo_error($msg); echo_error($msg); +00396 echo "<SCRIPT>alert('$msg');</SCRIPT>"; +00397 return null; +00398 } +00399 // Periode ferme +00400 if ( PeriodeClosed ($p_cn,$p_periode)=='t' ) +00401 { +00402 $msg="This periode is closed please change your preference"; +00403 echo_error($msg); echo_error($msg); +00404 echo "<SCRIPT>alert('$msg');</SCRIPT>"; +00405 return null; +00406 } +00407 return true; +00408 } +00425 function FormVenteView ($p_cn,$p_jrn,$p_periode,$p_array,$p_number,$p_doc='form',$p_comment='') +00426 { +00427 $r=""; +00428 $data=""; +00429 // Keep all the data if hidden +00430 // and store the array in variables +00431 $hidden=new widget("hidden"); +00432 foreach ($p_array as $name=>$content) { +00433 $data.=$hidden->IOValue($name,$content); +00434 ${"$name"}=$content; +00435 } +00436 +00437 // start table +00438 $r.='<TABLE>'; +00439 // Show the Date +00440 $r.="<tr>"; +00441 $r.="<TD>Date : $e_date</TD>"; +00442 $r.="</tr>"; +00443 // Show the customer Name +00444 $r.="<tr>"; +00445 $r.="<TD>Client : ".getFicheName($p_cn,$e_client)."</TD>"; +00446 $r.="</tr>"; +00447 +00448 // show date limit +00449 $r.="<tr>"; +00450 $r.="<TD> Echeance : $e_ech </TD>"; +00451 $r.="</tr>"; +00452 // Show desc +00453 $r.="<tr>"; +00454 $r.="<TD> Description : $e_comm</TD>"; +00455 $r.="</tr>"; +00456 +00457 $sum_with_vat=0.0; +00458 $sum_march=0.0; +00459 // show all article, price vat and sum +00460 $r.="<TR>"; +00461 $r.="<TH>Article</TH>"; +00462 $r.="<TH>quantité</TH>"; +00463 $r.="<TH>prix unit.</TH>"; +00464 $r.="<TH>taux tva</TH>"; +00465 $r.="<TH>Montant HTVA</TH>"; +00466 $r.="<TH>Montant TVA</TH>"; +00467 $r.="<TH>Total</TH>"; +00468 $r.="</TR>"; +00469 for ($i=0;$i<$p_number;$i++) { +00470 if ( trim(${"e_march$i"}) == "" ) { +00471 // no goods to sell +00472 continue; +00473 } +00474 +00475 // Get the name +00476 $fiche_name=getFicheName($p_cn,${"e_march$i"}); +00477 +00478 // Quantity +00479 $fiche_quant=${"e_quant$i"}; +00480 +00481 // No row if there is quantity +00482 if ( $fiche_quant == 0.0 ) continue; +00483 +00484 +00485 // If the price is not a number, retrieve the price from the database +00486 if ( isNumber(${"e_march$i"."_sell"}) == 0 ) { +00487 $fiche_price=getFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_PRIX_VENTE); +00488 } else { +00489 $fiche_price=${"e_march$i"."_sell"}; +00490 } +00491 +00492 +00493 // VAT +00494 $vat=(isNumber(${"e_march$i"."_tva_id"})==0)?getFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_TVA):${"e_march$i"."_tva_id"}; +00495 +00496 // vat label +00497 // vat rate +00498 $a_vat=GetTvaRate($p_cn,$vat); +00499 if ( $a_vat == null ) { +00500 $vat_label=""; +00501 $vat_rate=0.0; +00502 } else { +00503 $vat_label=$a_vat['tva_label']; +00504 $vat_rate=$a_vat['tva_rate']; +00505 } +00506 +00507 // Total card without vat +00508 $fiche_sum=$fiche_price*$fiche_quant; +00509 // Sum of invoice +00510 $sum_march+=$fiche_sum; +00511 // vat of the card +00512 $fiche_amount_vat=$fiche_price*$fiche_quant*$vat_rate; +00513 // value card + vat +00514 $fiche_with_vat=$fiche_price*$fiche_quant*(1+$vat_rate); +00515 // Sum of invoice vat +00516 $sum_with_vat+=$fiche_with_vat; +00517 // Show the data +00518 $r.='<TR>'; +00519 $r.='<TD>'.$fiche_name.'</TD>'; +00520 $r.='<TD ALIGN="CENTER">'.$fiche_quant.'</TD>'; +00521 $r.='<TD ALIGN="right">'.$fiche_price.'</TD>'; +00522 $r.="<TD ALIGN=\"RIGHT\"> $vat_label </TD>"; +00523 $r.='<TD ALIGN="RIGHT">'.round($fiche_sum,2).'</TD>'; +00524 $r.='<TD ALIGN="RIGHT">'.round($fiche_amount_vat,2).'</TD>'; +00525 +00526 $r.='<TD>'.round($fiche_with_vat,2).'</TD>'; +00527 +00528 $r.="</TR>"; +00529 } +00530 +00531 // end table +00532 $r.='</TABLE> '; +00533 $r.='<DIV style="padding:30px;font-size:14px">'; +00534 $r.="Total HTVA =".round( $sum_march,2)." <br>"; +00535 $r.="Total = ".round($sum_with_vat,2); +00536 +00537 +00538 $r.="</DIV>"; +00539 if ( $p_doc == 'form' ) { +00540 // Compute href +00541 $href=$_SERVER['SCRIPT_NAME']; +00542 switch ($href) +00543 { +00544 // user_jrn.php +00545 case '/user_jrn.php': +00546 $href="user_jrn.php?action=record&p_jrn=$p_jrn"; +00547 break; +00548 case '/commercial.php': +00549 $href="commercial.php?p_action=facture&sa=record&p_jrn=$p_jrn"; +00550 break; +00551 default: +00552 echo_error('user_form_ven.php',__LINE__,'Erreur invalid request uri'); +00553 exit (-1); +00554 } +00555 +00556 +00557 $r.='<FORM METHOD="POST" enctype="multipart/form-data" ACTION="'.$href.'">'; +00558 // if we create the invoice from the accountancy module, appl. propose +00559 // to upload a invoice +00560 if ( $_SERVER['SCRIPT_NAME'] == '/user_jrn.php') +00561 { +00562 // check for upload piece +00563 $file=new widget("file"); +00564 $file->table=1; +00565 $r.="<hr>"; +00566 $r.= "<table>"; +00567 $r.="<TR>".$file->IOValue("pj","","Pièce justificative")."</TR>"; +00568 $r.="</table>"; +00569 $r.="<hr>"; +00570 +00571 } +00572 // if we were in the management module, appl. propose to generate an invoice +00573 if ( $_SERVER['SCRIPT_NAME'] == '/commercial.php') +00574 { +00575 // if a template exists propose to choose an invoice template +00576 if ( CountSql($p_cn, +00577 "select md_id,md_name from document_modele where md_type=4") > 0 ) +00578 { +00579 $r.='G&eacute;n&eacute;rer une facture <input type="checkbox" name="gen_invoice" CHECKED>'; +00580 // We propose to generate the invoice and some template +00581 $doc_gen=new widget("select"); +00582 $doc_gen->name="gen_doc"; +00583 $doc_gen->value=make_array($p_cn, +00584 "select md_id,md_name from document_modele where md_type=4"); +00585 $r.=$doc_gen->IOValue(); +00586 +00587 $r.="<hr>"; +00588 } +00589 } +00590 +00591 +00592 $r.=$data; +00593 if ( $sum_with_vat != 0 ) { +00594 $r.='<INPUT TYPE="SUBMIT" name="record_and_print_invoice" value="Sauver" >'; +00595 } +00596 $r.='<INPUT TYPE="SUBMIT" name="correct_new_invoice" value="Corriger">'; +00597 +00598 $r.='</FORM>'; +00599 } +00600 return $r; +00601 +00602 } +00603 +00630 function RecordInvoice($p_cn,$p_array,$p_user,$p_jrn) +00631 { +00632 foreach ( $p_array as $v => $e) +00633 { +00634 ${"$v"}=$e; +00635 } +00636 +00637 // Get the default period +00638 $periode=$p_user->GetPeriode(); +00639 $amount=0.0; +00640 $amount_jrn=0.0; +00641 // Computing total customer +00642 //-- +00643 for ($i=0;$i<$nb_item;$i++) { +00644 // store quantity & goods in array +00645 $a_good[$i]=${"e_march$i"}; +00646 $a_quant[$i]=${"e_quant$i"}; +00647 $a_price[$i]=0; +00648 $a_vat[$i]=${"e_march$i"."_tva_id"}; +00649 // check whether the price is set or no +00650 if ( isNumber(${"e_march$i"."_sell"}) == 0 ) { +00651 if ( $a_good[$i] != "" ) { +00652 // If the price is not set we have to find it from the database +00653 $a_price[$i]=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_PRIX_VENTE); +00654 } +00655 } else { +00656 // The price is valid +00657 $a_price[$i]=${"e_march$i"."_sell"}; +00658 } +00659 $cost=$a_price[$i]*$a_quant[$i]; +00660 $amount+=$cost; +00661 $amount_jrn+=$cost; +00662 }// for +00663 +00664 $comm=FormatString($e_comm); +00665 // Compute VAT +00666 //-- +00667 $a_vat_new=ComputeTotalVat($p_cn,$a_good,$a_quant,$a_price,$a_vat); +00668 $sum_vat=0.0; +00669 if ( $a_vat_new != null ){ +00670 foreach ( $a_vat_new as $element => $t) { +00671 echo_debug('user_form_ven.php',__LINE__," a_vat element $element t $t"); +00672 $sum_vat+=$t; +00673 echo_debug('user_form_ven.php',__LINE__,"sum_vat = $sum_vat"); +00674 } +00675 } +00676 // First we add in jrnx +00677 +00678 // Compute the j_grpt +00679 $seq=NextSequence($p_cn,'s_grpt'); +00680 +00681 +00682 // Debit = client +00683 $poste=GetFicheAttribut($p_cn,$e_client,ATTR_DEF_ACCOUNT); +00684 StartSql($p_cn); +00685 $r=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($amount,2)+round($sum_vat,2),$seq,$periode); +00686 if ( $r == false) { $Rollback($p_cn);exit("error 'user_form_ven.php' __LINE__");} +00687 +00688 // Credit = goods +00689 for ( $i = 0; $i < $nb_item;$i++) { +00690 if ( $a_good[$i] == "" ) continue; +00691 $poste=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_ACCOUNT); +00692 +00693 // don't record operation of 0 +00694 if ( $a_price[$i]*$a_quant[$i] == 0 ) continue; +00695 +00696 // record into jrnx +00697 $j_id=InsertJrnx($p_cn,'c',$p_user->id,$p_jrn,$poste,$e_date,round($a_price[$i]*$a_quant[$i],2),$seq,$periode); +00698 if ( $j_id == false) { $Rollback($p_cn);exit("error 'user_form_ven.php' __LINE__");} +00699 // always save quantity but in withStock we can find what card need a stock management +00700 if ( InsertStockGoods($p_cn,$j_id,$a_good[$i],$a_quant[$i],'c') == false ) { +00701 $Rollback($p_cn);exit("error 'user_form_ven.php' __LINE__");} +00702 } // end loop +00703 +00704 // Insert Vat +00705 +00706 if ( $a_vat_new != null ) // no vat +00707 +00708 { +00709 foreach ($a_vat_new as $tva_id => $tva_amount ) { +00710 $poste=GetTvaPoste($p_cn,$tva_id,'c'); +00711 if ($tva_amount == 0 ) continue; +00712 $r=InsertJrnx($p_cn,'c',$p_user->id,$p_jrn,$poste,$e_date,round($tva_amount,2),$seq,$periode); +00713 if ( $r == false ) { Rollback($p_cn); exit(" Error 'user_form_ven.php' __LINE__");} +00714 +00715 } +00716 } +00717 echo_debug('user_form_ven.php',__LINE__,"echeance = $e_ech"); +00718 $r=InsertJrn($p_cn,$e_date,$e_ech,$p_jrn,"Invoice",round($amount_jrn,2)+round($sum_vat,2),$seq,$periode); +00719 if ( $r == false ) { Rollback($p_cn); exit(" Error 'user_form_ven.php' __LINE__");} +00720 // Set Internal code and Comment +00721 $internal=SetInternalCode($p_cn,$seq,$p_jrn); +00722 $comment=(FormatString($e_comm) == null )?$internal." client : ".GetFicheName($p_cn,$e_client):FormatString($e_comm); +00723 +00724 // Update and set the invoice's comment +00725 $Res=ExecSql($p_cn,"update jrn set jr_comment='".$comment."' where jr_grpt_id=".$seq); +00726 if ( $Res == false ) { Rollback($p_cn); exit(" Error 'user_form_ven.php' __LINE__"); }; +00727 +00728 if ( isset ($_FILES)) { +00729 if ( sizeof($_FILES) != 0 ) +00730 save_upload_document($p_cn,$seq); +00731 } +00732 +00733 // save the quantity, then we can make an invoice +00734 for ( $i=0;$i < $nb_item;$i++) +00735 { +00736 // don't record operation of 0 +00737 if ( $a_price[$i]*$a_quant[$i] == 0 ) continue; +00738 +00739 // insert into the table quant_sold +00740 // Note that negative value are also saved but not the vat ! +00741 if ( $a_vat[$i] == -1) { +00742 $computed_vat=0; +00743 $vat_code="null"; +00744 } else { +00745 $computed_vat=ComputeVat($p_cn,$a_good[$i],$a_quant[$i],$a_price[$i],$a_vat[$i]); +00746 $vat_code=$a_vat[$i]; +00747 } +00748 $r=ExecSql($p_cn,"select insert_quant_sold ". +00749 "('".$internal."','".$a_good[$i]."',".$a_quant[$i].",".$a_price[$i]*$a_quant[$i]. +00750 ",".$computed_vat. +00751 ",".$vat_code.",'".$e_client."')"); +00752 if ( $r == false ) { Rollback($p_cn); exit(" Error 'user_form_ven.php' __LINE__"); }; +00753 } +00754 Commit($p_cn); +00755 return $comment; +00756 } +00757 +00758 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__form__ven_8php.html b/doc/developper/html/user__form__ven_8php.html index 1bd2f5470..9c507f356 100644 --- a/doc/developper/html/user__form__ven_8php.html +++ b/doc/developper/html/user__form__ven_8php.html @@ -4,24 +4,35 @@ - + -

    user_form_ven.php File Reference

    +

    user_form_ven.php File Reference

    Functions for the ledger of sold. More... +

    +

    Go to the source code of this file. + + + +

    Functions

     FormVenInput ($p_cn, $p_jrn, $p_periode, $p_array=null, $pview_only=true, $p_article=1)
     Display the form for a sell Used to show detail, encode a new invoice or update one.
     form_verify_input ($p_cn, $p_jrn, $p_periode, $p_array, $p_number)
     verify if the data to insert are valid
     FormVenteView ($p_cn, $p_jrn, $p_periode, $p_array, $p_number, $p_doc='form', $p_comment='')
     Show the invoice before inserting it the database.
     RecordInvoice ($p_cn, $p_array, $p_user, $p_jrn)
     Record an invoice in the table jrn & jrnx.
    -


    Function Documentation

    +

    Detailed Description

    +Functions for the ledger of sold. +

    + +

    +Definition in file user_form_ven.php.


    Function Documentation

    @@ -74,11 +85,21 @@ +References CountSql(), echo_debug(), echo_error(), isDate(), isNumber(), and name.

    +verify if the data to insert are valid +

    +form_verify_input

    +parm :

      +
    • p_cn database connection
    +

    +p_jrn concerned ledger

      +
    • User periode
    • array with the post data
    • p_number number of items gen :
        +
      • return:
      +

    -Definition at line 267 of file user_form_ven.php. +Definition at line 284 of file user_form_ven.php.

    -References CountSql(), echo_debug(), echo_error(), isDate(), isNumber(), and name.

    @@ -139,11 +160,22 @@ References CountSql(),

    +Display the form for a sell Used to show detail, encode a new invoice or update one. +

    +FormVenInput

    +

    Parameters:
    + + +
    p_array which can be empty
      +
    • the "journal"
    • $p_periode = periode
    • view_only if we cannot change it (no right or centralized op)
    • $p_article number of article
    +
    +
    +
    Returns:
    string with the form TODO Add in parameters the infos about the company for making the invoice

    -Definition at line 42 of file user_form_ven.php. +Definition at line 43 of file user_form_ven.php.

    -References $fiche, $list, $p_jrn, $r, $sql, echo_debug(), echo_error(), GetArray(), GetPeriode(), isNumber(), and make_array(). +References $fiche, $list, $p_jrn, $r, $sql, echo_debug(), echo_error(), exit, GetArray(), GetPeriode(), isNumber(), and make_array().

    @@ -210,11 +242,25 @@ References $fiche

    +Show the invoice before inserting it the database. +

    +FormVenteView ($p_cn,$p_jrn,$p_periode,$p_array,$p_number,$p_doc='html',$p_comment='')

    +

    Parameters:
    + + + + + + + +
    p_cn database connection
    p_jrn journal
    p_periode 
    array of value
    nb of item
    p_doc type pdf or html
    +
    +
    Returns:
    string

    -Definition at line 411 of file user_form_ven.php. +Definition at line 425 of file user_form_ven.php.

    -References $a_vat, $data, $file, $r, getFicheAttribut(), getFicheName(), GetTvaRate(), isNumber(), METHOD, name, and value. +References $a_vat, $data, $file, $r, CountSql(), echo_error(), exit, getFicheAttribut(), getFicheName(), GetTvaRate(), isNumber(), make_array(), METHOD, name, and value.

    @@ -263,14 +309,28 @@ References $a_vat

    +Record an invoice in the table jrn & jrnx. +

    +RecordInvoice($p_cn,$p_array,$p_user,$p_jrn)

    +

    Parameters:
    + + + + + +
    $p_cn Database connection
    $p_array array contains all the invoice data
      +
    • e_date => e : 01.01.2003
    • e_client => e : 3
    • nb_item => e : 3
    • e_march0 => e : 6
    • e_quant0 => e : 0
    • e_march0_sell=>e:1
    • e_march1 => e : 6
    • e_quant1 => e : 2
    • e_march1_sell=>e:1
    • e_march2 => e : 7
    • e_quant2 => e : 3
    • e_march2_sell=>e:1 * V : view_invoice => e : Voir cette facture * V : record_invoice => e : Sauver
    +
    $p_periode periode
    $p_jrn current folder (journal)
    +
    +
    Returns:
    true on success

    -Definition at line 577 of file user_form_ven.php. +Definition at line 630 of file user_form_ven.php.

    -References $a_vat, $amount, $comment, $e, $i, $poste, $r, $Res, $seq, $sum_vat, $t, Commit(), ComputeTotalVat(), ComputeVat(), echo_debug(), ExecSql(), exit, FormatString(), GetTvaPoste(), InsertJrn(), InsertJrnx(), InsertStockGoods(), isNumber(), NextSequence(), Rollback(), save_upload_document(), SetInternalCode(), and StartSql(). +References $a_vat, $amount, $comment, $e, $i, $poste, $r, $Res, $seq, $sum_vat, $t, Commit(), ComputeTotalVat(), ComputeVat(), echo_debug(), ExecSql(), exit, FormatString(), GetTvaPoste(), InsertJrn(), InsertJrnx(), InsertStockGoods(), isNumber(), NextSequence(), Rollback(), save_upload_document(), SetInternalCode(), and StartSql(). -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__impress_8php-source.html b/doc/developper/html/user__impress_8php-source.html index 2813814e4..2b7f7f520 100644 --- a/doc/developper/html/user__impress_8php-source.html +++ b/doc/developper/html/user__impress_8php-source.html @@ -4,7 +4,7 @@ - +

    user_impress.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,87 +27,87 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 include_once ("ac_common.php");
    -00022 html_page_start($_SESSION['g_theme']);
    -00023 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00024   echo "You must choose a Dossier ";
    -00025   exit -2;
    -00026 }
    -00027 include_once ("postgres.php");
    -00028 /* Admin. Dossier */
    -00029 $cn=DbConnect($_SESSION['g_dossier']);
    -00030 
    -00031 
    -00032 include ('class_user.php');
    -00033 $User=new cl_user($cn);
    -00034 $User->Check();
    +00025 include_once ("ac_common.php");
    +00026 html_page_start($_SESSION['g_theme']);
    +00027 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00028   echo "You must choose a Dossier ";
    +00029   exit -2;
    +00030 }
    +00031 include_once ("postgres.php");
    +00032 /* Admin. Dossier */
    +00033 $cn=DbConnect($_SESSION['g_dossier']);
    +00034 
     00035 
    -00036 include ("check_priv.php");
    -00037 include_once ("user_menu.php");
    -00038 echo '<div class="u_tmenu">';
    +00036 include ('class_user.php');
    +00037 $User=new cl_user($cn);
    +00038 $User->Check();
     00039 
    -00040 echo ShowMenuCompta($_SESSION['g_dossier']);
    -00041 echo '</div>';
    -00042 // show sub menu
    +00040 include ("check_priv.php");
    +00041 include_once ("user_menu.php");
    +00042 echo '<div class="u_tmenu">';
     00043 
    -00044 echo "<DIV class=\"u_subtmenu\">";
    -00045 
    -00046 
    -00047 $p_array=array(array ("user_impress.php?type=jrn","Journaux"),
    -00048                array("user_impress.php?type=poste","Poste"),
    -00049                array("user_impress.php?type=fiche","Fiche"),
    -00050                array("user_impress.php?type=rapport","Rapport"),
    -00051                array('user_impress.php?type=bal','Balance des comptes'),
    -00052                array("user_impress.php?type=bilan","Bilan"),
    -00053                array("user_impress.php?type=list_client","Liste Clients Assujettis")
    -00054                );
    -00055 $default=( isset ($_GET['type']))?"user_impress.php?type=".$_GET['type']:"";
    -00056 $result=ShowItem($p_array,'H',"cell","mtitle",$default);
    -00057 echo $result;
    -00058 
    -00059 echo "</DIV>";
    -00060 
    -00061 
    -00062 include_once("impress_inc.php");
    -00063 
    -00064 if ( $User->admin == 0 ) {
    -00065   if (CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],IMP) == 0 ){
    -00066     /* Cannot Access */
    -00067     NoAccess();
    -00068   }
    -00069 }
    -00070 
    -00071 // something is choosen
    -00072 $default=( isset ($_REQUEST['type']))?$_REQUEST['type']:"";
    -00073   switch ($default) {
    -00074   case "jrn":
    -00075     include ("impress_jrn.php");
    -00076     break;
    -00077   case "poste":
    -00078     include ("impress_poste.php");
    -00079     break;
    -00080   case "rapport":
    -00081     include ("impress_rapport.php");
    -00082     break;
    -00083   case "bilan":
    -00084     include ("impress_bilan.php");
    -00085     break;
    -00086 
    -00087   case "bal":
    -00088     include ("balance.php");
    +00044 echo ShowMenuCompta($_SESSION['g_dossier']);
    +00045 echo '</div>';
    +00046 // show sub menu
    +00047 
    +00048 echo "<DIV class=\"u_subtmenu\">";
    +00049 
    +00050 
    +00051 $p_array=array(array ("user_impress.php?type=jrn","Journaux"),
    +00052                array("user_impress.php?type=poste","Poste"),
    +00053                array("user_impress.php?type=fiche","Fiche"),
    +00054                array("user_impress.php?type=rapport","Rapport"),
    +00055                array('user_impress.php?type=bal','Balance des comptes'),
    +00056                array("user_impress.php?type=bilan","Bilan"),
    +00057                array("user_impress.php?type=list_client","Liste Clients Assujettis")
    +00058                );
    +00059 $default=( isset ($_GET['type']))?"user_impress.php?type=".$_GET['type']:"";
    +00060 $result=ShowItem($p_array,'H',"cell","mtitle",$default);
    +00061 echo $result;
    +00062 
    +00063 echo "</DIV>";
    +00064 
    +00065 
    +00066 include_once("impress_inc.php");
    +00067 
    +00068 if ( $User->admin == 0 ) {
    +00069   if (CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],IMP) == 0 ){
    +00070     /* Cannot Access */
    +00071     NoAccess();
    +00072   }
    +00073 }
    +00074 
    +00075 // something is choosen
    +00076 $default=( isset ($_REQUEST['type']))?$_REQUEST['type']:"";
    +00077   switch ($default) {
    +00078   case "jrn":
    +00079     include ("impress_jrn.php");
    +00080     break;
    +00081   case "poste":
    +00082     include ("impress_poste.php");
    +00083     break;
    +00084   case "rapport":
    +00085     include ("impress_rapport.php");
    +00086     break;
    +00087   case "bilan":
    +00088     include ("impress_bilan.php");
     00089     break;
    -00090   case "fiche":
    -00091     include ("impress_fiche.php");
    -00092     break;
    -00093   case "list_client":
    -00094     include ("impress_listing_client.php");
    -00095     break;
    -00096 
    -00097   }
    -00098 
    -00099 html_page_stop();
    -00100 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00090 +00091 case "bal": +00092 include ("balance.php"); +00093 break; +00094 case "fiche": +00095 include ("impress_fiche.php"); +00096 break; +00097 case "list_client": +00098 include ("impress_listing_client.php"); +00099 break; +00100 +00101 } +00102 +00103 html_page_stop(); +00104 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__impress_8php.html b/doc/developper/html/user__impress_8php.html index e7255d034..02f8e8eea 100644 --- a/doc/developper/html/user__impress_8php.html +++ b/doc/developper/html/user__impress_8php.html @@ -4,10 +4,12 @@ - + -

    user_impress.php File Reference

    +

    user_impress.php File Reference

    Main page for the printing. More... +

    +

    Go to the source code of this file. @@ -37,7 +39,12 @@
    case list_client
    -


    Variable Documentation

    +

    Detailed Description

    +Main page for the printing. +

    + +

    +Definition in file user_impress.php.


    Variable Documentation

    @@ -60,7 +67,7 @@

    -Definition at line 29 of file user_impress.php. +Definition at line 33 of file user_impress.php.

    @@ -85,9 +92,9 @@ Definition at line 29

    -Definition at line 55 of file user_impress.php. +Definition at line 59 of file user_impress.php.

    -Referenced by ShowMenuCompta(). +Referenced by ShowMenuCompta().

    @@ -120,9 +127,9 @@ Referenced by ShowMenuCo )

    -Definition at line 47 of file user_impress.php. +Definition at line 51 of file user_impress.php.

    -Referenced by ShowJrn(), ShowMenuCompta(), and u_ShowDossier(). +Referenced by ShowJrn(), ShowMenuCompta(), and u_ShowDossier().

    @@ -147,7 +154,7 @@ Referenced by ShowJrn()<

    -Definition at line 56 of file user_impress.php. +Definition at line 60 of file user_impress.php.

    @@ -172,7 +179,7 @@ Definition at line 56

    -Definition at line 33 of file user_impress.php. +Definition at line 37 of file user_impress.php.

    @@ -197,7 +204,7 @@ Definition at line 33

    -Definition at line 88 of file user_impress.php. +Definition at line 92 of file user_impress.php.

    @@ -222,7 +229,7 @@ Definition at line 88

    -Definition at line 84 of file user_impress.php. +Definition at line 88 of file user_impress.php.

    @@ -247,7 +254,7 @@ Definition at line 84

    -Definition at line 76 of file user_impress.php. +Definition at line 80 of file user_impress.php.

    @@ -272,7 +279,9 @@ Definition at line 76

    -Definition at line 91 of file user_impress.php. +Definition at line 95 of file user_impress.php. +

    +Referenced by action::Confirm(), action::Display(), action::myList(), Document::Replace(), and action::SaveStage2().

    @@ -297,7 +306,7 @@ Definition at line 91

    -Definition at line 94 of file user_impress.php. +Definition at line 98 of file user_impress.php.

    @@ -322,9 +331,9 @@ Definition at line 94

    -Definition at line 78 of file user_impress.php. +Definition at line 82 of file user_impress.php.

    -Referenced by ParseFormula(), and Customer::Summary(). +Referenced by ParseFormula(), and Customer::Summary().

    @@ -349,10 +358,10 @@ Referenced by ParseFor

    -Definition at line 81 of file user_impress.php. +Definition at line 85 of file user_impress.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__jrn_8php-source.html b/doc/developper/html/user__jrn_8php-source.html index 22476d2d1..8022aa7c3 100644 --- a/doc/developper/html/user__jrn_8php-source.html +++ b/doc/developper/html/user__jrn_8php-source.html @@ -4,7 +4,7 @@ - +

    user_jrn.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,116 +27,116 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 include_once("ac_common.php");
    -00022 include_once("user_menu.php");
    -00023 include_once ("constant.php");
    -00024 include_once ("postgres.php");
    -00025 include_once ("check_priv.php");
    -00026 include_once ("class_widget.php");
    -00027 require_once("jrn.php");
    -00028 
    -00029 $cn=DbConnect($_SESSION['g_dossier']);
    -00030 include ('class_user.php');
    -00031 $User=new cl_user($cn);
    -00032 $User->Check();
    -00033 
    -00034 html_page_start($User->theme, 
    -00035          "OnLoad=\"SetFocus('e_date',0); AttachEvent(document, 'keydown', HandleSubmit, true);\" ");
    -00036 
    -00037 // Check if dossier set
    -00038 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00039   echo "You must choose a Dossier ";
    -00040   exit -2;
    -00041 }
    -00042 /* Get the _REQUEST value for p_jrn (jrn_def.jrn_def_id) and jrn_type (jrn_def.jrn_def_code) */
    -00043 $p_jrn=(isset($_REQUEST['p_jrn']))?$_REQUEST['p_jrn']:-1;
    -00044 $jrn_type=(isset($_REQUEST['jrn_type']))?$_REQUEST['jrn_type']:-1;
    -00045 
    -00046 
    -00047 echo '<div class="u_tmenu">';
    -00048 echo ShowMenuCompta($_SESSION['g_dossier']);
    -00049 echo '</div>';
    +00025 include_once("ac_common.php");
    +00026 include_once("user_menu.php");
    +00027 include_once ("constant.php");
    +00028 include_once ("postgres.php");
    +00029 include_once ("check_priv.php");
    +00030 include_once ("class_widget.php");
    +00031 require_once("jrn.php");
    +00032 
    +00033 $cn=DbConnect($_SESSION['g_dossier']);
    +00034 include ('class_user.php');
    +00035 $User=new cl_user($cn);
    +00036 $User->Check();
    +00037 
    +00038 html_page_start($User->theme, 
    +00039          "OnLoad=\"SetFocus('e_date',0); AttachEvent(document, 'keydown', HandleSubmit, true);\" ");
    +00040 
    +00041 // Check if dossier set
    +00042 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00043   echo "You must choose a Dossier ";
    +00044   exit -2;
    +00045 }
    +00046 /* Get the _REQUEST value for p_jrn (jrn_def.jrn_def_id) and jrn_type (jrn_def.jrn_def_code) */
    +00047 $p_jrn=(isset($_REQUEST['p_jrn']))?$_REQUEST['p_jrn']:-1;
    +00048 $jrn_type=(isset($_REQUEST['jrn_type']))?$_REQUEST['jrn_type']:-1;
    +00049 
     00050 
    -00051 if ( $User->admin == 0 ) {
    -00052   // check if user can access
    -00053   if (CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],ENCJRN) == 0 ){
    -00054     /* Cannot Access */
    -00055     NoAccess();
    -00056   }
    -00057   // if a jrn is asked
    -00058   if ( $p_jrn != -1 ) {
    -00059           if (CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$p_jrn) == 0 ){
    -00060             /* Cannot Access */
    -00061             NoAccess();
    -00062             exit -1;
    -00063           }
    -00064     } // if isset p_jrn
    -00065 
    -00066 }
    -00067 
    -00068 // Show the available jrn
    -00069 $result=ShowJrn("user_jrn.php?jrn_type=".$jrn_type);
    -00070 echo "<div class=\"u_subtmenu\">";
    -00071 echo $result;
    -00072 echo "</div>";
    -00073 
    -00074 
    -00075 
    -00076 // if a journal is selected show the journal's menu
    -00077 if ( $p_jrn != -1 ) 
    -00078 {
    -00079   // display jrn's menu
    -00080 
    -00081   //   echo '</DIV>';
    -00082   echo '<div class="u_subt2menu">';      
    -00083   // show the available ledger of the type jrn_type
    -00084   ShowMenuJrnUser($_SESSION['g_dossier'],$jrn_type,$p_jrn);
    -00085   echo '</div>';
    -00086   echo '<div class="lmenu">';      
    -00087   // show the menu for this journal (Nouveau, voir,...)
    -00088   $menu_jrn=ShowMenuJrn($cn,$jrn_type, $p_jrn);
    -00089   echo $menu_jrn;
    -00090 
    -00091   echo '</div>';
    -00092 
    -00093   $g_dossier=$_SESSION['g_dossier'];
    -00094   $g_user=$_SESSION['g_user'];
    -00095       
    -00096   // Execute Action for p_jrn
    -00097   if ( $jrn_type=='VEN' )     require('user_action_ven.php');
    -00098   if ( $jrn_type=='ACH' )     require('user_action_ach.php');
    -00099   if ( $jrn_type=='FIN' )     require('user_action_fin.php');
    -00100   if ( $jrn_type=='OD' )     require('user_action_ods.php');
    -00101   
    -00102 }
    -00103 else 
    -00104 {
    -00105   if ( $jrn_type=='NONE')
    -00106     {
    -00107       include('user_action_gl.php');
    -00108 
    -00109     } else {
    -00110       // no journal are selected so we select the first one
    -00111       $p_jrn=GetFirstJrnIdForJrnType($_SESSION['g_dossier'],$jrn_type); 
    -00112       // display jrn's menu
    -00113       
    -00114   //   echo '</DIV>';
    -00115       echo '<div class="u_subt2menu">';      
    -00116       ShowMenuJrnUser($_SESSION['g_dossier'],$jrn_type,$p_jrn);
    -00117       echo '</div>';
    -00118       echo '<div class="lmenu">';      
    -00119       $menu_jrn=ShowMenuJrn($cn,$jrn_type, $p_jrn);
    -00120       
    -00121       echo $menu_jrn;
    -00122       echo '</div><br>';
    -00123     }
    -00124 
    -00125 }
    -00126 
    -00127 html_page_stop();
    +00051 echo '<div class="u_tmenu">';
    +00052 echo ShowMenuCompta($_SESSION['g_dossier']);
    +00053 echo '</div>';
    +00054 
    +00055 if ( $User->admin == 0 ) {
    +00056   // check if user can access
    +00057   if (CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],ENCJRN) == 0 ){
    +00058     /* Cannot Access */
    +00059     NoAccess();
    +00060   }
    +00061   // if a jrn is asked
    +00062   if ( $p_jrn != -1 ) {
    +00063           if (CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$p_jrn) == 0 ){
    +00064             /* Cannot Access */
    +00065             NoAccess();
    +00066             exit -1;
    +00067           }
    +00068     } // if isset p_jrn
    +00069 
    +00070 }
    +00071 
    +00072 // Show the available jrn
    +00073 $result=ShowJrn("user_jrn.php?jrn_type=".$jrn_type);
    +00074 echo "<div class=\"u_subtmenu\">";
    +00075 echo $result;
    +00076 echo "</div>";
    +00077 
    +00078 
    +00079 
    +00080 // if a journal is selected show the journal's menu
    +00081 if ( $p_jrn != -1 ) 
    +00082 {
    +00083   // display jrn's menu
    +00084 
    +00085   //   echo '</DIV>';
    +00086   echo '<div class="u_subt2menu">';      
    +00087   // show the available ledger of the type jrn_type
    +00088   ShowMenuJrnUser($_SESSION['g_dossier'],$jrn_type,$p_jrn);
    +00089   echo '</div>';
    +00090   echo '<div class="lmenu">';      
    +00091   // show the menu for this journal (Nouveau, voir,...)
    +00092   $menu_jrn=ShowMenuJrn($cn,$jrn_type, $p_jrn);
    +00093   echo $menu_jrn;
    +00094 
    +00095   echo '</div>';
    +00096 
    +00097   $g_dossier=$_SESSION['g_dossier'];
    +00098   $g_user=$_SESSION['g_user'];
    +00099       
    +00100   // Execute Action for p_jrn
    +00101   if ( $jrn_type=='VEN' )     require('user_action_ven.php');
    +00102   if ( $jrn_type=='ACH' )     require('user_action_ach.php');
    +00103   if ( $jrn_type=='FIN' )     require('user_action_fin.php');
    +00104   if ( $jrn_type=='OD' )     require('user_action_ods.php');
    +00105   
    +00106 }
    +00107 else 
    +00108 {
    +00109   if ( $jrn_type=='NONE')
    +00110     {
    +00111       include('user_action_gl.php');
    +00112 
    +00113     } else {
    +00114       // no journal are selected so we select the first one
    +00115       $p_jrn=GetFirstJrnIdForJrnType($_SESSION['g_dossier'],$jrn_type); 
    +00116       // display jrn's menu
    +00117       
    +00118   //   echo '</DIV>';
    +00119       echo '<div class="u_subt2menu">';      
    +00120       ShowMenuJrnUser($_SESSION['g_dossier'],$jrn_type,$p_jrn);
    +00121       echo '</div>';
    +00122       echo '<div class="lmenu">';      
    +00123       $menu_jrn=ShowMenuJrn($cn,$jrn_type, $p_jrn);
    +00124       
    +00125       echo $menu_jrn;
    +00126       echo '</div><br>';
    +00127     }
     00128 
    -00129 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00129 } +00130 +00131 html_page_stop(); +00132 +00133 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__jrn_8php.html b/doc/developper/html/user__jrn_8php.html index 705fc2178..9e318ea93 100644 --- a/doc/developper/html/user__jrn_8php.html +++ b/doc/developper/html/user__jrn_8php.html @@ -4,10 +4,12 @@ - + -

    user_jrn.php File Reference

    +

    user_jrn.php File Reference

    Main page for encoding in the ledger. More... +

    +

    Go to the source code of this file. @@ -27,7 +29,12 @@
     $g_user = $_SESSION['g_user']
    -


    Variable Documentation

    +

    Detailed Description

    +Main page for encoding in the ledger. +

    + +

    +Definition in file user_jrn.php.


    Variable Documentation

    @@ -50,7 +57,7 @@

    -Definition at line 29 of file user_jrn.php. +Definition at line 33 of file user_jrn.php.

    @@ -75,7 +82,7 @@ Definition at line 29

    -Definition at line 93 of file user_jrn.php. +Definition at line 97 of file user_jrn.php.

    @@ -100,7 +107,7 @@ Definition at line 93

    -Definition at line 94 of file user_jrn.php. +Definition at line 98 of file user_jrn.php.

    @@ -125,7 +132,7 @@ Definition at line 94

    -Definition at line 88 of file user_jrn.php. +Definition at line 92 of file user_jrn.php.

    @@ -150,7 +157,7 @@ Definition at line 88

    -Definition at line 69 of file user_jrn.php. +Definition at line 73 of file user_jrn.php.

    @@ -175,7 +182,7 @@ Definition at line 69

    -Definition at line 31 of file user_jrn.php. +Definition at line 35 of file user_jrn.php.

    @@ -200,10 +207,10 @@ Definition at line 31

    -Definition at line 62 of file user_jrn.php. +Definition at line 66 of file user_jrn.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__login_8php-source.html b/doc/developper/html/user__login_8php-source.html index c20165c86..7fcf0130a 100644 --- a/doc/developper/html/user__login_8php-source.html +++ b/doc/developper/html/user__login_8php-source.html @@ -4,7 +4,7 @@ - +

    user_login.php

    Go to the documentation of this file.
    00001 
    @@ -27,35 +27,35 @@
     00018  *   along with PhpCompta; if not, write to the Free Software
     00019  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     00020 */
    -00021 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00022 // $Revision$
    -00023 include_once ("ac_common.php");
    -00024 include_once("postgres.php");
    -00025 $rep=DbConnect();
    -00026 include_once ("class_user.php");
    -00027 $User=new cl_user($rep);
    -00028 
    -00029 $User->Check();
    -00030 html_page_start($_SESSION['g_theme']);
    -00031 include_once("user_menu.php");
    +00025 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    +00026 // $Revision$
    +00027 include_once ("ac_common.php");
    +00028 include_once("postgres.php");
    +00029 $rep=DbConnect();
    +00030 include_once ("class_user.php");
    +00031 $User=new cl_user($rep);
     00032 
    -00033 $priv=($User->admin==1)?"Administrator":"User";
    -00034 
    -00035 echo '<div class="info"> Welcome '.$User->first_name.'  '.
    -00036      $User->name.',<h3 class="info"> your are an  '. $priv.' <br>Please Select your folder</h3></div>';
    -00037 // Show default menu (preference,...)
    +00033 $User->Check();
    +00034 html_page_start($_SESSION['g_theme']);
    +00035 include_once("user_menu.php");
    +00036 
    +00037 $priv=($User->admin==1)?"Administrator":"User";
     00038 
    -00039 // If admin show everything otherwise only the available dossier
    -00040 $res=u_ShowDossier($_SESSION['g_user'],$User->admin);
    -00041 echo $res;
    -00042 ?>
    -00043 <P>
    -00044 
    -00045 </P>
    -00046 <?
    -00047 html_page_stop();
    -00048 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00039 echo '<div class="info"> Welcome '.$User->first_name.' '. +00040 $User->name.',<h3 class="info"> your are an '. $priv.' <br>Please Select your folder</h3></div>'; +00041 // Show default menu (preference,...) +00042 +00043 // If admin show everything otherwise only the available dossier +00044 $res=u_ShowDossier($_SESSION['g_user'],$User->admin); +00045 echo $res; +00046 ?> +00047 <P> +00048 +00049 </P> +00050 <? +00051 html_page_stop(); +00052 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__login_8php.html b/doc/developper/html/user__login_8php.html index 7250278b1..ba2654ef3 100644 --- a/doc/developper/html/user__login_8php.html +++ b/doc/developper/html/user__login_8php.html @@ -4,10 +4,12 @@ - + -

    user_login.php File Reference

    +

    user_login.php File Reference

    Welcome page where the folder and module are choosen. More... +

    +

    Go to the source code of this file. @@ -21,7 +23,12 @@
     $res = u_ShowDossier($_SESSION['g_user'],$User->admin)
    -


    Variable Documentation

    +

    Detailed Description

    +Welcome page where the folder and module are choosen. +

    + +

    +Definition in file user_login.php.


    Variable Documentation

    @@ -44,7 +51,7 @@

    -Definition at line 33 of file user_login.php. +Definition at line 37 of file user_login.php.

    @@ -69,7 +76,7 @@ Definition at line 33

    -Definition at line 25 of file user_login.php. +Definition at line 29 of file user_login.php.

    @@ -94,7 +101,7 @@ Definition at line 25

    -Definition at line 40 of file user_login.php. +Definition at line 44 of file user_login.php.

    @@ -119,10 +126,10 @@ Definition at line 40

    -Definition at line 27 of file user_login.php. +Definition at line 31 of file user_login.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__menu_8php-source.html b/doc/developper/html/user__menu_8php-source.html index 9df12196a..8fa804c8c 100644 --- a/doc/developper/html/user__menu_8php-source.html +++ b/doc/developper/html/user__menu_8php-source.html @@ -4,7 +4,7 @@ - +

    user_menu.php

    Go to the documentation of this file.
    00001 <?
    @@ -26,714 +26,528 @@
     00017  *   along with PhpCompta; if not, write to the Free Software
     00018  *   Foundation, Inshowc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     00019 */
    -00020 
    -00021 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    -00022 /* $Revision$ */
    -00023 
    -00024 /* function u_ShowDossier
    -00025  * Purpose :  Show all the available folder 
    -00026  *            for the users
    -00027  * parm : 
    -00028  *      - $p_user user login
    -00029  *      - $p_admin 1 if admin
    -00030  * gen :
    -00031  *      - none
    -00032  * return:
    -00033  *      - nothing
    -00034  *
    -00035  */ 
    -00036 function u_ShowDossier($p_user,$p_admin)
    -00037 {
    -00038   $p_array=GetAvailableFolder($p_user,$p_admin);   
    -00039   if ( $p_array == 0 ) return " * Aucun dossier *";
    -00040   $result="";
    -00041   $result.="<table>";
    -00042   $result.='<TR>';
    -00043     if ( $p_admin == 1 ) {
    -00044       $result.="<TD><A class=\"mtitle\" HREF=\"admin_repo.php\"> Administration : </A></TD>";
    -00045     }
    -00046     $result.='<TD><A HREF="logout.php" CLASS="mtitle">: Sortir</a></TD>';
    -00047     $result.="</TR>";
    -00048   $result.="</table>";
    -00049   $result.="<TABLE>";
    -00050   for ($i=0;$i<sizeof($p_array);$i++) {
    -00051     $id=$p_array[$i]['dos_id'];
    -00052     $name= $p_array[$i]['dos_name'];
    -00053     $desc=$p_array[$i]['dos_description'];
    -00054     if ( $i%2 == 0) 
    -00055       $tr="odd";
    -00056     else $tr="even";
    -00057 
    -00058     $result.="<TR class=\"$tr\"><TD class=\"$tr\">";
    -00059     $result.=$id."  <B>$name</B>";
    -00060     $result.="</TD><TD class=\"$tr\">";
    -00061     $result.=$desc;
    -00062     $result.="</TD><TD class=\"mtitle\">";
    -00063     $result.="<A class=\"mtitle\" HREF=\"user_compta.php?dos=$id\">Comptabilité</A>";
    -00064     $result.="</TD>";
    -00065     $result.="<TD class=\"mtitle\">";
    -00066     $result.="<A class=\"mtitle\" HREF=\"commercial.php?dos=$id\">Commercial</A>";
    -00067     $result.="</TD>";
    -00068     $result.="<TD class=\"mtitle\">";
    -00069     $result.="<A class=\"mtitle\" HREF=\"facturation.php?dos=$id\">Facturation</A>";
    -00070     $result.="</TD>";
    -00071     $result.="<TD class=\"mtitle\">";
    -00072     $result.="<A class=\"mtitle\" HREF=\"parametre.php?dos=$id\">Paramètres</A>";
    -00073     $result.="</TD>";
    -00074 
    -00075     $result.="</TR>";
    -00076   }
    -00077   $result.="</TABLE>";
    -00078   return $result;
    -00079 }
    -00080 /* function GetAvailableFolder
    -00081  * Purpose :  Get all the available folders
    -00082  *            for the users
    -00083  * parm : 
    -00084  *      - $p_user user login
    -00085  *      - $p_admin 1 if admin
    -00086  * gen :
    -00087  *      - none
    -00088  * return:
    -00089  *      - array containing ac_dossier.dos_id
    -00090  *                         ac_dossier.dos_name
    -00091  *                         ac_dossier.dos_description
    -00092  *
    -00093  */ 
    -00094 function GetAvailableFolder($p_user,$p_admin)
    -00095 {
    -00096   $filter="";
    -00097   if ($p_admin==0) {
    -00098     // show only available folders
    -00099     // if user is not an admin
    -00100     $sql="select distinct dos_id,dos_name,dos_description from ac_users 
    -00101                   natural join jnt_use_dos 
    -00102                   natural join  ac_dossier 
    -00103                   join  priv_user on ( priv_jnt=jnt_id)
    -00104           where use_active=1 
    -00105          and use_login='$p_user' 
    -00106          and priv_priv != 'NO' ";
    -00107 
    -00108   } else {
    -00109     $sql="select distinct dos_id,dos_name,dos_description from ac_users 
    -00110                   natural join jnt_use_dos 
    -00111                   natural join  ac_dossier 
    -00112       where  use_active=1 ";
    -00113   }
    -00114   include_once("postgres.php");
    -00115   $cn=DbConnect();
    -00116   $Res=ExecSql($cn,$sql);
    -00117   $max=pg_numRows($Res);
    -00118   if ( $max == 0 ) return 0;
    -00119 
    -00120   for ($i=0;$i<$max;$i++) {
    -00121     $array[]=pg_fetch_array($Res,$i);
    -00122   }
    -00123   return $array;
    -00124 }
    -00125 /* function u_ShowMenu
    -00126  * Purpose : Show The login menu
    -00127  * 
    -00128  * parm : 
    -00129  *      - $p_admin 1 if admin
    -00130  *      - $p_item item to add 
    -00131  * gen :
    -00132  *      - none
    -00133  * return:
    -00134  *      - nothing
    -00135  *
    -00136  */ 
    -00137   function u_ShowMenu($p_admin,$p_check = 1,$p_item="")
    -00138 {
    -00139   /* $p_check == 1 si test sur Admin */
    -00140   include_once("postgres.php");
    -00141   echo '<div class="mtitle">';
    -00142   echo "<TABLE align=center cellspadding=0><TR>";
    -00143   if ( $p_admin !=0 ) {
    -00144       /* Administrator Menu */
    -00145       echo '<TD class="mtitle"><A class="mtitle" HREF=admin_repo.php>Administrator Menu</A></TD>';
    -00146     } 
    -00147 
    -00148   if (strlen ( $p_item ) != 0 ) {
    -00149     echo '<TD class="mtitle">'.$p_item.'</A></TD>';
    -00150   }
    -00151   
    -00152   echo ' <TD class="mtitle"> <A class="mtitle" HREF="user_pref.php">Préférence</A></TD>';
    -00153 
    -00154   echo "<TD class=\"mtitle\">"; 
    -00155   html_button_logout();
    -00156   echo "</TD>";
    -00157   echo "</TR></TABLE>";
    -00158   echo "</div>";
    -00159 }
    -00160 /* function u_ShowMenuCompta 
    -00161  * purpose : show the top menu for 
    -00162  *           the user profile
    -00163  * parm : p_dossier
    -00164  *
    -00165  * return: none
    -00166  *
    -00167  * gen : none
    -00168  */
    -00169 function ShowMenuCompta($p_dossier)
    -00170 {
    -00171   include_once("postgres.php");
    -00172   //  $l_name=GetDossierName($p_dossier);
    -00173   // find our current menu
    -00174   $default=basename($_SERVER['SCRIPT_NAME']);
    -00175   switch ($default) {
    -00176   case "user_jrn.php":
    -00177     $default.="?show";
    +00025 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
    +00026 /* $Revision$ */
    +00027 
    +00037 function u_ShowDossier($p_user,$p_admin)
    +00038 {
    +00039   $p_array=GetAvailableFolder($p_user,$p_admin);   
    +00040   if ( $p_array == 0 ) return " * Aucun dossier *";
    +00041   $result="";
    +00042   $result.="<table>";
    +00043   $result.='<TR>';
    +00044     if ( $p_admin == 1 ) {
    +00045       $result.="<TD><A class=\"mtitle\" HREF=\"admin_repo.php\"> Administration : </A></TD>";
    +00046     }
    +00047     $result.='<TD><A HREF="logout.php" CLASS="mtitle">: Sortir</a></TD>';
    +00048     $result.="</TR>";
    +00049   $result.="</table>";
    +00050   $result.="<TABLE>";
    +00051   for ($i=0;$i<sizeof($p_array);$i++) {
    +00052     $id=$p_array[$i]['dos_id'];
    +00053     $name= $p_array[$i]['dos_name'];
    +00054     $desc=$p_array[$i]['dos_description'];
    +00055     if ( $i%2 == 0) 
    +00056       $tr="odd";
    +00057     else $tr="even";
    +00058 
    +00059     $result.="<TR class=\"$tr\"><TD class=\"$tr\">";
    +00060     $result.=$id."  <B>$name</B>";
    +00061     $result.="</TD><TD class=\"$tr\">";
    +00062     $result.=$desc;
    +00063     $result.="</TD><TD class=\"mtitle\">";
    +00064     $result.="<A class=\"mtitle\" HREF=\"user_compta.php?dos=$id\">Comptabilité</A>";
    +00065     $result.="</TD>";
    +00066     $result.="<TD class=\"mtitle\">";
    +00067     $result.="<A class=\"mtitle\" HREF=\"commercial.php?dos=$id\">Gestion</A>";
    +00068     $result.="</TD>";
    +00069     $result.="<TD class=\"mtitle\">";
    +00070     $result.="<A class=\"mtitle\" HREF=\"parametre.php?dos=$id\">Paramètres</A>";
    +00071     $result.="</TD>";
    +00072 
    +00073     $result.="</TR>";
    +00074   }
    +00075   $result.="</TABLE>";
    +00076   return $result;
    +00077 }
    +00090 function GetAvailableFolder($p_user,$p_admin)
    +00091 {
    +00092   $filter="";
    +00093   if ($p_admin==0) {
    +00094     // show only available folders
    +00095     // if user is not an admin
    +00096     $sql="select distinct dos_id,dos_name,dos_description from ac_users 
    +00097                   natural join jnt_use_dos 
    +00098                   natural join  ac_dossier 
    +00099                   join  priv_user on ( priv_jnt=jnt_id)
    +00100           where use_active=1 
    +00101          and use_login='$p_user' 
    +00102          and priv_priv != 'NO' ";
    +00103 
    +00104   } else {
    +00105     $sql="select distinct dos_id,dos_name,dos_description from ac_users 
    +00106                   natural join jnt_use_dos 
    +00107                   natural join  ac_dossier 
    +00108       where  use_active=1 ";
    +00109   }
    +00110   include_once("postgres.php");
    +00111   $cn=DbConnect();
    +00112   $Res=ExecSql($cn,$sql);
    +00113   $max=pg_numRows($Res);
    +00114   if ( $max == 0 ) return 0;
    +00115 
    +00116   for ($i=0;$i<$max;$i++) {
    +00117     $array[]=pg_fetch_array($Res,$i);
    +00118   }
    +00119   return $array;
    +00120 }
    +00132   function u_ShowMenu($p_admin,$p_check = 1,$p_item="")
    +00133 {
    +00134   /* $p_check == 1 si test sur Admin */
    +00135   include_once("postgres.php");
    +00136   echo '<div class="mtitle">';
    +00137   echo "<TABLE align=center cellspadding=0><TR>";
    +00138   if ( $p_admin !=0 ) {
    +00139       /* Administrator Menu */
    +00140       echo '<TD class="mtitle"><A class="mtitle" HREF=admin_repo.php>Administrator Menu</A></TD>';
    +00141     } 
    +00142 
    +00143   if (strlen ( $p_item ) != 0 ) {
    +00144     echo '<TD class="mtitle">'.$p_item.'</A></TD>';
    +00145   }
    +00146   
    +00147   echo ' <TD class="mtitle"> <A class="mtitle" HREF="user_pref.php">Préférence</A></TD>';
    +00148 
    +00149   echo "<TD class=\"mtitle\">"; 
    +00150   html_button_logout();
    +00151   echo "</TD>";
    +00152   echo "</TR></TABLE>";
    +00153   echo "</div>";
    +00154 }
    +00166 function ShowMenuCompta($p_dossier,$p_high="")
    +00167 {
    +00168   include_once("postgres.php");
    +00169 
    +00170   // find our current menu
    +00171   $default=basename($_SERVER['SCRIPT_NAME']);
    +00172   switch ($default) {
    +00173   case "user_jrn.php":
    +00174     $default.="?show";
    +00175     break;
    +00176   case "recherche.php":
    +00177     $default.="?p_dossier=$p_dossier";
     00178     break;
    -00179   case "recherche.php":
    +00179   case "fiche.php":
     00180     $default.="?p_dossier=$p_dossier";
     00181     break;
    -00182   case "fiche.php":
    -00183     $default.="?p_dossier=$p_dossier";
    -00184     break;
    -00185   }
    +00182   }
    +00183   if ( $p_high !== "" ) $default=$p_high;
    +00184 
    +00185   echo_debug('user_menu.php',__LINE__,'defaut is '.$default);
     00186 
     00187   $p_array=array(array("user_jrn.php?show","Journaux","Les journaux permettent d'encoder toutes les opérations"),
     00188                  array("recherche.php?p_dossier=$p_dossier","Recherche","Pour retrouver une opération"),
     00189                  array("fiche.php?p_dossier=$p_dossier","Fiche","Ajouter, modifier ou effacer des fiches"),
     00190                  array("user_impress.php","Impression","Impression"),
     00191                  array("user_advanced.php","Avancé","Opérations délicates"),
    -00192                  //              array("dossier_prefs.php","Paramètre"),
    +00192 
     00193                  array('user_pref.php','Preference',"Préférence de l'utilisateur"),
    -00194                  array('login.php','Accueil',"Accueil"),
    -00195                  array('logout.php','logout',"Sortie")
    -00196                  );
    -00197 
    -00198   $result=ShowItem($p_array,'H',"mtitle","mtitle",$default,' width="100%"');
    +00194                  array('parametre.php?dos='.$_SESSION['g_dossier'],"Paramètre"),
    +00195                  array('commercial.php?dos='.$_SESSION['g_dossier'],"Gestion"),
    +00196                  array('login.php','Accueil',"Accueil"),
    +00197                  array('logout.php','logout',"Sortie")
    +00198                  );
     00199 
    -00200   $r="<H2 class=\"info\">Comptabilit&eacute;  ".$_SESSION['g_name']." </H2>";
    -00201   $r.=$result;
    -00202   return $r;
    -00203 
    -00204 
    +00200   $result=ShowItem($p_array,'H',"mtitle","mtitle",$default,' width="100%"');
    +00201 
    +00202   $r="<H2 class=\"info\">Comptabilit&eacute;  ".$_SESSION['g_name']." </H2>";
    +00203   $r.=$result;
    +00204   return $r;
     00205 
     00206 
    -00207 }
    +00207 
     00208 
    -00209 /* function ShowMenuJrnUser($p_dossier,$p_user)
    -00210  * Purpose : Show the Menu from the jrn encode
    -00211  *           page
    -00212  * 
    -00213  * parm : 
    -00214  *      - $p_dossier
    -00215  *      - $p_user
    -00216  *      - $p_type type of journal (VEN,ACH,BQE,ODS)
    -00217  *      - $p_jrn journal
    -00218  * gen :
    -00219  *      - none
    -00220  * return:
    -00221  *      - none
    -00222  *
    -00223  */ 
    -00224 
    -00225 function GetFirstJrnIdForJrnType($p_dossier,$p_type)
    -00226 {
    -00227   include_once("postgres.php");
    -00228   
    -00229   //get db connection
    -00230   $Cn=DbConnect($p_dossier);  
    -00231   //execute query: select min(jrn_def_id) from jrn_def where jrn_def_type='$jrn_type'
    -00232   $Ret=ExecSql($Cn,"select min(jrn_def_id) from jrn_def where jrn_def_type='".$p_type."';");
    -00233   $l_line=pg_fetch_array($Ret,0);
    -00234   return $l_line[0];
    -00235   //return 0;
    -00236 }
    -00237  /* function ShowMenuJrnUser
    -00238  **************************************************
    -00239  * Purpose : 
    -00240  *        
    -00241  * parm : 
    -00242  *      - dossier, type and jrn
    -00243  * gen :
    -00244  *      -
    -00245  * return:
    -00246  */
    -00247 function ShowMenuJrnUser($p_dossier,$p_type,$p_jrn)
    -00248 {
    -00249   include_once ("debug.php");
    -00250   include_once("constant.php");
    -00251   include_once("class_user.php");
    -00252   echo_debug('user_menu.php',__LINE__,"U_SHOWMENUJRNUSER PTYPE=$p_type");
    -00253   //    echo '<div class="searchmenu">';
    -00254   echo '<TABLE><TR>';
    -00255   include_once("postgres.php");
    +00209 }
    +00220 function GetFirstJrnIdForJrnType($p_dossier,$p_type)
    +00221 {
    +00222   include_once("postgres.php");
    +00223   
    +00224   //get db connection
    +00225   $Cn=DbConnect($p_dossier);  
    +00226   //execute query
    +00227   $Ret=ExecSql($Cn,"select min(jrn_def_id) from jrn_def where jrn_def_type='".$p_type."';");
    +00228   $l_line=pg_fetch_array($Ret,0);
    +00229   return $l_line[0];
    +00230   //return 0;
    +00231 }
    +00246 function ShowMenuJrnUser($p_dossier,$p_type,$p_jrn,$p_extra="")
    +00247 {
    +00248   include_once ("debug.php");
    +00249   include_once("constant.php");
    +00250   include_once("class_user.php");
    +00251   echo_debug('user_menu.php',__LINE__,"U_SHOWMENUJRNUSER PTYPE=$p_type");
    +00252 
    +00253   echo '<TABLE><TR>';
    +00254   include_once("postgres.php");
    +00255   
     00256   
    -00257   
    -00258   $Cn=DbConnect($p_dossier);
    -00259   
    -00260   $User=new cl_user($Cn);
    -00261   $User->Check();
    -00262   if ( $User->Admin() ==0) {
    -00263     $Ret=ExecSql($Cn,"select jrn_def_id,jrn_def_type,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv,
    -00264                                jrn_deb_max_line,jrn_cred_max_line
    -00265                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id
    -00266                              join user_sec_jrn on uj_jrn_id=jrn_def_id 
    -00267                              where
    -00268                              uj_login='".$User->id."'
    -00269                              and uj_priv !='X'
    -00270                              and jrn_def_type='$p_type'
    -00271                              ");
    -00272     } else {
    -00273       $Ret=ExecSql($Cn,"select jrn_def_id,jrn_def_type,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_deb_max_line,jrn_cred_max_line,
    -00274                             jrn_type_id,jrn_desc,'W' as uj_priv
    -00275                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id where
    -00276                               jrn_def_type='$p_type'");
    -00277 
    -00278     } 
    -00279     $Max=pg_NumRows($Ret);
    -00280     include_once("check_priv.php");
    -00281 
    -00282     for ($i=0;$i<$Max;$i++) {
    -00283       $l_line=pg_fetch_array($Ret,$i);
    -00284       // Admin have always rights
    -00285       if ( $User->Admin() == 0 ){
    -00286         $right=CheckJrn($p_dossier,$_SESSION['g_user'],$l_line['jrn_def_id']);
    -00287       }else {
    -00288         $right=3;
    -00289       }
    -00290 
    -00291       if ( $right > 0 ) {
    -00292         // Minimum Lecture 
    -00293         echo_debug('user_menu.php',__LINE__,"p_jrn = $p_jrn ");
    -00294         if ( $l_line['jrn_def_id'] != $p_jrn ) {
    -00295           echo '<TD class="cell">';
    -00296           printf ('<A class="mtitle" HREF="user_jrn.php?jrn_type=%s&p_jrn=%s">%s</A></TD>',
    -00297                   $l_line['jrn_def_type'],
    -00298                   $l_line['jrn_def_id'],
    -00299                   $l_line['jrn_def_name']
    -00300                   );
    -00301         } else
    -00302           {
    -00303             echo '<TD class="selectedcell">'. $l_line['jrn_def_name'].'</TD>';
    -00304           }
    -00305       }// if right
    -00306     }// for
    -00307     echo '</TR>';
    -00308     echo "</TABLE>";
    -00309     //echo '</div>';
    -00310 
    -00311 }
    -00312 /* function ShowMenuJrn
    -00313  * Purpose : Show the menu of the jrn depending of its type
    -00314  *        
    -00315  * parm : 
    -00316  *      - p_cn database connection
    -00317  *      - p_dossier
    -00318  *      - p_UserProperty
    -00319  *      - p_jrn_type
    -00320  *      - p_jrn
    -00321  * gen :
    -00322  *      - none
    -00323  * return:
    -00324  *     - string containing the menu
    -00325  */
    -00326 function ShowMenuJrn($p_cn,$p_jrn_type,$p_jrn) 
    -00327 {
    -00328 
    -00329   $Res=ExecSql($p_cn,"select ja_name,ja_url,ja_action,ja_desc from jrn_action  where ja_jrn_type='$p_jrn_type'
    -00330                       order by ja_id");
    -00331   $num=pg_NumRows($Res);
    -00332   if ($num==0)    return "";
    -00333   // Retrieve in the database the menu
    -00334   $ret="<TABLE>";
    -00335   $access_key_list = array();
    -00336   for ($i=0;$i<$num;$i++) {
    -00337     $action=pg_fetch_array($Res,$i);
    -00338     $access_key=get_quick_key($action['ja_name'],$access_key_list);
    -00339     $lib=str_replace($access_key,'<u>'.$access_key.'</u>',$action['ja_name']);
    -00340 
    -00341     $ret.=sprintf('<TR><TD class="cell"><A class="mtitle" accesskey="%s" title="%s" '.
    -00342                   'HREF="%s?%s&p_jrn=%s&jrn_type=%s">%s</A></td></tR>',
    -00343                   $access_key, 
    -00344                   $action['ja_desc'], 
    -00345                   $action['ja_url'],
    -00346                   $action['ja_action'], 
    -00347                   $p_jrn, 
    -00348                   $_REQUEST['jrn_type'],
    -00349                   $lib);
    -00350 
    -00351   }
    -00352   $ret.='</TABLE>';
    -00353   return $ret;
    -00354 
    -00355 }
    -00356 
    -00357 /* function get_quick_key
    -00358  * Purpose : Show the menu of the jrn depending of its type
    -00359  *  return a not yet used access key. The returned key is added to $access_key_list       
    -00360  * parm : 
    -00361  *      - $title
    -00362  *      - &$access_key_list
    -00363  * gen :
    -00364  *      - none
    -00365  * return:
    -00366  *     - string containing the menu
    -00367  */
    -00368 function get_quick_key($title,&$access_key_list)
    -00369 {
    -00370         $quick = $title[0];
    -00371         if(array_key_exists($quick, $access_key_list))
    -00372         {
    -00373                 echo_debug(" key exists: " . $quick);
    -00374                 return get_quick_key(substr($title, 1), $access_key_list);
    -00375         } else
    -00376         {
    -00377                 echo_debug(" new key: " . $quick);
    -00378         }
    -00379         $access_key_list[$quick] = $quick;
    -00380         //var_dump($access_key_list);
    -00381         return $quick;
    -00382 }
    -00383 
    -00384 /* function u_ShowMenuRecherche ($p_cn,$p_jrn,$p_sessid,$p_array=null)
    -00385  * Purpose :
    -00386  * 
    -00387  * parm : 
    -00388  *      - $p_cn database connection
    -00389  *      - $p_jrn jrn id
    -00390  *      - $p_array=null previous search
    -00391  * gen :
    -00392  *      - none
    -00393  * return:
    -00394  *      - none
    -00395  *
    -00396  */ 
    -00397 
    -00398 function u_ShowMenuRecherche($p_cn,$p_jrn,$p_sessid,$p_array=null)
    -00399 {
    -00400   echo_debug('user_menu.php',__LINE__,"u_ShowMenuRecherche($p_cn,$p_array)");
    -00401   if ( $p_array != null ) {
    -00402     foreach ( $p_array as $key=> $element) {
    -00403       ${"p_$key"}=$element;
    -00404       echo_debug('user_menu.php',__LINE__,"p_$key =$element;");
    -00405     }
    -00406   }
    -00407 
    -00408   // Find the journal property
    -00409   //  $JrnProperty=GetJrnProperty($p_cn,$p_jrn);
    -00410 
    -00411   $opt='<OPTION VALUE="="> =';
    -00412   $opt.='<OPTION VALUE="<="> <=';
    -00413   $opt.='<OPTION VALUE="<"> <';
    -00414   $opt.='<OPTION VALUE=">"> >';
    -00415   $opt.='<OPTION VALUE=">="> >=';
    -00416   if ( ! isset ($p_date_start)) $p_date_start="";
    -00417   if ( ! isset ($p_date_end))   $p_date_end="";
    -00418   if ( ! isset ($p_mont_sel))$p_mont_sel="";
    -00419   if ( ! isset ($p_s_comment))$p_s_comment="";
    -00420   if ( ! isset ($p_s_montant)) $p_s_montant="";
    -00421   if ( ! isset ($p_s_internal)) $p_s_internal="";
    -00422   if ( ! isset ($p_poste)) $p_poste="";
    -00423   if ( ! isset ($p_qcode)) $p_qcode="";
    -00424 
    -00425 
    -00426   if ( $p_mont_sel != "" )  $opt.='<OPTION value="'.$p_mont_sel.'" SELECTED> '.$p_mont_sel;
    -00427   $r="";
    -00428  
    -00429   //  $r.= '<div style="border-style:outset;border-width:1pt;">';
    -00430 
    -00431   $r.=JS_SEARCH_POSTE;
    -00432   $r.= "<B>Recherche</B>";
    -00433   $r.= '<FORM ACTION="recherche.php" METHOD="GET">';
    -00434   $r.="<table><tr><TD>";  
    -00435   $r.= '<TABLE>';
    -00436   $r.= "<TR>";
    -00437   $r.= '<TD COLSPAN="3">  Date compris entre</TD> ';
    -00438   $r.= "</TR> <TR>";
    -00439   $r.= '<TD> <INPUT TYPE="TEXT" NAME="date_start" SIZE="10" VALUE="'.$p_date_start.'"></TD>';
    -00440   $r.= '<TD> <INPUT TYPE="TEXT" NAME="date_end" size="10" Value="'.$p_date_end.'"></TD>';
    -00441   $r.= '</TD><TD>';
    -00442   $r.= "</TR> <TR>";
    -00443   $r.= "<TD> Montant ";
    -00444   $r.= ' <SELECT NAME="mont_sel">'.$opt.' </SELECT></TD><TD>';
    -00445   $r.= ' <INPUT TYPE="TEXT" NAME="s_montant" SIZE="10" VALUE="'.$p_s_montant.'"></TD>';
    -00446   $r.= "</TR><TR>";
    -00447   $r.="<TD> Internal code</td>";
    -00448   $r.='<TD><input type="text" name="s_internal" value="'.$p_s_internal.'"></td>';
    -00449 
    -00450   $r.="</TD></TR></TABLE></td><TD><table>";
    -00451 
    -00452   $r.= "</TR>";
    -00453   $r.= "<TR>";
    -00454   $W=new widget("js_search_poste");
    -00455   $W->label="Numéro de poste";
    -00456   $W->name="poste";
    -00457   $W->value=$p_poste;
    -00458   $r.="<TR>".$W->IOValue();
    -00459   $r.= "</TR>";
    -00460   $r.= "<TR>";
    -00461   $A=new widget("TEXT");
    -00462   $A->label="Quick Code";
    -00463   $A->name="qcode";
    -00464   $A->value=$p_qcode;
    -00465   $r.="<TD> Quick Code</TD><TD>".$A->IOValue()."</TD>";
    -00466   $r.= "</TR>";
    -00467 
    -00468 
    -00469   $r.= '<TD colspan="3"> Le commentaire contient </TD>';
    -00470   $r.= "</TR><TR>";
    -00471   $r.= '<TD COLSPAN="3"> <INPUT TYPE="TEXT" NAME="s_comment" VALUE="'.$p_s_comment.'"></TD>';
    -00472   $r.= "</TR><TR>";
    -00473   $r.= '<TD COLSPAN="3"><INPUT TYPE="SUBMIT" VALUE="Recherche" NAME="viewsearch"></TD>';
    -00474   $r.= "</TR>";
    -00475   $r.= "</TABLE>";
    -00476   $r.="</TR></TABLE>";
    -00477   $r.= "</FORM>";
    -00478 
    -00479 
    -00480   return $r;
    -00481 
    -00482 }
    -00483 /* function function ShowMenuAdvanced() {
    -00484  **************************************************
    -00485  * Purpose :  build the menu of user_advanced.php
    -00486  *        
    -00487  * parm : 
    -00488  *      - none
    -00489  * gen :
    -00490  *      - none
    -00491  * return: the menu
    -00492  */
    -00493 function ShowMenuAdvanced($default="") {
    -00494 // Show the left menu
    -00495 $left_menu=ShowItem(array(
    -00496                           //('rapprt.php','Rapprochement'),
    -00497                           array('jrn_update.php','Journaux'),
    -00498                           array('user_advanced.php?p_action=periode','Periode'),
    -00499                           array('central.php','Centralise'),
    -00500                       array('pcmn_update.php?p_start=1','Plan Comptable'),
    -00501                           array('stock.php','Stock'),
    -00502                           array('form.php','Rapport'),
    -00503                           array('import.php','Import Banque'),
    -00504                           array('ecrit_ouv.php','Ecriture ouverture')
    -00505                           ),
    -00506                     'H',"cell","mtitle",$default);
    -00507  $r='<div class="u_subtmenu">'.$left_menu."</div>";
    -00508 return $r;
    -00509 }
    -00510 /* function ShowJrn
    -00511  **************************************************
    -00512  * Purpose : Return a string containing the menu
    -00513  *           main menu when you click on Journaux
    -00514  * parm : 
    -00515  *      - $p_menu the current menu (selected)
    -00516  * gen :
    -00517  *      - none
    -00518  * return: a string
    -00519  */
    -00520 function ShowJrn($p_menu="")
    -00521 {
    -00522 
    -00523  $p_array=array(
    -00524                 array("user_jrn.php?jrn_type=NONE" ,"Grand Livre"),
    -00525                 array("user_jrn.php?jrn_type=VEN" ,"Entrée"),
    -00526                 array("user_jrn.php?jrn_type=ACH","Dépense"),
    -00527                 array("user_jrn.php?jrn_type=FIN","Financier"),
    -00528                 array("user_jrn.php?jrn_type=OD","Op. Diverses")
    -00529                  );
    -00530  $result=ShowItem($p_array,'H',"cell","mtitle",$p_menu);
    -00531  return $result;
    -00532 }
    -00533 
    -00534 /* function ShowMenuFiche
    -00535  **************************************************
    -00536  * Purpose : 
    -00537  *        
    -00538  * parm : 
    -00539  *      -
    -00540  * gen :
    -00541  *      -
    -00542  * return:
    -00543  */
    -00544 function ShowMenuFiche($p_dossier)
    -00545 {
    -00546      $cn=DbConnect($p_dossier);
    -00547      echo '<div class="lmenu">';
    -00548      echo '<TABLE>';
    -00549  // TODO
    -00550  // Only for developper
    -00551  // A test must be added
    -00552      echo '<TR><TD colspan="3" class="mtitle">
    -00553           <A class="mtitle" HREF="fiche.php?action=add_modele&fiche=modele">Creation</A></TD></TR>';
    -00554      $Res=ExecSql($cn,"select fd_id,fd_label from fiche_def order by fd_label");
    -00555      $Max=pg_NumRows($Res);
    -00556      for ( $i=0; $i < $Max;$i++) {
    -00557        $l_line=pg_fetch_array($Res,$i);
    -00558        printf('<TR><TD class="cell">%s</TD><TD class="mshort"><A class="mtitle" HREF="fiche.php?action=vue&fiche=%d">Voir</A>
    -00559                </TD>
    -00560                <TD class="mshort"><A class="mtitle" HREF="fiche.php?action=modifier&fiche=%d">Modifier</A></TD>
    -00561                </TR>',
    -00562             $l_line['fd_label'],
    -00563             $l_line['fd_id'],
    -00564             $l_line['fd_id']);
    -00565      }
    -00566      echo "</TABLE>";
    -00567      echo '</div>';
    -00568 }
    -00569 /* function MenuAdmin */
    -00570 /* purpose : show the menu for user/database management */
    -00571 /* parameter : none */
    -00572 /* return : none */
    -00573 
    -00574 function MenuAdmin()
    -00575 {
    -00576   $item=array (array("admin_repo.php?action=user_mgt","Utilisateurs"),
    -00577                array("admin_repo.php?action=dossier_mgt","Dossiers"),
    -00578                array("admin_repo.php?action=modele_mgt","Modèles"),
    -00579                array("login.php","Accueil"),
    -00580                array("logout.php","Logout")
    -00581                );
    -00582 
    -00583   $menu=ShowItem($item,'H');
    -00584   return $menu;
    -00585 }
    -00586 /* function ShowMenuInvoice
    -00587  * Purpose :
    -00588  *                      Display invoice's menu
    -00589  * parm : 
    -00590  *      -       none
    -00591  * gen :
    -00592  *      - none
    -00593  * return:
    -00594  *      -       string
    -00595  *
    -00596  */ 
    -00597 function ShowMenuInvoice()
    -00598 {
    -00599   $base="parametre.php?p_action=";
    -00600   $sub_menu=ShowItem(
    -00601                      array(array($base."add_invoice","Ajout"))
    -00602                      ,'V',"cell","mtitle");
    -00603   return $sub_menu;
    -00604 
    -00605 }
    -00606 /* function ShowMenuParam
    -00607  * Purpose : Show the parametre menu
    -00608  * 
    -00609  * parm : 
    -00610  *      - p_action
    -00611  * gen :
    -00612  *      - none
    -00613  * return:
    -00614  *      - none
    -00615  *
    -00616  */ 
    -00617 function ShowMenuParam($p_action="")
    -00618 {
    -00619     $sub_menu=ShowItem(array(
    -00620                           
    -00621                           array('parametre.php?p_action=company','Sociétés'),
    -00622                           array('parametre.php?p_action=devise','Devises'),
    -00623                           array('parametre.php?p_action=tva','Tva'),
    -00624                           array('parametre.php?p_action=poste','Poste Comptable'),
    -00625                           array('parametre.php?p_action=fiche','Fiche'),
    -00626                           array('user_sec.php','Sécurité'),
    -00627                           array('parametre.php?p_action=document','Document'),
    -00628                           array('login.php','Accueil',"Accueil"),
    -00629                           array('logout.php','logout',"Sortie")
    -00630                           ),
    -00631                     'H',"mtitle","mtitle",$p_action,' width="100%"');
    -00632     return $sub_menu;
    -00633 
    -00634 }
    -00635 /* function  MenuJrn($p_dossier)
    -00636  * Purpose : Show the menu in the jrn page
    -00637  * 
    -00638  * parm : 
    -00639  *      - $p_dossier 
    -00640  * gen :
    -00641  *      - none
    -00642  * return:
    -00643  *      - none
    -00644  *
    -00645  */ 
    -00646 
    -00647 function MenuJrn($p_dossier)
    -00648 {
    -00649     echo '<TABLE>';
    -00650     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="jrn_add.php">Création </A></TD></TR>';
    -00651     include_once("postgres.php");
    -00652     $Cn=DbConnect($p_dossier);
    -00653     $Ret=ExecSql($Cn,"select jrn_def_id,jrn_def_name,
    -00654                              jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc 
    -00655                              from jrn_def join jrn_type on jrn_def_type=jrn_type_id");
    -00656     $Max=pg_NumRows($Ret);
    -00657     for ($i=0;$i<$Max;$i++) {
    -00658       $l_line=pg_fetch_array($Ret,$i);
    -00659       printf ('<TR><TD class="mtitle"><A class="mtitle" HREF="jrn_detail.php?p_jrn=%s">%s</A></TD></TR>',
    -00660               $l_line['jrn_def_id'],$l_line['jrn_def_name']);
    -00661 
    -00662     }
    -00663     echo "</TABLE>";
    -00664 }
    -00665 /* function ShowMenuPcmn($p_start=1)
    -00666  * Purpose : Show the menu from the pcmn page
    -00667  * 
    -00668  * parm : 
    -00669  *      - $p_start class start
    -00670  * gen :
    -00671  *      - none
    -00672  * return:
    -00673  *      - none
    -00674  *
    -00675  */ 
    -00676 
    -00677 function ShowMenuPcmn($p_start=1)
    -00678 {
    -00679     echo '<TABLE>';
    -00680     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=1">1 Immobilisé </A></TD></TR>';
    -00681     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=2">2 Actif a un an au plus</A></TD></TR>';
    -00682     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=3">3 Stock et commande</A></TD></TR>';
    -00683     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=4">4 Compte tiers</A></TD></TR>';
    -00684     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=5">5 Actif</A></TD></TR>';
    -00685     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=6">6 Charges</A></TD></TR>';
    -00686     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=7">7 Produits</A></TD></TR>';
    -00687     echo "</TABLE>";
    -00688 }
    -00689 /* function
    -00690  * Purpose :
    -00691  * 
    -00692  * parm : 
    -00693  *      - 
    -00694  * gen :
    -00695  *      -
    -00696  * return:
    -00697  *      -
    -00698  *
    -00699  */ 
    -00700 function ShowMenuComptaForm($p_dossier) {
    -00701      $cn=DbConnect($p_dossier);
    -00702     echo '<div class="lmenu">';
    -00703     echo '<TABLE>';
    -00704     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="form.php?action=add">Ajout</A></TD></TR>';
    -00705     $Ret=ExecSql($cn,"select fr_id, fr_label 
    -00706                              from formdef order by fr_label");
    -00707     $Max=pg_NumRows($Ret);
    -00708     for ($i=0;$i<$Max;$i++) {
    -00709       $l_line=pg_fetch_array($Ret,$i);
    -00710       printf ('<TR><TD class="mtitle"><A class="mtitle" HREF="form.php?action=view&fr_id=%s">%s</A></TD></TR>',
    -00711               $l_line['fr_id'],$l_line['fr_label']);
    -00712 
    -00713     }
    -00714     echo "</TABLE>";
    -00715     echo '</div>';
    -00716 }
    -00717 function ShowMenuImport(){
    -00718     echo '<TABLE>';
    -00719     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=import">Importer CSV</A></TD></TR>';
    -00720     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=verif">Verif CSV</A></TD></TR>';
    -00721     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=transfer">Transfert CSV</A></TD></TR>';
    -00722     
    -00723     echo "</TABLE>";
    -00724 }
    -00725 
    -00726 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00257 $Cn=DbConnect($p_dossier); +00258 +00259 $User=new cl_user($Cn); +00260 $User->Check(); +00261 if ( $User->Admin() ==0) { +00262 $Ret=ExecSql($Cn,"select jrn_def_id,jrn_def_type,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, +00263 jrn_deb_max_line,jrn_cred_max_line +00264 from jrn_def join jrn_type on jrn_def_type=jrn_type_id +00265 join user_sec_jrn on uj_jrn_id=jrn_def_id +00266 where +00267 uj_login='".$User->id."' +00268 and uj_priv !='X' +00269 and jrn_def_type='$p_type' +00270 "); +00271 } else { +00272 $Ret=ExecSql($Cn,"select jrn_def_id,jrn_def_type,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_deb_max_line,jrn_cred_max_line, +00273 jrn_type_id,jrn_desc,'W' as uj_priv +00274 from jrn_def join jrn_type on jrn_def_type=jrn_type_id where +00275 jrn_def_type='$p_type'"); +00276 +00277 } +00278 $Max=pg_NumRows($Ret); +00279 include_once("check_priv.php"); +00280 +00281 for ($i=0;$i<$Max;$i++) { +00282 $l_line=pg_fetch_array($Ret,$i); +00283 // Admin have always rights +00284 if ( $User->Admin() == 0 ){ +00285 $right=CheckJrn($p_dossier,$_SESSION['g_user'],$l_line['jrn_def_id']); +00286 }else { +00287 $right=3; +00288 } +00289 +00290 if ( $right > 0 ) { +00291 // Minimum Lecture +00292 echo_debug('user_menu.php',__LINE__,"p_jrn = $p_jrn "); +00293 if ( $l_line['jrn_def_id'] != $p_jrn ) { +00294 $href=$_SERVER["SCRIPT_NAME"]; +00295 $add=""; +00296 // if the SCRIPT_NAME == commercial.php, we need to add the parameter +00297 // p_action=facture +00298 if ( $href=="/commercial.php" ) +00299 { +00300 $add="&p_action=facture"; +00301 } +00302 echo '<TD class="cell">'; +00303 printf ('<A class="mtitle" HREF="%s?jrn_type=%s&p_jrn=%s%s">%s</A></TD>', +00304 $href, +00305 $l_line['jrn_def_type'], +00306 $l_line['jrn_def_id'], +00307 $add, +00308 $l_line['jrn_def_name'] +00309 ); +00310 } else +00311 { +00312 echo '<TD class="selectedcell">'. $l_line['jrn_def_name'].'</TD>'; +00313 } +00314 }// if right +00315 }// for +00316 if ( $p_extra !="" ) echo $p_extra; +00317 echo '</TR>'; +00318 echo "</TABLE>"; +00319 //echo '</div>'; +00320 +00321 } +00333 function ShowMenuJrn($p_cn,$p_jrn_type,$p_jrn) +00334 { +00335 +00336 $Res=ExecSql($p_cn,"select ja_name,ja_url,ja_action,ja_desc from jrn_action where ja_jrn_type='$p_jrn_type' +00337 order by ja_id"); +00338 $num=pg_NumRows($Res); +00339 if ($num==0) return ""; +00340 // Retrieve in the database the menu +00341 $ret="<TABLE>"; +00342 $access_key_list = array(); +00343 for ($i=0;$i<$num;$i++) { +00344 $action=pg_fetch_array($Res,$i); +00345 $access_key=get_quick_key($action['ja_name'],$access_key_list); +00346 $lib=str_replace($access_key,'<u>'.$access_key.'</u>',$action['ja_name']); +00347 +00348 $ret.=sprintf('<TR><TD class="cell"><A class="mtitle" accesskey="%s" title="%s" '. +00349 'HREF="%s?%s&p_jrn=%s&jrn_type=%s">%s</A></td></tR>', +00350 $access_key, +00351 $action['ja_desc'], +00352 $action['ja_url'], +00353 $action['ja_action'], +00354 $p_jrn, +00355 $_REQUEST['jrn_type'], +00356 $lib); +00357 +00358 } +00359 $ret.='</TABLE>'; +00360 return $ret; +00361 +00362 } +00363 +00375 function get_quick_key($title,&$access_key_list) +00376 { +00377 $quick = $title[0]; +00378 if(array_key_exists($quick, $access_key_list)) +00379 { +00380 echo_debug(" key exists: " . $quick); +00381 return get_quick_key(substr($title, 1), $access_key_list); +00382 } else +00383 { +00384 echo_debug(" new key: " . $quick); +00385 } +00386 $access_key_list[$quick] = $quick; +00387 +00388 return $quick; +00389 } +00390 +00405 function u_ShowMenuRecherche($p_cn,$p_jrn,$p_sessid,$p_array=null) +00406 { +00407 echo_debug('user_menu.php',__LINE__,"u_ShowMenuRecherche($p_cn,$p_array)"); +00408 if ( $p_array != null ) { +00409 foreach ( $p_array as $key=> $element) { +00410 ${"p_$key"}=$element; +00411 echo_debug('user_menu.php',__LINE__,"p_$key =$element;"); +00412 } +00413 } +00414 +00415 // Find the journal property +00416 // $JrnProperty=GetJrnProperty($p_cn,$p_jrn); +00417 +00418 $opt='<OPTION VALUE="="> ='; +00419 $opt.='<OPTION VALUE="<="> <='; +00420 $opt.='<OPTION VALUE="<"> <'; +00421 $opt.='<OPTION VALUE=">"> >'; +00422 $opt.='<OPTION VALUE=">="> >='; +00423 if ( ! isset ($p_date_start)) $p_date_start=""; +00424 if ( ! isset ($p_date_end)) $p_date_end=""; +00425 if ( ! isset ($p_mont_sel))$p_mont_sel=""; +00426 if ( ! isset ($p_s_comment))$p_s_comment=""; +00427 if ( ! isset ($p_s_montant)) $p_s_montant=""; +00428 if ( ! isset ($p_s_internal)) $p_s_internal=""; +00429 if ( ! isset ($p_poste)) $p_poste=""; +00430 if ( ! isset ($p_qcode)) $p_qcode=""; +00431 +00432 +00433 if ( $p_mont_sel != "" ) $opt.='<OPTION value="'.$p_mont_sel.'" SELECTED> '.$p_mont_sel; +00434 $r=""; +00435 +00436 // $r.= '<div style="border-style:outset;border-width:1pt;">'; +00437 +00438 $r.=JS_SEARCH_POSTE; +00439 $r.= "<B>Recherche</B>"; +00440 $r.= '<FORM ACTION="recherche.php" METHOD="GET">'; +00441 $r.="<table><tr><TD>"; +00442 $r.= '<TABLE>'; +00443 $r.= "<TR>"; +00444 $r.= '<TD COLSPAN="3"> Date compris entre</TD> '; +00445 $r.= "</TR> <TR>"; +00446 $r.= '<TD> <INPUT TYPE="TEXT" NAME="date_start" SIZE="10" VALUE="'.$p_date_start.'"></TD>'; +00447 $r.= '<TD> <INPUT TYPE="TEXT" NAME="date_end" size="10" Value="'.$p_date_end.'"></TD>'; +00448 $r.= '</TD><TD>'; +00449 $r.= "</TR> <TR>"; +00450 $r.= "<TD> Montant "; +00451 $r.= ' <SELECT NAME="mont_sel">'.$opt.' </SELECT></TD><TD>'; +00452 $r.= ' <INPUT TYPE="TEXT" NAME="s_montant" SIZE="10" VALUE="'.$p_s_montant.'"></TD>'; +00453 $r.= "</TR><TR>"; +00454 $r.="<TD> Internal code</td>"; +00455 $r.='<TD><input type="text" name="s_internal" value="'.$p_s_internal.'"></td>'; +00456 +00457 $r.="</TD></TR></TABLE></td><TD><table>"; +00458 +00459 $r.= "</TR>"; +00460 $r.= "<TR>"; +00461 $W=new widget("js_search_poste"); +00462 $W->label="Numéro de poste"; +00463 $W->name="poste"; +00464 $W->value=$p_poste; +00465 $r.="<TR>".$W->IOValue(); +00466 $r.= "</TR>"; +00467 $r.= "<TR>"; +00468 $A=new widget("TEXT"); +00469 $A->label="Quick Code"; +00470 $A->name="qcode"; +00471 $A->value=$p_qcode; +00472 $r.="<TD> Quick Code</TD><TD>".$A->IOValue()."</TD>"; +00473 $r.= "</TR>"; +00474 +00475 +00476 $r.= '<TD colspan="3"> Le commentaire contient </TD>'; +00477 $r.= "</TR><TR>"; +00478 $r.= '<TD COLSPAN="3"> <INPUT TYPE="TEXT" NAME="s_comment" VALUE="'.$p_s_comment.'"></TD>'; +00479 $r.= "</TR><TR>"; +00480 $r.= '<TD COLSPAN="3"><INPUT TYPE="SUBMIT" VALUE="Recherche" NAME="viewsearch"></TD>'; +00481 $r.= "</TR>"; +00482 $r.= "</TABLE>"; +00483 $r.="</TR></TABLE>"; +00484 $r.= "</FORM>"; +00485 +00486 +00487 return $r; +00488 +00489 } +00498 function ShowMenuAdvanced($default="") { +00499 // Show the left menu +00500 $left_menu=ShowItem(array( +00501 //('rapprt.php','Rapprochement'), +00502 array('jrn_update.php','Journaux'), +00503 array('user_advanced.php?p_action=periode','Periode'), +00504 array('central.php','Centralise'), +00505 array('pcmn_update.php?p_start=1','Plan Comptable'), +00506 array('stock.php','Stock'), +00507 array('form.php','Rapport'), +00508 array('import.php','Import Banque'), +00509 array('ecrit_ouv.php','Ecriture ouverture') +00510 +00511 ), +00512 'H',"cell","mtitle",$default); +00513 $r='<div class="u_subtmenu">'.$left_menu."</div>"; +00514 return $r; +00515 } +00524 function ShowJrn($p_menu="") +00525 { +00526 +00527 $p_array=array( +00528 array("user_jrn.php?jrn_type=NONE" ,"Grand Livre"), +00529 array("user_jrn.php?jrn_type=VEN" ,"Entrée"), +00530 array("user_jrn.php?jrn_type=ACH","Dépense"), +00531 array("user_jrn.php?jrn_type=FIN","Financier"), +00532 array("user_jrn.php?jrn_type=OD","Op. Diverses") +00533 ); +00534 $result=ShowItem($p_array,'H',"cell","mtitle",$p_menu); +00535 return $result; +00536 } +00537 +00548 function ShowMenuFiche($p_dossier) +00549 { +00550 $cn=DbConnect($p_dossier); +00551 echo '<div class="lmenu">'; +00552 echo '<TABLE>'; +00555 echo '<TR><TD colspan="3" class="mtitle"> +00556 <A class="mtitle" HREF="fiche.php?action=add_modele&fiche=modele">Creation</A></TD></TR>'; +00557 $Res=ExecSql($cn,"select fd_id,fd_label from fiche_def order by fd_label"); +00558 $Max=pg_NumRows($Res); +00559 for ( $i=0; $i < $Max;$i++) { +00560 $l_line=pg_fetch_array($Res,$i); +00561 printf('<TR><TD class="cell">%s</TD><TD class="mshort"><A class="mtitle" HREF="fiche.php?action=vue&fiche=%d">Voir</A> +00562 </TD> +00563 <TD class="mshort"><A class="mtitle" HREF="fiche.php?action=modifier&fiche=%d">Modifier</A></TD> +00564 </TR>', +00565 $l_line['fd_label'], +00566 $l_line['fd_id'], +00567 $l_line['fd_id']); +00568 } +00569 echo "</TABLE>"; +00570 echo '</div>'; +00571 } +00573 /* \brief show the menu for user/database management +00574 /* +00575 /* \return HTML code with the menu +00576 */ +00577 +00578 function MenuAdmin() +00579 { +00580 $item=array (array("admin_repo.php?action=user_mgt","Utilisateurs"), +00581 array("admin_repo.php?action=dossier_mgt","Dossiers"), +00582 array("admin_repo.php?action=modele_mgt","Modèles"), +00583 array("login.php","Accueil"), +00584 array("logout.php","Logout") +00585 ); +00586 +00587 $menu=ShowItem($item,'H'); +00588 return $menu; +00589 } +00598 function ShowMenuDocument() +00599 { +00600 $base="parametre.php?p_action=document&sa="; +00601 $sub_menu=ShowItem( +00602 array(array($base."add_document","Ajout")) +00603 ,'V',"cell","mtitle"); +00604 return $sub_menu; +00605 +00606 } +00618 function ShowMenuParam($p_action="") +00619 { +00620 $sub_menu=ShowItem(array( +00621 +00622 array('parametre.php?p_action=company','Sociétés'), +00623 array('parametre.php?p_action=devise','Devises'), +00624 array('parametre.php?p_action=tva','Tva'), +00625 array('parametre.php?p_action=poste','Poste Comptable'), +00626 array('parametre.php?p_action=fiche','Fiche'), +00627 array('user_sec.php','Sécurité'), +00628 array('parametre.php?p_action=document','Document'), +00629 array('commercial.php?dos='.$_SESSION['g_dossier'],"Gestion"), +00630 array('user_compta.php?dos='.$_SESSION['g_dossier'],"Comptabilité"), +00631 +00632 array('login.php','Accueil',"Accueil"), +00633 array('logout.php','logout',"Sortie") +00634 ), +00635 'H',"mtitle","mtitle",$p_action,' width="100%"'); +00636 return $sub_menu; +00637 +00638 } +00651 function MenuJrn($p_dossier) +00652 { +00653 echo '<TABLE>'; +00654 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="jrn_add.php">Création </A></TD></TR>'; +00655 include_once("postgres.php"); +00656 $Cn=DbConnect($p_dossier); +00657 $Ret=ExecSql($Cn,"select jrn_def_id,jrn_def_name, +00658 jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc +00659 from jrn_def join jrn_type on jrn_def_type=jrn_type_id"); +00660 $Max=pg_NumRows($Ret); +00661 for ($i=0;$i<$Max;$i++) { +00662 $l_line=pg_fetch_array($Ret,$i); +00663 printf ('<TR><TD class="mtitle"><A class="mtitle" HREF="jrn_detail.php?p_jrn=%s">%s</A></TD></TR>', +00664 $l_line['jrn_def_id'],$l_line['jrn_def_name']); +00665 +00666 } +00667 echo "</TABLE>"; +00668 } +00681 function ShowMenuPcmn($p_start=1) +00682 { +00683 echo '<TABLE>'; +00684 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=1">1 Immobilisé </A></TD></TR>'; +00685 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=2">2 Actif a un an au plus</A></TD></TR>'; +00686 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=3">3 Stock et commande</A></TD></TR>'; +00687 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=4">4 Compte tiers</A></TD></TR>'; +00688 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=5">5 Actif</A></TD></TR>'; +00689 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=6">6 Charges</A></TD></TR>'; +00690 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=7">7 Produits</A></TD></TR>'; +00691 echo "</TABLE>"; +00692 } +00704 function ShowMenuComptaForm($p_dossier) { +00705 $cn=DbConnect($p_dossier); +00706 echo '<div class="lmenu">'; +00707 echo '<TABLE>'; +00708 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="form.php?action=add">Ajout</A></TD></TR>'; +00709 $Ret=ExecSql($cn,"select fr_id, fr_label +00710 from formdef order by fr_label"); +00711 $Max=pg_NumRows($Ret); +00712 for ($i=0;$i<$Max;$i++) { +00713 $l_line=pg_fetch_array($Ret,$i); +00714 printf ('<TR><TD class="mtitle"><A class="mtitle" HREF="form.php?action=view&fr_id=%s">%s</A></TD></TR>', +00715 $l_line['fr_id'],$l_line['fr_label']); +00716 +00717 } +00718 echo "</TABLE>"; +00719 echo '</div>'; +00720 } +00721 +00727 function ShowMenuImport(){ +00728 echo '<TABLE>'; +00729 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=import">Importer CSV</A></TD></TR>'; +00730 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=verif">Verif CSV</A></TD></TR>'; +00731 echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=transfer">Transfert CSV</A></TD></TR>'; +00732 +00733 echo "</TABLE>"; +00734 } +00735 +00736 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__menu_8php.html b/doc/developper/html/user__menu_8php.html index b102d212b..aec681728 100644 --- a/doc/developper/html/user__menu_8php.html +++ b/doc/developper/html/user__menu_8php.html @@ -4,54 +4,79 @@ - + -

    user_menu.php File Reference

    +

    user_menu.php File Reference

    Nearly all the menu are here, some of them returns a HTML string, others echo directly the result. More... +

    +

    Go to the source code of this file. + + - + + + - + + + + + + + + + - + + + + + + +

    Functions

     u_ShowDossier ($p_user, $p_admin)
     Show all the available folder for the users at the login page.
     GetAvailableFolder ($p_user, $p_admin)
     Get all the available folders for the users, checked with the security.
     u_ShowMenu ($p_admin, $p_check=1, $p_item="")
     ShowMenuCompta ($p_dossier)
     Show The login menu.
     ShowMenuCompta ($p_dossier, $p_high="")
     show the top menu for the user profile and highight the selected one
     GetFirstJrnIdForJrnType ($p_dossier, $p_type)
     ShowMenuJrnUser ($p_dossier, $p_type, $p_jrn)
     Open the first legder automaticaly.
     ShowMenuJrnUser ($p_dossier, $p_type, $p_jrn, $p_extra="")
     Show the Menu from the jrn encode page.
     ShowMenuJrn ($p_cn, $p_jrn_type, $p_jrn)
     Show the menu of the jrn depending of its type, check with the security.
     get_quick_key ($title, &$access_key_list)
     Show the menu of the jrn depending of its type return a not yet used access key. The returned key is added to $access_key_list.
     u_ShowMenuRecherche ($p_cn, $p_jrn, $p_sessid, $p_array=null)
     Returns the form for the search (module accountancy).
     ShowMenuAdvanced ($default="")
     build the menu of user_advanced.php
     ShowJrn ($p_menu="")
     Return a string containing the menu main menu when you click on Journaux.
     ShowMenuFiche ($p_dossier)
     Show the menu for the card management.
     MenuAdmin ()
     ShowMenuInvoice ()
     ShowMenuDocument ()
     : Display Document's menu
     ShowMenuParam ($p_action="")
     Show the parameter menu.
     MenuJrn ($p_dossier)
     Show the menu in the jrn page.
     ShowMenuPcmn ($p_start=1)
     Show the menu from the pcmn page.
     ShowMenuComptaForm ($p_dossier)
     Show the left menu for the report (add a report, view it).
     ShowMenuImport ()
     Show the menu for importing, verify and transfert Bank CSV.
    -


    Function Documentation

    +

    Detailed Description

    +Nearly all the menu are here, some of them returns a HTML string, others echo directly the result. +

    + +

    +Definition in file user_menu.php.


    Function Documentation

    @@ -86,13 +111,25 @@ +Referenced by ShowMenuJrn().

    +Show the menu of the jrn depending of its type return a not yet used access key. The returned key is added to $access_key_list. +

    +get_quick_key

    +

    Parameters:
    + + + +
    $title 
    &$access_key_list 
    +
    +
    Returns:
    string containing the menu
      +
    +

    -Definition at line 368 of file user_menu.php. +Definition at line 375 of file user_menu.php.

    -References echo_debug(). +References echo_debug().

    -Referenced by ShowMenuJrn().

    @@ -129,13 +166,24 @@ Referenced by ShowMenuJr

    +Get all the available folders for the users, checked with the security. +

    +

    Parameters:
    + + + +
    $p_user user login
    $p_admin 1 if admin
    +
    +
    Returns:
    array containing
      +
    • ac_dossier.dos_id
    • ac_dossier.dos_name
    • ac_dossier.dos_description
    +

    -Definition at line 94 of file user_menu.php. +Definition at line 90 of file user_menu.php.

    -References $array, $cn, $filter, $Res, $sql, DbConnect(), and ExecSql(). +References $array, $cn, $filter, $Res, $sql, DbConnect(), and ExecSql().

    -Referenced by u_ShowDossier(). +Referenced by u_ShowDossier().

    @@ -172,11 +220,20 @@ Referenced by u_ShowDoss

    +Open the first legder automaticaly. +

    +

    Parameters:
    + + + +
    $p_dossier ($_SESSION['g_dossier'])
    $p_type type of the ledger (VEN,ACH,FIN,ODS)
    +
    +
    Returns:
    the first jrn_def_id

    -Definition at line 225 of file user_menu.php. +Definition at line 220 of file user_menu.php.

    -References $l_line, $Ret, DbConnect(), and ExecSql(). +References $l_line, $Ret, DbConnect(), and ExecSql().

    @@ -203,11 +260,11 @@ References $l_line,

    - +MenuAdmin

    -Definition at line 574 of file user_menu.php. +Definition at line 578 of file user_menu.php.

    -References ShowItem(). +References ShowItem().

    @@ -235,11 +292,19 @@ References ShowItem()

    +Show the menu in the jrn page. +

    +

    Parameters:
    + + +
    $p_dossier 
    +
    +
    Returns:
    nothing

    -Definition at line 647 of file user_menu.php. +Definition at line 651 of file user_menu.php.

    -References $l_line, $Max, $Ret, DbConnect(), and ExecSql(). +References $l_line, $Max, $Ret, DbConnect(), and ExecSql().

    @@ -267,11 +332,19 @@ References $l_line,

    +Return a string containing the menu main menu when you click on Journaux. +

    +

    Parameters:
    + + +
    $p_menu the current menu (selected)
    +
    +
    Returns:
    HTML Code

    -Definition at line 520 of file user_menu.php. +Definition at line 524 of file user_menu.php.

    -References $p_array, $result, and ShowItem(). +References $p_array, $result, and ShowItem().

    @@ -299,14 +372,22 @@ References $p_array

    +build the menu of user_advanced.php +

    +

    Parameters:
    + + +
    $default 
    +
    +
    Returns:
    the menu

    -Definition at line 493 of file user_menu.php. +Definition at line 498 of file user_menu.php.

    -References $left_menu, $r, Centralise(), and ShowItem(). +References $left_menu, $r, Centralise(), and ShowItem(). -

    +

    - - - + + + + + + + + + + + +
    @@ -315,9 +396,18 @@ References $left_menu, ShowMenuCompta p_dossier  )  p_dossier,
    p_high = ""
    @@ -331,11 +421,21 @@ References $left_menu,

    +show the top menu for the user profile and highight the selected one +

    +

    Parameters:
    + + + +
    p_dossier $_SESSION['g_dossier']
    p_high what to hightlight, by default it is autodetected but sometimes it must be given. Default value=""
    +
    +
    Todo:
    clean param p_dossier
    +
    Returns:
    none

    -Definition at line 169 of file user_menu.php. +Definition at line 166 of file user_menu.php.

    -References $default, $p_array, $r, $result, ShowItem(), and width. +References $default, $p_array, $r, $result, echo_debug(), ShowItem(), and width.

    @@ -363,11 +463,58 @@ References $default

    +Show the left menu for the report (add a report, view it). +

    +

    Parameters:
    + + +
    $p_dossier dossier id
    +
    +
    Returns:
    nothing

    -Definition at line 700 of file user_menu.php. +Definition at line 704 of file user_menu.php.

    -References $cn, $l_line, $Max, $Ret, DbConnect(), and ExecSql(). +References $cn, $l_line, $Max, $Ret, DbConnect(), and ExecSql(). + + +

    + + + + +
    + + + + + + + + +
    ShowMenuDocument  ) 
    +
    + + + +
    +   + + +

    +: Display Document's menu +

    +

    Parameters:
    + + +
    none 
    +
    +
    Returns:
    string
    + +

    +Definition at line 598 of file user_menu.php. +

    +References ShowItem().

    @@ -395,11 +542,20 @@ References $cn,

    +Show the menu for the card management. +

    +

    Parameters:
    + + +
    $p_dossier dossier 1
    +
    +
    Returns:
    nothing
    +
    Todo:
    Only for developper A test must be added

    -Definition at line 544 of file user_menu.php. +Definition at line 548 of file user_menu.php.

    -References $cn, $l_line, $Max, $Res, DbConnect(), and ExecSql(). +References $cn, $l_line, $Max, $Res, DbConnect(), and ExecSql().

    @@ -426,40 +582,12 @@ References $cn,

    +Show the menu for importing, verify and transfert Bank CSV. +

    +

    Returns:
    nothing

    -Definition at line 717 of file user_menu.php. - - -

    - - - - -
    - - - - - - - - -
    ShowMenuInvoice  ) 
    -
    - - - - +Definition at line 727 of file user_menu.php.
    -   - - -

    - -

    -Definition at line 597 of file user_menu.php. -

    -References ShowItem().

    @@ -502,14 +630,24 @@ References ShowItem()

    +Show the menu of the jrn depending of its type, check with the security. +

    +

    Parameters:
    + + + + +
    p_cn database connection
    p_jrn_type type of the ledger
    p_jrn jrn id
    +
    +
    Returns:
    string containing the menu

    -Definition at line 326 of file user_menu.php. +Definition at line 333 of file user_menu.php.

    -References $action, $num, $Res, $ret, ExecSql(), and get_quick_key(). +References $action, $num, $Res, $ret, ExecSql(), and get_quick_key(). -

    +

    - + + + + + + + @@ -549,11 +693,24 @@ References $action +References $l_line, $Max, $Ret, $right, $User, CheckJrn(), DbConnect(), echo_debug(), and ExecSql().
    @@ -530,7 +668,13 @@ References $action p_jrn p_jrn,
    p_extra = ""

    +Show the Menu from the jrn encode page. +

    +ShowMenuJrnUser($p_dossier,$p_type,$p_jrn)

    +

    Parameters:
    + + + + + +
    $p_dossier number
    $p_type type of journal (VEN,ACH,BQE,ODS)
    $p_jrn journal
    $p_extra html code to add at the return (before the </table>)
    +
    +
    Returns:
    string with table in HTML
    +
    Note:
    we use the SCRIPT_NAME variable to build the href value but we need to add a parameter when the REQUEST_url is commercial.php

    -Definition at line 247 of file user_menu.php. +Definition at line 246 of file user_menu.php.

    -References $l_line, $Max, $Ret, $right, $User, CheckJrn(), DbConnect(), echo_debug(), and ExecSql().

    @@ -581,11 +738,19 @@ References $l_line,

    +Show the parameter menu. +

    +

    Parameters:
    + + +
    $p_action the last action choosed
    +
    +
    Returns:
    HTML Code

    -Definition at line 617 of file user_menu.php. +Definition at line 618 of file user_menu.php.

    -References ShowItem(), and width. +References ShowItem(), and width.

    @@ -613,9 +778,17 @@ References ShowItem()

    +Show the menu from the pcmn page. +

    +

    Parameters:
    + + +
    $p_start class start default=1
    +
    +
    Returns:
    nothing

    -Definition at line 677 of file user_menu.php. +Definition at line 681 of file user_menu.php.

    @@ -652,11 +825,20 @@ Definition at line 677

    +Show all the available folder for the users at the login page. +

    +

    Parameters:
    + + + +
    $p_user user
    $p_admin 1 if admin
    +
    +
    Returns:
    table in HTML

    -Definition at line 36 of file user_menu.php. +Definition at line 37 of file user_menu.php.

    -References $desc, $i, $p_array, $result, $tr, and GetAvailableFolder(). +References $desc, $i, $p_array, $result, $tr, and GetAvailableFolder().

    @@ -699,11 +881,22 @@ References $desc, <

    +Show The login menu. +

    +

    Parameters:
    + + + + +
    $p_admin 1 if admin
    $p_check not used
    $p_item item to add (default="")
    +
    +
    Returns:
    : nothing
    +
    Todo:
    clean $p_check

    -Definition at line 137 of file user_menu.php. +Definition at line 132 of file user_menu.php.

    -References html_button_logout(). +References html_button_logout().

    @@ -752,14 +945,25 @@ References html_button_l

    +Returns the form for the search (module accountancy). +

    +

    Parameters:
    + + + + + +
    : 
    $p_cn database connection
    $p_jrn jrn id
    $p_array=null previous search
    +
    +
    Returns:
    HTML Code

    -Definition at line 398 of file user_menu.php. +Definition at line 405 of file user_menu.php.

    -References $opt, $r, echo_debug(), METHOD, name, size, and value. +References $opt, $r, echo_debug(), METHOD, name, size, and value. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__pref_8php-source.html b/doc/developper/html/user__pref_8php-source.html index a544f3609..ee257e0b9 100644 --- a/doc/developper/html/user__pref_8php-source.html +++ b/doc/developper/html/user__pref_8php-source.html @@ -4,7 +4,7 @@ - +

    user_pref.php

    Go to the documentation of this file.
    00001 <?
    @@ -28,45 +28,45 @@
     00019 
     00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00021 /* $Revision$ */
    -00022 include_once ("ac_common.php");
    -00023 include_once ("postgres.php");
    -00024 /* Admin. Dossier */
    -00025 $Rep=DbConnect();
    -00026 include_once ("class_user.php");
    -00027 $cn=DbConnect($_SESSION['g_dossier']);
    -00028 $User=new cl_user($cn);
    -00029 $User->Check();
    -00030 // Met a jour le theme utilisateur (style)
    -00031 if ( isset ( $_POST['style_user']) ) {
    -00032         $User->update_global_pref('THEME',$_POST['style_user']);
    -00033       $_SESSION['g_theme']=$_POST['style_user'];
    -00034 
    -00035 }
    -00036 
    -00037 html_page_start($_SESSION['g_theme']);
    +00026 include_once ("ac_common.php");
    +00027 include_once ("postgres.php");
    +00028 /* Admin. Dossier */
    +00029 $Rep=DbConnect();
    +00030 include_once ("class_user.php");
    +00031 $cn=DbConnect($_SESSION['g_dossier']);
    +00032 $User=new cl_user($cn);
    +00033 $User->Check();
    +00034 // Met a jour le theme utilisateur (style)
    +00035 if ( isset ( $_POST['style_user']) ) {
    +00036         $User->update_global_pref('THEME',$_POST['style_user']);
    +00037       $_SESSION['g_theme']=$_POST['style_user'];
     00038 
    -00039 // Met a jour le pagesize
    -00040 if ( isset ( $_POST['p_size']) ) {
    -00041         $User->update_global_pref('PAGESIZE',$_POST['p_size']);
    -00042       $_SESSION['g_pagesize']=$_POST['p_size'];
    -00043 
    -00044 }
    -00045 
    -00046 // show the top menu depending of the use_style
    -00047 // comta style
    -00048 
    -00049 include_once ("user_menu.php");
    -00050 if ( isset ($_SESSION['g_dossier']) ) {
    -00051   if ( $_SESSION['g_dossier'] != 0 )  
    -00052 echo '<div class="u_tmenu">';
    -00053 
    -00054 echo    ShowMenuCompta($_SESSION['g_dossier']);
    -00055  echo "</div>";
    -00056   }
    -00057 require_once("pref.inc.php");
    -00058 html_page_stop();
    -00059 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00039 } +00040 +00041 html_page_start($_SESSION['g_theme']); +00042 +00043 // Met a jour le pagesize +00044 if ( isset ( $_POST['p_size']) ) { +00045 $User->update_global_pref('PAGESIZE',$_POST['p_size']); +00046 $_SESSION['g_pagesize']=$_POST['p_size']; +00047 +00048 } +00049 +00050 // show the top menu depending of the use_style +00051 // comta style +00052 +00053 include_once ("user_menu.php"); +00054 if ( isset ($_SESSION['g_dossier']) ) { +00055 if ( $_SESSION['g_dossier'] != 0 ) +00056 echo '<div class="u_tmenu">'; +00057 +00058 echo ShowMenuCompta($_SESSION['g_dossier']); +00059 echo "</div>"; +00060 } +00061 require_once("pref.inc.php"); +00062 html_page_stop(); +00063 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__pref_8php.html b/doc/developper/html/user__pref_8php.html index 146218f10..2f58e5315 100644 --- a/doc/developper/html/user__pref_8php.html +++ b/doc/developper/html/user__pref_8php.html @@ -4,10 +4,12 @@ - + -

    user_pref.php File Reference

    +

    user_pref.php File Reference

    Page for the personal preference (theme, password,...). More... +

    +

    Go to the source code of this file. @@ -21,7 +23,12 @@
     $_SESSION ['g_theme'] = $_POST['style_user']
    -


    Variable Documentation

    +

    Detailed Description

    +Page for the personal preference (theme, password,...). +

    + +

    +Definition in file user_pref.php.


    Variable Documentation

    @@ -44,7 +51,7 @@

    -Definition at line 33 of file user_pref.php. +Definition at line 37 of file user_pref.php.

    @@ -69,7 +76,7 @@ Definition at line 33

    -Definition at line 27 of file user_pref.php. +Definition at line 31 of file user_pref.php.

    @@ -94,7 +101,7 @@ Definition at line 27

    -Definition at line 25 of file user_pref.php. +Definition at line 29 of file user_pref.php.

    @@ -119,10 +126,10 @@ Definition at line 25

    -Definition at line 28 of file user_pref.php. +Definition at line 32 of file user_pref.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__sec_8php-source.html b/doc/developper/html/user__sec_8php-source.html index f3558d8ad..dc86f69cf 100644 --- a/doc/developper/html/user__sec_8php-source.html +++ b/doc/developper/html/user__sec_8php-source.html @@ -4,7 +4,7 @@ - +

    user_sec.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,250 +27,249 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 
    -00022 include_once ("ac_common.php");
    -00023 include_once("check_priv.php");
    -00024 html_page_start($_SESSION['g_theme']);
    -00025 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    -00026   echo "You must choose a Dossier ";
    -00027   exit -2;
    -00028 }
    -00029 include_once ("postgres.php");
    -00030 /* Admin. Dossier */
    -00031 $rep=DbConnect();
    -00032 include_once ("class_user.php");
    -00033 $User=new cl_user($rep);
    -00034 $User->Check();
    -00035 
    -00036 include_once ("user_menu.php");
    -00037 
    -00038 $cn_dossier=DbConnect($_SESSION['g_dossier']);
    -00039 
    -00040 if ( $User->CheckAction($cn_dossier,SECU) == 0 ) {
    -00041   /* Cannot Access */
    -00042   NoAccess();
    -00043   exit -1;
    -00044  }
    -00045 echo "<H2 class=\"info\">".$_SESSION['g_name']." </H2>";
    -00046 
    -00047 echo ShowMenuParam("user_sec.php");
    -00048 
    +00025 include_once ("ac_common.php");
    +00026 include_once("check_priv.php");
    +00027 html_page_start($_SESSION['g_theme']);
    +00028 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
    +00029   echo "You must choose a Dossier ";
    +00030   exit -2;
    +00031 }
    +00032 include_once ("postgres.php");
    +00033 /* Admin. Dossier */
    +00034 $rep=DbConnect();
    +00035 include_once ("class_user.php");
    +00036 $User=new cl_user($rep);
    +00037 $User->Check();
    +00038 
    +00039 include_once ("user_menu.php");
    +00040 
    +00041 $cn_dossier=DbConnect($_SESSION['g_dossier']);
    +00042 
    +00043 if ( $User->CheckAction($cn_dossier,SECU) == 0 ) {
    +00044   /* Cannot Access */
    +00045   NoAccess();
    +00046   exit -1;
    +00047  }
    +00048 echo "<H2 class=\"info\">".$_SESSION['g_name']." </H2>";
     00049 
    -00050 $cn=DbConnect();
    -00051 $User=ExecSql($cn,"select  use_id,use_first_name,use_name,use_login from ac_users natural join jnt_use_dos where use_login != 'phpcompta' and dos_id=".$_SESSION['g_dossier']);
    -00052 $MaxUser=pg_NumRows($User);
    -00053 
    -00054 
    -00055 echo '<DIV >';
    +00050 echo ShowMenuParam("user_sec.php");
    +00051 
    +00052 
    +00053 $cn=DbConnect();
    +00054 $User=ExecSql($cn,"select  use_id,use_first_name,use_name,use_login from ac_users natural join jnt_use_dos where use_login != 'phpcompta' and dos_id=".$_SESSION['g_dossier']);
    +00055 $MaxUser=pg_NumRows($User);
     00056 
    -00057 echo '<TABLE CELLSPACING="20" ALIGN="CENTER">';
    -00058 for ($i = 0;$i < $MaxUser;$i++) {
    -00059   $l_line=pg_fetch_array($User,$i);
    -00060   //  echo '<TR>';
    -00061   if ( $i % 3 == 0 && $i != 0)
    -00062     echo "</TR><TR>";
    -00063 
    -00064   printf ('<TD><A href="user_sec.php?action=view&user_id=%s">%s %s ( %s )</A></TD>',
    -00065           $l_line['use_id'],
    -00066           $l_line['use_first_name'],
    -00067           $l_line['use_name'],
    -00068           $l_line['use_login'] );
    -00069 
    -00070 }
    -00071 echo "</TR>";
    -00072 echo '</TABLE>';
    -00073 $action="";
    -00074 
    -00075 if ( isset ($_GET["action"] )) {
    -00076   $action=$_GET["action"];
    +00057 
    +00058 echo '<DIV >';
    +00059 
    +00060 echo '<TABLE CELLSPACING="20" ALIGN="CENTER">';
    +00061 for ($i = 0;$i < $MaxUser;$i++) {
    +00062   $l_line=pg_fetch_array($User,$i);
    +00063   //  echo '<TR>';
    +00064   if ( $i % 3 == 0 && $i != 0)
    +00065     echo "</TR><TR>";
    +00066 
    +00067   printf ('<TD><A href="user_sec.php?action=view&user_id=%s">%s %s ( %s )</A></TD>',
    +00068           $l_line['use_id'],
    +00069           $l_line['use_first_name'],
    +00070           $l_line['use_name'],
    +00071           $l_line['use_login'] );
    +00072 
    +00073 }
    +00074 echo "</TR>";
    +00075 echo '</TABLE>';
    +00076 $action="";
     00077 
    -00078 }
    -00079 
    -00080 // session_register set to off, so variable are undefined
    -00081 foreach ($HTTP_GET_VARS as $name=>$value) 
    -00082   ${"$name"}=$value;
    -00083 
    -00084 if ( $action == "change_jrn" ) {
    -00085   // Check if the user can access that folder
    -00086   if ( CheckDossier($_GET['login'],$_SESSION['g_dossier']) == 0 ) {
    -00087     echo "<H2 class=\"error\">he cannot access this folder</H2>";
    -00088     $action="";
    -00089     return;
    -00090   }
    -00091   $login=$_GET['login'];
    -00092   $jrn=$_GET['jrn'];
    -00093   $access=$_GET['access'];
    -00094   $l_Db=sprintf("dossier%d",$_SESSION['g_dossier']);
    -00095   echo_debug('user_sec.php',__LINE__,"select * from user_sec_jrn where uj_login='$login' and uj_jrn_id=$jrn");
    -00096   $cn_dossier=DbConnect($_SESSION['g_dossier']);
    -00097   $l2_Res=ExecSql($cn_dossier,
    -00098                   "select * from user_sec_jrn where uj_login='$login' and uj_jrn_id=$jrn");
    -00099   $l2_count=pg_NumRows($l2_Res);
    -00100   if ( $l2_count == 1 ) {
    -00101     $Res=ExecSql($cn_dossier,"update  user_sec_jrn set uj_priv='$access' where uj_login='$login' and uj_jrn_id=$jrn");
    -00102   } else {
    -00103     $Res=ExecSql($cn_dossier,"insert into  user_sec_jrn(uj_login,uj_jrn_id,uj_priv) values( '$login' ,$jrn,'$access')");
    -00104   }
    -00105 
    -00106   $action="view";
    -00107 }
    -00108 if ( $action == "change_act" ) {
    -00109   // Check if the user can access that folder
    -00110   if ( CheckDossier($_GET['login'],$_SESSION['g_dossier']) == 0 ) {
    -00111     echo "<H2 class=\"error\">he cannot access this folder</H2>";
    -00112     $action="";
    -00113     return;
    -00114   }
    -00115   $l_Db=sprintf("dossier%d",$_SESSION['g_dossier']);
    -00116   $cn_dossier=DbConnect($_SESSION['g_dossier']);
    -00117   if ( $_GET['access']==0) {
    -00118     echo_debug('user_sec.php',__LINE__,"delete right");
    -00119     $Res=ExecSql($cn_dossier,
    -00120                  "delete from user_sec_act where ua_login='".$_GET['login']."' and ua_act_id=$act");
    -00121   } else {
    -00122     echo_debug('user_sec.php',__LINE__,"insert right");
    -00123     $Res=ExecSql($cn_dossier,
    -00124                  "insert into  user_sec_act(ua_login,ua_act_id) values( '$login' ,$act)");
    -00125   }
    -00126   $action="view";
    -00127 }
    -00128 // Action == View detail for users 
    -00129 if ( $action == "view" ) {
    -00130   $l_Db=sprintf("dossier%d",$_SESSION['g_dossier']);
    -00131   $cn_dossier=DbConnect($_SESSION['g_dossier']);
    -00132   $cn=DbConnect();
    -00133   $User=ExecSql($cn,
    -00134                 "select  use_id,use_first_name,use_name,use_login
    -00135                 from ac_users where use_id=".$_GET['user_id']);
    -00136   $MaxUser=pg_NumRows($User);
    -00137   if ( $MaxUser == 0 ) return;
    -00138   $l2_line=pg_fetch_array($User,0);
    -00139 
    -00140   printf ('<H2 class="info"> Détail utilisateur %s %s (%s) </H2>',
    -00141           $l2_line['use_first_name'],
    -00142           $l2_line['use_name'],
    -00143           $l2_line['use_login']);
    -00144   // Check if the user can access that folder
    -00145   if ( CheckDossier($l2_line['use_login'],$_SESSION['g_dossier']) == 0 ) {
    -00146     echo "<H2 class=\"error\">he cannot access this folder</H2>";
    -00147     $action="";
    -00148     return;
    -00149   }
    -00150   // Print button
    -00151   printf ('<TD><A href="sec_pdf.php?user_id=%s">Imprime</A></TD>',
    -00152           $l_line['use_id']
    -00153           );
    -00154 
    -00155   // Show access for journal
    -00156   $Res=ExecSql($cn_dossier,"select jrn_def_id,jrn_def_name  from jrn_def ");
    -00157   $admin=CheckIsAdmin($l2_line['use_login']);
    -00158 
    -00159   echo '<table align="CENTER" width="100%">';
    -00160   $MaxJrn=pg_NumRows($Res);
    -00161   for ( $i =0 ; $i < $MaxJrn; $i++ ) {
    -00162     $l_line=pg_fetch_array($Res,$i);
    -00163     echo '<TR> ';
    -00164     if ( $i == 0 ) echo '<TD> <B> Journal </B> </TD>';else echo "<TD></TD>";
    -00165     echo "<TD> $l_line[jrn_def_name] </TD>";
    -00166 
    -00167     $l_change="action=change_jrn&jrn=$l_line[jrn_def_id]&login=$l2_line[use_login]&user_id=$l2_line[use_id]";
    -00168 
    -00169     if ( $admin == 0) {
    -00170       $right=    CheckJrn($_SESSION['g_dossier'],$l2_line['use_login'],$l_line['jrn_def_id'] );
    -00171       echo_debug('user_sec.php',__LINE__,"Privilege is $right");
    -00172     } else $right = 3;
    -00173     if ( $right == 0 ) {
    -00174       echo "<TD BGCOLOR=RED>";
    -00175       echo "Pas d'accès";
    -00176       echo "</TD>";
    -00177       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=R"> Lecture</A></TD>';
    -00178       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=W"> Ecriture</A></TD>';
    -00179 
    -00180       }
    -00181     if ( $right == 1 ) {
    -00182       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=X"> Pas d\'accès</A></TD>';
    -00183       echo "<TD BGCOLOR=\"#3BCD27\">";
    -00184       echo "Lecture ";
    -00185       echo "</TD>";
    -00186       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=W"> Ecriture</A></TD>';
    -00187     }
    -00188     if ( $right == 2 ) {
    -00189       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=X"> Pas d\'accès</A></TD>';
    -00190       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=R"> Lecture</A></TD>';
    -00191 
    -00192       echo "<TD BGCOLOR=\"#3BCD27\">";
    -00193       echo "Ecriture ";
    -00194       echo "</TD>";
    -00195 
    -00196     }
    -00197     if ( $right == 3 ) { 
    -00198       echo '<TD class="mtitle">  Pas d\'accès</TD>';
    -00199       echo '<TD class="mtitle">  Lecture </TD>';
    -00200 
    -00201       echo "<TD BGCOLOR=\"#3BCD27\">";
    -00202       echo "Ecriture ";
    -00203       echo "</TD>";
    -00204 
    -00205     }
    -00206 
    +00078 if ( isset ($_GET["action"] )) {
    +00079   $action=$_GET["action"];
    +00080 
    +00081 }
    +00082 
    +00083 // session_register set to off, so variable are undefined
    +00084 foreach ($HTTP_GET_VARS as $name=>$value) 
    +00085   ${"$name"}=$value;
    +00086 
    +00087 if ( $action == "change_jrn" ) {
    +00088   // Check if the user can access that folder
    +00089   if ( CheckDossier($_GET['login'],$_SESSION['g_dossier']) == 0 ) {
    +00090     echo "<H2 class=\"error\">he cannot access this folder</H2>";
    +00091     $action="";
    +00092     return;
    +00093   }
    +00094   $login=$_GET['login'];
    +00095   $jrn=$_GET['jrn'];
    +00096   $access=$_GET['access'];
    +00097   $l_Db=sprintf("dossier%d",$_SESSION['g_dossier']);
    +00098   echo_debug('user_sec.php',__LINE__,"select * from user_sec_jrn where uj_login='$login' and uj_jrn_id=$jrn");
    +00099   $cn_dossier=DbConnect($_SESSION['g_dossier']);
    +00100   $l2_Res=ExecSql($cn_dossier,
    +00101                   "select * from user_sec_jrn where uj_login='$login' and uj_jrn_id=$jrn");
    +00102   $l2_count=pg_NumRows($l2_Res);
    +00103   if ( $l2_count == 1 ) {
    +00104     $Res=ExecSql($cn_dossier,"update  user_sec_jrn set uj_priv='$access' where uj_login='$login' and uj_jrn_id=$jrn");
    +00105   } else {
    +00106     $Res=ExecSql($cn_dossier,"insert into  user_sec_jrn(uj_login,uj_jrn_id,uj_priv) values( '$login' ,$jrn,'$access')");
    +00107   }
    +00108 
    +00109   $action="view";
    +00110 }
    +00111 if ( $action == "change_act" ) {
    +00112   // Check if the user can access that folder
    +00113   if ( CheckDossier($_GET['login'],$_SESSION['g_dossier']) == 0 ) {
    +00114     echo "<H2 class=\"error\">he cannot access this folder</H2>";
    +00115     $action="";
    +00116     return;
    +00117   }
    +00118   $l_Db=sprintf("dossier%d",$_SESSION['g_dossier']);
    +00119   $cn_dossier=DbConnect($_SESSION['g_dossier']);
    +00120   if ( $_GET['access']==0) {
    +00121     echo_debug('user_sec.php',__LINE__,"delete right");
    +00122     $Res=ExecSql($cn_dossier,
    +00123                  "delete from user_sec_act where ua_login='".$_GET['login']."' and ua_act_id=$act");
    +00124   } else {
    +00125     echo_debug('user_sec.php',__LINE__,"insert right");
    +00126     $Res=ExecSql($cn_dossier,
    +00127                  "insert into  user_sec_act(ua_login,ua_act_id) values( '$login' ,$act)");
    +00128   }
    +00129   $action="view";
    +00130 }
    +00131 // Action == View detail for users 
    +00132 if ( $action == "view" ) {
    +00133   $l_Db=sprintf("dossier%d",$_SESSION['g_dossier']);
    +00134   $cn_dossier=DbConnect($_SESSION['g_dossier']);
    +00135   $cn=DbConnect();
    +00136   $User=ExecSql($cn,
    +00137                 "select  use_id,use_first_name,use_name,use_login
    +00138                 from ac_users where use_id=".$_GET['user_id']);
    +00139   $MaxUser=pg_NumRows($User);
    +00140   if ( $MaxUser == 0 ) return;
    +00141   $l2_line=pg_fetch_array($User,0);
    +00142 
    +00143   printf ('<H2 class="info"> Détail utilisateur %s %s (%s) </H2>',
    +00144           $l2_line['use_first_name'],
    +00145           $l2_line['use_name'],
    +00146           $l2_line['use_login']);
    +00147   // Check if the user can access that folder
    +00148   if ( CheckDossier($l2_line['use_login'],$_SESSION['g_dossier']) == 0 ) {
    +00149     echo "<H2 class=\"error\">he cannot access this folder</H2>";
    +00150     $action="";
    +00151     return;
    +00152   }
    +00153   // Print button
    +00154   printf ('<TD><A href="sec_pdf.php?user_id=%s">Imprime</A></TD>',
    +00155           $l_line['use_id']
    +00156           );
    +00157 
    +00158   // Show access for journal
    +00159   $Res=ExecSql($cn_dossier,"select jrn_def_id,jrn_def_name  from jrn_def ");
    +00160   $admin=CheckIsAdmin($l2_line['use_login']);
    +00161 
    +00162   echo '<table align="CENTER" width="100%">';
    +00163   $MaxJrn=pg_NumRows($Res);
    +00164   for ( $i =0 ; $i < $MaxJrn; $i++ ) {
    +00165     $l_line=pg_fetch_array($Res,$i);
    +00166     echo '<TR> ';
    +00167     if ( $i == 0 ) echo '<TD> <B> Journal </B> </TD>';else echo "<TD></TD>";
    +00168     echo "<TD> $l_line[jrn_def_name] </TD>";
    +00169 
    +00170     $l_change="action=change_jrn&jrn=$l_line[jrn_def_id]&login=$l2_line[use_login]&user_id=$l2_line[use_id]";
    +00171 
    +00172     if ( $admin == 0) {
    +00173       $right=    CheckJrn($_SESSION['g_dossier'],$l2_line['use_login'],$l_line['jrn_def_id'] );
    +00174       echo_debug('user_sec.php',__LINE__,"Privilege is $right");
    +00175     } else $right = 3;
    +00176     if ( $right == 0 ) {
    +00177       echo "<TD BGCOLOR=RED>";
    +00178       echo "Pas d'accès";
    +00179       echo "</TD>";
    +00180       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=R"> Lecture</A></TD>';
    +00181       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=W"> Ecriture</A></TD>';
    +00182 
    +00183       }
    +00184     if ( $right == 1 ) {
    +00185       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=X"> Pas d\'accès</A></TD>';
    +00186       echo "<TD BGCOLOR=\"#3BCD27\">";
    +00187       echo "Lecture ";
    +00188       echo "</TD>";
    +00189       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=W"> Ecriture</A></TD>';
    +00190     }
    +00191     if ( $right == 2 ) {
    +00192       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=X"> Pas d\'accès</A></TD>';
    +00193       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'&access=R"> Lecture</A></TD>';
    +00194 
    +00195       echo "<TD BGCOLOR=\"#3BCD27\">";
    +00196       echo "Ecriture ";
    +00197       echo "</TD>";
    +00198 
    +00199     }
    +00200     if ( $right == 3 ) { 
    +00201       echo '<TD class="mtitle">  Pas d\'accès</TD>';
    +00202       echo '<TD class="mtitle">  Lecture </TD>';
    +00203 
    +00204       echo "<TD BGCOLOR=\"#3BCD27\">";
    +00205       echo "Ecriture ";
    +00206       echo "</TD>";
     00207 
    -00208 
    -00209     echo '</TR>';
    -00210   }
    +00208     }
    +00209 
    +00210 
     00211 
    -00212   // Priv. for actions
    -00213   $Res=ExecSql($cn_dossier,
    -00214                "select ac_id, ac_description from action   order by ac_description ");
    -00215 
    -00216   $MaxJrn=pg_NumRows($Res);
    -00217 
    -00218   for ( $i =0 ; $i < $MaxJrn; $i++ ) {
    -00219     $l_line=pg_fetch_array($Res,$i);
    -00220     echo '<TR> ';
    -00221     if ( $i == 0 ) echo '<TD> <B> Action <B></TD>';else echo "<TD></TD>";
    -00222     echo "<TD>". $l_line['ac_description']." </TD>";
    -00223 
    -00224       $l_change="action=change_act&act=".$l_line['ac_id']."&login=".$l2_line['use_login']."&user_id=".$l2_line['use_id'];
    -00225       if ( $admin ==0 ) {
    -00226         $right=CheckAction($_SESSION['g_dossier'],$l2_line['use_login'],$l_line['ac_id']);
    -00227       } else {
    -00228         $right = 2;
    -00229       }
    -00230     if ( $right == 0 ) {
    -00231       echo "<TD BGCOLOR=RED>";
    -00232       echo "Pas d'accès";
    -00233       echo "</TD>";
    -00234       $l_change=$l_change."&access=1";
    -00235       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'"> Accès </A></TD>';
    -00236     }   
    -00237     if ( $right == 1) {
    -00238       $l_change=$l_change."&access=0";
    -00239       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'"> Pas d\'accès </A></TD>';
    -00240       echo "<TD BGCOLOR=\"#3BCD27\">";
    -00241       echo "Accès ";
    -00242       echo "</TD>";
    -00243       
    -00244     }
    -00245     if ( $right == 2) {
    -00246 
    -00247       echo '<TD class="mtitle">  Change </TD>';
    -00248       echo "<TD BGCOLOR=\"#3BCD27\">";
    -00249       echo "Accès ";
    -00250       echo "</TD>";
    -00251       
    -00252     }
    -00253 
    -00254 
    -00255     echo '</TR>';
    -00256   }
    +00212     echo '</TR>';
    +00213   }
    +00214 
    +00215   // Priv. for actions
    +00216   $Res=ExecSql($cn_dossier,
    +00217                "select ac_id, ac_description from action   order by ac_description ");
    +00218 
    +00219   $MaxJrn=pg_NumRows($Res);
    +00220 
    +00221   for ( $i =0 ; $i < $MaxJrn; $i++ ) {
    +00222     $l_line=pg_fetch_array($Res,$i);
    +00223     echo '<TR> ';
    +00224     if ( $i == 0 ) echo '<TD> <B> Action <B></TD>';else echo "<TD></TD>";
    +00225     echo "<TD>". $l_line['ac_description']." </TD>";
    +00226 
    +00227       $l_change="action=change_act&act=".$l_line['ac_id']."&login=".$l2_line['use_login']."&user_id=".$l2_line['use_id'];
    +00228       if ( $admin ==0 ) {
    +00229         $right=CheckAction($_SESSION['g_dossier'],$l2_line['use_login'],$l_line['ac_id']);
    +00230       } else {
    +00231         $right = 2;
    +00232       }
    +00233     if ( $right == 0 ) {
    +00234       echo "<TD BGCOLOR=RED>";
    +00235       echo "Pas d'accès";
    +00236       echo "</TD>";
    +00237       $l_change=$l_change."&access=1";
    +00238       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'"> Accès </A></TD>';
    +00239     }   
    +00240     if ( $right == 1) {
    +00241       $l_change=$l_change."&access=0";
    +00242       echo '<TD class="mtitle"> <A CLASS="mtitle" HREF="user_sec.php?'.$l_change.'"> Pas d\'accès </A></TD>';
    +00243       echo "<TD BGCOLOR=\"#3BCD27\">";
    +00244       echo "Accès ";
    +00245       echo "</TD>";
    +00246       
    +00247     }
    +00248     if ( $right == 2) {
    +00249 
    +00250       echo '<TD class="mtitle">  Change </TD>';
    +00251       echo "<TD BGCOLOR=\"#3BCD27\">";
    +00252       echo "Accès ";
    +00253       echo "</TD>";
    +00254       
    +00255     }
    +00256 
     00257 
    -00258   echo '</TABLE>';
    -00259     
    -00260 }
    -00261 echo "</DIV>";
    -00262 html_page_stop();
    -00263 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00258 echo '</TR>'; +00259 } +00260 +00261 echo '</TABLE>'; +00262 +00263 } +00264 echo "</DIV>"; +00265 html_page_stop(); +00266 ?> +
    Generated on Thu Jun 22 23:54:03 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__sec_8php.html b/doc/developper/html/user__sec_8php.html index e5b8cc658..b0041041d 100644 --- a/doc/developper/html/user__sec_8php.html +++ b/doc/developper/html/user__sec_8php.html @@ -4,10 +4,12 @@ - + -

    user_sec.php File Reference

    +

    user_sec.php File Reference

    Set the security for an user. More... +

    +

    Go to the source code of this file. @@ -45,14 +47,19 @@
    else $right = 3
    -


    Variable Documentation

    +

    Detailed Description

    +Set the security for an user. +

    + +

    +Definition in file user_sec.php.


    Variable Documentation

    @@ -68,7 +75,7 @@

    -Definition at line 73 of file user_sec.php. +Definition at line 76 of file user_sec.php.

    - +
    $action = "" $action = ""

    @@ -93,7 +100,7 @@ Definition at line 73

    -Definition at line 157 of file user_sec.php. +Definition at line 160 of file user_sec.php.

    @@ -118,7 +125,7 @@ Definition at line 157

    -Definition at line 50 of file user_sec.php. +Definition at line 53 of file user_sec.php.

    @@ -143,7 +150,7 @@ Definition at line 50

    -Definition at line 38 of file user_sec.php. +Definition at line 41 of file user_sec.php.

    @@ -168,7 +175,7 @@ Definition at line 38

    -Definition at line 99 of file user_sec.php. +Definition at line 102 of file user_sec.php.

    @@ -193,9 +200,9 @@ Definition at line 99

    -Definition at line 138 of file user_sec.php. +Definition at line 141 of file user_sec.php.

    -Referenced by RecordJrn(). +Referenced by RecordJrn().

    @@ -222,7 +229,7 @@ Referenced by RecordJrn(). "select * from user_sec_jrn where uj_login='$login' and uj_jrn_id=$jrn")

    -Definition at line 97 of file user_sec.php. +Definition at line 100 of file user_sec.php.

    @@ -247,7 +254,7 @@ Definition at line 97

    -Definition at line 167 of file user_sec.php. +Definition at line 170 of file user_sec.php.

    @@ -272,7 +279,7 @@ Definition at line 167

    -Definition at line 160 of file user_sec.php. +Definition at line 163 of file user_sec.php.

    Referenced by Centralise(). @@ -299,7 +306,7 @@ Referenced by Centrali

    -Definition at line 52 of file user_sec.php. +Definition at line 55 of file user_sec.php.

    @@ -324,7 +331,7 @@ Definition at line 52

    -Definition at line 31 of file user_sec.php. +Definition at line 34 of file user_sec.php.

    @@ -351,7 +358,7 @@ Definition at line 31 "delete from user_sec_act where ua_login='".$_GET['login']."' and ua_act_id=$act")

    -Definition at line 119 of file user_sec.php. +Definition at line 122 of file user_sec.php.

    @@ -376,9 +383,9 @@ Definition at line 119

    -Definition at line 172 of file user_sec.php. +Definition at line 175 of file user_sec.php.

    -Referenced by Cezpdf::ezSetCmMargins(), Cezpdf::ezSetMargins(), Cezpdf::ezText(), ShowMenuJrnUser(), and SyncRight(). +Referenced by Cezpdf::ezSetCmMargins(), Cezpdf::ezSetMargins(), Cezpdf::ezText(), ShowMenuJrnUser(), and SyncRight().

    @@ -403,7 +410,7 @@ Referenced by Cezpdf::

    -Definition at line 33 of file user_sec.php. +Definition at line 36 of file user_sec.php.

    @@ -428,7 +435,7 @@ Definition at line 33

    -Definition at line 164 of file user_sec.php. +Definition at line 167 of file user_sec.php.

    @@ -453,10 +460,10 @@ Definition at line 164

    -Definition at line 43 of file user_sec.php. +Definition at line 46 of file user_sec.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__update_8php-source.html b/doc/developper/html/user__update_8php-source.html index 7a3f1cff3..5b1c24118 100644 --- a/doc/developper/html/user__update_8php-source.html +++ b/doc/developper/html/user__update_8php-source.html @@ -4,7 +4,7 @@ - +

    user_update.php

    Go to the documentation of this file.
    00001 <?
    @@ -27,38 +27,37 @@
     00018 */
     00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
     00020 /* $Revision$ */
    -00021 
    -00022 if ( $action == 'update' ) {
    -00023     if ( CheckJrn($g_dossier,$g_user,$p_jrn) < 2 ) {
    -00024       NoAccess();
    -00025       exit -1;
    -00026     
    -00027     }
    -00028     // p_id is jrn.jr_id
    -00029     $p_id=$_GET["line"];
    -00030     echo_debug('user_update.php',__LINE__," action = update p_id = $p_id");
    -00031     echo JS_VIEW_JRN_DETAIL;
    -00032     echo JS_CONCERNED_OP;
    -00033     $r ='<FORM METHOD="POST" ACTION="user_jrn.php">';
    -00034     $r.=UpdateJrn($cn,$p_id);
    -00035     $r.='<INPUT TYPE="Hidden" name="action" value="update_record">';
    -00036     $r.='<input type="SUBMIT" name="update_record" value="Enregistre">';
    -00037     $r.='</FORM>';
    -00038     echo '<div class="redcontent">';
    -00039     echo $r;
    -00040     echo '</div>';
    -00041   }    
    -00042 if ( isset($_POST['update_record']) ) {
    -00043   // NO UPDATE except rapt & comment
    -00044   UpdateComment($cn,$_POST['jr_id'],$_POST['comment']);
    -00045   InsertRapt($cn,$_POST['jr_id'],$_POST['rapt']);
    -00046   echo '<div class="redcontent">';
    -00047     ViewJrn($g_dossier,$g_user,$p_jrn,"user_jrn.php");
    -00048   echo '</div>';
    -00049 
    -00050 } // if update_record
    -00051 ?>
    -

    Generated on Wed May 31 21:39:15 2006 for phpcompta by  +00025 if ( $action == 'update' ) { +00026 if ( CheckJrn($g_dossier,$g_user,$p_jrn) < 2 ) { +00027 NoAccess(); +00028 exit -1; +00029 +00030 } +00031 // p_id is jrn.jr_id +00032 $p_id=$_GET["line"]; +00033 echo_debug('user_update.php',__LINE__," action = update p_id = $p_id"); +00034 echo JS_VIEW_JRN_DETAIL; +00035 echo JS_CONCERNED_OP; +00036 $r ='<FORM METHOD="POST" ACTION="user_jrn.php">'; +00037 $r.=UpdateJrn($cn,$p_id); +00038 $r.='<INPUT TYPE="Hidden" name="action" value="update_record">'; +00039 $r.='<input type="SUBMIT" name="update_record" value="Enregistre">'; +00040 $r.='</FORM>'; +00041 echo '<div class="redcontent">'; +00042 echo $r; +00043 echo '</div>'; +00044 } +00045 if ( isset($_POST['update_record']) ) { +00046 // NO UPDATE except rapt & comment +00047 UpdateComment($cn,$_POST['jr_id'],$_POST['comment']); +00048 InsertRapt($cn,$_POST['jr_id'],$_POST['rapt']); +00049 echo '<div class="redcontent">'; +00050 ViewJrn($g_dossier,$g_user,$p_jrn,"user_jrn.php"); +00051 echo '</div>'; +00052 +00053 } // if update_record +00054 ?> +
    Generated on Thu Jun 22 23:54:04 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/developper/html/user__update_8php.html b/doc/developper/html/user__update_8php.html index d5c86a7ca..515348474 100644 --- a/doc/developper/html/user__update_8php.html +++ b/doc/developper/html/user__update_8php.html @@ -4,10 +4,12 @@ - + -

    user_update.php File Reference

    +

    user_update.php File Reference

    Check if still used. More... +

    +

    Go to the source code of this file. @@ -19,7 +21,12 @@
     $r = '<FORM METHOD="POST" ACTION="user_jrn.php">'
    -


    Variable Documentation

    +

    Detailed Description

    +Check if still used. +

    + +

    +Definition in file user_update.php.


    Variable Documentation

    @@ -42,9 +49,9 @@

    -Definition at line 29 of file user_update.php. +Definition at line 32 of file user_update.php.

    -Referenced by cl_user::cl_user(), Document_modele::Document_modele(), fiche::fiche(), fiche_def::fiche_def(), GetDataForm(), jrn::jrn(), parm_code::parm_code(), poste::poste(), and rapport::rapport(). +Referenced by cl_user::cl_user(), Document_modele::Document_modele(), fiche::fiche(), fiche_def::fiche_def(), GetDataForm(), jrn::jrn(), parm_code::parm_code(), poste::poste(), and rapport::rapport().

    @@ -69,7 +76,7 @@ Referenced by cl_user::

    -Definition at line 33 of file user_update.php. +Definition at line 36 of file user_update.php.

    @@ -94,10 +101,10 @@ Definition at line 33<

    -Definition at line 25 of file user_update.php. +Definition at line 28 of file user_update.php. -


    Generated on Wed May 31 21:39:16 2006 for phpcompta by  +
    Generated on Thu Jun 22 23:54:05 2006 for phpcompta by  doxygen 1.4.4
    diff --git a/doc/header-file.txt b/doc/header-file.txt index 4899aa3d0..0df82c755 100644 --- a/doc/header-file.txt +++ b/doc/header-file.txt @@ -17,4 +17,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Revision$ */ + // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/* !\file + */ + +/* \brief + * + */ diff --git a/doc/mod_function b/doc/mod_function index c38b40b93..ccda2476d 100644 --- a/doc/mod_function +++ b/doc/mod_function @@ -1,11 +1,10 @@ -/* function - ************************************************** - * Purpose : - * - * parm : - * - - * gen : - * - - * return: +/*! + * \brief + * \param + * \param + * \param + * + * + * \return */ diff --git a/html/admin/sql/patch/upgrade8.sql b/html/admin/sql/patch/upgrade8.sql index 7b0e01c38..6f7d673a6 100644 --- a/html/admin/sql/patch/upgrade8.sql +++ b/html/admin/sql/patch/upgrade8.sql @@ -105,7 +105,7 @@ insert into attr_def(ad_text) values ('TVA non d insert into attr_def(ad_text) values ('TVA non déductible récupérable par l''impôt'); insert into tmp_pcmn( pcm_val,pcm_lib,pcm_val_parent,pcm_country) select distinct 6190,'TVA récupérable par l''impôt',61,'BE' from tmp_pcmn where pcm_country='BE'; insert into tmp_pcmn( pcm_val,pcm_lib,pcm_val_parent,pcm_country) select distinct 6740,'Dépense non admise',67,'BE' from tmp_pcmn where pcm_country='BE' and not exists (select pcm_val from tmp_pcmn where pcm_val=6740); -alter table tmp_pcmn alter pcm_val type text; +-- Change for Stan alter table tmp_pcmn alter pcm_val type text; update version set val=9; diff --git a/html/admin_repo.php b/html/admin_repo.php index 3ff737be7..54757b39c 100644 --- a/html/admin_repo.php +++ b/html/admin_repo.php @@ -19,6 +19,10 @@ * $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Administration of the repository : creation of user, folder, security, + * templates... Accessible only by the administrator + */ include_once("ac_common.php"); include_once("postgres.php"); diff --git a/html/annulation.php b/html/annulation.php index 0d1ba5d97..17dc623f8 100644 --- a/html/annulation.php +++ b/html/annulation.php @@ -18,6 +18,9 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief in a popup window manage the deletion of the operations + */ include_once ("ac_common.php"); include_once ("poste.php"); include_once("preference.php"); diff --git a/html/bal_csv.php b/html/bal_csv.php index 4a38ece14..c6515a6db 100644 --- a/html/bal_csv.php +++ b/html/bal_csv.php @@ -18,6 +18,9 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Return the balance in CSV format + */ header('Content-type: application/csv'); header('Content-Disposition: attachment;filename="balance.csv"',FALSE); include_once ("ac_common.php"); diff --git a/html/bilan.php b/html/bilan.php index 06ff8d4e5..352b7fab7 100644 --- a/html/bilan.php +++ b/html/bilan.php @@ -18,7 +18,9 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - +/*! \file + * \brief send a Bilan in RTF format + */ include_once("ac_common.php"); include_once("impress_inc.php"); include_once("postgres.php"); diff --git a/html/central.php b/html/central.php index ac0abe026..ff009def9 100644 --- a/html/central.php +++ b/html/central.php @@ -19,6 +19,9 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief concerns the centralisation of the operations + */ include_once ("ac_common.php"); html_page_start($_SESSION['g_theme']); @@ -38,7 +41,7 @@ include_once("preference.php"); include_once ("user_menu.php"); -ShowMenuCompta($_SESSION['g_dossier']); +echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php"); $cn=DbConnect($_SESSION['g_dossier']); if ( $User->CheckAction($cn,CENTRALIZE)==0 ) { @@ -53,7 +56,7 @@ echo ShowMenuAdvanced("central.php"); echo ''; -echo '
    '; +echo '
    '; echo '

    Centralise


    '; if ( isset ($_POST["central"] )) { diff --git a/html/commercial.php b/html/commercial.php index 1960c8b74..9b465acbb 100644 --- a/html/commercial.php +++ b/html/commercial.php @@ -18,6 +18,12 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Base of the module "Gestion", the p_action indicates what + * file must included and this file will manage the request + * (customer, supplier, contact,...) + */ + include_once ("ac_common.php"); require_once("constant.php"); include_once ("postgres.php"); @@ -52,7 +58,8 @@ if ( isset ( $_POST['p_size']) ) { } /// -html_page_start($_SESSION['g_theme']); +html_page_start($_SESSION['g_theme'],"","richtext.js"); + if ( ! isset ( $_SESSION['g_dossier'] ) ) { echo "You must choose a Dossier "; exit -2; @@ -60,25 +67,28 @@ if ( ! isset ( $_SESSION['g_dossier'] ) ) { include("preference.php"); include_once("user_menu.php"); - +echo '
    '; echo "

    Commercial ".$_SESSION['g_name']."

    "; $p_action=(isset ($_REQUEST['p_action']))?$_REQUEST['p_action']:""; // TODO Menu with all the customer echo ShowItem(array( array('?p_action=client','Client'), + array('?p_action=facture','Facture'), array('?p_action=fournisseur','Fournisseur'), + array('?p_action=contact','Contact'), array('?p_action=suivi_courrier','Suivi courrier'), - array('?p_action=mbre','Membre'), array('?p_action=pref','Préférence'), + array('parametre.php?dos='.$_SESSION['g_dossier'],"Paramètre"), + array('user_compta.php?dos='.$_SESSION['g_dossier'],"Comptabilité"), array('login.php','Accueil',"Accueil"), array('logout.php','logout',"Sortie") ), - 'H',"mtitle","mtitle","?p_action=$p_action"); + 'H',"mtitle","mtitle","?p_action=$p_action",' width="100%"'); // - +echo '
    '; $cn=DbConnect($_SESSION['g_dossier']); //////////////////////////////////////////////////////////////////////////////// @@ -100,4 +110,23 @@ if ( $p_action == "client" ) if ( $p_action == 'fournisseur') { require_once("fournisseur.inc.php"); -} \ No newline at end of file +} +//////////////////////////////////////////////////////////////////////////////// +// action +if ( $p_action == 'suivi_courrier') +{ + require_once("action.inc.php"); +} +//////////////////////////////////////////////////////////////////////////////// +// p_action == facture +//////////////////////////////////////////////////////////////////////////////// +if ( $p_action == "facture" ) +{ + require_once("facture.inc.php"); +} +//////////////////////////////////////////////////////////////////////////////// +// Contact +if ( $p_action == 'contact') +{ + require_once("contact.inc.php"); +} diff --git a/html/ecrit_ouv.php b/html/ecrit_ouv.php index fb26aa643..7ac544698 100644 --- a/html/ecrit_ouv.php +++ b/html/ecrit_ouv.php @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Revision$ */ +/*!\file + * \brief for reporting the saldo of account to the next year. + */ + // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr include_once ("ac_common.php"); require_once('class_widget.php'); @@ -35,8 +39,9 @@ $User->Check(); include_once ("check_priv.php"); include_once ("user_menu.php"); -ShowMenuCompta($_SESSION['g_dossier']); - +echo '
    '; +echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php"); +echo '
    '; // TODO : add a check for permission if ( $User->CheckAction($cn,EXP_IMP_ECR) == 0 ) { /* Cannot Access */ @@ -44,8 +49,9 @@ if ( $User->CheckAction($cn,EXP_IMP_ECR) == 0 ) { exit -1; } -echo '
    '; echo ShowMenuAdvanced("ecrit_ouv.php"); +echo ''; html_page_stop(); -?> \ No newline at end of file +?> diff --git a/html/export_ouv.php b/html/export_ouv.php index f1799a985..652dec50f 100644 --- a/html/export_ouv.php +++ b/html/export_ouv.php @@ -18,6 +18,10 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Send the final balance in CSV this balance is used to open an exercice + */ + include_once ("ac_common.php"); require_once("class_poste.php"); header('Content-type: application/csv'); diff --git a/html/facturation.php b/html/facturation.php index e06078be3..02b07120a 100644 --- a/html/facturation.php +++ b/html/facturation.php @@ -18,6 +18,10 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief obsolete + * \todo to remove + */ include ("ac_common.php"); include ("check_priv.php"); include_once ("class_user.php"); diff --git a/html/fiche.php b/html/fiche.php index 974fa9521..44791c3ea 100644 --- a/html/fiche.php +++ b/html/fiche.php @@ -18,7 +18,9 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - +/*! \file + * \brief module to manage the card (removing, listing, creating, modify attribut) + */ include_once ("ac_common.php"); html_page_start($_SESSION['g_theme']); @@ -35,7 +37,9 @@ include_once ("class_user.php"); $User=new cl_user($rep); $User->Check(); include ("check_priv.php"); -ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; +echo ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; echo JS_SEARCH_POSTE; if ( !isset($sessid)) @@ -70,12 +74,12 @@ if ( isset ( $_GET["action"]) ) { $action=$_GET["action"]; // View the details of the selected cat. of cards if ( isset ($_GET["fiche"]) && $action=="vue" ) { - echo '
    '; + echo '
    '; ViewFiche($cn,$_GET["fiche"]); echo '
    '; }// Display the detail of a card if ($action== "detail" ) { - echo '
    '; + echo '
    '; if ( $write == 0) echo '

    Vos changements ne seront pas sauvés

    '; ViewFicheDetail($cn,$_GET["fiche_id"]); echo '
    '; @@ -83,13 +87,13 @@ if ( isset ( $_GET["action"]) ) { // Display the form where you can enter // the property of the card model if ($action == "add_modele" and $write !=0) { - echo '
    '; + echo '
    '; DefModele($cn,$search); echo '
    '; } // Modify a card Model if ($action == "modifier" ) { - echo '
    '; + echo '
    '; if ( $write ==0) echo "

    Pas d'accès

    "; else @@ -98,7 +102,7 @@ if ( isset ( $_GET["action"]) ) { } // delete a card if ($action== "delete" ) { - echo '
    '; + echo '
    '; if ( $write ==0) echo "

    Pas d'accès

    "; else @@ -112,7 +116,7 @@ if ( isset ( $_GET["action"]) ) { } // Add a line in the card model if ( isset ($_GET["add_ligne"]) ) { - echo '
    '; + echo '
    '; if ( $write ==0) echo "

    Pas d'accès

    "; else @@ -125,7 +129,7 @@ if ( isset ($_GET["add_ligne"]) ) { } // Change the name of the card model if ( isset ($_GET["change_name"] ) ) { - echo '
    '; + echo '
    '; if ( $write ==0) echo "

    Pas d'accès

    "; else @@ -138,7 +142,7 @@ if ( isset ($_GET["change_name"] ) ) { // Display a blank card from the selected category if ( isset ($_POST["fiche"]) && isset ($_POST["add"] ) ) { - echo '
    '; + echo '
    '; if ( $write ==0) echo "

    Pas d'accès

    "; else @@ -147,7 +151,7 @@ if ( isset ($_POST["fiche"]) && isset ($_POST["add"] ) ) { } // Add the data (attribute) of the card if ( isset ($_POST["add_fiche"]) ) { - echo '
    '; + echo '
    '; if ( $write ==0) echo "

    Pas d'accès

    "; @@ -160,7 +164,7 @@ if ( isset ($_POST["add_fiche"]) ) { } // Update a card if ( isset ($_POST["update_fiche"]) ) { - echo '
    '; + echo '
    '; if ( $write ==0) echo "

    Pas d'accès

    "; else diff --git a/html/fiche_csv.php b/html/fiche_csv.php index a0fd04f97..ffef32616 100644 --- a/html/fiche_csv.php +++ b/html/fiche_csv.php @@ -18,6 +18,10 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Send a CSV file with card + */ + header('Content-type: application/csv'); header('Content-Disposition: attachment;filename="fiche.csv"',FALSE); include_once ("ac_common.php"); diff --git a/html/fiche_new.php b/html/fiche_new.php index c9375e5c6..fe20a13af 100644 --- a/html/fiche_new.php +++ b/html/fiche_new.php @@ -20,6 +20,9 @@ include_once ("ac_common.php"); include_once ("postgres.php"); include_once ("check_priv.php"); +/*! \file + * \brief Create a new card in a popup window + */ /* $Revision$ */ /* Admin. Dossier */ @@ -45,6 +48,8 @@ if ( $User->CheckAction($cn,FICHE_WRITE)== 0) { } include_once("fiche_inc.php"); + + foreach ($HTTP_GET_VARS as $key=>$element) { // The value are e_name e_type e_PHPSESSID ${"e_$key"}=$element; diff --git a/html/fiche_search.php b/html/fiche_search.php index 662e791b3..cbb92458a 100644 --- a/html/fiche_search.php +++ b/html/fiche_search.php @@ -18,6 +18,10 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief Search a card in a popup window + */ + include_once ("ac_common.php"); include_once ("poste.php"); include_once ("postgres.php"); @@ -41,7 +45,6 @@ if ( isset ( $_POST['search']) ) if ( ! isset ( $_SESSION['g_dossier'] ) ) { echo "You must choose a Dossier "; - phpinfo(); exit -2; } diff --git a/html/form.php b/html/form.php index 1697cabef..bfc8a612f 100644 --- a/html/form.php +++ b/html/form.php @@ -18,7 +18,9 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - +/*! \file + * \brief handle your own report: create or view report + */ include_once ("ac_common.php"); include_once ("user_menu.php"); @@ -38,7 +40,10 @@ $User->Check(); include_once("form_inc.php"); include_once ("user_menu.php"); -ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; +echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php"); +echo '
    '; + include ("check_priv.php"); $cn=DbConnect($_SESSION['g_dossier']); @@ -48,12 +53,12 @@ if ( $User->CheckAction($cn,FORM)==0){ } echo ShowMenuAdvanced("form.php"); if ( isset ($_POST["record"] )) { - echo '
    '; + echo '
    '; AddForm($cn,$HTTP_POST_VARS); echo "
    "; } if ( isset ($_POST["del_form"]) ) { - echo '
    '; + echo '
    '; DeleteForm($cn,$_POST['fr_id']); echo "
    "; } @@ -75,12 +80,12 @@ if ( isset ($_GET["action"]) ) { $action=$_GET["action"]; if ($action == "add" ) { - echo '
    '; + echo '
    '; EncodeForm(1,$sessid); echo "
    "; } if ($action=="view" ) { - echo '
    '; + echo '
    '; if ( ! $_GET["fr_id"] ) { echo_error("fr_id n'est pas donné"); return; @@ -90,20 +95,19 @@ if ( isset ($_GET["action"]) ) { } } // if $_GET if ( isset ($_POST["add_line"]) ) { - echo '
    '; + echo '
    '; $line=$_POST["line"]; EncodeForm($line+1,$sessid,$HTTP_POST_VARS); echo "
    "; } if ( isset ($_POST["update"]) ) { - echo '
    '; + echo '
    '; UpdateForm($cn,$HTTP_POST_VARS); ViewForm($cn,$sessid,$_POST["fr_id"]); echo "
    "; } -//echo '
    '; //echo "
    "; html_page_stop(); diff --git a/html/form_csv.php b/html/form_csv.php index 7f5ad338f..b209ad30e 100644 --- a/html/form_csv.php +++ b/html/form_csv.php @@ -18,6 +18,9 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Send a report in CSV format + */ include_once("ac_common.php"); include_once ("postgres.php"); include ('class_user.php'); diff --git a/html/form_pdf.php b/html/form_pdf.php index 13bb9e784..2b6a3d999 100644 --- a/html/form_pdf.php +++ b/html/form_pdf.php @@ -20,6 +20,9 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ +/*! \file + * \brief Send a report in PDF + */ include_once("class_rapport.php"); include_once("ac_common.php"); diff --git a/html/images/bgcolor.gif b/html/images/bgcolor.gif new file mode 100644 index 0000000000000000000000000000000000000000..55fcf1ba65532afcb65eb8f958258aa2230fb89c GIT binary patch literal 148 zcmZ?wbhEHblw^=#Sj5Kg|33o*Ljw>1sRIWN{09RdTk$6gBLf2)gAS0*08-1q9GS7} z&Od`wo~v_}SPEkUqL0@&8x$-`6uLc=&t+rkEmm>WHCM013K%fGHU22d!jiZwMDovs tQ;l6WyxkmEEKAT1P0?Mxj@3bL_W1^ms@Sm2*WZ1&bX|Y@eGdzRH2_EwIXD0S literal 0 HcmV?d00001 diff --git a/html/images/blackdot.gif b/html/images/blackdot.gif new file mode 100644 index 0000000000000000000000000000000000000000..f79319f818d144f6cb1241bf81f8bb642bc4f4ed GIT binary patch literal 807 wcmZ?wbhEHbWMp7uXlED&qaiS&LqPE-3()`n8FWCQ0Ll{#94risEG!Jx02WLH%>V!Z literal 0 HcmV?d00001 diff --git a/html/images/bold.gif b/html/images/bold.gif new file mode 100644 index 0000000000000000000000000000000000000000..bdb3259c3d686e7d66d33667243a6ac3909b01e5 GIT binary patch literal 81 zcmZ?wbhEHblw^=#XkcUjg8%>jEB<5wG8q|kKzxu41CvHi|H{*E`4`XG62-CUT$r?f g;{%nVhiUT;O!s=aYSV`9ZP$CB|2p@*hLOP<0LaQ7kN^Mx literal 0 HcmV?d00001 diff --git a/html/images/centre.gif b/html/images/centre.gif new file mode 100644 index 0000000000000000000000000000000000000000..f98c86a7848ad61de8e8406446bc98d43c0718f1 GIT binary patch literal 76 zcmZ?wbhEHblw^=#XkcUjg8%>jEB<5wG8q|kKzxu41Cw%3|H{*E`4`XGBGs_@+P3z+ am0})DNuf#VQ`=Tw+4srk`nPBX25SH&PZ_5G literal 0 HcmV?d00001 diff --git a/html/images/copy.gif b/html/images/copy.gif new file mode 100644 index 0000000000000000000000000000000000000000..faebb18c4748bef16377ef00d0e577676c5dce1a GIT binary patch literal 118 zcmZ?wbhEHblw^=#n8?iV|Nnmm5NH506o0ZXGB7YR=zs)3@(fJwbNW}Fe#^gj&X!pX zn`Id*8Y1srXAOe6=537GaN~3d3*XYUCl;$1yKx#G Ro3m!y=HBnzeBIm()&NSnEENC% literal 0 HcmV?d00001 diff --git a/html/images/cut.gif b/html/images/cut.gif new file mode 100644 index 0000000000000000000000000000000000000000..ca60a1aa3a0a1bec0a2a313a0014a4dfa863ac58 GIT binary patch literal 100 zcmZ?wbhEHblw^=#n8?h)z|a812M!$g|Np<@PZmZ724)5wpa=sZ|wm9z3(**RCZIC=HJD;GZheBpQFoF^}@ef@fCR)6K56RTdl*!}a&H*H5BGd3>J$TiAdCm!?S{8?5harw&J>LgY*L7tu-1v#!( zm%IWlOD3eC6u3>o;yVGFSruLW7_U literal 0 HcmV?d00001 diff --git a/html/images/hr.gif b/html/images/hr.gif new file mode 100644 index 0000000000000000000000000000000000000000..c98da9d00c7ab9c298d7d582f4162440dd3991f6 GIT binary patch literal 77 zcmZ?wbhEHblw^=#n8?I1bLLEAW8?q-|1&T!DE?$&WME)o&;ha;K=KSsa#Q+Oo_@=} gc+Qqv-J9=e{NQinbC~w*+8$Vz;NKe0S1Qu4Gj(d|NmzI@}Ud{OrZFag^_`QgFy!* z1u}zyrBL9c=jy!{ug~tD@1jwsP{@(NFu_G}hvS;6hY$FE2nfp>E?{!@F@OAnWmCgL zg&4`g6DsF+etbHqoiWteASRWWc|G$9#&ZnJRkJ;rAB53L1;s<+3^YR3=WEJVjoR!5RP?FhWEC literal 0 HcmV?d00001 diff --git a/html/images/image.gif b/html/images/image.gif new file mode 100644 index 0000000000000000000000000000000000000000..8cbba167cc657142948cae1399abec619c4cf7cc GIT binary patch literal 203 zcmZ?wbhEHblw^=#*v!T7|Ns9v=f0%PWSDbKlwl@=YBIwd3#|ta9vB-N&zw0ED9eBf z6o0ZXGB9v4=zxSlW-zc+1f29-z1QOP+1>038hug%b27S^mTIv$P1-cGa^GQvH^)7b z%^dS0Dt<<7c(}k}#@3$0vY#WkWy+cv95;xH@a^Z$IIb+i)2_S1giT^w+uROaBL%nD svy9pe-W(QVNU<&~Y;F)`VDahc?(^voshC_TH*NZinX_g~3Nly&0Pegob`D7U0#*E2@M7YYXI`)Ab|h? literal 0 HcmV?d00001 diff --git a/html/images/insert_table.gif b/html/images/insert_table.gif new file mode 100644 index 0000000000000000000000000000000000000000..607ff38b4ecb49682b6acf3e59147551e96e77a3 GIT binary patch literal 923 zcmZ?wbhEHblw^=#XlDQe=Kufy5P?y0Gz3OS2q^w!VP;@pV$cEk7nCO$ zI4T%eIb=LGEI8QAA*>a1V#C72?VOArb38UGHFPi5FQOSux#yRUtg#be%BTLYt zkeQ!UJe$?R=jCV?A2{8_!1m(K$;r=sn+!9#LVp$~1WfaYb$fHNBt5XvJzZ_9WZ(&zfO-sj$o4Auakk{Pf7 literal 0 HcmV?d00001 diff --git a/html/images/justifyfull.gif b/html/images/justifyfull.gif new file mode 100644 index 0000000000000000000000000000000000000000..b12528b9f4e0666f3ab5642d80f0f34b2d0c3544 GIT binary patch literal 76 zcmZ?wbhEHblw^=#XkcUjg8%>jEB<5wG8q|kKzxu41Cw%3|H{*E`4`XGBGs_@+O>D{ aOGP=lM1IZ`-nCNb^v+K{*UMrV7_0#`iW%jEB<5wG8q|kKzxu41Cw%3|H{*E`4`XGBGs_@+O>Cg bTMxQ3Jqk%$KD|i$%DzuN*T2OuFjxZsOtTwu literal 0 HcmV?d00001 diff --git a/html/images/list.gif b/html/images/list.gif new file mode 100644 index 0000000000000000000000000000000000000000..b3018d9f2aa504d1fdc1fdf52d56be68675c3162 GIT binary patch literal 88 zcmZ?wbhEHblw^=#n8?Jyz|a81|Ns97l8QfB7#SFt7<7Pa29P`hljfBEm8akGFP^hS ou0i+EffoKI{^e8ETxMmS=)1{z+%0O|nim&7o%{YTkb%J(01IdyB>(^b literal 0 HcmV?d00001 diff --git a/html/images/numbered_list.gif b/html/images/numbered_list.gif new file mode 100644 index 0000000000000000000000000000000000000000..d1a4dbcad69be87aad112c16ec6b70d5d3b9af77 GIT binary patch literal 90 zcmZ?wbhEHblw^=#n8?Hc1`YrJ{|7P@f3h$#FfcLbfCNGE3{2Wn`d6NQ%fEPz!3EJZ njC;OUY0eaz=98v2>v+>jgMFI>_p7{iP3b)MkDtemi@_QIFrXYm literal 0 HcmV?d00001 diff --git a/html/images/outdent.gif b/html/images/outdent.gif new file mode 100644 index 0000000000000000000000000000000000000000..fa3c1b6aad8e4a6209277e391c7bcb733dc4fd96 GIT binary patch literal 96 zcmZ?wbhEHblw^=#n8?Jyz|a81|Ns97l8QfB7#SFt7<7Pa29P`hli`&9m8akGFAhn( wB~f(M=Dt3I$8pPsiV0E0+ZGh|&25o-!aZ$OyLZ)9?prNK7JWRS!N6b*0P?6HaR2}S literal 0 HcmV?d00001 diff --git a/html/images/paste.gif b/html/images/paste.gif new file mode 100644 index 0000000000000000000000000000000000000000..9bcc76ac2072414f8b6c5323250769d322aeff2a GIT binary patch literal 152 zcmZ?wbhEHblw^=#Sj5f%1`YrJ|8D>Rh64u<{Qu7Y(6um%7?gFkTq literal 0 HcmV?d00001 diff --git a/html/images/redo.gif b/html/images/redo.gif new file mode 100644 index 0000000000000000000000000000000000000000..b51d6b842f97aa2fb73ae646ad5cab9ce46a592b GIT binary patch literal 88 zcmZ?wbhEHblw^=#n8?Jyz|a5$|Ns97vJ`)^FfuSOG3Wr<3?O+1Ce11RD^I`WUp!~a ot?td73z|v9`l(m#vFq|1PKq+K8{3}$I`{owFav`%0H?kn+yDRo literal 0 HcmV?d00001 diff --git a/html/images/right_just.gif b/html/images/right_just.gif new file mode 100644 index 0000000000000000000000000000000000000000..a3204d97ef345d161b669a174eb0dcecba188505 GIT binary patch literal 76 zcmZ?wbhEHblw^=#XkcUjg8%>jEB<5wG8q|kKzxu41Cw%3|H{*E`4`XGBG<6_+P3>= aD}_CnlERagPsz)^y6=i>VB_*S4E1|*>PlZBCi zL7G7aBnGmRfpzl(wZ4?hc^RwLz2V%GAH9#iL?cLtd0N`l_MXLz8H^f@3{T4)w7Rtp zC{OTUF)>{=mBH0>E2G+s*-SDD6Hlu$_^jt_dgoKv;iD!x`%qu|X-@_rE(t+V33H*A zHWs#eWd=SWNv9_og=Lkq76{7MERgEatF CI(9Pnc!rwigyOn$yjx74fk)bf%RkiqKja=)MRbPV{ G7_0$nHz;`k literal 0 HcmV?d00001 diff --git a/html/images/underline.gif b/html/images/underline.gif new file mode 100644 index 0000000000000000000000000000000000000000..db8fb4ffd393c57a6e0b9c4d14a280864812b7fc GIT binary patch literal 93 zcmZ?wbhEHblw^=#n8?Hc1Pu)h|Ns97G8BKZFfuSOG3bCqLGlbtdQ9{{vZyKUo+V7?>DzfNTbkJOh)~l>U{c-|{b> rv*lLzXC@gIP8pd;uE{GF_#a>4_q|f`;|9h{^z+epkn~)zX literal 0 HcmV?d00001 diff --git a/html/import.php b/html/import.php index 755607162..467c8183a 100644 --- a/html/import.php +++ b/html/import.php @@ -19,6 +19,9 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // Author Olivier Dzwoniarkiewicz +/*! \file + * \brief for importing Bank operations + */ include_once("ac_common.php"); include_once("user_menu.php"); @@ -43,8 +46,9 @@ html_page_start($User->theme); include_once("import_inc.php"); include_once ("user_menu.php"); -ShowMenuCompta($_SESSION['g_dossier']); - +echo '
    '; +echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php"); +echo '
    '; $cn=DbConnect($_SESSION['g_dossier']); if ( $User->CheckAction($cn,IMP_BQE)==0){ /* Cannot Access */ @@ -52,8 +56,9 @@ if ( $User->CheckAction($cn,IMP_BQE)==0){ } echo ShowMenuAdvanced("import.php"); +echo ''; if ( isset( $_REQUEST['PHPSESSID'])) { $sessid = $_REQUEST['PHPSESSID']; } @@ -66,11 +71,11 @@ if ( isset ($_GET["action"]) ) { if ($action == "import" ) { if(isset($_FILES['fupload'])) { // load the table with the cvs' content - echo '
    '; + echo '
    '; ImportCSV($cn,$_FILES['fupload']['tmp_name'],$_POST['import_bq'],$_POST['format_csv'],$_POST['import_jrn']); echo "
    "; } else { - echo '
    '; + echo '
    '; ShowFormTransfert($cn); echo "
    "; } @@ -79,12 +84,12 @@ if ( isset ($_GET["action"]) ) { if(isset($_POST['poste'])) { UpdateCSV($cn, $_POST['code'], $_POST['poste']); } - echo '
    '; + echo '
    '; VerifImport($cn); echo "
    "; } if ($action == "transfer" ) { - echo '
    '; + echo '
    '; TransferCSV($cn, $User->GetPeriode()); echo "
    "; } diff --git a/html/index.php b/html/index.php index 4983c623a..a7bfd853f 100644 --- a/html/index.php +++ b/html/index.php @@ -1,5 +1,10 @@ echo ' diff --git a/html/jrn_add.php b/html/jrn_add.php index ee90225cf..11c5443ff 100644 --- a/html/jrn_add.php +++ b/html/jrn_add.php @@ -19,6 +19,10 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief To add a ledger + */ + include_once ("ac_common.php"); include_once("jrn.php"); html_page_start($_SESSION['g_theme']); @@ -34,7 +38,11 @@ $User=new cl_user($rep); $User->Check(); include_once("check_priv.php"); include_once ("user_menu.php"); -ShowMenuCompta($_SESSION['g_dossier']); + +echo '
    '; +echo ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; + $cn=DbConnect($_SESSION['g_dossier']); @@ -101,11 +109,14 @@ echo_debug('jrn_add.php',__LINE__,"nom journal $p_jrn_name"); } } echo ShowMenuAdvanced(); +echo ''; + $sessid=$_REQUEST['PHPSESSID']; $search='"; -echo '
    '; +echo '
    '; echo '
    '; echo ''; echo ''; @@ -171,8 +182,8 @@ $num=pg_NumRows($Res); echo ''; -echo ''; -echo ''; +echo ''; +echo ''; echo ''; // Show the fiche in deb section for ($i=0;$i<$num;$i++) { diff --git a/html/jrn_csv.php b/html/jrn_csv.php index 2606df94b..37b8adf50 100644 --- a/html/jrn_csv.php +++ b/html/jrn_csv.php @@ -18,6 +18,10 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Send a ledger in CSV format + */ + header('Content-type: application/csv'); header('Content-Disposition: attachment;filename="jrn.csv"',FALSE); include_once ("ac_common.php"); diff --git a/html/jrn_detail.php b/html/jrn_detail.php index 3f81aa7f8..033f980f1 100644 --- a/html/jrn_detail.php +++ b/html/jrn_detail.php @@ -18,6 +18,10 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief Show and let modify ledger parameter + */ + include_once ("ac_common.php"); html_page_start($_SESSION['g_theme']); if ( ! isset ( $_SESSION['g_dossier'] ) ) { @@ -33,7 +37,11 @@ $User->Check(); //include_once ("top_menu_compta.php"); include_once ("user_menu.php"); -ShowMenuCompta($_SESSION['g_dossier']); + + +echo '
    '; +echo ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; include_once("check_priv.php"); @@ -104,8 +112,9 @@ If ( isset ($_POST["JRN_UPD"] )) { } } echo ShowMenuAdvanced(); +echo ''; $Res=ExecSql($cn,"select jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,". "jrn_deb_max_line,jrn_cred_max_line,jrn_def_code". @@ -115,8 +124,8 @@ $Res=ExecSql($cn,"select jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,". $l_line=pg_fetch_array($Res,0); $sessid = $_REQUEST['PHPSESSID']; $search='"; -echo '
    '; -echo '

    Fiches

    '; +echo '
    '; +echo '

    '.$l_line['jrn_def_name'].'

    '; echo ''; echo ''; echo '
    Fiches Crédit Fiches Débit Fiches Dédit Fiches Crébit
    '; diff --git a/html/jrn_op_detail.php b/html/jrn_op_detail.php index e9ac738c7..61b0a2bbd 100644 --- a/html/jrn_op_detail.php +++ b/html/jrn_op_detail.php @@ -18,13 +18,16 @@ */ // 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 "; - // phpinfo(); exit -2; } include_once ("postgres.php"); diff --git a/html/jrn_pdf.php b/html/jrn_pdf.php index 5ebda27eb..1e2428829 100644 --- a/html/jrn_pdf.php +++ b/html/jrn_pdf.php @@ -21,6 +21,9 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ +/*! \file + * \brief Send a ledger in a pdf format + */ if ( ! isset($_SESSION['g_dossier']) ) { echo "INVALID G_DOSSIER UNKNOWN !!! "; diff --git a/html/jrn_search.php b/html/jrn_search.php index cfa6eff16..39cc0525d 100644 --- a/html/jrn_search.php +++ b/html/jrn_search.php @@ -18,6 +18,10 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief Search a operation from a ledger into a popup window, used for the "rapprochement" + */ + require_once ("ac_common.php"); require_once ("postgres.php"); require_once("user_common.php"); diff --git a/html/jrn_update.php b/html/jrn_update.php index 9e6410da2..f0719ea82 100644 --- a/html/jrn_update.php +++ b/html/jrn_update.php @@ -18,6 +18,9 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief create, modify parameter ledger + */ include_once ("ac_common.php"); html_page_start($_SESSION['g_theme']); if ( ! isset ( $_SESSION['g_dossier'] ) ) { @@ -34,7 +37,12 @@ $User->Check(); include_once ("check_priv.php"); include_once ("user_menu.php"); -ShowMenuCompta($_SESSION['g_dossier']); + +echo '
    '; +echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php"); +echo '
    '; + + $cn=DbConnect($_SESSION['g_dossier']); if ( $User->CheckAction($cn,GJRN) == 0 ) { /* Cannot Access */ @@ -44,6 +52,8 @@ if ( $User->CheckAction($cn,GJRN) == 0 ) { echo '
    '; echo ShowMenuAdvanced("jrn_update.php"); +echo '
    '; +echo ''; html_page_stop(); diff --git a/html/line_update.php b/html/line_update.php index 3eb82db5d..c959b626c 100644 --- a/html/line_update.php +++ b/html/line_update.php @@ -18,6 +18,9 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ +/*! \file + * \brief Modify the "Plan Comptable" + */ include_once ("ac_common.php"); if ( !isset ($_SESSION['g_dossier'])) { diff --git a/html/listing_client.php b/html/listing_client.php index b8ee629d3..c055d35f4 100644 --- a/html/listing_client.php +++ b/html/listing_client.php @@ -20,6 +20,9 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr require_once("ac_common.php"); require_once("postgres.php"); +/*! \file + * \brief Electronic declaration for VAT BELGIUM --> experimental + */ ////////////////////////////////////////////////////////////////////// // Check User include ('class_user.php'); diff --git a/html/login.php b/html/login.php index d7acb3437..408cb8cd8 100644 --- a/html/login.php +++ b/html/login.php @@ -18,7 +18,9 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr include_once ("ac_common.php"); - +/*! \file + * \brief Login page + */ /* $Revision$ */ include_once ("postgres.php"); diff --git a/html/logout.php b/html/logout.php index f15d526ba..23c4d80f5 100644 --- a/html/logout.php +++ b/html/logout.php @@ -17,6 +17,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Logout + */ include ("ac_common.php"); include ("postgres.php"); diff --git a/html/modify_op.php b/html/modify_op.php index cb76d91b7..9f7f68684 100644 --- a/html/modify_op.php +++ b/html/modify_op.php @@ -18,6 +18,9 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision*/ +/*! \file + * \brief Update a operation in a popup window : add a document + */ include_once ("ac_common.php"); include_once ("poste.php"); include_once("preference.php"); diff --git a/html/parametre.php b/html/parametre.php index 8a1e4eb09..591474d9a 100644 --- a/html/parametre.php +++ b/html/parametre.php @@ -19,6 +19,10 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief Parametre module + */ + include_once ("ac_common.php"); html_page_start($_SESSION['g_theme']); include_once ("postgres.php"); @@ -96,7 +100,7 @@ if ( $p_action == "fiche" ) require_once('fiche_def.inc.php'); return; } -echo '
    '; +echo '
    '; //////////////////////////////////////////////////////////////////////////////// // Currency //////////////////////////////////////////////////////////////////////////////// @@ -177,35 +181,13 @@ if ( $p_action=='company') { /////////////////////////////////////////////////////////////////// // Document ////////////////////////////////////////////////////////////////// - -if ( $p_action == 'document' ) { - require_once("class_invoice.php"); - echo ShowMenuInvoice(); - $inv=new Invoice($cn); - $inv->myList(); - $inv->FormAdd(); - -} - -/////////////////////////////////////////////////////////////////// -// Invoice add a template -////////////////////////////////////////////////////////////////// -if ( $p_action=='add_invoice') { - require_once("class_invoice.php"); - $inv=new Invoice($cn); - //$inv->List(); -} -/////////////////////////////////////////////////////////////////// -// Invoice remove a template -////////////////////////////////////////////////////////////////// -if ( $p_action=='rm_template') { -require_once("class_invoice.php"); - $inv=new Invoice($cn); - $inv->Delete(); -} - - - echo "
    "; +if ( $p_action == 'document' ) { + echo '
    '; + require_once('document_modele.inc.php'); + echo '
    '; +} + + html_page_stop(); ?> diff --git a/html/pcmn_update.php b/html/pcmn_update.php index 36e6abfe6..113ca707f 100644 --- a/html/pcmn_update.php +++ b/html/pcmn_update.php @@ -18,13 +18,15 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief concerns the management of the "Plan Comptable" + */ include_once ("ac_common.php"); html_page_start($_SESSION['g_theme']); require_once("constant.php"); if ( ! isset ( $_SESSION['g_dossier'] ) ) { echo "You must choose a Dossier "; - phpinfo(); exit -2; } include_once ("postgres.php"); @@ -38,7 +40,7 @@ $User->Check(); include_once ("user_menu.php"); include_once ("check_priv.php"); -ShowMenuCompta($_SESSION['g_dossier']); +echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php"); $cn=DbConnect($_SESSION['g_dossier']); if ( $User->CheckAction($cn,MPCMN) == 0 ) { @@ -60,6 +62,8 @@ if ( isset ($_GET['p_start'])) { echo '
    '; echo ShowMenuAdvanced("pcmn_update.php?p_start=1"); +echo '
    '; +echo ''; echo '
    '; diff --git a/html/poste_csv.php b/html/poste_csv.php index b66103f79..44033c81d 100644 --- a/html/poste_csv.php +++ b/html/poste_csv.php @@ -18,6 +18,9 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Send the poste list in csv + */ include_once("ac_common.php"); include_once ("postgres.php"); include ('class_user.php'); diff --git a/html/poste_pdf.php b/html/poste_pdf.php index 91a4f44d1..ecee5a9f2 100644 --- a/html/poste_pdf.php +++ b/html/poste_pdf.php @@ -20,7 +20,9 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ - +/*! \file + * \brief send the account list in PDF + */ include_once("class_poste.php"); include_once("ac_common.php"); include_once("postgres.php"); diff --git a/html/poste_search.php b/html/poste_search.php index e24d769b1..c4de26700 100644 --- a/html/poste_search.php +++ b/html/poste_search.php @@ -18,7 +18,9 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ - +/*! \file + * \brief Search a account in a popup window + */ include_once ("ac_common.php"); html_page_start($_SESSION['g_theme'],"onLoad='window.focus();'"); include_once ("postgres.php"); diff --git a/html/print_balance.php b/html/print_balance.php index 973169a23..d0a4245e0 100644 --- a/html/print_balance.php +++ b/html/print_balance.php @@ -17,16 +17,18 @@ * along with PhpCompta; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* received parameters - e_date element 01.01.2003 - e_client element 3 - nb_item element 2 - e_march0 element 11 - e_quant0 element 1 - e_march1 element 6 - e_quant1 element 2 - e_comment invoice number -*/ +/*! \file + * \brief Print the balance in pdf format + * \param received parameters + * \param e_date element 01.01.2003 + * \param e_client element 3 + * \param nb_item element 2 + * \param e_march0 element 11 + * \param e_quant0 element 1 + * \param e_march1 element 6 + * \param e_quant1 element 2 + * \param e_comment invoice number + */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ diff --git a/html/print_invoice.php b/html/print_invoice.php index b3a01b7cb..4ef9fd1fc 100644 --- a/html/print_invoice.php +++ b/html/print_invoice.php @@ -17,15 +17,19 @@ * along with PhpCompta; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* received parameters - e_date element 01.01.2003 - e_client element 3 - nb_item element 2 - e_march0 element 11 - e_quant0 element 1 - e_march1 element 6 - e_quant1 element 2 - e_comment invoice number +/*! \file + * \brief Print invoice + * \todo Obsolete ? + + * \param received parameters + * \param e_date element 01.01.2003 + * \param e_client element 3 + * \param nb_item element 2 + * \param e_march0 element 11 + * \param e_quant0 element 1 + * \param e_march1 element 6 + * \param e_quant1 element 2 + * \param e_comment invoice number */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ diff --git a/html/priv_user.php b/html/priv_user.php index 578fb0fa2..e7a41c0a9 100644 --- a/html/priv_user.php +++ b/html/priv_user.php @@ -17,6 +17,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Users Security + */ include_once("ac_common.php"); include_once("postgres.php"); include_once("debug.php"); diff --git a/html/recherche.php b/html/recherche.php index 1cd3e6ced..35010787c 100644 --- a/html/recherche.php +++ b/html/recherche.php @@ -24,7 +24,9 @@ include_once ("constant.php"); include_once("jrn.php"); include_once("user_common.php"); include_once("class_widget.php"); - +/*! \file + * \brief Search module + */ html_page_start($_SESSION['g_theme']); if ( ! isset ( $_SESSION['g_dossier'] ) ) { @@ -39,16 +41,17 @@ $cn=DbConnect($_SESSION['g_dossier']); include ('class_user.php'); $User=new cl_user($cn); $User->Check(); - -ShowMenuCompta($_SESSION['g_dossier']); - +echo '
    '; +echo ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; // PhpSessid $sessid=$_REQUEST['PHPSESSID']; // display a search box $search_box=u_ShowMenuRecherche($cn,0,$sessid,$_GET); -echo '
    '; // class="recherche_form">'; +echo '
    '; // class="recherche_form">'; echo $search_box; +echo "
    "; //////////////////////////////////////////////////////////////////////////////// // Display search result //////////////////////////////////////////////////////////////////////////////// @@ -62,10 +65,10 @@ if ( isset ($_GET['viewsearch'])) { else $array=$_GET; - list($max_line,$a)=ListJrn($cn,0,"",$array,$offset); + list($max_line,$a)=ListJrn($cn,0,"",$array,$offset,2); $bar=jrn_navigation_bar($offset,$max_line,$step,$page); - echo '
    '; + echo '
    '; echo $bar; echo $a; echo $bar; diff --git a/html/richtext.js b/html/richtext.js new file mode 100644 index 000000000..a2d9d6316 --- /dev/null +++ b/html/richtext.js @@ -0,0 +1,608 @@ +// Cross-Browser Rich Text Editor +// http://www.kevinroth.com/rte/demo.htm +// Written by Kevin Roth (kevin@NOSPAMkevinroth.com - remove NOSPAM) +// Visit the support forums at http://www.kevinroth.com/forums/index.php?c=2 + +//init variables +var isRichText = false; +var rng; +var currentRTE; +var allRTEs = ""; + +var isIE; +var isGecko; +var isSafari; +var isKonqueror; + +var imagesPath; +var includesPath; +var cssFile; + + +function initRTE(imgPath, incPath, css) { + //set browser vars + var ua = navigator.userAgent.toLowerCase(); + isIE = ((ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1)); + isGecko = (ua.indexOf("gecko") != -1); + isSafari = (ua.indexOf("safari") != -1); + isKonqueror = (ua.indexOf("konqueror") != -1); + + //check to see if designMode mode is available + if (document.getElementById && document.designMode && !isSafari && !isKonqueror) { + isRichText = true; + } + + if (isIE) { + document.onmouseover = raiseButton; + document.onmouseout = normalButton; + document.onmousedown = lowerButton; + document.onmouseup = raiseButton; + } + + //set paths vars + imagesPath = imgPath; + includesPath = incPath; + cssFile = css; + + if (isRichText) document.writeln(''); + + //for testing standard textarea, uncomment the following line + //isRichText = false; +} + +function writeRichText(rte, html, width, height, buttons, readOnly) { + if (isRichText) { + if (allRTEs.length > 0) allRTEs += ";"; + allRTEs += rte; + + if (readOnly) buttons = false; + + //adjust minimum table widths + if (isIE) { + if (buttons && (width < 540)) width = 540; + var tablewidth = width; + } else { + if (buttons && (width < 540)) width = 540; + var tablewidth = width + 4; + } + + document.writeln('
    '); + if (buttons == true) { + document.writeln('
    '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln('
    '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln('
    '); + document.writeln(''); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + if (isIE) { + document.writeln(' '); + } + // document.writeln(' '); + // document.writeln(' '); + // document.writeln(' '); + // document.writeln(' '); + // document.writeln(' '); + // document.writeln(' '); + // document.writeln(' '); + document.writeln(' '); + document.writeln(' '); + document.writeln('
    BoldItalicUnderlineAlign LeftCenterAlign RightJustify FullHorizontal RuleOrdered ListUnordered ListOutdentIndent
    Text Color
    Background Color
    Insert LinkAdd Image
    Insert Table
    Spell CheckCutCopyPasteUndoRedo
    '); + } + document.writeln(''); + if (!readOnly) document.writeln('
     View Source'); + document.writeln(''); + document.writeln(''); + document.writeln('
    '); + + document.getElementById('hdn' + rte).value = html; + enableDesignMode(rte, html, readOnly); + } else { + if (!readOnly) { + document.writeln(''); + } else { + document.writeln(''); + } + } +} + +function enableDesignMode(rte, html, readOnly) { + var frameHtml = "\n"; + frameHtml += "\n"; + //to reference your stylesheet, set href property below to your stylesheet path and uncomment + if (cssFile.length > 0) { + frameHtml += "\n"; + } else { + frameHtml += "\n"; + } + frameHtml += "\n"; + frameHtml += "\n"; + frameHtml += html + "\n"; + frameHtml += "\n"; + frameHtml += ""; + + if (document.all) { + var oRTE = frames[rte].document; + oRTE.open(); + oRTE.write(frameHtml); + oRTE.close(); + if (!readOnly) oRTE.designMode = "On"; + } else { + try { + if (!readOnly) document.getElementById(rte).contentDocument.designMode = "on"; + try { + var oRTE = document.getElementById(rte).contentWindow.document; + oRTE.open(); + oRTE.write(frameHtml); + oRTE.close(); + if (isGecko && !readOnly) { + //attach a keyboard handler for gecko browsers to make keyboard shortcuts work + oRTE.addEventListener("keypress", kb_handler, true); + } + } catch (e) { + alert("Error preloading content."); + } + } catch (e) { + //gecko may take some time to enable design mode. + //Keep looping until able to set. + if (isGecko) { + setTimeout("enableDesignMode('" + rte + "', '" + html + "', " + readOnly + ");", 10); + } else { + return false; + } + } + } +} + +function updateRTEs() { + var vRTEs = allRTEs.split(";"); + for (var i = 0; i < vRTEs.length; i++) { + updateRTE(vRTEs[i]); + } +} + +function updateRTE(rte) { + if (!isRichText) return; + + //set message value + var oHdnMessage = document.getElementById('hdn' + rte); + var oRTE = document.getElementById(rte); + var readOnly = false; + + //check for readOnly mode + if (document.all) { + if (frames[rte].document.designMode != "On") readOnly = true; + } else { + if (document.getElementById(rte).contentDocument.designMode != "on") readOnly = true; + } + + if (isRichText && !readOnly) { + //if viewing source, switch back to design view + if (document.getElementById("chkSrc" + rte).checked) { + document.getElementById("chkSrc" + rte).checked = false; + toggleHTMLSrc(rte); + } + + if (oHdnMessage.value == null) oHdnMessage.value = ""; + if (document.all) { + oHdnMessage.value = frames[rte].document.body.innerHTML; + } else { + oHdnMessage.value = oRTE.contentWindow.document.body.innerHTML; + } + + //if there is no content (other than formatting) set value to nothing + if (stripHTML(oHdnMessage.value.replace(" ", " ")) == "" + && oHdnMessage.value.toLowerCase().search(" 0) { + mOffsetTop += mOffsetParent.offsetTop; + mOffsetParent = mOffsetParent.offsetParent; + parents_up--; + } + + return mOffsetTop; +} + +// Ernst de Moor: Fix the amount of digging parents up, in case the RTE editor itself is displayed in a div. +// KJR 11/12/2004 Changed to position palette based on parent div, so palette will always appear in proper location regardless of nested divs +function getOffsetLeft(elm) { + var mOffsetLeft = elm.offsetLeft; + var mOffsetParent = elm.offsetParent; + var parents_up = 2; + + while(parents_up > 0) { + mOffsetLeft += mOffsetParent.offsetLeft; + mOffsetParent = mOffsetParent.offsetParent; + parents_up--; + } + + return mOffsetLeft; +} + +function selectFont(rte, selectname) { + //function to handle font changes + var idx = document.getElementById(selectname).selectedIndex; + // First one is always a label + if (idx != 0) { + var selected = document.getElementById(selectname).options[idx].value; + var cmd = selectname.replace('_' + rte, ''); + rteCommand(rte, cmd, selected); + document.getElementById(selectname).selectedIndex = 0; + } +} + +function kb_handler(evt) { + var rte = evt.target.id; + + //contributed by Anti Veeranna (thanks Anti!) + if (evt.ctrlKey) { + var key = String.fromCharCode(evt.charCode).toLowerCase(); + var cmd = ''; + switch (key) { + case 'b': cmd = "bold"; break; + case 'i': cmd = "italic"; break; + case 'u': cmd = "underline"; break; + }; + + if (cmd) { + rteCommand(rte, cmd, null); + + // stop the event bubble + evt.preventDefault(); + evt.stopPropagation(); + } + } +} + +function insertHTML(html) { + //function to add HTML -- thanks dannyuk1982 + var rte = currentRTE; + + var oRTE; + if (document.all) { + oRTE = frames[rte]; + } else { + oRTE = document.getElementById(rte).contentWindow; + } + + oRTE.focus(); + if (document.all) { + oRTE.document.selection.createRange().pasteHTML(html); + } else { + oRTE.document.execCommand('insertHTML', false, html); + } +} + +function showHideElement(element, showHide) { + //function to show or hide elements + //element variable can be string or object + if (document.getElementById(element)) { + element = document.getElementById(element); + } + + if (showHide == "show") { + element.style.visibility = "visible"; + } else if (showHide == "hide") { + element.style.visibility = "hidden"; + } +} + +function setRange(rte) { + //function to store range of current selection + var oRTE; + if (document.all) { + oRTE = frames[rte]; + var selection = oRTE.document.selection; + if (selection != null) rng = selection.createRange(); + } else { + oRTE = document.getElementById(rte).contentWindow; + var selection = oRTE.getSelection(); + rng = selection.getRangeAt(selection.rangeCount - 1).cloneRange(); + } +} + +function stripHTML(oldString) { + //function to strip all html + var newString = oldString.replace(/(<([^>]+)>)/ig,""); + + //replace carriage returns and line feeds + newString = newString.replace(/\r\n/g," "); + newString = newString.replace(/\n/g," "); + newString = newString.replace(/\r/g," "); + + //trim string + newString = trim(newString); + + return newString; +} + +function trim(inputString) { + // Removes leading and trailing spaces from the passed string. Also removes + // consecutive spaces and replaces it with one space. If something besides + // a string is passed in (null, custom object, etc.) then return the input. + if (typeof inputString != "string") return inputString; + var retValue = inputString; + var ch = retValue.substring(0, 1); + + while (ch == " ") { // Check for spaces at the beginning of the string + retValue = retValue.substring(1, retValue.length); + ch = retValue.substring(0, 1); + } + ch = retValue.substring(retValue.length - 1, retValue.length); + + while (ch == " ") { // Check for spaces at the end of the string + retValue = retValue.substring(0, retValue.length - 1); + ch = retValue.substring(retValue.length - 1, retValue.length); + } + + // Note that there are two spaces in the string - look for multiple spaces within the string + while (retValue.indexOf(" ") != -1) { + // Again, there are two spaces in each of the strings + retValue = retValue.substring(0, retValue.indexOf(" ")) + retValue.substring(retValue.indexOf(" ") + 1, retValue.length); + } + return retValue; // Return the trimmed string back to the user +} + +//***************** +//IE-Only Functions +//***************** +function checkspell() { + //function to perform spell check + try { + var tmpis = new ActiveXObject("ieSpell.ieSpellExtension"); + tmpis.CheckAllLinkedDocuments(document); + } + catch(exception) { + if(exception.number==-2146827859) { + if (confirm("ieSpell not detected. Click Ok to go to download page.")) + window.open("http://www.iespell.com/download.php","DownLoad"); + } else { + alert("Error Loading ieSpell: Exception " + exception.number); + } + } +} + +function raiseButton(e) { + //IE-Only Function + var el = window.event.srcElement; + + className = el.className; + if (className == 'rteImage' || className == 'rteImageLowered') { + el.className = 'rteImageRaised'; + } +} + +function normalButton(e) { + //IE-Only Function + var el = window.event.srcElement; + + className = el.className; + if (className == 'rteImageRaised' || className == 'rteImageLowered') { + el.className = 'rteImage'; + } +} + +function lowerButton(e) { + //IE-Only Function + var el = window.event.srcElement; + + className = el.className; + if (className == 'rteImage' || className == 'rteImageRaised') { + el.className = 'rteImageLowered'; + } +} diff --git a/html/sec_pdf.php b/html/sec_pdf.php index 1aea2e6a2..9278bff98 100755 --- a/html/sec_pdf.php +++ b/html/sec_pdf.php @@ -20,7 +20,9 @@ // Copyright Stanislas Pinte stanpinte@sauvages.be // $Revision$ - +/*! \file + * \brief Print the user security in pdf + */ if ( ! isset($_SESSION['g_dossier']) ) { echo "INVALID G_DOSSIER UNKNOWN !!! "; diff --git a/html/send_jrn_pdf.php b/html/send_jrn_pdf.php index bba8c9652..e862006d6 100644 --- a/html/send_jrn_pdf.php +++ b/html/send_jrn_pdf.php @@ -18,6 +18,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/*! \file + * \brief Print the ledger in pdf + */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ diff --git a/html/send_poste_pdf.php b/html/send_poste_pdf.php index b2a831e27..833fb0397 100644 --- a/html/send_poste_pdf.php +++ b/html/send_poste_pdf.php @@ -17,6 +17,9 @@ * along with PhpCompta; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/*! \file + * \brief Print the account in pdf + */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ diff --git a/html/show_document.php b/html/show_document.php index a005313e6..2d7fc87e6 100644 --- a/html/show_document.php +++ b/html/show_document.php @@ -19,59 +19,22 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // Verify parameters -include_once ("ac_common.php"); -if ( !isset ($_GET['jrn'] ) || - !isset($_GET['jr_grpt_id'])) { - echo_error("Missing parameters"); -} +/*! \file + * \brief retrieve a document + */ include_once ("postgres.php"); - - -$jr_grpt_id=$_GET['jr_grpt_id']; +require_once("ac_common.php"); +require_once( "class_document.php"); $cn=DbConnect($_SESSION['g_dossier']); include ('class_user.php'); $User=new cl_user(DbConnect()); +/*!\todo Add security here + */ $User->Check(); -// retrieve the jrn -$r=ExecSql($cn,"select jr_def_id from jrn where jr_grpt_id=$jr_grpt_id"); -if ( pg_num_rows($r) == 0 ) { - echo_error("Invalid operation id jr_grpt_id=$jr_grpt_id"); - exit; - } -$a=pg_fetch_array($r,0); -$jrn=$a['jr_def_id']; - -if ($User->AccessJrn($cn,$jrn) == false ){ - /* Cannot Access */ - NoAccess(); - exit -1; - } - -StartSql($cn); -$ret=ExecSql($cn,"select jr_pj,jr_pj_name,jr_pj_type from jrn where jr_grpt_id=$jr_grpt_id"); -if ( pg_num_rows ($ret) == 0 ) - return; -$row=pg_fetch_array($ret,0); -$tmp=tempnam('/tmp/','document_'); -pg_lo_export($cn,$row['jr_pj'],$tmp); -ini_set('zlib.output_compression','Off'); -header("Pragma: public"); -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); -header("Cache-Control: must-revalidate"); -header('Content-type: '.$row['jr_pj_type']); -header('Content-Disposition: attachment;filename="'.$row['jr_pj_name'].'"',FALSE); -header("Accept-Ranges: bytes"); -$file=fopen($tmp,'r'); -while ( !feof ($file) ) - echo fread($file,8192); - -fclose($file); - -unlink ($tmp); - -Commit($cn); +// retrieve the document +$doc=new Document($cn,$_REQUEST['d_id']); +$doc->Get(); diff --git a/html/show_document_modele.php b/html/show_document_modele.php new file mode 100644 index 000000000..50d983db1 --- /dev/null +++ b/html/show_document_modele.php @@ -0,0 +1,68 @@ +Check(); +// retrieve the document +$r=ExecSql($cn,"select md_id,md_lob,md_filename,md_mimetype + from document_modele where md_id=".$_REQUEST['md_id']); +if ( pg_num_rows($r) == 0 ) { + echo_error("Invalid Document"); + exit; + } +$row=pg_fetch_array($r,0); + + +StartSql($cn); + +$tmp=tempnam('/tmp/','document_'); +pg_lo_export($cn,$row['md_lob'],$tmp); +ini_set('zlib.output_compression','Off'); +header("Pragma: public"); +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); +header("Cache-Control: must-revalidate"); +header('Content-type: '.$row['md_mimetype']); +header('Content-Disposition: attachment;filename="'.$row['md_filename'].'"',FALSE); +header("Accept-Ranges: bytes"); +$file=fopen($tmp,'r'); +while ( !feof ($file) ) + echo fread($file,8192); + +fclose($file); + +unlink ($tmp); + +Commit($cn); diff --git a/html/show_tva.php b/html/show_tva.php index 22b816e10..f8d817c6b 100644 --- a/html/show_tva.php +++ b/html/show_tva.php @@ -18,6 +18,9 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief Popup window to let the user choose the vat + */ include_once ("ac_common.php"); include_once ("postgres.php"); diff --git a/html/stock.php b/html/stock.php index 80bc6fe85..0f14a76c2 100644 --- a/html/stock.php +++ b/html/stock.php @@ -19,6 +19,10 @@ */ // Auteur Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*!\file + * \brief Manage the stock by year + */ + include_once("preference.php"); include_once ("ac_common.php"); include_once("postgres.php"); @@ -57,7 +61,7 @@ if ( $User->admin == 0 ) { //Show the top menu include_once ("user_menu.php"); -ShowMenuCompta($_SESSION['g_dossier']); +echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php"); // Show Menu Left $left_menu=ShowMenuAdvanced("stock.php"); diff --git a/html/style-light.css b/html/style-light.css index abf727b9b..a7538df11 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -5,14 +5,14 @@ BODY { font-size:10px; font-family:sans-serif; } + table.result { font-size:10px; color:blue; border:blue solid 1px; - } -div.result { + width:80%; - } + } table.result th { font-size:11px; font-weight:bold; @@ -39,6 +39,8 @@ h2.info { color:white; font-size:16pt; text-align:center; + padding:0px; + margin:0px; } h3.info { background:#879ed4; @@ -51,6 +53,7 @@ h2.info2 { color:blue; font-size:20px; text-align:center; + } @@ -68,51 +71,45 @@ div.mtitle { position: absolute; right:300px; width:100px; - +background-color:yellow; } -div.tmenu { - position: absolute; - top:60px; - left:120px; - width:800px; - text-align:center; -} div.u_tmenu { - - position: absolute; - top:40px; - left:150px; - width:600px; + position: float; + margin-top:1px; + width:100%; + background-color:green; } +div.u_subtmenu { + left:10px; + background-color:pink; +} +div.u_subt2menu { + left:1%; + background-color:orange; +} div.lmenu { - position: absolute; - top:100px; - left:0px; - width:100px; - font-size:10px; + position: float; + float:left; + left:20px; + width:15em; + font-size:9px; + background-color:grey; } div.lextmenu { - position: absolute; - top:50px; - font-size:11pt; - left:30px; - width:200px; + position: float; + float:left; + font-family:sans-serif; + font-size:9px; + background-color:blue; } div.searchmenu { left:30px; width:95px; top:100px; position:absolute; -} -div.credit{ - border-style:solid; - border-width:1pt; -} -div.debit{ - border-style:solid; - border-width:1pt; +background-color:green; } div.recherche_form{ @@ -122,36 +119,46 @@ div.recherche_form{ border-style:outset; border-width:1px; -} -div.redcontent{ - position: absolute; - top:100px; - left:220px; - width:500px; - font-size:9px; - font-family:sans-serif; - } div.u_redcontent{ - position: absolute; - top:137px; - left:150px; - width:700px; + position: float; + float:left; + width:80%; + padding-top:7px; + padding-left:8px; font-size:9px; font-family:sans-serif; + background-color:lightgreen; } -div.ccontent{ - position: absolute; - top:110px; - left:130px; - width:670px; - font-size:9pt; +div.u_content{ + position: float; + float:left; + width:100%; + font-size:9px; + font-family:sans-serif; + background-color:lightgreen; } -div.rmenu { - position: absolute; - top:110px; - right:30px; - width:100px; +div.no span{ + position:static; + font-size:9px; + font-family:sans-serif; + font-weight:bold; + font-color:red; + +} + +div.u_content span { + position :float; + float:left; + margin-left:40px; +} +div.u_content table { + width:100%; + border:solid blue 2px ; + border-style:outset; +} +div.u_content table th { + background-color:lightgrey; } table.mtitle { @@ -160,25 +167,12 @@ table.mtitle { } td.mshort { height:15px; + width:60px; text-align:center; border: 1px solid; color:#5D90CD ; background-color:#DDE6FF; } -td.mlltitle { - text-align:center; - height:30px; - width:30px; - font-size:10px; -} -td.mltitle { - text-align:center; - height:30px; - width:60px; - font-size:10px; - border: 1px solid; - background-color:#DDE6FF; -} td.mtitle { text-align:center; width:95px; @@ -188,11 +182,7 @@ td.mtitle { // padding:3px; background-color:#DDE6FF; } -span.mtitle2 { - background-color:red; - font-size:10px; - border-style:groove -} + span.mtitle { color:gray; background-color:blue; @@ -229,17 +219,17 @@ td.cell{ // border:1px solid blue; height:32px; padding: 1px; - width:70px; + width:120px; } td.selectedcell{ border-style:inset; border-color:blue; border-width:1pt ; - width:75px; font-size:10px; background:#5D90CD ; color:white; text-align:center; + width:120px; } a.mtitle { @@ -274,19 +264,6 @@ a.cell:hover { display:block; } -a.mtitle2 { - height:30px; - text-decoration:none; - color:white; -} - -a.mtitle2:hover { - height:30px; - - color:green; - background-color:#5D90CD; - text-decoration:none; - } a.one:link { text-decoration:none; @@ -307,40 +284,7 @@ a.one:hover { color:#FFFFFF; } -a.two:link { - text-decoration:none; - background:#3010FF; - color:yellow; - padding: 0.1em 0.5em; -} -a.two:visited { - text-decoration:none; - background:#3010FF; - color:yellow; - padding: 0.1em 0.5em; - } -a.two:active { - background:#3010FF; - color:yellow; - padding: 0.1em 0.5em; - } -a.two:hover { - background:#3010FF; - color:#FFFFFF; - padding: 0.1em 0.5em; - } - -th.doc { - background: #0000C5; - color: #FFFFFF -} - - -table.doc { - width: 60% ; - text-align: center; -} a.detail { font-size:9px; diff --git a/html/user_advanced.php b/html/user_advanced.php index 55679f2ae..ac372b981 100644 --- a/html/user_advanced.php +++ b/html/user_advanced.php @@ -19,6 +19,10 @@ // Auteur Dany De Bontridder ddebontridder@yahoo.fr include_once ("ac_common.php"); /* $Revision$ */ +/*! \file + * \brief Obsolete + * \todo Obsolete ? + */ html_page_start($_SESSION['g_theme']); if ( ! isset ( $_SESSION['g_dossier'] ) ) { @@ -48,8 +52,10 @@ $User->Check(); // Show the top menus include_once ("user_menu.php"); +echo '
    '; -ShowMenuCompta($_SESSION['g_dossier']); +echo ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; echo ShowMenuAdvanced(); diff --git a/html/user_compta.php b/html/user_compta.php index 575a05a01..68de7bbb5 100644 --- a/html/user_compta.php +++ b/html/user_compta.php @@ -21,6 +21,9 @@ include_once ("ac_common.php"); /* $Revision$ */ include_once ("class_user.php"); include_once ("postgres.php"); +/*! \file + * \brief main page of the accountancy module + */ $rep=DbConnect(); @@ -59,9 +62,10 @@ if ( $User->admin == 0 ) { include_once ("user_menu.php"); +echo '
    '; -ShowMenuCompta($g_dossier); - +echo ShowMenuCompta($g_dossier); +echo '
    '; html_page_stop(); ?> diff --git a/html/user_impress.php b/html/user_impress.php index dd6ea34e4..68c517376 100644 --- a/html/user_impress.php +++ b/html/user_impress.php @@ -18,6 +18,10 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief Main page for the printing + */ + include_once ("ac_common.php"); html_page_start($_SESSION['g_theme']); if ( ! isset ( $_SESSION['g_dossier'] ) ) { @@ -35,8 +39,10 @@ $User->Check(); include ("check_priv.php"); include_once ("user_menu.php"); -ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; +echo ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; // show sub menu echo "
    "; diff --git a/html/user_jrn.php b/html/user_jrn.php index 848d65208..b9aa6b325 100644 --- a/html/user_jrn.php +++ b/html/user_jrn.php @@ -18,39 +18,39 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief Main page for encoding in the ledger + */ + include_once("ac_common.php"); include_once("user_menu.php"); include_once ("constant.php"); include_once ("postgres.php"); include_once ("check_priv.php"); include_once ("class_widget.php"); +require_once("jrn.php"); $cn=DbConnect($_SESSION['g_dossier']); include ('class_user.php'); $User=new cl_user($cn); $User->Check(); -html_page_start($User->theme, "OnLoad=\"SetFocus('e_date',0); AttachEvent(document, 'keydown', HandleSubmit, true);\" "); +html_page_start($User->theme, + "OnLoad=\"SetFocus('e_date',0); AttachEvent(document, 'keydown', HandleSubmit, true);\" "); + +// Check if dossier set if ( ! isset ( $_SESSION['g_dossier'] ) ) { echo "You must choose a Dossier "; exit -2; } -/* Admin. Dossier */ - -if ( isset( $_GET['p_jrn'] )) -{ - $p_jrn=$_GET['p_jrn']; -} else -{ - $p_jrn=-1; -} - -if ( isset ($_GET['JRN_TYPE'] ) ) { - $p_jrn=-1; -} +/* Get the _REQUEST value for p_jrn (jrn_def.jrn_def_id) and jrn_type (jrn_def.jrn_def_code) */ +$p_jrn=(isset($_REQUEST['p_jrn']))?$_REQUEST['p_jrn']:-1; +$jrn_type=(isset($_REQUEST['jrn_type']))?$_REQUEST['jrn_type']:-1; -ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; +echo ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; if ( $User->admin == 0 ) { // check if user can access @@ -58,7 +58,8 @@ if ( $User->admin == 0 ) { /* Cannot Access */ NoAccess(); } - if ( isset ($p_jrn)) { + // if a jrn is asked + if ( $p_jrn != -1 ) { if (CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$p_jrn) == 0 ){ /* Cannot Access */ NoAccess(); @@ -67,83 +68,66 @@ if ( $User->admin == 0 ) { } // if isset p_jrn } -// if show -if ( isset ($_GET['show'])) { - $result=ShowJrn(); - echo "
    "; - echo $result; - echo "
    "; - exit(); -} -//TODO: add direct show of jrn if there is only one jrn of type JRN_TYPE (stan) +// Show the available jrn +$result=ShowJrn("user_jrn.php?jrn_type=".$jrn_type); +echo "
    "; +echo $result; +echo "
    "; -// if type of journal is asked -if ( isset ($_GET['JRN_TYPE'] ) && $_GET['JRN_TYPE']=='NONE') + + +// if a journal is selected show the journal's menu +if ( $p_jrn != -1 ) { - $jrn_type=$_GET['JRN_TYPE']; - include('user_action_gl.php'); - $result=ShowJrn("user_jrn.php?JRN_TYPE=".$jrn_type); - echo "
    "; - echo $result; - ShowMenuJrnUser($_SESSION['g_dossier'],$jrn_type,$p_jrn); - echo "
    "; -} else -{ -if ( isset ($_GET['JRN_TYPE'])) -{ - $jrn_type=$_GET['JRN_TYPE']; - - //when we get there, select min(jrn_def_id) from jrn_def where jrn_def_type='$jrn_type' - $p_jrn=GetFirstJrnIdForJrnType($_SESSION['g_dossier'],$jrn_type); - - //$result=ShowJrn("user_jrn.php?JRN_TYPE=".$jrn_type); - //echo "
    "; - //echo $result; - //ShowMenuJrnUser($_SESSION['g_dossier'],$jrn_type,$p_jrn); - //echo "
    "; - - //if ( $jrn_type=='NONE' ) include('user_action_gl.php'); -} -//else { - echo_debug("Selected is ".$p_jrn); - // Get the jrn_type_id - include_once('jrn.php'); - $JrnProp=GetJrnProp($_SESSION['g_dossier'],$p_jrn); - $jrn_type=$JrnProp['jrn_def_type']; - echo_debug("Type is $jrn_type"); - echo_debug("Jrn_def_type = $jrn_type"); - - echo '
    '; - echo ShowJrn("user_jrn.php?JRN_TYPE=".$jrn_type); - ShowMenuJrnUser($_SESSION['g_dossier'],$jrn_type,$p_jrn); - echo '
    '; -//} -} - - // if a journal is selected show the journal's menu -if ( $p_jrn != -1 ) { - $result=ShowJrn( "user_jrn.php?JRN_TYPE=".$jrn_type); - // Get the jrn_type_id - include_once('jrn.php'); - $JrnProp=GetJrnProp($_SESSION['g_dossier'],$p_jrn); - $jrn_type=$JrnProp['jrn_def_type']; // display jrn's menu - $menu_jrn=ShowMenuJrn($cn,$jrn_type, $p_jrn); - // echo '
    '; - // echo $result; - echo $menu_jrn; - // echo '
    '; - $g_dossier=$_SESSION['g_dossier']; - $g_user=$_SESSION['g_user']; + // echo '
    '; + echo '
    '; + // show the available ledger of the type jrn_type + ShowMenuJrnUser($_SESSION['g_dossier'],$jrn_type,$p_jrn); + echo '
    '; + echo ''; + + $g_dossier=$_SESSION['g_dossier']; + $g_user=$_SESSION['g_user']; + // Execute Action for p_jrn - - if ( $jrn_type=='VEN' ) include('user_action_ven.php'); - if ( $jrn_type=='ACH' ) include('user_action_ach.php'); - if ( $jrn_type=='FIN' ) include('user_action_fin.php'); - if ( $jrn_type=='OD ' ) include('user_action_ods.php'); - } // if isset p_jrn + if ( $jrn_type=='VEN' ) require('user_action_ven.php'); + if ( $jrn_type=='ACH' ) require('user_action_ach.php'); + if ( $jrn_type=='FIN' ) require('user_action_fin.php'); + if ( $jrn_type=='OD' ) require('user_action_ods.php'); + +} +else +{ + if ( $jrn_type=='NONE') + { + include('user_action_gl.php'); + + } else { + // no journal are selected so we select the first one + $p_jrn=GetFirstJrnIdForJrnType($_SESSION['g_dossier'],$jrn_type); + // display jrn's menu + + // echo '
    '; + echo '
    '; + ShowMenuJrnUser($_SESSION['g_dossier'],$jrn_type,$p_jrn); + echo '
    '; + echo '
    '; + } + +} html_page_stop(); -?> + +?> \ No newline at end of file diff --git a/html/user_login.php b/html/user_login.php index ae5afea69..eed284cc0 100644 --- a/html/user_login.php +++ b/html/user_login.php @@ -18,6 +18,10 @@ * along with PhpCompta; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/*! \file + * \brief Welcome page where the folder and module are choosen + */ + // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ include_once ("ac_common.php"); diff --git a/html/user_pref.php b/html/user_pref.php index 4e78c98c7..3502a6620 100644 --- a/html/user_pref.php +++ b/html/user_pref.php @@ -19,6 +19,10 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief Page for the personal preference (theme, password,...) + */ + include_once ("ac_common.php"); include_once ("postgres.php"); /* Admin. Dossier */ @@ -49,7 +53,10 @@ if ( isset ( $_POST['p_size']) ) { include_once ("user_menu.php"); if ( isset ($_SESSION['g_dossier']) ) { if ( $_SESSION['g_dossier'] != 0 ) - ShowMenuCompta($_SESSION['g_dossier']); +echo '
    '; + +echo ShowMenuCompta($_SESSION['g_dossier']); + echo "
    "; } require_once("pref.inc.php"); html_page_stop(); diff --git a/html/user_sec.php b/html/user_sec.php index 271974595..dda0c65be 100644 --- a/html/user_sec.php +++ b/html/user_sec.php @@ -18,6 +18,9 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief Set the security for an user + */ include_once ("ac_common.php"); include_once("check_priv.php"); diff --git a/include/ac_common.php b/include/ac_common.php index a38d3cbf9..fb12f0a8f 100644 --- a/include/ac_common.php +++ b/include/ac_common.php @@ -19,29 +19,37 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief common utilities for a lot of procedure, classe + */ include_once("debug.php"); include_once("constant.php"); - +/*! + * \brief log error into the /tmp/phpcompta_error.log it doesn't work on windows + * + * \param log message + * + * \return nothing + * + */ function echo_error ($p_log) { $fdebug=fopen("/tmp/phpcompta_error.log","a+"); fwrite($fdebug,date("Ymd H:i:s").$p_log."\n"); fclose($fdebug); + echo_debug($p_log); } -/* function cmpDate - * Purpose : - * Compare 2 dates - * parm : - * - date1 date2 - * gen : - * - rien - * return: - * - == 0 les dates sont identiques +/*! + * \brief Compare 2 dates + * \param date + * \param date2 + * + * \return + * - == 0 les dates sont identiques * - > 0 date1 > date2 * - < 0 date1 < date2 */ - function cmpDate ($p_date,$p_date_oth) { $l_date=isDate($p_date); $l2_date=isDate($p_date_oth); @@ -56,16 +64,14 @@ function cmpDate ($p_date,$p_date_oth) { // si $p_date > $p_date_oth return > 0 return $l_mkdate-$l2_mkdate; } -/* function IsNumber - * purpose : check if the argument is a number +/* + * \brief check if the argument is a number * - * parm : $p_int + * \param $p_int * - * gen nothing - * - * return : - * 1 it's a number - * 0 it is not + * \return + * - 1 it's a number + * - 0 it is not */ function isNumber($p_int) { if ( strlen (trim($p_int)) == 0 ) return 0; @@ -77,14 +83,12 @@ function isNumber($p_int) { }// !ereg } -/* function isDate - * Purpose : Verifie qu'une date est bien formaté +/*! + * \brief Verifie qu'une date est bien formaté * en d.m.y et est valable - * parm : - * - $p_date - * gen : - * - rien - * return: + * \param $p_date + * + * \return * - null si la date est invalide ou malformaté * - $p_date si tout est bon * @@ -107,31 +111,25 @@ function isDate ( $p_date) { }// !ereg return $p_date; } -/* function formatDate($p_date) - * Purpose : +/*! + * \brief call cmpDate * - * parm : - * - - * gen : - * - - * return: + * \return the date or the quoted string null */ function formatDate($p_date) { if ( isDate($p_date)== null) return "null"; return "'".$p_date."'"; } -/* function html_page_start - * Purpose : Default page header for each page +/*! + * \brief Default page header for each page * - * parm : - * - default theme - * - $p_script - * gen : - * - none - * return: - * none + * \param default theme + * \param $p_script + * \param $p_script2 another js script + * + * \return none */ -function html_page_start($p_theme="",$p_script="") +function html_page_start($p_theme="",$p_script="",$p_script2="") { include_once ("postgres.php"); ini_set('magic_quotes_gpc','Off'); @@ -151,49 +149,42 @@ function html_page_start($p_theme="",$p_script="") } // end if echo ''; echo ""; + + if ( $p_script2 != "" ) + $p_script2=''; + echo " PhpCompta - + ". + $p_script2. " "; echo ""; } -/* function html_page_stop() - * Purpose : +/*! + * \brief end tag * - * parm : - * - - * gen : - * - - * return: */ function html_page_stop() { echo ""; echo ""; } -/* function html_button_logout - * Purpose : +/*! + * \brief Button logout * - * parm : - * - - * gen : - * - - * return: + + * \return nothing */ function html_button_logout() { echo " Logout "; } -/* function NoAccess - * Purpose : +/*! + * \brief Echo no access and stop * - * parm : - * - - * gen : - * - - * return: + * \return nothing */ @@ -206,14 +197,12 @@ function NoAccess() { exit -1; } -/* function FormatString($p_string) - * Purpose : Fix the problem with the ' char +/*! + * \brief Fix the problem with the quote char for the database * - * parm : - * - - * gen : - * - - * return: + * \param $p_string + * + * \return a string which won't let strange char for the database */ function FormatString($p_string) { @@ -229,15 +218,15 @@ function FormatString($p_string) return $p_string; } -/* function ShowItem($p_array) */ -/* purpose : store the string which print */ +/*! +/* \brief store the string which print */ /* the content of p_array in a table */ /* used to display the menu */ -/* parameter : array */ -/* return : string */ -function ShowItem($p_array,$p_dir='V',$class="mtitle",$class_ref="mtitle",$default="") +/* \param array */ +/* \return : string */ +function ShowItem($p_array,$p_dir='V',$class="mtitle",$class_ref="mtitle",$default="",$p_extra="") { - $ret=""; + $ret="
    "; // direction Vertical if ( $p_dir == 'V') { foreach ($p_array as $all=>$href){ @@ -266,30 +255,28 @@ function ShowItem($p_array,$p_dir='V',$class="mtitle",$class_ref="mtitle",$defau $ret.="
    "; return $ret; } -/* function echo_warning - * Purpose : warns +/*! + * \brief warns * - * parm : + * \param : * - string * gen : * - none - * return: + * \return: * - none */ function echo_warning($p_string) { echo '

    '.$p_string."

    "; } -/* function make_array($cn,$sql) +/*! ************************************************** - * Purpose : make a array with the sql + * \brief make a array with the sql * - * parm : - * - $cn dbatabase connection - * - $sql related sql - * gen : - * - none - * return: a double array [value,label] + * \param $cn dbatabase connection + * \param $sql related sql + * + * \return: a double array [value,label] */ function make_array($p_cn,$p_sql,$p_null=0) { @@ -313,18 +300,16 @@ function make_array($p_cn,$p_sql,$p_null=0) { return $r; } -/* function getPeriodeName +/*! ************************************************** - * Purpose : Show the periode which found thanks its - * id + * \brief Show the periode which found thanks its id + * * - * parm : - * - $p_cn database connection - * - p_id - * - Start or end - * gen : - * - - * return: string + * \param $p_cn database connection + * \param p_id + * \param Start or end + * + * \return: string */ function getPeriodeName($p_cn,$p_id,$pos='p_start') { if ( $pos != 'p_start' and @@ -335,18 +320,15 @@ function getPeriodeName($p_cn,$p_id,$pos='p_start') { $a=pg_fetch_array($ret,0); return $a['t']; } -/* function getPeriodeFromMonth +/*! ************************************************** - * Purpose : Return the period corresponding to the + * \brief Return the period corresponding to the * date * - * parm : - * - p_cn database connection - * - the month + year 'MM.YYYY' - * gen : - * - none + * \param p_cn database connection + * \param the month + year 'MM.YYYY' * - * return: + * \return: * parm_periode.p_id */ function getPeriodeFromMonth($p_cn,$p_date) { @@ -358,18 +340,15 @@ function getPeriodeFromMonth($p_cn,$p_date) { return $a['p_id']; } -/* function getPeriodeFromDate +/*! ************************************************** - * Purpose : Return the period corresponding to the + * \brief Return the period corresponding to the * date * - * parm : + * \param : * - p_cn database connection * - the date 'DD.MM.YYYY' - * gen : - * - none - * - * return: + * \return: * parm_periode.p_id */ function getPeriodeFromDate($p_cn,$p_date) { diff --git a/include/action.inc.php b/include/action.inc.php new file mode 100644 index 000000000..930b9900a --- /dev/null +++ b/include/action.inc.php @@ -0,0 +1,264 @@ +'; +if ( $sub_action == "" ) $sub_action="list"; + +// if correction is asked go to directly to add_action +if (isset($_POST['corr'] )) + $sub_action="add_action"; + +// if this page is called from another menu (customer, supplier,...) +// a button back is added +// TODO add function for generating url, hidden tags... +if ( isset ($_REQUEST['url'])) +{ + $retour=sprintf('',urldecode($_REQUEST['url'])); + $h_url=sprintf('',urldecode($_REQUEST['url'])); +} +else +{ + $retour=""; + $h_url=""; +} +////////////////////////////////////////////////////////////////////// +// Show a list of the action +if ( $sub_action == "list" ) + { + + + // show the search menu +?> +
    + + +Titre : ', + $a); + $qcode=(isset($_GET['qcode']))?$_GET['qcode']:""; + printf ('Tiers QuickCode: ', + $qcode); + +?> + + + + + + + + +
    + + + +> + +
    + + +
    +GetByQCode($_REQUEST['qcode']); + $str=" and f_id= ".$fiche->id; + } + } + + $r=$act->myList('1,5,6,7',$query.$str); + echo $r; + } +////////////////////////////////////////////////////////////////////// +// Add an action +if ( $sub_action == "add_action" ) +{ + echo $retour; + + echo '
    '; + echo JS_SEARCH_CARD; + // Add hidden tag + echo '
    '; + echo $h_url; + $date=new widget("text"); + $date->name="ag_date"; + $date->value=(isset($_POST['ag_date']))?$_POST['ag_date']:""; + echo "

    Date : "; + echo $date->IOValue()."

    "; + // Tiers + $W1=new widget("js_search"); + $W1->label="Tiers"; + $W1->name="tiers"; + $W1->value=isset($_REQUEST['tiers'])?$_REQUEST['tiers']:""; + $W1->extra="8,9,14"; // filter on frd_id + $W1->extra2=0; // jrn = 0 + echo "
    ".$W1->IOValue(); + $client_label=new widget("span"); + $tiers_label=""; + // Retrieve name + if ( $W1->value != "" ) + { + $tiers=new fiche($cn); + $tiers->GetByQCode($W1->value); + $tiers_label=$tiers->strAttribut(1); + + } + echo $client_label->IOValue("tiers_label",$tiers_label)."
    "; + + $doc_type=new widget("select"); + $doc_type->name="dt_id"; + $doc_type->value=make_array($cn,"select dt_id,dt_value from document_type where dt_id in (1,5,6,7)"); + echo 'Type d\' action'; + $doc_type->selected=(isset($_POST['dt_id']))?$_POST['dt_id']:""; + echo $doc_type->IOValue(); + + // state + $doc_state=new widget("select"); + $doc_state->name="d_state"; + $doc_state->value=make_array($cn,"select s_id,s_value from document_state"); + $doc_state->selected=(isset($_POST['d_state']))?$_POST['d_state']:""; + echo "Etat : ".$doc_state->IOValue(); + echo ''; + echo ''; + $title=new widget("text"); + $title->name="ag_title"; + $title->value=(isset($_POST['ag_title']))?$_POST['ag_title']:""; + echo "

    Titre : "; + echo $title->IOValue()."

    "; + +?> + + + + + + + + Note Interne : + + +

    +
    +
    +ag_desc=$_POST['ag_desc']; + $act->ag_date=$_POST['ag_date']; + $act->d_state=$_POST['d_state']; + $act->dt_id=$_POST['dt_id']; + $act->qcode=$_POST['tiers']; + $act->ag_title=$_POST['ag_title']; + echo $act->Confirm(); +} +//////////////////////////////////////////////////////////////////////////////// +// Save Action +// Stage 2 : Save the action and propose to save a file +//////////////////////////////////////////////////////////////////////////////// +if ( $sub_action == "save_action_st2" ) +{ + $act=new action($cn); + $act->ag_desc=$_POST['ag_desc']; + $act->ag_date=$_POST['ag_date']; + $act->d_state=$_POST['d_state']; + $act->dt_id=$_POST['dt_id']; + $act->qcode=$_POST['tiers']; + $act->ag_title=$_POST['ag_title']; + $act->md_id=$_POST['gen_doc']; + + $act->gen=isset($_POST['p_gen'])?'on':'off'; + + echo $act->SaveStage2(); +} + +//////////////////////////////////////////////////////////////////////////////// +// Save Document +// Stage 3 : Save the document +//////////////////////////////////////////////////////////////////////////////// +if ( $sub_action == "save_action_st3" ) +{ + echo_debug("action.inc.php",__LINE__,'Stage 3'); + $act=new action($cn); + $act->ag_id=$_POST['ag_id']; + $d_id=(isset($_POST['d_id']))?$_POST['d_id']:0; + echo $act->SaveStage3($d_id); +} + diff --git a/include/balance.php b/include/balance.php index d2a7939b6..ee1eb02a2 100644 --- a/include/balance.php +++ b/include/balance.php @@ -19,6 +19,9 @@ */ // Auteur Dany De Bontridder ddebontridder@yahoo.fr // /* $Revision$ */ +/*! \file + * \brief Show the balance and let you print it or export to PDF + */ include_once ("ac_common.php"); include_once("preference.php"); @@ -29,7 +32,7 @@ if ( $User->CheckAction($cn,BALANCE) == 0) NoAccess(); exit; } -echo '
    '; +echo '
    '; //////////////////////////////////////////////////////////////////////////////// // Form @@ -106,7 +109,7 @@ if ( isset($_POST['view'] ) ) { $b=GetPeriode($cn,$_POST['to_periode']); echo "

    période du ".$a['p_start']." au ".$b['p_end']."

    "; - echo ''; + echo '
    '; $i=0; foreach ($row as $r) { $i++; diff --git a/include/cbc_be.inc.php b/include/cbc_be.inc.php index bdfda6749..ec89ad20c 100644 --- a/include/cbc_be.inc.php +++ b/include/cbc_be.inc.php @@ -18,6 +18,9 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief This file must be included to parse the CVS from the CBC Bank + */ ///////////////////////////////////////////////////////////////////////////////////////////////////// // Bank CBC diff --git a/include/central_inc.php b/include/central_inc.php index 3795d7f4d..536872c90 100644 --- a/include/central_inc.php +++ b/include/central_inc.php @@ -18,19 +18,19 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Concerns the centralization operations + */ -/* function Centralise - * Purpose : +/*! + * \brief * Met les donnees centralisees dans la table * centralize * - * parm : - * - p_cn connection - * - periode a centraliser - * gen : - * - none - * return: - * - code error + * \param p_cn connection + * \param periode a centraliser + * + * \return code error * */ function Centralise($p_cn,$p_periode) { @@ -145,9 +145,9 @@ $sql="insert into centralized( c_j_id, EndSql($p_cn); return NOERROR; } -/* function isCentralize($p_cn,$p_user) +/*! ************************************************** - * Purpose : test if e jrn_jr.id is centralize or not + * \brief test if e jrn_jr.id is centralize or not * * parm : * - p_cn diff --git a/include/check_priv.php b/include/check_priv.php index de0b08379..c5f994fff 100644 --- a/include/check_priv.php +++ b/include/check_priv.php @@ -20,11 +20,14 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +/*! \file + * \brief Tools for checking the security + * \todo some of those tools are redundant with the class user and should be cleaned + */ include_once("postgres.php"); -/* function CheckJrn - * Purpose : - * Vérifie les acces d'un utilisateur +/*! + * \brief Vérifie les acces d'un utilisateur * sur un journal * * parm : @@ -128,16 +131,14 @@ function CheckJrn($p_dossier,$p_user,$p_jrn,$p_detail=False) return 0; } -/* function CheckAction - * Purpose : Check if an user is allowed to do an action +/*! + * \brief Check if an user is allowed to do an action * - * parm : - * - p_dossier dossier id - * - p_login user's login - * - p_action_id - * gen : - * - - * return: + * \param p_dossier dossier id + * \param p_login user's login + * \param p_action_id + * + * \return * - 0 no priv * - 1 priv granted * @@ -152,14 +153,13 @@ function CheckAction ( $p_dossier,$p_login,$p_action_id) if ( $Count == 1 ) return 1; echo "

    Invalid action !!! $Count select * from user_sec_act where ua_login='$p_login' and ua_act_id=$p_action_id

    "; } -/* function CheckIsAdmin - * Purpose : Check if an user is an administrator +/*! + * \brief Check if an user is an administrator * - * parm : - * - $p_user user login - * gen : - * - - * return: + * + * \param $p_user user login + * + * \return * - 0 if no * - 1 if yes * @@ -177,16 +177,15 @@ function CheckIsAdmin($p_user) return $isAdmin; } -/* function CheckDossier +/*! ************************************************** - * Purpose : Check if an user has acces to a folder + * \brief Check if an user has acces to a folder * - * parm : - * - user - * - p_dossier concerned folder - * gen : - * - none - * return: + * + * \param user + * \param p_dossier concerned folder + * + * \return * 1 if yes * 0 if no */ diff --git a/include/class_attribut.php b/include/class_attribut.php index 25dee9b4d..86703df01 100644 --- a/include/class_attribut.php +++ b/include/class_attribut.php @@ -18,11 +18,18 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Manage the attribut of the card + */ +/*! + * \brief Manage the attribut of the card + */ + class Attribut { - var $ad_id; // pk for attribut - var $ad_text; // type of content - var $av_text; // Description (content) - var $cn; // database connection + var $ad_id; /*! \enum pk for attribut */ + var $ad_text; /*! \enum type of content */ + var $av_text; /*! \enum Description (content) */ + var $cn; /*! \enum database connection */ function Attribut($p_ad_id) { $this->ad_id=$p_ad_id; $this->cn=-1; @@ -30,15 +37,15 @@ class Attribut { } -/* function SortAttributeById +/*! ************************************************** - * Purpose : Sort an array of object attribut thx the + * \brief Sort an array of object attribut thx the * ad_id - * parm : - * - array of Attribut objects - * gen : - * - - * return: the ordered array + * + *\param array of Attribut objects + * + * + * \return the ordered array */ function SortAttributeById($p_attribut) { for ($i=0;$i< sizeof($p_attribut)-1;$i++) { diff --git a/include/class_balance.php b/include/class_balance.php index b249e68e3..9c1a7d2ef 100644 --- a/include/class_balance.php +++ b/include/class_balance.php @@ -19,16 +19,37 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr include_once("poste.php"); +/*! \file + * \brief Class for manipulating data to print the balance of account + */ +/*! + * \brief Class for manipulating data to print the balance of account + */ class Balance { - var $db; // database connection - var $central; - var $row; + var $db; /*! \enum database connection */ + var $central; /*! \enum from centralized ledger if equal to Y */ + var $row; /*! \enum row for ledger*/ function Balance($p_cn) { $this->db=$p_cn; $this->central='N'; } + +/*! + * \brief retrieve all the row from the ledger in the range of a periode + * \param $p_from_periode start periode + * \param $p_to_periode end periode + * + * \return a double array + * array of + * - $a['poste'] + * - $a['label'] + * - $a['sum_deb'] + * - $a['sum_cred'] + * - $a['solde_deb'] + * - $a['solde_cred'] + */ function GetRow($p_from_periode,$p_to_periode) { // compute periode if ( $p_from_periode==$p_to_periode ) { diff --git a/include/class_customer.php b/include/class_customer.php index 361d36bb7..4b78945a7 100644 --- a/include/class_customer.php +++ b/include/class_customer.php @@ -21,31 +21,39 @@ require_once("constant.php"); require_once("postgres.php"); require_once("class_parm_code.php"); +require_once("class_widget.php"); require_once('class_fiche.php'); require_once('class_poste.php'); require_once('user_common.php'); +/*! \file + * \brief Derived from class fiche Customer are a specific kind of card + */ +/*! + * \brief class Customer are a specific kind of card + */ // Use the view vw_customer // class Customer extends fiche{ - var $id; // f_id - var $poste; // poste comptable - var $name; - var $street; - var $country; - var $cp; - var $vat_number; - var $fiche_def_ref; // fiche_def_ref.frd_id - // Constructor - // only a db connection is needed + + var $poste; /*! \enum $poste poste comptable */ + var $name; /*! \enum $name name of the company */ + var $street; /*! \enum $street Street */ + var $country; /*! \enum $country Country */ + var $cp; /*! \enum $cp Zip code */ + var $vat_number; /*! \enum $vat_number vat number */ + + /*! \brief Constructor + /* only a db connection is needed */ function Customer($p_cn,$p_id=0) { $this->fiche_def_ref=FICHE_TYPE_CLIENT; fiche::fiche($p_cn,$p_id) ; } - // Get all info contains in the view - // thanks to the poste elt + /*! \brief Get all info contains in the view + * thanks to the poste elt (account) + */ function GetFromPoste($p_poste=0) { $this->poste=($p_poste==0)?$this->poste:$p_poste; $sql="select * from vw_client where poste_comptable=".$this->poste; @@ -61,17 +69,17 @@ class Customer extends fiche{ $this->vat_number=$row['tva_num']; } -/* function ListingVat +/*! ************************************************** - * Purpose : Get all the info for making a vat listing + * \brief Get all the info for making a vat listing * for the vat administration - * TODO : optimize SQL - * parm : - * - periode + * \todo optimize SQL + * + * \param periode * - * return: - * - * - array + * \return double array structure is + * ( j_poste,name,vat_number,amount,tva,customer(object) + * */ function VatListing($p_year) { $cond_sql=" and A.j_date = B.j_date @@ -174,111 +182,89 @@ where } return $a_Res; } - -/* function Display +/*! \function Summary ************************************************** - * Purpose : Display object instance + \Brief show the default screen * * parm : - * - - * gen : - * - - * return: - */ - function Display() - { - var_dump($this); - } -/* function Get - ************************************************** - * Purpose : Get Attribute of client - * - * parm : - * - - * gen : - * - - * return: - */ - function Get() - { - echo_debug('class_client',__LINE__,'Get'); - fiche::getAttribut(); - } -/* function GetAll - ************************************************** - * Purpose : Get array of fiche with all attribute - * - * parm : - * - none - * gen : - * - - * return: array of fiche with all attribute - */ - function GetAll($p_offset=-1) - { - return fiche::GetByDef($this->fiche_def_ref,$p_offset); - } -/* function Summary - ************************************************** - * Purpose : show the default screen - * - * parm : - * - + * - p_search (filter) * gen : * - * return: string to display */ - function Summary() + function Summary($p_search) { - + $p_search=FormatString($p_search); $url=urlencode($_SERVER['REQUEST_URI']); $script=$_SERVER['SCRIPT_NAME']; // Creation of the nav bar // Get the max numberRow - $all_client=$this->CountByDef($this->fiche_def_ref); + $all_client=$this->CountByDef($this->fiche_def_ref,$p_search); // Get offset and page variable $offset=( isset ($_REQUEST['offset'] )) ?$_REQUEST['offset']:0; $page=(isset($_REQUEST['page']))?$_REQUEST['page']:1; $bar=jrn_navigation_bar($offset,$all_client,$_SESSION['g_pagesize'],$page); - + // set a filter ? + $search=""; + if ( trim($p_search) != "" ) + { + $search=" and f_id in +(select f_id from jnt_fic_att_value + join fiche using (f_id) + join attr_value using (jft_id) + where + ad_id=1 and av_text ~* '$p_search')"; + } // Get The result Array - $step_client=$this->GetAll($offset); + $step_client=$this->GetAll($offset,$search); if ( $all_client == 0 ) return ""; $r=$bar; - $r.="
    + $r.='
    + -"; +'; + if ( sizeof ($step_client ) == 0 ) + return $r; foreach ($step_client as $client ) { $r.=""; - $r.=""; + $e=sprintf(' ', + $script,$client->id,$url); + + $r.=""; $r.=""; $r.=""; + $post=new poste($this->cn,$client->strAttribut(ATTR_DEF_ACCOUNT)); $a=$post->GetSoldeDetail(); - $r.=sprintf('',$a['solde']); + $r.=sprintf('',$a['solde']); $r.="'; + $r.=sprintf('C - ', + $script,$client->strAttribut(ATTR_DEF_QUICKCODE),$url); + $r.=sprintf('A - ', + $script,$client->strAttribut(ATTR_DEF_QUICKCODE) ,$url); + + + + $r.='F -'; + + $r.=''; $r.=""; } $r.="
    Quick Code Nom Adresse Solde Action
    ".$client->strAttribut(ATTR_DEF_QUICKCODE)." $e".$client->strAttribut(ATTR_DEF_QUICKCODE)."".$client->strAttribut(ATTR_DEF_NAME)."".$client->strAttribut(ATTR_DEF_ADRESS). " ".$client->strAttribut(ATTR_DEF_CP). " ".$client->strAttribut(ATTR_DEF_PAYS). " %10.2f€ %15.2f€"; - $r.=sprintf('D - ', - $script,$client->id,$url); - $r.='C'; - $r.='S'; - $r.='
    "; + $r.=$bar; return $r; } - } ?> diff --git a/include/class_document.php b/include/class_document.php new file mode 100644 index 000000000..0b4c8d995 --- /dev/null +++ b/include/class_document.php @@ -0,0 +1,590 @@ +db=$p_cn; + $this->d_id=$p_d_id; + } +/*! + * \brief Generate the document, Call $this-\>Replace to replace + * tag by value + * + * \param none + * + * + * \return an array : the url where the generated doc can be found, the name + * of the file and his mimetype + */ + function Generate() + { + // create a temp directory in /tmp to unpack file and to parse it + $dirname=tempnam('/tmp','doc_'); + echo $dirname; + unlink($dirname); + mkdir ($dirname); + echo_debug('class_action',__LINE__,"Dirname is $dirname"); + // Retrieve the lob and save it into $dirname + StartSql($this->db); + $dm_info="select md_lob,md_filename,md_mimetype + from document_modele where md_id=".$this->md_id; + $Res=ExecSql($this->db,$dm_info); + + $row=pg_fetch_array($Res,0); + $this->d_lob=$row['md_lob']; + $this->d_filename=$row['md_filename']; + $this->d_mimetype=$row['md_mimetype']; + + echo_debug('class_document',__LINE__,"OID is ".$row['md_lob']); + /*!\todo Carefull : the slash is not windows compliant */ + chdir($dirname); + $filename=$row['md_filename']; + pg_lo_export($this->db,$row['md_lob'],$filename); + + // if the doc is a OOo, we need to unzip it first + // and the name of the file to change is always content.xml + if ( substr($row['md_mimetype'],'vnd.oasis') != 0 ) + { + system("unzip ".$filename); + // Remove the file we do not need anymore + unlink($filename); + $file_to_parse="content.xml"; + } + else + $file_to_parse=$filename; + // affect a number + $this->d_number=NextSequence($this->db,"seq_doc_type_".$this->md_id); + + + // parse the document - return the doc number ? + $this->ParseDocument($dirname,$file_to_parse); + + Commit($this->db); + // if the doc is a OOo, we need to re-zip it + if ( substr($row['md_mimetype'],'vnd.oasis') != 0 ) + { + system ("zip -r ".$filename." *"); + $file_to_parse=$filename; + } + // Create a directory + mkdir ($_SERVER['DOCUMENT_ROOT'].$dirname); + + // we need to rename the new generated file + rename($dirname."/".$file_to_parse,$_SERVER['DOCUMENT_ROOT'].$dirname.'/'.$file_to_parse); + $ret=sprintf('Document généré', + $dirname.'/'.$file_to_parse); + $this->SaveGenerated($_SERVER['DOCUMENT_ROOT'].$dirname."/".$file_to_parse); + return $ret; + } + + /*! ParseDocument + * \brief This function parse a document and replace all + * the predefined tags by a value. This functions + * generate diffent documents (invoice, order, letter) + * with the info from the database + * + * \param $p_dir directory name + * \param $p_file filename + */ + function ParseDocument($p_dir,$p_file) + { + + + + /*!\note Replace in the doc the tags by their values. + * - MY_* table parameter + * - ART_VEN* table quant_sold for invoice + * - CUST_* table quant_sold and fiche for invoice + * - e_* for the invoice in the $_POST + */ + // open the document + $infile_name=$p_dir."/".$p_file; + echo_debug("class_document.php",__LINE__,"Open the document $p_dir/$p_file"); + $h=fopen($infile_name,"r"); + $output_name=tempnam($_SERVER["DOCUMENT_ROOT"]."/tmp","gen_doc_"); + $output_file=fopen($output_name,"w+"); + // check if the opening is sucessfull + if ( $h == false ) + { + echo "cannot open $p_dir $p_file "; + exit(); + } + if ( $output_file == false) + { + echo "ne peut pas ouvrir le fichier de sortie"; + exit(); + } + //read the file + while(! feof($h)) + { + // replace the tag + $buffer=fgets($h); + // search in the buffer the magic << and >> + // while ereg finds something to replace + while ( ereg ("<<[A-Z]+_*[A-Z]*_*[A-Z]*_*[0-9]*>>",$buffer,$f) ) + { + + echo_debug('class_document',__LINE__,var_export( $f,true)); + foreach ( $f as $pattern ) + { + echo_debug('class_document',__LINE__, "pattern"); + echo_debug('class_document',__LINE__, var_export($pattern,true)); + $to_remove=$pattern; + // we remove the < and > from the pattern + $pattern=str_replace('<','',$pattern); + $pattern=str_replace('>','',$pattern); + + + // if the pattern if found we replace it + $value=$this->Replace($pattern); + // replace into the $buffer + $buffer=str_replace($to_remove,$value,$buffer); + echo_debug('class_document',__LINE__, $buffer); + // if the pattern if found we replace it + echo_debug('class_document',__LINE__,"Transform $pattern by $value"); + } + } + // write into the output_file + fwrite($output_file,$buffer); + + } + fclose($h); + fclose($output_file); + rename ($output_name,$infile_name); + // Save the document into the database + + } + /*! SaveGenerated + * \brief Save the generated Document + * \param $p_file is the generated file + * + * + * \return 0 if no error otherwise 1 + */ + function SaveGenerated($p_file) + { + // We save the generated file + $doc=new Document($this->db); + StartSql($this->db); + $this->d_lob=pg_lo_import($this->db,$p_file); + if ( $this->d_lob == false ) { + Rollback($this->db); echo_debug('class_document',__LINE__,"can't save file $p_file"); + return 1; } + + $sql=sprintf("insert into document(ag_id,d_lob,d_number,d_filename,d_mimetype) + values (%d,%s,%d,'%s','%s')", + $this->ag_id, + $this->d_lob, + $this->d_number, + $this->d_filename, + $this->d_mimetype + ); + ExecSql($this->db,$sql); + $this->d_id=GetSequence($this->db,"document_d_id_seq"); + + Commit($this->db); + return 0; + } + /*! Upload + * \brief Upload a file into document + * all the needed data are in $_FILES we don't increment the seq + * + * + * \return + */ + function Upload() + { + + // Start Transaction + StartSql($this->db); + $new_name=tempnam('/tmp','doc_'); + var_dump($_FILES); + // nothing to save + if ( sizeof($_FILES) == 0 ) return; + // check if a file is submitted + if ( strlen($_FILES['file_upload']['tmp_name']) != 0 ) + { + // upload the file and move it to temp directory + if ( move_uploaded_file($_FILES['file_upload']['tmp_name'],$new_name)) + { + $oid=pg_lo_import($this->db,$new_name); + // check if the lob is in the database + if ( $oid == false ) + { + Rollback($this->db); + return 1; + } + } + // the upload in the database is successfull + $this->d_lob=$oid; + $this->d_filename=$_FILES['file_upload']['name']; + $this->d_mimetype=$_FILES['file_upload']['type']; + // now we have to update the col. + // We retrieve the row to remove a possible existing lob (replace) + $sql="select d_lob from document where d_id=".$this->d_id; + $ret=ExecSql($this->db,$sql); + + if (pg_num_rows($ret) != 0) + { + // a result is found, the old oid is keept in order to + // remove it later + $r=pg_fetch_array($ret,0) ; + $old_oid=$r['d_lob'] ; + if (strlen($old_oid) != 0) { pg_lo_unlink ($this->db,$old_oid);} + } + // Update the table + $sql=sprintf("update document set d_lob=%s,d_filename='%s',d_mimetype='%s' where d_id=%d", + $this->d_lob,$this->d_filename,$this->d_mimetype,$this->d_id); + ExecSql($this->db,$sql); + Commit($this->db); + } + + } +/*! a_ref + * \brief create and compute a string for reference the doc + * + * \return a string + */ + function a_ref() + { + if ( $this->d_id == 0 ) + return ''; + $r=""; + $r='Document'; + return $r; + } + /* ! Get + * \brief Retrieve the document + */ + function Get() + { + // retrieve the template and generate document + StartSql($this->db); + $ret=ExecSql($this->db, + "select d_id,d_lob,d_filename,d_mimetype from document where d_id=".$this->d_id ); + if ( pg_num_rows ($ret) == 0 ) + return; + $row=pg_fetch_array($ret,0); + //the document is saved into file $tmp + $tmp=tempnam('/tmp/','document_'); + pg_lo_export($this->db,$row['d_lob'],$tmp); + $this->d_mimetype=$row['d_mimetype']; + $this->d_filename=$row['d_filename']; + + // send it to stdout + ini_set('zlib.output_compression','Off'); + header("Pragma: public"); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Cache-Control: must-revalidate"); + header('Content-type: "'.$this->d_mimetype.'"'); + header('Content-Disposition: attachment;filename="'.$this->d_filename.'"',FALSE); + header("Accept-Ranges: bytes"); + $file=fopen($tmp,'r'); + while ( !feof ($file) ) + { + echo fread($file,8192); + } + fclose($file); + + unlink ($tmp); + + Commit($this->db); + + } +/*! + * \brief replace the TAG by the real value, this value can be into + * the database or in $_POST + * The possible tags are + * - [CUST_NAME] customer's name + * - [CUST_ADDR_1] customer's address line 1 + * - [CUST_CP] customer's ZIP code + * - [CUST_CO] customer's country + * - [CUST_VAT] customer's VAT + * - [MARCH_NEXT] end this item and increment the counter $i + * - [VEN_ART_NAME] + * - [VEN_ART_PRICE] + * - [VEN_ART_QUANT] + * - [VEN_ART_TVA_CODE] + * - [VEN_ART_TVA_AMOUNT] + * - [VEN_ART_STOCK_CODE] + * - [VEN_HTVA] + * - [VEN_TVAC] + * - [VEN_TVA] + * - [TOTAL_VEN_HTVA] + * - [DATE] + * - [NUMBER_ID] + * - [MY_NAME] + * - [MY_CP] + * - [MY_COMMUNE] + * - [MY_TVA] + * - [MY_STREET] + * - [MY_NUMBER] + * + * \param TAG + * \return String which must replace the tag + */ + function Replace($p_tag) + { + $r="Tag inconnu"; + static $counter=0; + switch ($p_tag) + { + case 'DATE': + $r=' Date inconnue '; + // Date are in $_REQUEST['ag_date'] + // or $_POST['e_date'] + if ( isset ($_REQUEST['ag_date'])) + $r=$_REQUEST['ag_date']; + if ( isset ($_REQUEST['e_date'])) + $r=$_REQUEST['e_date']; + + break; + // + // the company priv + + case 'MY_NAME': + $my=new own($this->db); + $r=$my->MY_NAME; + break; + case 'MY_CP': + $my=new own($this->db); + $r=$my->MY_CP; + break; + case 'MY_COMMUNE': + $my=new own($this->db); + $r=$my->MY_COMMUNE; + break; + case 'MY_TVA': + $my=new own($this->db); + $r=$my->MY_TVA; + break; + case 'MY_STREET': + $my=new own($this->db); + $r=$my->MY_STREET; + break; + case 'MY_NUMBER': + $my=new own($this->db); + $r=$my->MY_NUMBER; + break; + // customer + /*\note The CUST_* are retrieved thx the $_REQUEST['tiers'] + * which contains the quick_code + */ + case 'CUST_NAME': + $tiers=new fiche($this->db); + $qcode=isset($_REQUEST['tiers'])?$_REQUEST['tiers']:$_REQUEST['e_client']; + $tiers->getByQcode($qcode,false); + $r=$tiers->strAttribut(ATTR_DEF_NAME); + break; + case 'CUST_ADDR_1': + $tiers=new fiche($this->db); + $qcode=isset($_REQUEST['tiers'])?$_REQUEST['tiers']:$_REQUEST['e_client']; + $tiers->getByQcode($qcode,false); + $r=$tiers->strAttribut(ATTR_DEF_ADRESS); + + break ; + case 'CUST_CP': + $tiers=new fiche($this->db); + $qcode=isset($_REQUEST['tiers'])?$_REQUEST['tiers']:$_REQUEST['e_client']; + $tiers->getByQcode($qcode,false); + $r=$tiers->strAttribut(ATTR_DEF_CP); + + break; + case 'CUST_CO': + $tiers=new fiche($this->db); + $qcode=isset($_REQUEST['tiers'])?$_REQUEST['tiers']:$_REQUEST['e_client']; + $tiers->getByQcode($qcode,false); + $r=$tiers->strAttribut(ATTR_DEF_PAYS); + + break; + case 'CUST_VAT': + $tiers=new fiche($this->db); + $qcode=isset($_REQUEST['tiers'])?$_REQUEST['tiers']:$_REQUEST['e_client']; + $tiers->getByQcode($qcode,false); + $r=$tiers->strAttribut(ATTR_DEF_NUMTVA); + break; + // Marchandise in $_POST['e_march*'] + // \see user_form_achat.php or user_form_ven.php + case 'NUMBER': + $r=$this->d_number; + break; + /* + * - [VEN_ART_NAME] + * - [VEN_ART_PRICE] + * - [VEN_ART_QUANT] + * - [VEN_ART_TVA_CODE] + * - [VEN_ART_TVA_AMOUNT] + * - [VEN_ART_STOCK_CODE] + * - [VEN_HTVA] + * - [VEN_TVAC] + * - [VEN_TVA] + * - [TOTAL_VEN_HTVA] + */ + case 'MARCH_NEXT': + $counter++; + $r=''; + break; + + case 'VEN_ART_NAME': + extract ($_POST); + $id='e_march'.$counter; + // check if the march exists + if ( ! isset (${$id})) return ""; + // check that something is sold + if ( ${'e_march'.$counter.'_sell'} != 0 && ${'e_quant'.$counter} != 0 ) + { + $f=new fiche($this->db); + $f->GetByQCode(${$id},false); + $r=$f->strAttribut(ATTR_DEF_NAME); + } else $r = ""; + break; + + case 'VEN_ART_PRICE': + extract ($_POST); + $id='e_march'.$counter.'_sell' ; + if ( !isset (${$id}) ) return ""; + $r=${$id}; + break; + + case 'VEN_ART_TVA_CODE': + extract ($_POST); + $id='e_march'.$counter.'_tva_id'; + if ( !isset (${$id}) ) return ""; + $r=${$id}; + break; + + case 'VEN_ART_TVA_LABEL': + extract ($_POST); + $id='e_march'.$counter.'_tva_id'; + if ( !isset (${$id}) ) return ""; + $tva=GetTvaRate($this->db,${$id}); + if ( $tva == null || $tva==0 ) return ""; + $r=$tva['tva_label']; + break; + + + case 'VEN_ART_TVA_AMOUNT': + extract ($_POST); + $qt='e_quant'.$counter; + $price='e_march'.$counter.'_sell' ; + $tva='e_march'.$counter.'_tva_id'; + if ( !isset (${'e_march'.$counter}) ) return ""; + // check that something is sold + if ( ${'e_march'.$counter.'_sell'} == 0 && ${'e_quant'.$counter} == 0 ) + return ""; + $a_tva=GetTvaRate($this->db,${$tva}); + // if no vat returns 0 + if ( $a_tva == null || $a_tva == 0 ) return 0; + $r=round($price,2)*$qt*$a_tva['tva_rate']; + $r=round($r,2); + break; + + case 'VEN_ART_QUANT': + extract ($_POST); + $id='e_quant'.$counter; + if ( !isset (${$id}) ) return ""; + // check that something is sold + if ( ${'e_march'.$counter.'_sell'} == 0 && ${'e_quant'.$counter} == 0 ) + return ""; + $r=${$id}; + break; + + case 'VEN_HTVA': + extract ($_POST); + $id='e_march'.$counter.'_sell' ; + $quant='e_quant'.$counter; + // check that something is sold + if ( ${'e_march'.$counter.'_sell'} == 0 && ${'e_quant'.$counter} == 0 ) + return ""; + /*!\todo verify that price and quant are numeric + */ + /*!\todo carefull round problem ? + */ + + $r=round(${$id}*${$quant},2); + break; + + case 'VEN_TVAC': + extract ($_POST); + $id='e_march'.$counter.'_sell' ; + $quant='e_quant'.$counter; + // check that something is sold + if ( ${'e_march'.$counter.'_sell'} == 0 && ${'e_quant'.$counter} == 0 ) + return ""; + /*!\todo verify that price and quant are numeric + */ + /*!\todo carefull round problem ? + */ + $r=${$id}*${$quant}; + $tva=GetTvaRate($this->db,${'e_march'.$counter.'_tva_id'}); + // if there is no vat we return now + if ( $tva == null || $tva == 0 ) return $r; + // we compute with the vat included + $r=$r+$tva['tva_rate']; + $r=round($r,2); + break; + case 'TOTAL_VEN_HTVA': + extract($_POST); + $sum=0.0; + for ($i=0;$i<$nb_item;$i++) + { + $sum+=${'e_march'.$i.'_sell'}*$e{'e_quant'.$i}; + } + $r=round($sum,2); + break; + case 'TOTAL_VEN_TVAC': + extract($_POST); + $sum=0.0; + for ($i=0;$i<$nb_item;$i++) + { + $tva=GetTvaRate($this->db,${'e_march'.$i.'_tva_id'}); + $tva_rate=( $tva == null || $tva == 0 )?0.0:$tva['tva_rate']; + $sum+=${'e_march'.$i.'_sell'}*${'e_quant'.$i}*(1+$tva_rate); + } + $r=round($sum,2); + + break; + + } + return $r; + } + + +} \ No newline at end of file diff --git a/include/class_document_modele.php b/include/class_document_modele.php new file mode 100644 index 000000000..c2efac1e2 --- /dev/null +++ b/include/class_document_modele.php @@ -0,0 +1,283 @@ +cn=$p_cn; + $this->md_id=$p_id; + } + + /*! + ************************************************** + * \brief : show all the stored document_modele. + * return a string containing all the data + * separate by TD & TR tag + * \return table in HTML Code + */ + function myList() { + $sql="select md_id,md_name,dt_value from document_modele join document_type on(dt_id=md_type)"; + $Res=ExecSql($this->cn,$sql); + $all=pg_fetch_all($Res); + if ( pg_NumRows($Res) == 0 ) return ""; + $r='

    '; + $r.=""; + $r.=""; + $r.=""; + foreach ( $all as $row) { + $r.=""; + $r.=""; + $r.=""; + $r.=""; + $r.=""; + $r.=""; + } + $r.="
    Nom TypeFichier Effacer
    "; + $r.=$row['md_name']; + $r.=""; + $r.=$row['dt_value']; + $r.=""; + $r.='Document'; + $r.=""; + $c=new widget("checkbox"); + $c->name="dm_remove_".$row['md_id']; + $r.=$c->IOValue(); + $r.="
    "; + + // need hidden parameter for subaction + $a=new widget("hidden"); + $a->name="sa"; + $a->value="rm_template"; + $r.=$a->IOValue(); + $r.=$a->Submit("rm_template","Effacer la sélection"); + $r.="

    "; + return $r; + } + /*! Save + ************************************************** + * \brief : Save a document_modele in the database, + * if the document_modele doesn't exist yet it will be + * first created (-> insert into document_modele) + * in that case the name and the type must be set + * set before calling Save, the name will be modified + * with FormatString + * + * parm : + * - none + * gen : + * - none + * return: + * - none + */ + function Save() + { + // if name is empty return immediately + if ( trim(strlen($this->md_name))==0) + return; + // Start transaction + StartSql($this->cn); + // Save data into the table invoice + // if $this->md_id == -1 it means it is a new document model + // so first we have to insert it + // the name and the type must be set before calling save + if ( $this->md_id == -1) + { + + // insert into the table document_modele + $this->name=FormatString($this->md_name); + $this->md_id=NextSequence($this->cn,'document_modele_md_id_seq'); + $sql=sprintf("insert into document_modele(md_id,md_name,md_type) + values (%d,'%s',%d)", + $this->md_id,$this->name,$this->md_type); + $Ret=ExecSql($this->cn,$sql); + // create the sequence for this modele of document + $this->md_sequence="document_".NextSequence($this->cn,"document_seq"); + // if start is not equal to 0 and he's a number than the user + // request a number change + if ( $this->start != 0 && isNumber($this->start) == 1 ) + { + $sql="alter sequence seq_doc_type_".$this->md_type." start with ".$this->start; + ExecSql($this->cn,$sql); + } + + } + // Save the file + $new_name=tempnam('/tmp','document_'); + echo_debug('class_document_modele.php',__LINE__,"new name=".$new_name); + if ( strlen ($_FILES['doc']['tmp_name']) != 0 ) + { + if (move_uploaded_file($_FILES['doc']['tmp_name'], + $new_name)) + { + // echo "Image saved"; + $oid= pg_lo_import($this->cn,$new_name); + if ( $oid == false ) + { + echo_error('class_document_modele.php',__LINE__,"cannot upload document"); + Rollback($cn); + return; + } + echo_debug('class_document_modele.php',__LINE__,"Loading document"); + // Remove old document + $ret=ExecSql($this->cn,"select md_lob from document_modele where md_id=".$this->md_id); + if (pg_num_rows($ret) != 0) + { + $r=pg_fetch_array($ret,0); + $old_oid=$r['md_lob']; + if (strlen($old_oid) != 0) + pg_lo_unlink($this->cn,$old_oid); + } + // Load new document + var_dump($_FILES); + ExecSql($this->cn,"update document_modele set md_lob=".$oid.", md_mimetype='".$_FILES['doc']['type']."' ,md_filename='".$_FILES['doc']['name']."' where md_id=".$this->md_id); + Commit($this->cn); + } + else + { + echo "

    Error

    "; + Rollback($this->cn); + exit; + } + } + } + /*! + * \brief Remove a template + * \return nothing + */ + function Delete() + { + StartSql($this->cn); + // first we unlink the document + $sql="select md_lob from document_modele where md_id=".$this->md_id; + $res=ExecSql($this->cn,$sql); + $r=pg_fetch_array($res,0); + // if a lob is found + if ( strlen ($r['md_lob']) != 0 ) + { + // we remove it first + pg_lo_unlink($r['md_lob']); + } + // now we can delete the row + $sql="delete from document_modele where md_id =".$this->md_id; + $sql=ExecSql($this->cn,$sql); + Commit($this->cn); + } + + /*! + * \brief Parse and remplace the tag in the invoice + * By the value found in quant_sold + * \param p_id is the id of the invoice + * \param p_internal reference (quant_sold qs_internal) + */ + function Get($p_id,$p_internal) + { + // retrieve info from the table invoice + + // retrieve the template and generate document + StartSql($this->cn); + $ret=ExecSql($cn,"select iv_name,iv_file from invoice where iv_id".$this->iv_id); + if ( pg_num_rows ($ret) == 0 ) + return; + $row=pg_fetch_array($ret,0); + //the template is saved into file $tmp + $tmp=tempnam('/tmp/','invoice_'); + pg_lo_export($cn,$row['iv_file'],$tmp); + // Parse the file + + + + + // send it to stdout + ini_set('zlib.output_compression','Off'); + header("Pragma: public"); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Cache-Control: must-revalidate"); + header('Content-type: rtf/x-application'); + header('Content-Disposition: attachment;filename="invoice'.$p_internal.'.rtf"',FALSE); + header("Accept-Ranges: bytes"); + $file=fopen($tmp,'r'); + while ( !feof ($file) ) + { + echo fread($file,8192); + } + fclose($file); + + unlink ($tmp); + + Commit($cn); + + } + /*! + * \brief show the form for loading a template + * \param p_action for the field action = destination url + * \param + * \param + * + * + * \return string containing the forms + */ + function form($p_action) + { + $r="

    "; + $r.='

    '; + $t=new widget("text"); + $t->name="md_name"; + $r.=" Nom ".$t->IOValue().""; + $r.="Type de document "; + $w=new widget("select"); + $w->name="md_type"; + $w->value=make_array($this->cn,'select dt_id,dt_value from document_type'); + $r.=$w->IOValue(); + $r.="

    "; + $f=new widget("file"); + $f->name="doc"; + $r.="fichier ".$f->IOValue().""; + // we need to add the sub action as hidden + $h=new widget("hidden"); + $h->name="sa"; + $h->value="add_document"; + $r.=$h->IOValue(); + $start=new widget("text"); + $start->name="start_seq"; + $start->size=9; + $start->value="0"; + $r.=" Numerotation commence a ".$start->IOValue().""; + $r.=$w->Submit('add_document','Ajout'); + $r.="

    "; + return $r; + } + +} +?> \ No newline at end of file diff --git a/include/class_fiche.php b/include/class_fiche.php index 9a71bbd26..8f6bd7231 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -19,7 +19,14 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr include_once("class_attribut.php"); - +/*! \file + * \brief define Class fiche and fiche def, those 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 @@ -34,15 +41,11 @@ class fiche_def { $this->id=$p_id; } -/* function GetAttribut +/*! ************************************************** - * Purpose : Get attribut of a fiche_def + * \brief Get attribut of a fiche_def * - * parm : - * - none - * gen : - * - none - * return: + * \return string value of the attribute * none */ function GetAttribut() { @@ -60,18 +63,13 @@ class fiche_def { $t->ad_text=$row['ad_text']; $this->attribut[$i]=$t; } + return $this->attribut; } - /* function Get + /*! ************************************************** - * Purpose : Get attribut of the fiche_def + * \brief Get attribut of the fiche_def * - * parm : - * - none - * gen : - * - none - * return: - * none */ function Get() { if ( $this->id == 0 ) @@ -87,15 +85,11 @@ class fiche_def { $this->fiche_def=$row['frd_id']; $this->create_account=$row['fd_create_account']; } -/* function GetAll +/*! ************************************************** - * Purpose : Get all the fiche_def + * \brief Get all the fiche_def * - * parm : - * - none - * gen : - * - none - * return: an array of fiche_def object + * \return an array of fiche_def object */ function GetAll() { $sql="select * from fiche_def "; @@ -113,30 +107,24 @@ class fiche_def { $this->all[$i]->create_account=$row['fd_create_account']; } } -/* function HasAttribute +/*! ************************************************** - * Purpose : Check in vw_fiche_def if a fiche has + * \brief Check in vw_fiche_def if a fiche has * a attribut X * - * parm : - * - attribut to check - * gen : - * - none - * return: true or false + * + * \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; } -/* function Display +/*! ************************************************** - * Purpose : Display a fiche_def object into a table + * \brief Display a fiche_def object into a table * - * parm : - * - none - * gen : - * - - * return: string + * \return HTML row */ function Display() { @@ -149,20 +137,54 @@ class fiche_def { } } +/*! + * \brief define Class fiche and fiche def, those class are using + * class attribut + */ //////////////////////////////////////////////////////////////////////////////// // class fiche //////////////////////////////////////////////////////////////////////////////// class fiche { - var $cn;// database connection - var $id; // fiche.f_id - var $fiche_def; // fd_id - var $attribut; // array of attribut object + var $cn; /*! \enum $cn database connection */ + var $id; /*! \enum $id fiche.f_id */ + var $fiche_def; /*! \enum $fiche_def fd_id */ + var $attribut; /*! \enum $attribut array of attribut object */ + var $fiche_def_ref; /*!\enum $fiche_def_ref Type of the card here always FICHE_TYPE_CONTACT */ + function fiche($p_cn,$p_id=0) { $this->cn=$p_cn; $this->id=$p_id; } +/*! GetByQCode($p_qcode) + * \brief Retrieve a card thx his quick_code + * complete the object + * \param $p_qcode quick_code (ad_id=23) + * \param $p_all retrieve all the attribut of the card, possible value are true false + * \return 0 success 1 error not found + */ + function GetByQCode($p_qcode,$p_all=true) + { + $p_qcode=FormatString($p_qcode); + $sql="select f_id from jnt_fic_att_value join attr_value + using (jft_id) where ad_id=23 and av_text='".$p_qcode."'"; + $Res=ExecSql($this->cn,$sql); + $r=pg_fetch_all($Res); + if ( sizeof($r) == 0 ) + return 1; + $this->id=$r[0]['f_id']; + echo_debug('class_fiche',__LINE__,'f_id = '.$this->id); + + if ( $p_all ) + $this->getAttribut(); + return 0; + } +/*! + ************************************************** + * \brief get all the attribute of a card, add missing ones + * and sort the array ($this-\>attribut) by ad_id + */ function getAttribut() { if ( $this->id == 0){ return; @@ -213,12 +235,26 @@ class fiche { }//missing attribut } + +/*! + * \brief give the size of a card object + * + * \return size + */ function size() { if ( isset ($this->ad_id)) return sizeof($this->ad_id); else return 0; } + + +/*! + * \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 @@ -240,44 +276,49 @@ class fiche { } return $all; } -/* function GetByDef +/*! ************************************************** - * Purpose : Return array of card from the frd family + * \brief Return array of card from the frd family * - * parm : - * - the fiche_def_ref.frd_id - * gen : - * - - * return: array of fiche object + * \param the fiche_def_ref.frd_id + * \param p_search is a filter on the name + * \param p_sql extra sql condition + * + * \return array of fiche object */ - function CountByDef($p_frd_id) { + function CountByDef($p_frd_id,$p_search="",$p_sql="") { $sql="select * from fiche join fiche_Def using (fd_id) where frd_id=".$p_frd_id; + if ( $p_search != "" ) + { + $a=FormatString($p_search); + $sql="select * from vw_fiche_attr where frd_id=".$p_frd_id. + " and vw_name ~* '$p_search'"; + } - - $Ret=ExecSql($this->cn,$sql); + $Ret=ExecSql($this->cn,$sql.$p_sql); return pg_NumRows($Ret) ; } -/* function GetByDef +/*! ************************************************** - * Purpose : Return array of card from the frd family + * \brief Return array of card from the frd family * - * parm : - * - the fiche_def_ref.frd_id - * gen : - * - - * return: array of fiche object + * + * \param the fiche_def_ref.frd_id + * \param p_search is an optional filter + * + * \return array of fiche object */ - function GetByDef($p_frd_id,$p_offset=-1) { + function GetByDef($p_frd_id,$p_offset=-1,$p_search="") { if ( $p_offset == -1 ) { $sql="select * from fiche join fiche_Def using (fd_id) - where frd_id=".$p_frd_id." order by f_id"; + where frd_id=".$p_frd_id." $p_search order by f_id"; } else { @@ -285,7 +326,7 @@ class fiche { $sql="select * from fiche join fiche_Def using (fd_id) - where frd_id=".$p_frd_id." order by f_id + where frd_id=".$p_frd_id." $p_search order by f_id limit ".$limit." offset ".$p_offset; } @@ -312,20 +353,31 @@ class fiche { " ". $this->attribut_def.""; } -/* function strAttribut +/*! ************************************************** - * Purpose : return the string of the given attribute - * (attr_def.ad_id) - * parm : - * - - * gen : - * - - * return: + * \brief return the string of the given attribute + * (attr_def.ad_id) + * \param the AD_ID from attr_def.ad_id + * \see constant.php + * \return string */ function strAttribut($p_ad_id) { - if ( sizeof ($this->attribut) == 0 ) - return '- ERROR -'; + if ( sizeof ($this->attribut) == 0 ) + { + if ($this->id==0) return '- ERROR -'; + // object is not in memory we need to look into the database + $sql="select av_text from attr_value join jnt_fic_att_value using(jft_id) + where f_id=".$this->id." and ad_id=".$p_ad_id; + $Res=ExecSql($this->cn,$sql); + $row=pg_fetch_all($Res); + // if not found return error + if ( $row == false ) + return ' - ERROR -'; + + return $row[0]['av_text']; + } + foreach ($this->attribut as $e) { if ( $e->ad_id == $p_ad_id ) @@ -333,5 +385,392 @@ class fiche { } return '- ERROR -'; } +/*! + ************************************************** + * \brief insert a new record + * show a blank card to be filled + * + * \param $p_fiche_def is the fiche_def.fd_id + * + * \return HTML Code + */ + function blank($p_fiche_def) + { + // array = array of attribute object sorted on ad_id + $f=new fiche_def($this->cn,$p_fiche_def); + $array=$f->getAttribut(); + $r=''; + foreach ($array as $attr) + { + $msg=""; + if ( $attr->ad_id == ATTR_DEF_ACCOUNT) + { + $r.=JS_SEARCH_POSTE; + $w=new widget("js_search_poste"); + // account created automatically + $sql="select account_auto($p_fiche_def)"; + echo_debug("class_fiche",__LINE__,$sql); + $ret_sql=ExecSql($this->cn,$sql); + $a=pg_fetch_array($ret_sql,0); + if ( $a['account_auto'] == 't' ) + $msg=" "; + + } + elseif ( $attr->ad_id == ATTR_DEF_TVA) + { + $r.=JS_TVA; + $w=new widget("js_tva"); + } + elseif ( $attr->ad_id == ATTR_DEF_COMPANY ) + { + $r.=JS_SEARCH_CARD; + $w=new widget("js_search"); + // filter on frd_id + $w->extra=FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX; + $w->extra2=0; // jrn = 0 + $label=new widget("span"); + $label->name="av_text".$attr->ad_id."_label"; + $msg=$label->IOValue(); + } + else + { + $w=new widget("text"); + } + $w->table=1; + $w->label=$attr->ad_text; + $w->name="av_text".$attr->ad_id; + + $r.="".$w->IOValue()."$msg "; + } + $r.= '
    Rappel: Poste créé automatiquement !
    '; + return $r; + } + + +/*! + ************************************************** + * \brief Display object instance, getAttribute + * sort the attribute and add missing ones + * \param $p_readonly true= if can not modify, otherwise false + * + * + * \return string to display + */ + function Display($p_readonly) + { + $this->GetAttribut(); + $attr=$this->attribut; + + $ret=""; + + foreach ( $attr as $r) + { + $msg=""; + if ( $r->ad_id == ATTR_DEF_ACCOUNT) + { + $ret.=JS_SEARCH_POSTE; + $w=new widget("js_search_poste"); + // account created automatically + $sql="select account_auto($this->fiche_def)"; + echo_debug("class_fiche",__LINE__,$sql); + $ret_sql=ExecSql($this->cn,$sql); + $a=pg_fetch_array($ret_sql,0); +// if ( $a['account_auto'] == 't' ) +// $msg=" "; + } + elseif ( $r->ad_id == ATTR_DEF_TVA) + { + $ret.=JS_TVA; + $w=new widget("js_tva"); + } + elseif ( $r->ad_id == ATTR_DEF_COMPANY ) + { + $ret.=JS_SEARCH_CARD; + $w=new widget("js_search"); + // filter on frd_id + $w->extra=FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX; + $w->extra2=0; // jrn = 0 + $label=new widget("span"); + $label->name="av_text".$r->ad_id."_label"; + $msg=$label->IOValue(); + } + else + { + $w=new widget("text"); + } + + $w->label=$r->ad_text; + $w->value=$r->av_text; + $w->name="av_text".$r->ad_id; + $w->readonly=$p_readonly; + $w->table=1; + + $ret.="".$w->IOValue()."$msg "; + } + $ret.="
    si vide le Poste sera créer automatiquement
    "; + return $ret; + } + /*! + ************************************************** + * \brief Save a card, call insert or update + * + * \param p_fiche_def (default 0) + */ + function Save($p_fiche_def=0) + { + // new card or only a update ? + if ( $this->id == 0 ) + $this->insert($p_fiche_def); + else + $this->update(); + } +/*! + ************************************************** + * \brief insert a new record + * + * \param p_fiche_def fiche_def.fd_id + */ + function insert($p_fiche_def) + { + $fiche_id=NextSequence($this->cn,'s_fiche'); + $this->id=$fiche_id; + // first we create the card + StartSql($this->cn); + $sql=sprintf("insert into fiche(f_id,fd_id)". + " values (%d,%d)", + $fiche_id,$p_fiche_def); + $Ret=ExecSql($this->cn,$sql); + // parse the $_POST array + foreach ($_POST as $name=>$value ) + { + echo_debug ("class_fiche",__LINE__,"Name = $name value $value") ; + list ($id) = sscanf ($name,"av_text%d"); + if ( $id == null ) continue; + echo_debug("class_fiche",__LINE__,"add $id"); + + // Special traitement + // quickcode + if ( $id == ATTR_DEF_QUICKCODE) + { + echo_debug("Modify ATTR_DEF_QUICKCODE"); + $sql=sprintf("select insert_quick_code(%d,'%s')", + $fiche_id,FormatString($value)); + ExecSql($this->cn,$sql); + continue; + } + // name + if ( $id == ATTR_DEF_NAME ) + { + echo_debug("Modify ATTR_DEF_NAME"); + if ( strlen(trim($value)) == 0 ) + $value="pas de nom"; + + } + // account + if ( $id == ATTR_DEF_ACCOUNT ) + { + echo_debug("Modify ATTR_DEF_ACCOUNT"); + $v=FormatString($value); + if ( isNumber($v) == 1 ) + { + $sql=sprintf("select account_insert(%d,%d)", + $this->id,$v); + $Ret=ExecSql($this->cn,$sql); + } + if ( strlen(trim($v))==0 ) + { + $sql=sprintf("select account_insert(%d,null)", + $this->id); + $Ret=ExecSql($this->cn,$sql); + } + + continue; + } + // TVA + if ( $id == ATTR_DEF_TVA ) + { + echo_debug("Modify ATTR_DEF_TVA"); + // Verify if the rate exists, if not then do not update + if ( strlen(trim($value)) != 0 ) + { + if ( CountSql($this->cn,"select * from tva_rate where tva_id=".$value) == 0) + { + echo_debug("class_fiche",__LINE__,"Tva invalide $value"); + continue; + } + } + } + // The contact has a company attribut + if ( $id == ATTR_DEF_COMPANY ) + { + $exist=CountSql($this->cn,"select f_id from fiche join fiche_def using (fd_id) ". + " join jnt_fic_att_value using (f_id) join attr_value using (jft_id) ". + " where frd_id in (8,9,14) and ad_id=".ATTR_DEF_QUICKCODE. + " and av_text='".FormatString($value)."'"); + if ( $exist == 0 ) + { + $value="Attention : pas de société "; + } + } + // Normal traitement + $value2=FormatString($value); + + $sql=sprintf("select attribut_insert(%d,%d,'%s')", + $fiche_id,$id,$value2); + ExecSql($this->cn,$sql); + } + Commit($this->cn); + return; + + + } + + + + /*!\brief update a card + * \todo add a check to return an error and rollback operation + */ + function update() + { + // parse the $_POST array + foreach ($_POST as $name=>$value ) + { + echo_debug ("class_fiche",__LINE__,"Name = $name value $value") ; + list ($id) = sscanf ($name,"av_text%d"); + if ( $id == null ) continue; + echo_debug("class_fiche",__LINE__,"modify $id"); + + // retrieve jft_id to update table attr_value + $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']; + + // Special traitement + // quickcode + if ( $id == ATTR_DEF_QUICKCODE) + { + echo_debug("Modify ATTR_DEF_QUICKCODE"); + $sql=sprintf("select update_quick_code(%d,'%s')", + $jft_id,FormatString($value)); + ExecSql($this->cn,$sql); + continue; + } + // name + if ( $id == ATTR_DEF_NAME ) + { + echo_debug("Modify ATTR_DEF_NAME"); + if ( strlen(trim($value)) == 0 ) + continue; + + } + // account + if ( $id == ATTR_DEF_ACCOUNT ) + { + echo_debug("Modify ATTR_DEF_ACCOUNT"); + $v=FormatString($value); + if ( isNumber($v) == 1 ) + { + $sql=sprintf("select account_update(%d,%d)", + $this->id,$v); + $Ret=ExecSql($this->cn,$sql); + } + if ( strlen (trim($v)) == 0 ) + { + $sql=sprintf("select account_update(%d,null)", + $this->id); + $Ret=ExecSql($this->cn,$sql); + continue; + } + } + // TVA + if ( $id == ATTR_DEF_TVA ) + { + echo_debug("Modify ATTR_DEF_TVA"); + // Verify if the rate exists, if not then do not update + if ( strlen(trim($value)) != 0 ) + { + if ( CountSql($this->cn,"select * from tva_rate where tva_id=".$value) == 0) + { + echo_debug("class_fiche",__LINE__,"Tva invalide $value"); + continue; + } + } + } + if ( $id == ATTR_DEF_COMPANY ) + { + $exist=CountSql($this->cn,"select f_id from fiche join fiche_def using (fd_id) ". + " join jnt_fic_att_value using (f_id) join attr_value using (jft_id) ". + " where frd_id in (8,9,14) and ad_id=".ATTR_DEF_QUICKCODE. + " and av_text='".FormatString($value)."'"); + + + if ( $exist == 0 ) + { + $value="Attention : pas de société "; + } + } + + // Normal traitement + $value2=FormatString($value); + $sql=sprintf("update attr_value set av_text='%s' where jft_id=%d", + $value2,$jft_id); + ExecSql($this->cn,$sql); + } + return; + + } + /*!\brief remove a card + */ + function remove() + { + 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); + + // 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; + } + /*!\brief return the name of a card + */ + function getName() + { + $sql="select av_text from jnt_fic_att_value join attr_value + using (jft_id) where ad_id=1 and f_id=".$this->id; + $Res=ExecSql($this->cn,$sql); + $r=pg_fetch_all($Res); + if ( sizeof($r) == 0 ) + return 1; + return $r[0]['av_text']; + } + /*!\brief Synonum of fiche::getAttribut + */ + function Get() + { + echo_debug('class_client',__LINE__,'Get'); + fiche::getAttribut(); + } + /*!\brief get all the card thanks the fiche_def_ref + * \param $p_offset (default =-1) + * \param $p_search sql condition + * \return fiche::GetByDef + */ + function GetAll($p_offset=-1,$p_search="") + { + return fiche::GetByDef($this->fiche_def_ref,$p_offset,$p_search); + } } ?> \ No newline at end of file diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php index c896f942f..4f52a17e1 100644 --- a/include/class_fiche_def.php +++ b/include/class_fiche_def.php @@ -18,30 +18,35 @@ */ /* $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; // fiche_def_ref.frd_id - var $frd_text; // fiche_def_ref.frd_tex - var $frd_class_base; // fiche_def_ref.frd_class_base - var $attribut; // array which containing list of attr. - // it is used with dynamic variables + 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'); } -/* function LoadAll +/*! ************************************************** - * Purpose : Load all the fiche_def_ref data and + * \brief Load all the fiche_def_ref data and * return an array of fiche_def_ref objects * - * parm : - * - none - * gen : - * - none - * return: array + * \return array */ function LoadAll() { @@ -64,15 +69,11 @@ class fiche_def_ref } return $array; } -/* function Display +/*! ************************************************** - * Purpose : Display data between tag + * \brief Display data between tag * - * parm : - * - none - * gen : - * - - * return: string + * \return string */ function Display() { @@ -83,15 +84,15 @@ class fiche_def_ref } return $r; } -/* function Input +/*! ************************************************** - * Purpose : Input Data between tag + * \brief Input Data between tag * * parm : * - none * gen : * - - * return: string + * \return string */ function Input() { @@ -105,16 +106,13 @@ class fiche_def_ref return $r; } -/* function Save +/*! ************************************************** - * Purpose : Store data into the database: update the + * \brief Store data into the database: update the * record * - * parm : - * - none - * gen : * - - * return: none + * \return none */ function Save() { @@ -123,16 +121,12 @@ class fiche_def_ref " where frd_id=".$this->frd_id; $Res=ExecSql($this->db,$sql); } -/* function Get +/*! ************************************************** - * Purpose : Get the data with the p_code and complete + * \brief Get the data with the p_code and complete * the current object * - * parm : - * - none - * gen : - * - - * return: none + * \return none */ function Get() { diff --git a/include/class_jrn.php b/include/class_jrn.php index 6419e8084..049ad6ee8 100644 --- a/include/class_jrn.php +++ b/include/class_jrn.php @@ -18,7 +18,9 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - +/*!\brief Class for jrn + * + */ class jrn { var $id; var $name; @@ -45,12 +47,12 @@ class jrn { return $ret['jrn_def_name']; } -/* function GetRow - * Purpose : Get The data +/*! \function GetRow + \Brief Get The data * - * parm : + * \param : * - connection - * - array + * - an array * - p_limit starting line * - p_offset number of lines * @@ -221,20 +223,20 @@ class jrn { $a=array($array,$tot_deb,$tot_cred); return $a; } - /* function GetRowSimple + /*! \function GetRowSimple ************************************************** - * Purpose : Get simplified row + \Brief Get simplified row * - * parm : + * \param : * - connection - * - array + * - an array * - p_limit starting line * - p_offset number of lines * * gen : * - none * return: - * - Array with the asked data + * - an Array with the asked data * */ @@ -309,4 +311,21 @@ where $periode $jrn order by jr_date"; return $array; }// end function GetRowSimple -} \ No newline at end of file + +/*! \function GetDefLine + * \Brief Get the number of lines of a journal + * \param $p_cred deb or cred + * + * \return an integer + */ +function GetDefLine($p_cred) +{ + $sql_cred=($p_cred=='cred')?'jrn_cred_max_line':'jrn_deb_max_line'; + $sql="select $sql_cred as value from jrn_def where jrn_def_id=".$this->id; + $r=ExecSql($this->db,$sql); + $Res=pg_fetch_all($r); + echo_debug('class_jrn',__LINE__,$Res); + if ( sizeof($Res) == 0 ) return 1; + return $Res[0]['value']; +} +} diff --git a/include/class_operation.php b/include/class_operation.php index 0a5ec9bc7..42d2a5914 100644 --- a/include/class_operation.php +++ b/include/class_operation.php @@ -18,6 +18,10 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief To remove ? + * \todo obsolete ? then remove + */ //////////////////////////////////////////////////////////////////////////////// // If print is asked diff --git a/include/class_own.php b/include/class_own.php index eaab86391..e4ce3b6c6 100644 --- a/include/class_own.php +++ b/include/class_own.php @@ -18,6 +18,13 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Class to manage the company parameter (address, name...) + */ +/*! + * \brief Class to manage the company parameter (address, name...) + */ + class Own { var $db; // constructor @@ -33,32 +40,24 @@ class Own { } } -/* function UpdateRow +/*! ************************************************** - * Purpose : Update a row + * \brief Update a row * - * parm : - * - give the attribut name - * gen : - * - none - * return: - * -none + * + * \param give the attribut name + * */ function UpdateRow($p_attr) { $value=FormatString($this->{"$p_attr"}); $Res=ExecSql($this->db,"update parameter set pr_value='$value' where pr_id='$p_attr'"); } -/* function Save +/*! ************************************************** - * Purpose : save data + * \brief save data * - * parm : - * - none - * gen : - * - none - * return: - * - nothing + * */ function Save() { $this->UpdateRow('MY_NAME'); diff --git a/include/class_parm_code.php b/include/class_parm_code.php index e440a415b..aa2729090 100644 --- a/include/class_parm_code.php +++ b/include/class_parm_code.php @@ -18,11 +18,20 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Manage the table parm_code which contains the custom parameter + * for the module accountancy + */ +/*! + * \brief Manage the table parm_code which contains the custom parameter + * for the module accountancy + */ + class parm_code { - var $db; // database connection - var $p_code; // parm_code.p_code primary key - var $p_value; // parm_code.p_value - var $p_comment; // parm_code.p_comment + var $db; /*! \enum $db database connection */ + var $p_code; /*! \enum $p_code parm_code.p_code primary key */ + var $p_value; /*! \enum $p_value parm_code.p_value */ + var $p_comment; /*! \enum $p_comment parm_code.p_comment */ // constructor function parm_code($p_cn,$p_id=-1) { @@ -31,17 +40,13 @@ class parm_code { if ( $p_id != -1 ) $this->Get(); } -/* function LoadAll +/*! ************************************************** - * Purpose : + * \brief * Load all parmCode * return an array of parm_code object - * - * parm : - * - none - * gen : - * - - * return: array + * + * \return array */ function LoadAll() { @@ -61,15 +66,11 @@ class parm_code { return $array; } - /* function Save + /*! ************************************************** - * Purpose : update a parm_object into the database + * \brief update a parm_object into the database * p_code is _not_ updatable - * parm : - * - none - * gen : - * - none - * return: + * \return * nothing */ function Save() @@ -85,15 +86,11 @@ class parm_code { "where p_code='".$this->p_code."'"; $Res=ExecSql($this->db,$sql); } -/* function Display +/*! ************************************************** - * Purpose : Display an object, with the tag + * \brief Display an object, with the tag * - * parm : - * - none - * gen : - * - none - * return: + * \return * string */ function Display() @@ -105,16 +102,12 @@ class parm_code { return $r; } -/* function Input +/*! ************************************************** - * Purpose : Display a form to enter info about + * \brief Display a form to enter info about * a parm_code object with the tag * - * parm : - * - none - * gen : - * - none - * return: string + * \return string */ function Input() { @@ -137,17 +130,12 @@ class parm_code { } -/* function Get +/*! ************************************************** - * Purpose : + * \brief * Complete a parm_code object thanks the p_code - * - * parm : - * - none - * gen : - * - - * return: array + * \return array */ function Get() { diff --git a/include/class_poste.php b/include/class_poste.php index f385b4739..ee71ef374 100644 --- a/include/class_poste.php +++ b/include/class_poste.php @@ -18,6 +18,13 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Manage the account + */ +/*! + * \brief Manage the account + */ + class poste { var $db; var $id; @@ -27,17 +34,13 @@ class poste { $this->id=$p_id; } - /* function GetRow - * Purpose : Get dat for poste + /*! + * \brief Get dat for poste * - * parm : - * - connection - * - condition - * -. position - * gen : - * - none - * return: - * - none + * \param $p_from periode from + * \param $p_to end periode + * \return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal) + * (tot_deb,tot_credit * */ function GetRow($p_from,$p_to) @@ -72,6 +75,8 @@ class poste { $this->row=$array; return array($array,$tot_deb,$tot_cred); } + /*!\brief Return the name of a account + */ function GetName() { $ret=pg_exec($this->db, "select pcm_lib from tmp_pcmn where @@ -84,15 +89,11 @@ class poste { } return $this->name; } - /* function GetSolde - * Purpose : give the balance of an account + /*! + * \brief give the balance of an account * - * parm : - * - cond - * gen : - * - none - * return: - * - balance of the account + * \return + * balance of the account * */ function GetSolde($p_cond="") { @@ -111,19 +112,14 @@ function GetSolde($p_cond="") { return abs($r['sum_deb']-$r['sum_cred']); } - /* function GetSoldeDetail - * Purpose : give the balance of an account - * - * parm : - * - cond - * gen : - * - none - * return: - * - balance of the account + /*! + * \brief give the balance of an account + * \return + * balance of the account * */ function GetSoldeDetail($p_cond="") { - if ( $p_cond != "") $p_cond.=" and "; + if ( $p_cond != "") $p_cond=" and ".$p_cond; $Res=ExecSql($this->db,"select sum(deb) as sum_deb, sum(cred) as sum_cred from ( select j_poste, case when j_debit='t' then j_montant else 0 end as deb, diff --git a/include/class_rapport.php b/include/class_rapport.php index 62b9722d3..8559b89e1 100644 --- a/include/class_rapport.php +++ b/include/class_rapport.php @@ -18,15 +18,25 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/*! \file + * \brief Create, view, modify and parse report + */ +/*! + * \brief Class rapport Create, view, modify and parse report + */ + class rapport { - var $db; - var $id; - var $name; + var $db; /*! \enum $db database connx */ + var $id; /*! \enum $id formdef.fr_id */ + var $name; /*! \enum $name report's name */ + /*!\brief Constructor */ function rapport($p_cn,$p_id) { $this->db=$p_cn; $this->id=$p_id; $this->name='UNDEF'; } + /*!\brief Return the report's name + */ function GetName() { $ret=execSql($this->db,"select fr_label from formdef where fr_id=".$this->id); if (pg_NumRows($ret) == 0) return $this->name; @@ -34,7 +44,13 @@ class rapport { $this->name=$a['fr_label']; return $this->name; } - function GetRow($p_start,$p_end) { + /*!\brief return all the row and parse formula + * from a report + * \param $p_start start periode + * \param $p_end end periode + */ + + function GetRow($p_start,$p_end) { $Res=ExecSql($this->db,"select fo_id , fo_fr_id, diff --git a/include/class_user.php b/include/class_user.php index 94f93f0bc..31fcc182d 100644 --- a/include/class_user.php +++ b/include/class_user.php @@ -18,11 +18,16 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/* Class user +/*! \file ************************************************** - * Purpose : + * \brief * Data & function about connected users */ +/*! + * \brief + * Data & function about connected users + */ + include_once("constant.php"); class cl_user { @@ -72,13 +77,8 @@ class cl_user { $this->admin=$row['use_admin']; } } - /*++ - * function : CheckUser - * Parameter : none - * return : not use - * Description : - * Check if user is active and exists in the - * repository + /*! + * \brief Check if user is active and exists in therepository * Automatically redirect * ++*/ @@ -134,15 +134,11 @@ class cl_user { function getJrn() { } -/* function Admin +/*! ************************************************** - * Purpose : Check if an user is an admin + * \brief Check if an user is an admin * - * parm : - * - none - * gen : - * - none - * return: 1 for yes 0 for no + * \return 1 for yes 0 for no */ function Admin() { $res=0; @@ -172,33 +168,24 @@ class cl_user { return false; } -/* function SetPeriode - * Purpose : Set the selected periode in the user's preferences +/*! + * \brief Set the selected periode in the user's preferences * - * parm : - - * - $p_periode - * - $p_user - * gen : - * - none - * return: - * - none + * \param $p_periode periode + * \param - $p_user * */ function SetPeriode($p_periode) { $sql="update user_local_pref set parameter_value='$p_periode' where user_id='$this->id' and parameter_type='PERIODE'"; $Res=ExecSql($this->db,$sql); } -/* function GetPeriode - * Purpose : Get the default periode from the user's preferences +/*! + * \brief Get the default periode from the user's preferences * - * parm : - * - $p_cn connexion - * - $p_user - * gen : - * - none - * return: - * - the default periode + * \param $p_cn connexion + * \param $p_user + * \return the default periode + * * */ @@ -206,17 +193,13 @@ function GetPeriode() { $array=$this->GetPreferences(); return $array['PERIODE']; } -/* function GetPreferences - * Purpose : Get the default user's preferences +/*! + * \brief Get the default user's preferences * - * parm : - * - $p_cn connexion - * - $p_user - * gen : - * - none - * return: - * - none - * + * + * \param $p_cn connexion + * \param $p_user + * \return array of (parameter_type => parameter_value) */ function GetPreferences () { @@ -240,16 +223,13 @@ function GetPreferences () } return $l_array; } -/* function CheckAction - * Purpose : Check if an user is allowed to do an action +/*! + * \brief Check if an user is allowed to do an action * - * parm : - * - p_dossier dossier id - * - p_login user's login - * - p_action_id - * gen : - * - - * return: + * \param p_dossier dossier id + * \param p_login user's login + * \param p_action_id + * \return * - 0 no priv * - 1 priv granted * @@ -265,16 +245,12 @@ function GetPreferences () if ( $Count == 1 ) return 1; echo "

    Invalid action !!! $Count select * from user_sec_act where ua_login='$p_login' and ua_act_id=$p_action_id

    "; } -/* function GetGlobalPref +/*! ************************************************** - * Purpose : Get the global preferences from user_global_pref + * \brief Get the global preferences from user_global_pref * in the account_repository db - * parm : - * - set g_variable - * gen : - * - none - * return: - * - none + * + * \param set g_variable */ @@ -312,16 +288,13 @@ function GetGlobalPref() } } -/* function insert_default_global_pref +/*! ************************************************** - * Purpose : insert default pref + * \brief insert default pref * if no parameter are given insert all the existing * parameter otherwise only the requested - * parm : - * - parameter's type or nothing - * gen : - * - none - * return: nothing + * \param parameter's type or nothing + * */ function insert_default_global_pref($p_type="",$p_value="") { echo_debug('class_user.php',__LINE__,"function insert_default_global_pref"); @@ -347,16 +320,13 @@ function insert_default_global_pref($p_type="",$p_value="") { } -/* function update_global_pref +/*! ************************************************** - * Purpose : update default pref + * \brief update default pref * if value is not given then use the default value - * parm : - * - parameter's type - * - parameter's value value of the type - * gen : - * - none - * return: nothing + * + * \param parameter's type + * \param parameter's value value of the type */ function update_global_pref($p_type,$p_value="") { $default_parameter= array("THEME"=>"Light", diff --git a/include/class_widget.php b/include/class_widget.php index fec7d2ff3..71cc0c64d 100644 --- a/include/class_widget.php +++ b/include/class_widget.php @@ -18,15 +18,32 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*+++ -function widget -purpose create the widget -parameters p_type the type of the widget - p_name name of widget - value widget's value - readonly true or false -+++*/ + +/*! \file + * \brief This class is used to create all the HTML INPUT TYPE + */ + + +/*! + * \brief class widget This class is used to create all the HTML INPUT TYPE + * and some specials which works with javascript like + * js_search + */ class widget { + /*! \enum $type type of the input tag (text, select, files, js_search,...) + * \enum $name name of the input tag + * \enum $value value + * \enum $readonly if set to false cannot modify + * \enum $size size for the text type + * \enum $selected selected value for the radio or select + * \enum $table if we want to make a HTML table row + * \enum $label text before the input tag + * \enum $disabled to disable the type + * \enum $extra depends of the input type + * \enum $extra2 depends of the input type + * \enum $tabindex the tabindex + */ + var $type; var $name; var $value; @@ -55,14 +72,14 @@ class widget { function SetReadOnly($p_read) { $this->readonly=$p_read; } - /* function IOValue($p_name,$p_value="",$p_label="") + /*! function IOValue($p_name,$p_value="",$p_label="") ***************************************************** - * purpose : create the corresponding INPUT tag + * \brief create the corresponding INPUT tag * - * parameters: $p_name is the INPUT NAME - * $p_value is the INPUT VALUE or an array for select - * $p_label is the label of the INPUT - * return : string containing the tag + * \param $p_name is the INPUT NAME + * \param $p_value is the INPUT VALUE or an array for select + * \param $p_label is the label of the INPUT + * \return string containing the tag */ function IOValue($p_name=null,$p_value=null,$p_label="") { @@ -135,8 +152,11 @@ class widget { // Checkbox if (strtoupper($this->type)=="CHECKBOX") { if ( $this->readonly == true) { - $check=( $this->selected==true )?"Yes":"no"; - $r=$check; + $check=( $this->selected==true )?"checked":"unchecked"; + $r='selected==true )?"checked":"unchecked"; $r='type)=="TEXTAREA") { if ( $this->readonly == false ) { - $r='