From 01e9cf80a2aaefac0f2e8a8c0551b5027dd5dc9d Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 13 Jan 2010 14:36:24 +0000 Subject: [PATCH] Merged revisions 2352-2573,2575-2625,2628-2648,2650-2859 via svnmerge from file:///home/developper/svn/phpcompta/branches/rel500_javascript MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ................ r2352 | danydb | 2009-02-20 20:43:25 +0100 (Fri, 20 Feb 2009) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-2351" from svn+ssh://danydb@svn/svn/phpcompta/trunk ................ r2353 | danydb | 2009-02-20 21:34:06 +0100 (Fri, 20 Feb 2009) | 1 line Code cleaning ................ r2363 | danydb | 2009-02-26 19:03:33 +0100 (Thu, 26 Feb 2009) | 41 lines Merged revisions 2352-2362 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2354 | danydb | 2009-02-24 23:16:33 +0100 (Tue, 24 Feb 2009) | 1 line bug add a "All ledger" into the ledger choice for reporting balance ........ r2355 | danydb | 2009-02-25 09:06:00 +0100 (Wed, 25 Feb 2009) | 1 line default value ........ r2356 | danydb | 2009-02-25 09:19:31 +0100 (Wed, 25 Feb 2009) | 1 line fix mini report ........ r2357 | danydb | 2009-02-25 14:18:26 +0100 (Wed, 25 Feb 2009) | 1 line Remove warning about work_mem et use_trans_sid ........ r2358 | danydb | 2009-02-25 16:21:39 +0100 (Wed, 25 Feb 2009) | 1 line Bug ajax ........ r2359 | danydb | 2009-02-25 16:28:28 +0100 (Wed, 25 Feb 2009) | 1 line Cosmetic ........ r2360 | danydb | 2009-02-25 16:29:29 +0100 (Wed, 25 Feb 2009) | 1 line Cosmetic ........ r2361 | danydb | 2009-02-25 16:40:01 +0100 (Wed, 25 Feb 2009) | 2 lines Fix problem with local admin ........ r2362 | danydb | 2009-02-25 18:44:58 +0100 (Wed, 25 Feb 2009) | 1 line Fix bug opening ........ ................ r2364 | danydb | 2009-03-01 20:45:04 +0100 (Sun, 01 Mar 2009) | 4 lines Class widget has been replaced by HtmlInput and children class (as IText, IButton...) Code Cleaning : remove obsolete and unused function ................ r2365 | danydb | 2009-03-01 21:02:30 +0100 (Sun, 01 Mar 2009) | 1 line Rewrite class widget : bug ................ r2368 | danydb | 2009-03-01 23:00:21 +0100 (Sun, 01 Mar 2009) | 13 lines Merged revisions 2363-2367 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2366 | danydb | 2009-03-01 21:29:42 +0100 (Sun, 01 Mar 2009) | 1 line Security ........ r2367 | danydb | 2009-03-01 21:35:57 +0100 (Sun, 01 Mar 2009) | 1 line Security : can_request must not be in a test ........ ................ r2370 | danydb | 2009-03-04 22:18:23 +0100 (Wed, 04 Mar 2009) | 1 line Progress HtmlInput ................ r2371 | danydb | 2009-03-04 22:19:15 +0100 (Wed, 04 Mar 2009) | 9 lines Merged revisions 2368-2370 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2369 | danydb | 2009-03-03 19:02:18 +0100 (Tue, 03 Mar 2009) | 1 line Fix bug class_user.php : the password is not checked in the function checked ........ ................ r2377 | danydb | 2009-03-05 21:21:30 +0100 (Thu, 05 Mar 2009) | 1 line progress class_widget -> class_html_input ................ r2378 | danydb | 2009-03-05 21:24:56 +0100 (Thu, 05 Mar 2009) | 25 lines Merged revisions 2371-2377 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2372 | danydb | 2009-03-05 19:09:13 +0100 (Thu, 05 Mar 2009) | 1 line Bug : all the ledgers are not shown ........ r2373 | danydb | 2009-03-05 19:12:26 +0100 (Thu, 05 Mar 2009) | 1 line Bug : Layout in quick writing ........ r2374 | danydb | 2009-03-05 19:17:31 +0100 (Thu, 05 Mar 2009) | 1 line Add missing file ........ r2375 | danydb | 2009-03-05 19:28:11 +0100 (Thu, 05 Mar 2009) | 1 line Bug : reconciliation not possible ........ r2376 | danydb | 2009-03-05 19:44:02 +0100 (Thu, 05 Mar 2009) | 1 line Bug : can't list unpaid operatio,s in sold ledger ........ ................ r2379 | danydb | 2009-03-06 23:29:01 +0100 (Fri, 06 Mar 2009) | 1 line Progress class_html_input ................ r2380 | danydb | 2009-03-08 20:25:48 +0100 (Sun, 08 Mar 2009) | 1 line Progress class_html_input ................ r2383 | danydb | 2009-03-11 20:03:58 +0100 (Wed, 11 Mar 2009) | 13 lines Merged revisions 2378-2382 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2381 | danydb | 2009-03-11 19:33:03 +0100 (Wed, 11 Mar 2009) | 1 line Erreur rec. ........ r2382 | danydb | 2009-03-11 19:57:57 +0100 (Wed, 11 Mar 2009) | 1 line Erreur rec. in fin ledger ........ ................ r2386 | danydb | 2009-03-14 21:55:08 +0100 (Sat, 14 Mar 2009) | 13 lines Merged revisions 2383-2385 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2384 | danydb | 2009-03-14 21:38:05 +0100 (Sat, 14 Mar 2009) | 2 lines Fix Bug : search for rec. ........ r2385 | danydb | 2009-03-14 21:44:20 +0100 (Sat, 14 Mar 2009) | 1 line Bug : cannot see list financial ........ ................ r2387 | danydb | 2009-03-14 23:36:24 +0100 (Sat, 14 Mar 2009) | 1 line progress class_widget -> class_html_input ................ r2388 | danydb | 2009-03-14 23:43:30 +0100 (Sat, 14 Mar 2009) | 1 line Remove file check_priv.php; all the security API is now is class_user ................ r2391 | danydb | 2009-03-17 18:47:43 +0100 (Tue, 17 Mar 2009) | 3 lines * Input type submit replace by HtmlInput::Submit * Add documentation for javascript ................ r2392 | danydb | 2009-03-17 19:29:25 +0100 (Tue, 17 Mar 2009) | 1 line Fix small bugs ................ r2393 | danydb | 2009-03-17 19:34:49 +0100 (Tue, 17 Mar 2009) | 1 line Documentation fiche_search.php ................ r2394 | danydb | 2009-03-19 17:38:27 +0100 (Thu, 19 Mar 2009) | 2 lines remove a widget object ................ r2395 | danydb | 2009-03-19 17:40:32 +0100 (Thu, 19 Mar 2009) | 2 lines Bug : error with get_list_fiche ................ r2396 | danydb | 2009-03-19 17:43:09 +0100 (Thu, 19 Mar 2009) | 2 lines Bug : typo ................ r2397 | danydb | 2009-03-19 18:07:34 +0100 (Thu, 19 Mar 2009) | 2 lines Bug : wrong next pj ................ r2398 | danydb | 2009-03-19 18:14:15 +0100 (Thu, 19 Mar 2009) | 2 lines infobulle add onmouseover for displaying the infobulle ................ r2399 | danydb | 2009-03-19 18:37:58 +0100 (Thu, 19 Mar 2009) | 3 lines * Remove periode in Ledger, the periode is deduced from the date, it depends of the parameter MY_CHECK_PERIODE * Remove AcException * Ledger Sold is correct ................ r2400 | danydb | 2009-03-19 18:39:47 +0100 (Thu, 19 Mar 2009) | 13 lines Merged revisions 2386-2399 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2389 | danydb | 2009-03-16 21:55:54 +0100 (Mon, 16 Mar 2009) | 2 lines Fix Escape HTML string ........ r2390 | danydb | 2009-03-16 22:00:44 +0100 (Mon, 16 Mar 2009) | 2 lines Bug in security : FIN Ledger confusion between check_action and get_ledger_access ........ ................ r2401 | danydb | 2009-03-19 22:59:56 +0100 (Thu, 19 Mar 2009) | 1 line Bug : Ledger sold with check periode ................ r2402 | danydb | 2009-03-19 23:08:09 +0100 (Thu, 19 Mar 2009) | 1 line Problem sequence ................ r2404 | danydb | 2009-03-21 00:47:30 +0100 (Sat, 21 Mar 2009) | 10 lines Merged revisions 2400-2403 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2403 | danydb | 2009-03-20 21:36:05 +0100 (Fri, 20 Mar 2009) | 3 lines The summary of the amount of the customers with a vat number is now based on the quickcode instead of the accountancy number ........ ................ r2405 | danydb | 2009-03-23 21:32:48 +0100 (Mon, 23 Mar 2009) | 3 lines * IPeriod throw an exception is no rows is found (code != 0) * receipt problem with the numbering of the sequences * SearchCard = the p_jrn is not taken from a hidden elt but must be given ................ r2406 | danydb | 2009-03-23 21:40:15 +0100 (Mon, 23 Mar 2009) | 1 line Fix missing lib ................ r2407 | danydb | 2009-03-23 21:41:27 +0100 (Mon, 23 Mar 2009) | 1 line Fix missing semicol ................ r2408 | danydb | 2009-03-23 21:42:05 +0100 (Mon, 23 Mar 2009) | 1 line Fix missing semicol ................ r2409 | danydb | 2009-03-23 21:44:09 +0100 (Mon, 23 Mar 2009) | 1 line button static cannot be redefined as dynamic ................ r2410 | danydb | 2009-03-23 22:00:11 +0100 (Mon, 23 Mar 2009) | 1 line Prob Numbering receipt ................ r2413 | danydb | 2009-03-24 20:11:01 +0100 (Tue, 24 Mar 2009) | 7 lines * Remove todo (add security, improve documentation,...) * Fix small bugs * class fiche_def : template for adding a cat. of card * Fix bug : add card + button * remove obsolete file : class_widget.php poste.php fiche_inc.php * rename CountSql to count_sql ................ r2414 | danydb | 2009-03-24 20:12:00 +0100 (Tue, 24 Mar 2009) | 13 lines Merged revisions 2404-2413 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2411 | danydb | 2009-03-24 00:48:51 +0100 (Tue, 24 Mar 2009) | 1 line Fix bug when installing for windows ........ r2412 | danydb | 2009-03-24 00:53:18 +0100 (Tue, 24 Mar 2009) | 1 line Update doc windows ........ ................ r2415 | danydb | 2009-03-24 23:17:09 +0100 (Tue, 24 Mar 2009) | 2 lines * ledger purchase fix cosmetic + periode is deduced from date ................ r2416 | danydb | 2009-03-24 23:48:40 +0100 (Tue, 24 Mar 2009) | 2 lines remove the add command in the list ................ r2417 | danydb | 2009-03-24 23:58:35 +0100 (Tue, 24 Mar 2009) | 1 line Remove the button to add a customer or a supplier from the list of s/c ................ r2418 | danydb | 2009-03-25 00:02:31 +0100 (Wed, 25 Mar 2009) | 2 lines Add bug + todo ................ r2419 | danydb | 2009-03-25 00:09:23 +0100 (Wed, 25 Mar 2009) | 1 line Cosmetic change css table.result ................ r2420 | danydb | 2009-03-25 21:05:50 +0100 (Wed, 25 Mar 2009) | 2 lines Add generate_micro ................ r2421 | danydb | 2009-03-26 09:03:57 +0100 (Thu, 26 Mar 2009) | 1 line add domain ................ r2422 | danydb | 2009-03-30 22:45:09 +0200 (Mon, 30 Mar 2009) | 1 line Rewrite of encode sold, usage of template ................ r2423 | danydb | 2009-04-02 13:48:16 +0200 (Thu, 02 Apr 2009) | 3 lines Add microsecond to check if it is a double reload ................ r2424 | danydb | 2009-04-02 14:21:47 +0200 (Thu, 02 Apr 2009) | 1 line Cosmetic in acc_ledger_sold ................ r2425 | danydb | 2009-04-02 15:53:42 +0200 (Thu, 02 Apr 2009) | 1 line transform form fin in template/form_ledger_fin.php ................ r2426 | danydb | 2009-04-02 19:13:27 +0200 (Thu, 02 Apr 2009) | 1 line Correct bug in preference ................ r2427 | danydb | 2009-04-03 10:57:39 +0200 (Fri, 03 Apr 2009) | 2 lines Fix Periode ................ r2428 | danydb | 2009-04-03 12:27:04 +0200 (Fri, 03 Apr 2009) | 7 lines Remove obsolete plpgsql fix bug mini report Improve protection against reload Improve periode in ODS Add Receipt number in ListJrn Fix cosmetic Bug in fiche_new ................ r2429 | danydb | 2009-04-03 13:52:27 +0200 (Fri, 03 Apr 2009) | 2 lines Improve after updating the status paid in ListJrn, we come back to the good screen ................ r2430 | danydb | 2009-04-03 16:39:14 +0200 (Fri, 03 Apr 2009) | 2 lines Bug : the button for searching a Account is not given by IPoste ................ r2431 | danydb | 2009-04-03 17:04:40 +0200 (Fri, 03 Apr 2009) | 2 lines Replace hard coded input type by IButton ................ r2432 | danydb | 2009-04-03 17:06:30 +0200 (Fri, 03 Apr 2009) | 2 lines improve doc ................ r2433 | danydb | 2009-04-03 18:01:58 +0200 (Fri, 03 Apr 2009) | 1 line remove unused line ................ r2434 | danydb | 2009-04-04 01:29:30 +0200 (Sat, 04 Apr 2009) | 4 lines Improve doc Code cleaning remove old function Fix Bug payment by ................ r2440 | danydb | 2009-04-17 13:32:56 +0200 (Fri, 17 Apr 2009) | 25 lines Merged revisions 2414-2439 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2435 | danydb | 2009-04-10 12:41:25 +0200 (Fri, 10 Apr 2009) | 1 line On the welcome page, check if a mini report exist before trying to display it ........ r2436 | danydb | 2009-04-15 23:41:23 +0200 (Wed, 15 Apr 2009) | 1 line Improve add saldo by qcode ........ r2437 | danydb | 2009-04-15 23:48:57 +0200 (Wed, 15 Apr 2009) | 1 line Fix bug in financial ledger, there were no negative saldo ........ r2438 | danydb | 2009-04-16 13:17:14 +0200 (Thu, 16 Apr 2009) | 1 line Fix Bug : financial ledger, first sold is clean ........ r2439 | danydb | 2009-04-17 10:41:02 +0200 (Fri, 17 Apr 2009) | 1 line Fix Bug : in strict mode, when you start a new ledger, there is no last date of operation ........ ................ r2441 | danydb | 2009-04-17 20:28:33 +0200 (Fri, 17 Apr 2009) | 2 lines Fix Bug in impress->balance Variable undefined in IPeriod and Acc_Account::get_lib ................ r2443 | danydb | 2009-04-18 21:41:28 +0200 (Sat, 18 Apr 2009) | 3 lines Improve : permit to see all the ledgers in the listing Improve : the noadd function for SearchCard ................ r2444 | danydb | 2009-04-18 23:57:07 +0200 (Sat, 18 Apr 2009) | 1 line Improve : listing ledger, show all the ledgers ................ r2445 | danydb | 2009-04-19 00:00:24 +0200 (Sun, 19 Apr 2009) | 2 lines Cosmetic ................ r2446 | danydb | 2009-04-19 00:07:54 +0200 (Sun, 19 Apr 2009) | 2 lines Cosmetic : search card must be unique ................ r2447 | danydb | 2009-04-19 00:44:27 +0200 (Sun, 19 Apr 2009) | 1 line Cosmetic ListJrn ................ r2448 | danydb | 2009-04-19 00:52:08 +0200 (Sun, 19 Apr 2009) | 1 line Cosmetic : style sheet ................ r2450 | danydb | 2009-04-24 12:43:52 +0200 (Fri, 24 Apr 2009) | 1 line Adapt svnmerge ................ r2451 | danydb | 2009-04-24 13:14:12 +0200 (Fri, 24 Apr 2009) | 4 lines Fix : IMPORTANT this file doesn't work properly : the problem is the javascript enable_type_periode which makes the from_periode, to_periode, p_step... undefined ................ r2453 | danydb | 2009-04-25 17:47:11 +0200 (Sat, 25 Apr 2009) | 1 line user_menu: no possibility to add card ................ r2454 | danydb | 2009-04-25 17:47:33 +0200 (Sat, 25 Apr 2009) | 9 lines Merged revisions 2450-2453 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2452 | danydb | 2009-04-24 22:52:49 +0200 (Fri, 24 Apr 2009) | 1 line Fix bug in reconciliation in fin ledger ........ ................ r2455 | danydb | 2009-04-27 13:59:58 +0200 (Mon, 27 Apr 2009) | 1 line class_iposte: add table = 2 ................ r2456 | danydb | 2009-04-27 14:00:23 +0200 (Mon, 27 Apr 2009) | 1 line Gestion : start with changes ................ r2457 | danydb | 2009-04-27 14:00:49 +0200 (Mon, 27 Apr 2009) | 1 line class_fiche : fix cosmetic with label ................ r2461 | danydb | 2009-04-28 15:38:59 +0200 (Tue, 28 Apr 2009) | 13 lines Merged revisions 2454-2459 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2458 | danydb | 2009-04-27 16:11:21 +0200 (Mon, 27 Apr 2009) | 2 lines user_menu : change order of the menu ........ r2459 | danydb | 2009-04-28 15:35:06 +0200 (Tue, 28 Apr 2009) | 1 line modify_op : fix bug in CA ........ ................ r2462 | danydb | 2009-04-28 15:40:26 +0200 (Tue, 28 Apr 2009) | 1 line Do not include rev. 2460 due to conflicts ................ r2463 | danydb | 2009-05-20 23:03:25 +0200 (Wed, 20 May 2009) | 1 line Action : remove action from gestion->customer ................ r2464 | danydb | 2009-05-20 23:03:49 +0200 (Wed, 20 May 2009) | 1 line Action : remove action from gestion->customer ................ r2465 | danydb | 2009-05-22 20:43:30 +0200 (Fri, 22 May 2009) | 1 line Customer : start new version with ajax ................ r2467 | danydb | 2009-05-30 19:24:07 +0200 (Sat, 30 May 2009) | 9 lines Merged revisions 2461-2466 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2466 | danydb | 2009-05-30 19:23:04 +0200 (Sat, 30 May 2009) | 2 lines Typo Aciotn -> Action ........ ................ r2468 | danydb | 2009-06-06 20:42:26 +0200 (Sat, 06 Jun 2009) | 1 line Fix property on dia ................ r2469 | danydb | 2009-06-06 20:52:44 +0200 (Sat, 06 Jun 2009) | 1 line Add doc ................ r2470 | danydb | 2009-06-07 15:10:25 +0200 (Sun, 07 Jun 2009) | 1 line Fix problem with todo_list in access page ................ r2472 | danydb | 2009-07-04 20:13:03 +0200 (Sat, 04 Jul 2009) | 1 line Add doc ................ r2473 | danydb | 2009-07-04 20:13:41 +0200 (Sat, 04 Jul 2009) | 9 lines Merged revisions 2471 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2471 | danydb | 2009-07-01 19:48:38 +0200 (Wed, 01 Jul 2009) | 1 line Bug : analytic accountancy in "gestion mode" not possible to update a description ........ ................ r2474 | danydb | 2009-07-06 22:48:34 +0200 (Mon, 06 Jul 2009) | 2 lines Add the warnbulle function ................ r2475 | danydb | 2009-07-06 22:54:07 +0200 (Mon, 06 Jul 2009) | 1 line Add warnbulle + start new design of customer ................ r2476 | danydb | 2009-07-13 23:07:54 +0200 (Mon, 13 Jul 2009) | 1 line Remove obsolete function and start new design ................ r2478 | danydb | 2009-07-15 21:57:03 +0200 (Wed, 15 Jul 2009) | 4 lines Implement the object Database and replace completely the old functions The file postgres.php has been removed ................ r2480 | danydb | 2009-07-16 20:20:48 +0200 (Thu, 16 Jul 2009) | 13 lines Merged revisions 2477,2479 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2477 | danydb | 2009-07-14 21:48:05 +0200 (Tue, 14 Jul 2009) | 1 line Bug : exception instead of new exception ........ r2479 | danydb | 2009-07-16 19:56:40 +0200 (Thu, 16 Jul 2009) | 1 line Fix Bug for Postgresql 8.3 ........ ................ r2481 | danydb | 2009-07-17 00:14:47 +0200 (Fri, 17 Jul 2009) | 1 line Correct test_me ................ r2482 | danydb | 2009-07-28 21:47:08 +0200 (Tue, 28 Jul 2009) | 1 line Documentation ................ r2483 | danydb | 2009-07-28 21:48:14 +0200 (Tue, 28 Jul 2009) | 1 line Doc ................ r2484 | danydb | 2009-07-29 00:25:14 +0200 (Wed, 29 Jul 2009) | 1 line Fix numerous problem due to the new Object Database ................ r2485 | danydb | 2009-07-29 21:43:41 +0200 (Wed, 29 Jul 2009) | 2 lines fix bug value -> label for ibutton ................ r2486 | danydb | 2009-07-30 00:25:36 +0200 (Thu, 30 Jul 2009) | 1 line Catch Exception is no period is open && complete the change to class_database ................ r2487 | danydb | 2009-07-30 01:08:34 +0200 (Thu, 30 Jul 2009) | 5 lines Improve class_iperiode (add 2 variables + doc) fix bug in class_balance add unicode in header_print fix prob. due to new Database objet ................ r2496 | danydb | 2009-08-08 12:34:37 +0200 (Sat, 08 Aug 2009) | 37 lines Merged revisions 2488-2495 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2488 | danydb | 2009-08-05 21:39:43 +0200 (Wed, 05 Aug 2009) | 1 line Skipper : add account label in report ........ r2489 | danydb | 2009-08-05 22:33:29 +0200 (Wed, 05 Aug 2009) | 1 line Add Libelle to Bilan ........ r2490 | danydb | 2009-08-05 23:25:23 +0200 (Wed, 05 Aug 2009) | 2 lines Class_acc_bilan : protect XML ........ r2491 | danydb | 2009-08-05 23:29:58 +0200 (Wed, 05 Aug 2009) | 2 lines class_acc_account : quote problem ........ r2492 | danydb | 2009-08-05 23:41:19 +0200 (Wed, 05 Aug 2009) | 1 line Fix quote problem in line_update and fix header problem in class_acc_bilan::generate_odt ........ r2493 | danydb | 2009-08-06 21:30:35 +0200 (Thu, 06 Aug 2009) | 1 line Add documentation about new tag ........ r2494 | danydb | 2009-08-06 21:45:26 +0200 (Thu, 06 Aug 2009) | 1 line Update Doc Bilan ........ r2495 | danydb | 2009-08-06 21:50:22 +0200 (Thu, 06 Aug 2009) | 1 line remove debug flag ........ ................ r2497 | danydb | 2009-08-08 17:01:43 +0200 (Sat, 08 Aug 2009) | 1 line Database : get_value set the this->ret ................ r2498 | danydb | 2009-08-10 21:47:53 +0200 (Mon, 10 Aug 2009) | 1 line FIX BUG payment method, fix problem when searching or adding ................ r2499 | danydb | 2009-08-11 00:16:08 +0200 (Tue, 11 Aug 2009) | 1 line Improve database abstraction : remove all the pg_ function ................ r2500 | danydb | 2009-08-20 00:06:54 +0200 (Thu, 20 Aug 2009) | 1 line Fix bug in setup.php caused by the new Database obj ................ r2503 | danydb | 2009-08-27 22:10:08 +0200 (Thu, 27 Aug 2009) | 1 line Fix Bug : not possible to grant an access to a ledger for an user (menu -> administration->utilisateur) ................ r2504 | danydb | 2009-08-27 22:16:22 +0200 (Thu, 27 Aug 2009) | 1 line Block rev 2501 ................ r2505 | danydb | 2009-08-27 22:19:07 +0200 (Thu, 27 Aug 2009) | 9 lines Merged revisions 2502 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2502 | danydb | 2009-08-27 21:33:36 +0200 (Thu, 27 Aug 2009) | 2 lines When an invoice is generated, the TVA_LABEL is an empty string is there is no merchandise ........ ................ r2509 | danydb | 2009-08-29 21:11:49 +0200 (Sat, 29 Aug 2009) | 1 line Block the rev 2508 ................ r2510 | danydb | 2009-08-29 21:12:33 +0200 (Sat, 29 Aug 2009) | 13 lines Merged revisions 2506-2507 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2506 | danydb | 2009-08-29 18:04:55 +0200 (Sat, 29 Aug 2009) | 1 line Fix Bug when clicking on pj ........ r2507 | danydb | 2009-08-29 18:05:26 +0200 (Sat, 29 Aug 2009) | 1 line Fix Bug for HTML ........ ................ r2511 | danydb | 2009-08-29 21:16:27 +0200 (Sat, 29 Aug 2009) | 2 lines Fix bug : undefined p_oid in the functions lo_unlinks and lo_export ................ r2512 | danydb | 2009-08-29 21:27:22 +0200 (Sat, 29 Aug 2009) | 1 line Fix Bug : rollback in class_document_modele ................ r2513 | danydb | 2009-08-29 22:21:36 +0200 (Sat, 29 Aug 2009) | 1 line Fix Bug : due to a error into echo_debug it was not possible to create new sale or new purchase ................ r2514 | danydb | 2009-09-02 21:05:04 +0200 (Wed, 02 Sep 2009) | 3 lines remove useless debug info add a __toString method for the database fix small bugs due to the object Database ................ r2516 | danydb | 2009-09-05 18:57:18 +0200 (Sat, 05 Sep 2009) | 2 lines Add a new Widget : IAction ................ r2517 | danydb | 2009-09-10 23:45:04 +0200 (Thu, 10 Sep 2009) | 1 line Replace menu "Contact" by menu "Fiche" ................ r2518 | danydb | 2009-09-11 21:19:37 +0200 (Fri, 11 Sep 2009) | 2 lines Typo change fiche by Fiche ................ r2519 | danydb | 2009-09-11 22:47:27 +0200 (Fri, 11 Sep 2009) | 1 line fix bug : not readonly for Display ................ r2520 | danydb | 2009-09-11 22:48:40 +0200 (Fri, 11 Sep 2009) | 1 line Add new function for counting the number of category by fiche type + fix bug with the button cherche ................ r2521 | danydb | 2009-09-11 22:49:10 +0200 (Fri, 11 Sep 2009) | 1 line fix bug : the Cherche button does not work ................ r2522 | danydb | 2009-09-12 16:12:04 +0200 (Sat, 12 Sep 2009) | 1 line Add a new HTML Widget IAction ................ r2523 | danydb | 2009-09-12 18:02:27 +0200 (Sat, 12 Sep 2009) | 7 lines Customer changes : ================== Add new layout Add new customer card Add new customer category improve Customer::Summary ................ r2524 | danydb | 2009-09-12 18:10:43 +0200 (Sat, 12 Sep 2009) | 2 lines Change class action by class Action ................ r2525 | danydb | 2009-09-13 22:46:35 +0200 (Sun, 13 Sep 2009) | 1 line Set 2 times the same variable $l_sessid + correct indent ................ r2527 | danydb | 2009-09-16 22:45:18 +0200 (Wed, 16 Sep 2009) | 7 lines Improve "Suivi Courrier" ====================== * the document::d_state containing the status is replaced by action::ag_state * It is now possible to add several documents to an action * There is no longer one 'Expediteur' and one 'Destinataire', it is replaced by one card ................ r2529 | danydb | 2009-09-17 19:30:12 +0200 (Thu, 17 Sep 2009) | 2 lines change get_array, returns an empty array if nothing is found ................ r2530 | danydb | 2009-09-17 23:28:34 +0200 (Thu, 17 Sep 2009) | 15 lines Improve "Suivi Courrier" ======================== * Change f_id : now we can a SQL where clause, it fixed a bug with suivi client * Add several documents * Remove Document thanks javascript (file scripts + show_document.php) * Remove all the documents of a deleted action * Not longer a blank document when adding an action * Improve Layout of "Suivi Courrier" * remove Rich text widget which is replace by a textarea * the state of an action is in action and not longer in document * Remove Destinataire and Expediteur, replaced by only one * Add / update / delete action is one step ................ r2531 | danydb | 2009-09-17 23:29:53 +0200 (Thu, 17 Sep 2009) | 2 lines Improve the button_href, which looks now as IAction + doc ................ r2532 | danydb | 2009-09-17 23:58:37 +0200 (Thu, 17 Sep 2009) | 2 lines Add a concerned link in Action::Display ................ r2533 | danydb | 2009-09-18 00:13:59 +0200 (Fri, 18 Sep 2009) | 1 line Place the return button inside the fieldset ................ r2534 | danydb | 2009-09-18 15:08:17 +0200 (Fri, 18 Sep 2009) | 2 lines Database::get_value print a warning if returns more than one value ................ r2535 | danydb | 2009-09-18 20:27:03 +0200 (Fri, 18 Sep 2009) | 3 lines datatabase::get_value returns a warning if several values are returns, it gives a bug for the function limit_year ................ r2536 | danydb | 2009-09-18 21:53:32 +0200 (Fri, 18 Sep 2009) | 2 lines Bug in fiche_search when using the type [SQL] in the filter for the card ................ r2537 | danydb | 2009-09-18 21:59:21 +0200 (Fri, 18 Sep 2009) | 2 lines Inn exec_sql the array is printed if the pg_query fails ................ r2538 | danydb | 2009-09-18 23:30:16 +0200 (Fri, 18 Sep 2009) | 2 lines Suivi courrier : generate the document and add a draft for the items to sell / order / deliver ................ r2539 | danydb | 2009-09-18 23:38:55 +0200 (Fri, 18 Sep 2009) | 1 line suivi_courrier change f_id_exp by f_id_dest ................ r2540 | danydb | 2009-09-18 23:49:19 +0200 (Fri, 18 Sep 2009) | 14 lines table action_gestion --------------------- * remove col. f_id_exp * add col. ag_state * add a trigger to cut the col. ag_title to 70 char Function account_parent ----------------------- fix bug : exit loop when a account parent is found table invoice drop because useless table parm_code add code SUPPLIER drop useless function insert_quant_purchase, insert_quant_sold add index for jrn(jr_mt) (double encoding detection) ................ r2545 | danydb | 2009-09-19 18:19:27 +0200 (Sat, 19 Sep 2009) | 1 line Improve layout of form for adding/modifying an action ................ r2546 | danydb | 2009-09-20 00:11:05 +0200 (Sun, 20 Sep 2009) | 11 lines Suivi client ======= Add the owner to the table ag_action Add the hours (format HH:MM) and a javascript to check the format Add the affected to Add a flag if the action have to be seen in the calendar filter the list thanks the cloture or note change ag_state to 'to be done, done, to follow, cancel' Highlight the High priority in the list ................ r2547 | danydb | 2009-09-20 00:11:43 +0200 (Sun, 20 Sep 2009) | 1 line Improve appereance of generated documentation ................ r2548 | danydb | 2009-09-20 00:12:37 +0200 (Sun, 20 Sep 2009) | 1 line function get_by_qcode If it is not possible to find the quick_code of card then his id is 0 ................ r2549 | danydb | 2009-09-20 00:26:34 +0200 (Sun, 20 Sep 2009) | 1 line Fix bug in search card and change cosmetic in Action::Display for ag_ref_ag_ref_id ................ r2550 | danydb | 2009-09-20 00:52:11 +0200 (Sun, 20 Sep 2009) | 1 line Suivi courrier : show only my action ................ r2551 | danydb | 2009-09-20 21:05:09 +0200 (Sun, 20 Sep 2009) | 1 line Suivi courrier : Add the contact in the action form (ag_action) ................ r2552 | danydb | 2009-09-26 21:12:45 +0200 (Sat, 26 Sep 2009) | 1 line FIX : remove a small cosmetic bugs ................ r2553 | danydb | 2009-09-26 21:15:36 +0200 (Sat, 26 Sep 2009) | 1 line DOC : add documentation ................ r2554 | danydb | 2009-09-26 21:16:47 +0200 (Sat, 26 Sep 2009) | 4 lines IMPROVE : when a card is found the label is updated, there is a test (tagName) to determine if we have to use innerHTML or value ................ r2555 | danydb | 2009-09-26 21:17:41 +0200 (Sat, 26 Sep 2009) | 1 line Remove XML output in Doxygen ................ r2560 | danydb | 2009-10-03 01:28:30 +0200 (Sat, 03 Oct 2009) | 1 line Infobulle : add example ................ r2561 | danydb | 2009-10-03 01:31:50 +0200 (Sat, 03 Oct 2009) | 1 line Class fiche : rewrite code for get_by_qcode ................ r2562 | danydb | 2009-10-03 01:33:46 +0200 (Sat, 03 Oct 2009) | 1 line Style sheet add span action ................ r2563 | danydb | 2009-10-03 01:35:16 +0200 (Sat, 03 Oct 2009) | 1 line Class document : remove waiting message when generating a document ................ r2564 | danydb | 2009-10-03 01:35:50 +0200 (Sat, 03 Oct 2009) | 1 line update document schema ................ r2565 | danydb | 2009-10-03 01:36:43 +0200 (Sat, 03 Oct 2009) | 5 lines Suivi ===== Finished the new layout of follow up ................ r2566 | danydb | 2009-10-03 01:37:22 +0200 (Sat, 03 Oct 2009) | 1 line Suivi client add List action ................ r2567 | danydb | 2009-10-03 01:46:08 +0200 (Sat, 03 Oct 2009) | 9 lines Merged revisions 2515 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2515 | danydb | 2009-09-04 21:44:42 +0200 (Fri, 04 Sep 2009) | 1 line For the bilan, fix partially a bug in the html headers for OOo document and allowed the use of the numeric format in ods document (from Bertrand) ........ ................ r2568 | danydb | 2009-10-03 01:52:20 +0200 (Sat, 03 Oct 2009) | 30 lines Merged revisions 2526,2528,2541,2543,2558-2559 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/trunk ........ r2526 | danydb | 2009-09-14 23:21:41 +0200 (Mon, 14 Sep 2009) | 1 line Fix Bug with the todo list, in the "Accueil" if there several line in a todo list, you cannot modify it ........ r2528 | danydb | 2009-09-17 16:44:14 +0200 (Thu, 17 Sep 2009) | 4 lines Changement to let the user to enter manually the vat amount in the Ledger of sold. It must be tested and accepted ........ r2541 | danydb | 2009-09-19 00:53:18 +0200 (Sat, 19 Sep 2009) | 2 lines bug : impress->poste give duplicate if the same card is used several times in an operation ........ r2543 | danydb | 2009-09-19 01:14:36 +0200 (Sat, 19 Sep 2009) | 1 line Revert the change from rev 2528 about the manual encoding of vat in sold ledger ........ r2558 | danydb | 2009-09-28 22:08:01 +0200 (Mon, 28 Sep 2009) | 1 line fix bug postgresql 8.3 : the restart sequence must be > 1 ........ r2559 | danydb | 2009-09-28 22:09:11 +0200 (Mon, 28 Sep 2009) | 2 lines FIX BUG in sql_filter_per for the centralized printing ........ ................ r2570 | danydb | 2009-10-07 23:34:28 +0200 (Wed, 07 Oct 2009) | 8 lines Blocked revisions 2569 via svnmerge ........ r2569 | danydb | 2009-10-07 23:27:49 +0200 (Wed, 07 Oct 2009) | 2 lines Fix problem when multiple lines ........ ................ r2571 | danydb | 2009-10-08 00:09:28 +0200 (Thu, 08 Oct 2009) | 1 line Fix Bug : decode uri ................ r2572 | danydb | 2009-10-08 00:41:04 +0200 (Thu, 08 Oct 2009) | 3 lines Add the PHP function encodeURI decodeURI to match the behaviour of those functions in javascript ................ r2573 | danydb | 2009-10-08 19:54:23 +0200 (Thu, 08 Oct 2009) | 6 lines ********************************************************************** create a branch for the rewrite of javascript ********************************************************************** ................ r2575 | danydb | 2009-10-08 21:02:08 +0200 (Thu, 08 Oct 2009) | 1 line javascript : Remove useless files and regroup differently ................ r2576 | danydb | 2009-10-09 00:36:13 +0200 (Fri, 09 Oct 2009) | 1 line Rename search_post to account_item + code rewriting ................ r2577 | danydb | 2009-10-09 00:36:27 +0200 (Fri, 09 Oct 2009) | 1 line Rename search_post to account_item + code rewriting ................ r2578 | danydb | 2009-10-09 00:36:49 +0200 (Fri, 09 Oct 2009) | 1 line Rename search_card to card + code rewriting ................ r2579 | danydb | 2009-10-09 00:38:02 +0200 (Fri, 09 Oct 2009) | 1 line put ajax op into anc_script ................ r2580 | danydb | 2009-10-09 00:40:14 +0200 (Fri, 09 Oct 2009) | 1 line Add the Ajax object + encodeJSON function ................ r2581 | danydb | 2009-10-09 00:40:39 +0200 (Fri, 09 Oct 2009) | 1 line rewrite code ................ r2582 | danydb | 2009-10-09 00:42:37 +0200 (Fri, 09 Oct 2009) | 2 lines Remove obsolete javascript file and test for javascript into test.php ................ r2584 | danydb | 2009-10-17 14:49:41 +0200 (Sat, 17 Oct 2009) | 1 line ReAdd prototype.js ................ r2585 | danydb | 2009-10-17 16:47:44 +0200 (Sat, 17 Oct 2009) | 2 lines access : Fix size report for IE ................ r2586 | danydb | 2009-10-17 17:16:58 +0200 (Sat, 17 Oct 2009) | 4 lines Sort and regroup the javascript Replace PNG image with GIF image for compatibility with IE Modify CSS for compatibility with IE ................ r2587 | danydb | 2009-10-17 17:18:25 +0200 (Sat, 17 Oct 2009) | 9 lines Merged revisions 2583 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/branches/rel500 ........ r2583 | danydb | 2009-10-14 23:41:11 +0200 (Wed, 14 Oct 2009) | 1 line Add the function encodeURI to avoid problem with JSON ........ ................ r2588 | danydb | 2009-10-17 17:26:43 +0200 (Sat, 17 Oct 2009) | 2 lines Fix Bug with the add button ................ r2589 | danydb | 2009-10-17 19:01:10 +0200 (Sat, 17 Oct 2009) | 1 line Remove obsolete image files ................ r2590 | danydb | 2009-10-19 19:46:21 +0200 (Mon, 19 Oct 2009) | 2 lines Modify echo_error ................ r2596 | danydb | 2009-10-20 23:34:31 +0200 (Tue, 20 Oct 2009) | 3 lines FIX IE 7 Cosmetic BUG Avoid connection with IE6 Add the ipopupsearchcard ................ r2597 | danydb | 2009-10-21 14:56:29 +0200 (Wed, 21 Oct 2009) | 1 line Add new version of prototype ................ r2599 | danydb | 2009-10-24 18:16:43 +0200 (Sat, 24 Oct 2009) | 2 lines Doc ................ r2600 | danydb | 2009-10-25 11:22:04 +0100 (Sun, 25 Oct 2009) | 1 line Add create_script and js_include function ................ r2601 | danydb | 2009-10-25 11:23:29 +0100 (Sun, 25 Oct 2009) | 3 lines Finished the autocomplete feature for the ledger of sales ................ r2602 | danydb | 2009-10-25 11:34:45 +0100 (Sun, 25 Oct 2009) | 1 line Update Documentation ................ r2603 | danydb | 2009-10-25 12:19:40 +0100 (Sun, 25 Oct 2009) | 2 lines Cosmetic : add a limit for autocomplete card (12) ................ r2604 | danydb | 2009-10-25 13:44:06 +0100 (Sun, 25 Oct 2009) | 1 line Delay to be redirected is reduce to 1 sec ................ r2605 | danydb | 2009-10-25 18:11:50 +0100 (Sun, 25 Oct 2009) | 8 lines This version contains the icard with autocomplete working Only implemented in Ledger of sale Some bugs and questions remain * the payment by must be improved * verify if the tva_id is updated * Nothing happens if we don't selected in the hint list ................ r2606 | danydb | 2009-10-25 18:22:50 +0100 (Sun, 25 Oct 2009) | 3 lines Autocomplete in Ledger of sales Improve ICard : add an onchange event ................ r2607 | danydb | 2009-10-25 18:33:58 +0100 (Sun, 25 Oct 2009) | 8 lines Autocomplete in Ledger of sales Improve ICard ============= * add an error message if the card is not found when card is not selected into the list * remove the animated indicator ................ r2608 | danydb | 2009-10-25 18:37:44 +0100 (Sun, 25 Oct 2009) | 2 lines Fix small bug due the removal of the animation ................ r2609 | danydb | 2009-10-27 14:23:23 +0100 (Tue, 27 Oct 2009) | 1 line add phpcompta_psql_host is the config_file, this variable is the postgresql host in case it is not in local, fix the return carriage for windows ................ r2611 | danydb | 2009-10-27 21:42:41 +0100 (Tue, 27 Oct 2009) | 1 line Add variable phpcompta_psql_host in config.inc.php ................ r2612 | danydb | 2009-10-27 21:45:10 +0100 (Tue, 27 Oct 2009) | 8 lines Blocked revisions 2610 via svnmerge ........ r2610 | danydb | 2009-10-27 21:07:16 +0100 (Tue, 27 Oct 2009) | 1 line add variable phpcompta_psql_host to set the postgres server on another server ........ ................ r2613 | danydb | 2009-10-27 21:47:44 +0100 (Tue, 27 Oct 2009) | 2 lines Add script.aculous script ................ r2614 | danydb | 2009-10-27 22:14:15 +0100 (Tue, 27 Oct 2009) | 2 lines get_by_qcode remove the heading and trailing space ................ r2615 | danydb | 2009-10-27 22:42:32 +0100 (Tue, 27 Oct 2009) | 2 lines Remove trailing and heading space for insert_quant_purchase and insert_quant_sold ................ r2616 | danydb | 2009-10-27 22:46:26 +0100 (Tue, 27 Oct 2009) | 1 line Fix bug : if there is no file to upload, returns immediately ................ r2617 | danydb | 2009-10-27 22:46:54 +0100 (Tue, 27 Oct 2009) | 1 line Add documentation ................ r2618 | danydb | 2009-10-27 22:48:14 +0100 (Tue, 27 Oct 2009) | 1 line Autocomplete in Ledger of purchase, still missing : detail and add card ................ r2619 | danydb | 2009-10-28 12:08:19 +0100 (Wed, 28 Oct 2009) | 4 lines For the auto complete, we can now seek in the quick_code, in the name and in the description the part of string which is found is in bold Those feature must tested ................ r2620 | danydb | 2009-10-28 15:34:34 +0100 (Wed, 28 Oct 2009) | 3 lines * Change the function Acc_Ledger_Purchase::display_form by Acc_Ledger_Purchase::input * change the name of form_ledger ................ r2621 | danydb | 2009-10-28 15:35:10 +0100 (Wed, 28 Oct 2009) | 1 line Remove form_ledger_detail.php ................ r2622 | danydb | 2009-10-28 15:35:42 +0100 (Wed, 28 Oct 2009) | 1 line Rename form_ledger_ven.php to form_ledger_detail.php ................ r2623 | danydb | 2009-10-28 22:26:04 +0100 (Wed, 28 Oct 2009) | 6 lines Make the search in description qcode or name Add ICard autocomplete to : - Financial ledger - Gestion : details ................ r2625 | danydb | 2009-10-28 23:30:49 +0100 (Wed, 28 Oct 2009) | 2 lines ICard autocomplete : add the price ................ r2628 | danydb | 2009-10-31 02:42:15 +0100 (Sat, 31 Oct 2009) | 10 lines Improve the facture HTML in the contrib Fix bug in generate invoice Manual VAT amount in the ledger of sales Add ICard to Ledger Sales, purchase and fin Rewrite of javascript for ledger Ledger purchase use template Fix prob with infobulle in FIN ledger Improve ICard and make it work with IE7 and IE8 Improve support of IE7 and IE8 ................ r2629 | danydb | 2009-10-31 03:03:43 +0100 (Sat, 31 Oct 2009) | 4 lines Add ajax_saldo Fix bug with amount computing Improve CSS : input text with 2 px of margin ................ r2630 | danydb | 2009-10-31 13:17:05 +0100 (Sat, 31 Oct 2009) | 2 lines Set redirect if disconnected to 1 sec ................ r2631 | danydb | 2009-10-31 20:07:10 +0100 (Sat, 31 Oct 2009) | 1 line rewrite of the listing of ledger, with a hidden div for the search ................ r2632 | danydb | 2009-10-31 20:32:08 +0100 (Sat, 31 Oct 2009) | 1 line Add name of ledger into list_operation ................ r2633 | danydb | 2009-10-31 20:33:39 +0100 (Sat, 31 Oct 2009) | 1 line Add search form for ledger ................ r2634 | danydb | 2009-10-31 20:39:13 +0100 (Sat, 31 Oct 2009) | 2 lines Add documentation for new functions ................ r2635 | danydb | 2009-11-01 12:44:56 +0100 (Sun, 01 Nov 2009) | 7 lines search : * by default the search is on the default period, * move openrecherche into scripts * search ok for list VEN ACH ALL * rewrite of recherche.php * deprecated function showMenuRecherche ................ r2636 | danydb | 2009-11-01 12:54:12 +0100 (Sun, 01 Nov 2009) | 3 lines Add in attr_def a nr of customer by default Clean code constant.php ................ r2637 | danydb | 2009-11-01 14:26:52 +0100 (Sun, 01 Nov 2009) | 2 lines Icard + new search : working for quick_writing ................ r2638 | danydb | 2009-11-01 14:43:31 +0100 (Sun, 01 Nov 2009) | 2 lines remove debug info ................ r2639 | danydb | 2009-11-01 17:48:39 +0100 (Sun, 01 Nov 2009) | 3 lines For each ledger it is now possible to see the details of card when double-clicking on the field ................ r2640 | danydb | 2009-11-01 18:34:02 +0100 (Sun, 01 Nov 2009) | 2 lines todo : bug IE cannot solved : bad position IPOPUP ................ r2641 | danydb | 2009-11-01 18:34:41 +0100 (Sun, 01 Nov 2009) | 1 line Try to fix problem with IE, IPopup does not WORK !! ................ r2642 | danydb | 2009-11-01 19:00:24 +0100 (Sun, 01 Nov 2009) | 1 line Fix position IPopup for card ................ r2643 | danydb | 2009-11-01 19:55:26 +0100 (Sun, 01 Nov 2009) | 1 line Fix Problem IE with XML handling; add INum in each ledger ................ r2644 | danydb | 2009-11-01 22:12:40 +0100 (Sun, 01 Nov 2009) | 2 lines Improve cosmetic ................ r2645 | danydb | 2009-11-02 17:36:14 +0100 (Mon, 02 Nov 2009) | 3 lines Add a button for adding card inside a ledger form, there is no popup window any more for adding a card ................ r2650 | danydb | 2009-11-03 23:27:30 +0100 (Tue, 03 Nov 2009) | 1 line ICard : add a new static method for creating the IPopup ICard::ipopup() ................ r2651 | danydb | 2009-11-04 00:46:05 +0100 (Wed, 04 Nov 2009) | 1 line Change javascript for IE compatibility for adding row in table ................ r2652 | danydb | 2009-11-04 10:20:48 +0100 (Wed, 04 Nov 2009) | 1 line Rename button_href to button_anchor ................ r2654 | danydb | 2009-11-04 10:29:07 +0100 (Wed, 04 Nov 2009) | 3 lines Removed merge tracking for "svnmerge" for file:///home/developper/svn/phpcompta/branches/rel500 ................ r2657 | danydb | 2009-11-04 10:56:21 +0100 (Wed, 04 Nov 2009) | 1 line Update Changelog svn2cl -r 2351:HEAD, 2351 was the start on rel500 branch ................ r2658 | danydb | 2009-11-04 18:30:35 +0100 (Wed, 04 Nov 2009) | 4 lines Javascript prob. Put the javascript script file in the top of the file ................ r2659 | danydb | 2009-11-04 18:33:19 +0100 (Wed, 04 Nov 2009) | 4 lines Rename ajax_get.php to ajax_card.js ................ r2660 | danydb | 2009-11-04 19:36:52 +0100 (Wed, 04 Nov 2009) | 2 lines complete documentation of ajax_card ................ r2661 | danydb | 2009-11-04 19:57:36 +0100 (Wed, 04 Nov 2009) | 2 lines add the function escape_xml ................ r2662 | danydb | 2009-11-05 16:14:02 +0100 (Thu, 05 Nov 2009) | 1 line Remove useless comment ................ r2663 | danydb | 2009-11-05 21:34:52 +0100 (Thu, 05 Nov 2009) | 6 lines Improve IPopup -------------- Add the draggable feature for all ipopup Fix position problem with IE ................ r2664 | danydb | 2009-11-07 00:07:24 +0100 (Sat, 07 Nov 2009) | 2 lines fix bug in get_row : order must appear in the select ................ r2665 | danydb | 2009-11-07 01:00:08 +0100 (Sat, 07 Nov 2009) | 6 lines Accounting =========== * finish to add everywhere the ICard * finish to add everywhere the IPost ................ r2666 | danydb | 2009-11-07 12:38:30 +0100 (Sat, 07 Nov 2009) | 1 line Correct cosmetic + Tabel CSS ................ r2667 | danydb | 2009-11-07 12:40:21 +0100 (Sat, 07 Nov 2009) | 1 line Respond to ajax request to manager Accouting item (search) ................ r2668 | danydb | 2009-11-08 18:39:02 +0100 (Sun, 08 Nov 2009) | 12 lines Gestion Client ============== Add the operations add the contacts General ======= Improve search into ledger (accouting item + quick code card) Improve search into ledger (internal number) ................ r2669 | danydb | 2009-11-09 14:12:38 +0100 (Mon, 09 Nov 2009) | 2 lines Split action.inc.php into 2 parts, the second is usable from anywhere ................ r2670 | danydb | 2009-11-09 18:31:07 +0100 (Mon, 09 Nov 2009) | 6 lines Firefox XML ============= Firefox split the XML answer in a 4k block, IE doesn't. We add a function to retrieve the full content of a XML node ................ r2671 | danydb | 2009-11-10 14:23:16 +0100 (Tue, 10 Nov 2009) | 7 lines Firefox XML ============= Firefox split the XML answer in a 4k block, IE doesn't. We add a function to retrieve the full content of a XML node ................ r2672 | danydb | 2009-11-11 16:56:47 +0100 (Wed, 11 Nov 2009) | 5 lines Todo List ========= To avoid any problem, the JSON format has been dropped and replaced by the XML format ................ r2673 | danydb | 2009-11-12 16:16:47 +0100 (Thu, 12 Nov 2009) | 7 lines Dev. Scripts ============ * delete old useless scripts * add comments to scripts (purpose, gpl...) * add scripts for adding languages ................ r2674 | danydb | 2009-11-12 21:12:50 +0100 (Thu, 12 Nov 2009) | 5 lines Translation =========== Start translation to English ................ r2675 | danydb | 2009-11-14 00:58:37 +0100 (Sat, 14 Nov 2009) | 5 lines Card search button ------------------- Add a search button in accountancy ................ r2676 | danydb | 2009-11-14 16:57:01 +0100 (Sat, 14 Nov 2009) | 2 lines Class database : with postgresql > 8.2 the sequence can be less than 1 ................ r2677 | danydb | 2009-11-14 17:00:13 +0100 (Sat, 14 Nov 2009) | 6 lines Bug === Fix Bug in the creation of ledger, and add the new IPoste class for searching for an accounting item ................ r2678 | danydb | 2009-11-15 17:12:59 +0100 (Sun, 15 Nov 2009) | 3 lines remove debug code Add translation ................ r2679 | danydb | 2009-11-15 21:48:05 +0100 (Sun, 15 Nov 2009) | 7 lines Fiche cat ========= Add IPoste, Add correction of accounting item for the cat Add correction of auto create for the cat ................ r2680 | danydb | 2009-11-16 16:06:55 +0100 (Mon, 16 Nov 2009) | 1 line Add translations ................ r2681 | danydb | 2009-11-17 20:51:18 +0100 (Tue, 17 Nov 2009) | 5 lines Card ==== Fix bug with the accounting item when it is not automatically computed ................ r2682 | danydb | 2009-11-17 21:13:13 +0100 (Tue, 17 Nov 2009) | 1 line remove debug info and correct the printing of account ................ r2683 | danydb | 2009-11-17 21:49:31 +0100 (Tue, 17 Nov 2009) | 4 lines Report ====== Fix bug with report, add IPoste for helping in creation of new report ................ r2684 | danydb | 2009-11-18 17:02:36 +0100 (Wed, 18 Nov 2009) | 3 lines Translation of the template ................ r2685 | danydb | 2009-11-18 17:20:00 +0100 (Wed, 18 Nov 2009) | 5 lines BUDGET ====== Remove completely the old BUDGET module ................ r2686 | danydb | 2009-11-18 17:31:49 +0100 (Wed, 18 Nov 2009) | 1 line Cosmetic : size of span as row ................ r2687 | danydb | 2009-11-18 17:32:05 +0100 (Wed, 18 Nov 2009) | 1 line Typo ................ r2688 | danydb | 2009-11-19 12:21:12 +0100 (Thu, 19 Nov 2009) | 2 lines redirect faster ................ r2689 | danydb | 2009-11-19 12:22:27 +0100 (Thu, 19 Nov 2009) | 2 lines Change Liste des tâches to Pense Bete ................ r2690 | danydb | 2009-11-19 16:58:27 +0100 (Thu, 19 Nov 2009) | 5 lines Ledger VEN & ACH ================ Translation ................ r2691 | danydb | 2009-11-19 22:55:15 +0100 (Thu, 19 Nov 2009) | 2 lines Fix bug with f_id_Dest ................ r2692 | danydb | 2009-11-19 23:13:20 +0100 (Thu, 19 Nov 2009) | 1 line Fix small bug in "gestion" ................ r2693 | danydb | 2009-11-20 11:57:39 +0100 (Fri, 20 Nov 2009) | 2 lines Doxygen : introduction in English ................ r2694 | danydb | 2009-11-20 12:20:43 +0100 (Fri, 20 Nov 2009) | 1 line Typo in SQL ................ r2695 | danydb | 2009-11-20 15:30:09 +0100 (Fri, 20 Nov 2009) | 2 lines Add comment to database ................ r2696 | danydb | 2009-11-22 11:02:14 +0100 (Sun, 22 Nov 2009) | 1 line Dashboad ................ r2697 | danydb | 2009-11-22 11:02:46 +0100 (Sun, 22 Nov 2009) | 1 line Dashboad ................ r2698 | danydb | 2009-11-22 11:03:09 +0100 (Sun, 22 Nov 2009) | 1 line Reconciliation : fix bug ................ r2699 | danydb | 2009-11-22 11:21:56 +0100 (Sun, 22 Nov 2009) | 2 lines fix bug for period and show the selected language ................ r2700 | danydb | 2009-11-22 11:40:10 +0100 (Sun, 22 Nov 2009) | 2 lines IPeriod improve doc and add javascript ................ r2701 | danydb | 2009-11-22 11:50:24 +0100 (Sun, 22 Nov 2009) | 5 lines class ICard ----------- No button search if readOnly is true display show the value and add a hidden value ................ r2702 | danydb | 2009-11-22 12:20:22 +0100 (Sun, 22 Nov 2009) | 6 lines Import Bank ----------- Fix bug import bank Add possibility to select directly the period ................ r2703 | danydb | 2009-11-22 14:10:49 +0100 (Sun, 22 Nov 2009) | 6 lines Customer --------- Add a new card in a popup Reload window after adding card ................ r2704 | danydb | 2009-11-22 18:48:07 +0100 (Sun, 22 Nov 2009) | 5 lines Customer ========== Add category by ipopup ................ r2705 | danydb | 2009-11-22 18:59:44 +0100 (Sun, 22 Nov 2009) | 4 lines Deprecated ========== remove deprecated function code ................ r2706 | danydb | 2009-11-22 19:01:53 +0100 (Sun, 22 Nov 2009) | 1 line code cleaning : remove dead code ................ r2707 | danydb | 2009-11-22 19:06:34 +0100 (Sun, 22 Nov 2009) | 1 line remove useless option ................ r2708 | danydb | 2009-11-22 19:12:53 +0100 (Sun, 22 Nov 2009) | 1 line Code cleaning : remove dead code ................ r2709 | danydb | 2009-11-22 22:32:12 +0100 (Sun, 22 Nov 2009) | 1 line fix bug char set and update translation ................ r2710 | danydb | 2009-11-23 15:23:09 +0100 (Mon, 23 Nov 2009) | 4 lines Code cleaning ============= Remove Dead Code ................ r2711 | danydb | 2009-11-23 16:09:54 +0100 (Mon, 23 Nov 2009) | 1 line ICard : improve doc and remove dead code ................ r2712 | danydb | 2009-11-23 23:36:41 +0100 (Mon, 23 Nov 2009) | 2 lines Improve appearance ................ r2713 | danydb | 2009-11-24 00:42:25 +0100 (Tue, 24 Nov 2009) | 7 lines Acc_Ledger Sales and Expense ----------------------------- * Fix last bugs * Add 2 columns : total without VAT, total with VAT * Improve INum, the readonly TAGS are in light grey ................ r2714 | danydb | 2009-11-24 14:48:59 +0100 (Tue, 24 Nov 2009) | 1 line Generate Doc : clean table document after generating ................ r2715 | danydb | 2009-11-24 17:28:48 +0100 (Tue, 24 Nov 2009) | 6 lines Doxygen change setting : remove code in the documentation Show comment ................ r2716 | danydb | 2009-11-24 17:29:55 +0100 (Tue, 24 Nov 2009) | 2 lines Backup - restore : Add the flag --no-owner to avoid some security issues ................ r2717 | danydb | 2009-11-24 17:31:04 +0100 (Tue, 24 Nov 2009) | 8 lines Action - customer ================== Add the search button Add the detail double click Improve documentation Improve search build_sql ................ r2718 | danydb | 2009-11-24 22:51:53 +0100 (Tue, 24 Nov 2009) | 1 line Fix char set ................ r2719 | danydb | 2009-11-24 23:52:39 +0100 (Tue, 24 Nov 2009) | 1 line cosmetic ................ r2720 | danydb | 2009-11-24 23:52:41 +0100 (Tue, 24 Nov 2009) | 1 line Class fiche: add toArray ................ r2721 | danydb | 2009-11-24 23:53:38 +0100 (Tue, 24 Nov 2009) | 1 line add button for the search of action ................ r2722 | danydb | 2009-11-24 23:54:01 +0100 (Tue, 24 Nov 2009) | 2 lines Improve ISpan : add the attribute style ................ r2723 | danydb | 2009-11-26 16:58:23 +0100 (Thu, 26 Nov 2009) | 1 line Improve doc + test card ................ r2724 | danydb | 2009-11-28 01:22:43 +0100 (Sat, 28 Nov 2009) | 6 lines Fix bug in GESTION Add search in Recherche (acc_ledger) Improve doc and style Create file for extension ................ r2725 | danydb | 2009-11-29 18:13:07 +0100 (Sun, 29 Nov 2009) | 1 line Card Search in the ledger for all the cards ................ r2726 | danydb | 2009-11-29 18:26:30 +0100 (Sun, 29 Nov 2009) | 1 line Add check to avoid to enter twice the same name for cat. of card ................ r2727 | danydb | 2009-11-29 18:30:13 +0100 (Sun, 29 Nov 2009) | 1 line Finish customer ................ r2728 | danydb | 2009-11-29 18:35:46 +0100 (Sun, 29 Nov 2009) | 1 line Operatio customer ................ r2729 | danydb | 2009-11-29 18:55:34 +0100 (Sun, 29 Nov 2009) | 5 lines SUPPLIER ======== Add Supplier ................ r2730 | danydb | 2009-11-29 19:31:42 +0100 (Sun, 29 Nov 2009) | 1 line Add security for Administration ................ r2731 | danydb | 2009-11-29 19:32:13 +0100 (Sun, 29 Nov 2009) | 1 line Add security for Administration ................ r2732 | danydb | 2009-11-29 19:39:50 +0100 (Sun, 29 Nov 2009) | 2 lines Change client by supplier ................ r2733 | danydb | 2009-11-29 20:17:36 +0100 (Sun, 29 Nov 2009) | 5 lines Administration ============== Add administration follow-up, detail, history ................ r2734 | danydb | 2009-11-29 20:24:46 +0100 (Sun, 29 Nov 2009) | 1 line Strict Contact::Summary not correct ................ r2735 | danydb | 2009-11-29 20:31:05 +0100 (Sun, 29 Nov 2009) | 1 line Fix bug in follow up and ADM ................ r2736 | danydb | 2009-11-29 20:36:34 +0100 (Sun, 29 Nov 2009) | 1 line Show the search in Follow up in a criteria exist ................ r2737 | danydb | 2009-11-30 15:52:21 +0100 (Mon, 30 Nov 2009) | 1 line Improve ShowPopup: keep the Dialog Box in the current view ................ r2738 | danydb | 2009-12-01 21:56:24 +0100 (Tue, 01 Dec 2009) | 7 lines Dashboard --------- Add last action Add Calendar Add last operation ................ r2739 | danydb | 2009-12-01 22:07:12 +0100 (Tue, 01 Dec 2009) | 1 line Fix bug in middle of payment ................ r2740 | danydb | 2009-12-01 22:09:28 +0100 (Tue, 01 Dec 2009) | 2 lines Use gettext ................ r2741 | danydb | 2009-12-01 22:13:11 +0100 (Tue, 01 Dec 2009) | 2 lines Add gettext ................ r2742 | danydb | 2009-12-01 22:15:28 +0100 (Tue, 01 Dec 2009) | 2 lines Fix bug : add row : 9 col instead of 6 ................ r2743 | danydb | 2009-12-01 22:42:10 +0100 (Tue, 01 Dec 2009) | 1 line Adapt for MS IE7µ ................ r2744 | danydb | 2009-12-04 16:15:36 +0100 (Fri, 04 Dec 2009) | 1 line add iposte, fix size in css ................ r2745 | danydb | 2009-12-05 01:52:50 +0100 (Sat, 05 Dec 2009) | 8 lines Parameters ========== * Move VAT into Divers * Update doc iposte * Add iposte to Parm Code * Add security for extension ................ r2746 | danydb | 2009-12-06 21:36:16 +0100 (Sun, 06 Dec 2009) | 1 line Remove autocomplete from the Acc_Ledger::search_form due to a bug in the autocompleter ................ r2747 | danydb | 2009-12-06 22:12:24 +0100 (Sun, 06 Dec 2009) | 2 lines add security ................ r2748 | danydb | 2009-12-06 22:15:23 +0100 (Sun, 06 Dec 2009) | 2 lines Add documentation ................ r2749 | danydb | 2009-12-06 22:27:27 +0100 (Sun, 06 Dec 2009) | 4 lines EXtension ========= Add structure for extension ................ r2750 | danydb | 2009-12-06 22:35:26 +0100 (Sun, 06 Dec 2009) | 1 line Fix cosmetic ................ r2751 | danydb | 2009-12-09 16:36:39 +0100 (Wed, 09 Dec 2009) | 2 lines remove richtext.js which is obsolete ................ r2752 | danydb | 2009-12-09 16:52:56 +0100 (Wed, 09 Dec 2009) | 4 lines Bug in restore =============== Can not upload a file, the _POST array is empty, because the post_max_size was too small ................ r2753 | danydb | 2009-12-10 21:05:55 +0100 (Thu, 10 Dec 2009) | 8 lines Dashboard ========= Improve Layout : size of comment = 20 char Follow-up ========= Set default values ................ r2754 | danydb | 2009-12-10 21:25:05 +0100 (Thu, 10 Dec 2009) | 2 lines Add the month year in calendar ................ r2755 | danydb | 2009-12-10 21:25:40 +0100 (Thu, 10 Dec 2009) | 2 lines Calendar : add documentation and fill from todo list ................ r2756 | danydb | 2009-12-11 00:12:15 +0100 (Fri, 11 Dec 2009) | 5 lines Extension ========= Add the class Adapt code and template ................ r2757 | danydb | 2009-12-12 00:38:37 +0100 (Sat, 12 Dec 2009) | 4 lines Extension ========= Menu for manage extension ................ r2758 | danydb | 2009-12-12 00:39:27 +0100 (Sat, 12 Dec 2009) | 1 line add todo : remove plugin ................ r2759 | danydb | 2009-12-15 21:57:19 +0100 (Tue, 15 Dec 2009) | 2 lines add documentation ................ r2760 | danydb | 2009-12-16 19:54:22 +0100 (Wed, 16 Dec 2009) | 1 line Extension : add security and item in the menu ................ r2761 | danydb | 2009-12-16 19:58:15 +0100 (Wed, 16 Dec 2009) | 2 lines typo ................ r2762 | danydb | 2009-12-16 20:05:26 +0100 (Wed, 16 Dec 2009) | 3 lines Gestion Add printing ................ r2763 | danydb | 2009-12-16 20:14:13 +0100 (Wed, 16 Dec 2009) | 2 lines Add prevision to security ................ r2764 | danydb | 2009-12-16 20:14:28 +0100 (Wed, 16 Dec 2009) | 2 lines Add prevision to security ................ r2765 | danydb | 2009-12-16 20:14:44 +0100 (Wed, 16 Dec 2009) | 2 lines Add prevision to security ................ r2766 | danydb | 2009-12-16 20:18:22 +0100 (Wed, 16 Dec 2009) | 2 lines security prevision : mod and consultation ................ r2767 | danydb | 2009-12-16 20:45:24 +0100 (Wed, 16 Dec 2009) | 1 line Add security for prevision ................ r2768 | danydb | 2009-12-18 20:30:59 +0100 (Fri, 18 Dec 2009) | 1 line Compatible with IE ................ r2769 | danydb | 2009-12-18 20:36:03 +0100 (Fri, 18 Dec 2009) | 1 line Remove debug info ................ r2770 | danydb | 2009-12-18 21:00:02 +0100 (Fri, 18 Dec 2009) | 2 lines remove debug information ................ r2771 | danydb | 2009-12-18 21:03:55 +0100 (Fri, 18 Dec 2009) | 2 lines Add todo ................ r2772 | danydb | 2009-12-18 21:28:06 +0100 (Fri, 18 Dec 2009) | 1 line resize todo list and maximize windows when logon ................ r2773 | danydb | 2009-12-23 22:48:59 +0100 (Wed, 23 Dec 2009) | 1 line Action : Improve location button generate document ................ r2774 | danydb | 2009-12-27 14:26:16 +0100 (Sun, 27 Dec 2009) | 1 line clean up ................ r2775 | danydb | 2009-12-27 14:26:32 +0100 (Sun, 27 Dec 2009) | 2 lines cleanup ................ r2776 | danydb | 2009-12-27 19:05:53 +0100 (Sun, 27 Dec 2009) | 1 line Add Documentation ................ r2777 | danydb | 2009-12-27 19:51:29 +0100 (Sun, 27 Dec 2009) | 1 line Start Forecast ................ r2778 | danydb | 2009-12-28 02:27:56 +0100 (Mon, 28 Dec 2009) | 1 line Add the class for managing the tables forecast, forecast_cat and forecast_item ................ r2779 | danydb | 2009-12-30 05:55:38 +0100 (Wed, 30 Dec 2009) | 1 line Bug : missing the search card popup ................ r2780 | danydb | 2010-01-02 16:48:25 +0100 (Sat, 02 Jan 2010) | 1 line Code cleaning : remove blank lines ................ r2781 | danydb | 2010-01-02 16:50:20 +0100 (Sat, 02 Jan 2010) | 1 line Change filename prevision.inc.php by forecast.inc.php ................ r2782 | danydb | 2010-01-02 16:50:53 +0100 (Sat, 02 Jan 2010) | 1 line remove trailing space ................ r2783 | danydb | 2010-01-02 16:51:28 +0100 (Sat, 02 Jan 2010) | 1 line remove trailing space ................ r2784 | danydb | 2010-01-02 16:51:54 +0100 (Sat, 02 Jan 2010) | 1 line remove trailing space ................ r2785 | danydb | 2010-01-02 16:57:19 +0100 (Sat, 02 Jan 2010) | 4 lines Business Forecast ================= The BF module is now finished ................ r2786 | danydb | 2010-01-02 16:57:46 +0100 (Sat, 02 Jan 2010) | 4 lines Business Forecast ================= The BF module is now finished ................ r2787 | danydb | 2010-01-02 21:46:48 +0100 (Sat, 02 Jan 2010) | 2 lines Analytic accountancy : fixed bug Cosmetic bugs ................ r2788 | danydb | 2010-01-02 22:14:56 +0100 (Sat, 02 Jan 2010) | 2 lines Analytic accountancy : fixed bug Cosmetic bugs ................ r2789 | danydb | 2010-01-03 00:53:28 +0100 (Sun, 03 Jan 2010) | 1 line ................ r2790 | danydb | 2010-01-03 01:24:42 +0100 (Sun, 03 Jan 2010) | 1 line Remove files ................ r2791 | danydb | 2010-01-03 01:50:21 +0100 (Sun, 03 Jan 2010) | 5 lines Class periode : ============= change id by p_id ................ r2792 | danydb | 2010-01-03 02:03:41 +0100 (Sun, 03 Jan 2010) | 1 line Ad for firefox ................ r2793 | danydb | 2010-01-03 17:52:58 +0100 (Sun, 03 Jan 2010) | 1 line Bug : last date was not shown ................ r2794 | danydb | 2010-01-03 17:58:05 +0100 (Sun, 03 Jan 2010) | 1 line Translate ................ r2795 | danydb | 2010-01-03 18:07:24 +0100 (Sun, 03 Jan 2010) | 1 line Bug : ISelect ................ r2796 | danydb | 2010-01-03 18:17:41 +0100 (Sun, 03 Jan 2010) | 1 line Bug : Costing accountancy ................ r2797 | danydb | 2010-01-03 18:23:13 +0100 (Sun, 03 Jan 2010) | 1 line Fix bug and correct translation ................ r2798 | danydb | 2010-01-04 14:58:51 +0100 (Mon, 04 Jan 2010) | 1 line Cosmetic bug ................ r2799 | danydb | 2010-01-04 15:37:02 +0100 (Mon, 04 Jan 2010) | 1 line Cosmetic fix problem button anchor ................ r2800 | danydb | 2010-01-04 19:30:31 +0100 (Mon, 04 Jan 2010) | 2 lines Update Doc ................ r2801 | danydb | 2010-01-04 19:57:41 +0100 (Mon, 04 Jan 2010) | 2 lines Fix bug : report : if a FROM clause do not exist (for example from a previous year) then the report failed with a SQL error ................ r2802 | danydb | 2010-01-04 20:11:19 +0100 (Mon, 04 Jan 2010) | 1 line Code cleaning ................ r2803 | danydb | 2010-01-04 20:11:47 +0100 (Mon, 04 Jan 2010) | 1 line Change setting for generating doc ................ r2804 | danydb | 2010-01-04 20:12:25 +0100 (Mon, 04 Jan 2010) | 1 line Code improve + translation ................ r2805 | danydb | 2010-01-06 14:50:09 +0100 (Wed, 06 Jan 2010) | 1 line Dashboad : add card name in last action ................ r2806 | danydb | 2010-01-06 15:00:06 +0100 (Wed, 06 Jan 2010) | 1 line Parameter : move Poste to Divers ................ r2807 | danydb | 2010-01-06 15:22:48 +0100 (Wed, 06 Jan 2010) | 4 lines Parameters Move Extension from Divers to Main Move Cat of card from Main to Divers ................ r2808 | danydb | 2010-01-06 18:08:43 +0100 (Wed, 06 Jan 2010) | 1 line Extension : plugin in the folder ext ................ r2809 | danydb | 2010-01-06 19:16:17 +0100 (Wed, 06 Jan 2010) | 1 line Plugin : locate into the folder ext ................ r2810 | danydb | 2010-01-06 19:59:55 +0100 (Wed, 06 Jan 2010) | 1 line CSS : modify button ................ r2811 | danydb | 2010-01-07 18:55:07 +0100 (Thu, 07 Jan 2010) | 2 lines Cosmetic : quick code in upper case ................ r2812 | danydb | 2010-01-07 19:00:07 +0100 (Thu, 07 Jan 2010) | 2 lines If there is no document template, then hide the generate button ................ r2813 | danydb | 2010-01-07 19:50:44 +0100 (Thu, 07 Jan 2010) | 2 lines Cosmetic change TODO ................ r2814 | danydb | 2010-01-07 20:17:33 +0100 (Thu, 07 Jan 2010) | 1 line set color to todo in the calendar ................ r2815 | danydb | 2010-01-07 20:18:22 +0100 (Thu, 07 Jan 2010) | 1 line Problem with round ................ r2816 | danydb | 2010-01-07 20:18:37 +0100 (Thu, 07 Jan 2010) | 1 line set color to todo in the calendar ................ r2817 | danydb | 2010-01-07 20:26:09 +0100 (Thu, 07 Jan 2010) | 2 lines Opening entries : account is never found ................ r2818 | danydb | 2010-01-07 20:32:42 +0100 (Thu, 07 Jan 2010) | 2 lines Fix Bug : If the name is empty, we don't go backward to correct the name ................ r2819 | danydb | 2010-01-07 20:36:51 +0100 (Thu, 07 Jan 2010) | 2 lines Fix Bug: Extension show several times the same user ................ r2820 | danydb | 2010-01-07 20:59:59 +0100 (Thu, 07 Jan 2010) | 1 line Modify func alert ................ r2821 | danydb | 2010-01-07 21:00:59 +0100 (Thu, 07 Jan 2010) | 1 line Fix Bug : the extension can be saved with an empty name or code ................ r2822 | danydb | 2010-01-07 21:01:42 +0100 (Thu, 07 Jan 2010) | 2 lines indent code ................ r2823 | danydb | 2010-01-07 21:18:16 +0100 (Thu, 07 Jan 2010) | 2 lines Protect against forbidden char (javascript attack) ................ r2824 | danydb | 2010-01-07 21:21:10 +0100 (Thu, 07 Jan 2010) | 1 line Protect again javascript attack + alert if save extension failed ................ r2825 | danydb | 2010-01-07 21:25:13 +0100 (Thu, 07 Jan 2010) | 2 lines Protect against javascript attack ................ r2826 | danydb | 2010-01-07 21:32:44 +0100 (Thu, 07 Jan 2010) | 1 line Protect against forb. char ................ r2827 | danydb | 2010-01-07 22:53:13 +0100 (Thu, 07 Jan 2010) | 1 line AJAX : add security to ajax file ................ r2828 | danydb | 2010-01-07 22:57:24 +0100 (Thu, 07 Jan 2010) | 2 lines Cosmetic ................ r2829 | danydb | 2010-01-07 23:11:42 +0100 (Thu, 07 Jan 2010) | 2 lines Fix Bug : cannot update name of cost accounting ................ r2830 | danydb | 2010-01-07 23:12:52 +0100 (Thu, 07 Jan 2010) | 1 line Add forgotten file for extension ................ r2831 | danydb | 2010-01-08 14:03:03 +0100 (Fri, 08 Jan 2010) | 1 line Fix Bug : too many error in the table TVA for France ................ r2832 | danydb | 2010-01-08 14:04:12 +0100 (Fri, 08 Jan 2010) | 1 line Fix Bug : too many error in the table TVA for France ................ r2833 | danydb | 2010-01-08 14:50:15 +0100 (Fri, 08 Jan 2010) | 1 line Update Belgium accountancy ................ r2834 | danydb | 2010-01-08 16:53:40 +0100 (Fri, 08 Jan 2010) | 1 line Improve replace periode by date in print Poste ................ r2835 | danydb | 2010-01-08 19:20:38 +0100 (Fri, 08 Jan 2010) | 2 lines correct tva_FR ................ r2836 | danydb | 2010-01-08 19:21:11 +0100 (Fri, 08 Jan 2010) | 1 line Cosmetic CSS ................ r2837 | danydb | 2010-01-08 19:53:12 +0100 (Fri, 08 Jan 2010) | 1 line fix bug tva_france ................ r2838 | danydb | 2010-01-08 20:11:53 +0100 (Fri, 08 Jan 2010) | 1 line Correct order for printing accounting ................ r2839 | danydb | 2010-01-08 20:18:18 +0100 (Fri, 08 Jan 2010) | 2 lines Bug : Printing ledger simple, show always the same line ................ r2840 | danydb | 2010-01-10 15:16:48 +0100 (Sun, 10 Jan 2010) | 1 line Fix problem accentuated char + view vw_fiche_def ................ r2841 | danydb | 2010-01-10 15:19:19 +0100 (Sun, 10 Jan 2010) | 2 lines Remove owner SQL command ................ r2842 | danydb | 2010-01-10 15:37:37 +0100 (Sun, 10 Jan 2010) | 1 line Improve Detail operation : simple ................ r2843 | danydb | 2010-01-11 13:59:49 +0100 (Mon, 11 Jan 2010) | 2 lines Fix bug : when type an sale and a payment, user gets a warning about unknown variable mt ................ r2844 | danydb | 2010-01-11 14:17:22 +0100 (Mon, 11 Jan 2010) | 2 lines Fix Bug : double click in "middle of payment" does not work ................ r2845 | danydb | 2010-01-11 14:26:19 +0100 (Mon, 11 Jan 2010) | 1 line Improve popup detail operation : align amount to right ................ r2846 | danydb | 2010-01-11 18:59:29 +0100 (Mon, 11 Jan 2010) | 1 line Bug : generate document does not work ................ r2847 | danydb | 2010-01-11 19:25:57 +0100 (Mon, 11 Jan 2010) | 1 line Bug : after creating an invoice or a fee note, the link does not show the generated document ................ r2848 | danydb | 2010-01-11 19:30:08 +0100 (Mon, 11 Jan 2010) | 1 line Bug Cosmetic : improve link for Receipt ................ r2849 | danydb | 2010-01-11 19:32:47 +0100 (Mon, 11 Jan 2010) | 1 line Bug : no security on remove or consult a document ................ r2850 | danydb | 2010-01-11 21:29:32 +0100 (Mon, 11 Jan 2010) | 2 lines Bug : does not show accounting when po_description is null (costing accounting) ................ r2851 | danydb | 2010-01-12 14:02:32 +0100 (Tue, 12 Jan 2010) | 1 line Update StyleSheet ................ r2852 | danydb | 2010-01-12 14:16:16 +0100 (Tue, 12 Jan 2010) | 1 line Update EN translation ................ r2853 | danydb | 2010-01-12 15:14:08 +0100 (Tue, 12 Jan 2010) | 1 line Remove deprecated functions ................ r2854 | danydb | 2010-01-12 15:43:52 +0100 (Tue, 12 Jan 2010) | 1 line Complete all the todo ................ r2855 | danydb | 2010-01-12 21:11:45 +0100 (Tue, 12 Jan 2010) | 1 line Cosmetic : add the calc in ACH + move button, bug in recherche.php, the qcode does not appear after request ................ r2856 | danydb | 2010-01-13 12:16:01 +0100 (Wed, 13 Jan 2010) | 1 line Dashboard: add the possibility to change the periode ................ r2857 | danydb | 2010-01-13 14:15:45 +0100 (Wed, 13 Jan 2010) | 3 lines add translation Fix Bug : The query in follow up does not work when a part of the title was specified ................ --- Changelog | 10559 +++------ addon/class.ezpdf.php | 1555 -- addon/class.pdf.php | 3075 --- addon/data.txt | 1400 -- addon/readme.pdf | Bin 108502 -> 0 bytes addon/readme.php | 296 - addon/ros.jpg | Bin 10823 -> 0 bytes contrib/document_test/facture.html | 13 + dev/add-db.sh | 11 - dev/add_require.py | 49 + dev/change.py | 34 + dev/cleanup.sh | 5 +- dev/compile_text.sh | 11 + dev/compose_list.sh | 4 + dev/extract_text.sh | 10 + dev/plugin_client.txt | 4 + dev/reset.sql | 13 - dev/reset_seq_jrn.sql | 10 - dev/test_parse_formula.php | 5 + dev/transform.py | 100 + dev/usage_file.py | 49 + dev/usage_function.py | 65 + dev/without_check.py | 42 + doc/Diagram5.dia | Bin 0 -> 9787 bytes doc/data.dia | 17911 ++++++++++++++++ doc/developper/Doxyfile | 14 +- doc/developper/create_doc.sh | 7 +- doc/document.dia | Bin 0 -> 3365 bytes doc/document2.dia | Bin 0 -> 2316 bytes doc/fiche.dia | Bin 2225 -> 2739 bytes html/access.php | 166 +- html/admin/setup.php | 174 +- html/admin/sql/patch/ac-upgrade10.sql | 7 + html/admin/sql/patch/upgrade59.sql | 414 + html/admin/sql/patch/upgrade60.sql | 40 + html/admin/sql/patch/upgrade61.BE.sql | 13 + html/admin/sql/patch/upgrade61.FR.sql | 90 + html/admin/sql/patch/upgrade61.sql | 15 + html/admin/test.php | 73 - html/admin/test_me.php | 152 - html/admin_repo.php | 5 +- html/ajax_card.php | 326 + html/ajax_extension.php | 204 + html/ajax_get.php | 149 + html/ajax_import.php | 10 +- html/ajax_misc.php | 75 + html/ajax_poste.php | 158 + html/ajax_report.php | 6 +- html/annulation.php | 85 +- html/backup.php | 9 +- html/bal_csv.php | 6 +- html/bilan.php | 4 +- html/bud_ajax.php | 3 +- html/bud_csv.php | 2 +- html/bud_search_poste.php | 16 +- html/budget.php | 8 +- html/ca_bc_csv.php | 2 +- html/ca_bc_pdf.php | 2 +- html/ca_bs_csv.php | 2 +- html/ca_bs_pdf.php | 5 +- html/ca_list_csv.php | 2 +- html/ca_list_pdf.php | 4 +- html/calculator.js | 72 - html/calendar.js | 629 - html/commercial.php | 137 +- html/compta.php | 33 +- html/comptanalytic.php | 13 +- html/compute.php | 8 +- html/extension.php | 89 + html/fiche_csv.php | 5 +- html/fiche_new.php | 30 +- html/fiche_new.php.deprecated | 192 + html/fiche_search.php | 184 +- html/fid.php | 126 +- html/fid_card.php | 130 + html/form_csv.php | 4 +- html/form_pdf.php | 4 +- html/get_pj.php | 15 +- html/get_predef.php | 5 +- html/get_saldo.php | 2 +- html/image/body-aqua.jpg | Bin 30713 -> 0 bytes html/image/bouton.jpg | Bin 2326 -> 0 bytes html/image/bouton2.jpg | Bin 1371 -> 0 bytes html/image/bouton3.jpg | Bin 1269 -> 0 bytes html/image/bouton4.png | Bin 385 -> 0 bytes html/image/clouds2.jpg | Bin 962 -> 0 bytes html/image/clouds3.jpg | Bin 1069 -> 0 bytes html/image/compta.png | Bin 31975 -> 0 bytes html/image/comptaanal.png | Bin 2977 -> 0 bytes html/image/down.gif | Bin 0 -> 74 bytes html/image/down.png | Bin 96 -> 0 bytes html/image/elegant-l.jpg | Bin 1623 -> 0 bytes html/image/elegant-n.jpg | Bin 633 -> 0 bytes html/image/freebtn1-b.jpg | Bin 1343 -> 0 bytes html/image/freebtn1-l.gif | Bin 2267 -> 0 bytes html/image/freebtn1-l.jpg | Bin 1340 -> 0 bytes html/image/freebtn1-ll.gif | Bin 1541 -> 0 bytes html/image/freebtn1.gif | Bin 2454 -> 0 bytes html/image/freebtn2.gif | Bin 1972 -> 0 bytes html/image/freebtn21.gif | Bin 2019 -> 0 bytes html/image/freebtn31.gif | Bin 2382 -> 0 bytes html/image/freebtn91.gif | Bin 2495 -> 0 bytes html/image/glaslake1.jpg | Bin 995 -> 0 bytes html/image/glaslake2.jpg | Bin 1028 -> 0 bytes html/image/load.gif | Bin 0 -> 563 bytes html/image/loading.gif | Bin 0 -> 12043 bytes html/image/select1.gif | Bin 0 -> 74 bytes html/image/select1.png | Bin 96 -> 0 bytes html/image/select2.gif | Bin 0 -> 74 bytes html/image/select2.png | Bin 104 -> 0 bytes html/image/up.gif | Bin 0 -> 74 bytes html/image/up.png | Bin 91 -> 0 bytes html/import.php | 24 +- html/index.php | 69 +- html/jrn_csv.php | 11 +- html/jrn_pdf.php | 21 +- html/jrn_search.php | 23 +- html/js/acc_ledger.js | 469 + html/js/acc_report.js | 83 + html/js/accounting_item.js | 155 + html/js/ajax_fiche.js | 151 +- html/js/ajax_op.js | 66 - html/js/anc_script.js | 188 + html/js/bq_import.js | 102 + html/js/bud_script.js | 132 - html/js/builder.js | 136 + html/js/caod_compute.js | 69 - html/js/card.js | 422 + html/js/compute.js | 2 +- html/js/compute_direct.js | 4 +- html/js/controls.js | 965 + html/js/dragdrop.js | 984 + html/js/effects.js | 1123 + html/js/extension.js | 152 + html/js/forecast.js | 25 + html/js/gestion.js | 80 + html/js/infobulle.js | 10 + html/js/jrn_concerned.js | 130 - html/js/mintoolkit.js | 226 - html/js/modify_op.js | 57 - html/js/prototype.js | 5130 ++++- html/js/scriptaculous.js | 68 + html/js/scripts.js | 644 +- html/js/search_card.js | 41 +- html/js/search_poste.js | 130 - html/js/slider.js | 275 + html/js/sound.js | 59 + html/js/todo_list.js | 25 +- html/js/unittest.js | 568 + html/lang/en_US/LC_MESSAGES/messages.po | 2845 +++ html/lang/nl_NL/LC_MESSAGES/messages.po | 45 + html/line_update.php | 15 +- html/listing_client.php | 4 +- html/login.php | 6 +- html/logout.php | 2 +- html/modify_op.php | 116 +- html/parametre.php | 232 +- html/poste_csv.php | 14 +- html/poste_pdf.php | 13 +- html/poste_search.php | 30 +- html/print_balance.php | 13 +- html/priv_user.php | 111 +- html/quick_code_csv.php | 8 +- html/quick_code_pdf.php | 10 +- html/recherche.php | 68 +- html/remove_op.php | 13 +- html/richtext.js | 608 - html/search_ca.php | 44 +- html/sec_pdf.php | 21 +- html/show_document.php | 29 +- html/show_document_modele.php | 18 +- html/show_fiche.php | 7 +- html/show_pj.php | 25 +- html/show_tva.php | 12 +- html/style-color.css | 292 +- html/style-light.css | 313 +- html/style.css | 266 +- html/test.php | 262 +- html/todo_list.php | 11 +- html/user_advanced.php | 30 +- html/user_compta.php | 9 +- html/user_login.php | 44 +- html/user_pref.php | 16 +- include/ac_common.php | 205 +- include/action.common.inc.php | 360 + include/action.inc.php | 412 +- include/adm.inc.php | 170 + include/adm_card.inc.php | 130 + include/anc_group.inc.php | 20 +- include/anc_imp.inc.php | 22 +- include/anc_od.inc.php | 41 +- include/anc_pa.inc.php | 48 +- include/argenta_be.inc.php | 7 +- include/balance.inc.php | 142 +- include/bud_card.inc.php | 22 +- include/bud_detail.inc.php | 41 +- include/bud_hypo.inc.php | 9 +- include/bud_sacc.inc.php | 22 +- include/bud_sga.inc.php | 14 +- include/bud_spo.inc.php | 22 +- include/bud_svglobal.inc.php | 22 +- include/bud_synthese.inc.php | 80 - include/cbc_be.inc.php | 7 +- include/central.inc.php | 34 +- include/central_inc.php | 56 +- include/check_priv.php | 207 - include/class_acc_account.php | 43 +- include/class_acc_account_ledger.php | 309 +- include/class_acc_balance.php | 32 +- include/class_acc_bilan.php | 60 +- include/class_acc_ledger.php | 1482 +- include/class_acc_ledger_fin.php | 442 +- include/class_acc_ledger_info.php | 289 +- include/class_acc_ledger_purchase.php | 823 +- include/class_acc_ledger_sold.php | 1076 +- include/class_acc_operation.php | 62 +- include/class_acc_parm_code.php | 35 +- include/class_acc_payment.php | 92 +- include/class_acc_reconciliation.php | 28 +- include/class_acc_report.php | 130 +- include/class_acc_report_row.php | 6 +- include/class_acc_tva.php | 33 +- include/class_action.php | 1149 +- include/class_action_detail.php | 221 + include/class_admin.php | 77 +- include/class_anc_account.php | 116 +- include/class_anc_balance_double.php | 180 +- include/class_anc_balance_simple.php | 99 +- include/class_anc_group.php | 22 +- include/class_anc_group_operation.php | 102 +- include/class_anc_listing.php | 80 +- include/class_anc_operation.php | 192 +- include/class_anc_plan.php | 65 +- include/class_anc_print.php | 66 +- include/class_anticipation.php | 325 + include/class_bud_card.php | 44 +- include/class_bud_data.php | 78 +- include/class_bud_detail.php | 18 +- include/class_bud_detail_periode.php | 8 +- include/class_bud_hypo.php | 59 +- include/class_bud_synthese.php | 3 +- include/class_bud_synthese_acc.php | 55 +- include/class_bud_synthese_anc.php | 55 +- include/class_bud_synthese_group.php | 44 +- include/class_bud_synthese_hypo.php | 51 +- include/class_calendar.php | 134 + include/class_contact.php | 12 +- include/class_customer.php | 131 +- include/class_database.php | 664 + include/class_document.php | 307 +- include/class_document_modele.php | 142 +- include/class_document_type.php | 4 +- include/class_dossier.php | 77 +- include/class_extension.php | 273 + include/class_fiche.php | 627 +- include/class_fiche_def.php | 260 +- include/class_fiche_def_ref.php | 24 +- include/class_forecast.php | 129 + include/class_forecast_cat.php | 152 + include/class_forecast_item.php | 147 + include/class_gestion_purchase.php | 14 +- include/class_gestion_sold.php | 8 +- include/class_html_input.php | 191 + include/class_iaction.php | 62 + include/class_ibutton.php | 56 + include/class_icard.php | 317 + include/class_icardctrl.php | 84 + include/class_icheckbox.php | 62 + include/class_iconcerned.php | 66 + include/class_idate.php | 71 + include/class_ifile.php | 49 + include/class_ihidden.php | 42 + include/class_inum.php | 61 + include/class_iperiod.php | 150 + include/class_ipopup.php | 150 + ...s_acexception.php => class_ipopupcard.php} | 13 +- include/class_iposte.php | 142 + include/class_iradio.php | 55 + include/class_isearch.php | 48 + include/class_iselect.php | 78 + include/class_ispan.php | 54 + include/class_itext.php | 79 + include/class_itextarea.php | 62 + include/class_itva.php | 59 + include/class_itva_select.php | 53 + include/class_own.php | 13 +- include/class_periode.php | 223 +- include/class_pre_op_ach.php | 14 +- include/class_pre_op_advanced.php | 10 +- include/class_pre_op_fin.php | 12 +- include/class_pre_op_ods.php | 10 +- include/class_pre_op_ven.php | 14 +- include/class_pre_operation.php | 51 +- include/class_supplier.php | 108 +- include/class_todo_list.php | 41 +- include/class_user.php | 254 +- include/class_widget.php | 786 - include/client.inc.php | 208 +- include/client_card.inc.php | 130 + include/compta_ach.inc.php | 248 +- include/compta_fin.inc.php | 201 +- include/compta_ven.inc.php | 281 +- include/config_file.php | 43 +- include/constant.php | 68 +- include/constant.security.php | 8 +- include/contact.inc.php | 46 +- include/debug.php | 15 +- include/detail_adm.inc.php | 74 + include/detail_client.inc.php | 74 + include/detail_supplier.inc.php | 74 + include/dexia.inc.php | 8 +- include/dexia_be.inc.php | 8 +- include/dossier.inc.php | 185 +- include/eub_be.inc.php | 3 +- include/ext/dummy/dummy.php | 104 + include/ext_inc.php | 23 + include/extension.inc.php | 64 + include/fiche.inc.php | 117 +- include/fiche_def.inc.php | 38 +- include/fiche_inc.php | 215 - include/forecast.inc.php | 341 + include/fortis_be.inc.php | 6 +- include/function_javascript.php | 802 + include/header_print.php | 6 +- include/import_inc.php | 201 +- include/impress.inc.php | 17 +- include/impress_bilan.inc.php | 18 +- include/impress_fiche.inc.php | 45 +- include/impress_inc.php | 457 +- include/impress_jrn.inc.php | 237 +- include/impress_listing_client.inc.php | 12 +- include/impress_poste.inc.php | 117 +- include/impress_rapport.inc.php | 158 +- include/ing_be.inc.php | 7 +- include/jrn.php | 293 +- include/modele.inc.php | 191 +- include/opening.inc.php | 63 +- include/operation_adm.inc.php | 39 + .../operation_client.inc.php | 28 +- .../operation_supplier.inc.php | 26 +- include/param_jrn.inc.php | 5 +- include/param_jrn_add.inc.php | 93 +- include/param_jrn_detail.inc.php | 83 +- include/param_pcmn.inc.php | 47 +- include/param_sec.inc.php | 62 +- include/payment_middle.inc.php | 37 +- include/periode.inc.php | 23 +- include/poste.inc.php | 23 +- include/poste.php | 80 - include/postgres.php | 622 - include/pref.inc.php | 123 +- include/preference.php | 221 - include/preod.inc.php | 36 +- include/quick_writing.inc.php | 140 +- include/report.inc.php | 67 +- include/restore.inc.php | 77 +- include/stock.inc.php | 27 +- include/stock_inc.php | 24 +- include/suivi_adm.inc.php | 58 + include/suivi_client.inc.php | 58 + include/suivi_supplier.inc.php | 58 + include/supplier.inc.php | 225 +- include/supplier_card.inc.php | 130 + include/template/account_result.php | 25 + include/template/account_search.php | 3 + include/template/calendar.php | 39 + include/template/card_result.php | 29 + include/template/category_of_card.php | 25 + include/template/dashboard.php | 67 + include/template/detail-action.php | 261 + include/template/extension-detail.php | 47 + include/template/extension-sec.php | 31 + include/template/extension.php | 33 + include/template/fiche_def_input.php | 29 + include/template/forecast-detail.php | 29 + include/template/forecast_cat.php | 24 + include/template/forecast_result.php | 131 + include/template/form_ledger_detail.php | 90 + include/template/form_ledger_fin.php | 40 + include/template/form_ledger_ven.php | 80 + include/template/ledger_search.php | 67 + include/template/param_jrn.php | 36 +- include/template/security_list_action.php | 138 +- include/tva.inc.php | 67 +- include/user.inc.php | 32 +- include/user_action_gl.php | 77 +- include/user_common.php | 511 +- include/user_menu.php | 475 +- include/verif_bilan.inc.php | 26 +- sql/upgrade.sql | 421 + 390 files changed, 55443 insertions(+), 29315 deletions(-) delete mode 100644 addon/class.ezpdf.php delete mode 100644 addon/class.pdf.php delete mode 100644 addon/data.txt delete mode 100644 addon/readme.pdf delete mode 100644 addon/readme.php delete mode 100644 addon/ros.jpg delete mode 100755 dev/add-db.sh create mode 100755 dev/add_require.py create mode 100755 dev/change.py create mode 100644 dev/compile_text.sh create mode 100644 dev/extract_text.sh create mode 100644 dev/plugin_client.txt delete mode 100644 dev/reset.sql delete mode 100644 dev/reset_seq_jrn.sql create mode 100755 dev/transform.py create mode 100755 dev/usage_file.py create mode 100755 dev/usage_function.py create mode 100755 dev/without_check.py create mode 100644 doc/Diagram5.dia create mode 100644 doc/data.dia create mode 100644 doc/document.dia create mode 100644 doc/document2.dia create mode 100644 html/admin/sql/patch/ac-upgrade10.sql create mode 100644 html/admin/sql/patch/upgrade59.sql create mode 100644 html/admin/sql/patch/upgrade60.sql create mode 100644 html/admin/sql/patch/upgrade61.BE.sql create mode 100644 html/admin/sql/patch/upgrade61.FR.sql create mode 100644 html/admin/sql/patch/upgrade61.sql delete mode 100644 html/admin/test.php delete mode 100644 html/admin/test_me.php create mode 100644 html/ajax_card.php create mode 100644 html/ajax_extension.php create mode 100644 html/ajax_get.php create mode 100644 html/ajax_misc.php create mode 100644 html/ajax_poste.php delete mode 100644 html/calculator.js delete mode 100644 html/calendar.js create mode 100644 html/extension.php create mode 100644 html/fiche_new.php.deprecated create mode 100644 html/fid_card.php delete mode 100644 html/image/body-aqua.jpg delete mode 100644 html/image/bouton.jpg delete mode 100644 html/image/bouton2.jpg delete mode 100644 html/image/bouton3.jpg delete mode 100644 html/image/bouton4.png delete mode 100644 html/image/clouds2.jpg delete mode 100644 html/image/clouds3.jpg delete mode 100644 html/image/compta.png delete mode 100644 html/image/comptaanal.png create mode 100644 html/image/down.gif delete mode 100644 html/image/down.png delete mode 100644 html/image/elegant-l.jpg delete mode 100644 html/image/elegant-n.jpg delete mode 100644 html/image/freebtn1-b.jpg delete mode 100644 html/image/freebtn1-l.gif delete mode 100644 html/image/freebtn1-l.jpg delete mode 100644 html/image/freebtn1-ll.gif delete mode 100644 html/image/freebtn1.gif delete mode 100644 html/image/freebtn2.gif delete mode 100644 html/image/freebtn21.gif delete mode 100644 html/image/freebtn31.gif delete mode 100644 html/image/freebtn91.gif delete mode 100644 html/image/glaslake1.jpg delete mode 100644 html/image/glaslake2.jpg create mode 100644 html/image/load.gif create mode 100644 html/image/loading.gif create mode 100644 html/image/select1.gif delete mode 100644 html/image/select1.png create mode 100644 html/image/select2.gif delete mode 100644 html/image/select2.png create mode 100644 html/image/up.gif delete mode 100644 html/image/up.png create mode 100644 html/js/acc_ledger.js create mode 100644 html/js/acc_report.js create mode 100644 html/js/accounting_item.js delete mode 100644 html/js/ajax_op.js create mode 100644 html/js/anc_script.js create mode 100644 html/js/bq_import.js delete mode 100644 html/js/bud_script.js create mode 100644 html/js/builder.js delete mode 100644 html/js/caod_compute.js create mode 100644 html/js/card.js create mode 100644 html/js/controls.js create mode 100644 html/js/dragdrop.js create mode 100644 html/js/effects.js create mode 100644 html/js/extension.js create mode 100644 html/js/forecast.js create mode 100644 html/js/gestion.js delete mode 100644 html/js/jrn_concerned.js delete mode 100644 html/js/mintoolkit.js delete mode 100644 html/js/modify_op.js create mode 100644 html/js/scriptaculous.js delete mode 100644 html/js/search_poste.js create mode 100644 html/js/slider.js create mode 100644 html/js/sound.js create mode 100644 html/js/unittest.js create mode 100644 html/lang/en_US/LC_MESSAGES/messages.po create mode 100644 html/lang/nl_NL/LC_MESSAGES/messages.po delete mode 100644 html/richtext.js create mode 100644 include/action.common.inc.php create mode 100644 include/adm.inc.php create mode 100644 include/adm_card.inc.php delete mode 100644 include/bud_synthese.inc.php delete mode 100644 include/check_priv.php create mode 100644 include/class_action_detail.php create mode 100644 include/class_anticipation.php create mode 100644 include/class_calendar.php create mode 100644 include/class_database.php create mode 100644 include/class_extension.php create mode 100644 include/class_forecast.php create mode 100644 include/class_forecast_cat.php create mode 100644 include/class_forecast_item.php create mode 100755 include/class_html_input.php create mode 100644 include/class_iaction.php create mode 100644 include/class_ibutton.php create mode 100644 include/class_icard.php create mode 100644 include/class_icardctrl.php create mode 100644 include/class_icheckbox.php create mode 100644 include/class_iconcerned.php create mode 100644 include/class_idate.php create mode 100644 include/class_ifile.php create mode 100644 include/class_ihidden.php create mode 100644 include/class_inum.php create mode 100644 include/class_iperiod.php create mode 100644 include/class_ipopup.php rename include/{class_acexception.php => class_ipopupcard.php} (85%) create mode 100644 include/class_iposte.php create mode 100644 include/class_iradio.php create mode 100644 include/class_isearch.php create mode 100644 include/class_iselect.php create mode 100644 include/class_ispan.php create mode 100644 include/class_itext.php create mode 100644 include/class_itextarea.php create mode 100644 include/class_itva.php create mode 100644 include/class_itva_select.php delete mode 100644 include/class_widget.php create mode 100644 include/client_card.inc.php create mode 100644 include/detail_adm.inc.php create mode 100644 include/detail_client.inc.php create mode 100644 include/detail_supplier.inc.php create mode 100755 include/ext/dummy/dummy.php create mode 100644 include/ext_inc.php create mode 100644 include/extension.inc.php delete mode 100644 include/fiche_inc.php create mode 100644 include/forecast.inc.php create mode 100644 include/function_javascript.php create mode 100644 include/operation_adm.inc.php rename html/js/update_pcmn.js => include/operation_client.inc.php (67%) rename html/js/cancel_op.js => include/operation_supplier.inc.php (67%) delete mode 100644 include/poste.php delete mode 100644 include/postgres.php delete mode 100644 include/preference.php create mode 100644 include/suivi_adm.inc.php create mode 100644 include/suivi_client.inc.php create mode 100644 include/suivi_supplier.inc.php create mode 100644 include/supplier_card.inc.php create mode 100644 include/template/account_result.php create mode 100644 include/template/account_search.php create mode 100644 include/template/calendar.php create mode 100644 include/template/card_result.php create mode 100644 include/template/category_of_card.php create mode 100644 include/template/dashboard.php create mode 100644 include/template/detail-action.php create mode 100644 include/template/extension-detail.php create mode 100644 include/template/extension-sec.php create mode 100644 include/template/extension.php create mode 100644 include/template/fiche_def_input.php create mode 100644 include/template/forecast-detail.php create mode 100644 include/template/forecast_cat.php create mode 100644 include/template/forecast_result.php create mode 100644 include/template/form_ledger_detail.php create mode 100644 include/template/form_ledger_fin.php create mode 100644 include/template/form_ledger_ven.php create mode 100644 include/template/ledger_search.php diff --git a/Changelog b/Changelog index aac5672df..b67246a4e 100644 --- a/Changelog +++ b/Changelog @@ -1,8069 +1,2782 @@ -2008-11-26 21:55 danydb +2009-02-20 19:42 danydb - * include/class_acc_ledger_purchase.php, - include/class_acc_ledger_sold.php: Payment : Add the flag is paid + * phpcompta/branches/rel500: + *************************************** + Next release + *************************************** -2008-11-26 21:44 danydb +2009-02-20 19:43 danydb - * .: Removed merge tracking for "svnmerge" for - svn+ssh://danydb@svn/svn/phpcompta/branches/rel420 + * phpcompta/branches/rel500: + Initialized merge tracking via "svnmerge" with revisions "1-2351" + from + svn+ssh://danydb@svn/svn/phpcompta/trunk -2008-11-26 18:43 danydb +2009-02-20 20:34 danydb - * html/index.php: Change version number + * phpcompta/branches/rel500/addon, + phpcompta/branches/rel500/dev/add_require.py, + phpcompta/branches/rel500/dev/change.py, + phpcompta/branches/rel500/dev/transform.py, + phpcompta/branches/rel500/dev/usage_file.py, + phpcompta/branches/rel500/dev/usage_function.py, + phpcompta/branches/rel500/dev/without_check.py, + phpcompta/branches/rel500/html/access.php, + phpcompta/branches/rel500/include/ac_common.php, + phpcompta/branches/rel500/include/central_inc.php, + phpcompta/branches/rel500/include/check_priv.php, + phpcompta/branches/rel500/include/import_inc.php, + phpcompta/branches/rel500/include/impress_inc.php, + phpcompta/branches/rel500/include/postgres.php, + phpcompta/branches/rel500/include/user_menu.php: + Code cleaning -2008-11-26 18:32 danydb +2009-02-26 18:03 danydb - * ., contrib/document_test/facture-calc.ods, - contrib/document_test/facture.odt, - contrib/document_test/note-de-frais.odt, doc/manuel-fr.odt, - html/admin/sql/patch/upgrade52.sql, html/fiche_search.php, - html/parametre.php, html/test.php, include/class_acc_ledger.php, - include/class_acc_ledger_purchase.php, - include/class_acc_ledger_sold.php, include/class_acc_payment.php, - include/class_action.php, include/class_document.php, - include/class_document_modele.php, include/class_fiche_def.php, - include/class_pre_op_ach.php, include/class_pre_op_ven.php, - include/class_widget.php, include/constant.php, - include/fiche_def.inc.php, include/payment_middle.inc.php, - include/preference.php, include/user_menu.php, sql/upgrade.sql: - Merged revisions - 2171,2173-2176,2178-2179,2181-2187,2189,2191-2194,2196-2230,2232,2234-2244 - via svnmerge from - svn+ssh://danydb@svn/svn/phpcompta/branches/rel420 + * phpcompta/branches/rel500, + phpcompta/branches/rel500/html/admin/setup.php, + phpcompta/branches/rel500/html/user_pref.php, + phpcompta/branches/rel500/include/balance.inc.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/compta_fin.inc.php, + phpcompta/branches/rel500/include/impress_jrn.inc.php, + phpcompta/branches/rel500/include/opening.inc.php, + phpcompta/branches/rel500/include/user_common.php: + Merged revisions 2352-2362 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk ........ - r2174 | danydb | 2008-09-16 21:34:23 +0200 (Tue, 16 Sep 2008) | 3 - lines - - Removed merge tracking for "svnmerge" for - svn+ssh://danydb@svn/svn/phpcompta/branches/rel410-exp - ........ - r2178 | danydb | 2008-09-16 21:43:31 +0200 (Tue, 16 Sep 2008) | 1 + r2354 | danydb | 2009-02-24 23:16:33 +0100 (Tue, 24 Feb 2009) | 1 line - Update version + bug add a "All ledger" into the ledger choice for reporting + balance ........ - r2191 | danydb | 2008-09-22 20:31:03 +0200 (Mon, 22 Sep 2008) | 1 + r2355 | danydb | 2009-02-25 09:06:00 +0100 (Wed, 25 Feb 2009) | 1 line - Add correct version + default value ........ - r2196 | danydb | 2008-10-03 21:46:50 +0200 (Fri, 03 Oct 2008) | 1 + r2356 | danydb | 2009-02-25 09:19:31 +0100 (Wed, 25 Feb 2009) | 1 line - update index version + fix mini report ........ - r2234 | danydb | 2008-11-19 20:54:30 +0100 (Wed, 19 Nov 2008) | 1 + r2357 | danydb | 2009-02-25 14:18:26 +0100 (Wed, 25 Feb 2009) | 1 line - Add the payer, not yet finished + Remove warning about work_mem et use_trans_sid ........ - r2235 | danydb | 2008-11-21 22:34:32 +0100 (Fri, 21 Nov 2008) | 1 + r2358 | danydb | 2009-02-25 16:21:39 +0100 (Wed, 25 Feb 2009) | 1 line - Add the form for setting the medium of payment + Bug ajax ........ - r2236 | danydb | 2008-11-22 23:15:30 +0100 (Sat, 22 Nov 2008) | 1 - line - - Improve add : payment (second operation) + generation of a note - of fee - ........ - r2237 | danydb | 2008-11-23 01:20:40 +0100 (Sun, 23 Nov 2008) | 1 - line - - Improve Payment method - ........ - r2238 | danydb | 2008-11-23 01:45:52 +0100 (Sun, 23 Nov 2008) | 1 - line - - Get only the valid payment method - ........ - r2239 | danydb | 2008-11-24 23:03:34 +0100 (Mon, 24 Nov 2008) | 1 - line - - cosmetic remove debug info - ........ - r2240 | danydb | 2008-11-24 23:04:07 +0100 (Mon, 24 Nov 2008) | 1 - line - - Filter the search to the good frd_id - ........ - r2241 | danydb | 2008-11-26 18:11:30 +0100 (Wed, 26 Nov 2008) | 2 - lines - - BUG if no class base is given the flag create account is false - ........ - r2242 | danydb | 2008-11-26 18:45:56 +0100 (Wed, 26 Nov 2008) | 1 - line - - Create note of fee + database patch - ........ - -2008-11-26 18:21 danydb - - * .: Initialized merge tracking via "svnmerge" with revisions - "1-2170" from - svn+ssh://danydb@svn/svn/phpcompta/branches/rel420 - -2008-11-26 18:18 danydb - - * .: Initialized merge tracking via "svnmerge" with revisions - "1-2242" from - svn+ssh://danydb@svn/svn/phpcompta/branches/rel420 - -2008-11-19 17:56 danydb - - * include/dossier.inc.php: BUG sequence dossier - -2008-11-17 19:58 danydb - - * include/class_acc_ledger_fin.php: Cosmetic - -2008-11-17 19:55 danydb - - * html/admin/sql/patch/upgrade51.sql: Add database patch - -2008-11-17 19:50 danydb - - * html/access.php, html/annulation.php, html/line_update.php, - html/parametre.php, include/ac_common.php, - include/class_acc_account.php, include/class_acc_ledger.php, - include/class_acc_ledger_fin.php, - include/class_acc_ledger_purchase.php, - include/class_acc_ledger_sold.php, include/class_dossier.php, - include/class_own.php, include/class_todo_list.php, - include/constant.php, include/poste.php, include/postgres.php, - include/user_common.php, sql/upgrade.sql: Code cleaning and add - the mode strict - -2008-11-10 09:06 danydb - - * html/fiche_search.php, include/user_menu.php: BUG : if the search - menu it is not possible to add new card - -2008-11-07 17:27 danydb - - * html/jrn_search.php: BUG search value - -2008-11-07 17:01 danydb - - * html/compute.php, include/compta_ach.inc.php: BUG rounded value - -2008-11-07 16:46 danydb - - * html/js/scripts.js: BUG compute tva when amount changes - -2008-11-07 16:46 danydb - - * include/class_acc_ledger_purchase.php: BUG compute tva when - amount changes - -2008-11-07 16:39 danydb - - * html/js/scripts.js: BUG compute tva when amount changes - -2008-11-05 20:33 danydb - - * html/jrn_search.php: Search into the details - -2008-11-05 18:59 danydb - - * include/user_common.php: Search on the details when the amount - are the same - -2008-11-05 18:42 danydb - - * html/admin/htaccess.cfg, html/htaccess.cfg, include/htaccess.cfg, - include/user_common.php: Remove obsolete files - -2008-10-31 19:20 danydb - - * include/class_acc_ledger_purchase.php, - include/compta_ach.inc.php, include/impress_fiche.inc.php: FS#69 - - Calculatrice - -2008-10-11 15:02 danydb - - * html/poste_pdf.php: FIX BUG unicode - -2008-10-10 21:27 danydb - - * html/ajax_report.php: BUG export report - -2008-10-10 21:25 danydb - - * html/ajax_report.php: BUG export report - -2008-10-10 21:18 danydb - - * html/ajax_report.php: BUG Export report - -2008-10-10 20:22 danydb - - * include/class_user.php: BUG cosmetic remove debug info - -2008-10-10 20:20 danydb - - * include/class_user.php: BUG set default periode - -2008-10-10 19:23 danydb - - * include/class_user.php, include/class_widget.php: BUG not default - periode if the user comes into a closed ledger - -2008-10-09 21:56 danydb - - * html/jrn_pdf.php, include/param_jrn_add.inc.php, - include/param_jrn_detail.inc.php: IMPROVE parameter ledger && BUG - unicode in PDF - -2008-10-09 21:43 danydb - - * include/user_menu.php: IMPROVE parameter ledger - -2008-10-09 21:40 danydb - - * include/param_jrn_add.inc.php, include/param_jrn_detail.inc.php: - TO CLEAN remove obsolete data for ledger - -2008-10-09 21:29 danydb - - * include/class_acc_ledger.php, include/quick_writing.inc.php: - IMPROVE Show ledger in Quick_writing - -2008-10-09 20:19 danydb - - * include/class_acc_account_ledger.php, - include/class_acc_ledger.php: IMPROVE QuickWriting check if - account exist - -2008-10-08 17:45 danydb - - * html/backup.php, html/js/scripts.js, - include/class_acc_ledger.php, include/class_acc_operation.php, - include/jrn.php, include/restore.inc.php, - include/user_common.php, include/user_menu.php: IMPROVE OD have - now a label per line - -2008-10-08 15:59 danydb - - * include/class_acc_ledger_fin.php: BUG Financial ledger decimal - invisible - -2008-10-08 15:59 danydb - - * html/admin/setup.php: Merge - -2008-10-08 15:51 danydb - - * include/class_user.php: BUG $l_array is undefined is there is no - preference - -2008-10-07 20:23 danydb - - * html/admin/setup.php, html/index.php, include/config_file.php: - BUG windows backup & restore - -2008-10-07 20:10 danydb - - * html/backup.php: BUG windows backup, setting the path doesn t - work, so I remove this. - -2008-10-07 19:26 danydb - - * html/admin/setup.php, html/backup.php, include/config_file.php: - BUG Backup restore for windows - -2008-10-07 19:08 danydb - - * html/admin/setup.php, html/backup.php, include/config_file.php: - BUG Backup restore for windows - -2008-10-07 18:57 danydb - - * html/backup.php, html/index.php, include/config_file.php: BUG - windows : backup / restore not possible - -2008-10-03 19:43 danydb - - * html/index.php, include/ac_common.php: Fix bug for echo_error - -2008-09-23 17:41 danydb - - * include/class_user.php: Remove bug in creation of folders - -2008-09-22 20:51 danydb - - * include/class_fiche_def.php, include/class_widget.php: Fix bug : - page is illimited - -2008-09-22 18:06 danydb - - * html/index.php: add a build - -2008-09-22 17:51 danydb - - * html/js/todo_list.js: Fix Bug : the removal of a todo doesn't ask - to be confirmed - -2008-09-22 17:50 danydb - - * include/class_widget.php: Fix Bug PHPSESSID was not in the - button, workaround for a misconfigured servers - -2008-09-18 19:14 danydb - - * include/import_inc.php: Fix bug Add quick code in import - -2008-09-18 18:52 danydb - - * include/class_acc_ledger_fin.php: Fix Bug : ledger financial - qcode - -2008-09-18 17:45 danydb - - * include/class_periode.php: Fix bug for limit_year - -2008-09-18 14:46 danydb - - * include/class_acc_ledger_fin.php: Bug verify financial - -2008-09-18 11:17 danydb - - * include/class_acc_ledger_fin.php, include/compta_fin.inc.php: - Correct bug financial ledger - -2008-09-16 19:53 danydb - - * include/restore.inc.php: Fix bug restore mod - -2008-09-16 19:36 danydb - - * .: Removed merge tracking for "svnmerge" for - svn+ssh://danydb@svn/svn/phpcompta/branches/rel410-exp - -2008-09-16 19:25 danydb - - * Todo: update doc - -2008-09-16 17:23 danydb - - * doc/manuel_win2.odt: doc update - -2008-09-16 16:41 danydb - - * doc/manuel_win2.odt: update doc - -2008-09-16 16:32 danydb - - * include/restore.inc.php: fix problem with restore - -2008-09-13 21:21 danydb - - * class_periode.php, html/.htaccess, html/confirm_remove.php, - html/export_ouv.php, html/send_jrn_pdf.php, - html/send_poste_pdf.php, html/style-color.css, - include/class_parm_code.php, include/class_rapport.php, - include/class_rapport_row.php, include/depense.inc.php, - include/facture.inc.php, include/user_action_ach.php, - include/user_action_fin.php, include/user_action_ods.php, - include/user_action_ven.php, include/user_form_ach.php, - include/user_form_fin.php, include/user_form_ven.php: remove - obsolete - -2008-09-13 21:09 danydb - - * ., .cvsignore, class_periode.php, - contrib/document_test/facture-calc.ods, dev/add-db.sh, - dev/cleanup.sh, doc/.cvsignore, doc/INSTALL-fr.sgml, - doc/Makefile, doc/developper/.cvsignore, - doc/developper/create_doc.sh, doc/developper/html, - doc/install_windows_fr.sxw, doc/manuel-fr.odt, doc/manuel-fr.pdf, - doc/manuel.odt, doc/manuel_win2.odt, doc/testing-scenario.txt, - html/.htaccess, html/access.php, html/addon/class.ezpdf.php, - html/addon/class.pdf.php, html/admin/htaccess.cfg, - html/admin/setup.php, - html/admin/sql/account_repository/constraint.sql, - html/admin/sql/account_repository/data.sql, - html/admin/sql/account_repository/make-sql, - html/admin/sql/account_repository/schema.sql, - html/admin/sql/mod1/comment.sql, - html/admin/sql/mod1/constraint.sql, html/admin/sql/mod1/data.sql, - html/admin/sql/mod1/make-sql, html/admin/sql/mod1/schema.sql, - html/admin/sql/mod2/data.sql, - html/admin/sql/patch/ac-upgrade8.sql, - html/admin/sql/patch/downgrade7.sql, - html/admin/sql/patch/upgrade11.sql, - html/admin/sql/patch/upgrade13.sql, - html/admin/sql/patch/upgrade14.sql, - html/admin/sql/patch/upgrade28.sql, - html/admin/sql/patch/upgrade31.sql, - html/admin/sql/patch/upgrade36.FR.sql, - html/admin/sql/patch/upgrade36.sql, - html/admin/sql/patch/upgrade4.sql, - html/admin/sql/patch/upgrade40.sql, - html/admin/sql/patch/upgrade48.sql, - html/admin/sql/patch/upgrade49.sql, - html/admin/sql/patch/upgrade50.sql, - html/admin/sql/patch/upgrade6.sql, - html/admin/sql/patch/upgrade7.sql, - html/admin/sql/patch/upgrade8.sql, html/admin/test.php, - html/admin/test_me.php, html/admin_repo.php, - html/ajax_report.php, html/annulation.php, html/backup.php, - html/bal_csv.php, html/bud_ajax.php, html/bud_search_poste.php, - html/commercial.php, html/compta.php, html/compute.php, - html/confirm_remove.php, html/control.php, html/ecrit_ouv.php, - html/export_ouv.php, html/fiche.php, html/fiche_new.php, - html/fiche_search.php, html/fid.php, html/form.php, - html/form_csv.php, html/form_pdf.php, html/get_predef.php, - html/htaccess.cfg, html/import.php, html/index.php, - html/jrn_pdf.php, html/jrn_search.php, html/js/ajax_fiche.js, - html/js/compute_direct.js, html/js/infobulle.js, - html/js/mintoolkit.js, html/js/prototype.js, html/js/scripts.js, - html/js/search_card.js, html/js/search_poste.js, - html/js/todo_list.js, html/line_update.php, html/modify_op.php, - html/parametre.php, html/poste_csv.php, html/poste_pdf.php, - html/poste_search.php, html/print_balance.php, - html/priv_user.php, html/quick_code_csv.php, - html/quick_code_pdf.php, html/remove_op.php, html/sec_pdf.php, - html/send_jrn_pdf.php, html/send_poste_pdf.php, - html/show_fiche.php, html/show_tva.php, html/style-color.css, - html/style-light.css, html/style.css, html/test.php, html/tmp, - html/todo_list.php, html/user_advanced.php, html/user_jrn.php, - html/user_login.php, html/user_pref.php, html/user_sec.php, - include/.htaccess, include/ac_common.php, include/action.inc.php, - include/anc_group.inc.php, include/anc_imp.inc.php, - include/anc_od.inc.php, include/argenta_be.inc.php, - include/balance.inc.php, include/bank.inc.php, - include/bud_detail.inc.php, include/bud_sacc.inc.php, - include/bud_sga.inc.php, include/bud_spo.inc.php, - include/bud_svglobal.inc.php, include/cbc_be.inc.php, - include/central.inc.php, include/check_priv.php, - include/class_acc_account.php, - include/class_acc_account_ledger.php, - include/class_acc_compute.php, include/class_acc_jrn_info.php, - include/class_acc_ledger.php, include/class_acc_ledger_fin.php, - include/class_acc_ledger_info.php, - include/class_acc_ledger_purchase.php, - include/class_acc_ledger_sold.php, - include/class_acc_operation.php, include/class_acc_parm_code.php, - include/class_acc_report.php, include/class_acc_report_row.php, - include/class_acc_tva.php, include/class_action.php, - include/class_admin.php, include/class_attribut.php, - include/class_contact.php, include/class_customer.php, - include/class_document.php, include/class_document_modele.php, - include/class_dossier.php, include/class_fiche.php, - include/class_fiche_def.php, include/class_own.php, - include/class_parm_code.php, include/class_periode.php, - include/class_pre_op_ach.php, include/class_pre_op_ven.php, - include/class_pre_operation.php, include/class_rapport.php, - include/class_rapport_row.php, include/class_supplier.php, - include/class_todo_list.php, include/class_user.php, - include/class_widget.php, include/client.inc.php, - include/compta_ach.inc.php, include/compta_fin.inc.php, - include/compta_ven.inc.php, include/config.inc, - include/config_file.php, include/constant.php, - include/contact.inc.php, include/decla.BE.inc.php, - include/depense.inc.php, include/dexia.inc.php, - include/dexia_be.inc.php, include/dossier.inc.php, - include/eub_be.inc.php, include/facture.inc.php, - include/fiche.inc.php, include/fiche_inc.php, - include/form_inc.php, include/fortis_be.inc.php, - include/import_inc.php, include/impress_bilan.inc.php, - include/impress_fiche.inc.php, include/impress_inc.php, - include/impress_jrn.inc.php, - include/impress_listing_client.inc.php, - include/impress_poste.inc.php, include/impress_rapport.inc.php, - include/ing_be.inc.php, include/jrn.php, include/modele.inc.php, - include/opening.inc.php, include/param_jrn_add.inc.php, - include/param_jrn_detail.inc.php, include/param_pcmn.inc.php, - include/param_sec.inc.php, include/param_user.inc.php, - include/periode.inc.php, include/poste.inc.php, - include/poste.php, include/postgres.php, include/pref.inc.php, - include/preference.php, include/preod.inc.php, - include/quick_writing.inc.php, include/report.inc.php, - include/restore.inc.php, include/stock.inc.php, - include/stock_inc.php, include/supplier.inc.php, - include/tva.inc.php, include/user_action_ach.php, - include/user_action_fin.php, include/user_action_gl.php, - include/user_action_ods.php, include/user_action_ven.php, - include/user_common.php, include/user_form_ach.php, - include/user_form_fin.php, include/user_form_ods.php, - include/user_form_ven.php, include/user_menu.php, - include/verif_bilan.inc.php, install.sh, release-note, scripts, - setenv.sh, sql/5306, sql/log, sql/upgrade.sql: Merged revisions - 1909-1911,1914-1915,1917-1920,1922-1925,1927,1929-1943,1945,1947-1953,1955-1965,1967-1977,1979-1993,1995-2018,2020-2040,2042-2046,2048-2160 - via svnmerge from - svn+ssh://danydb@svn/svn/phpcompta/branches/rel410-exp - - ........ - r1909 | danydb | 2008-03-03 18:01:14 +0100 (Mon, 03 Mar 2008) | 1 - line - - New branches for the rel410 : priority = interface - ........ - r1914 | danydb | 2008-03-05 18:53:35 +0100 (Wed, 05 Mar 2008) | 1 - line - - Code cleaning for the predefined operation - ........ - r1918 | danydb | 2008-03-07 16:56:47 +0100 (Fri, 07 Mar 2008) | 1 - line - - The database version is now in a constant - ........ - r1920 | danydb | 2008-03-10 12:07:00 +0100 (Mon, 10 Mar 2008) | 1 - line - - Not needed patch - ........ - r1922 | danydb | 2008-03-10 16:45:29 +0100 (Mon, 10 Mar 2008) | 1 - line - - COSMETIC : improve login page - ........ - r1923 | danydb | 2008-03-10 17:10:52 +0100 (Mon, 10 Mar 2008) | 1 - line - - COSMETIC : improve interface template of document - ........ - r1924 | danydb | 2008-03-10 18:34:12 +0100 (Mon, 10 Mar 2008) | 1 - line - - Cosmetic : improve interface "preference" - ........ - r1929 | danydb | 2008-03-11 16:08:53 +0100 (Tue, 11 Mar 2008) | 1 - line - - Complete workaround (see rev 1927) - ........ - r1930 | danydb | 2008-03-11 18:28:23 +0100 (Tue, 11 Mar 2008) | 1 - line - - Task 46 : rewrite Rapport before adding miniRapport - ........ - r1931 | danydb | 2008-03-11 18:36:31 +0100 (Tue, 11 Mar 2008) | 1 - line - - class_periode was removed by mistake, it is readded - ........ - r1932 | danydb | 2008-03-12 19:12:07 +0100 (Wed, 12 Mar 2008) | 1 - line - - task 46 : rewritting of rapport - ........ - r1934 | danydb | 2008-03-13 14:13:23 +0100 (Thu, 13 Mar 2008) | 1 - line - - Task 46 Rapport are completely rewritted - ........ - r1935 | danydb | 2008-03-13 17:06:36 +0100 (Thu, 13 Mar 2008) | 1 - line - - Task 46 mini report on welcome page -> task finished - ........ - r1936 | danydb | 2008-03-14 10:55:15 +0100 (Fri, 14 Mar 2008) | 1 - line - - Correct documentation - ........ - r1937 | danydb | 2008-03-14 12:13:54 +0100 (Fri, 14 Mar 2008) | 1 - line - - if the browser doesn\'t accept the cookie, the PHPSESSID must be - put into the url - ........ - r1938 | danydb | 2008-03-14 16:26:01 +0100 (Fri, 14 Mar 2008) | 1 - line - - Fix unknow pass_1 - ........ - r1939 | danydb | 2008-03-14 16:27:15 +0100 (Fri, 14 Mar 2008) | 1 - line - - Duplicate DBVERSION - ........ - r1940 | danydb | 2008-03-14 16:50:14 +0100 (Fri, 14 Mar 2008) | 1 + r2359 | danydb | 2009-02-25 16:28:28 +0100 (Wed, 25 Feb 2009) | 1 line Cosmetic ........ - r1941 | danydb | 2008-03-14 16:51:19 +0100 (Fri, 14 Mar 2008) | 1 - line - - In .htaccess the value of error_reporting must different in prod. - ........ - r1943 | danydb | 2008-03-15 20:13:47 +0100 (Sat, 15 Mar 2008) | 1 - line - - task 50 : check if bcmath avail. - ........ - r1952 | danydb | 2008-03-18 16:43:48 +0100 (Tue, 18 Mar 2008) | 1 - line - - Improve code - ........ - r1955 | danydb | 2008-03-18 18:19:35 +0100 (Tue, 18 Mar 2008) | 1 - line - - Code cleaning : Replace InsertJrn and InsertJrnx by - Acc_Operation:insert_jrn and Acc_Operation:insert_jrnx, replace - also the reconciliation by Acc_Reconciliation:insert - ........ - r1956 | danydb | 2008-03-19 19:12:37 +0100 (Wed, 19 Mar 2008) | 1 - line - - Improve code : tva is now an object acc_tva - ........ - r1957 | danydb | 2008-03-20 13:43:38 +0100 (Thu, 20 Mar 2008) | 1 - line - - Fix some vulnerabilities for SQL Injection - ........ - r1959 | danydb | 2008-03-20 23:07:24 +0100 (Thu, 20 Mar 2008) | 1 - line - - task 34 : Improve CSS - ........ - r1960 | danydb | 2008-03-20 23:45:04 +0100 (Thu, 20 Mar 2008) | 1 - line - - task 48 : improve report - ........ - r1961 | danydb | 2008-03-20 23:52:32 +0100 (Thu, 20 Mar 2008) | 1 - line - - Fix small cosmetic bugs and improve the search account_windows - ........ - r1962 | danydb | 2008-03-20 23:55:07 +0100 (Thu, 20 Mar 2008) | 1 - line - - improve the search account_windows - ........ - r1968 | danydb | 2008-03-21 18:46:26 +0100 (Fri, 21 Mar 2008) | 1 - line - - Improve the account search functionnality - ........ - r1969 | danydb | 2008-03-21 20:29:39 +0100 (Fri, 21 Mar 2008) | 1 - line - - task #31 & task #34 : mail follow-up, 2 step instead of 3 and - improve appearance - ........ - r1970 | danydb | 2008-03-21 22:01:30 +0100 (Fri, 21 Mar 2008) | 1 - line - - Task #27 : modify detail of folder and template - ........ - r1971 | danydb | 2008-03-21 22:22:20 +0100 (Fri, 21 Mar 2008) | 1 - line - - Task 53 : add the tva rate in the generated invoice - ........ - r1972 | danydb | 2008-03-21 22:26:41 +0100 (Fri, 21 Mar 2008) | 1 - line - - Make a insensitive search for the folder name - ........ - r1990 | danydb | 2008-03-26 23:36:46 +0100 (Wed, 26 Mar 2008) | 1 - line - - Conversion to unicode - ........ - r1991 | danydb | 2008-03-26 23:58:06 +0100 (Wed, 26 Mar 2008) | 1 - line - - cosmetic - ........ - r1992 | danydb | 2008-03-26 23:58:08 +0100 (Wed, 26 Mar 2008) | 1 - line - - Remove last latin1 code - ........ - r1995 | danydb | 2008-03-31 17:35:30 +0200 (Mon, 31 Mar 2008) | 1 - line - - report : Add the button Search for new line - ........ - r1996 | danydb | 2008-03-31 17:38:56 +0200 (Mon, 31 Mar 2008) | 1 - line - - report : add the set_poste_child - ........ - r1997 | danydb | 2008-03-31 22:32:05 +0200 (Mon, 31 Mar 2008) | 1 - line - - Next SQL Upgrade for class_acc_tva - ........ - r1998 | danydb | 2008-03-31 22:32:53 +0200 (Mon, 31 Mar 2008) | 1 - line - - Rewriting of class_acc_parm_code - ........ - r1999 | danydb | 2008-03-31 23:13:23 +0200 (Mon, 31 Mar 2008) | 1 - line - - Improve VAT class and form - ........ - r2000 | danydb | 2008-03-31 23:16:37 +0200 (Mon, 31 Mar 2008) | 1 - line - - Rewrite TVA insert - ........ - r2001 | danydb | 2008-04-01 16:01:52 +0200 (Tue, 01 Apr 2008) | 5 - lines - - Start to rewrite ledger encoding - Move predefined operation to preod.inc.php - Add the menu Predefined operation in the parameter module - ........ - r2003 | danydb | 2008-04-01 22:02:26 +0200 (Tue, 01 Apr 2008) | 1 - line - - Ergonomy : drop folder and template - ........ - r2004 | danydb | 2008-04-03 22:59:45 +0200 (Thu, 03 Apr 2008) | 1 - line - - Fix undefined variable in class_periode.php - ........ - r2005 | danydb | 2008-04-04 00:13:05 +0200 (Fri, 04 Apr 2008) | 1 - line - - Fix undefined variable in gestion->customer->operation - ........ - r2006 | danydb | 2008-04-07 14:23:01 +0200 (Mon, 07 Apr 2008) | 1 - line - - Login & mot de passe en français - ........ - r2007 | danydb | 2008-04-07 15:24:56 +0200 (Mon, 07 Apr 2008) | 1 - line - - Documentation : change to unicode - ........ - r2008 | danydb | 2008-04-07 16:42:02 +0200 (Mon, 07 Apr 2008) | 1 - line - - Protect against SQL Injection - ........ - r2009 | danydb | 2008-04-07 16:43:07 +0200 (Mon, 07 Apr 2008) | 1 - line - - Download the definition of a report - ........ - r2010 | danydb | 2008-04-07 16:57:55 +0200 (Mon, 07 Apr 2008) | 2 - lines - - Remove debug info - ........ - r2011 | danydb | 2008-04-07 17:32:17 +0200 (Mon, 07 Apr 2008) | 1 - line - - Upload and save of a definition of a report - ........ - r2012 | danydb | 2008-04-08 17:04:00 +0200 (Tue, 08 Apr 2008) | 1 - line - - task 50 : use of bcmat to avoid rounding problem - ........ - r2013 | danydb | 2008-04-09 13:48:30 +0200 (Wed, 09 Apr 2008) | 2 - lines - - task #36 : add a warning if no mini report is defined - ........ - r2024 | danydb | 2008-04-11 18:02:22 +0200 (Fri, 11 Apr 2008) | 1 - line - - Task #25 : feature backup / restore useful, restore is always in - unicode - ........ - r2025 | danydb | 2008-04-11 18:35:55 +0200 (Fri, 11 Apr 2008) | 1 - line - - task 51 : warning when trying to create a new folder - ........ - r2026 | danydb | 2008-04-12 16:00:09 +0200 (Sat, 12 Apr 2008) | 2 - lines - - Cosmetic : change in the detailled operation Debit by Montant - ........ - r2027 | danydb | 2008-04-12 16:04:32 +0200 (Sat, 12 Apr 2008) | 2 - lines - - Operation ; without details by default - ........ - r2028 | danydb | 2008-04-12 16:04:47 +0200 (Sat, 12 Apr 2008) | 2 - lines - - Remove details from operation supplier - ........ - r2029 | danydb | 2008-04-12 16:15:17 +0200 (Sat, 12 Apr 2008) | 1 - line - - Gestion : fix bug in return button when adding a customer - ........ - r2030 | danydb | 2008-04-12 16:19:19 +0200 (Sat, 12 Apr 2008) | 1 - line - - Gestion : bug remove delete message - ........ - r2031 | danydb | 2008-04-12 16:22:25 +0200 (Sat, 12 Apr 2008) | 3 - lines - - Remove php tag and replace by echo - Add in "Comptabilité" the Great Ledger - ........ - r2032 | danydb | 2008-04-12 17:10:06 +0200 (Sat, 12 Apr 2008) | 1 - line - - Fix Bilan : France bug with unicode - ........ - r2033 | danydb | 2008-04-12 17:17:55 +0200 (Sat, 12 Apr 2008) | 3 - lines - - Separate the user setting from the general constant.php, a - template file is given (config.inc) - Fix some cosmetic bug for this shit of IE - ........ - r2034 | danydb | 2008-04-18 14:51:13 +0200 (Fri, 18 Apr 2008) | 2 - lines - - Fix bug : missing coma - ........ - r2035 | danydb | 2008-04-19 23:39:09 +0200 (Sat, 19 Apr 2008) | 1 - line - - class_widget fix button_href to work on the same way with IE and - firefox - ........ - r2036 | danydb | 2008-05-01 18:17:06 +0200 (Thu, 01 May 2008) | 2 - lines - - task #33 start rewriting of encoding operation (VEN) - ........ - r2037 | danydb | 2008-05-01 18:18:26 +0200 (Thu, 01 May 2008) | 2 - lines - - task #33 start rewriting of encoding operation (VEN) - ........ - r2040 | danydb | 2008-05-07 20:53:32 +0200 (Wed, 07 May 2008) | 1 - line - - Unicode for doxygen - ........ - r2043 | danydb | 2008-05-25 17:32:51 +0200 (Sun, 25 May 2008) | 2 - lines - - Default pref is TEXT instead of SELECT - ........ - r2045 | danydb | 2008-06-14 17:48:46 +0200 (Sat, 14 Jun 2008) | 1 - line - - Add a style input_type - ........ - r2046 | danydb | 2008-06-14 17:49:58 +0200 (Sat, 14 Jun 2008) | 3 - lines - - 1. Replace the CSS class u_content by content, the u_content - existed for historic reason - 2. Start the coding of ledger sold - ........ - r2048 | danydb | 2008-06-14 18:31:55 +0200 (Sat, 14 Jun 2008) | 1 - line - - remove javascript warning - ........ - r2049 | danydb | 2008-06-14 18:32:26 +0200 (Sat, 14 Jun 2008) | 1 - line - - Ledger SOLD add row - ........ - r2050 | danydb | 2008-06-14 19:54:29 +0200 (Sat, 14 Jun 2008) | 1 - line - - Ledger sold : replace dot by style - ........ - r2051 | danydb | 2008-06-14 21:08:48 +0200 (Sat, 14 Jun 2008) | 1 - line - - correct unicode char in doc folder - ........ - r2052 | danydb | 2008-06-14 23:58:01 +0200 (Sat, 14 Jun 2008) | 1 - line - - Ledger SOLD : automatic update of the total - ........ - r2053 | danydb | 2008-06-15 12:05:02 +0200 (Sun, 15 Jun 2008) | 1 - line - - Performance : the prototype.js is quite heavy, and is not any - more included in every page, instead now, there is a - html_min_start_page with a minimum of javascript files and a - mintoolkit.js which contains the minimum for javascript - ........ - r2054 | danydb | 2008-06-15 12:17:22 +0200 (Sun, 15 Jun 2008) | 1 - line - - Prototype.js performance, included only if needed, improve - performance for access.php, user_login.php - ........ - r2055 | danydb | 2008-06-19 11:29:52 +0200 (Thu, 19 Jun 2008) | 1 - line - - Cosmetic : Adapt CSS for F3 - ........ - r2056 | danydb | 2008-06-19 12:18:13 +0200 (Thu, 19 Jun 2008) | 1 - line - - remove useless comment and debug message - ........ - r2057 | danydb | 2008-06-19 12:32:58 +0200 (Thu, 19 Jun 2008) | 1 - line - - Update CSS classic - ........ - r2058 | danydb | 2008-06-24 01:14:21 +0200 (Tue, 24 Jun 2008) | 1 - line - ........ - r2059 | danydb | 2008-06-28 14:05:23 +0200 (Sat, 28 Jun 2008) | 1 - line - - task #67 : infobulle - ........ - r2060 | danydb | 2008-06-28 14:16:37 +0200 (Sat, 28 Jun 2008) | 1 - line - - Bug in add_row - ........ - r2061 | danydb | 2008-06-28 14:16:49 +0200 (Sat, 28 Jun 2008) | 1 - line - - task #67 : infobulle - ........ - r2062 | danydb | 2008-06-28 15:21:57 +0200 (Sat, 28 Jun 2008) | 1 - line - - Compute the sold amount via javascript - ........ - r2063 | danydb | 2008-06-28 15:34:38 +0200 (Sat, 28 Jun 2008) | 1 - line - - Correct typo - ........ - r2064 | danydb | 2008-07-01 23:02:29 +0200 (Tue, 01 Jul 2008) | 1 - line - - Add predef operation for VEN - ........ - r2065 | danydb | 2008-07-02 23:57:45 +0200 (Wed, 02 Jul 2008) | 1 - line - - Fixed undefined use_predef - ........ - r2066 | danydb | 2008-07-03 15:27:22 +0200 (Thu, 03 Jul 2008) | 2 - lines - - Work without prototype.js - ........ - r2067 | danydb | 2008-07-03 18:33:03 +0200 (Thu, 03 Jul 2008) | 2 - lines - - Fix bug with undefined variable - ........ - r2068 | danydb | 2008-07-03 18:43:53 +0200 (Thu, 03 Jul 2008) | 2 - lines - - typo - ........ - r2069 | danydb | 2008-07-03 20:37:06 +0200 (Thu, 03 Jul 2008) | 1 - line - - New version for Ledger sold and invoice - ........ - r2070 | danydb | 2008-07-03 20:56:47 +0200 (Thu, 03 Jul 2008) | 1 - line - - Update infobulle + typo - ........ - r2071 | danydb | 2008-07-04 12:55:16 +0200 (Fri, 04 Jul 2008) | 1 - line - - Correct last bug for compta_ven - ........ - r2072 | danydb | 2008-07-04 14:34:24 +0200 (Fri, 04 Jul 2008) | 1 - line - - Task#39 Migrate to unicode - ........ - r2073 | danydb | 2008-07-04 14:34:47 +0200 (Fri, 04 Jul 2008) | 1 - line - - Task#39 Migrate to unicode - ........ - r2074 | danydb | 2008-07-04 14:40:38 +0200 (Fri, 04 Jul 2008) | 2 - lines - - Add documentation for task #39 (unicode) - ........ - r2075 | danydb | 2008-07-04 14:53:47 +0200 (Fri, 04 Jul 2008) | 2 - lines - - cosmetic - ........ - r2076 | danydb | 2008-07-04 16:52:56 +0200 (Fri, 04 Jul 2008) | 2 - lines - - cosmetic - ........ - r2077 | danydb | 2008-07-04 18:02:23 +0200 (Fri, 04 Jul 2008) | 1 - line - - Update CSS - ........ - r2078 | danydb | 2008-07-04 18:22:11 +0200 (Fri, 04 Jul 2008) | 2 - lines - - Add reset type - ........ - r2079 | danydb | 2008-07-04 21:50:24 +0200 (Fri, 04 Jul 2008) | 1 - line - - Rewriting of the financial ledger - ........ - r2080 | danydb | 2008-07-04 21:53:43 +0200 (Fri, 04 Jul 2008) | 1 + r2360 | danydb | 2009-02-25 16:29:29 +0100 (Wed, 25 Feb 2009) | 1 line Cosmetic ........ - r2081 | danydb | 2008-07-05 00:18:17 +0200 (Sat, 05 Jul 2008) | 1 - line - - Ledger Purchase - ........ - r2082 | danydb | 2008-07-05 00:18:42 +0200 (Sat, 05 Jul 2008) | 1 - line - - rename compta_ach.php - ........ - r2083 | danydb | 2008-07-05 03:49:35 +0200 (Sat, 05 Jul 2008) | 1 - line - - Finish ledger purchase - ........ - r2084 | danydb | 2008-07-05 04:22:50 +0200 (Sat, 05 Jul 2008) | 1 - line - - bugs ledger purchase + javascript : need to trim parameters for - Ajax (qcode and amounts) - ........ - r2085 | danydb | 2008-07-05 06:04:21 +0200 (Sat, 05 Jul 2008) | 1 - line - - Rewriting of the ledger is complete, now we can remove dead code - and files - ........ - r2086 | danydb | 2008-07-05 14:10:23 +0200 (Sat, 05 Jul 2008) | 1 - line - - Correct javascript bugs - ........ - r2087 | danydb | 2008-07-05 14:13:16 +0200 (Sat, 05 Jul 2008) | 1 - line - - code cleaning - ........ - r2088 | danydb | 2008-07-05 14:34:16 +0200 (Sat, 05 Jul 2008) | 1 - line - - code cleaning - ........ - r2089 | danydb | 2008-07-05 17:18:48 +0200 (Sat, 05 Jul 2008) | 1 - line - - Adapt a little bit the direct writing - ........ - r2090 | danydb | 2008-07-05 21:53:50 +0200 (Sat, 05 Jul 2008) | 1 - line - - Improve installation - ........ - r2091 | danydb | 2008-07-05 21:54:00 +0200 (Sat, 05 Jul 2008) | 1 - line - - Improve installation - ........ - r2092 | danydb | 2008-07-05 22:20:11 +0200 (Sat, 05 Jul 2008) | 1 - line - - Setup - ........ - r2093 | danydb | 2008-07-05 22:33:36 +0200 (Sat, 05 Jul 2008) | 1 - line - - Readd user_action_gl.php - ........ - r2094 | danydb | 2008-07-05 22:38:15 +0200 (Sat, 05 Jul 2008) | 1 - line - - Re-add user_action_gl.php - ........ - r2095 | danydb | 2008-07-06 00:52:23 +0200 (Sun, 06 Jul 2008) | 1 - line - - New setup - ........ - r2096 | danydb | 2008-07-06 02:02:41 +0200 (Sun, 06 Jul 2008) | 1 - line - - small bugs - ........ - r2097 | danydb | 2008-07-06 19:27:05 +0200 (Sun, 06 Jul 2008) | 1 - line - - Fix security bug with domain - ........ - r2098 | danydb | 2008-07-06 19:39:55 +0200 (Sun, 06 Jul 2008) | 1 - line - - fix bug : javascript Purchase does not update correctly when a - card is blanked - ........ - r2099 | danydb | 2008-07-13 00:31:41 +0200 (Sun, 13 Jul 2008) | 1 - line - - Task #49 add a simple todo list - ........ - r2100 | danydb | 2008-07-13 00:32:08 +0200 (Sun, 13 Jul 2008) | 1 - line - - remove print_r - ........ - r2101 | danydb | 2008-07-13 00:43:55 +0200 (Sun, 13 Jul 2008) | 1 - line - - Add sql patch 49 - ........ - r2102 | danydb | 2008-07-13 00:44:08 +0200 (Sun, 13 Jul 2008) | 1 - line - - Add sql patch 49 - ........ - r2103 | danydb | 2008-07-13 00:59:01 +0200 (Sun, 13 Jul 2008) | 1 - line - - Fix bug in the table todo_list - ........ - r2104 | danydb | 2008-07-13 01:09:49 +0200 (Sun, 13 Jul 2008) | 1 - line - - Task #49 cosmetic todo list - ........ - r2105 | danydb | 2008-07-15 19:56:35 +0200 (Tue, 15 Jul 2008) | 1 - line - - remove var_dump - ........ - r2106 | danydb | 2008-07-16 21:42:42 +0200 (Wed, 16 Jul 2008) | 1 - line - - Fix bug : creating card - ........ - r2107 | danydb | 2008-07-17 12:46:16 +0200 (Thu, 17 Jul 2008) | 1 - line - - Fix numerous small bugs - ........ - r2108 | danydb | 2008-07-17 13:20:51 +0200 (Thu, 17 Jul 2008) | 1 - line - - Fix bug : if the account changed for a card then the ledgers are - update with the new account - ........ - r2109 | danydb | 2008-07-17 14:44:42 +0200 (Thu, 17 Jul 2008) | 1 - line - - Fix : character encoding - ........ - r2110 | danydb | 2008-07-17 20:34:15 +0200 (Thu, 17 Jul 2008) | 1 - line - - task : the attribut of a card are now ordered by the users - ........ - r2111 | danydb | 2008-07-18 13:45:10 +0200 (Fri, 18 Jul 2008) | 1 - line - - Import of opening are now concerned by the qcode - ........ - r2112 | danydb | 2008-07-18 14:05:47 +0200 (Fri, 18 Jul 2008) | 2 + r2361 | danydb | 2009-02-25 16:40:01 +0100 (Wed, 25 Feb 2009) | 2 lines - Fix bug : quick_writing_add_row duplicates value + Fix problem with local admin ........ - r2113 | danydb | 2008-07-18 14:23:28 +0200 (Fri, 18 Jul 2008) | 1 + r2362 | danydb | 2009-02-25 18:44:58 +0100 (Wed, 25 Feb 2009) | 1 line - Cosmetic : add comment, fix bug for quick_writing (add a verify ) + Fix bug opening ........ - r2114 | danydb | 2008-07-21 22:25:33 +0200 (Mon, 21 Jul 2008) | 1 + +2009-03-01 19:45 danydb + + * phpcompta/branches/rel500/dev/add_require.py, + phpcompta/branches/rel500/dev/change.py, + phpcompta/branches/rel500/dev/usage_file.py, + phpcompta/branches/rel500/dev/usage_function.py, + phpcompta/branches/rel500/dev/without_check.py, + phpcompta/branches/rel500/html/access.php, + phpcompta/branches/rel500/html/annulation.php, + phpcompta/branches/rel500/html/backup.php, + phpcompta/branches/rel500/html/commercial.php, + phpcompta/branches/rel500/html/fiche_search.php, + phpcompta/branches/rel500/html/import.php, + phpcompta/branches/rel500/html/modify_op.php, + phpcompta/branches/rel500/html/parametre.php, + phpcompta/branches/rel500/html/priv_user.php, + phpcompta/branches/rel500/html/recherche.php, + phpcompta/branches/rel500/html/search_ca.php, + phpcompta/branches/rel500/html/show_fiche.php, + phpcompta/branches/rel500/html/test.php, + phpcompta/branches/rel500/html/user_advanced.php, + phpcompta/branches/rel500/html/user_compta.php, + phpcompta/branches/rel500/html/user_login.php, + phpcompta/branches/rel500/html/user_pref.php, + phpcompta/branches/rel500/include/ac_common.php, + phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/anc_group.inc.php, + phpcompta/branches/rel500/include/anc_imp.inc.php, + phpcompta/branches/rel500/include/anc_od.inc.php, + phpcompta/branches/rel500/include/anc_pa.inc.php, + phpcompta/branches/rel500/include/balance.inc.php, + phpcompta/branches/rel500/include/bud_card.inc.php, + phpcompta/branches/rel500/include/bud_detail.inc.php, + phpcompta/branches/rel500/include/bud_hypo.inc.php, + phpcompta/branches/rel500/include/central.inc.php, + phpcompta/branches/rel500/include/class_acc_account.php, + phpcompta/branches/rel500/include/class_acc_account_ledger.php, + phpcompta/branches/rel500/include/class_acc_bilan.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_acc_parm_code.php, + phpcompta/branches/rel500/include/class_acc_payment.php, + phpcompta/branches/rel500/include/class_acc_reconciliation.php, + phpcompta/branches/rel500/include/class_acc_report.php, + phpcompta/branches/rel500/include/class_acc_tva.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_admin.php, + phpcompta/branches/rel500/include/class_anc_account.php, + phpcompta/branches/rel500/include/class_anc_balance_double.php, + phpcompta/branches/rel500/include/class_anc_balance_simple.php, + phpcompta/branches/rel500/include/class_anc_group_operation.php, + phpcompta/branches/rel500/include/class_anc_listing.php, + phpcompta/branches/rel500/include/class_anc_operation.php, + phpcompta/branches/rel500/include/class_anc_plan.php, + phpcompta/branches/rel500/include/class_anc_print.php, + phpcompta/branches/rel500/include/class_bud_card.php, + phpcompta/branches/rel500/include/class_bud_data.php, + phpcompta/branches/rel500/include/class_bud_hypo.php, + phpcompta/branches/rel500/include/class_bud_synthese.php, + phpcompta/branches/rel500/include/class_bud_synthese_acc.php, + phpcompta/branches/rel500/include/class_bud_synthese_anc.php, + phpcompta/branches/rel500/include/class_bud_synthese_group.php, + phpcompta/branches/rel500/include/class_bud_synthese_hypo.php, + phpcompta/branches/rel500/include/class_customer.php, + phpcompta/branches/rel500/include/class_document.php, + phpcompta/branches/rel500/include/class_document_modele.php, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/class_fiche_def.php, + phpcompta/branches/rel500/include/class_fiche_def_ref.php, + phpcompta/branches/rel500/include/class_html_input.php, + phpcompta/branches/rel500/include/class_ibutton.php, + phpcompta/branches/rel500/include/class_icard.php, + phpcompta/branches/rel500/include/class_icheckbox.php, + phpcompta/branches/rel500/include/class_iconcerned.php, + phpcompta/branches/rel500/include/class_idate.php, + phpcompta/branches/rel500/include/class_ifile.php, + phpcompta/branches/rel500/include/class_ihidden.php, + phpcompta/branches/rel500/include/class_iposte.php, + phpcompta/branches/rel500/include/class_iradio.php, + phpcompta/branches/rel500/include/class_isearch.php, + phpcompta/branches/rel500/include/class_iselect.php, + phpcompta/branches/rel500/include/class_ispan.php, + phpcompta/branches/rel500/include/class_itext.php, + phpcompta/branches/rel500/include/class_itextarea.php, + phpcompta/branches/rel500/include/class_itva.php, + phpcompta/branches/rel500/include/class_pre_operation.php, + phpcompta/branches/rel500/include/class_supplier.php, + phpcompta/branches/rel500/include/class_user.php, + phpcompta/branches/rel500/include/class_widget.php, + phpcompta/branches/rel500/include/client.inc.php, + phpcompta/branches/rel500/include/compta_ach.inc.php, + phpcompta/branches/rel500/include/compta_fin.inc.php, + phpcompta/branches/rel500/include/compta_ven.inc.php, + phpcompta/branches/rel500/include/config_file.php, + phpcompta/branches/rel500/include/contact.inc.php, + phpcompta/branches/rel500/include/dossier.inc.php, + phpcompta/branches/rel500/include/fiche.inc.php, + phpcompta/branches/rel500/include/fiche_def.inc.php, + phpcompta/branches/rel500/include/import_inc.php, + phpcompta/branches/rel500/include/impress_fiche.inc.php, + phpcompta/branches/rel500/include/impress_jrn.inc.php, + phpcompta/branches/rel500/include/impress_listing_client.inc.php, + phpcompta/branches/rel500/include/impress_poste.inc.php, + phpcompta/branches/rel500/include/impress_rapport.inc.php, + phpcompta/branches/rel500/include/jrn.php, + phpcompta/branches/rel500/include/modele.inc.php, + phpcompta/branches/rel500/include/opening.inc.php, + phpcompta/branches/rel500/include/param_jrn_add.inc.php, + phpcompta/branches/rel500/include/param_jrn_detail.inc.php, + phpcompta/branches/rel500/include/param_pcmn.inc.php, + phpcompta/branches/rel500/include/param_sec.inc.php, + phpcompta/branches/rel500/include/periode.inc.php, + phpcompta/branches/rel500/include/poste.inc.php, + phpcompta/branches/rel500/include/postgres.php, + phpcompta/branches/rel500/include/pref.inc.php, + phpcompta/branches/rel500/include/preod.inc.php, + phpcompta/branches/rel500/include/quick_writing.inc.php, + phpcompta/branches/rel500/include/report.inc.php, + phpcompta/branches/rel500/include/restore.inc.php, + phpcompta/branches/rel500/include/stock.inc.php, + phpcompta/branches/rel500/include/supplier.inc.php, + phpcompta/branches/rel500/include/tva.inc.php, + phpcompta/branches/rel500/include/user_action_gl.php, + phpcompta/branches/rel500/include/user_common.php, + phpcompta/branches/rel500/include/user_menu.php: + Class widget has been replaced by HtmlInput and children class + (as IText, IButton...) + Code Cleaning : remove obsolete and unused function + +2009-03-01 20:02 danydb + + * phpcompta/branches/rel500/dev/add_require.py, + phpcompta/branches/rel500/html/access.php, + phpcompta/branches/rel500/html/annulation.php, + phpcompta/branches/rel500/html/fiche_search.php, + phpcompta/branches/rel500/html/jrn_search.php, + phpcompta/branches/rel500/html/parametre.php, + phpcompta/branches/rel500/html/poste_search.php, + phpcompta/branches/rel500/html/priv_user.php, + phpcompta/branches/rel500/html/search_ca.php, + phpcompta/branches/rel500/html/test.php, + phpcompta/branches/rel500/html/user_login.php, + phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/anc_group.inc.php, + phpcompta/branches/rel500/include/anc_imp.inc.php, + phpcompta/branches/rel500/include/anc_od.inc.php, + phpcompta/branches/rel500/include/anc_pa.inc.php, + phpcompta/branches/rel500/include/balance.inc.php, + phpcompta/branches/rel500/include/bud_card.inc.php, + phpcompta/branches/rel500/include/bud_detail.inc.php, + phpcompta/branches/rel500/include/bud_hypo.inc.php, + phpcompta/branches/rel500/include/bud_sacc.inc.php, + phpcompta/branches/rel500/include/bud_sga.inc.php, + phpcompta/branches/rel500/include/bud_spo.inc.php, + phpcompta/branches/rel500/include/bud_svglobal.inc.php, + phpcompta/branches/rel500/include/central.inc.php, + phpcompta/branches/rel500/include/class_acc_account.php, + phpcompta/branches/rel500/include/class_acc_account_ledger.php, + phpcompta/branches/rel500/include/class_acc_bilan.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_acc_parm_code.php, + phpcompta/branches/rel500/include/class_acc_payment.php, + phpcompta/branches/rel500/include/class_acc_reconciliation.php, + phpcompta/branches/rel500/include/class_acc_report.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_anc_account.php, + phpcompta/branches/rel500/include/class_anc_balance_double.php, + phpcompta/branches/rel500/include/class_anc_balance_simple.php, + phpcompta/branches/rel500/include/class_anc_group_operation.php, + phpcompta/branches/rel500/include/class_anc_listing.php, + phpcompta/branches/rel500/include/class_anc_operation.php, + phpcompta/branches/rel500/include/class_anc_plan.php, + phpcompta/branches/rel500/include/class_anc_print.php, + phpcompta/branches/rel500/include/class_bud_card.php, + phpcompta/branches/rel500/include/class_bud_data.php, + phpcompta/branches/rel500/include/class_bud_hypo.php, + phpcompta/branches/rel500/include/class_bud_synthese_acc.php, + phpcompta/branches/rel500/include/class_bud_synthese_anc.php, + phpcompta/branches/rel500/include/class_bud_synthese_group.php, + phpcompta/branches/rel500/include/class_bud_synthese_hypo.php, + phpcompta/branches/rel500/include/class_document.php, + phpcompta/branches/rel500/include/class_document_modele.php, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/class_fiche_def.php, + phpcompta/branches/rel500/include/class_fiche_def_ref.php, + phpcompta/branches/rel500/include/class_html_input.php, + phpcompta/branches/rel500/include/class_pre_operation.php, + phpcompta/branches/rel500/include/class_widget.php, + phpcompta/branches/rel500/include/client.inc.php, + phpcompta/branches/rel500/include/compta_ach.inc.php, + phpcompta/branches/rel500/include/compta_fin.inc.php, + phpcompta/branches/rel500/include/compta_ven.inc.php, + phpcompta/branches/rel500/include/config_file.php, + phpcompta/branches/rel500/include/contact.inc.php, + phpcompta/branches/rel500/include/dossier.inc.php, + phpcompta/branches/rel500/include/fiche.inc.php, + phpcompta/branches/rel500/include/fiche_def.inc.php, + phpcompta/branches/rel500/include/import_inc.php, + phpcompta/branches/rel500/include/impress_bilan.inc.php, + phpcompta/branches/rel500/include/impress_fiche.inc.php, + phpcompta/branches/rel500/include/impress_jrn.inc.php, + phpcompta/branches/rel500/include/impress_listing_client.inc.php, + phpcompta/branches/rel500/include/impress_poste.inc.php, + phpcompta/branches/rel500/include/impress_rapport.inc.php, + phpcompta/branches/rel500/include/jrn.php, + phpcompta/branches/rel500/include/modele.inc.php, + phpcompta/branches/rel500/include/opening.inc.php, + phpcompta/branches/rel500/include/param_jrn_add.inc.php, + phpcompta/branches/rel500/include/param_jrn_detail.inc.php, + phpcompta/branches/rel500/include/param_pcmn.inc.php, + phpcompta/branches/rel500/include/param_sec.inc.php, + phpcompta/branches/rel500/include/payment_middle.inc.php, + phpcompta/branches/rel500/include/periode.inc.php, + phpcompta/branches/rel500/include/poste.inc.php, + phpcompta/branches/rel500/include/pref.inc.php, + phpcompta/branches/rel500/include/preod.inc.php, + phpcompta/branches/rel500/include/quick_writing.inc.php, + phpcompta/branches/rel500/include/report.inc.php, + phpcompta/branches/rel500/include/restore.inc.php, + phpcompta/branches/rel500/include/supplier.inc.php, + phpcompta/branches/rel500/include/tva.inc.php, + phpcompta/branches/rel500/include/user_action_gl.php, + phpcompta/branches/rel500/include/user_common.php, + phpcompta/branches/rel500/include/user_menu.php: + Rewrite class widget : bug + +2009-03-01 22:00 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/include/class_user.php, + phpcompta/branches/rel500/include/fiche.inc.php: + Merged revisions 2363-2367 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2366 | danydb | 2009-03-01 21:29:42 +0100 (Sun, 01 Mar 2009) | 1 line - SQL Patch Add order to the card + Security ........ - r2115 | danydb | 2008-07-22 15:17:33 +0200 (Tue, 22 Jul 2008) | 1 + r2367 | danydb | 2009-03-01 21:35:57 +0100 (Sun, 01 Mar 2009) | 1 line - Release candidate : fix bug ledger sold + Security : can_request must not be in a test ........ - r2116 | danydb | 2008-07-22 17:50:14 +0200 (Tue, 22 Jul 2008) | 1 + +2009-03-04 21:18 danydb + + * phpcompta/branches/rel500/include/class_html_input.php, + phpcompta/branches/rel500/include/class_ibutton.php, + phpcompta/branches/rel500/include/class_icard.php, + phpcompta/branches/rel500/include/class_icheckbox.php, + phpcompta/branches/rel500/include/class_iconcerned.php, + phpcompta/branches/rel500/include/class_idate.php, + phpcompta/branches/rel500/include/class_ifile.php, + phpcompta/branches/rel500/include/class_iradio.php, + phpcompta/branches/rel500/include/class_iselect.php, + phpcompta/branches/rel500/include/class_ispan.php, + phpcompta/branches/rel500/include/class_itextarea.php, + phpcompta/branches/rel500/include/class_itva.php: + Progress HtmlInput + +2009-03-04 21:19 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/include/class_user.php: + Merged revisions 2368-2370 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2369 | danydb | 2009-03-03 19:02:18 +0100 (Tue, 03 Mar 2009) | 1 line - Fix Bug : Ledger SOLD & PURCHASE + Fix bug class_user.php : the password is not checked in the + function checked ........ - r2117 | danydb | 2008-07-24 18:11:57 +0200 (Thu, 24 Jul 2008) | 1 + +2009-03-05 20:21 danydb + + * phpcompta/branches/rel500/doc/developper/create_doc.sh, + phpcompta/branches/rel500/html/admin/setup.php, + phpcompta/branches/rel500/html/js/search_card.js, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_acc_payment.php, + phpcompta/branches/rel500/include/class_icard.php, + phpcompta/branches/rel500/include/class_icardctrl.php, + phpcompta/branches/rel500/include/class_icheckbox.php, + phpcompta/branches/rel500/include/class_iposte.php, + phpcompta/branches/rel500/include/class_iselect.php, + phpcompta/branches/rel500/include/dossier.inc.php, + phpcompta/branches/rel500/include/quick_writing.inc.php: + progress class_widget -> class_html_input + +2009-03-05 20:24 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/html/annulation.php, + phpcompta/branches/rel500/html/get_saldo.php, + phpcompta/branches/rel500/html/jrn_search.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/compta_ven.inc.php, + phpcompta/branches/rel500/include/impress_jrn.inc.php, + phpcompta/branches/rel500/include/param_sec.inc.php, + phpcompta/branches/rel500/include/template/security_list_action.php: + Merged revisions 2371-2377 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2372 | danydb | 2009-03-05 19:09:13 +0100 (Thu, 05 Mar 2009) | 1 line - Fix Bug Ledger FIN + import FIN + Bug : all the ledgers are not shown ........ - r2118 | danydb | 2008-07-24 18:29:20 +0200 (Thu, 24 Jul 2008) | 1 + r2373 | danydb | 2009-03-05 19:12:26 +0100 (Thu, 05 Mar 2009) | 1 line - Fix Bug Import FIN utf8 encoding + Bug : Layout in quick writing ........ - r2119 | danydb | 2008-07-24 22:19:23 +0200 (Thu, 24 Jul 2008) | 1 + r2374 | danydb | 2009-03-05 19:17:31 +0100 (Thu, 05 Mar 2009) | 1 line - Fix Bug Printing and Quick Writing + Add missing file ........ - r2120 | danydb | 2008-07-24 22:46:50 +0200 (Thu, 24 Jul 2008) | 1 + r2375 | danydb | 2009-03-05 19:28:11 +0100 (Thu, 05 Mar 2009) | 1 line - Fix Bug Security + Bug : reconciliation not possible ........ - r2121 | danydb | 2008-07-24 22:51:05 +0200 (Thu, 24 Jul 2008) | 1 + r2376 | danydb | 2009-03-05 19:44:02 +0100 (Thu, 05 Mar 2009) | 1 line + Bug : can't list unpaid operatio,s in sold ledger + ........ + +2009-03-06 22:29 danydb + + * phpcompta/branches/rel500/html/style-light.css, + phpcompta/branches/rel500/include/class_icard.php: + Progress class_html_input + +2009-03-08 19:25 danydb + + * phpcompta/branches/rel500/html/parametre.php, + phpcompta/branches/rel500/include/balance.inc.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_document_modele.php, + phpcompta/branches/rel500/include/class_icard.php, + phpcompta/branches/rel500/include/class_iselect.php, + phpcompta/branches/rel500/include/class_itext.php, + phpcompta/branches/rel500/include/fiche_def.inc.php, + phpcompta/branches/rel500/include/impress_fiche.inc.php, + phpcompta/branches/rel500/include/impress_jrn.inc.php, + phpcompta/branches/rel500/include/impress_listing_client.inc.php, + phpcompta/branches/rel500/include/impress_rapport.inc.php, + phpcompta/branches/rel500/include/tva.inc.php: + Progress class_html_input + +2009-03-11 19:03 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php: + Merged revisions 2378-2382 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2381 | danydb | 2009-03-11 19:33:03 +0100 (Wed, 11 Mar 2009) | 1 + line + + Erreur rec. + ........ + r2382 | danydb | 2009-03-11 19:57:57 +0100 (Wed, 11 Mar 2009) | 1 + line + + Erreur rec. in fin ledger + ........ + +2009-03-14 20:55 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/html/jrn_search.php, + phpcompta/branches/rel500/include/compta_fin.inc.php: + Merged revisions 2383-2385 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2384 | danydb | 2009-03-14 21:38:05 +0100 (Sat, 14 Mar 2009) | 2 + lines + + Fix Bug : search for rec. + ........ + r2385 | danydb | 2009-03-14 21:44:20 +0100 (Sat, 14 Mar 2009) | 1 + line + + Bug : cannot see list financial + ........ + +2009-03-14 22:36 danydb + + * phpcompta/branches/rel500/html/annulation.php, + phpcompta/branches/rel500/html/commercial.php, + phpcompta/branches/rel500/html/jrn_pdf.php, + phpcompta/branches/rel500/html/modify_op.php, + phpcompta/branches/rel500/html/parametre.php, + phpcompta/branches/rel500/html/print_balance.php, + phpcompta/branches/rel500/include/ac_common.php, + phpcompta/branches/rel500/include/balance.inc.php, + phpcompta/branches/rel500/include/central.inc.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_iperiod.php, + phpcompta/branches/rel500/include/class_periode.php, + phpcompta/branches/rel500/include/import_inc.php, + phpcompta/branches/rel500/include/impress_inc.php, + phpcompta/branches/rel500/include/jrn.php, + phpcompta/branches/rel500/include/periode.inc.php, + phpcompta/branches/rel500/include/pref.inc.php, + phpcompta/branches/rel500/include/preference.php, + phpcompta/branches/rel500/include/quick_writing.inc.php, + phpcompta/branches/rel500/include/stock.inc.php, + phpcompta/branches/rel500/include/user_action_gl.php: + progress class_widget -> class_html_input + +2009-03-14 22:43 danydb + + * phpcompta/branches/rel500/html/annulation.php, + phpcompta/branches/rel500/html/compta.php, + phpcompta/branches/rel500/html/fiche_csv.php, + phpcompta/branches/rel500/html/fiche_new.php, + phpcompta/branches/rel500/html/fiche_search.php, + phpcompta/branches/rel500/html/import.php, + phpcompta/branches/rel500/html/jrn_csv.php, + phpcompta/branches/rel500/html/jrn_pdf.php, + phpcompta/branches/rel500/html/line_update.php, + phpcompta/branches/rel500/html/modify_op.php, + phpcompta/branches/rel500/html/parametre.php, + phpcompta/branches/rel500/html/recherche.php, + phpcompta/branches/rel500/html/sec_pdf.php, + phpcompta/branches/rel500/html/user_advanced.php, + phpcompta/branches/rel500/include/central.inc.php, + phpcompta/branches/rel500/include/check_priv.php, + phpcompta/branches/rel500/include/compta_ach.inc.php, + phpcompta/branches/rel500/include/compta_ven.inc.php, + phpcompta/branches/rel500/include/fiche.inc.php, + phpcompta/branches/rel500/include/impress.inc.php, + phpcompta/branches/rel500/include/param_jrn.inc.php, + phpcompta/branches/rel500/include/param_jrn_add.inc.php, + phpcompta/branches/rel500/include/param_jrn_detail.inc.php, + phpcompta/branches/rel500/include/param_pcmn.inc.php, + phpcompta/branches/rel500/include/param_sec.inc.php, + phpcompta/branches/rel500/include/quick_writing.inc.php, + phpcompta/branches/rel500/include/stock.inc.php: + Remove file check_priv.php; all the security API is now is + class_user + +2009-03-17 17:47 danydb + + * phpcompta/branches/rel500/html/admin/setup.php, + phpcompta/branches/rel500/html/annulation.php, + phpcompta/branches/rel500/html/bud_search_poste.php, + phpcompta/branches/rel500/html/fiche_new.php, + phpcompta/branches/rel500/html/fiche_search.php, + phpcompta/branches/rel500/html/jrn_search.php, + phpcompta/branches/rel500/html/js/search_card.js, + phpcompta/branches/rel500/html/modify_op.php, + phpcompta/branches/rel500/html/poste_search.php, + phpcompta/branches/rel500/include/anc_pa.inc.php, + phpcompta/branches/rel500/include/balance.inc.php, + phpcompta/branches/rel500/include/central.inc.php, + phpcompta/branches/rel500/include/class_acc_report.php, + phpcompta/branches/rel500/include/class_anc_balance_double.php, + phpcompta/branches/rel500/include/class_anc_balance_simple.php, + phpcompta/branches/rel500/include/class_anc_listing.php, + phpcompta/branches/rel500/include/class_fiche_def.php, + phpcompta/branches/rel500/include/contact.inc.php, + phpcompta/branches/rel500/include/fiche.inc.php, + phpcompta/branches/rel500/include/fiche_inc.php, + phpcompta/branches/rel500/include/import_inc.php, + phpcompta/branches/rel500/include/param_jrn_add.inc.php, + phpcompta/branches/rel500/include/stock.inc.php, + phpcompta/branches/rel500/include/supplier.inc.php, + phpcompta/branches/rel500/include/tva.inc.php: + * Input type submit replace by HtmlInput::Submit + * Add documentation for javascript + +2009-03-17 18:29 danydb + + * phpcompta/branches/rel500/dev/cleanup.sh, + phpcompta/branches/rel500/html/admin/setup.php, + phpcompta/branches/rel500/include/ac_common.php, + phpcompta/branches/rel500/include/balance.inc.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_iperiod.php, + phpcompta/branches/rel500/include/class_iradio.php, + phpcompta/branches/rel500/include/restore.inc.php: + Fix small bugs + +2009-03-17 18:34 danydb + + * phpcompta/branches/rel500/html/fiche_search.php: + Documentation fiche_search.php + +2009-03-19 16:38 danydb + + * phpcompta/branches/rel500/include/compta_fin.inc.php: + remove a widget object + +2009-03-19 16:40 danydb + + * phpcompta/branches/rel500/html/fiche_search.php: + Bug : error with get_list_fiche + +2009-03-19 16:43 danydb + + * phpcompta/branches/rel500/html/modify_op.php: + Bug : typo + +2009-03-19 17:07 danydb + + * phpcompta/branches/rel500/html/get_pj.php: + Bug : wrong next pj + +2009-03-19 17:14 danydb + + * phpcompta/branches/rel500/include/class_html_input.php: + infobulle add onmouseover for displaying the infobulle + +2009-03-19 17:37 danydb + + * phpcompta/branches/rel500/html/index.php, + phpcompta/branches/rel500/html/jrn_pdf.php, + phpcompta/branches/rel500/html/line_update.php, + phpcompta/branches/rel500/html/parametre.php, + phpcompta/branches/rel500/include/ac_common.php, + phpcompta/branches/rel500/include/class_acc_account.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_acexception.php, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/class_iperiod.php, + phpcompta/branches/rel500/include/class_own.php, + phpcompta/branches/rel500/include/class_periode.php, + phpcompta/branches/rel500/include/compta_ach.inc.php, + phpcompta/branches/rel500/include/compta_ven.inc.php, + phpcompta/branches/rel500/include/impress_jrn.inc.php, + phpcompta/branches/rel500/include/quick_writing.inc.php, + phpcompta/branches/rel500/include/user_common.php, + phpcompta/branches/rel500/sql/upgrade.sql: + * Remove periode in Ledger, the periode is deduced from the date, + it depends of the parameter MY_CHECK_PERIODE + * Remove AcException + * Ledger Sold is correct + +2009-03-19 17:39 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/html/priv_user.php, + phpcompta/branches/rel500/include/compta_fin.inc.php: + Merged revisions 2386-2399 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2389 | danydb | 2009-03-16 21:55:54 +0100 (Mon, 16 Mar 2009) | 2 + lines + + Fix Escape HTML string + ........ + r2390 | danydb | 2009-03-16 22:00:44 +0100 (Mon, 16 Mar 2009) | 2 + lines + + Bug in security : FIN Ledger confusion between check_action and + get_ledger_access + ........ + +2009-03-19 21:59 danydb + + * phpcompta/branches/rel500/include/central.inc.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_iperiod.php: + Bug : Ledger sold with check periode + +2009-03-19 22:08 danydb + + * phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/postgres.php: + Problem sequence + +2009-03-20 23:47 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/html/style-light.css, + phpcompta/branches/rel500/include/class_customer.php, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/impress_listing_client.inc.php: + Merged revisions 2400-2403 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2403 | danydb | 2009-03-20 21:36:05 +0100 (Fri, 20 Mar 2009) | 3 + lines + + The summary of the amount of the customers with a vat number is + now based on + the quickcode instead of the accountancy number + ........ + +2009-03-23 20:32 danydb + + * phpcompta/branches/rel500/html/js/search_card.js, + phpcompta/branches/rel500/include/central.inc.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_acc_payment.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_icard.php, + phpcompta/branches/rel500/include/class_iperiod.php, + phpcompta/branches/rel500/include/contact.inc.php, + phpcompta/branches/rel500/include/import_inc.php, + phpcompta/branches/rel500/include/impress_poste.inc.php, + phpcompta/branches/rel500/include/user_menu.php, + phpcompta/branches/rel500/sql/upgrade.sql: + * IPeriod throw an exception is no rows is found (code != 0) + * receipt problem with the numbering of the sequences + * SearchCard = the p_jrn is not taken from a hidden elt but must + be given + +2009-03-23 20:40 danydb + + * phpcompta/branches/rel500/include/class_icard.php, + phpcompta/branches/rel500/include/class_user.php: + Fix missing lib + +2009-03-23 20:41 danydb + + * phpcompta/branches/rel500/include/class_icard.php: + Fix missing semicol + +2009-03-23 20:42 danydb + + * phpcompta/branches/rel500/include/class_icard.php: + Fix missing semicol + +2009-03-23 20:44 danydb + + * phpcompta/branches/rel500/include/class_icard.php: + button static cannot be redefined as dynamic + +2009-03-23 21:00 danydb + + * phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_icard.php: + Prob Numbering receipt + +2009-03-24 19:11 danydb + + * phpcompta/branches/rel500/dev/usage_function.py, + phpcompta/branches/rel500/html/admin/setup.php, + phpcompta/branches/rel500/html/annulation.php, + phpcompta/branches/rel500/html/compute.php, + phpcompta/branches/rel500/html/fiche_new.php, + phpcompta/branches/rel500/html/fiche_search.php, + phpcompta/branches/rel500/html/get_pj.php, + phpcompta/branches/rel500/html/get_predef.php, + phpcompta/branches/rel500/html/jrn_csv.php, + phpcompta/branches/rel500/html/jrn_pdf.php, + phpcompta/branches/rel500/html/js/search_card.js, + phpcompta/branches/rel500/html/modify_op.php, + phpcompta/branches/rel500/html/poste_pdf.php, + phpcompta/branches/rel500/html/print_balance.php, + phpcompta/branches/rel500/html/priv_user.php, + phpcompta/branches/rel500/html/remove_op.php, + phpcompta/branches/rel500/include/argenta_be.inc.php, + phpcompta/branches/rel500/include/balance.inc.php, + phpcompta/branches/rel500/include/class_acc_account.php, + phpcompta/branches/rel500/include/class_acc_balance.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_info.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_acc_operation.php, + phpcompta/branches/rel500/include/class_acc_parm_code.php, + phpcompta/branches/rel500/include/class_acc_reconciliation.php, + phpcompta/branches/rel500/include/class_acc_report.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_anc_group_operation.php, + phpcompta/branches/rel500/include/class_anc_plan.php, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/class_fiche_def.php, + phpcompta/branches/rel500/include/class_gestion_sold.php, + phpcompta/branches/rel500/include/class_html_input.php, + phpcompta/branches/rel500/include/class_icard.php, + phpcompta/branches/rel500/include/class_periode.php, + phpcompta/branches/rel500/include/class_pre_operation.php, + phpcompta/branches/rel500/include/class_user.php, + phpcompta/branches/rel500/include/class_widget.php, + phpcompta/branches/rel500/include/compta_fin.inc.php, + phpcompta/branches/rel500/include/dexia.inc.php, + phpcompta/branches/rel500/include/dexia_be.inc.php, + phpcompta/branches/rel500/include/fiche.inc.php, + phpcompta/branches/rel500/include/fiche_inc.php, + phpcompta/branches/rel500/include/impress_inc.php, + phpcompta/branches/rel500/include/impress_jrn.inc.php, + phpcompta/branches/rel500/include/impress_poste.inc.php, + phpcompta/branches/rel500/include/param_jrn_add.inc.php, + phpcompta/branches/rel500/include/param_jrn_detail.inc.php, + phpcompta/branches/rel500/include/param_pcmn.inc.php, + phpcompta/branches/rel500/include/periode.inc.php, + phpcompta/branches/rel500/include/poste.php, + phpcompta/branches/rel500/include/postgres.php, + phpcompta/branches/rel500/include/template/fiche_def_input.php, + phpcompta/branches/rel500/include/tva.inc.php, + phpcompta/branches/rel500/include/user_common.php, + phpcompta/branches/rel500/include/user_menu.php, + phpcompta/branches/rel500/sql/upgrade.sql: + * Remove todo (add security, improve documentation,...) + * Fix small bugs + * class fiche_def : template for adding a cat. of card + * Fix bug : add card + button + * remove obsolete file : class_widget.php poste.php fiche_inc.php + * rename CountSql to count_sql + +2009-03-24 19:12 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/doc/manuel_win2.odt, + phpcompta/branches/rel500/html/admin/.htaccess, + phpcompta/branches/rel500/html/admin/setup.php: + Merged revisions 2404-2413 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2411 | danydb | 2009-03-24 00:48:51 +0100 (Tue, 24 Mar 2009) | 1 + line + + Fix bug when installing for windows + ........ + r2412 | danydb | 2009-03-24 00:53:18 +0100 (Tue, 24 Mar 2009) | 1 + line + + Update doc windows + ........ + +2009-03-24 22:17 danydb + + * phpcompta/branches/rel500/html/style-light.css, + phpcompta/branches/rel500/include/ac_common.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_html_input.php, + phpcompta/branches/rel500/include/supplier.inc.php: + * ledger purchase fix cosmetic + periode is deduced from date + +2009-03-24 22:48 danydb + + * phpcompta/branches/rel500/include/supplier.inc.php: + remove the add command in the list + +2009-03-24 22:58 danydb + + * phpcompta/branches/rel500/html/compta.php, + phpcompta/branches/rel500/include/class_user.php, + phpcompta/branches/rel500/include/client.inc.php: + Remove the button to add a customer or a supplier from the list + of s/c + +2009-03-24 23:02 danydb + + * phpcompta/branches/rel500/include/compta_fin.inc.php: + Add bug + todo + +2009-03-24 23:09 danydb + + * phpcompta/branches/rel500/html/style-light.css: + Cosmetic change css table.result + +2009-03-25 20:05 danydb + + * phpcompta/branches/rel500/include/user_common.php: + Add generate_micro + +2009-03-26 08:03 danydb + + * phpcompta/branches/rel500/doc/developper/create_doc.sh: + add domain + +2009-03-30 20:45 danydb + + * phpcompta/branches/rel500/html/test.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_itext.php, + phpcompta/branches/rel500/include/class_itva_select.php, + phpcompta/branches/rel500/include/compta_ven.inc.php, + phpcompta/branches/rel500/include/template/form_ledger_ven.php: + Rewrite of encode sold, usage of template + +2009-04-02 11:48 danydb + + * phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_acc_operation.php, + phpcompta/branches/rel500/sql/upgrade.sql: + Add microsecond to check if it is a double reload + +2009-04-02 12:21 danydb + + * phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/template/form_ledger_ven.php: + Cosmetic in acc_ledger_sold + +2009-04-02 13:53 danydb + + * phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_fiche_def.php, + phpcompta/branches/rel500/include/compta_fin.inc.php, + phpcompta/branches/rel500/include/quick_writing.inc.php, + phpcompta/branches/rel500/include/template/form_ledger_fin.php: + transform form fin in template/form_ledger_fin.php + +2009-04-02 17:13 danydb + + * phpcompta/branches/rel500/include/pref.inc.php: + Correct bug in preference + +2009-04-03 08:57 danydb + + * phpcompta/branches/rel500/include/class_acc_ledger.php: + Fix Periode + +2009-04-03 10:27 danydb + + * phpcompta/branches/rel500/html/access.php, + phpcompta/branches/rel500/html/bud_ajax.php, + phpcompta/branches/rel500/include/ac_common.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/constant.php, + phpcompta/branches/rel500/include/template/form_ledger_fin.php, + phpcompta/branches/rel500/include/user_common.php, + phpcompta/branches/rel500/sql/upgrade.sql: + Remove obsolete plpgsql + fix bug mini report + Improve protection against reload + Improve periode in ODS + Add Receipt number in ListJrn + Fix cosmetic Bug in fiche_new + +2009-04-03 11:52 danydb + + * phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php: + Improve after updating the status paid in ListJrn, we come back + to the good screen + +2009-04-03 14:39 danydb + + * phpcompta/branches/rel500/include/class_acc_report.php: + Bug : the button for searching a Account is not given by IPoste + +2009-04-03 15:04 danydb + + * phpcompta/branches/rel500/include/class_acc_report.php: + Replace hard coded input type by IButton + +2009-04-03 15:06 danydb + + * phpcompta/branches/rel500/include/class_acc_report.php: + improve doc + +2009-04-03 16:01 danydb + + * phpcompta/branches/rel500/sql/upgrade.sql: + remove unused line + +2009-04-03 23:29 danydb + + * phpcompta/branches/rel500/html/js/scripts.js, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_document.php, + phpcompta/branches/rel500/include/compta_fin.inc.php, + phpcompta/branches/rel500/include/user_common.php: + Improve doc + Code cleaning remove old function + Fix Bug payment by + +2009-04-17 11:32 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/html/access.php, + phpcompta/branches/rel500/html/get_saldo.php, + phpcompta/branches/rel500/html/js/ajax_fiche.js, + phpcompta/branches/rel500/include/ac_common.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_acc_report.php, + phpcompta/branches/rel500/include/compta_fin.inc.php: + Merged revisions 2414-2439 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2435 | danydb | 2009-04-10 12:41:25 +0200 (Fri, 10 Apr 2009) | 1 + line + + On the welcome page, check if a mini report exist before trying + to display it + ........ + r2436 | danydb | 2009-04-15 23:41:23 +0200 (Wed, 15 Apr 2009) | 1 + line + + Improve add saldo by qcode + ........ + r2437 | danydb | 2009-04-15 23:48:57 +0200 (Wed, 15 Apr 2009) | 1 + line + + Fix bug in financial ledger, there were no negative saldo + ........ + r2438 | danydb | 2009-04-16 13:17:14 +0200 (Thu, 16 Apr 2009) | 1 + line + + Fix Bug : financial ledger, first sold is clean + ........ + r2439 | danydb | 2009-04-17 10:41:02 +0200 (Fri, 17 Apr 2009) | 1 + line + + Fix Bug : in strict mode, when you start a new ledger, there is + no last date of operation + ........ + +2009-04-17 18:28 danydb + + * phpcompta/branches/rel500/include/balance.inc.php, + phpcompta/branches/rel500/include/class_acc_account.php, + phpcompta/branches/rel500/include/class_acc_balance.php, + phpcompta/branches/rel500/include/class_iperiod.php: + Fix Bug in impress->balance + Variable undefined in IPeriod and Acc_Account::get_lib + +2009-04-18 19:41 danydb + + * phpcompta/branches/rel500/html/fiche_search.php, + phpcompta/branches/rel500/html/fid.php, + phpcompta/branches/rel500/html/js/search_card.js, + phpcompta/branches/rel500/html/recherche.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_icard.php, + phpcompta/branches/rel500/include/class_user.php, + phpcompta/branches/rel500/include/compta_ach.inc.php, + phpcompta/branches/rel500/include/compta_fin.inc.php, + phpcompta/branches/rel500/include/compta_ven.inc.php, + phpcompta/branches/rel500/include/user_action_gl.php, + phpcompta/branches/rel500/include/user_common.php: + Improve : permit to see all the ledgers in the listing + Improve : the noadd function for SearchCard + +2009-04-18 21:57 danydb + + * phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php: + Improve : listing ledger, show all the ledgers + +2009-04-18 22:00 danydb + + * phpcompta/branches/rel500/include/balance.inc.php: Cosmetic + +2009-04-18 22:07 danydb + + * phpcompta/branches/rel500/include/fiche.inc.php: + Cosmetic : search card must be unique + +2009-04-18 22:44 danydb + + * phpcompta/branches/rel500/html/style-light.css, + phpcompta/branches/rel500/include/central.inc.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_iperiod.php, + phpcompta/branches/rel500/include/user_common.php, + phpcompta/branches/rel500/include/user_menu.php: + Cosmetic ListJrn + +2009-04-18 22:52 danydb + + * phpcompta/branches/rel500/html/style-color.css, + phpcompta/branches/rel500/html/style.css: + Cosmetic : style sheet + +2009-04-24 10:43 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/html/js/scripts.js, + phpcompta/branches/rel500/html/show_pj.php, + phpcompta/branches/rel500/include/class_iselect.php, + phpcompta/branches/rel500/include/impress_rapport.inc.php: + Adapt svnmerge + +2009-04-24 11:14 danydb + + * phpcompta/branches/rel500/include/impress_rapport.inc.php: + Fix : IMPORTANT this file doesn't work properly : the problem is + the + javascript enable_type_periode which makes the from_periode, + to_periode, p_step... undefined + +2009-04-25 15:47 danydb + + * phpcompta/branches/rel500/include/user_menu.php: + user_menu: no possibility to add card + +2009-04-25 15:47 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php: + Merged revisions 2450-2453 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + ........ - r2122 | danydb | 2008-07-24 23:00:38 +0200 (Thu, 24 Jul 2008) | 2 + r2452 | danydb | 2009-04-24 22:52:49 +0200 (Fri, 24 Apr 2009) | 1 + line + + Fix bug in reconciliation in fin ledger + ........ + +2009-04-27 11:59 danydb + + * phpcompta/branches/rel500/include/class_iposte.php: + class_iposte: add table = 2 + +2009-04-27 12:00 danydb + + * phpcompta/branches/rel500/html/commercial.php: + Gestion : start with changes + +2009-04-27 12:00 danydb + + * phpcompta/branches/rel500/include/class_fiche.php: + class_fiche : fix cosmetic with label + +2009-04-28 13:38 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/html/modify_op.php, + phpcompta/branches/rel500/include/jrn.php, + phpcompta/branches/rel500/include/user_menu.php: + Merged revisions 2454-2459 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2458 | danydb | 2009-04-27 16:11:21 +0200 (Mon, 27 Apr 2009) | 2 lines - Fix problem with simple printing French + user_menu : change order of the menu ........ - r2123 | danydb | 2008-07-24 23:01:48 +0200 (Thu, 24 Jul 2008) | 2 + r2459 | danydb | 2009-04-28 15:35:06 +0200 (Tue, 28 Apr 2009) | 1 + line + + modify_op : fix bug in CA + ........ + +2009-04-28 13:40 danydb + + * phpcompta/branches/rel500: + Do not include rev. 2460 due to conflicts + +2009-05-20 21:03 danydb + + * phpcompta/branches/rel500/include/class_customer.php, + phpcompta/branches/rel500/include/client.inc.php, + phpcompta/branches/rel500/include/compta_ven.inc.php: + Action : remove action from gestion->customer + +2009-05-20 21:03 danydb + + * phpcompta/branches/rel500/html/commercial.php, + phpcompta/branches/rel500/sql/upgrade.sql: + Action : remove action from gestion->customer + +2009-05-22 18:43 danydb + + * phpcompta/branches/rel500/html/ajax_get.php, + phpcompta/branches/rel500/html/image/load.gif, + phpcompta/branches/rel500/html/js/ajax_fiche.js, + phpcompta/branches/rel500/html/js/infobulle.js, + phpcompta/branches/rel500/html/style-light.css, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/class_html_input.php, + phpcompta/branches/rel500/include/class_ibutton.php, + phpcompta/branches/rel500/include/class_user.php, + phpcompta/branches/rel500/include/client.inc.php: + Customer : start new version with ajax + +2009-05-30 17:24 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/include/payment_middle.inc.php: + Merged revisions 2461-2466 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2466 | danydb | 2009-05-30 19:23:04 +0200 (Sat, 30 May 2009) | 2 lines - Missing { + Typo Aciotn -> Action ........ - r2124 | danydb | 2008-07-24 23:02:45 +0200 (Thu, 24 Jul 2008) | 2 - lines + +2009-06-06 18:42 danydb + + * phpcompta/branches/rel500/doc/fiche.dia: + Fix property on dia + +2009-06-06 18:52 danydb + + * phpcompta/branches/rel500/doc/data.dia: + Add doc + +2009-06-07 13:10 danydb + + * phpcompta/branches/rel500/html/access.php: + Fix problem with todo_list in access page + +2009-07-04 18:13 danydb + + * phpcompta/branches/rel500/doc/Diagram5.dia: + Add doc + +2009-07-04 18:13 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/include/jrn.php: + Merged revisions 2471 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk - Unicode ........ - r2125 | danydb | 2008-07-24 23:04:31 +0200 (Thu, 24 Jul 2008) | 2 - lines - - Unicode - ........ - r2126 | danydb | 2008-07-25 17:40:28 +0200 (Fri, 25 Jul 2008) | 1 + r2471 | danydb | 2009-07-01 19:48:38 +0200 (Wed, 01 Jul 2009) | 1 line - Fix Bug install on windows + Bug : analytic accountancy in "gestion mode" not possible to + update a description ........ - r2127 | danydb | 2008-07-25 17:42:01 +0200 (Fri, 25 Jul 2008) | 1 + +2009-07-06 20:48 danydb + + * phpcompta/branches/rel500/include/class_html_input.php: + Add the warnbulle function + +2009-07-06 20:54 danydb + + * phpcompta/branches/rel500/doc/data.dia, + phpcompta/branches/rel500/html/ajax_get.php, + phpcompta/branches/rel500/html/commercial.php, + phpcompta/branches/rel500/html/js/infobulle.js, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/client.inc.php: + Add warnbulle + start new design of customer + +2009-07-13 21:07 danydb + + * phpcompta/branches/rel500/doc/data.dia, + phpcompta/branches/rel500/include/class_document_modele.php, + phpcompta/branches/rel500/include/client.inc.php, + phpcompta/branches/rel500/sql/upgrade.sql: + Remove obsolete function and start new design + +2009-07-15 19:57 danydb + + * phpcompta/branches/rel500/doc/data.dia, + phpcompta/branches/rel500/html/access.php, + phpcompta/branches/rel500/html/admin_repo.php, + phpcompta/branches/rel500/html/ajax_import.php, + phpcompta/branches/rel500/html/ajax_report.php, + phpcompta/branches/rel500/html/annulation.php, + phpcompta/branches/rel500/html/backup.php, + phpcompta/branches/rel500/html/bal_csv.php, + phpcompta/branches/rel500/html/bilan.php, + phpcompta/branches/rel500/html/bud_ajax.php, + phpcompta/branches/rel500/html/bud_csv.php, + phpcompta/branches/rel500/html/bud_search_poste.php, + phpcompta/branches/rel500/html/budget.php, + phpcompta/branches/rel500/html/ca_bc_csv.php, + phpcompta/branches/rel500/html/ca_bc_pdf.php, + phpcompta/branches/rel500/html/ca_bs_csv.php, + phpcompta/branches/rel500/html/ca_bs_pdf.php, + phpcompta/branches/rel500/html/ca_list_csv.php, + phpcompta/branches/rel500/html/ca_list_pdf.php, + phpcompta/branches/rel500/html/commercial.php, + phpcompta/branches/rel500/html/compta.php, + phpcompta/branches/rel500/html/comptanalytic.php, + phpcompta/branches/rel500/html/compute.php, + phpcompta/branches/rel500/html/fiche_csv.php, + phpcompta/branches/rel500/html/fiche_new.php, + phpcompta/branches/rel500/html/fiche_search.php, + phpcompta/branches/rel500/html/fid.php, + phpcompta/branches/rel500/html/form_csv.php, + phpcompta/branches/rel500/html/form_pdf.php, + phpcompta/branches/rel500/html/get_pj.php, + phpcompta/branches/rel500/html/get_predef.php, + phpcompta/branches/rel500/html/get_saldo.php, + phpcompta/branches/rel500/html/import.php, + phpcompta/branches/rel500/html/jrn_csv.php, + phpcompta/branches/rel500/html/jrn_pdf.php, + phpcompta/branches/rel500/html/jrn_search.php, + phpcompta/branches/rel500/html/line_update.php, + phpcompta/branches/rel500/html/listing_client.php, + phpcompta/branches/rel500/html/login.php, + phpcompta/branches/rel500/html/logout.php, + phpcompta/branches/rel500/html/modify_op.php, + phpcompta/branches/rel500/html/parametre.php, + phpcompta/branches/rel500/html/poste_csv.php, + phpcompta/branches/rel500/html/poste_pdf.php, + phpcompta/branches/rel500/html/poste_search.php, + phpcompta/branches/rel500/html/print_balance.php, + phpcompta/branches/rel500/html/priv_user.php, + phpcompta/branches/rel500/html/quick_code_csv.php, + phpcompta/branches/rel500/html/quick_code_pdf.php, + phpcompta/branches/rel500/html/recherche.php, + phpcompta/branches/rel500/html/remove_op.php, + phpcompta/branches/rel500/html/search_ca.php, + phpcompta/branches/rel500/html/sec_pdf.php, + phpcompta/branches/rel500/html/show_document.php, + phpcompta/branches/rel500/html/show_document_modele.php, + phpcompta/branches/rel500/html/show_fiche.php, + phpcompta/branches/rel500/html/show_pj.php, + phpcompta/branches/rel500/html/show_tva.php, + phpcompta/branches/rel500/html/test.php, + phpcompta/branches/rel500/html/todo_list.php, + phpcompta/branches/rel500/html/user_advanced.php, + phpcompta/branches/rel500/html/user_compta.php, + phpcompta/branches/rel500/html/user_login.php, + phpcompta/branches/rel500/html/user_pref.php, + phpcompta/branches/rel500/include/ac_common.php, + phpcompta/branches/rel500/include/anc_group.inc.php, + phpcompta/branches/rel500/include/anc_od.inc.php, + phpcompta/branches/rel500/include/argenta_be.inc.php, + phpcompta/branches/rel500/include/bud_card.inc.php, + phpcompta/branches/rel500/include/bud_detail.inc.php, + phpcompta/branches/rel500/include/cbc_be.inc.php, + phpcompta/branches/rel500/include/central.inc.php, + phpcompta/branches/rel500/include/central_inc.php, + phpcompta/branches/rel500/include/class_acc_account.php, + phpcompta/branches/rel500/include/class_acc_account_ledger.php, + phpcompta/branches/rel500/include/class_acc_balance.php, + phpcompta/branches/rel500/include/class_acc_bilan.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_info.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_acc_operation.php, + phpcompta/branches/rel500/include/class_acc_parm_code.php, + phpcompta/branches/rel500/include/class_acc_payment.php, + phpcompta/branches/rel500/include/class_acc_reconciliation.php, + phpcompta/branches/rel500/include/class_acc_report.php, + phpcompta/branches/rel500/include/class_acc_report_row.php, + phpcompta/branches/rel500/include/class_acc_tva.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_admin.php, + phpcompta/branches/rel500/include/class_anc_account.php, + phpcompta/branches/rel500/include/class_anc_balance_double.php, + phpcompta/branches/rel500/include/class_anc_balance_simple.php, + phpcompta/branches/rel500/include/class_anc_group.php, + phpcompta/branches/rel500/include/class_anc_group_operation.php, + phpcompta/branches/rel500/include/class_anc_operation.php, + phpcompta/branches/rel500/include/class_anc_plan.php, + phpcompta/branches/rel500/include/class_anc_print.php, + phpcompta/branches/rel500/include/class_bud_card.php, + phpcompta/branches/rel500/include/class_bud_data.php, + phpcompta/branches/rel500/include/class_bud_detail.php, + phpcompta/branches/rel500/include/class_bud_detail_periode.php, + phpcompta/branches/rel500/include/class_bud_hypo.php, + phpcompta/branches/rel500/include/class_bud_synthese.php, + phpcompta/branches/rel500/include/class_bud_synthese_acc.php, + phpcompta/branches/rel500/include/class_bud_synthese_anc.php, + phpcompta/branches/rel500/include/class_bud_synthese_group.php, + phpcompta/branches/rel500/include/class_bud_synthese_hypo.php, + phpcompta/branches/rel500/include/class_customer.php, + phpcompta/branches/rel500/include/class_database.php, + phpcompta/branches/rel500/include/class_document.php, + phpcompta/branches/rel500/include/class_document_modele.php, + phpcompta/branches/rel500/include/class_document_type.php, + phpcompta/branches/rel500/include/class_dossier.php, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/class_fiche_def.php, + phpcompta/branches/rel500/include/class_fiche_def_ref.php, + phpcompta/branches/rel500/include/class_gestion_purchase.php, + phpcompta/branches/rel500/include/class_gestion_sold.php, + phpcompta/branches/rel500/include/class_iperiod.php, + phpcompta/branches/rel500/include/class_itva_select.php, + phpcompta/branches/rel500/include/class_own.php, + phpcompta/branches/rel500/include/class_periode.php, + phpcompta/branches/rel500/include/class_pre_op_ach.php, + phpcompta/branches/rel500/include/class_pre_op_advanced.php, + phpcompta/branches/rel500/include/class_pre_op_fin.php, + phpcompta/branches/rel500/include/class_pre_op_ods.php, + phpcompta/branches/rel500/include/class_pre_op_ven.php, + phpcompta/branches/rel500/include/class_pre_operation.php, + phpcompta/branches/rel500/include/class_supplier.php, + phpcompta/branches/rel500/include/class_todo_list.php, + phpcompta/branches/rel500/include/class_user.php, + phpcompta/branches/rel500/include/compta_ach.inc.php, + phpcompta/branches/rel500/include/compta_fin.inc.php, + phpcompta/branches/rel500/include/compta_ven.inc.php, + phpcompta/branches/rel500/include/contact.inc.php, + phpcompta/branches/rel500/include/debug.php, + phpcompta/branches/rel500/include/dexia.inc.php, + phpcompta/branches/rel500/include/dexia_be.inc.php, + phpcompta/branches/rel500/include/dossier.inc.php, + phpcompta/branches/rel500/include/eub_be.inc.php, + phpcompta/branches/rel500/include/fiche.inc.php, + phpcompta/branches/rel500/include/fortis_be.inc.php, + phpcompta/branches/rel500/include/header_print.php, + phpcompta/branches/rel500/include/import_inc.php, + phpcompta/branches/rel500/include/impress.inc.php, + phpcompta/branches/rel500/include/impress_bilan.inc.php, + phpcompta/branches/rel500/include/impress_fiche.inc.php, + phpcompta/branches/rel500/include/impress_inc.php, + phpcompta/branches/rel500/include/impress_jrn.inc.php, + phpcompta/branches/rel500/include/impress_listing_client.inc.php, + phpcompta/branches/rel500/include/impress_poste.inc.php, + phpcompta/branches/rel500/include/impress_rapport.inc.php, + phpcompta/branches/rel500/include/ing_be.inc.php, + phpcompta/branches/rel500/include/jrn.php, + phpcompta/branches/rel500/include/modele.inc.php, + phpcompta/branches/rel500/include/opening.inc.php, + phpcompta/branches/rel500/include/param_jrn.inc.php, + phpcompta/branches/rel500/include/param_jrn_add.inc.php, + phpcompta/branches/rel500/include/param_jrn_detail.inc.php, + phpcompta/branches/rel500/include/param_pcmn.inc.php, + phpcompta/branches/rel500/include/param_sec.inc.php, + phpcompta/branches/rel500/include/periode.inc.php, + phpcompta/branches/rel500/include/postgres.php, + phpcompta/branches/rel500/include/pref.inc.php, + phpcompta/branches/rel500/include/preod.inc.php, + phpcompta/branches/rel500/include/quick_writing.inc.php, + phpcompta/branches/rel500/include/report.inc.php, + phpcompta/branches/rel500/include/restore.inc.php, + phpcompta/branches/rel500/include/stock.inc.php, + phpcompta/branches/rel500/include/stock_inc.php, + phpcompta/branches/rel500/include/tva.inc.php, + phpcompta/branches/rel500/include/user.inc.php, + phpcompta/branches/rel500/include/user_action_gl.php, + phpcompta/branches/rel500/include/user_common.php, + phpcompta/branches/rel500/include/user_menu.php, + phpcompta/branches/rel500/include/verif_bilan.inc.php: + Implement the object Database and replace completely the old + functions + The file postgres.php has been removed + +2009-07-16 18:20 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/html/admin/sql/patch/upgrade57.sql, + phpcompta/branches/rel500/html/fiche_new.php, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/constant.php: + Merged revisions 2477,2479 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2477 | danydb | 2009-07-14 21:48:05 +0200 (Tue, 14 Jul 2009) | 1 line - Add version + Bug : exception instead of new exception ........ - r2128 | danydb | 2008-07-25 17:44:38 +0200 (Fri, 25 Jul 2008) | 1 + r2479 | danydb | 2009-07-16 19:56:40 +0200 (Thu, 16 Jul 2009) | 1 line - short tag - ........ - r2129 | danydb | 2008-07-25 18:40:34 +0200 (Fri, 25 Jul 2008) | 1 - line - - Add Generate invoice + Fix bug for show_ledger() - ........ - r2130 | danydb | 2008-07-25 20:51:47 +0200 (Fri, 25 Jul 2008) | 1 - line - - remove debug - ........ - r2131 | danydb | 2008-07-25 20:52:12 +0200 (Fri, 25 Jul 2008) | 1 - line - - set version - ........ - r2132 | danydb | 2008-07-27 22:55:03 +0200 (Sun, 27 Jul 2008) | 1 - line - - Unicode - ........ - r2133 | danydb | 2008-08-28 17:52:50 +0200 (Thu, 28 Aug 2008) | 1 - line - - add pguser for documentation - ........ - r2134 | danydb | 2008-08-28 19:55:26 +0200 (Thu, 28 Aug 2008) | 1 - line - - correst documentation script - ........ - r2135 | danydb | 2008-08-28 21:23:05 +0200 (Thu, 28 Aug 2008) | 1 - line - - Improve install. : automatic writing of htaccess file - ........ - r2136 | danydb | 2008-08-28 21:23:21 +0200 (Thu, 28 Aug 2008) | 1 - line - - Improve install. : automatic writing of htaccess file - ........ - r2137 | danydb | 2008-08-28 22:43:31 +0200 (Thu, 28 Aug 2008) | 1 - line - - Remove the useless category of card - ........ - r2138 | danydb | 2008-08-29 15:57:33 +0200 (Fri, 29 Aug 2008) | 1 - line - - update version - ........ - r2139 | danydb | 2008-09-04 21:49:29 +0200 (Thu, 04 Sep 2008) | 1 - line - - update doc - ........ - r2140 | danydb | 2008-09-06 20:47:13 +0200 (Sat, 06 Sep 2008) | 1 - line - - Remove a not wanted hidden value which makes failed the searching - for card - ........ - r2141 | danydb | 2008-09-07 18:57:42 +0200 (Sun, 07 Sep 2008) | 1 - line - - Update doc. - ........ - r2142 | danydb | 2008-09-08 13:38:00 +0200 (Mon, 08 Sep 2008) | 1 - line - - Fix small in fin - ........ - r2143 | danydb | 2008-09-08 13:49:52 +0200 (Mon, 08 Sep 2008) | 1 - line - - Fix small bugs in ach & ven - ........ - r2144 | danydb | 2008-09-08 13:57:25 +0200 (Mon, 08 Sep 2008) | 1 - line - - bug : courrier concerne - ........ - r2145 | danydb | 2008-09-08 14:24:00 +0200 (Mon, 08 Sep 2008) | 2 - lines - - Fix bug with export of report - ........ - r2146 | danydb | 2008-09-08 15:25:50 +0200 (Mon, 08 Sep 2008) | 1 - line - - Add the security - ........ - r2147 | danydb | 2008-09-09 21:31:52 +0200 (Tue, 09 Sep 2008) | 1 - line - - files cleaning - ........ - r2148 | danydb | 2008-09-09 21:34:40 +0200 (Tue, 09 Sep 2008) | 1 - line - - files cleaning - ........ - r2149 | danydb | 2008-09-10 13:52:56 +0200 (Wed, 10 Sep 2008) | 1 - line - - Fix bug in ledger sold, purchase for negative amount and - financial for qcode - ........ - r2150 | danydb | 2008-09-10 14:33:07 +0200 (Wed, 10 Sep 2008) | 1 - line - - update version - ........ - r2151 | danydb | 2008-09-10 14:42:24 +0200 (Wed, 10 Sep 2008) | 1 - line - - Add patch for insert_jrnx - ........ - r2152 | danydb | 2008-09-10 14:42:56 +0200 (Wed, 10 Sep 2008) | 1 - line - - update version - ........ - r2153 | danydb | 2008-09-10 17:53:28 +0200 (Wed, 10 Sep 2008) | 1 - line - - typo - ........ - r2154 | danydb | 2008-09-10 18:07:51 +0200 (Wed, 10 Sep 2008) | 1 - line - - Fix layout - ........ - r2155 | danydb | 2008-09-13 18:08:09 +0200 (Sat, 13 Sep 2008) | 1 - line - - Update documentation - ........ - r2156 | danydb | 2008-09-13 18:11:52 +0200 (Sat, 13 Sep 2008) | 1 - line - - Update version - ........ - r2157 | danydb | 2008-09-13 22:27:29 +0200 (Sat, 13 Sep 2008) | 1 - line - - Add document to upload - ........ - r2158 | danydb | 2008-09-13 22:28:52 +0200 (Sat, 13 Sep 2008) | 1 - line - - Add document + Fix Bug for Postgresql 8.3 ........ -2008-09-13 20:48 danydb +2009-07-16 22:14 danydb - * .: Initialized merge tracking via "svnmerge" with revisions - "1-1908" from - svn+ssh://danydb@svn/svn/phpcompta/branches/rel410-exp + * phpcompta/branches/rel500/html/test.php, + phpcompta/branches/rel500/include/class_anc_account.php, + phpcompta/branches/rel500/include/class_bud_card.php, + phpcompta/branches/rel500/include/class_bud_data.php, + phpcompta/branches/rel500/include/class_database.php: + Correct test_me -2008-06-13 19:18 danydb +2009-07-28 19:47 danydb - * include/user_menu.php: Page Accueil : ordre alphabetique des - dossiers - -2008-05-07 18:46 danydb - - * include/class_customer.php, include/class_periode.php, - include/class_supplier.php: Fix bug : Quick code must be used in - gestion - -2008-05-07 17:46 danydb - - * include/class_acc_ledger.php: code doc. - -2008-04-10 08:19 danydb - - * html/priv_user.php: Bug cosmetic : warning message when no folder - is found - -2008-04-01 14:57 danydb - - * html/document/fr_be/bnb.form, html/document/fr_be/bnb.rtf: Bilan - : problem with 649 - -2008-03-30 12:00 danydb - - * include/class_acc_ledger.php: Remove useless (and wrong) hexdec - function in compute_internal - -2008-03-26 21:03 danydb - - * include/param_pcmn.inc.php: replace ExecSql by ExecSqlParam - -2008-03-26 20:56 danydb - - * include/param_pcmn.inc.php: Bug : a not needed quote - -2008-03-25 13:22 danydb - - * html/poste_csv.php, html/quick_code_csv.php, - include/class_acc_account_ledger.php, - include/class_acc_operation.php, include/class_customer.php, - include/class_fiche.php, include/class_periode.php, - include/class_supplier.php, include/impress_poste.inc.php, - include/postgres.php: task #55 : link from customer / supplier to - all operation + detail - -2008-03-25 08:18 danydb - - * include/class_acc_account.php, include/param_pcmn.inc.php: Fix : - Produit & charge inverse - -2008-03-21 11:13 danydb - - * include/user_common.php: Fix : vulnerability SQL Injection - -2008-03-21 10:49 danydb - - * include/user_action_fin.php: Filter the financial balance from - the current exercice only - -2008-03-21 10:45 danydb - - * include/param_jrn_detail.inc.php: Bug : last short-tag - -2008-03-20 12:49 danydb - - * include/param_jrn_detail.inc.php: Long tag - -2008-03-18 16:36 danydb - - * include/constant.php: Constant.php contains test value for psql - 8.3 - -2008-03-18 14:56 danydb - - * html/admin/sql/patch/upgrade47.sql, html/index.php, - include/constant.php: Bug Fix comptability for psql 8.3 see - upgrade47.sql - -2008-03-18 14:50 danydb - - * html/admin/sql/patch/upgrade46.sql: Bug the sql 45 contains the - wrong value for the next version - -2008-03-15 23:16 danydb - - * include/constant.php, sql/upgrade.sql: v4.0.2 Bug : comptability - psql 8.3 - -2008-03-15 22:40 danydb - - * sql/upgrade.sql: BUG comptability postgresql 8.3 - -2008-03-15 20:00 danydb - - * include/user_common.php: Fix wrong unicode for echeance - -2008-03-15 19:21 danydb - - * html/admin/sql/patch/upgrade45.sql, html/index.php: Forget to add - the sql 45 - -2008-03-15 18:28 danydb - - * include/class_acc_ledger.php, include/user_common.php: Fix - problem with rounded value - -2008-03-12 22:38 danydb - - * include/user_form_fin.php: task 47 add more check for fin. ledger - -2008-03-11 12:17 danydb - - * html/control.php: it is a workaround for some system where the - PHPSESSID is not passed - -2008-03-11 09:43 danydb - - * html/.htaccess: Put the session.use_trans_sid in the htaccess - file - -2008-03-10 10:55 danydb - - * html/admin/setup.php, include/constant.php: IMP The database is a - variable in constant.php and add the patch sql 45 for - Compatibility with 8.3 - -2008-03-07 13:42 danydb - - * sql/upgrade.sql: Compatibility for postgresql8.3 - -2008-03-06 10:58 danydb - - * html/admin/setup.php, html/admin/sql/patch/upgrade44.sql, - include/user_common.php: Bug #41 : record even operation with - amount of 0 - -2008-03-03 21:39 danydb - - * include/class_acc_ledger.php: Bug Fix : centralized ledger - doesn't work - -2008-03-03 21:21 danydb - - * include/class_acc_ledger.php: Bug Fix order of centralized - -2008-03-03 14:40 danydb - - * doc/Makefile, doc/manuel-fr.odt, doc/manuel-fr.pdf, - doc/manuel-fr.sgml, doc/manuel.odt, html/admin/.cvsignore: Merge - with rel400 completed. Update of the doc - -2008-02-28 22:03 danydb - - * html/admin/sql/patch/upgrade39.sql: Compatibility with postgresql - 8.1 - -2008-02-26 17:26 danydb - - * contrib/document_test/facture-calc.ods, doc/developper/Doxyfile, - doc/developper/html, html/access.php, html/admin/setup.php, - html/admin/sql/patch/upgrade36.BE.sql, - html/admin/sql/patch/upgrade41.sql, - html/admin/sql/patch/upgrade42.sql, - html/admin/sql/patch/upgrade43.sql, html/annulation.php, - html/budget.php, html/ca_bc_csv.php, html/ca_bc_pdf.php, - html/ca_bs_csv.php, html/ca_bs_pdf.php, html/ca_list_csv.php, - html/ca_list_pdf.php, html/caop_detail.php, - html/comptanalytic.php, html/confirm_remove.php, - html/document/fr_be/bnb.form, html/document/fr_be/bnb.rtf, - html/ecrit_ouv.php, html/js/caod_compute.js, html/js/compute.js, - html/js/compute_direct.js, html/js/confirm.js, - html/modify_op.php, html/poste_csv.php, html/remove_op.php, - html/search_ca.php, html/show_document_modele.php, - html/show_pj.php, include/ac_common.php, - include/anc_group.inc.php, include/anc_imp.inc.php, - include/anc_od.inc.php, include/anc_pa.inc.php, - include/balance.inc.php, include/bud_detail.inc.php, - include/bud_sacc.inc.php, include/bud_synthese.inc.php, - include/ca_group.inc.php, include/ca_imp.inc.php, - include/ca_od.inc.php, include/ca_pa.inc.php, - include/central_inc.php, include/check_priv.php, - include/class_acc_account.php, - include/class_acc_account_ledger.php, - include/class_acc_bilan.php, include/class_acc_jrn_info.php, - include/class_acc_operation.php, include/class_acexception.php, - include/class_action.php, include/class_admin.php, - include/class_anc_account.php, - include/class_anc_group_operation.php, - include/class_anc_listing.php, include/class_anc_operation.php, - include/class_anc_plan.php, include/class_anc_print.php, - include/class_attribut.php, include/class_bud_card.php, - include/class_bud_data.php, include/class_bud_detail_periode.php, - include/class_bud_hypo.php, include/class_bud_synthese.php, - include/class_bud_synthese_acc.php, - include/class_bud_synthese_anc.php, - include/class_bud_synthese_group.php, - include/class_bud_synthese_hypo.php, include/class_contact.php, - include/class_document.php, include/class_document_modele.php, - include/class_document_type.php, include/class_fiche_def_ref.php, - include/class_gestion_purchase.php, - include/class_gestion_sold.php, include/class_gestion_table.php, - include/class_parm_code.php, include/class_periode.php, - include/class_pre_op_ach.php, include/class_pre_op_advanced.php, - include/class_pre_op_fin.php, include/class_pre_op_ods.php, - include/class_pre_op_ven.php, include/class_pre_operation.php, - include/class_rapport.php, include/class_supplier.php, - include/constant.php, include/decla.BE.inc.php, - include/depense.inc.php, include/dossier.inc.php, - include/form_inc.php, include/header_print.php, - include/import_inc.php, include/impress_fiche.inc.php, - include/impress_inc.php, include/impress_jrn.inc.php, - include/impress_poste.inc.php, include/impress_rapport.inc.php, - include/jrn.php, include/modele.inc.php, include/periode.inc.php, - include/poste.php, include/postgres.php, include/pref.inc.php, - include/quick_writing.inc.php, include/user.inc.php, - include/user_action_fin.php, include/user_action_ven.php, - include/user_form_ach.php, include/user_form_fin.php, - include/user_form_ven.php, include/user_menu.php, - sql/upgrade.sql: Merge with the branches/rel400 - * New module budget - * Detail for impress of account - * Code rewrited - * Group in analytic accountancy - * Fix Bug - -2008-02-19 17:14 root - - * .: Change structure - -2008-02-11 20:06 sparkyx - - * : update header - -2008-02-11 18:53 sparkyx - - * : merge with rel310C - -2008-01-26 18:15 sparkyx - - * : 2409 - amort - actif inv - -2008-01-26 18:10 sparkyx - - * : Cosmetic - -2008-01-26 15:54 sparkyx - - * : Add documentation - -2008-01-24 23:43 sparkyx - - * : Cosmetic - -2008-01-24 23:13 sparkyx - - * : Support for windows - -2008-01-24 19:43 sparkyx - - * : Fix latest cosmetic bugs - -2008-01-22 17:59 sparkyx - - * : Cosmetic - -2008-01-22 17:58 sparkyx - - * : Check sum analytic - -2008-01-22 17:42 sparkyx - - * : fix cosmetic - -2008-01-22 16:12 sparkyx - - * : Fix last bugs - -2008-01-18 20:16 sparkyx - - * : avoid unknow user - -2008-01-18 20:14 sparkyx - - * : remove debug - -2008-01-18 20:14 sparkyx - - * : initial stock when a new stock code is used - -2008-01-18 20:12 sparkyx - - * : Cosmetic - -2008-01-17 19:44 sparkyx - - * : Change menu - -2008-01-17 18:43 sparkyx - - * : Fix cosmetic - -2008-01-17 17:28 sparkyx - - * : Fix bug with new widget::submit - -2008-01-17 17:28 sparkyx - - * : Change icon by SELECT - -2008-01-17 14:57 sparkyx - - * : fix small bug - -2008-01-17 14:48 sparkyx - - * : replace function widget::Submit and static - widget::submit_button by static widget::submit (same for Reset) - -2008-01-17 13:34 sparkyx - - * : replace function widget::Submit and static - widget::submit_button by static widget::submit (same for Reset) - -2008-01-16 15:22 sparkyx - - * : Change ob_clean by ob_end_clean to discard the buffer - -2008-01-12 21:24 sparkyx - - * : Patch and database - -2008-01-12 20:50 sparkyx - - * : Add hour and minute to header - -2008-01-12 20:45 sparkyx - - * : Add the id - -2008-01-12 20:10 sparkyx - - * : centralization file is not an independant file accessible from - the "gestion" - -2008-01-12 20:08 sparkyx - - * : Change acc_account => acc_account_ledger because the tmp_pcmn - contains now a new column for the type of the account (asset, - expense...) which permit to check if the accountancy is valid - -2008-01-12 20:08 sparkyx - - * : test verify_bilan.inc.php - -2008-01-12 20:07 sparkyx - - * : Change acc_account => acc_account_ledger - -2008-01-12 20:05 sparkyx - - * : move the verification into a separate file : - include/verif_bilan.inc.php - -2008-01-12 20:03 sparkyx - - * : cosmetic - -2008-01-12 18:25 sparkyx - - * : Cosmetic - -2008-01-11 23:34 sparkyx - - * : Change cl_user to User - -2008-01-11 23:33 sparkyx - - * : Adapt to ASBL (subside 73 & 74) - -2008-01-10 23:12 sparkyx - - * : Fix periode - -2008-01-10 21:56 sparkyx - - * : removed by mistake - -2008-01-10 21:55 sparkyx - - * : obsolete - -2008-01-10 21:44 sparkyx - - * : Add centralized and closing periode to gestion module - Add security for module Budget - Add paid & unpaid to module "gestion" - Add Periode & Centra to module "Gestion" - Add Filter for gestion, security + * phpcompta/branches/rel500/doc/document.dia, + phpcompta/branches/rel500/doc/manuel-fr.odt: Documentation - Close periode by ledger -2008-01-10 21:36 sparkyx - - * : obsolete - -2008-01-10 21:35 sparkyx - - * : Move ledger, accountancy plan and sec here - -2008-01-10 21:32 sparkyx - - * : Move central.php to include/central.inc.php - -2008-01-10 21:31 sparkyx - - * : test - -2008-01-10 21:27 sparkyx - - * : Add centralized and closing periode to gestion module - -2008-01-10 21:26 sparkyx - - * : Add security - -2008-01-10 21:25 sparkyx - - * : Close the periode by ledger - -2008-01-09 12:41 sparkyx - - * : The faq is now on the website - -2008-01-04 22:32 sparkyx - - * : Fix : 2 fois le meme nom de dossier - -2008-01-02 15:42 sparkyx - - * : cosmetic - -2008-01-02 15:23 sparkyx - - * : cosmetic - -2008-01-01 21:02 sparkyx - - * : cosmetic - -2008-01-01 20:55 sparkyx - - * : beta Module Budget - -2008-01-01 18:15 sparkyx - - * : add the function hidden - -2008-01-01 18:12 sparkyx - - * : select the synthese - -2007-12-31 16:44 sparkyx - - * : Fix the synthese - -2007-12-31 16:43 sparkyx - - * : Ready without Analytic - -2007-12-31 16:42 sparkyx - - * : Initial value included in the total ??? - -2007-12-31 16:28 sparkyx - - * : Finish the export_html - -2007-12-31 01:31 sparkyx - - * : Problem with head-foot part of the budget module - -2007-12-30 22:47 sparkyx - - * : Justify tab - -2007-12-30 22:20 sparkyx - - * : Add export CSV - HTML to Bud_Synthese_anc & acc - -2007-12-30 16:41 sparkyx - - * : Complete the synthese part of the budget module - -2007-12-30 16:37 sparkyx - - * : Synthesis by group, load and head_foot function - -2007-12-30 14:51 sparkyx - - * : fix bug with array - -2007-12-30 13:49 sparkyx - - * : correct the swap - -2007-12-30 13:37 sparkyx - - * : Add the summary - -2007-12-30 13:09 sparkyx - - * : Add detail by row - -2007-12-30 12:58 sparkyx - - * : Add the result by row - -2007-12-29 21:34 sparkyx - - * : Add Synthese for Analytic (Synthese 2) - -2007-12-29 19:50 sparkyx - - * : Load the data from database - -2007-12-28 18:46 sparkyx - - * : start with bud_synthese - -2007-12-28 16:54 sparkyx - - * : Cosmetic - -2007-12-28 16:41 sparkyx - - * : Date d'echeance - -2007-12-28 16:36 sparkyx - - * : Recherche -> Recherche poste or Recherche fiche - -2007-12-28 16:34 sparkyx - - * : include -> include_once - -2007-12-28 16:25 sparkyx - - * : small bug - -2007-12-28 15:56 sparkyx - - * : Add verify function + fix bug in budget detail - -2007-12-27 18:21 sparkyx - - * : Cosmetic - -2007-12-27 18:12 sparkyx - - * : link the group analytic to the plan Analytic - -2007-12-27 18:12 sparkyx - - * : Let the form for searching visible when a result is returned - -2007-12-27 18:11 sparkyx - - * : rename get_sql_value to getDbValue - -2007-12-27 18:07 sparkyx - - * : fix : The predefined op. vanish when one is choosen - -2007-12-27 17:14 sparkyx - - * : upgrade SQL and add missing files - -2007-12-27 17:13 sparkyx - - * : pa_id can be null - -2007-12-27 17:13 sparkyx - - * : a hypothese must be choosen - -2007-12-27 17:13 sparkyx - - * : fix ga_id not set - -2007-12-27 17:12 sparkyx - - * : Fix ga_id not set - -2007-12-27 17:12 sparkyx - - * : Fix bug for group - -2007-12-24 15:36 sparkyx - - * : ressurect file removed by mistake - -2007-12-24 15:27 sparkyx - - * : Add Documentation + cosmetics - -2007-12-23 19:42 sparkyx - - * : update upgrade.sql - -2007-12-23 19:40 sparkyx - - * : module budget : detail is finished - -2007-12-23 19:07 sparkyx - - * : Cosmetic - -2007-12-23 18:49 sparkyx - - * : finish the class_bud_data - -2007-12-23 14:19 sparkyx - - * : use pg_fetch_result to get the code cleaner - -2007-12-22 02:36 sparkyx - - * : Module Budget : bud_data - -2007-12-21 21:06 sparkyx - - * : fix bug with invalid jrn - -2007-12-21 09:48 sparkyx - - * : Code Cleaning : get-> load, GetWWW ==> get_www - -2007-12-21 09:22 sparkyx - - * : Code Cleaning : get-> load, GetWWW ==> get_www - -2007-12-21 09:07 sparkyx - - * : Code Cleaning : get-> load, GetWWW ==> get_www - -2007-12-21 08:44 sparkyx - - * : Code Cleaning replace get() by load() - -2007-12-21 08:32 sparkyx - - * : Code Cleaning : replace include by require_once - -2007-12-21 08:30 sparkyx - - * : Possible bug - -2007-12-21 06:53 sparkyx - - * : Code Cleaning : rename class_poste to class_acc_account - -2007-12-20 13:06 sparkyx - - * : Code cleaning : rename class_groupop to - class_anc_group_operation - -2007-12-20 13:02 sparkyx - - * : Code cleaning : rename class_poste to class_acc_account - -2007-12-20 12:53 sparkyx - - * : Code cleaning : rename class_poste to class_acc_account - -2007-12-20 12:15 sparkyx - - * : Code cleaning : renaming - -2007-12-20 11:03 sparkyx - - * : rename list_ca => Anc_Listing, print_ca => Anc_Print - -2007-12-20 10:40 sparkyx - - * : Rename class_balance_ca to class_anc_balance - -2007-12-20 10:25 sparkyx - - * : Rename class_balance to class_acc_balance - -2007-12-20 10:21 sparkyx - - * : Change class_bilan to class_acc_bilan - -2007-12-19 23:03 sparkyx - - * : cosmetic - -2007-12-19 22:53 sparkyx - - * : rename class_poste_analytic to Anc_Account - -2007-12-19 22:43 sparkyx - - * : Module budget :: detail - -2007-12-19 16:28 sparkyx - - * : replace NextJrn by Acc_Ledger::next_number - -2007-12-19 16:18 sparkyx - - * : replace GetInternal by Acc_Operation::get_internal - -2007-12-19 16:17 sparkyx - - * : replace GetInternal by Acc_Operation::get_internal - -2007-12-19 15:42 sparkyx - - * : code cleaning GetName ==> get_name - -2007-12-19 15:18 sparkyx - - * : replace jrn.php:SetInternalCode by - Acc_Ledger::compute_internal_code - Obsolete functions - -2007-12-19 14:12 sparkyx - - * : remove GetJrnProp to Acc_Ledger->get_propertie - -2007-12-19 13:43 sparkyx - - * : remove GetJrnProp to Acc_ÂLedger->get_propertie - -2007-12-19 12:55 sparkyx - - * : Code cleaning - -2007-12-18 22:13 sparkyx - - * : Module budget : detail - -2007-12-18 22:12 sparkyx - - * : Remove sql error - -2007-12-18 22:12 sparkyx - - * : module budget : detail - -2007-12-18 21:25 sparkyx - - * : fix tag - -2007-12-18 21:23 sparkyx - - * : Module Budget : add javascript to widget select - -2007-12-18 21:15 sparkyx - - * : fix printout with sql error - -2007-12-18 21:12 sparkyx - - * : Module budget : fiche - -2007-12-18 21:11 sparkyx - - * : module budget : fiche - -2007-12-18 20:52 sparkyx - - * : Module Budget : fiche - -2007-12-14 17:07 sparkyx - - * : Module Budget : card - -2007-12-13 19:43 sparkyx - - * : testing - -2007-12-13 19:43 sparkyx - - * : for submit_button: add javascript ability - -2007-12-13 19:43 sparkyx - - * : Modify ShowItem : for a vertical menu you show the selected - item - -2007-12-13 19:42 sparkyx - - * : BUD_HYPOTHESE - -2007-12-13 13:54 sparkyx - - * : task #7524 improve ca - -2007-12-13 13:53 sparkyx - - * : Quote problem - -2007-12-12 23:00 sparkyx - - * : Update doxygen documentation - -2007-12-12 22:56 sparkyx - - * : Update doxygen documentation - -2007-12-12 22:37 sparkyx - - * : Fix cosmetic - -2007-12-12 21:25 sparkyx - - * : Module Budget : Bud_detail - -2007-12-12 21:25 sparkyx - - * : Module Budget : Bud_card - -2007-12-12 21:25 sparkyx - - * : Module Budget - -2007-12-12 20:50 sparkyx - - * : Add cvsignore - -2007-12-12 20:45 sparkyx - - * : Improve module test - -2007-12-12 20:44 sparkyx - - * : Improve testme function - -2007-12-12 20:33 sparkyx - - * : Improve testme function - -2007-12-12 20:33 sparkyx - - * : Improve ExecSqlParam - -2007-12-12 19:37 sparkyx - - * : Improve testme function - -2007-12-12 19:18 sparkyx - - * : add a static testme function - -2007-12-12 18:44 sparkyx - - * : Add the function ExecSqlParam - -2007-12-12 17:21 sparkyx - - * : *** empty log message *** - -2007-12-12 15:50 sparkyx - - * : module budget - -2007-12-12 14:56 sparkyx - - * : Cosmetic - -2007-12-11 19:54 sparkyx - - * : Budget step 1 - -2007-12-11 19:49 sparkyx - - * : Permit formula in OOCalc - -2007-12-11 19:43 sparkyx - - * : Permit formula in OOCalc - -2007-12-10 06:11 sparkyx - - * : Module Budget - -2007-12-09 19:47 sparkyx - - * : BUDGET Hypothese - -2007-12-09 19:31 sparkyx - - * : Map the table bud_hypothese - -2007-12-05 22:50 sparkyx - - * : Documentation - -2007-12-05 22:48 sparkyx - - * : Groupe Analytic management - -2007-12-05 22:17 sparkyx - - * : Analytic group - -2007-12-05 21:34 sparkyx - - * : documentation - -2007-12-04 23:01 sparkyx - - * : Cosmetic - -2007-12-04 23:00 sparkyx - - * : Add CA group - -2007-12-04 10:03 sparkyx - - * : fix cosmetic - -2007-12-03 21:56 sparkyx - - * : Fix bug and add verification - -2007-11-27 18:14 sparkyx - - * : bug #21652: Fiche - dossier invalide - -2007-11-26 22:20 sparkyx - - * : Cosmetic - -2007-11-26 22:10 sparkyx - - * : Fix bug in action - -2007-11-26 20:40 sparkyx - - * : Bug with the bank importation - -2007-11-24 20:37 sparkyx - - * : update tag : DATE_LIMIT, TOTAL TVA and CUST_CITY - -2007-11-22 11:31 sparkyx - - * : Fix version - -2007-11-20 20:36 sparkyx - - * : fix cosmetic - -2007-11-16 21:49 sparkyx - - * : bug #21599: comptabilité analytique && Ecriture ouverture - -2007-11-15 10:17 sparkyx - - * : task #7478: Resume TVA Facture / Vente - -2007-11-15 09:36 sparkyx - - * : Function not found due to a space - -2007-11-15 09:18 sparkyx - - * : bug #21589: Warning vue simple - -2007-11-14 18:19 sparkyx - - * : bug #21579: Journaux financier : erreur dans la présentation - -2007-11-12 21:44 sparkyx - - * : bug #21563: Balance : Impossible d'exporter en CSV - -2007-11-10 20:10 sparkyx - - * : task #7440 New tags - -2007-11-10 19:53 sparkyx - - * : remove silly stuff - -2007-11-10 19:49 sparkyx - - * : Add missing plans - -2007-11-07 21:17 sparkyx - - * : bug #21539 - -2007-11-05 22:14 sparkyx - - * : upgrade 35 - -2007-11-04 22:56 sparkyx - - * : Fix problem with space into filename - -2007-11-03 14:13 sparkyx - - * : Small bug - -2007-11-02 15:36 sparkyx - - * : cosmetic - -2007-11-02 15:08 sparkyx - - * : Last changes before 3.0 - -2007-11-01 21:14 sparkyx - - * : Last upgrade for version 3.0 - -2007-11-01 20:58 sparkyx - - * : add the tva - -2007-11-01 20:58 sparkyx - - * : Add the tva - -2007-11-01 20:57 sparkyx - - * : Cosmetic - -2007-11-01 20:55 sparkyx - - * : Fix cosmetic - -2007-11-01 20:45 sparkyx - - * : Fix problem with modifyOperation - -2007-11-01 20:22 sparkyx - - * : Clean predefined operations - -2007-11-01 20:01 sparkyx - - * : change é with eacute; - -2007-11-01 18:12 sparkyx - - * : remove if a creation failed - -2007-11-01 17:52 sparkyx - - * : remove debug info - -2007-11-01 17:50 sparkyx - - * : Info - -2007-11-01 17:45 sparkyx - - * : security add testing as defaut domain - -2007-11-01 17:44 sparkyx - - * : add info - -2007-11-01 17:43 sparkyx - - * : do not start a domain with a number - -2007-11-01 17:36 sparkyx - - * : add debug info - -2007-11-01 17:13 sparkyx - - * : add a refresh button - -2007-11-01 16:35 sparkyx - - * : fix constraint prob - -2007-11-01 16:33 sparkyx - - * : fix constraint problem - -2007-11-01 14:58 sparkyx - - * : Fix problem french modele - -2007-11-01 11:24 sparkyx - - * : Fix problem with french (sequence) - -2007-10-30 20:50 sparkyx - - * : French accountancy - -2007-10-30 20:49 sparkyx - - * : Refresh button - -2007-10-30 20:31 sparkyx - - * : Fix french accountancy - -2007-10-30 20:30 sparkyx - - * : clean comment - -2007-10-30 18:55 sparkyx - - * : Fix problem with sequence - -2007-10-30 18:52 sparkyx - - * : Fix problem with sequence - -2007-10-29 18:52 sparkyx - - * : Fix for postgres 8.1 - -2007-10-28 19:59 sparkyx - - * : Make SQL - -2007-10-28 16:43 sparkyx - - * : fix deprecated - -2007-10-28 14:14 sparkyx - - * : Fix modele - -2007-10-28 14:13 sparkyx - - * : Fix problem with centralized - -2007-10-28 13:29 sparkyx - - * : Correct isTVA - -2007-10-26 21:34 sparkyx - - * : fix install - -2007-10-26 21:03 sparkyx - - * : fix problem with form - -2007-10-26 20:59 sparkyx - - * : cosmetic - -2007-10-26 20:32 sparkyx - - * : add ODS support - -2007-10-26 20:32 sparkyx - - * : cosmetic - -2007-10-26 20:32 sparkyx - - * : Contrib compta francaise - -2007-10-26 19:46 sparkyx - - * : cosmetic - -2007-10-25 20:53 sparkyx - - * : Cosmetic - -2007-10-22 22:18 sparkyx - - * : Add documentation; add security for direct writing and fix - cosmetic - -2007-10-21 17:59 sparkyx - - * : Verbose message error - -2007-10-21 17:50 sparkyx - - * : remove debug info - -2007-10-21 17:35 sparkyx - - * : include replaced by require_once - -2007-10-21 17:32 sparkyx - - * : Missing gDossier - -2007-10-21 15:43 sparkyx - - * : Missing gDossier - -2007-10-21 15:20 sparkyx - - * : Release candidate - -2007-10-20 16:11 sparkyx - - * : Cosmetic - -2007-10-20 14:38 sparkyx - - * : Cosmetic - -2007-10-20 11:18 sparkyx - - * : order the tva by the rate - -2007-10-20 00:41 sparkyx - - * : Javascript framework - -2007-10-19 23:56 sparkyx - - * : remove debug info - -2007-10-19 23:55 sparkyx - - * : Fix problem in import bank (fgetcsv has changed) and add ajax - abilities - -2007-10-18 20:15 sparkyx - - * : Add default date - -2007-10-18 20:06 sparkyx - - * : Fix problem with jrn_def_class_cred - -2007-10-18 19:54 sparkyx - - * : cosmetic - -2007-10-18 18:08 sparkyx - - * : Fix cosmetic - -2007-10-18 18:03 sparkyx - - * : fix cosmetic - -2007-10-18 11:13 sparkyx - - * : Fix cosmetic - -2007-10-17 19:50 sparkyx - - * : update doc - -2007-10-17 19:49 sparkyx - - * : Fix bug gDossier was missing - -2007-10-17 19:37 sparkyx - - * : Add country - -2007-10-17 19:34 sparkyx - - * : fix cosmetic - -2007-10-17 19:20 sparkyx - - * : Add quick_code - -2007-10-17 19:20 sparkyx - - * : Cosmetic :add quick-code, name of the card and sum of the - operation - -2007-10-17 19:05 sparkyx - - * : remove useless - -2007-10-17 18:12 sparkyx - - * : Add security - -2007-10-17 18:11 sparkyx - - * : cosmetic - -2007-10-17 18:03 sparkyx - - * : Cosmetic - -2007-10-17 17:54 sparkyx - - * : quick write ==> direct write - -2007-10-17 10:28 sparkyx - - * : Ajout document CA - -2007-10-16 23:38 sparkyx - - * : Fix column name - -2007-10-16 22:04 sparkyx - - * : Multiple selection for reconciliation, acc_ledger can now add a - reconciliation - -2007-10-16 19:11 sparkyx - - * : Multiple selection for the reconciliation - -2007-10-16 19:02 sparkyx - - * : Modify widget for the readonly - -2007-10-16 18:49 sparkyx - - * : Multiple selection - -2007-10-16 18:05 sparkyx - - * : set the field for the jrn_concerned readonly - -2007-10-15 19:04 sparkyx - - * : Fix last problems - -2007-10-15 14:49 sparkyx - - * : remove debug - -2007-10-15 14:40 sparkyx - - * : Beta 3.0 -3 ready - -2007-10-15 14:25 sparkyx - - * : Add check in javascript for Direct writing - -2007-10-15 14:24 sparkyx - - * : Add a javascript check for the Direct Writing - -2007-10-15 14:10 sparkyx - - * : Permit several "rapprochement" in the financial ledger - -2007-10-15 13:25 sparkyx - - * : Add the quick / direct writing ability - -2007-10-15 08:46 sparkyx - - * : Add function belong_jrn - -2007-10-15 07:17 sparkyx - - * : Change Name for class_jrn (new: class_acc_ledger) and operation - (new:class_anc_operation) fix bug for direct writing - -2007-10-14 11:24 sparkyx - - * : Change name - -2007-10-14 11:21 sparkyx - - * : Fix bug for the details view - -2007-10-14 10:30 sparkyx - - * : Change name - -2007-10-14 10:21 sparkyx - - * : remove debug info - -2007-10-14 10:11 sparkyx - - * : remove debug info - -2007-10-14 10:05 sparkyx - - * : fix comment - -2007-10-13 16:11 sparkyx - - * : Fix beta-3 - -2007-10-13 16:10 sparkyx - - * : Improve CA - -2007-10-13 14:35 sparkyx - - * : Ajout debit / credit dans rapport - -2007-09-29 18:33 sparkyx - - * : Fix bug with gDossier - -2007-09-29 18:25 sparkyx - - * : Fix bug when importing bank - -2007-09-29 16:11 sparkyx - - * : remove debug info - -2007-09-29 13:15 sparkyx - - * : Fix double quote problem - -2007-09-29 13:02 sparkyx - - * : Fix cosmetic with Pre Op - Remove obsolete file - -2007-09-29 12:58 sparkyx - - * : CALC modify the explanation - -2007-09-28 18:24 sparkyx - - * : Fix Bug in printing centralized OP - -2007-09-27 21:53 sparkyx - - * : Improve the calc - -2007-09-25 19:33 sparkyx - - * : Fix bug OD - -2007-09-21 21:15 sparkyx - - * : Fix bug due to gDossier in advanced->ledger - -2007-09-21 20:47 sparkyx - - * : Fix bug setup - -2007-09-21 20:41 sparkyx - - * : Fix bug setup - -2007-09-21 19:18 sparkyx - - * : Upgrade script (incompt with 8.1) - -2007-09-21 18:49 sparkyx - - * : Last modif beta-3 - -2007-09-21 18:47 sparkyx - - * : Skip comment - -2007-09-21 18:11 sparkyx - - * : fix a maximum for the predefined operation : 20 / ledger - -2007-09-21 17:55 sparkyx - - * : Add check if a analytic plan is defined - -2007-09-21 17:50 sparkyx - - * : Remove useless tva - -2007-09-21 17:40 sparkyx - - * : Bug fixed Invalid comment - -2007-09-18 20:22 sparkyx - - * : fix cosmetic - -2007-09-18 19:56 sparkyx - - * : 3.0-beta - -2007-09-18 19:30 sparkyx - - * : 3.0-beta - -2007-09-18 19:29 sparkyx - - * : Predefined operation - -2007-09-18 19:28 sparkyx - - * : NEW Select a bilan - -2007-09-18 19:28 sparkyx - - * : fix bug - -2007-09-18 19:28 sparkyx - - * : Add security for CA - -2007-09-18 19:27 sparkyx - - * : Securite CA - -2007-09-18 19:27 sparkyx - - * : security CA - -2007-09-18 19:14 sparkyx - - * : Patch version 3.0-beta - -2007-09-18 19:13 sparkyx - - * : SQL patch - -2007-09-17 18:24 sparkyx - - * : add delete method - -2007-09-17 18:24 sparkyx - - * : predefined operation - -2007-09-17 17:12 sparkyx - - * : add predefined operations - -2007-09-17 15:30 sparkyx - - * : Fix bug with Bank - -2007-09-17 14:40 sparkyx - - * : Code cleaning - -2007-09-17 14:39 sparkyx - - * : CA - fix bug :still display when not used - -2007-09-16 16:26 sparkyx - - * : Impress bilan in rtf, html, text and ODT (not yet the - office-calc) - -2007-09-16 10:11 sparkyx - - * : Fix bug in the conditions - -2007-09-15 15:49 sparkyx - - * : Ajout Compta Analytique - Ajout bouton popup pour la date - Modif Recherche - -2007-09-11 18:56 sparkyx - - * : Add search screen for CA - -2007-09-10 13:22 sparkyx - - * : Documentation - -2007-09-10 13:22 sparkyx - - * : fix bug CA - -2007-09-10 13:22 sparkyx - - * : improve get_list function - -2007-09-10 13:21 sparkyx - - * : Compta Analy Simple Balance in pdf - -2007-09-10 13:20 sparkyx - - * : add shading - -2007-09-10 13:19 sparkyx - - * : Mother class for the printing class for CA - -2007-09-10 13:18 sparkyx - - * : Simple Balance CSV - -2007-09-10 13:18 sparkyx - - * : Listing - -2007-09-10 13:17 sparkyx - - * : Simple Balance - -2007-09-08 19:29 sparkyx - - * : Change for adding several for CA. - -2007-09-07 17:05 sparkyx - - * : bug 20998 Compte invalide dans la tva - -2007-09-06 18:12 sparkyx - - * : remove useless commit - -2007-09-04 19:16 sparkyx - - * : Add a test before inserting - -2007-09-04 19:16 sparkyx - - * : Fix label - -2007-09-04 17:10 sparkyx - - * : Replace $_SESSION dossier by $_REQUEST gDossier - -2007-09-04 17:10 sparkyx - - * : Fix value for own - -2007-09-04 17:08 sparkyx - - * : add ID for the hidden - -2007-09-04 17:08 sparkyx - - * : Improve CA - -2007-09-04 17:07 sparkyx - - * : documentation - code cleaning - -2007-09-04 17:06 sparkyx - - * : trace - -2007-09-02 11:43 sparkyx - - * : script for installing the basis - -2007-09-01 18:08 sparkyx - - * : icone pour compta analytique - -2007-09-01 18:08 sparkyx - - * : task #7264: Impression PDF et CSV total opération - -2007-09-01 18:04 sparkyx - - * : Add a new class : notice - -2007-09-01 17:57 sparkyx - - * : task 7263 Add the date for the report - -2007-09-01 15:21 sparkyx - - * : task 7263 Add the date for the report - -2007-09-01 10:48 sparkyx - - * : change icone compta analytique - -2007-08-22 21:39 sparkyx - - * : Fix bug - -2007-08-17 23:29 sparkyx - - * : Replace $_SESSION[g_dossier] by a variable gDossier, this - parameter is passed thanks the class dossier - -2007-08-17 13:59 sparkyx - - * : Centralize database struct in mod1 - -2007-08-17 13:57 sparkyx - - * : Add header to print - -2007-08-17 13:55 sparkyx - - * : Update script - -2007-08-17 13:50 sparkyx - - * : exit if the no Plan analytic are defined - -2007-08-17 13:49 sparkyx - - * : Add constraint to quant_sold and quant_purchase - -2007-08-17 13:34 sparkyx - - * : Database structure only in mod1 - -2007-08-15 22:14 sparkyx - - * : file rename - -2007-08-15 21:30 sparkyx - - * : add a button with javascript - -2007-08-15 21:29 sparkyx - - * : ajax for removing op - -2007-08-15 21:29 sparkyx - - * : ajax for CA (remove op) - -2007-08-15 21:28 sparkyx - - * : Add view detail to CA - -2007-08-15 21:28 sparkyx - - * : Add negatif for FIN ledger if credit - -2007-08-15 21:27 sparkyx - - * : Add header to pdf - -2007-08-15 21:26 sparkyx - - * : Show detail for CA - -2007-08-15 21:26 sparkyx - - * : Add ajax for delete - -2007-08-15 21:25 sparkyx - - * : Add delete and detail, correct some bugs - -2007-08-15 21:09 sparkyx - - * : Add header to pdf - -2007-08-15 21:07 sparkyx - - * : DateZone prob. with php5 - -2007-08-15 20:56 sparkyx - - * : fix undefined ledger - -2007-08-15 20:54 sparkyx - - * : Add header to pdf - -2007-08-15 14:10 sparkyx - - * : Add ajax for CA - -2007-08-15 13:52 sparkyx - - * : display balance by ledger / periode / post - -2007-08-15 13:51 sparkyx - - * : *** empty log message *** - -2007-08-15 12:55 sparkyx - - * : remove unused ledger - -2007-08-15 12:30 sparkyx - - * : Future version 3.0, added CA - -2007-07-18 19:51 sparkyx - - * : remove dossier1 - -2007-07-18 19:49 sparkyx - - * : Cleaning code - -2007-07-06 20:34 sparkyx - - * : Fix Bug : not quick code for G. Ledger - -2007-07-06 20:22 sparkyx - - * : Fix Bug : do not print Misc Ledger - -2007-06-21 18:37 sparkyx - - * : fix order of deb/credit - -2007-06-10 09:20 sparkyx - - * : add phpcompta_user variable - -2007-06-10 09:18 sparkyx - - * : Card new : a 2nd button for adding - -2007-06-10 09:18 sparkyx - - * : Add a phpcompta_user variable for the conn. string - -2007-05-31 23:47 sparkyx - - * : Fix CharacterSet - -2007-05-31 23:46 sparkyx - - * : Fix Search - -2007-05-31 22:22 sparkyx - - * : Upgrade 28 was wrong - -2007-05-31 22:20 sparkyx - - * : Fix problem with account - -2007-05-31 22:18 sparkyx - - * : Add span class error - -2007-05-31 21:57 sparkyx - - * : Remove comment on standard schema - -2007-05-31 21:52 sparkyx - - * : Fix problem with account in card - -2007-05-31 20:39 sparkyx - - * : defaut css for doxygen - -2007-05-31 20:16 sparkyx - - * : Fix bug with the ledger of purchase - -2007-05-29 19:56 sparkyx - - * : Add ajax function - -2007-05-29 19:56 sparkyx - - * : Fix bug with misc ledger - -2007-05-29 19:55 sparkyx - - * : debug info - -2007-05-29 19:47 sparkyx - - * : Set the color to red is the answer is not correct - -2007-05-29 19:45 sparkyx - - * : change the color of the label - -2007-05-29 19:44 sparkyx - - * : Get the value typed in the input - -2007-05-29 19:43 sparkyx - - * : Get the value typed in the form - -2007-05-29 18:22 sparkyx - - * : Add a check to verify that php supports pgsql - -2007-05-23 21:02 sparkyx - - * : Add total amount of operation - -2007-05-16 20:55 sparkyx - - * : Fix round problem - -2007-05-10 20:14 sparkyx - - * : Integration with 232 - -2007-05-10 20:03 sparkyx - - * : Integration with 232 - -2007-05-10 20:01 sparkyx - - * : useless - -2007-05-02 20:47 sparkyx - - * : Fix bug - -2007-05-02 20:36 sparkyx - - * : Intégration rel232 - -2007-04-26 11:44 sparkyx - - * : Fix bug search with a negative amount - -2007-04-22 10:47 sparkyx - - * : Clean - -2007-04-22 10:46 sparkyx - - * : clean files - -2007-04-21 21:28 sparkyx - - * : Avoid to test a empty j_poste - -2007-04-21 21:09 sparkyx - - * : Fixe database schema version 28 - -2007-04-21 18:50 sparkyx - - * : Do not return is isValid ==1 - -2007-04-21 18:49 sparkyx - - * : Correct Doc - -2007-04-21 18:49 sparkyx - - * : Fix some problems with url - -2007-04-19 21:58 sparkyx - - * : Add isValid Session Value - -2007-04-19 21:20 sparkyx - - * : javascript : document ready - -2007-04-19 21:11 sparkyx - - * : Javascript = document is ready - -2007-04-17 12:39 sparkyx - - * : Htaccess file - -2007-04-17 11:15 sparkyx - - * : Change open-short-tag - -2007-04-17 10:51 sparkyx - - * : Improve stock - -2007-04-17 10:51 sparkyx - - * : useless - -2007-04-15 20:56 sparkyx - - * : remove starting space - -2007-04-15 20:49 sparkyx - - * : remove the facture from filesystem and show a ref to see it - -2007-04-15 13:51 sparkyx - - * : Fix cosmetic - -2007-04-15 13:49 sparkyx - - * : Ajout de stock dans le module Gestion - -2007-04-15 13:49 sparkyx - - * : Remove commented code - -2007-04-15 13:48 sparkyx - - * : Rien - -2007-04-15 13:48 sparkyx - - * : Ajout de stock - -2007-04-15 13:47 sparkyx - - * : Stock pour le module gestion - -2007-04-15 13:47 sparkyx - - * : Ajout décimal stock - -2007-04-15 13:46 sparkyx - - * : Ajout documentation sur les stocks - -2007-04-15 13:24 sparkyx - - * : Update documentation - -2007-04-15 12:01 sparkyx - - * : change tva 64012 - -2007-04-15 12:00 sparkyx - - * : Change TVA 64012 - -2007-04-15 11:00 sparkyx - - * : remove debug info - -2007-04-15 10:47 sparkyx - - * : Add Dexia - -2007-04-15 10:46 sparkyx - - * : Add dexia - -2007-04-14 21:31 sparkyx - - * : Revision tag - -2007-04-14 21:21 sparkyx - - * : remove the cast to timestamp - -2007-04-14 21:07 sparkyx - - * : Correct the stock - -2007-04-14 20:07 sparkyx - - * : Change TVA by 6190 - -2007-04-14 20:01 sparkyx - - * : Add Dexia Bq - -2007-04-14 19:59 sparkyx - - * : Add Dexia to import CSV (Guy Moins) - -2007-04-14 19:59 sparkyx - - * : move imageS to image - -2007-04-14 19:59 sparkyx - - * : clean debug info - -2007-04-14 19:41 sparkyx - - * : Add Guy Moins contribution: import of Dexia Banque - -2007-04-13 00:31 sparkyx - - * : add a prefix for dropping - -2007-04-13 00:28 sparkyx - - * : Fix problem for creation of card, the account was null - -2007-04-13 00:27 sparkyx - - * : Fix problem with long account - -2007-04-13 00:27 sparkyx - - * : check isNumber - -2007-04-13 00:26 sparkyx - - * : fix isNumber - -2007-04-12 23:33 sparkyx - - * : Fix problem with plpgsql code - -2007-04-12 21:37 sparkyx - - * : fix bug multiple tva_rate 0% - -2007-04-12 21:32 sparkyx - - * : isNumber is fixed - -2007-04-12 21:26 sparkyx - - * : OpenSuse 10.2 error with $p_user - -2007-04-03 18:48 sparkyx - - * : Add transform.pl to repository - -2007-04-03 18:23 sparkyx - - * : Esthetic - -2007-04-03 18:05 sparkyx - - * : Make the include folder more secure - -2007-04-03 17:58 sparkyx - - * : Filter if qcode doesn't exist then list is empty - -2007-04-01 21:09 sparkyx - - * : Show an icone with the name of the file as title - -2007-04-01 21:08 sparkyx - - * : clean parameter o - -2007-04-01 21:08 sparkyx - - * : clean parameter s - -2007-04-01 21:08 sparkyx - - * : Sort - -2007-04-01 15:55 sparkyx - - * : Deprecated corrected - -2007-03-30 20:41 sparkyx - - * : deprecated call removed - -2007-03-30 20:19 sparkyx - - * : Deprecated passing by reference - -2007-03-30 19:11 sparkyx - - * : Create the tmpdir if it doesn't exist - -2007-03-29 19:56 sparkyx - - * : typo - -2007-03-29 19:51 sparkyx - - * : Suhosin fix - -2007-03-24 19:47 sparkyx - - * : Add warning - -2007-03-24 19:47 sparkyx - - * : Move and Add warning - -2007-03-24 19:43 sparkyx - - * : move - -2007-03-24 19:34 sparkyx - - * : Mise à jour documentation - -2007-03-24 19:13 sparkyx - - * : Typo - -2007-03-24 19:11 sparkyx - - * : Remove Database and template task #4783 - -2007-03-24 19:11 sparkyx - - * : remove debug info - -2007-03-24 19:01 sparkyx - - * : Remove Database and template task #4783 - -2007-03-24 16:49 sparkyx - - * : Code cleaning - -2007-03-24 16:48 sparkyx - - * : Fix problem for removing user - -2007-03-22 20:30 sparkyx - - * : remove silly files - -2007-03-22 20:29 sparkyx - - * : Generate also the developper doc - -2007-03-22 20:06 sparkyx - - * : test - -2007-03-22 20:03 sparkyx - - * : print child account - -2007-03-22 20:02 sparkyx - - * : Check if an account is used before removing it - -2007-03-22 20:01 sparkyx - - * : minor - -2007-03-22 20:01 sparkyx - - * : Print child account - -2007-03-22 20:00 sparkyx - - * : Print the child account - -2007-03-22 19:54 sparkyx - - * : new version - -2007-03-22 19:53 sparkyx - - * : Add the total per column - -2007-03-21 21:44 sparkyx - - * : Remove the form thx the noprint class - -2007-03-21 20:41 sparkyx - - * : Fix Bug with Konqueror IMG and INPUT TYPE=IMAGE - -2007-03-21 19:47 sparkyx - - * : Fix Bug with Konqueror IMG and INPUT TYPE=IMAGE - -2007-03-21 19:46 sparkyx - - * : Fix bug with Konqueror about IMG and INPUT TYPE=IMAGE - -2007-03-19 21:50 sparkyx - - * : Test isNumber - -2007-03-19 21:49 sparkyx - - * : Fix bug in isNumber - -2007-03-19 21:24 sparkyx - - * : show all the card - -2007-03-19 21:23 sparkyx - - * : task #6657, Ajout un tri - -2007-03-09 21:06 sparkyx - - * : Fix cosmetic in reporting - -2007-03-09 19:15 sparkyx - - * : Set version for next release - -2007-03-09 19:14 sparkyx - - * : Improve message - -2007-03-09 19:03 sparkyx - - * : Put the correct name if it is a card - -2007-03-09 18:50 sparkyx - - * : Fix: not allowed to delete an card used in a journal - -2007-03-09 18:34 sparkyx - - * : Bug : class base & js_search_poste - -2007-03-01 23:06 sparkyx - - * : Hide a button is useless - -2007-02-28 22:49 sparkyx - - * : improve doc - -2007-02-28 22:40 sparkyx - - * : Modify insert_account and set the default account from - fiche_def_ref - -2007-02-28 22:39 sparkyx - - * : remove card's attribute - -2007-02-28 22:38 sparkyx - - * : Give a default account - -2007-02-28 22:38 sparkyx - - * : Improve doc - -2007-02-28 22:37 sparkyx - - * : Permit the suppression of card's attribute - Give a default account if no one is given - -2007-02-28 22:36 sparkyx - - * : Avoid a bad creation of a folder - -2007-02-27 18:31 sparkyx - - * : Warning message - -2007-02-27 16:04 sparkyx - - * : Fautes d orthographe - -2007-02-27 16:03 sparkyx - - * : Fautes d orthographe - -2007-02-27 14:32 sparkyx - - * : Bouton en français - -2007-02-27 14:31 sparkyx - - * : Cosmetic - -2007-02-27 14:27 sparkyx - - * : Bouton en français - -2007-02-27 14:26 sparkyx - - * : typo - -2007-02-27 12:10 sparkyx - - * : Set version - -2007-02-27 12:03 sparkyx - - * : remove debug - -2007-02-27 12:02 sparkyx - - * : Bug in card creation bug 27Feb 2006 - -2007-02-22 20:24 sparkyx - - * : Bug cosmetic : recherche dans les fiches - -2007-02-03 01:01 sparkyx - - * : Correct bug when printing PDF - -2007-02-02 22:41 sparkyx - - * : Add missing files - -2007-02-02 22:24 sparkyx - - * : Update doc - -2007-01-29 16:20 sparkyx - - * : Add the possibility to clean the document, to set the year when - a folder is created - -2007-01-19 20:38 sparkyx - - * : Add search for the card and add the menu fich in the "gestion" - -2007-01-16 19:37 sparkyx - - * : cosmetic - -2007-01-06 21:14 sparkyx - - * : Add new tests - -2007-01-06 21:13 sparkyx - - * : Add the simple operation for ledger VEN and ACH - -2007-01-06 21:13 sparkyx - - * : Remove debug - -2007-01-06 21:13 sparkyx - - * : Bug about the list of available folders - -2007-01-06 21:10 sparkyx - - * : Bug : duplicate document - -2006-12-26 20:53 sparkyx - - * : get banque info from parm_code - -2006-12-26 20:53 sparkyx - - * : get banque info from parm_code - -2006-12-26 20:27 sparkyx - - * : Cleaning - -2006-12-26 20:25 sparkyx - - * : Cosmetics bug - -2006-12-26 20:23 sparkyx - - * : Add a better detailled printout for the ledger VEN and ACH - -2006-12-26 20:22 sparkyx - - * : For the search : permit the search with % - -2006-12-26 20:21 sparkyx - - * : Add function get_fiche_def_ref_id - -2006-12-26 20:20 sparkyx - - * : Add function IsTVA - -2006-12-26 20:19 sparkyx - - * : Correct Bug variable were forgotten - -2006-12-26 20:18 sparkyx - - * : Correct function headers for Doxygen - -2006-12-07 19:09 sparkyx - - * : Ajout manuel pdf depuis l application - -2006-12-07 18:36 sparkyx - - * : New icons - -2006-12-07 18:36 sparkyx - - * : Impress menu - -2006-11-29 21:23 sparkyx - - * : cosmetic - -2006-11-29 21:13 sparkyx - - * : cosmetic - -2006-11-29 20:56 sparkyx - - * : cosmetic - -2006-11-29 20:53 sparkyx - - * : Add previous next icon - -2006-11-29 20:42 sparkyx - - * : Replace some item menu by icon - -2006-11-29 19:10 sparkyx - - * : Move the javascript file to the js folder - -2006-11-25 16:59 sparkyx - - * : cosmetic - -2006-11-25 16:58 sparkyx - - * : add search in gestion - -2006-11-25 16:57 sparkyx - - * : Add Menu Search in Gestion - -2006-11-25 15:40 sparkyx - - * : Add menu Impress in Gestion - -2006-11-25 15:39 sparkyx - - * : add menu impress in gestion - -2006-11-25 15:38 sparkyx - - * : Add IMPRESS Menu in Gestion - -2006-10-20 15:09 sparkyx - - * : Bug invalid amount for Listing vat - -2006-10-19 09:25 sparkyx - - * : rel213 - -2006-10-19 09:05 sparkyx - - * : [bug #18056] DIfference quand on mélange montant négatif et - positifs - -2006-10-17 17:04 sparkyx - - * : bug #18017, Double dans la fenêtre détail - -2006-10-17 17:03 sparkyx - - * : bug #18043, la cause FROM - -2006-10-16 17:15 sparkyx - - * : Amount is absolute when searching in the ledger - -2006-10-16 10:48 sparkyx - - * : bug #18017, Double dans la fenêtre détail - -2006-10-16 10:18 sparkyx - - * : Database update - -2006-10-16 10:16 sparkyx - - * : rel212 - -2006-10-16 10:08 sparkyx - - * : Fix bug for rounded value and quantity is a decimal value - -2006-10-12 19:20 sparkyx - - * : Round all the amount to the 2nd decimal - -2006-10-08 17:16 sparkyx - - * : fiche qcode prob - -2006-10-08 16:53 sparkyx - - * : Problem with quickcode - -2006-10-08 16:44 sparkyx - - * : Update quickcode - -2006-10-08 16:19 sparkyx - - * : Misc prob. - -2006-10-07 16:42 sparkyx - - * : ChangelogChangelog - -2006-10-07 14:25 sparkyx - - * : Add message for vat - -2006-10-07 14:17 sparkyx - - * : remove debug - -2006-10-07 14:12 sparkyx - - * : Update database - -2006-10-07 14:11 sparkyx - - * : Fix problem in the suivi courrier - -2006-10-07 13:14 sparkyx - - * : Finish integration - -2006-10-07 10:18 sparkyx - - * : Merge with Dev-Dany - -2006-10-05 21:46 sparkyx - - * : Sometimes the $_ENV[TMP] is not defined - -2006-09-24 13:06 sparkyx - - * : task #5877 overview: Module comptabilité : journaux, voir - toutes les périodes - -2006-09-24 11:51 sparkyx - - * : Rel 207 - -2006-09-24 11:50 sparkyx - - * : Bug Last bug for the sql filter for periode - -2006-09-21 21:21 sparkyx - - * : Fix bug = missing include file - -2006-09-21 21:14 sparkyx - - * : Bug #17819 Clause From - -2006-09-21 19:45 sparkyx - - * : Fix problem when the operations are not balanced - -2006-09-18 18:57 sparkyx - - * : Bug #17780 : search screen - -2006-09-18 16:40 sparkyx - - * : OOo are in UTF8 - -2006-09-18 16:23 sparkyx - - * : bug #17778 Problème pour génération de facture - -2006-09-18 16:20 sparkyx - - * : Fix problem with windows backslash - -2006-09-18 14:17 sparkyx - - * : small Code cleaning - -2006-09-18 13:30 sparkyx - - * : For unity test - -2006-09-17 15:02 sparkyx - - * : Stan patches - export / import ecriture ouverture - -2006-09-17 14:56 sparkyx - - * : Stan patches + fix problem with one day period - -2006-09-13 19:10 sparkyx - - * : Cvs dev - -2006-09-13 19:10 sparkyx - - * : Merge rel206 - -2006-09-12 16:17 sparkyx - - * : add modification from rel206 - -2006-09-12 12:01 stanpinte - - * : added missing update statement. +2009-07-28 19:48 danydb + + * phpcompta/branches/rel500/doc/developper/Doxyfile, + phpcompta/branches/rel500/doc/document2.dia: + Doc + +2009-07-28 22:25 danydb + + * phpcompta/branches/rel500/dev/cleanup.sh, + phpcompta/branches/rel500/html/admin/setup.php, + phpcompta/branches/rel500/html/priv_user.php, + phpcompta/branches/rel500/include/class_database.php, + phpcompta/branches/rel500/include/class_dossier.php, + phpcompta/branches/rel500/include/class_user.php, + phpcompta/branches/rel500/include/dossier.inc.php, + phpcompta/branches/rel500/include/user.inc.php: + Fix numerous problem due to the new Object Database + +2009-07-29 19:43 danydb + + * phpcompta/branches/rel500/include/class_ibutton.php: + fix bug value -> label for ibutton + +2009-07-29 22:25 danydb + + * phpcompta/branches/rel500/include/argenta_be.inc.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_info.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_acc_reconciliation.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_database.php, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/dexia.inc.php, + phpcompta/branches/rel500/include/dexia_be.inc.php, + phpcompta/branches/rel500/include/impress_poste.inc.php, + phpcompta/branches/rel500/include/tva.inc.php: + Catch Exception is no period is open && complete the change to + class_database + +2009-07-29 23:08 danydb + + * phpcompta/branches/rel500/html/print_balance.php, + phpcompta/branches/rel500/html/quick_code_pdf.php, + phpcompta/branches/rel500/include/balance.inc.php, + phpcompta/branches/rel500/include/class_acc_balance.php, + phpcompta/branches/rel500/include/class_iperiod.php, + phpcompta/branches/rel500/include/header_print.php: + Improve class_iperiode (add 2 variables + doc) + fix bug in class_balance + add unicode in header_print + fix prob. due to new Database objet + +2009-08-08 10:34 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/doc/manuel-fr.odt, + phpcompta/branches/rel500/html/line_update.php, + phpcompta/branches/rel500/include/class_acc_account.php, + phpcompta/branches/rel500/include/class_acc_bilan.php, + phpcompta/branches/rel500/include/impress_inc.php: + Merged revisions 2488-2495 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk - update parm_periode set p_end = p_start where p_end is null; + ........ + r2488 | danydb | 2009-08-05 21:39:43 +0200 (Wed, 05 Aug 2009) | 1 + line + + Skipper : add account label in report + ........ + r2489 | danydb | 2009-08-05 22:33:29 +0200 (Wed, 05 Aug 2009) | 1 + line + + Add Libelle to Bilan + ........ + r2490 | danydb | 2009-08-05 23:25:23 +0200 (Wed, 05 Aug 2009) | 2 + lines + + Class_acc_bilan : protect XML + ........ + r2491 | danydb | 2009-08-05 23:29:58 +0200 (Wed, 05 Aug 2009) | 2 + lines + + class_acc_account : quote problem + ........ + r2492 | danydb | 2009-08-05 23:41:19 +0200 (Wed, 05 Aug 2009) | 1 + line + + Fix quote problem in line_update and fix header problem in + class_acc_bilan::generate_odt + ........ + r2493 | danydb | 2009-08-06 21:30:35 +0200 (Thu, 06 Aug 2009) | 1 + line + + Add documentation about new tag + ........ + r2494 | danydb | 2009-08-06 21:45:26 +0200 (Thu, 06 Aug 2009) | 1 + line + + Update Doc Bilan + ........ + r2495 | danydb | 2009-08-06 21:50:22 +0200 (Thu, 06 Aug 2009) | 1 + line + + remove debug flag + ........ + +2009-08-08 15:01 danydb + + * phpcompta/branches/rel500/include/class_database.php: + Database : get_value set the this->ret + +2009-08-10 19:47 danydb + + * phpcompta/branches/rel500/html/fiche_new.php, + phpcompta/branches/rel500/html/fiche_search.php, + phpcompta/branches/rel500/html/fid.php, + phpcompta/branches/rel500/html/js/ajax_fiche.js, + phpcompta/branches/rel500/html/js/search_card.js, + phpcompta/branches/rel500/include/class_acc_payment.php, + phpcompta/branches/rel500/include/class_icard.php: + FIX BUG payment method, fix problem when searching or adding + +2009-08-10 22:16 danydb + + * phpcompta/branches/rel500/html/annulation.php, + phpcompta/branches/rel500/html/bud_search_poste.php, + phpcompta/branches/rel500/html/fiche_new.php, + phpcompta/branches/rel500/html/fiche_search.php, + phpcompta/branches/rel500/html/jrn_search.php, + phpcompta/branches/rel500/html/line_update.php, + phpcompta/branches/rel500/html/modify_op.php, + phpcompta/branches/rel500/html/poste_search.php, + phpcompta/branches/rel500/html/search_ca.php, + phpcompta/branches/rel500/html/sec_pdf.php, + phpcompta/branches/rel500/html/show_document_modele.php, + phpcompta/branches/rel500/html/show_pj.php, + phpcompta/branches/rel500/html/show_tva.php, + phpcompta/branches/rel500/include/ac_common.php, + phpcompta/branches/rel500/include/central_inc.php, + phpcompta/branches/rel500/include/class_acc_account.php, + phpcompta/branches/rel500/include/class_acc_account_ledger.php, + phpcompta/branches/rel500/include/class_acc_bilan.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_info.php, + phpcompta/branches/rel500/include/class_acc_operation.php, + phpcompta/branches/rel500/include/class_acc_parm_code.php, + phpcompta/branches/rel500/include/class_acc_payment.php, + phpcompta/branches/rel500/include/class_acc_reconciliation.php, + phpcompta/branches/rel500/include/class_acc_report.php, + phpcompta/branches/rel500/include/class_acc_tva.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_anc_account.php, + phpcompta/branches/rel500/include/class_anc_balance_double.php, + phpcompta/branches/rel500/include/class_anc_balance_simple.php, + phpcompta/branches/rel500/include/class_anc_group.php, + phpcompta/branches/rel500/include/class_anc_operation.php, + phpcompta/branches/rel500/include/class_anc_plan.php, + phpcompta/branches/rel500/include/class_bud_card.php, + phpcompta/branches/rel500/include/class_bud_data.php, + phpcompta/branches/rel500/include/class_bud_detail.php, + phpcompta/branches/rel500/include/class_bud_detail_periode.php, + phpcompta/branches/rel500/include/class_bud_hypo.php, + phpcompta/branches/rel500/include/class_bud_synthese_acc.php, + phpcompta/branches/rel500/include/class_bud_synthese_anc.php, + phpcompta/branches/rel500/include/class_bud_synthese_hypo.php, + phpcompta/branches/rel500/include/class_customer.php, + phpcompta/branches/rel500/include/class_database.php, + phpcompta/branches/rel500/include/class_document.php, + phpcompta/branches/rel500/include/class_document_modele.php, + phpcompta/branches/rel500/include/class_document_type.php, + phpcompta/branches/rel500/include/class_dossier.php, + phpcompta/branches/rel500/include/class_fiche.php, + phpcompta/branches/rel500/include/class_fiche_def.php, + phpcompta/branches/rel500/include/class_fiche_def_ref.php, + phpcompta/branches/rel500/include/class_gestion_purchase.php, + phpcompta/branches/rel500/include/class_gestion_sold.php, + phpcompta/branches/rel500/include/class_own.php, + phpcompta/branches/rel500/include/class_periode.php, + phpcompta/branches/rel500/include/class_pre_op_ach.php, + phpcompta/branches/rel500/include/class_pre_op_advanced.php, + phpcompta/branches/rel500/include/class_pre_op_fin.php, + phpcompta/branches/rel500/include/class_pre_op_ods.php, + phpcompta/branches/rel500/include/class_pre_op_ven.php, + phpcompta/branches/rel500/include/class_pre_operation.php, + phpcompta/branches/rel500/include/class_supplier.php, + phpcompta/branches/rel500/include/class_todo_list.php, + phpcompta/branches/rel500/include/class_user.php, + phpcompta/branches/rel500/include/dossier.inc.php, + phpcompta/branches/rel500/include/fortis_be.inc.php, + phpcompta/branches/rel500/include/import_inc.php, + phpcompta/branches/rel500/include/impress_inc.php, + phpcompta/branches/rel500/include/ing_be.inc.php, + phpcompta/branches/rel500/include/jrn.php, + phpcompta/branches/rel500/include/modele.inc.php, + phpcompta/branches/rel500/include/param_jrn_detail.inc.php, + phpcompta/branches/rel500/include/param_pcmn.inc.php, + phpcompta/branches/rel500/include/param_sec.inc.php, + phpcompta/branches/rel500/include/pref.inc.php, + phpcompta/branches/rel500/include/stock.inc.php, + phpcompta/branches/rel500/include/stock_inc.php, + phpcompta/branches/rel500/include/template/param_jrn.php, + phpcompta/branches/rel500/include/tva.inc.php, + phpcompta/branches/rel500/include/user.inc.php, + phpcompta/branches/rel500/include/user_common.php, + phpcompta/branches/rel500/include/user_menu.php, + phpcompta/branches/rel500/include/verif_bilan.inc.php: + Improve database abstraction : remove all the pg_ function + +2009-08-19 22:06 danydb + + * phpcompta/branches/rel500/html/admin/setup.php: + Fix bug in setup.php caused by the new Database obj + +2009-08-27 20:10 danydb + + * phpcompta/branches/rel500/html/priv_user.php, + phpcompta/branches/rel500/include/class_database.php, + phpcompta/branches/rel500/include/class_user.php, + phpcompta/branches/rel500/include/user.inc.php: + Fix Bug : not possible to grant an access to a ledger for an user + (menu -> administration->utilisateur) + +2009-08-27 20:16 danydb + + * phpcompta/branches/rel500: + Block rev 2501 + +2009-08-27 20:19 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/include/class_document.php: + Merged revisions 2502 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2502 | danydb | 2009-08-27 21:33:36 +0200 (Thu, 27 Aug 2009) | 2 + lines + + When an invoice is generated, the TVA_LABEL is an empty string is + there is no merchandise + ........ + +2009-08-29 19:11 danydb + + * phpcompta/branches/rel500: + Block the rev 2508 + +2009-08-29 19:12 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/contrib/document_test/facture.html, + phpcompta/branches/rel500/include/class_document.php: + Merged revisions 2506-2507 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2506 | danydb | 2009-08-29 18:04:55 +0200 (Sat, 29 Aug 2009) | 1 + line + + Fix Bug when clicking on pj + ........ + r2507 | danydb | 2009-08-29 18:05:26 +0200 (Sat, 29 Aug 2009) | 1 + line + + Fix Bug for HTML + ........ + +2009-08-29 19:16 danydb + + * phpcompta/branches/rel500/include/class_database.php: + Fix bug : undefined p_oid in the functions lo_unlinks and + lo_export + +2009-08-29 19:27 danydb + + * phpcompta/branches/rel500/include/class_document_modele.php: + Fix Bug : rollback in class_document_modele + +2009-08-29 20:21 danydb + + * phpcompta/branches/rel500/html/modify_op.php, + phpcompta/branches/rel500/include/class_acc_ledger.php, + phpcompta/branches/rel500/include/class_acc_ledger_fin.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_database.php, + phpcompta/branches/rel500/include/class_document.php, + phpcompta/branches/rel500/include/compta_ven.inc.php, + phpcompta/branches/rel500/include/debug.php, + phpcompta/branches/rel500/include/user_common.php, + phpcompta/branches/rel500/sql/upgrade.sql: + Fix Bug : due to a error into echo_debug it was not possible to + create new sale or new purchase + +2009-09-02 19:05 danydb + + * phpcompta/branches/rel500/html/jrn_pdf.php, + phpcompta/branches/rel500/include/class_acc_ledger_purchase.php, + phpcompta/branches/rel500/include/class_acc_ledger_sold.php, + phpcompta/branches/rel500/include/class_acc_report.php, + phpcompta/branches/rel500/include/class_acc_report_row.php, + phpcompta/branches/rel500/include/class_acc_tva.php, + phpcompta/branches/rel500/include/class_anc_account.php, + phpcompta/branches/rel500/include/class_anc_plan.php, + phpcompta/branches/rel500/include/class_bud_data.php, + phpcompta/branches/rel500/include/class_database.php, + phpcompta/branches/rel500/include/jrn.php: + remove useless debug info + add a __toString method for the database + fix small bugs due to the object Database + +2009-09-05 16:57 danydb + + * phpcompta/branches/rel500/include/class_iaction.php: + Add a new Widget : IAction + +2009-09-10 21:45 danydb + + * phpcompta/branches/rel500/html/commercial.php: + Replace menu "Contact" by menu "Fiche" + +2009-09-11 19:19 danydb + + * phpcompta/branches/rel500/html/commercial.php: + Typo change fiche by Fiche + +2009-09-11 20:47 danydb + + * phpcompta/branches/rel500/include/class_fiche.php: + fix bug : not readonly for Display + +2009-09-11 20:48 danydb + + * phpcompta/branches/rel500/include/class_fiche_def.php: + Add new function for counting the number of category by fiche + type + fix bug with the button cherche + +2009-09-11 20:49 danydb + + * phpcompta/branches/rel500/include/template/fiche_def_input.php: + fix bug : the Cherche button does not work + +2009-09-12 14:12 danydb + + * phpcompta/branches/rel500/html/style-light.css, + phpcompta/branches/rel500/include/class_iaction.php: + Add a new HTML Widget IAction + +2009-09-12 16:02 danydb + + * phpcompta/branches/rel500/include/class_customer.php, + phpcompta/branches/rel500/include/client.inc.php, + phpcompta/branches/rel500/include/client_card.inc.php, + phpcompta/branches/rel500/include/detail_client.inc.php, + phpcompta/branches/rel500/include/suivi_client.inc.php, + phpcompta/branches/rel500/include/template/category_of_card.php: + Customer changes : + ================== + Add new layout + Add new customer card + Add new customer category + improve Customer::Summary + +2009-09-12 16:10 danydb + + * phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_document.php: + Change class action by class Action + +2009-09-13 20:46 danydb + + * phpcompta/branches/rel500/include/class_icard.php: + Set 2 times the same variable $l_sessid + correct indent + +2009-09-16 20:45 danydb + + * phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_document.php, + phpcompta/branches/rel500/include/template/detail-action.php: + Improve "Suivi Courrier" + ====================== + * the document::d_state containing the status is replaced by + action::ag_state + * It is now possible to add several documents to an action + * There is no longer one 'Expediteur' and one 'Destinataire', it + is replaced by one card + +2009-09-17 17:30 danydb + + * phpcompta/branches/rel500/include/class_database.php: + change get_array, returns an empty array if nothing is found + +2009-09-17 21:28 danydb + + * phpcompta/branches/rel500/html/fid.php, + phpcompta/branches/rel500/html/js/scripts.js, + phpcompta/branches/rel500/html/show_document.php, + phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_document.php, + phpcompta/branches/rel500/include/template/detail-action.php: + Improve "Suivi Courrier" + ======================== + + * Change f_id : now we can a SQL where clause, it fixed a bug + with suivi client + * Add several documents + * Remove Document thanks javascript (file scripts + + show_document.php) + * Remove all the documents of a deleted action + * Not longer a blank document when adding an action + * Improve Layout of "Suivi Courrier" + * remove Rich text widget which is replace by a textarea + * the state of an action is in action and not longer in document + * Remove Destinataire and Expediteur, replaced by only one + * Add / update / delete action is one step -2006-09-06 23:14 sparkyx +2009-09-17 21:29 danydb - * : merge with rel205 - -2006-09-02 20:45 sparkyx - - * : rel 205 - -2006-09-02 20:25 sparkyx - - * : cleaning - -2006-09-02 20:11 sparkyx - - * : [bug #17597] Changement quickcode client , fournisseur ou - banque - -2006-09-02 18:27 sparkyx - - * : bug 17582 quick code case insentive + quote - -2006-09-02 18:25 sparkyx - - * : Add maximum time in .htaccess - -2006-09-02 18:00 sparkyx - - * : bug 17582 quick code case insentive + quote - -2006-08-27 17:59 sparkyx - - * : Fix bug sequence - -2006-08-27 17:41 sparkyx - - * : Correction bug 17543, 17544, 17545 - -2006-08-27 16:00 sparkyx - - * : Bug 17544 double attribute - -2006-08-27 15:03 sparkyx - - * : bug #17545 : pk not synchronized with sequence - -2006-08-25 21:09 sparkyx - - * : Change Log - -2006-08-25 20:51 sparkyx - - * : Upgrade db to version 19 - -2006-08-25 20:50 sparkyx - - * : Change : one-day period - -2006-08-25 20:50 sparkyx - - * : remove debug info - -2006-08-25 20:49 sparkyx - - * : Useless double check - -2006-08-25 20:49 sparkyx - - * : New version 2.0.3 - -2006-08-25 20:48 sparkyx - - * : Round problem - -2006-08-24 20:28 sparkyx - - * : Correct : Sort the periode properly in using p_start and p_end - instead of p_id - -2006-08-12 18:43 sparkyx - - * : Bug when reload the page - -2006-08-12 18:16 sparkyx - - * : Fix bug in printing security - -2006-08-09 19:32 sparkyx - - * : Cosmetic - -2006-08-09 19:21 sparkyx - - * : Fix cosmetic - -2006-08-09 19:20 sparkyx - - * : Update doc - -2006-08-09 19:07 sparkyx - - * : Fix bug for windows (PHP_SELF instead of SCRIPT_NAME) - -2006-08-09 19:05 sparkyx - - * : Add a quickcode for contact - -2006-08-09 19:05 sparkyx - - * : Fix cosmetic - -2006-08-09 19:03 sparkyx - - * : Cosmetic - -2006-08-09 19:03 sparkyx - - * : Add a select to see the whole exercice - -2006-08-09 19:01 sparkyx - - * : New version - -2006-08-09 19:00 sparkyx - - * : Fix bug : when add a new card the listing was dubbel - -2006-08-09 18:59 sparkyx - - * : Update doc - -2006-08-08 21:24 sparkyx - - * : Correction orthographe Alexandre - -2006-08-08 20:51 sparkyx - - * : Fix bug in function card_class_base - -2006-08-08 17:16 sparkyx - - * : Bug Fix problem with PHP_SELF on windows - -2006-08-08 10:47 stanpinte - - * : Added .cvsignore - -2006-08-06 14:13 sparkyx - - * : Remove debug - -2006-08-06 13:49 sparkyx - - * : Patch - -2006-08-06 13:41 sparkyx - - * : Bug Stan SCRIPT_NAME --> PHP_SELF - -2006-08-06 13:26 sparkyx - - * : Fix bug due to quote - -2006-08-06 12:48 sparkyx - - * : Fix cosmetic - -2006-08-04 08:17 stanpinte - - * : Harmonized echo_error(...) calls - -2006-08-04 08:17 stanpinte - - * : Added optional params to echo_error - -2006-08-01 19:40 sparkyx - - * : Update doc - -2006-08-01 19:17 sparkyx - - * : Remove generated files - -2006-07-31 04:22 sparkyx - - * : update doc - -2006-07-31 04:14 sparkyx - - * : Cosmetic remove not working sort + modify table presentation - -2006-07-29 17:01 sparkyx - - * : update doc - -2006-07-29 16:33 sparkyx - - * : Update doc - -2006-07-29 16:31 sparkyx - - * : Cosmetic - -2006-07-29 15:41 sparkyx - - * : Fix : Forgotten file - -2006-07-29 15:39 sparkyx - - * : Fix problem with quote - -2006-07-26 06:48 sparkyx - - * : Documentation - -2006-07-22 23:16 sparkyx - - * : Task #5736 Impression des fiches par quick code - -2006-07-22 22:33 sparkyx - - * : Fix bug 15640 : compute properly the url after updating or - inserting - -2006-07-21 18:39 sparkyx - - * : Bug 15511 : check the amount of the operation before recording - Add a filter on the current exercice - -2006-07-21 08:01 sparkyx - - * : task 5026 Add more check for the account - -2006-07-21 07:25 sparkyx - - * : Cosmetic : version - -2006-07-21 07:24 sparkyx - - * : Import Bank : trash bad record - -2006-07-19 17:49 sparkyx - - * : create partial bar, fix bug - -2006-07-19 17:33 sparkyx - - * : Limit the nav. bar to max 20 - -2006-07-15 14:35 sparkyx - - * : Fix bug : impossible de corriger une opération non validée - -2006-07-14 22:13 sparkyx - - * : Permit to drop bad record from a bank import - -2006-07-14 22:13 sparkyx - - * : Permit to drop bad record from a bank import - -2006-07-14 21:29 sparkyx - - * : Fix bug : creation failed with 8.1.4 - -2006-07-12 21:24 sparkyx - - * : Documentation updated - -2006-07-12 21:11 sparkyx - - * : Add a filter of the current exercice for the saldo of customer - & supplier - -2006-07-12 18:32 sparkyx - - * : Improve import from argenta - -2006-07-12 18:21 sparkyx - - * : For the ledger, only one variable is needed for the default nb - of lines - -2006-07-12 18:21 sparkyx - - * : Add a remove possibility for the bank - -2006-07-11 21:49 sparkyx - - * : Transfert bank : add detail - -2006-07-11 21:44 sparkyx - - * : Ability to remove wrong record when transfering bank - -2006-07-11 21:10 sparkyx - - * : Ability to verify transfert before transfering - -2006-07-11 17:39 sparkyx - - * : Bug : fix some problems when the site is not the root directory - -2006-07-10 20:09 sparkyx - - * : Fix Bug about commit when the account is wrong - -2006-07-10 20:05 sparkyx - - * : Fix bug in search - -2006-07-09 21:43 sparkyx - - * : Update doc - -2006-07-09 17:04 sparkyx - - * : Fix SQL Bug - -2006-07-09 16:56 sparkyx - - * : Bug with the domain when dropping mod2 - -2006-07-09 16:49 sparkyx - - * : Fix SQL Bugs - -2006-07-07 21:04 sparkyx - - * : Cosmetic bug : historic should be filtered by default - -2006-07-07 20:45 sparkyx - - * : Change poste_comptable dans import_csv par le QuickCode et - UpdateCSV utiliser avec des $_POST - -2006-07-07 20:09 sparkyx - - * : Add argenta import - -2006-07-06 23:22 sparkyx - - * : CBC add comment to the fin op - -2006-07-06 23:15 sparkyx - - * : Add CBC Belgium - -2006-07-06 21:11 sparkyx - - * : Documentation - -2006-07-06 21:10 sparkyx - - * : Fix problem with the French accountancy - -2006-07-06 21:10 sparkyx - - * : Cosmetic bug - -2006-07-04 22:26 sparkyx - - * : doc - -2006-07-04 22:19 sparkyx - - * : Database change - -2006-07-04 22:13 sparkyx - - * : Database change - -2006-07-04 20:47 sparkyx - - * : Nav. bar for document - -2006-07-04 20:46 sparkyx - - * : Change database - -2006-07-03 20:49 sparkyx - - * : Add argenta into cvs - -2006-07-03 20:35 sparkyx - - * : Improve security - -2006-07-02 17:30 sparkyx - - * : Improve doc, fix problem with the sort - -2006-06-30 20:00 sparkyx - - * : task #5689 Improve calc - -2006-06-29 23:22 sparkyx - - * : Changelog - -2006-06-29 23:20 sparkyx - - * : Changelog - -2006-06-29 23:04 sparkyx - - * : Documentation code - -2006-06-29 22:42 sparkyx - - * : Add sort to the document - -2006-06-29 22:24 sparkyx - - * : Cosmetic - -2006-06-29 21:17 sparkyx - - * : Final modification db - -2006-06-29 21:14 sparkyx - - * : Appearance - -2006-06-29 21:09 sparkyx - - * : Add bank balance - -2006-06-29 20:53 sparkyx - - * : Sender & receiver in the Document module - -2006-06-29 20:51 sparkyx - - * : Fix bug when no record is found - -2006-06-29 20:49 sparkyx - - * : task 5689 Improve calc online : bug function clean - -2006-06-29 18:34 sparkyx - - * : task #5689 improve calc - -2006-06-29 16:45 sparkyx - - * : Task #5689 : improve calc online - -2006-06-28 22:15 sparkyx - - * : Add the concerned operation for the action and permit to add - action to an existing one - -2006-06-28 22:09 sparkyx - - * : documentation - -2006-06-28 00:13 sparkyx - - * : Enfin : the beta version is ready, only the documentation is - incomplete - -2006-06-26 23:59 sparkyx - - * : Fix bug in PARM_CODE - -2006-06-26 23:48 sparkyx - - * : Cosmetic - add Document interne, bug with suivi_courrier not - fixed!!! - -2006-06-26 18:23 sparkyx - - * : Cosmetic + Documentation - -2006-06-25 21:10 sparkyx - - * : Improve doc - -2006-06-25 21:07 sparkyx - - * : Improve doc - -2006-06-25 21:01 sparkyx - - * : Ajout - * vue filtrant : on ne propose les périodes que pour l'année en - cours - * Possibilité de chercher une fiche dans un popup - * Detail des tiers dans les suivi courrier - * Génération de document ODS (OpenOffice.org) sur base de modèle - que l'on - peut charger dans la base de données - -2006-06-25 01:30 sparkyx - - * : cosmetic - -2006-06-25 01:29 sparkyx - - * : Add Facture for testing - -2006-06-25 01:28 sparkyx - - * : Fix cosmetic bugs and add support for OOo - -2006-06-24 21:03 sparkyx - - * : Add missing - -2006-06-24 20:37 sparkyx - - * : fix upgrade13.sql - -2006-06-24 20:31 sparkyx - - * : Add missing files - -2006-06-24 19:52 sparkyx - - * : Removing old theme - -2006-06-24 19:48 sparkyx - - * : Fix bug in export/import + doc - -2006-06-24 18:47 sparkyx - - * : Improve module gestion : add bank; fix some bugs - -2006-06-24 00:02 sparkyx - - * : Add missing files - -2006-06-24 00:01 sparkyx - - * : Improve doc. add some missing files - -2006-06-23 23:56 sparkyx - - * : improve CSS - -2006-06-23 23:50 sparkyx - - * : Documentation - -2006-06-23 22:58 sparkyx - - * : Doc is done with Doxygen - -2006-06-23 22:56 sparkyx - - * : Improve theme - -2006-06-23 22:39 sparkyx - - * : Add a new theme - -2006-06-23 22:38 sparkyx - - * : Improve Aqua style - -2006-06-23 22:12 sparkyx - - * : Database upgrade - -2006-06-23 22:05 sparkyx - - * : keep the document when removing a pj if another op. uses it - -2006-06-23 21:51 sparkyx - - * : task #4897 overview: Extension Pièce justificative - -2006-06-23 21:34 sparkyx - - * : Task 3108 & Task 3840 - -2006-06-23 21:20 sparkyx - - * : Beta 2.0 Add Email in Action - -2006-06-23 21:13 sparkyx - - * : Beta 2.0 Add Administration - -2006-06-23 20:45 sparkyx - - * : Beta 2.0 Add the expense and supplier - -2006-06-23 19:20 sparkyx - - * : Beta 2 : fix bug, improve doc, fix conflict between table - document and the jrn row which contains also the document - -2006-06-22 22:33 sparkyx - - * : Documentation - -2006-06-22 22:26 sparkyx - - * : Beta version 2.0 - module de gestion intégré - -2006-06-22 22:12 sparkyx - - * : Big work : a new module is added and the document is really - improved - it is done with doxygen - -2006-06-22 17:54 sparkyx - - * : obsolete - -2006-05-31 19:49 sparkyx - - * : task #3108 Improve documentation - -2006-05-15 17:05 sparkyx - - * : Task #3108 : improve documentation - -2006-05-15 16:44 sparkyx - - * : Ce fichier contient uniquement le nécessaire pour mettre à jour - la base de données uniquement pour les développeurs. - Avant une release, ce script sera inclus dans admin/sql/patch, - sous le - nom upgradeXX.sql - -2006-05-09 21:11 sparkyx - - * : Task #5410 : Commercial - -2006-05-06 17:33 sparkyx - - * : Fix bug in adding a account - -2006-05-04 19:12 sparkyx - - * : task #5523 : move periode management to Advanced menu - -2006-05-04 19:11 sparkyx - - * : Fix bug : double drop of a view - -2006-05-03 20:30 sparkyx - - * : fix problem with rounded amount when deducing 2 special vat - Improve debug - -2006-05-02 19:36 sparkyx - - * : Task 5023 : probleme avec TVA recup. par impot et non ded - utilisé en - même temps - -2006-05-02 18:43 stanpinte - - * : Fixed missing $ at end of stored procedure delcaration - -2006-05-02 18:20 sparkyx - - * : task 5406 : - Good order for parm_code - -2006-05-01 18:23 sparkyx - - * : Task 5406 Add missing files - -2006-05-01 18:21 sparkyx - - * : About upgrade10; the function check_balance MUST BE dropped - before being - recreated because the parameters change - Upgrade 11 : Update the database to a new version - -2006-05-01 18:11 sparkyx - - * : *** empty log message *** - -2006-05-01 18:05 sparkyx - - * : small bug - -2006-05-01 18:04 sparkyx - - * : Get SQL utility for developpper - -2006-05-01 17:47 sparkyx - - * : Task 5406 : add parameters setting - -2006-04-30 12:46 stanpinte - - * : Removed problematic DROP statement. - -2006-04-29 14:04 sparkyx - - * : Task 5406 : Parameter used in different places --> to be more - tested - -2006-04-29 13:25 sparkyx - - * : Add data - -2006-04-29 13:23 sparkyx - - * : task 5406 : parameter menu is now completed with the - possibility to - change the fiche definition - -2006-04-29 10:19 sparkyx - - * : task 5406 : improve presentation - -2006-04-28 22:27 sparkyx - - * : task 5406 : add setting - -2006-04-28 22:24 sparkyx - - * : task 5306 : parameter tva - -2006-04-28 22:24 sparkyx - - * : progress task - 5410 -> fonction CRM - 5306 -> Improve parameter setting - -2006-04-28 22:19 sparkyx - - * : fix a problem in the function dump - -2006-04-23 20:06 sparkyx - - * : Task 5023: note de credit - -2006-04-23 19:43 sparkyx - - * : task 5023 : bug dans le calcul des dna, tva non ded quand il y - avait les 2 - dans une fiche - -2006-04-20 16:50 sparkyx - - * : minor bugs - -2006-04-20 16:50 sparkyx - - * : Fix problem with create function add patch 9 and 10 - -2006-04-20 16:47 sparkyx - - * : Add operations for Miscellaneous and financial ledger - -2006-04-18 10:40 sparkyx - - * : Cosmetic replace 'annuler' by 'Fermer' - -2006-04-16 17:18 stanpinte - - * : Added some fixes - -2006-04-15 01:27 sparkyx - - * : task 5410 Suivi client - -2006-04-15 01:25 sparkyx - - * : task #5406 Paramètre - -2006-04-15 01:24 sparkyx - - * : task #5405 Quick Code - -2006-04-15 01:14 sparkyx - - * : task #4898, Import CSV opération banquaire - -2006-04-15 01:13 sparkyx - - * : task #5409 debug info - task #5406 Paramètre - task #5405 Quick Code - -2006-04-15 01:12 sparkyx - - * : task #5409 debug info - task #5405 Quick Code - -2006-04-15 01:12 sparkyx - - * : task #5409 debug info - -2006-04-15 01:12 sparkyx - - * : cosmetic - -2006-04-15 01:11 sparkyx - - * : task #5406 Paramètre - -2006-04-15 01:08 sparkyx - - * : task #5409 debug info - task #5406 Paramètre - -2006-04-15 01:04 sparkyx - - * : task #5409 debug info - task #5405 Quick Code - -2006-04-12 22:04 sparkyx - - * : cosmetic : add a space - -2006-04-12 22:04 sparkyx - - * : Add menu - -2006-04-12 21:43 sparkyx - - * : Cosmetic : indent correctly - -2006-04-12 21:36 sparkyx - - * : Task #5023: fix bug in the alert message - -2006-04-09 19:07 sparkyx - - * : Bug nav. bar - -2006-04-08 14:01 stanpinte - - * : Replaced POST by GET method for all action=voir_jrn calls -> As - this is read-only, it has no reason to be a POST. - -2006-04-02 21:02 sparkyx - - * : task #4898, Import CSV opération banquaire - task #5023 overview: Automatisation de certaines dépenses non - admises - -2006-04-02 21:00 sparkyx - - * : task #3840, Code cleaning - -2006-04-02 21:00 sparkyx - - * : task #4898, Import CSV opération banquaire - -2006-04-02 20:59 sparkyx - - * : task #5023 overview: Automatisation de certaines dépenses non - admises - -2006-04-02 16:23 sparkyx - - * : task 5025 : verify account - task #5026, Ajout form_verify_input - -2006-04-02 15:31 sparkyx - - * : task 5025 : verify account - -2006-04-02 15:10 stanpinte - - * : Ajouté une base d'implémentation du taux de déductibilité - -2006-03-29 19:20 sparkyx - - * : task #4898, Import CSV opération banquaire - working on CBC files - -2006-03-29 19:17 sparkyx - - * : task #4898, Import CSV opération banquaire - The open file is now in the include as well the loop for - flexibility reasons - -2006-03-29 18:49 sparkyx - - * : task #4898, add file headers - -2006-03-29 18:47 sparkyx - - * : Fix little bugs - -2006-03-29 18:33 sparkyx - - * : Script for checking csv files -> utility - -2006-03-27 21:38 sparkyx - - * : task #4898, Import CSV opération banquaire - Add FORTIS Banque - Add trigger to remove disturbing double quote - -2006-03-27 19:26 sparkyx - - * : task #4898, Import CSV opération banquaire -> ING est correcte - -2006-03-24 21:58 sparkyx - - * : task #4898, Import CSV opération banquaire - -2006-03-24 21:47 sparkyx - - * : Cosmetic bug - -2006-03-24 21:47 sparkyx - - * : Task #4898 Import CSV opération banquaire - -2006-03-24 21:35 sparkyx - - * : task #4898 Import CSV opération banquaire - -2006-03-22 20:15 stanpinte - - * : Corrigé le listing annuel TVA, pour ne plus être par exercice, - mais par année. - -2006-03-18 14:30 stanpinte - - * : Added code reading comments - -2006-03-18 14:28 stanpinte - - * : Added - -2006-03-18 10:53 stanpinte - - * : Added - -2006-03-18 00:56 sparkyx - - * : correct value for php - -2006-03-09 19:57 sparkyx - - * : task #5306 security for import / export - -2006-03-09 19:14 sparkyx - - * : fix bug if import file is invalid - -2006-03-08 21:57 sparkyx - - * : remove phpinfo - -2006-03-08 21:56 sparkyx - - * : task #5304 Ecriture d'ouverture - -2006-03-08 21:49 sparkyx - - * : bug #15443 nombre mal parsé - -2006-03-07 23:17 sparkyx - - * : Task 5302 : automatisation ecriture ouverture - -2006-03-07 23:00 sparkyx - - * : Task 5304 : automatisation des écritures d'ouverture - -2006-02-07 12:31 sparkyx - - * : Bug #15640 : IE download - -2006-01-24 13:03 sparkyx - - * : Bug #15521 - Confirm doesn't work when nullify an operation - -2006-01-23 13:45 stanpinte - - * : Added smarty support - -2006-01-21 22:38 stanpinte - - * : Bound Ctrl-Enter to Enregister button - -2006-01-21 22:37 stanpinte - - * : Added Ctrl-Enter scripts. To bind, just set ID='SubmitButton' - on an input button - -2006-01-21 21:42 stanpinte - - * : Now opens by default the first journal in category (had to - write dirty code for p_jrn='NONE' - -2006-01-21 21:40 stanpinte - - * : Added GetFirstJrnIdForJrnType(,) function - -2006-01-21 21:39 stanpinte - - * : Fixed PHPSESSID error - -2006-01-21 20:47 stanpinte - - * : Re-ordered tab indexes in form - -2006-01-21 20:47 stanpinte - - * : Partially added tabindex property to widget class, so that we - can specify the tab orders in forms. - -2006-01-21 20:03 stanpinte - - * : Fixed bug 15491: Nom de période - -2006-01-21 17:12 stanpinte - - * : Fixed typo: Dédit is Débit - -2006-01-15 21:03 stanpinte - - * : Fixed parse error. (someone had forgotten a ;) - -2005-12-16 22:50 sparkyx - - * : fix undefined variable $bar - -2005-12-14 22:01 sparkyx - - * : improve simulation - -2005-11-12 17:12 sparkyx - - * : version dans index.php - -2005-11-12 16:17 sparkyx - - * : Bug 14961 - -2005-11-04 21:02 sparkyx - - * : change the default title - -2005-11-04 20:52 sparkyx - - * : bug #14916 REMISE - -2005-11-04 20:51 sparkyx - - * : Update doc a propos patch - -2005-11-04 20:50 sparkyx - - * : Doc a propos patch - -2005-11-03 20:20 sparkyx - - * : update doc - -2005-11-03 20:18 sparkyx - - * : Update doc - -2005-11-03 18:22 sparkyx - - * : Code cleaning : form_input has been removed, inputtype is - replaced by the object widget - -2005-11-03 15:02 sparkyx - - * : Bug periode - -2005-11-03 10:45 sparkyx - - * : Bug when create new databases - -2005-11-03 10:38 sparkyx - - * : Update doc - -2005-10-31 18:22 sparkyx - - * : Add modele fr - -2005-10-31 14:41 sparkyx - - * : changelog - -2005-10-31 14:40 sparkyx - - * : update doc - -2005-10-31 14:32 sparkyx - - * : Ajout d'une release note - -2005-10-31 13:46 sparkyx - - * : Bug when upgrading PhpCompta to 1.2.2 - -2005-10-30 21:19 sparkyx - - * : Update doc - -2005-10-30 21:17 sparkyx - - * : Cosmetics bugs - -2005-10-30 21:17 sparkyx - - * : File form_input is now obsolete, remove that include - -2005-10-30 21:16 sparkyx - - * : Adapt French Accountancy - -2005-10-30 21:16 sparkyx - - * : Update doc - -2005-10-30 21:15 sparkyx - - * : adapt script to domaine - -2005-10-30 19:42 sparkyx - - * : Ajout comptabilité française - -2005-10-30 17:41 sparkyx - - * : Last check prerelease 1.2.2 - -2005-10-28 12:53 sparkyx - - * : Task #3840 Code Cleaning - -2005-10-27 15:17 sparkyx - - * : Changelog - -2005-10-27 14:04 sparkyx - - * : task #3840 Code Cleaning - -2005-10-27 14:04 sparkyx - - * : Task #3840 : Code Cleaning - -2005-10-27 13:37 sparkyx - - * : Task #3840 Code Cleaning - -2005-10-27 13:36 sparkyx - - * : Task #4857 : add a pagesize - -2005-10-27 13:09 sparkyx - - * : Task #3840 Code Cleaning - -2005-10-27 12:27 sparkyx - - * : Task #3840 Code Cleaning - -2005-10-26 14:59 sparkyx - - * : Task #4857 : For the big databases a nav. bar is now - implemented - -2005-10-26 13:21 sparkyx - - * : changelog - -2005-10-26 13:18 sparkyx - - * : Task #4857 : For the big databases a nav. bar is now - implemented - -2005-10-25 13:21 sparkyx - - * : Task #4857 : add a pagesize - -2005-10-25 12:10 sparkyx - - * : Code cleaning : preference are now in a separate table - -2005-10-25 09:58 sparkyx - - * : remove column ac_users.use_usertype from account_repository - -2005-10-25 09:58 sparkyx - - * : remove column ac_users.use_usertype from account_repository - -2005-10-25 09:33 sparkyx - - * : Improve cosmetic - -2005-10-23 18:58 sparkyx - - * : Upgrade if something goes wrong - -2005-10-23 18:58 sparkyx - - * : Use of the object user - -2005-10-23 18:57 sparkyx - - * : Code cleaning - -2005-10-23 18:56 sparkyx - - * : code cleaning - -2005-10-23 18:54 sparkyx - - * : Add the type SPAN - -2005-10-23 18:53 sparkyx - - * : The default user preference are now in a separate table - -2005-10-23 18:53 sparkyx - - * : add a trigger to the database to validate the rounded value - -2005-10-22 10:59 sparkyx - - * : Check_balance is done by a trigger - -2005-10-20 13:23 sparkyx - - * : Use copy from stdin instead of insert command, improve much the - speed - -2005-10-20 12:02 sparkyx - - * : Add file header - -2005-10-20 10:23 sparkyx - - * : Add test for the performance and tuning - -2005-10-18 12:43 sparkyx - - * : add a needed check on the col j_tech_per and jr_tech_per - -2005-10-16 19:54 sparkyx - - * : fix bug: the j_tech_per was not updated, then the saldo was - wrong - -2005-10-16 16:12 sparkyx - - * : Fix problem in financial ledger - -2005-10-10 09:13 sparkyx - - * : Fix : permit to see the detail of an operation if - the user has access to at least one legder - -2005-10-10 09:11 sparkyx - - * : Fix : Show detail of an operation if the user has access to at - least - one ledger (case of ledger == 0 ) - -2005-10-10 08:10 sparkyx - - * : Fix problem when changing passord due to register_global off - -2005-10-05 14:34 sparkyx - - * : Fix bug for user creation - password - -2005-10-05 14:09 sparkyx - - * : Task #3108 : Domaine fix prob with modele - -2005-10-04 15:51 stanpinte - - * : Corrige une ou deux fautes - -2005-10-04 14:54 sparkyx - - * : Correct my email - -2005-10-03 18:56 sparkyx - - * : Add a confirmation dialog box before canceling a writing - -2005-10-03 18:54 sparkyx - - * : Fix problem with sequence j_grpt - -2005-09-28 15:07 sparkyx - - * : Fix : the jr_id computed was wrong - Fix : setup.php didn't update mod - -2005-09-28 13:27 sparkyx - - * : Index ? - -2005-09-28 10:36 sparkyx - - * : changelog - -2005-09-28 10:36 sparkyx - - * : Improve : when nullify an operation thanks a reversed operation - both operations are now bound thanks the "concerned operation" - mechanisme ("rapprochement") - -2005-09-28 10:17 sparkyx - - * : Add the ledget to the array : needed for computing internal - code - in annulation.php - -2005-09-28 10:16 sparkyx - - * : Fix Problem with Internal code - Improve : op are not marked invalid - -2005-09-28 10:09 sparkyx - - * : We now use sequence instead of computing the max for the column - jr_grpt_id so we have to update the sequence with the greatest + * phpcompta/branches/rel500/include/class_html_input.php: + Improve the button_href, which looks now as IAction + doc + +2009-09-17 21:58 danydb + + * phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/template/detail-action.php: + Add a concerned link in Action::Display + +2009-09-17 22:13 danydb + + * phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/template/detail-action.php: + Place the return button inside the fieldset + +2009-09-18 13:08 danydb + + * phpcompta/branches/rel500/include/class_database.php: + Database::get_value print a warning if returns more than one value -2005-09-27 16:43 sparkyx +2009-09-18 18:27 danydb - * : Annulation - extourne + * phpcompta/branches/rel500/include/class_periode.php: + datatabase::get_value returns a warning if several values are + returns, + it gives a bug for the function limit_year -2005-09-27 16:14 sparkyx +2009-09-18 19:53 danydb - * : Improve nullify operation : if the period is closed, nullify in - writing the reversed operation otherwise set amount to 0 + * phpcompta/branches/rel500/html/fiche_search.php: + Bug in fiche_search when using the type [SQL] in the filter for + the card -2005-09-27 12:39 sparkyx +2009-09-18 19:59 danydb - * : The nullify process ("annulation" ) of an operation is improved - if the operation belongs to a closed period then the reversed - operation is - written, to nullify the amount - if the period is not closed then the amount is set to zero + * phpcompta/branches/rel500/include/class_database.php: + Inn exec_sql the array is printed if the pg_query fails -2005-09-27 12:25 sparkyx +2009-09-18 21:30 danydb - * : Improve : round the amount to 2 decimal + * phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_document.php, + phpcompta/branches/rel500/include/class_document_modele.php, + phpcompta/branches/rel500/include/template/detail-action.php: + Suivi courrier : generate the document and add a draft for the + items to sell / order / deliver -2005-09-25 16:20 sparkyx +2009-09-18 21:38 danydb - * : Patch 7 progress + * phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/class_action.php: + suivi_courrier change f_id_exp by f_id_dest -2005-09-25 15:16 sparkyx +2009-09-18 21:49 danydb - * : Add transaction to improve performance - -2005-09-25 15:15 sparkyx - - * : Add transaction to improve perf - -2005-09-25 15:14 sparkyx - - * : upgrade - -2005-09-25 15:13 sparkyx - - * : Task #4622 Domaine - -2005-09-25 14:33 sparkyx - - * : Obsolet variable.php - -2005-09-25 14:31 sparkyx - - * : Obsolete - -2005-09-21 13:30 sparkyx - - * : code cleaning - -2005-09-08 14:44 sparkyx - - * : Task #3108 : Ajout des domaines - -2005-09-08 11:57 sparkyx - - * : Task #3108 Ajout des domaines - -2005-09-08 11:57 sparkyx - - * : Task #4622 : Add domain, for the templates and new databases - -2005-09-08 10:33 sparkyx - - * : Task #3108 : Ajout des domaines - -2005-09-07 16:46 sparkyx - - * : Bug #14460 Sql Error - -2005-09-07 16:42 sparkyx - - * : task #4622 Domaine - -2005-09-07 14:56 sparkyx - - * : task #4622 domaine - -2005-09-07 14:37 sparkyx - - * : todo list : cleaning code - -2005-09-07 14:07 sparkyx - - * : Increase size of h2 in print mode - -2005-09-07 14:04 sparkyx - - * : Change the version on the index page - -2005-09-04 16:08 sparkyx - - * : In some situations, the rounded amount in jrn was wrong - -2005-09-03 07:19 sparkyx - - * : Add a operation without tva - -2005-09-03 07:18 sparkyx - - * : Cosmetics : Highlight the current menu item - -2005-09-03 06:23 sparkyx - - * : Add a stylesheet for printing - -2005-08-27 21:03 sparkyx - - * : Problem if a period has been deleted - -2005-08-27 20:54 sparkyx - - * : Problem when importing csv into OOo - -2005-08-27 20:42 sparkyx - - * : Fix some cosmetics bug - -2005-08-27 19:28 sparkyx - - * : Fix bug in computing sum for card - -2005-08-27 19:28 sparkyx - - * : Correct Formula - -2005-08-22 21:30 stanpinte - - * : fixed typo in var name. - -2005-08-21 16:53 stanpinte - - * : Renamed all in - -2005-08-21 16:49 stanpinte - - * : Renamed all in - -2005-08-14 21:42 sparkyx - - * : version - -2005-08-14 21:09 sparkyx - - * : Changelog - -2005-08-14 19:02 sparkyx - - * : to avoid that label is too great - -2005-08-14 17:04 sparkyx - - * : debug info - -2005-08-14 17:03 sparkyx - - * : Documentation - -2005-08-14 17:01 sparkyx - - * : Add doc about tax - -2005-08-14 17:01 sparkyx - - * : prob. ubuntu - -2005-08-14 17:00 sparkyx - - * : poste_csv.php - -2005-08-14 16:40 sparkyx - - * : bug Journal ODS - -2005-08-13 12:32 sparkyx - - * : Fix : invalid html header - -2005-08-09 17:00 sparkyx - - * : fix style - -2005-08-09 16:05 sparkyx - - * : update sql script - -2005-08-09 16:05 sparkyx - - * : Prob Ubuntu & utf8 - -2005-08-09 16:05 sparkyx - - * : bug Journal ODS - -2005-08-09 15:30 sparkyx - - * : Prob Ubuntu & utf8 - -2005-08-09 15:30 sparkyx - - * : bug Journal ODS - -2005-08-09 14:38 sparkyx - - * : bug : not possible to add an account - -2005-07-31 10:40 stanpinte - - * : Added check to parm_periode table: p_end >= p_start - -2005-07-31 10:38 stanpinte - - * : Replaced POST->GET for query forms. - -2005-07-31 10:37 stanpinte - - * : Fixed periods ordering for Periods dialog. - -2005-07-30 17:46 stanpinte - - * : Added comments. - -2005-07-27 18:03 sparkyx - - * : bug #4332 bug in the name - -2005-07-27 16:37 sparkyx - - * : Changelog - -2005-07-27 16:36 sparkyx - - * : Fix bug in CheckAction - -2005-07-27 16:32 sparkyx - - * : Repository : sparkyx@subversions.gnu.org:/cvsroot/phpcompta - Module : phpcompta/include - Working dir: /data/www/phpcompta/test/include/ + * phpcompta/branches/rel500/sql/upgrade.sql: + table action_gestion + --------------------- + * remove col. f_id_exp + * add col. ag_state + * add a trigger to cut the col. ag_title to 70 char + Function account_parent + ----------------------- + fix bug : exit loop when a account parent is found + table invoice drop because useless + table parm_code add code SUPPLIER + drop useless function insert_quant_purchase, insert_quant_sold + add index for jrn(jr_mt) (double encoding detection) + +2009-09-19 16:19 danydb + + * phpcompta/branches/rel500/include/template/detail-action.php: + Improve layout of form for adding/modifying an action + +2009-09-19 22:11 danydb + + * phpcompta/branches/rel500/html/js/scripts.js, + phpcompta/branches/rel500/html/style-light.css, + phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/template/detail-action.php, + phpcompta/branches/rel500/sql/upgrade.sql: + Suivi client + ======= + Add the owner to the table ag_action + Add the hours (format HH:MM) and a javascript to check the format + Add the affected to + Add a flag if the action have to be seen in the calendar + filter the list thanks the cloture or note + change ag_state to 'to be done, done, to follow, cancel' + Highlight the High priority in the list + +2009-09-19 22:11 danydb + + * phpcompta/branches/rel500/doc/developper/Doxyfile: + Improve appereance of generated documentation + +2009-09-19 22:12 danydb + + * phpcompta/branches/rel500/include/class_fiche.php: + function get_by_qcode If it is not possible to find the + quick_code of card then his id is 0 + +2009-09-19 22:26 danydb + + * phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/class_action.php: + Fix bug in search card and change cosmetic in Action::Display for + ag_ref_ag_ref_id + +2009-09-19 22:52 danydb + + * phpcompta/branches/rel500/html/commercial.php, + phpcompta/branches/rel500/include/action.inc.php: + Suivi courrier : show only my action + +2009-09-20 19:05 danydb + + * phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/template/detail-action.php, + phpcompta/branches/rel500/sql/upgrade.sql: + Suivi courrier : Add the contact in the action form (ag_action) + +2009-09-26 19:12 danydb + + * phpcompta/branches/rel500/include/template/form_ledger_ven.php: + FIX : remove a small cosmetic bugs + +2009-09-26 19:15 danydb + + * phpcompta/branches/rel500/include/class_icard.php, + phpcompta/branches/rel500/include/class_icardctrl.php: + DOC : add documentation + +2009-09-26 19:16 danydb + + * phpcompta/branches/rel500/html/js/ajax_fiche.js, + phpcompta/branches/rel500/html/js/search_card.js: + IMPROVE : when a card is found the label is updated, there is a + test (tagName) to determine + if we have to use innerHTML or value + +2009-09-26 19:17 danydb + + * phpcompta/branches/rel500/doc/developper/Doxyfile: + Remove XML output in Doxygen + +2009-10-02 23:28 danydb + + * phpcompta/branches/rel500/html/js/infobulle.js: + Infobulle : add example + +2009-10-02 23:31 danydb + + * phpcompta/branches/rel500/include/class_fiche.php: + Class fiche : rewrite code for get_by_qcode + +2009-10-02 23:33 danydb + + * phpcompta/branches/rel500/html/style-light.css: + Style sheet add span action + +2009-10-02 23:35 danydb + + * phpcompta/branches/rel500/include/class_document.php: + Class document : remove waiting message when generating a + document + +2009-10-02 23:35 danydb + + * phpcompta/branches/rel500/doc/document.dia: + update document schema + +2009-10-02 23:36 danydb + + * phpcompta/branches/rel500/include/action.inc.php, + phpcompta/branches/rel500/include/class_action.php, + phpcompta/branches/rel500/include/class_action_detail.php, + phpcompta/branches/rel500/include/class_html_input.php, + phpcompta/branches/rel500/include/template/detail-action.php, + phpcompta/branches/rel500/sql/upgrade.sql: + Suivi + ===== + Finished the new layout of follow up + +2009-10-02 23:37 danydb + + * phpcompta/branches/rel500/include/suivi_client.inc.php: + Suivi client add List action + +2009-10-02 23:46 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/html/bilan.php, + phpcompta/branches/rel500/include/class_acc_bilan.php: + Merged revisions 2515 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + ........ + r2515 | danydb | 2009-09-04 21:44:42 +0200 (Fri, 04 Sep 2009) | 1 + line - In directory .: - Modified class_user.php - Modified impress_bilan.php - Modified impress_listing_client.php - Modified impress_rapport.php + For the bilan, fix partially a bug in the html headers for OOo + document and allowed the use of the numeric format in ods + document (from Bertrand) + ........ + +2009-10-02 23:52 danydb + + * phpcompta/branches/rel500, + phpcompta/branches/rel500/html/js/todo_list.js, + phpcompta/branches/rel500/include/ac_common.php, + phpcompta/branches/rel500/include/class_acc_account_ledger.php, + phpcompta/branches/rel500/include/class_todo_list.php: + Merged revisions 2526,2528,2541,2543,2558-2559 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk - --------------------- End --------------------- - -- last cmd: cvs -f -n update -d -P -- + ........ + r2526 | danydb | 2009-09-14 23:21:41 +0200 (Mon, 14 Sep 2009) | 1 + line + + Fix Bug with the todo list, in the "Accueil" if there several + line in a todo list, you cannot modify it + ........ + r2528 | danydb | 2009-09-17 16:44:14 +0200 (Thu, 17 Sep 2009) | 4 + lines + + Changement to let the user to enter manually the vat amount in + the Ledger of sold. + It must be tested and accepted + ........ + r2541 | danydb | 2009-09-19 00:53:18 +0200 (Sat, 19 Sep 2009) | 2 + lines + + bug : impress->poste give duplicate if the same card is used + several times in an operation + ........ + r2543 | danydb | 2009-09-19 01:14:36 +0200 (Sat, 19 Sep 2009) | 1 + line + + Revert the change from rev 2528 about the manual encoding of vat + in sold ledger + ........ + r2558 | danydb | 2009-09-28 22:08:01 +0200 (Mon, 28 Sep 2009) | 1 + line + + fix bug postgresql 8.3 : the restart sequence must be > 1 + ........ + r2559 | danydb | 2009-09-28 22:09:11 +0200 (Mon, 28 Sep 2009) | 2 + lines + + FIX BUG in sql_filter_per for the centralized printing + ........ + +2009-10-07 21:34 danydb + + * phpcompta/branches/rel500: + Blocked revisions 2569 via svnmerge + + ........ + r2569 | danydb | 2009-10-07 23:27:49 +0200 (Wed, 07 Oct 2009) | 2 + lines + + Fix problem when multiple lines + ........ + +2009-10-07 22:09 danydb + + * phpcompta/branches/rel500/html/js/todo_list.js: + Fix Bug : decode uri + +2009-10-07 22:41 danydb + + * phpcompta/branches/rel500/include/function_javascript.php: + Add the PHP function encodeURI decodeURI to match the behaviour + of + those functions in javascript + +2009-10-08 17:54 danydb + + * .: + ********************************************************************** + + create a branch for the rewrite of javascript + + ********************************************************************** + +2009-10-08 18:25 danydb + + * .: + Initialized merge tracking via "svnmerge" with revisions "1-2572" + from + svn+ssh://danydb@svn/svn/phpcompta/branches/rel500 + +2009-10-08 19:02 danydb + + * html/js/acc_ledger.js, html/js/acc_report.js, + html/js/anc_script.js, html/js/bq_import.js, + html/js/bud_script.js, html/js/cancel_op.js, + html/js/caod_compute.js, html/js/gestion.js, + html/js/jrn_concerned.js, html/js/mintoolkit.js, + html/js/modify_op.js, html/js/prototype.js, html/js/scripts.js, + html/js/search_poste.js, html/js/update_pcmn.js: + javascript : Remove useless files and regroup differently + +2009-10-08 22:36 danydb + + * html/js/accounting_item.js: + Rename search_post to account_item + code rewriting + +2009-10-08 22:36 danydb + + * html/js/search_poste.js: + Rename search_post to account_item + code rewriting + +2009-10-08 22:36 danydb + + * html/js/card.js, html/js/search_card.js: + Rename search_card to card + code rewriting + +2009-10-08 22:38 danydb + + * html/js/ajax_op.js, html/js/anc_script.js: + put ajax op into anc_script + +2009-10-08 22:40 danydb + + * html/js/scripts.js: + Add the Ajax object + encodeJSON function + +2009-10-08 22:40 danydb + + * html/js/acc_ledger.js: + rewrite code + +2009-10-08 22:42 danydb + + * html/calculator.js, html/calendar.js, html/richtext.js, + html/test.php: + Remove obsolete javascript file + and test for javascript into test.php + +2009-10-17 12:49 danydb + + * html/js/prototype.js, html/js/scripts.js: + ReAdd prototype.js + +2009-10-17 14:47 danydb -2005-07-27 14:42 sparkyx + * html/access.php: + access : Fix size report for IE - * : task #4451 : Impression detaille et simple +2009-10-17 15:16 danydb -2005-07-27 12:23 sparkyx + * html/annulation.php, html/commercial.php, html/compta.php, + html/fiche_search.php, html/image/down.gif, html/image/down.png, + html/image/select1.gif, html/image/select1.png, + html/image/select2.gif, html/image/select2.png, + html/image/up.gif, html/image/up.png, html/index.php, + html/jrn_search.php, html/js/compute.js, + html/js/compute_direct.js, html/line_update.php, + html/modify_op.php, html/style-light.css, html/style.css, + html/test.php, include/ac_common.php, include/action.inc.php, + include/class_acc_ledger.php, include/class_acc_ledger_fin.php, + include/class_acc_ledger_purchase.php, + include/class_acc_ledger_sold.php, include/class_acc_payment.php, + include/class_acc_reconciliation.php, include/class_action.php, + include/class_anc_operation.php, include/class_contact.php, + include/class_fiche.php, include/class_html_input.php, + include/compta_ven.inc.php, include/constant.php, + include/contact.inc.php, include/import_inc.php, + include/impress_poste.inc.php, include/jrn.php, + include/param_pcmn.inc.php, include/payment_middle.inc.php, + include/stock.inc.php, include/template/form_ledger_fin.php, + include/template/form_ledger_ven.php, include/user_common.php, + include/user_menu.php: + Sort and regroup the javascript + Replace PNG image with GIF image for compatibility with IE + Modify CSS for compatibility with IE - * : task #4450 : Rapport Mensuels +2009-10-17 15:18 danydb -2005-07-27 11:15 sparkyx + * ., include/class_todo_list.php: + Merged revisions 2583 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/branches/rel500 + + ........ + r2583 | danydb | 2009-10-14 23:41:11 +0200 (Wed, 14 Oct 2009) | 1 + line + + Add the function encodeURI to avoid problem with JSON + ........ - * : task #4499 : balance pour les fiches +2009-10-17 15:26 danydb -2005-07-25 21:50 sparkyx + * html/access.php: + Fix Bug with the add button - * : fix bug tablename +2009-10-17 17:01 danydb -2005-07-25 21:49 sparkyx + * html/image/body-aqua.jpg, html/image/bouton.jpg, + html/image/bouton2.jpg, html/image/bouton3.jpg, + html/image/bouton4.png, html/image/clouds2.jpg, + html/image/clouds3.jpg, html/image/compta.png, + html/image/comptaanal.png, html/image/elegant-l.jpg, + html/image/elegant-n.jpg, html/image/freebtn1-b.jpg, + html/image/freebtn1-l.gif, html/image/freebtn1-l.jpg, + html/image/freebtn1-ll.gif, html/image/freebtn1.gif, + html/image/freebtn2.gif, html/image/freebtn21.gif, + html/image/freebtn31.gif, html/image/freebtn91.gif, + html/image/glaslake1.jpg, html/image/glaslake2.jpg: + Remove obsolete image files - * : contrib decla impot +2009-10-19 17:46 danydb -2005-07-25 21:10 sparkyx + * include/ac_common.php: + Modify echo_error - * : changelog +2009-10-20 21:34 danydb -2005-07-25 21:10 sparkyx + * html/compta.php, html/fid.php, html/js/ajax_fiche.js, + html/js/card.js, html/style-light.css, html/style.css, + html/test.php, include/class_acc_ledger_purchase.php, + include/class_acc_ledger_sold.php, include/class_icard.php, + include/class_ipopup.php, include/class_ipopupcard.php, + include/compta_ach.inc.php, include/compta_fin.inc.php, + include/compta_ven.inc.php: + FIX IE 7 Cosmetic BUG + Avoid connection with IE6 + Add the ipopupsearchcard + +2009-10-21 12:56 danydb + + * html/js/prototype.js: + Add new version of prototype + +2009-10-24 16:16 danydb + + * html/index.php: + Doc + +2009-10-25 10:22 danydb + + * include/function_javascript.php: + Add create_script and js_include function + +2009-10-25 10:23 danydb + + * html/fid_card.php, html/js/acc_ledger.js, html/style-light.css, + html/style.css, html/test.php, include/class_acc_ledger_sold.php, + include/class_icard.php, include/compta_ven.inc.php: + Finished the autocomplete feature for the ledger of sales + +2009-10-25 10:34 danydb + + * html/js/infobulle.js: + Update Documentation + +2009-10-25 11:19 danydb - * : Improve doc + * html/fid_card.php: + Cosmetic : add a limit for autocomplete card (12) -2005-07-25 20:56 sparkyx +2009-10-25 12:44 danydb - * : Ajout listing assujetti tva (experimental) - ajout parametre de la companie - improve apparence de certaines table + * include/class_user.php: + Delay to be redirected is reduce to 1 sec -2005-07-25 20:55 sparkyx +2009-10-25 17:11 danydb - * : improve appearance + * html/fid.php, html/fid_card.php, html/js/ajax_fiche.js, + html/js/card.js, html/js/scripts.js, html/test.php, + include/class_acc_ledger_sold.php, include/class_database.php, + include/class_icard.php: + This version contains the icard with autocomplete working + Only implemented in Ledger of sale + + Some bugs and questions remain + * the payment by must be improved + * verify if the tva_id is updated + * Nothing happens if we don't selected in the hint list -2005-07-25 10:08 sparkyx +2009-10-25 17:22 danydb - * : bug 13913 : need more testing + * include/class_acc_ledger_sold.php: + Autocomplete in Ledger of sales + Improve ICard : add an onchange event -2005-07-21 14:10 sparkyx +2009-10-25 17:33 danydb - * : ChangeLog + * html/fid.php, html/js/ajax_fiche.js, html/js/card.js, + include/class_icard.php: + Autocomplete in Ledger of sales + + Improve ICard + ============= + * add an error message if the card is not found when card is not + selected into the list + * remove the animated indicator -2005-07-21 14:10 sparkyx +2009-10-25 17:37 danydb - * : Improve doc + * include/class_icard.php: + Fix small bug due the removal of the animation -2005-07-21 14:09 sparkyx +2009-10-27 13:23 danydb - * : Documentation about listing customer + * include/class_database.php, include/config_file.php: + add phpcompta_psql_host is the config_file, this variable is the + postgresql host in case it is not in local, fix the return + carriage for windows -2005-07-21 11:07 sparkyx +2009-10-27 20:42 danydb - * : Task 4439 - Formulaire is reserved for another purpose - The new name is "rapport" + * include/class_database.php: + Add variable phpcompta_psql_host in config.inc.php -2005-07-21 11:05 sparkyx +2009-10-27 20:45 danydb - * : Improve doc + * .: + Blocked revisions 2610 via svnmerge + + ........ + r2610 | danydb | 2009-10-27 21:07:16 +0100 (Tue, 27 Oct 2009) | 1 + line + + add variable phpcompta_psql_host to set the postgres server on + another server + ........ -2005-07-21 11:02 sparkyx +2009-10-27 20:47 danydb - * : Ajout rapport + * html/js/builder.js, html/js/controls.js, html/js/dragdrop.js, + html/js/effects.js, html/js/scriptaculous.js, html/js/slider.js, + html/js/sound.js, html/js/unittest.js: + Add script.aculous script -2005-07-21 10:06 sparkyx +2009-10-27 21:14 danydb - * : Task 4439 - Formulaire is reserved for another purpose - The new name is "rapport" + * include/class_fiche.php: + get_by_qcode remove the heading and trailing space -2005-07-21 09:51 sparkyx +2009-10-27 21:42 danydb - * : Improve documentation + * sql/upgrade.sql: + Remove trailing and heading space for insert_quant_purchase and + insert_quant_sold -2005-07-21 09:41 sparkyx +2009-10-27 21:46 danydb - * : Task 4439 - Formulaire is reserved for another purpose - The new name is "rapport" + * include/class_database.php: + Fix bug : if there is no file to upload, returns immediately -2005-07-21 09:08 sparkyx - - * : Task 4439 - Formulaire is reserved for another purpose - The new name is "rapport" - -2005-07-14 12:51 stanpinte - - * : Corrected typo - -2005-07-14 11:43 sparkyx - - * : TASK #4359 : Fix problem with p_jrn - -2005-07-10 10:29 sparkyx - - * : Task #4123 correct formula - -2005-07-10 09:07 sparkyx - - * : Changelog - -2005-07-10 09:05 sparkyx - - * : TASK #4123 - Progress for bilan - Normally this version is close to be finished but still a beta - stage - -2005-07-09 16:43 stanpinte - - * : Prevented operations with 0 debit/credit. - -2005-07-09 16:31 stanpinte - - * : Solved OD jrn problem: variable e_accountX were empty after - form save, and before form submit. - -2005-07-09 16:16 stanpinte - - * : Documented - -2005-07-09 16:00 stanpinte - - * : Now focus is on the Log In button - -2005-07-09 13:09 sparkyx - - * : ChangeLog - -2005-07-09 13:05 sparkyx - - * : TASK #4123 : - add a beta version of the bilan - -2005-07-09 13:04 sparkyx - - * : TASK #4123 I need to improve ParseFormula and the checkFormula - to be - able to use them in the bilan module - -2005-07-09 13:01 sparkyx - - * : Update Documentation - -2005-07-09 12:59 sparkyx - - * : Add devlp script - -2005-07-08 18:18 sparkyx - - * : Task #4402 : Security Problem - Problème est resolu grace à une procedure de check - Avantage : la validité des formules est directement vérifiée - -2005-07-05 09:20 sparkyx - - * : Task #4123 Ajout Bilan - -2005-07-04 22:27 sparkyx - - * : ChangeLog - -2005-07-04 22:26 sparkyx - - * : Task #4359 : Fix problem in annulation.php - -2005-07-04 21:41 sparkyx - - * : Fix problem in SearchPoste - -2005-07-04 20:46 sparkyx - - * : ChangeLog - -2005-07-04 20:45 sparkyx - - * : Task #4359 : MultiEcran - -2005-07-04 20:29 sparkyx - - * : ChangeLog - -2005-07-04 20:28 sparkyx - - * : Task #4359 : Multiecran - -2005-07-04 20:14 sparkyx - - * : ChangeLog - -2005-07-04 20:14 sparkyx - - * : Task #4359 : Multiecran - -2005-07-04 18:34 sparkyx - - * : Changelog - -2005-07-04 18:34 sparkyx - - * : Task #4124 : TVA declaration - -2005-07-04 17:58 stanpinte - - * : enleve la variable globale g_jrn, remplace par param HTTP p_jrn - partout - -2005-07-01 08:13 stanpinte - - * : added comment - -2005-06-30 20:25 sparkyx - - * : Task 4331 Improve Formula - -2005-06-30 19:25 sparkyx - - * : Task 4331 Improve Formula - -2005-06-29 12:57 sparkyx - - * : Fix unknown sessid (dependent of php's version) - -2005-06-24 16:17 stanpinte - - * : Added comments - -2005-06-22 20:32 sparkyx - - * : Changelog - -2005-06-22 20:32 sparkyx - - * : Task 4301 Form (html, pdf, csv) needs more test - -2005-06-22 20:31 sparkyx - - * : Changelog - -2005-06-17 10:52 sparkyx - - * : Changelog update - -2005-06-17 10:50 sparkyx - - * : task 3273: show the sign of the financial op - -2005-06-17 10:44 sparkyx - - * : Task 3273 : Change the look - -2005-06-17 10:43 sparkyx - - * : Task 4280: cosmetic - -2005-06-17 10:41 sparkyx - - * : Bug 13431 - Quote problem in the comment - -2005-06-17 09:31 sparkyx - - * : Add documentation for Windows installation - -2005-06-11 20:35 stanpinte - - * : focus dans le textfield de la frame de recherche et focus sur - le premier rsultat dans la frame de recherche - -2005-05-29 15:46 sparkyx - - * : Task #4123 Ajout Bilan - -2005-05-07 21:19 sparkyx - - * : Task 4111: Changelog - -2005-05-07 21:19 sparkyx - - * : task 4111: update doc - -2005-05-07 21:19 sparkyx - - * : task 4111: update doc - -2005-05-07 21:16 sparkyx - - * : Task 4111: Changelog - -2005-05-07 21:10 sparkyx - - * : Task 4111: remove debug info - -2005-05-06 22:05 sparkyx - - * : task 4111 Tipo - -2005-05-06 22:03 sparkyx - - * : Task 4111 : Warning about IE - -2005-05-06 21:50 sparkyx - - * : task 4111 Fix closed period in template - -2005-05-06 21:38 sparkyx - - * : task 4111 : Fix cosmetic for IE - -2005-05-06 21:23 sparkyx - - * : task 4111 : correct & improve sql script - -2005-05-06 21:23 sparkyx - - * : task 4111 : remove debug info - -2005-05-06 20:39 sparkyx - - * : Task 4111 Final test - -2005-05-06 19:58 sparkyx - - * : Task 4110 Javascript problem with IE - -2005-05-06 19:54 sparkyx - - * : BUG 12985 Pas de mise à jour Payé / pas payé - -2005-05-06 19:50 sparkyx - - * : Task 4110 Javascript problem with IE - -2005-05-06 19:41 sparkyx - - * : Task 4110 Javascript problem with IE - -2005-05-06 09:34 sparkyx - - * : Update doc - -2005-05-06 09:34 sparkyx - - * : Update doc - -2005-05-05 16:07 stanpinte - - * : documented include path on windows - -2005-05-05 16:00 stanpinte - - * : Documented log db creation - -2005-05-05 08:52 sparkyx - - * : Changelog - -2005-05-04 22:27 sparkyx - - * : bug 12971 - -2005-05-04 22:09 sparkyx - - * : BUG 12971 - A null name is now impossible for cards and card modele - -2005-05-04 21:26 sparkyx - - * : task 3374 Solde compte en banque - -2005-05-04 21:18 sparkyx - - * : task 3374 Solde compte en banque - -2005-05-04 21:16 sparkyx - - * : Previous version is lower than 4 - -2005-05-04 20:35 sparkyx - - * : Fix u_redcontent in html/style-light.css - Fix Javascript prob. - -2005-04-29 09:44 sparkyx - - * : Task 3839 - Export PDF de la sécurité - -2005-04-27 09:07 sparkyx - - * : Fix unset variable - -2005-04-27 09:06 sparkyx - - * : changelog - -2005-04-27 08:49 sparkyx - - * : Message + explicite - -2005-04-27 08:36 sparkyx - - * : Bug 12702 : session_auto_start == false - -2005-04-21 18:04 stanpinte - - * : Added focus on date field in new financial form - -2005-04-21 17:42 stanpinte - - * : Added scripts file - -2005-04-21 17:24 stanpinte - - * : Fixed problem with absolute position when using big fonts - -2005-04-21 17:04 stanpinte - - * : Fixed some small bugs - -2005-04-21 17:01 stanpinte - - * : Made sure upgrade4.sql is processed on new file - -2005-04-09 08:31 sparkyx - - * : Add a warning about IE - -2005-04-03 00:28 sparkyx - - * : Fix theme - -2005-04-01 21:50 sparkyx - - * : if debug is off do not open the log file - -2005-04-01 21:46 sparkyx - - * : Improve : selected cell in advanced menu - -2005-04-01 20:18 sparkyx - - * : Bug Session.auto_start must be set to true - -2005-03-31 21:57 sparkyx - - * : Changelog - -2005-03-31 21:19 sparkyx - - * : Task 3954 Focus Popup menu - -2005-03-31 21:16 sparkyx - - * : Task 3778: upload document, remove uploaded document - -2005-03-31 21:08 sparkyx - - * : Task 3953: Missing Menu - -2005-03-31 21:08 sparkyx - - * : Task 3954 - Popup Window has the focus - -2005-03-31 20:40 sparkyx - - * : Task 3953 Missing Menus - -2005-03-31 20:05 sparkyx - - * : Fix bug when deleting a "poste" - -2005-03-31 19:57 sparkyx - - * : Task 3953 - Add missing Menus - -2005-03-31 19:56 sparkyx - - * : Fix problem version - -2005-03-31 15:28 sparkyx - - * : Fix problem of version the scherma version of the REL100A is 4 - and no 3 - -2005-03-29 09:41 stanpinte - - * : Fixed wrong variable - -2005-03-29 09:04 stanpinte - - * : Fixed operation annulation - -2005-03-28 14:07 stanpinte - - * : Fixed asecond bug - -2005-03-28 14:05 stanpinte - - * : Fixed a first bug - -2005-03-21 09:34 stanpinte - - * : Debugged use of global vars. - -2005-03-15 18:46 sparkyx - - * : Fix Bug for centralized jrn (export csv) - -2005-03-15 18:46 sparkyx - - * : Fix bug in the update scripts - -2005-03-13 17:36 sparkyx - - * : changelog - -2005-03-13 17:36 sparkyx - - * : Testing scenario : init - -2005-03-13 17:35 sparkyx - - * : Task 3778 remove old document when overwritting - -2005-03-13 17:19 sparkyx - - * : Task 3778 Add upload in operation detail - -2005-03-13 16:35 sparkyx - - * : task 3858 : missing arg to checkaction - -2005-03-13 16:27 sparkyx - - * : Task 3778 Fix security in show_document - -2005-03-13 16:25 sparkyx - - * : Fix : now compatible with psql 7.4 - -2005-03-13 15:30 sparkyx - - * : task 3876 Filter the users - -2005-03-09 13:19 sparkyx - - * : FIX the addon misplaced, the old install.sh copied it to the - good place but now we do not use it anymore. So I had to move it - -2005-03-08 13:31 sparkyx - - * : Update Changelog - -2005-03-08 13:30 sparkyx - - * : task 3858: Fix little in cl_user::CheckAction - -2005-03-07 19:50 sparkyx - - * : task 3858 : revision of the security correction & improvement - -2005-03-06 20:00 sparkyx - - * : changelog - -2005-03-06 19:56 sparkyx - - * : Task 3778 : cleaning temp file - -2005-03-06 19:52 sparkyx - - * : Task 3778 : show the upload document - -2005-03-06 18:45 sparkyx - - * : changelog - -2005-03-06 18:31 sparkyx - - * : changelog - -2005-03-06 18:30 sparkyx - - * : Tasl 3778 : Add uploaded document for operation - -2005-03-06 17:37 stanpinte - - * : Disabled the all option. - -2005-03-06 17:33 stanpinte - - * : Added disabled property to class widget - -2005-03-06 17:13 stanpinte - - * : made script useful for other dbs, and file ids - -2005-03-06 17:10 stanpinte - - * : Fixed task 3838i (keep secundary menus when selecting secundary - item - -2005-03-06 16:56 sparkyx - - * : Set version at the end - -2005-03-06 16:47 stanpinte - - * : made script useful for other dbs, and file ids - -2005-03-06 16:41 stanpinte - - * : Fixed task 3838i (keep secundary menus when selecting secundary - item - -2005-03-06 16:00 sparkyx - - * : change pg_exec by pg_query - -2005-03-06 15:53 sparkyx - - * : separator for win=; - -2005-03-06 15:52 sparkyx - - * : Fix problem when installing on windows - -2005-03-06 15:15 sparkyx - - * : removed obsolete files - -2005-03-06 15:05 stanpinte - - * : Removed some files related to compta profile - -2005-03-06 14:52 stanpinte - - * : Removed references to p_profile variable - -2005-03-06 14:50 stanpinte - - * : Set focus directly on user field - -2005-03-06 14:29 stanpinte - - * : Removed references to p_profile variable - -2005-03-06 14:17 stanpinte - - * : Fixed bug in page 'Recherche' - -2005-03-06 14:05 stanpinte - - * : Corrected error: undefined PHPSESSID - -2005-03-06 13:52 stanpinte - - * : Corrected error: undefined PHPSESSID - -2005-03-06 13:36 stanpinte - - * : added info - -2005-03-01 21:28 sparkyx - - * : Changelog - -2005-03-01 21:26 sparkyx - - * : parm_periode has now a new column to - check if a periode is centralized or only closed - -2005-03-01 21:05 sparkyx - - * : fix bug due to session_register=off - -2005-03-01 21:00 sparkyx - - * : Fix bug due to session_regsiter = off - -2005-03-01 20:44 sparkyx - - * : Remove obsolete files - -2005-02-28 21:37 sparkyx - - * : Changelog - -2005-02-27 14:24 sparkyx - - * : Fix numerous bug and now PhpCompta can work with - session_register sets to off - -2005-02-27 14:23 sparkyx - - * : Fix upgrade - -2005-02-26 22:07 sparkyx - - * : Remove debug - -2005-02-26 22:05 sparkyx - - * : Fix html_page_start - -2005-02-26 22:02 sparkyx - - * : Yannick Improve html_page_start - Fix prob with GetRow - -2005-02-26 17:53 stanpinte - - * : inserted example script to insert automatically a database - -2005-02-26 17:52 stanpinte - - * : added drop of mod1 db - -2005-02-26 17:40 stanpinte - - * : fixed regexp handling in include_path check - -2005-02-26 17:26 sparkyx - - * : SQL - -2005-02-26 17:21 stanpinte - - * : added comment - -2005-02-26 16:30 stanpinte - - * : made mswindows compatible, and removed update checks. - -2005-02-26 15:48 sparkyx - - * : Sql Comment prob - -2005-02-26 15:46 sparkyx - - * : Sql Comment prob - -2005-02-26 15:43 sparkyx - - * : Upgrade password - -2005-02-26 15:40 sparkyx - - * : Fix SQL - -2005-02-26 15:16 stanpinte - - * : moved all sql but 'log' into html base directory - -2005-02-26 15:02 sparkyx - - * : Fix - -2005-02-26 14:59 stanpinte - - * : resurrected - -2005-02-26 14:59 sparkyx - - * : Fix problem of install - -2005-02-26 14:43 stanpinte - - * : added - -2005-02-26 10:20 sparkyx - - * : FIX install - -2005-02-26 08:53 sparkyx - - * : Changelog - -2005-02-26 08:52 sparkyx - - * : FIX install problem - -2005-02-22 13:51 sparkyx - - * : Update database schema - -2005-02-22 13:50 sparkyx - - * : changelog - -2005-02-22 13:49 sparkyx - - * : IMPROVE stock - -2005-02-13 16:08 sparkyx - - * : changelog - -2005-02-13 16:08 sparkyx - - * : Change for centralise to have the correct order, number for pj - Change printing for the operation id - update the patch sql for that - -2005-02-12 21:31 sparkyx - - * : Fix bug in modele and database creation - -2005-02-12 20:37 sparkyx - - * : changelog - -2005-02-12 20:33 sparkyx - - * : Add the patch for the account_repository database - -2005-02-12 20:23 sparkyx - - * : changelog - -2005-02-12 20:23 sparkyx - - * : IMPROVE setup - -2005-02-12 20:01 sparkyx - - * : IMPROVE : setup.php - -2005-02-12 19:41 sparkyx - - * : IMPROVE setup - -2005-02-12 19:10 sparkyx - - * : remove menu recherche - -2005-02-12 18:57 sparkyx - - * : IMPROVE : setup.php - -2005-02-12 17:21 sparkyx - - * : IMPROVE setup - -2005-02-08 20:00 sparkyx - - * : changelog - -2005-02-08 19:59 sparkyx - - * : Improve Doc - -2005-02-08 19:57 sparkyx - - * : IMPROVE installer - -2005-02-08 11:08 sparkyx - - * : IMPROVE setup html based, ability to patch tested - -2005-02-08 10:58 sparkyx - - * : IMPROVE setup html based, ability to patch - -2005-02-06 01:29 sparkyx - - * : changelog - -2005-02-06 01:28 sparkyx - - * : File are now in html/admin/sql in order to work with the new - installer setup.php - -2005-02-06 01:27 sparkyx - - * : Improve dbconnect to permit setup.php to work - -2005-02-06 01:26 sparkyx - - * : Change the way the internal code is computed - -2005-02-06 01:24 sparkyx - - * : Update doc - -2005-02-06 01:05 sparkyx - - * : NEW : - In order to get easier the installation and the upgrade of the - database - a new module webbased has been created, the old version of - install.sh - is now obsolete - -2005-02-04 22:59 sparkyx - - * : changelog - -2005-02-04 22:58 sparkyx - - * : Improve the search : it is now possible to find all the - operation related to a poste - -2005-02-03 22:43 sparkyx - - * : Fix bug - -2005-02-03 21:02 sparkyx - - * : Update documentation - -2005-02-03 20:46 sparkyx - - * : changelog - -2005-02-03 20:45 sparkyx - - * : Fix bug : invalid function - -2005-02-03 20:44 sparkyx - - * : Clean code - -2005-02-03 20:14 sparkyx - - * : Update Documentation - -2005-02-01 22:17 sparkyx - - * : Changelog - -2005-02-01 22:17 sparkyx - - * : Fix bug in Search Menu - -2005-02-01 22:16 sparkyx - - * : Change tab by coma - -2005-02-01 20:56 sparkyx - - * : changelog - -2005-02-01 20:56 sparkyx - - * : Printing of card is now completely correct - -2005-02-01 20:55 sparkyx - - * : changelog - -2005-01-31 23:43 sparkyx - - * : Changelog - -2005-01-31 23:42 sparkyx - - * : Fix bug in the printing of card :-) - -2005-01-31 22:35 sparkyx - - * : Add Fiche print and export : a bug is still to be fixed - -2005-01-24 20:37 sparkyx - - * : Change log - -2005-01-24 20:36 sparkyx - - * : *** empty log message *** - -2005-01-24 20:32 sparkyx - - * : Add MenuAdmin function - -2005-01-24 20:31 sparkyx - - * : Code cleaning Delete Obsolete functions - -2005-01-24 20:31 sparkyx - - * : Modify DbConnect function - -2005-01-24 20:30 sparkyx - - * : Improve appearance - -2005-01-24 20:29 sparkyx - - * : Obsolete - -2005-01-20 20:12 sparkyx - - * : Fix Access Key - -2005-01-20 20:11 sparkyx - - * : Fix Access Key - -2005-01-20 20:08 sparkyx - - * : changelog - -2005-01-20 20:05 sparkyx - - * : Fix Access Key - -2005-01-20 19:43 sparkyx - - * : Fix warning about ja_desc - -2005-01-20 19:39 sparkyx - - * : Drop compta interface - -2005-01-19 20:11 stanpinte - - * : added tooltips, and hotkey for Jrn menus. (must still debug - get_quick_key function - -2005-01-18 18:01 sparkyx - - * : Add poste name in impress.php - -2005-01-10 19:11 sparkyx - - * : Changelog - -2005-01-10 18:54 sparkyx - - * : Improve doc - -2005-01-10 18:52 sparkyx - - * : Quote problem when php.ini not configured correctly - -2005-01-10 18:51 sparkyx - - * : Improve code - -2005-01-04 20:49 sparkyx - - * : Changelog - -2005-01-04 20:41 sparkyx - - * : Code cleaning : DbConnect function - -2005-01-04 20:34 sparkyx - - * : Code cleaning : DbConnect function - -2005-01-04 20:33 sparkyx - - * : code cleaning : Function FormVenteView - -2005-01-04 20:32 sparkyx - - * : Improve style sheet - -2005-01-04 20:25 sparkyx - - * : Code cleaning : DbConnect function - -2004-12-16 20:24 sparkyx - - * : changelog - -2004-12-16 20:24 sparkyx - - * : Fix style for compta style - -2004-12-15 21:01 sparkyx - - * : changelog - -2004-12-15 21:01 sparkyx - - * : Change remove all the global variable, user $_SESSION instead - Improve appearance for administrator - -2004-12-13 23:01 sparkyx - - * : Changelog - -2004-12-13 22:59 sparkyx - - * : Menu more logic - -2004-12-13 18:11 sparkyx - - * : NEW balance in HTML, PDF & CSV - -2004-12-12 20:01 sparkyx - - * : change in search : order by date asc - -2004-12-12 19:57 sparkyx - - * : fix bug in search : if no conditions everything is shown - -2004-12-12 19:35 sparkyx - - * : Changelog - -2004-12-12 19:32 sparkyx - - * : Fix undefined variable g_jrn - -2004-12-12 19:30 sparkyx - - * : Improve appearance : no double line for concerned operation - -2004-12-12 19:27 sparkyx - - * : Improve appearance : ListJrn enlarge table - -2004-12-12 19:25 sparkyx - - * : fix c_internal undefined - -2004-12-12 19:20 sparkyx - - * : Improve appearance - -2004-12-12 19:20 sparkyx - - * : Improve appearance - -2004-12-12 19:18 sparkyx - - * : Changelog - -2004-12-12 18:25 sparkyx - - * : Changelog - -2004-12-12 18:23 sparkyx - - * : Add a central search - -2004-12-12 18:23 sparkyx - - * : Improve appearance - No button modify if the period is closed - -2004-12-12 18:22 sparkyx - - * : CheckJrn improved, for access to Grand Livre - -2004-12-12 18:21 sparkyx - - * : Improve appearance - -2004-12-12 18:21 sparkyx - - * : Add description for invoice - -2004-12-12 18:19 sparkyx - - * : CheckJrn improved - -2004-12-12 18:18 sparkyx - - * : Add a central search - -2004-12-12 18:16 sparkyx - - * : Improve appearance and add search by internal code - -2004-12-05 18:47 sparkyx - - * : Change "voir" submenu for journaux" - -2004-12-05 18:47 sparkyx - - * : Improve appearance - -2004-12-04 14:07 sparkyx - - * : Improve grand livre to have the same look at the others - -2004-12-04 13:47 sparkyx - - * : Improve html_start: correct encoding is now given - -2004-12-04 13:46 sparkyx - - * : Add new function to class user - -2004-12-04 13:45 sparkyx - - * : Add Grand Livre - -2004-11-29 20:34 sparkyx - - * : Fix cosmetics - -2004-11-26 22:05 sparkyx - - * : Add csv and pdf for poste - -2004-11-25 23:37 sparkyx - - * : Add new print system and CSV for journaux - -2004-11-25 23:30 sparkyx - - * : Add new print system and CSV for journaux - -2004-11-25 15:06 sparkyx - - * : Add Sql comment - -2004-11-23 22:13 sparkyx - - * : restore impress.php - -2004-11-23 22:11 sparkyx - - * : continue user menu - -2004-11-23 22:01 sparkyx - - * : Start with user printing - -2004-11-23 20:39 sparkyx - - * : initial file for user_impress.php - -2004-11-23 20:39 sparkyx - - * : Annulation set the amount to 0 and mark the op. as invalid - -2004-11-23 20:38 sparkyx - - * : Remove the compta profile - -2004-11-23 20:26 sparkyx - - * : Improve test - -2004-11-06 19:32 sparkyx - - * : change the adm. menu - -2004-11-04 20:25 sparkyx - - * : Log database for debugging purpose - -2004-10-26 20:46 sparkyx - - * : Remove obsolete - -2004-10-26 20:43 sparkyx - - * : Fix cosmetic and add delete from no centralized op - -2004-10-25 21:32 sparkyx - - * : Improve interface fix some bugs & still unstable - -2004-10-10 13:48 sparkyx - - * : Remove menu Impression & Recherche from jrn's menu - -2004-10-10 13:42 sparkyx - - * : Move styles files - -2004-10-10 13:39 sparkyx - - * : Change appearance !! - -2004-10-10 09:58 sparkyx - - * : Interfaces changes - -2004-10-03 19:40 sparkyx - - * : Change appearance --> do not work, do not use it !! - -2004-10-03 16:48 sparkyx - - * : UNSTABLE do not use it !! - -2004-10-03 15:59 sparkyx - - * : New database files - -2004-09-22 20:26 sparkyx - - * : Improve doc - -2004-09-22 20:23 sparkyx - - * : Improve doc - -2004-09-22 19:21 sparkyx - - * : Separate sql instead of a big sql - -2004-07-06 20:09 sparkyx - - * : bug 9574 - -2004-06-12 10:09 sparkyx - - * : task 3106 - -2004-06-12 10:07 sparkyx - - * : Update doc task 3106 - -2004-06-06 10:38 sparkyx - - * : set database version to 5 - -2004-06-06 10:38 sparkyx - - * : Set database version to 5 - -2004-06-06 10:19 sparkyx - - * : remove personal info - -2004-06-06 10:17 sparkyx - - * : Change the Database Version - -2004-06-06 10:13 sparkyx - - * : no debug info in prod - -2004-05-19 16:03 sparkyx - - * : task 3106 - -2004-05-19 15:27 sparkyx - - * : fix cosmetic bug in ShowPeriode - -2004-05-02 23:46 sparkyx - - * : bug 8757 missing file - -2004-05-02 16:52 sparkyx - - * : Show the sum rounded to 2 decimal and prevent the record of - invoice of 0 - -2004-05-02 09:52 sparkyx - - * : Bug : forgot to include a file - -2004-04-28 14:34 sparkyx - - * : Cosmetic bugs - -2004-04-19 20:55 sparkyx - - * : Task 3106 - -2004-04-19 20:28 sparkyx - - * : Task 3106 - -2004-04-19 16:52 sparkyx - - * : Add security to Stock - -2004-04-19 16:47 sparkyx - - * : Add security to Stock - -2004-04-19 16:40 sparkyx - - * : Add security to Stock - -2004-04-19 16:19 sparkyx - - * : Update - -2004-04-19 16:17 sparkyx - - * : Bug 8597 Security major prob - -2004-04-15 18:37 sparkyx - - * : bug 8581 - -2004-04-15 18:28 sparkyx - - * : bug 8581 - -2004-04-15 12:29 stanpinte - - * : corrected typo - -2004-04-14 19:34 sparkyx - - * : update - -2004-04-14 19:31 sparkyx - - * : improve printing of card - -2004-04-14 19:30 sparkyx - - * : Fix bug is paid - -2004-04-13 15:40 sparkyx - - * : Fix javascript bug for new card - -2004-04-13 12:39 sparkyx - - * : Fix order - -2004-04-13 12:38 sparkyx - - * : No change - -2004-04-13 12:38 sparkyx - - * : Add inline calculator - -2004-04-13 12:37 sparkyx - - * : Fix order in printing - -2004-04-13 12:37 sparkyx - - * : Set filter for ODS and problem of rounded amount - -2004-04-13 12:36 sparkyx - - * : Set filter for ODS - -2004-04-13 12:32 sparkyx - - * : Fix problem of sequence when encoding in accountant mode - -2004-04-13 12:31 sparkyx - - * : Update doc - -2004-04-12 18:51 sparkyx - - * : Increase nb of default rows for ODS - -2004-04-11 20:48 sparkyx - - * : Fix order in balance - -2004-04-10 20:09 sparkyx - - * : Bug : invalid string make the pcmn_update fail - -2004-04-10 19:48 sparkyx - - * : bug 8531 - improve saldo present - -2004-04-10 18:43 sparkyx - - * : bug 8531 - -2004-04-10 18:43 sparkyx - - * : bug 8532 - -2004-04-10 17:35 sparkyx - - * : Bugs cosmetic - -2004-04-10 16:41 sparkyx - - * : Bug cosmetic - -2004-04-08 12:48 sparkyx - - * : Update - -2004-04-07 23:54 sparkyx - - * : Update doc - -2004-04-07 23:49 sparkyx - - * : Cosmetic bugs - -2004-04-07 17:36 sparkyx - - * : Fix bugs - -2004-04-07 01:50 sparkyx - - * : Update - -2004-04-07 01:42 sparkyx - - * : Possibility to change vat of sell and expense - -2004-04-07 00:16 sparkyx - - * : New vat can be changed in sell - -2004-04-06 22:13 sparkyx - - * : Fix Bug in search by date - -2004-04-06 22:12 sparkyx - - * : Fix Bug in search by date - -2004-04-06 22:11 sparkyx - - * : Fix Bug in search by date - -2004-04-06 21:36 sparkyx - - * : Fix bug - -2004-04-06 21:36 sparkyx - - * : Default sign = for search by amount - -2004-04-06 21:14 sparkyx - - * : Default sign = - -2004-04-06 19:54 sparkyx - - * : Fix bug in printing - -2004-04-06 18:46 sparkyx - - * : Fix password - -2004-04-06 17:04 sparkyx - - * : Fix problem of multiple for with the financial - -2004-04-06 16:02 sparkyx - - * : Fix problem with card update (account) - -2004-04-06 16:01 sparkyx - - * : Update comment - -2004-04-06 16:01 sparkyx - - * : Fix prob with date - -2004-04-06 16:00 sparkyx - - * : Update doc - -2004-04-06 14:05 sparkyx - - * : Close the windows - -2004-04-06 11:47 sparkyx - - * : Fix correct in ODS - -2004-04-05 23:27 sparkyx - - * : Fixed path for COMPTA_HOME - -2004-04-04 10:39 stanpinte - - * : reverted: corrected missing path entry. fixes PDF output - -2004-04-04 10:16 stanpinte - - * : corrected missing path entry. fixes PDF output - -2004-04-04 10:09 sparkyx - - * : New : set date when cancel an operation - -2004-04-03 17:22 sparkyx - - * : db correction (fiche) - -2004-04-03 05:20 sparkyx - - * : Update - -2004-04-03 05:19 sparkyx - - * : Structure change I hope for the last time - -2004-04-03 05:16 sparkyx - - * : Update - -2004-04-03 05:15 sparkyx - - * : Stock included, can be improved - -2004-04-03 02:25 sparkyx - - * : test on a_vat - -2004-04-03 01:39 sparkyx - - * : Database test - -2004-04-03 01:38 sparkyx - - * : Fix central - stock - improve doc - -2004-04-03 00:35 sparkyx - - * : Update doc - -2004-04-03 00:26 sparkyx - - * : Update demo - -2004-04-03 00:25 sparkyx - - * : update db - -2004-04-03 00:21 sparkyx - - * : Fix bug in annulation, add check to validate number and card - -2004-04-02 12:26 sparkyx - - * : Change cancel an op : j_internal=='ANNULE' and jr_internal of - the cancel operation = 'ANNULE' - -2004-04-02 12:19 sparkyx - - * : Change centralize and jr_internal rule - -2004-04-02 01:17 sparkyx - - * : Payment - -2004-04-02 00:57 sparkyx - - * : Stock include file - -2004-04-02 00:26 sparkyx - - * : Many little Bugs fixed - -2004-04-01 13:45 sparkyx - - * : Improve appearance in user interface for ach, ven, fin and ods - -2004-04-01 12:24 sparkyx - - * : code cleaning - -2004-04-01 12:05 sparkyx - - * : remove javascript file, the javascript are now in - include/constant.php (define JS_) - -2004-04-01 01:38 sparkyx - - * : Update - -2004-04-01 01:37 sparkyx - - * : script for creating db files - -2004-04-01 01:35 sparkyx - - * : Adapt for new features (ODS, UpdateJrn...) - -2004-04-01 01:34 sparkyx - - * : Update db - -2004-04-01 01:33 sparkyx - - * : balance - -2004-04-01 01:32 sparkyx - - * : New Achat Bank saldo, misc op (ODS) some improv. - -2004-04-01 01:29 sparkyx - - * : New Menu advanced Improve style - -2004-04-01 01:28 sparkyx - - * : Improve the list of op - -2004-04-01 01:28 sparkyx - - * : New Search Poste improved - -2004-04-01 01:28 sparkyx - - * : New Javascript - -2004-04-01 01:28 sparkyx - - * : Improve isNumber - -2004-04-01 01:27 sparkyx - - * : New : Impress - account balance - -2004-04-01 01:27 sparkyx - - * : New : return to the parent window the selected account - -2004-04-01 01:27 sparkyx - - * : Improve & fix bug - -2004-04-01 01:27 sparkyx - - * : Linked operation - Add - Remove - -2004-04-01 01:27 sparkyx - - * : Use impress from user interface - -2004-04-01 01:26 sparkyx - - * : Used javascript from constant.php - -2004-04-01 01:26 sparkyx - - * : Improve appearance of ViewJrn - change update - linked - operation - -2004-04-01 01:26 sparkyx - - * : New balance - update operation - -2004-04-01 01:23 sparkyx - - * : Update style - -2004-03-30 18:56 sparkyx - - * : "Rapprochement " (linked between concerned operation) - -2004-03-30 18:56 sparkyx - - * : Fix bug in fiche_new - -2004-03-30 18:55 sparkyx - - * : Improve search - -2004-03-30 11:22 sparkyx - - * : update db - -2004-03-30 11:21 sparkyx - - * : Vat check - -2004-03-30 01:21 sparkyx - - * : clean - -2004-03-30 01:19 sparkyx - - * : update doc - -2004-03-30 01:17 sparkyx - - * : update doc. - -2004-03-30 01:15 sparkyx - - * : Changelog - -2004-03-30 01:14 sparkyx - - * : Update db for stock and rapt - -2004-03-30 01:13 sparkyx - - * : Cancel operation & function VerifyDate (,,) - -2004-03-30 01:13 sparkyx - - * : check date and correct - -2004-03-30 01:13 sparkyx - - * : Add the possibility to select tva rate in the js windows - -2004-03-30 01:13 sparkyx - - * : function isCentralize - -2004-03-30 01:12 sparkyx - - * : clean session variable - -2004-03-30 01:12 sparkyx - - * : fix cosmetic bug - -2004-03-30 01:12 sparkyx - - * : task 3106 - -2004-03-29 12:04 sparkyx - - * : task 3106 - -2004-03-29 10:29 sparkyx - - * : Change tva - use insert instead of copy - -2004-03-28 20:06 sparkyx - - * : Add financial - -2004-03-28 20:06 sparkyx - - * : Improve - -2004-03-28 11:14 sparkyx - - * : Update modele - -2004-03-27 12:35 sparkyx - - * : Changelog - -2004-03-27 11:57 sparkyx - - * : Replace the sql script by database dump, a demo is now supplied - -2004-03-27 11:05 sparkyx - - * : task 3106 - Php setting - -2004-03-26 16:24 sparkyx - - * : task 3106 - -2004-03-26 16:20 sparkyx - - * : update Changelog - -2004-03-26 16:18 sparkyx - - * : add index fk_ + add security card read/write - -2004-03-26 16:18 sparkyx - - * : Add user interface for expense include/user_action_ach.php - Improve inputType - add javascript and button - add FormAchat - - add FormFin fix some bugs - -2004-03-26 16:14 sparkyx - - * : Fix name - -2004-03-26 16:14 sparkyx - - * : Improve - -2004-03-26 16:14 sparkyx - - * : Improve the accound search - -2004-03-26 16:14 sparkyx - - * : Fix bug ; double line - -2004-03-26 16:13 sparkyx - - * : Add search window for card (user interface) - -2004-03-26 16:13 sparkyx - - * : Improve security of card - -2004-03-26 16:13 sparkyx - - * : Add window for adding card (user interface) - -2004-03-26 16:12 sparkyx - - * : Fix bug in ComputeVat function - insertJrnx return the j_id - - add insertStock - -2004-03-26 16:12 sparkyx - - * : Add correct button - -2004-03-26 16:12 sparkyx - - * : Add user interface for financial - -2004-03-26 16:12 sparkyx - - * : Add user interface for expense - -2004-03-26 16:12 sparkyx - - * : Fix attribute order in card - -2004-03-26 16:11 sparkyx - - * : security for card - -2004-03-26 16:11 sparkyx - - * : add index fk_ - -2004-03-26 16:11 sparkyx - - * : add index fk_ fix setting in jrn - -2004-03-26 16:05 sparkyx - - * : Fix problem in period - -2004-03-26 16:04 sparkyx - - * : Task 3106 - -2004-03-26 16:04 sparkyx - - * : add clean target - -2004-03-26 16:03 sparkyx - - * : fix name - -2004-03-26 16:03 sparkyx - - * : Correct accent - -2004-03-26 16:03 sparkyx - - * : Update TODO list - -2004-03-26 16:02 sparkyx - - * : add span.odd span.even - -2004-03-26 16:02 sparkyx - - * : blank line - -2004-03-26 16:02 sparkyx - - * : improve installation => create a log - -2004-03-24 13:26 sparkyx - - * : Changelog - -2004-03-24 13:25 sparkyx - - * : Creation of the interface USER - -2004-03-24 13:18 sparkyx - - * : New documentation - task 3106 - -2004-03-24 13:18 sparkyx - - * : name has changed - -2004-03-24 13:11 sparkyx - - * : Creation of the interface USER - -2004-03-24 13:09 sparkyx - - * : Correct the vat label - -2004-03-24 12:58 sparkyx - - * : new class div.u_redcontent - -2004-03-18 14:46 sparkyx - - * : Update - -2004-03-18 14:42 sparkyx - - * : doc - -2004-03-18 14:39 sparkyx - - * : New user interface - -2004-03-18 14:39 sparkyx - - * : New fiche system - -2004-03-18 14:36 sparkyx - - * : Update the fiche system - -2004-03-18 14:35 sparkyx - - * : Prob with multiple include - -2004-03-18 14:34 sparkyx - - * : Update doc - -2004-03-18 14:32 sparkyx - - * : Change default function header - -2004-03-18 14:31 sparkyx - - * : Fix problem with setenv - -2004-02-15 10:01 sparkyx - - * : Fix Cross Ref - -2004-02-15 10:01 sparkyx - - * : Add pdf creation - -2004-02-14 20:11 sparkyx - - * : FIX - -2004-02-14 19:51 sparkyx - - * : fix - -2004-02-14 19:41 sparkyx - - * : task #3106 - -2004-02-14 19:40 sparkyx - - * : Task #3106 - -2004-02-14 17:56 sparkyx - - * : Replace by doc/INSTALL-fr.sgml - -2004-02-14 14:07 sparkyx - - * : FAQ - Frequently Asked Questions (in french) - -2004-02-08 21:33 sparkyx - - * : webcompta -> phpcompta - -2004-02-08 21:20 sparkyx - - * : integration Patch-092-3 - -2004-02-08 19:24 sparkyx - - * : Patch 092-2 - Fix problem with database creation in user mode - -2004-02-08 18:29 sparkyx - - * : Start a FAQ (french) - -2004-02-08 14:49 sparkyx - - * : fix error when no folder are created - -2004-02-08 14:39 sparkyx - - * : Fix syntax error Philippe Chauvat - -2004-01-01 15:42 sparkyx - - * : Fix bug in the Forms printing - -2004-01-01 15:42 sparkyx - - * : Add comment - -2004-01-01 15:42 sparkyx - - * : fix Debit-Credit - -2003-11-30 13:19 sparkyx - - * : Continue work for user profile - -2003-11-30 13:18 sparkyx - - * : Database change - -2003-11-30 13:17 sparkyx - - * : Patch for old database version - -2003-11-30 13:16 sparkyx - - * : Form for the user profile - -2003-11-30 13:15 sparkyx - - * : Correct the vat label - -2003-11-30 13:14 sparkyx - - * : New style mtitle2 - -2003-11-30 13:11 sparkyx - - * : New : install, check the version and patch the db if necessary - -2003-11-20 19:13 sparkyx - - * : Change the name webcompta to PhpCompta - Improve user profile - -2003-11-20 19:10 sparkyx - - * : Unused - -2003-11-20 19:10 sparkyx - - * : Change the name webcompta to PhpCompta - -2003-11-20 19:10 sparkyx - - * : Table which contains the actions for the journal's menu - -2003-11-20 19:06 sparkyx - - * : All the actions for the user profiles will be in those files, - it depends of the "journal" type - -2003-11-20 19:01 sparkyx - - * : change the name webcompta to phpcompta - -2003-11-20 18:58 sparkyx - - * : user_jrn.php is used to collect all the action related to the - journal - -2003-11-20 18:55 sparkyx - - * : Unused files : all user's action are done in user_jrn.php - -2003-11-20 18:51 sparkyx - - * : Change the name webcompta to phpcompta - -2003-11-15 11:44 sparkyx - - * : New Add database template - New Add 'user' type - -2003-11-15 11:27 sparkyx - - * : Adaptation for the user profile - -2003-11-15 11:00 sparkyx - - * : Adaptation for the user profile - -2003-11-15 10:39 sparkyx - - * : Adaptation for user profile - New feature : create database modele - -2003-11-15 10:33 sparkyx - - * : New Feature : add database modele - -2003-11-15 10:31 sparkyx - - * : for different profile, it is added for the user profile - -2003-11-15 10:23 sparkyx - - * : Improve appearance, add the user type - -2003-11-15 10:20 sparkyx - - * : New Feature add database modele - -2003-10-31 17:43 sparkyx - - * : Improve a little bit the doc - -2003-10-24 23:37 sparkyx - - * : Update ChangeLog - -2003-10-24 22:47 sparkyx - - * : For the help tx the mailing list - -2003-10-24 22:44 sparkyx - - * : Fix cosmetic - -2003-10-24 22:43 sparkyx - - * : Theme Elegant - -2003-10-24 22:34 sparkyx - - * : Fix Theme Light - -2003-10-24 22:22 sparkyx - - * : Add light theme - -2003-10-24 22:19 sparkyx - - * : Fix cosmetic bug in theme-Should Verify with IE and Mozilla - -2003-10-24 21:41 sparkyx - - * : Add Theme - -2003-10-19 19:02 sparkyx - - * : update - -2003-10-19 18:59 sparkyx - - * : Add feature : theme - Add theme aqua - Fix bug in centralized printing: need to drop and recreate table - and REcentralize - Improve printing - Add documentation and code cleaning - -2003-10-10 19:18 sparkyx - - * : improve layout for encoding -> compta profile - -2003-10-10 16:30 sparkyx - - * : Improve layout - -2003-10-10 13:34 sparkyx - - * : improve impression of pdf - change layout of encoding and viewing journal - Change the way to ask the period to print - -2003-10-04 18:55 sparkyx - - * : Code cleaning in enc_jrn.php & fix bug in the amount - Fix bug in jrn.php about sessid - -2003-09-26 14:02 sparkyx - - * : remove html/verif.php - add ./makedoc for creating automatically doc - add doc/mod_function header for the functions - New GetUserProperties to get the user profile - -> replace the checkAdmin function - -2003-09-14 15:01 sparkyx - - * : Fix problem with period - -2003-09-07 17:24 sparkyx - - * : When date change the tech periode must also change - -2003-09-07 15:52 sparkyx - - * : Fix bug when not g_jrn is defined - -2003-08-31 18:07 sparkyx - - * : Starting with themes - -2003-08-31 18:04 sparkyx - - * : remove unused file - fix warning in the jrn file - fix bug in jrn table (jr_rapt text) - fix bug in jrn_search problem when checking if a number is valid - Improve the administration repository (user & folder) - -2003-08-17 17:05 sparkyx - - * : Fix filter for amount - -2003-08-16 00:47 sparkyx - - * : Fix the order by date - -2003-08-16 00:47 sparkyx - - * : Remove the new page - -2003-08-16 00:06 sparkyx - - * : Fix problem in the order of GetDataPoste - -2003-08-15 23:40 sparkyx - - * : Fix problem in the search menu - -2003-08-15 21:21 sparkyx - - * : Perform printing : avoid empty account - -2003-08-15 20:15 sparkyx - - * : remove unused file - fix warning in the jrn file - fix bug in jrn table (jr_rapt text) - fix bug in jrn_search problem when checking if a number is valid - -2003-07-31 15:30 sparkyx - - * : First release - -2003-07-31 15:19 sparkyx - - * : Import in repository - -2003-07-31 15:19 - - * : New repository initialized by cvs2svn. +2009-10-27 21:46 danydb + + * include/class_icard.php: + Add documentation + +2009-10-27 21:48 danydb + + * include/class_acc_ledger_purchase.php, + include/compta_ach.inc.php: + Autocomplete in Ledger of purchase, still missing : detail and + add card + +2009-10-28 11:08 danydb + + * html/fid_card.php, sql/upgrade.sql: + For the auto complete, we can now seek in the quick_code, in the + name and in the description + the part of string which is found is in bold + Those feature must tested + +2009-10-28 14:34 danydb + + * include/class_acc_ledger_purchase.php, + include/class_acc_ledger_sold.php, include/compta_ach.inc.php, + include/template/form_ledger_detail.php: + * Change the function Acc_Ledger_Purchase::display_form by + Acc_Ledger_Purchase::input + * change the name of form_ledger + +2009-10-28 14:35 danydb + + * include/template/form_ledger_detail.php: + Remove form_ledger_detail.php + +2009-10-28 14:35 danydb + + * include/template/form_ledger_detail.php, + include/template/form_ledger_ven.php: + Rename form_ledger_ven.php to form_ledger_detail.php + +2009-10-28 21:26 danydb + + * html/fid_card.php, html/js/acc_ledger.js, include/action.inc.php, + include/class_acc_ledger_fin.php, + include/class_acc_ledger_sold.php, include/class_action.php, + include/class_icard.php, include/compta_fin.inc.php, + include/template/form_ledger_fin.php, sql/upgrade.sql: + Make the search in description qcode or name + Add ICard autocomplete to : + - Financial ledger + - Gestion : details + +2009-10-28 22:30 danydb + + * include/class_acc_ledger_purchase.php: + ICard autocomplete : add the price + +2009-10-29 13:53 danydb + + * ., html/access.php, html/js/infobulle.js, html/style-light.css, + html/user_login.php: + Merged revisions 2595 via svnmerge from + file:///home/developper/svn/phpcompta/trunk + + ........ + r2595 | danydb | 2009-10-20 20:28:01 +0200 (Tue, 20 Oct 2009) | 5 + lines + + Fix IE7 : cosmetic size of report in access + FIX IE7 : bug with infobulle + Improve infobulle with mouseover and mouseclick + Check browser version and refuse to work if using IE < 7 + ........ + +2009-10-29 13:57 danydb + + * ., html/admin/sql/patch/upgrade58.sql, include/constant.php, + include/keytrade_be.inc.php, sql/upgrade.sql: + Merged revisions + 2461-2465,2467-2470,2472-2476,2478,2480-2487,2496-2500,2503-2505,2509-2514,2516-2525,2527,2529-2540,2542,2544-2557,2560-2568,2570-2594,2596-2609,2611-2626 + via svnmerge from + file:///home/developper/svn/phpcompta/trunk + + ........ + r2624 | danydb | 2009-10-28 22:55:29 +0100 (Wed, 28 Oct 2009) | 2 + lines + + Add a new VMS Keytrade from jch + ........ + +2009-10-31 01:42 danydb + + * contrib/document_test/facture.html, html/js/acc_ledger.js, + html/js/ajax_fiche.js, html/js/card.js, html/js/infobulle.js, + include/class_acc_ledger_fin.php, + include/class_acc_ledger_purchase.php, + include/class_acc_ledger_sold.php, include/class_acc_tva.php, + include/class_document.php, include/class_icard.php, + include/compta_ach.inc.php, include/compta_fin.inc.php, + include/compta_ven.inc.php, + include/template/form_ledger_detail.php, include/user_common.php: + Improve the facture HTML in the contrib + Fix bug in generate invoice + Manual VAT amount in the ledger of sales + Add ICard to Ledger Sales, purchase and fin + Rewrite of javascript for ledger + Ledger purchase use template + Fix prob with infobulle in FIN ledger + Improve ICard and make it work with IE7 and IE8 + Improve support of IE7 and IE8 + +2009-10-31 02:03 danydb + + * html/style-light.css, include/class_acc_ledger_purchase.php, + include/class_acc_ledger_sold.php, include/class_icard.php, + include/template/form_ledger_detail.php: + Add ajax_saldo + Fix bug with amount computing + Improve CSS : input text with 2 px of margin + +2009-10-31 12:17 danydb + + * html/compta.php: + Set redirect if disconnected to 1 sec + +2009-10-31 19:07 danydb + + * html/compta.php, html/js/acc_ledger.js, html/js/scripts.js, + html/test.php, include/ac_common.php, + include/class_acc_ledger.php, include/class_acc_ledger_fin.php, + include/class_acc_ledger_purchase.php, + include/class_acc_ledger_sold.php, include/class_inum.php, + include/class_itext.php, include/class_user.php, + include/compta_ach.inc.php, include/compta_fin.inc.php, + include/compta_ven.inc.php, include/constant.php, + include/user_action_gl.php, include/user_common.php, + include/user_menu.php: + rewrite of the listing of ledger, with a hidden div for the + search + +2009-10-31 19:32 danydb + + * html/js/scripts.js, include/ac_common.php, + include/class_acc_ledger.php: + Add name of ledger into list_operation + +2009-10-31 19:33 danydb + + * html/js/scripts.js, include/template/ledger_search.php: + Add search form for ledger + +2009-10-31 19:39 danydb + + * include/class_acc_ledger.php, include/class_inum.php: + Add documentation for new functions + +2009-11-01 11:44 danydb + + * html/js/scripts.js, html/recherche.php, + include/class_acc_ledger.php, include/compta_ach.inc.php, + include/compta_fin.inc.php, include/compta_ven.inc.php, + include/constant.php, include/user_action_gl.php, + include/user_common.php, include/user_menu.php: + search : + * by default the search is on the default period, + * move openrecherche into scripts + * search ok for list VEN ACH ALL + * rewrite of recherche.php + * deprecated function showMenuRecherche + +2009-11-01 11:54 danydb + + * include/constant.php, sql/upgrade.sql: + Add in attr_def a nr of customer by default + Clean code constant.php + +2009-11-01 13:26 danydb + + * html/js/acc_ledger.js, html/js/compute_direct.js, + html/poste_search.php, include/class_acc_ledger.php, + include/class_icard.php, include/quick_writing.inc.php: + Icard + new search : working for quick_writing + +2009-11-01 13:43 danydb + + * include/quick_writing.inc.php: + remove debug info + +2009-11-01 16:48 danydb + + * html/ajax_get.php, html/js/card.js, html/js/scripts.js, + html/style-light.css, include/class_acc_ledger.php, + include/class_acc_ledger_fin.php, + include/class_acc_ledger_purchase.php, + include/class_acc_ledger_sold.php, include/class_fiche.php, + include/class_ipopup.php, include/compta_ach.inc.php, + include/compta_fin.inc.php, include/compta_ven.inc.php, + include/fiche.inc.php, include/quick_writing.inc.php: + For each ledger it is now possible to see the details of card + when double-clicking on the field + +2009-11-01 17:34 danydb + + * include/class_ipopup.php: + todo : bug IE cannot solved : bad position IPOPUP + +2009-11-01 17:34 danydb + + * html/js/card.js, include/compta_ach.inc.php, + include/compta_fin.inc.php, include/quick_writing.inc.php: + Try to fix problem with IE, IPopup does not WORK !! + +2009-11-01 18:00 danydb + + * include/compta_ach.inc.php, include/compta_fin.inc.php, + include/quick_writing.inc.php: + Fix position IPopup for card + +2009-11-01 18:55 danydb + + * html/js/card.js, include/class_acc_ledger_fin.php, + include/class_acc_ledger_purchase.php: + Fix Problem IE with XML handling; add INum in each ledger + +2009-11-01 21:12 danydb + + * html/style-light.css, include/compta_ach.inc.php, + include/compta_fin.inc.php, include/compta_ven.inc.php, + include/quick_writing.inc.php: + Improve cosmetic + +2009-11-02 16:36 danydb + + * html/ajax_get.php, html/fiche_new.php, + html/fiche_new.php.deprecated, html/js/card.js, + include/class_acc_ledger.php, include/class_acc_ledger_fin.php, + include/class_acc_ledger_purchase.php, + include/class_acc_ledger_sold.php, include/class_fiche.php, + include/class_html_input.php, include/class_ibutton.php, + include/class_icard.php, include/compta_ach.inc.php, + include/compta_fin.inc.php, include/compta_ven.inc.php, + include/quick_writing.inc.php, + include/template/form_ledger_detail.php, + include/template/form_ledger_fin.php: + Add a button for adding card inside a ledger form, there is no + popup window any more for adding a card + +2009-11-03 20:35 danydb + + * ., html/js/bq_import.js: + Merged revisions 2646-2647 via svnmerge from + svn+ssh://danydb@svn/svn/phpcompta/trunk + + ........ + r2646 | danydb | 2009-11-03 14:35:04 +0100 (Tue, 03 Nov 2009) | 1 + line + + Bug : javascript function GetID rename to g + ........ + r2647 | danydb | 2009-11-03 21:21:44 +0100 (Tue, 03 Nov 2009) | 1 + line + + Remove some IE javascript bug + ........ + +2009-11-03 22:27 danydb + + * include/class_icard.php, include/class_ipopup.php, + include/compta_ach.inc.php, include/compta_fin.inc.php, + include/compta_ven.inc.php, include/quick_writing.inc.php: + ICard : add a new static method for creating the IPopup + ICard::ipopup() + +2009-11-03 23:46 danydb + + * html/js/acc_ledger.js: + Change javascript for IE compatibility for adding row in table + +2009-11-04 09:20 danydb + + * html/priv_user.php, html/test.php, include/action.inc.php, + include/anc_pa.inc.php, include/bud_card.inc.php, + include/bud_detail.inc.php, include/bud_hypo.inc.php, + include/class_html_input.php, include/compta_ach.inc.php, + include/compta_fin.inc.php, include/compta_ven.inc.php, + include/contact.inc.php, include/dossier.inc.php, + include/modele.inc.php, include/opening.inc.php, + include/payment_middle.inc.php, include/periode.inc.php, + include/quick_writing.inc.php, include/restore.inc.php, + include/supplier.inc.php: + Rename button_href to button_anchor + +2009-11-04 09:29 danydb + + * .: + Removed merge tracking for "svnmerge" for + file:///home/developper/svn/phpcompta/branches/rel500 diff --git a/addon/class.ezpdf.php b/addon/class.ezpdf.php deleted file mode 100644 index dd5d723e3..000000000 --- a/addon/class.ezpdf.php +++ /dev/null @@ -1,1555 +0,0 @@ -10); // used for storing most of the page configuration parameters -var $y; // this is the current vertical positon on the page of the writing point, very important -var $ezPages=array(); // keep an array of the ids of the pages, making it easy to go back and add page numbers etc. -var $ezPageCount=0; - -// ------------------------------------------------------------------------------ - -function Cezpdf($paper='a4',$orientation='portrait'){ - // Assuming that people don't want to specify the paper size using the absolute coordinates - // allow a couple of options: - // orientation can be 'portrait' or 'landscape' - // or, to actually set the coordinates, then pass an array in as the first parameter. - // the defaults are as shown. - // - // ------------------------- - // 2002-07-24 - Nicola Asuni (info@tecnick.com): - // Added new page formats (45 standard ISO paper formats and 4 american common formats) - // paper cordinates are calculated in this way: (inches * 72) where 1 inch = 2.54 cm - // - // Now you may also pass a 2 values array containing the page width and height in centimeters - // ------------------------- - - if (!is_array($paper)){ - switch (strtoupper($paper)){ - case '4A0': {$size = array(0,0,4767.87,6740.79); break;} - case '2A0': {$size = array(0,0,3370.39,4767.87); break;} - case 'A0': {$size = array(0,0,2383.94,3370.39); break;} - case 'A1': {$size = array(0,0,1683.78,2383.94); break;} - case 'A2': {$size = array(0,0,1190.55,1683.78); break;} - case 'A3': {$size = array(0,0,841.89,1190.55); break;} - case 'A4': default: {$size = array(0,0,595.28,841.89); break;} - case 'A5': {$size = array(0,0,419.53,595.28); break;} - case 'A6': {$size = array(0,0,297.64,419.53); break;} - case 'A7': {$size = array(0,0,209.76,297.64); break;} - case 'A8': {$size = array(0,0,147.40,209.76); break;} - case 'A9': {$size = array(0,0,104.88,147.40); break;} - case 'A10': {$size = array(0,0,73.70,104.88); break;} - case 'B0': {$size = array(0,0,2834.65,4008.19); break;} - case 'B1': {$size = array(0,0,2004.09,2834.65); break;} - case 'B2': {$size = array(0,0,1417.32,2004.09); break;} - case 'B3': {$size = array(0,0,1000.63,1417.32); break;} - case 'B4': {$size = array(0,0,708.66,1000.63); break;} - case 'B5': {$size = array(0,0,498.90,708.66); break;} - case 'B6': {$size = array(0,0,354.33,498.90); break;} - case 'B7': {$size = array(0,0,249.45,354.33); break;} - case 'B8': {$size = array(0,0,175.75,249.45); break;} - case 'B9': {$size = array(0,0,124.72,175.75); break;} - case 'B10': {$size = array(0,0,87.87,124.72); break;} - case 'C0': {$size = array(0,0,2599.37,3676.54); break;} - case 'C1': {$size = array(0,0,1836.85,2599.37); break;} - case 'C2': {$size = array(0,0,1298.27,1836.85); break;} - case 'C3': {$size = array(0,0,918.43,1298.27); break;} - case 'C4': {$size = array(0,0,649.13,918.43); break;} - case 'C5': {$size = array(0,0,459.21,649.13); break;} - case 'C6': {$size = array(0,0,323.15,459.21); break;} - case 'C7': {$size = array(0,0,229.61,323.15); break;} - case 'C8': {$size = array(0,0,161.57,229.61); break;} - case 'C9': {$size = array(0,0,113.39,161.57); break;} - case 'C10': {$size = array(0,0,79.37,113.39); break;} - case 'RA0': {$size = array(0,0,2437.80,3458.27); break;} - case 'RA1': {$size = array(0,0,1729.13,2437.80); break;} - case 'RA2': {$size = array(0,0,1218.90,1729.13); break;} - case 'RA3': {$size = array(0,0,864.57,1218.90); break;} - case 'RA4': {$size = array(0,0,609.45,864.57); break;} - case 'SRA0': {$size = array(0,0,2551.18,3628.35); break;} - case 'SRA1': {$size = array(0,0,1814.17,2551.18); break;} - case 'SRA2': {$size = array(0,0,1275.59,1814.17); break;} - case 'SRA3': {$size = array(0,0,907.09,1275.59); break;} - case 'SRA4': {$size = array(0,0,637.80,907.09); break;} - case 'LETTER': {$size = array(0,0,612.00,792.00); break;} - case 'LEGAL': {$size = array(0,0,612.00,1008.00); break;} - case 'EXECUTIVE': {$size = array(0,0,521.86,756.00); break;} - case 'FOLIO': {$size = array(0,0,612.00,936.00); break;} - } - switch (strtolower($orientation)){ - case 'landscape': - $a=$size[3]; - $size[3]=$size[2]; - $size[2]=$a; - break; - } - } else { - if (count($paper)>2) { - // then an array was sent it to set the size - $size = $paper; - } - else { //size in centimeters has been passed - $size[0] = 0; - $size[1] = 0; - $size[2] = ( $paper[0] / 2.54 ) * 72; - $size[3] = ( $paper[1] / 2.54 ) * 72; - } - } - $this->Cpdf($size); - $this->ez['pageWidth']=$size[2]; - $this->ez['pageHeight']=$size[3]; - - // also set the margins to some reasonable defaults - $this->ez['topMargin']=30; - $this->ez['bottomMargin']=30; - $this->ez['leftMargin']=30; - $this->ez['rightMargin']=30; - - // set the current writing position to the top of the first page - $this->y = $this->ez['pageHeight']-$this->ez['topMargin']; - // and get the ID of the page that was created during the instancing process. - $this->ezPages[1]=$this->getFirstPageId(); - $this->ezPageCount=1; -} - -// ------------------------------------------------------------------------------ -// 2002-07-24: Nicola Asuni (info@tecnick.com) -// Set Margins in centimeters -function ezSetCmMargins($top,$bottom,$left,$right){ - $top = ( $top / 2.54 ) * 72; - $bottom = ( $bottom / 2.54 ) * 72; - $left = ( $left / 2.54 ) * 72; - $right = ( $right / 2.54 ) * 72; - $this->ezSetMargins($top,$bottom,$left,$right); -} -// ------------------------------------------------------------------------------ - - -function ezColumnsStart($options=array()){ - // start from the current y-position, make the set number of columne - if (isset($this->ez['columns']) && $this->ez['columns']==1){ - // if we are already in a column mode then just return. - return; - } - $def=array('gap'=>10,'num'=>2); - foreach($def as $k=>$v){ - if (!isset($options[$k])){ - $options[$k]=$v; - } - } - // setup the columns - $this->ez['columns']=array('on'=>1,'colNum'=>1); - - // store the current margins - $this->ez['columns']['margins']=array( - $this->ez['leftMargin'] - ,$this->ez['rightMargin'] - ,$this->ez['topMargin'] - ,$this->ez['bottomMargin'] - ); - // and store the settings for the columns - $this->ez['columns']['options']=$options; - // then reset the margins to suit the new columns - // safe enough to assume the first column here, but start from the current y-position - $this->ez['topMargin']=$this->ez['pageHeight']-$this->y; - $width=($this->ez['pageWidth']-$this->ez['leftMargin']-$this->ez['rightMargin']-($options['num']-1)*$options['gap'])/$options['num']; - $this->ez['columns']['width']=$width; - $this->ez['rightMargin']=$this->ez['pageWidth']-$this->ez['leftMargin']-$width; - -} -// ------------------------------------------------------------------------------ -function ezColumnsStop(){ - if (isset($this->ez['columns']) && $this->ez['columns']['on']==1){ - $this->ez['columns']['on']=0; - $this->ez['leftMargin']=$this->ez['columns']['margins'][0]; - $this->ez['rightMargin']=$this->ez['columns']['margins'][1]; - $this->ez['topMargin']=$this->ez['columns']['margins'][2]; - $this->ez['bottomMargin']=$this->ez['columns']['margins'][3]; - } -} -// ------------------------------------------------------------------------------ -function ezInsertMode($status=1,$pageNum=1,$pos='before'){ - // puts the document into insert mode. new pages are inserted until this is re-called with status=0 - // by default pages wil be inserted at the start of the document - switch($status){ - case '1': - if (isset($this->ezPages[$pageNum])){ - $this->ez['insertMode']=1; - $this->ez['insertOptions']=array('id'=>$this->ezPages[$pageNum],'pos'=>$pos); - } - break; - case '0': - $this->ez['insertMode']=0; - break; - } -} -// ------------------------------------------------------------------------------ - -function ezNewPage(){ - $pageRequired=1; - if (isset($this->ez['columns']) && $this->ez['columns']['on']==1){ - // check if this is just going to a new column - // increment the column number -//echo 'HERE
'; - $this->ez['columns']['colNum']++; -//echo $this->ez['columns']['colNum'].'
'; - if ($this->ez['columns']['colNum'] <= $this->ez['columns']['options']['num']){ - // then just reset to the top of the next column - $pageRequired=0; - } else { - $this->ez['columns']['colNum']=1; - $this->ez['topMargin']=$this->ez['columns']['margins'][2]; - } - - $width = $this->ez['columns']['width']; - $this->ez['leftMargin']=$this->ez['columns']['margins'][0]+($this->ez['columns']['colNum']-1)*($this->ez['columns']['options']['gap']+$width); - $this->ez['rightMargin']=$this->ez['pageWidth']-$this->ez['leftMargin']-$width; - } -//echo 'left='.$this->ez['leftMargin'].' right='.$this->ez['rightMargin'].'
'; - - if ($pageRequired){ - // make a new page, setting the writing point back to the top - $this->y = $this->ez['pageHeight']-$this->ez['topMargin']; - // make the new page with a call to the basic class. - $this->ezPageCount++; - if (isset($this->ez['insertMode']) && $this->ez['insertMode']==1){ - $id = $this->ezPages[$this->ezPageCount] = $this->newPage(1,$this->ez['insertOptions']['id'],$this->ez['insertOptions']['pos']); - // then manipulate the insert options so that inserted pages follow each other - $this->ez['insertOptions']['id']=$id; - $this->ez['insertOptions']['pos']='after'; - } else { - $this->ezPages[$this->ezPageCount] = $this->newPage(); - } - } else { - $this->y = $this->ez['pageHeight']-$this->ez['topMargin']; - } -} - -// ------------------------------------------------------------------------------ - -function ezSetMargins($top,$bottom,$left,$right){ - // sets the margins to new values - $this->ez['topMargin']=$top; - $this->ez['bottomMargin']=$bottom; - $this->ez['leftMargin']=$left; - $this->ez['rightMargin']=$right; - // check to see if this means that the current writing position is outside the - // writable area - if ($this->y > $this->ez['pageHeight']-$top){ - // then move y down - $this->y = $this->ez['pageHeight']-$top; - } - if ( $this->y < $bottom){ - // then make a new page - $this->ezNewPage(); - } -} - -// ------------------------------------------------------------------------------ - -function ezGetCurrentPageNumber(){ - // return the strict numbering (1,2,3,4..) number of the current page - return $this->ezPageCount; -} - -// ------------------------------------------------------------------------------ - -function ezStartPageNumbers($x,$y,$size,$pos='left',$pattern='{PAGENUM} of {TOTALPAGENUM}',$num=''){ - // put page numbers on the pages from here. - // place then on the 'pos' side of the coordinates (x,y). - // pos can be 'left' or 'right' - // use the given 'pattern' for display, where (PAGENUM} and {TOTALPAGENUM} are replaced - // as required. - // if $num is set, then make the first page this number, the number of total pages will - // be adjusted to account for this. - // Adjust this function so that each time you 'start' page numbers then you effectively start a different batch - // return the number of the batch, so that they can be stopped in a different order if required. - if (!$pos || !strlen($pos)){ - $pos='left'; - } - if (!$pattern || !strlen($pattern)){ - $pattern='{PAGENUM} of {TOTALPAGENUM}'; - } - if (!isset($this->ez['pageNumbering'])){ - $this->ez['pageNumbering']=array(); - } - $i = count($this->ez['pageNumbering']); - $this->ez['pageNumbering'][$i][$this->ezPageCount]=array('x'=>$x,'y'=>$y,'pos'=>$pos,'pattern'=>$pattern,'num'=>$num,'size'=>$size); - return $i; -} - -// ------------------------------------------------------------------------------ - -function ezWhatPageNumber($pageNum,$i=0){ - // given a particular generic page number (ie, document numbered sequentially from beginning), - // return the page number under a particular page numbering scheme ($i) - $num=0; - $start=1; - $startNum=1; - if (!isset($this->ez['pageNumbering'])) - { - $this->addMessage('WARNING: page numbering called for and wasn\'t started with ezStartPageNumbers'); - return 0; - } - foreach($this->ez['pageNumbering'][$i] as $k=>$v){ - if ($k<=$pageNum){ - if (is_array($v)){ - // start block - if (strlen($v['num'])){ - // a start was specified - $start=$v['num']; - $startNum=$k; - $num=$pageNum-$startNum+$start; - } - } else { - // stop block - $num=0; - } - } - } - return $num; -} - -// ------------------------------------------------------------------------------ - -function ezStopPageNumbers($stopTotal=0,$next=0,$i=0){ - // if stopTotal=1 then the totalling of pages for this number will stop too - // if $next=1, then do this page, but not the next, else do not do this page either - // if $i is set, then stop that particular pagenumbering sequence. - if (!isset($this->ez['pageNumbering'])){ - $this->ez['pageNumbering']=array(); - } - if ($next && isset($this->ez['pageNumbering'][$i][$this->ezPageCount]) && is_array($this->ez['pageNumbering'][$i][$this->ezPageCount])){ - // then this has only just been started, this will over-write the start, and nothing will appear - // add a special command to the start block, telling it to stop as well - if ($stopTotal){ - $this->ez['pageNumbering'][$i][$this->ezPageCount]['stoptn']=1; - } else { - $this->ez['pageNumbering'][$i][$this->ezPageCount]['stopn']=1; - } - } else { - if ($stopTotal){ - $this->ez['pageNumbering'][$i][$this->ezPageCount]='stopt'; - } else { - $this->ez['pageNumbering'][$i][$this->ezPageCount]='stop'; - } - if ($next){ - $this->ez['pageNumbering'][$i][$this->ezPageCount].='n'; - } - } -} - -// ------------------------------------------------------------------------------ - -function ezPRVTpageNumberSearch($lbl,&$tmp){ - foreach($tmp as $i=>$v){ - if (is_array($v)){ - if (isset($v[$lbl])){ - return $i; - } - } else { - if ($v==$lbl){ - return $i; - } - } - } - return 0; -} - -// ------------------------------------------------------------------------------ - -function ezPRVTaddPageNumbers(){ - // this will go through the pageNumbering array and add the page numbers are required - if (isset($this->ez['pageNumbering'])){ - $totalPages1 = $this->ezPageCount; - $tmp1=$this->ez['pageNumbering']; - $status=0; - foreach($tmp1 as $i=>$tmp){ - // do each of the page numbering systems - // firstly, find the total pages for this one - $k = $this->ezPRVTpageNumberSearch('stopt',$tmp); - if ($k && $k>0){ - $totalPages = $k-1; - } else { - $l = $this->ezPRVTpageNumberSearch('stoptn',$tmp); - if ($l && $l>0){ - $totalPages = $l; - } else { - $totalPages = $totalPages1; - } - } - foreach ($this->ezPages as $pageNum=>$id){ - if (isset($tmp[$pageNum])){ - if (is_array($tmp[$pageNum])){ - // then this must be starting page numbers - $status=1; - $info = $tmp[$pageNum]; - $info['dnum']=$info['num']-$pageNum; - // also check for the special case of the numbering stopping and starting on the same page - if (isset($info['stopn']) || isset($info['stoptn']) ){ - $status=2; - } - } else if ($tmp[$pageNum]=='stop' || $tmp[$pageNum]=='stopt'){ - // then we are stopping page numbers - $status=0; - } else if ($status==1 && ($tmp[$pageNum]=='stoptn' || $tmp[$pageNum]=='stopn')){ - // then we are stopping page numbers - $status=2; - } - } - if ($status){ - // then add the page numbering to this page - if (strlen($info['num'])){ - $num=$pageNum+$info['dnum']; - } else { - $num=$pageNum; - } - $total = $totalPages+$num-$pageNum; - $pat = str_replace('{PAGENUM}',$num,$info['pattern']); - $pat = str_replace('{TOTALPAGENUM}',$total,$pat); - $this->reopenObject($id); - switch($info['pos']){ - case 'right': - $this->addText($info['x'],$info['y'],$info['size'],$pat); - break; - default: - $w=$this->getTextWidth($info['size'],$pat); - $this->addText($info['x']-$w,$info['y'],$info['size'],$pat); - break; - } - $this->closeObject(); - } - if ($status==2){ - $status=0; - } - } - } - } -} - -// ------------------------------------------------------------------------------ - -function ezPRVTcleanUp(){ - $this->ezPRVTaddPageNumbers(); -} - -// ------------------------------------------------------------------------------ - -function ezStream($options=''){ - $this->ezPRVTcleanUp(); - $this->stream($options); -} - -// ------------------------------------------------------------------------------ - -function ezOutput($options=0){ - $this->ezPRVTcleanUp(); - return $this->output($options); -} - -// ------------------------------------------------------------------------------ - -function ezSetY($y){ - // used to change the vertical position of the writing point. - $this->y = $y; - if ( $this->y < $this->ez['bottomMargin']){ - // then make a new page - $this->ezNewPage(); - } -} - -// ------------------------------------------------------------------------------ - -function ezSetDy($dy,$mod=''){ - // used to change the vertical position of the writing point. - // changes up by a positive increment, so enter a negative number to go - // down the page - // if $mod is set to 'makeSpace' and a new page is forced, then the pointed will be moved - // down on the new page, this will allow space to be reserved for graphics etc. - $this->y += $dy; - if ( $this->y < $this->ez['bottomMargin']){ - // then make a new page - $this->ezNewPage(); - if ($mod=='makeSpace'){ - $this->y += $dy; - } - } -} - -// ------------------------------------------------------------------------------ - -function ezPrvtTableDrawLines($pos,$gap,$x0,$x1,$y0,$y1,$y2,$col,$inner,$outer,$opt=1){ - $x0=1000; - $x1=0; - $this->setStrokeColor($col[0],$col[1],$col[2]); - $cnt=0; - $n = count($pos); - foreach($pos as $x){ - $cnt++; - if ($cnt==1 || $cnt==$n){ - $this->setLineStyle($outer); - } else { - $this->setLineStyle($inner); - } - $this->line($x-$gap/2,$y0,$x-$gap/2,$y2); - if ($x>$x1){ $x1=$x; }; - if ($x<$x0){ $x0=$x; }; - } - $this->setLineStyle($outer); - $this->line($x0-$gap/2-$outer/2,$y0,$x1-$gap/2+$outer/2,$y0); - // only do the second line if it is different to the first, AND each row does not have - // a line on it. - if ($y0!=$y1 && $opt<2){ - $this->line($x0-$gap/2,$y1,$x1-$gap/2,$y1); - } - $this->line($x0-$gap/2-$outer/2,$y2,$x1-$gap/2+$outer/2,$y2); -} - -// ------------------------------------------------------------------------------ - -function ezPrvtTableColumnHeadings($cols,$pos,$maxWidth,$height,$decender,$gap,$size,&$y,$optionsAll=array()){ - // uses ezText to add the text, and returns the height taken by the largest heading - // this page will move the headings to a new page if they will not fit completely on this one - // transaction support will be used to implement this - - if (isset($optionsAll['cols'])){ - $options = $optionsAll['cols']; - } else { - $options = array(); - } - - $mx=0; - $startPage = $this->ezPageCount; - $secondGo=0; - - // $y is the position at which the top of the table should start, so the base - // of the first text, is $y-$height-$gap-$decender, but ezText starts by dropping $height - - // the return from this function is the total cell height, including gaps, and $y is adjusted - // to be the postion of the bottom line - - // begin the transaction - $this->transaction('start'); - $ok=0; -// $y-=$gap-$decender; - $y-=$gap; - while ($ok==0){ - foreach($cols as $colName=>$colHeading){ - $this->ezSetY($y); - if (isset($options[$colName]) && isset($options[$colName]['justification'])){ - $justification = $options[$colName]['justification']; - } else { - $justification = 'left'; - } - $this->ezText($colHeading,$size,array('aleft'=> $pos[$colName],'aright'=>($maxWidth[$colName]+$pos[$colName]),'justification'=>$justification)); - $dy = $y-$this->y; - if ($dy>$mx){ - $mx=$dy; - } - } - $y = $y - $mx - $gap + $decender; -// $y -= $mx-$gap+$decender; - - // now, if this has moved to a new page, then abort the transaction, move to a new page, and put it there - // do not check on the second time around, to avoid an infinite loop - if ($this->ezPageCount != $startPage && $secondGo==0){ - $this->transaction('rewind'); - $this->ezNewPage(); - $y = $this->y - $gap-$decender; - $ok=0; - $secondGo=1; -// $y = $store_y; - $mx=0; - - } else { - $this->transaction('commit'); - $ok=1; - } - } - - return $mx+$gap*2-$decender; -} - -// ------------------------------------------------------------------------------ - -function ezPrvtGetTextWidth($size,$text){ - // will calculate the maximum width, taking into account that the text may be broken - // by line breaks. - $mx=0; - $lines = explode("\n",$text); - foreach ($lines as $line){ - $w = $this->getTextWidth($size,$line); - if ($w>$mx){ - $mx=$w; - } - } - return $mx; -} - -// ------------------------------------------------------------------------------ - -function ezTable(&$data,$cols='',$title='',$options=''){ - // add a table of information to the pdf document - // $data is a two dimensional array - // $cols (optional) is an associative array, the keys are the names of the columns from $data - // to be presented (and in that order), the values are the titles to be given to the columns - // $title (optional) is the title to be put on the top of the table - // - // $options is an associative array which can contain: - // 'showLines'=> 0,1,2, default is 1 (show outside and top lines only), 2=> lines on each row - // 'showHeadings' => 0 or 1 - // 'shaded'=> 0,1,2,3 default is 1 (1->alternate lines are shaded, 0->no shading, 2-> both shaded, second uses shadeCol2) - // 'shadeCol' => (r,g,b) array, defining the colour of the shading, default is (0.8,0.8,0.8) - // 'shadeCol2' => (r,g,b) array, defining the colour of the shading of the other blocks, default is (0.7,0.7,0.7) - // 'fontSize' => 10 - // 'textCol' => (r,g,b) array, text colour - // 'titleFontSize' => 12 - // 'rowGap' => 2 , the space added at the top and bottom of each row, between the text and the lines - // 'colGap' => 5 , the space on the left and right sides of each cell - // 'lineCol' => (r,g,b) array, defining the colour of the lines, default, black. - // 'xPos' => 'left','right','center','centre',or coordinate, reference coordinate in the x-direction - // 'xOrientation' => 'left','right','center','centre', position of the table w.r.t 'xPos' - // 'width'=> which will specify the width of the table, if it turns out to not be this - // wide, then it will stretch the table to fit, if it is wider then each cell will be made - // proportionalty smaller, and the content may have to wrap. - // 'maxWidth'=> similar to 'width', but will only make table smaller than it wants to be - // 'options' => array(=>array('justification'=>'left','width'=>100,'link'=>linkDataName),=>....) - // allow the setting of other paramaters for the individual columns - // 'minRowSpace'=> the minimum space between the bottom of each row and the bottom margin, in which a new row will be started - // if it is less, then a new page would be started, default=-100 - // 'innerLineThickness'=>1 - // 'outerLineThickness'=>1 - // 'splitRows'=>0, 0 or 1, whether or not to allow the rows to be split across page boundaries - // 'protectRows'=>number, the number of rows to hold with the heading on page, ie, if there less than this number of - // rows on the page, then move the whole lot onto the next page, default=1 - // - // note that the user will have had to make a font selection already or this will not - // produce a valid pdf file. - - if (!is_array($data)){ - return; - } - - if (!is_array($cols)){ - // take the columns from the first row of the data set - reset($data); - list($k,$v)=each($data); - if (!is_array($v)){ - return; - } - $cols=array(); - foreach($v as $k1=>$v1){ - $cols[$k1]=$k1; - } - } - - if (!is_array($options)){ - $options=array(); - } - - $defaults = array( - 'shaded'=>1,'showLines'=>1,'shadeCol'=>array(0.8,0.8,0.8),'shadeCol2'=>array(0.7,0.7,0.7),'fontSize'=>10,'titleFontSize'=>12 - ,'titleGap'=>5,'lineCol'=>array(0,0,0),'gap'=>5,'xPos'=>'centre','xOrientation'=>'centre' - ,'showHeadings'=>1,'textCol'=>array(0,0,0),'width'=>0,'maxWidth'=>0,'cols'=>array(),'minRowSpace'=>-100,'rowGap'=>2,'colGap'=>5 - ,'innerLineThickness'=>1,'outerLineThickness'=>1,'splitRows'=>0,'protectRows'=>1 - ); - - foreach($defaults as $key=>$value){ - if (is_array($value)){ - if (!isset($options[$key]) || !is_array($options[$key])){ - $options[$key]=$value; - } - } else { - if (!isset($options[$key])){ - $options[$key]=$value; - } - } - } - $options['gap']=2*$options['colGap']; - - $middle = ($this->ez['pageWidth']-$this->ez['rightMargin'])/2+($this->ez['leftMargin'])/2; - // figure out the maximum widths of the text within each column - $maxWidth=array(); - foreach($cols as $colName=>$colHeading){ - $maxWidth[$colName]=0; - } - // find the maximum cell widths based on the data - foreach($data as $row){ - foreach($cols as $colName=>$colHeading){ - $w = $this->ezPrvtGetTextWidth($options['fontSize'],(string)$row[$colName])*1.01; - if ($w > $maxWidth[$colName]){ - $maxWidth[$colName]=$w; - } - } - } - // and the maximum widths to fit in the headings - foreach($cols as $colName=>$colTitle){ - $w = $this->ezPrvtGetTextWidth($options['fontSize'],(string)$colTitle)*1.01; - if ($w > $maxWidth[$colName]){ - $maxWidth[$colName]=$w; - } - } - - // calculate the start positions of each of the columns - $pos=array(); - $x=0; - $t=$x; - $adjustmentWidth=0; - $setWidth=0; - foreach($maxWidth as $colName => $w){ - $pos[$colName]=$t; - // if the column width has been specified then set that here, also total the - // width avaliable for adjustment - if (isset($options['cols'][$colName]) && isset($options['cols'][$colName]['width']) && $options['cols'][$colName]['width']>0){ - $t=$t+$options['cols'][$colName]['width']; - $maxWidth[$colName] = $options['cols'][$colName]['width']-$options['gap']; - $setWidth += $options['cols'][$colName]['width']; - } else { - $t=$t+$w+$options['gap']; - $adjustmentWidth += $w; - $setWidth += $options['gap']; - } - } - $pos['_end_']=$t; - - // if maxWidth is specified, and the table is too wide, and the width has not been set, - // then set the width. - if ($options['width']==0 && $options['maxWidth'] && ($t-$x)>$options['maxWidth']){ - // then need to make this one smaller - $options['width']=$options['maxWidth']; - } - - if ($options['width'] && $adjustmentWidth>0 && $setWidth<$options['width']){ - // first find the current widths of the columns involved in this mystery - $cols0 = array(); - $cols1 = array(); - $xq=0; - $presentWidth=0; - $last=''; - foreach($pos as $colName=>$p){ - if (!isset($options['cols'][$last]) || !isset($options['cols'][$last]['width']) || $options['cols'][$last]['width']<=0){ - if (strlen($last)){ - $cols0[$last]=$p-$xq -$options['gap']; - $presentWidth += ($p-$xq - $options['gap']); - } - } else { - $cols1[$last]=$p-$xq; - } - $last=$colName; - $xq=$p; - } - // $cols0 contains the widths of all the columns which are not set - $neededWidth = $options['width']-$setWidth; - // if needed width is negative then add it equally to each column, else get more tricky - if ($presentWidth<$neededWidth){ - foreach($cols0 as $colName=>$w){ - $cols0[$colName]+= ($neededWidth-$presentWidth)/count($cols0); - } - } else { - - $cnt=0; - while ($presentWidth>$neededWidth && $cnt<100){ - $cnt++; // insurance policy - // find the widest columns, and the next to widest width - $aWidest = array(); - $nWidest=0; - $widest=0; - foreach($cols0 as $colName=>$w){ - if ($w>$widest){ - $aWidest=array($colName); - $nWidest = $widest; - $widest=$w; - } else if ($w==$widest){ - $aWidest[]=$colName; - } - } - // then figure out what the width of the widest columns would have to be to take up all the slack - $newWidestWidth = $widest - ($presentWidth-$neededWidth)/count($aWidest); - if ($newWidestWidth > $nWidest){ - // then there is space to set them to this - foreach($aWidest as $colName){ - $cols0[$colName] = $newWidestWidth; - } - $presentWidth=$neededWidth; - } else { - // there is not space, reduce the size of the widest ones down to the next size down, and we - // will go round again - foreach($aWidest as $colName){ - $cols0[$colName] = $nWidest; - } - $presentWidth=$presentWidth-($widest-$nWidest)*count($aWidest); - } - } - } - // $cols0 now contains the new widths of the constrained columns. - // now need to update the $pos and $maxWidth arrays - $xq=0; - foreach($pos as $colName=>$p){ - $pos[$colName]=$xq; - if (!isset($options['cols'][$colName]) || !isset($options['cols'][$colName]['width']) || $options['cols'][$colName]['width']<=0){ - if (isset($cols0[$colName])){ - $xq += $cols0[$colName] + $options['gap']; - $maxWidth[$colName]=$cols0[$colName]; - } - } else { - if (isset($cols1[$colName])){ - $xq += $cols1[$colName]; - } - } - } - - $t=$x+$options['width']; - $pos['_end_']=$t; - } - - // now adjust the table to the correct location across the page - switch ($options['xPos']){ - case 'left': - $xref = $this->ez['leftMargin']; - break; - case 'right': - $xref = $this->ez['pageWidth'] - $this->ez['rightMargin']; - break; - case 'centre': - case 'center': - $xref = $middle; - break; - default: - $xref = $options['xPos']; - break; - } - switch ($options['xOrientation']){ - case 'left': - $dx = $xref-$t; - break; - case 'right': - $dx = $xref; - break; - case 'centre': - case 'center': - $dx = $xref-$t/2; - break; - } - - - foreach($pos as $k=>$v){ - $pos[$k]=$v+$dx; - } - $x0=$x+$dx; - $x1=$t+$dx; - - $baseLeftMargin = $this->ez['leftMargin']; - $basePos = $pos; - $baseX0 = $x0; - $baseX1 = $x1; - - // ok, just about ready to make me a table - $this->setColor($options['textCol'][0],$options['textCol'][1],$options['textCol'][2]); - $this->setStrokeColor($options['shadeCol'][0],$options['shadeCol'][1],$options['shadeCol'][2]); - - $middle = ($x1+$x0)/2; - - // start a transaction which will be used to regress the table, if there are not enough rows protected - if ($options['protectRows']>0){ - $this->transaction('start'); - $movedOnce=0; - } - $abortTable = 1; - while ($abortTable){ - $abortTable=0; - - $dm = $this->ez['leftMargin']-$baseLeftMargin; - foreach($basePos as $k=>$v){ - $pos[$k]=$v+$dm; - } - $x0=$baseX0+$dm; - $x1=$baseX1+$dm; - $middle = ($x1+$x0)/2; - - - // if the title is set, then do that - if (strlen($title)){ - $w = $this->getTextWidth($options['titleFontSize'],$title); - $this->y -= $this->getFontHeight($options['titleFontSize']); - if ($this->y < $this->ez['bottomMargin']){ - $this->ezNewPage(); - // margins may have changed on the newpage - $dm = $this->ez['leftMargin']-$baseLeftMargin; - foreach($basePos as $k=>$v){ - $pos[$k]=$v+$dm; - } - $x0=$baseX0+$dm; - $x1=$baseX1+$dm; - $middle = ($x1+$x0)/2; - $this->y -= $this->getFontHeight($options['titleFontSize']); - } - $this->addText($middle-$w/2,$this->y,$options['titleFontSize'],$title); - $this->y -= $options['titleGap']; - } - - // margins may have changed on the newpage - $dm = $this->ez['leftMargin']-$baseLeftMargin; - foreach($basePos as $k=>$v){ - $pos[$k]=$v+$dm; - } - $x0=$baseX0+$dm; - $x1=$baseX1+$dm; - - $y=$this->y; // to simplify the code a bit - - // make the table - $height = $this->getFontHeight($options['fontSize']); - $decender = $this->getFontDecender($options['fontSize']); - - - - $y0=$y+$decender; - $dy=0; - if ($options['showHeadings']){ - // this function will move the start of the table to a new page if it does not fit on this one - $headingHeight = $this->ezPrvtTableColumnHeadings($cols,$pos,$maxWidth,$height,$decender,$options['rowGap'],$options['fontSize'],$y,$options); - $y0 = $y+$headingHeight; - $y1 = $y; - - - $dm = $this->ez['leftMargin']-$baseLeftMargin; - foreach($basePos as $k=>$v){ - $pos[$k]=$v+$dm; - } - $x0=$baseX0+$dm; - $x1=$baseX1+$dm; - - } else { - $y1 = $y0; - } - $firstLine=1; - - - // open an object here so that the text can be put in over the shading - if ($options['shaded']){ - $this->saveState(); - $textObjectId = $this->openObject(); - $this->closeObject(); - $this->addObject($textObjectId); - $this->reopenObject($textObjectId); - } - - $cnt=0; - $newPage=0; - foreach($data as $row){ - $cnt++; - // the transaction support will be used to prevent rows being split - if ($options['splitRows']==0){ - $pageStart = $this->ezPageCount; - if (isset($this->ez['columns']) && $this->ez['columns']['on']==1){ - $columnStart = $this->ez['columns']['colNum']; - } - $this->transaction('start'); - $row_orig = $row; - $y_orig = $y; - $y0_orig = $y0; - $y1_orig = $y1; - } - $ok=0; - $secondTurn=0; - while(!$abortTable && $ok == 0){ - - $mx=0; - $newRow=1; - while(!$abortTable && ($newPage || $newRow)){ - - $y-=$height; - if ($newPage || $y<$this->ez['bottomMargin'] || (isset($options['minRowSpace']) && $y<($this->ez['bottomMargin']+$options['minRowSpace'])) ){ - // check that enough rows are with the heading - if ($options['protectRows']>0 && $movedOnce==0 && $cnt<=$options['protectRows']){ - // then we need to move the whole table onto the next page - $movedOnce = 1; - $abortTable = 1; - } - - $y2=$y-$mx+2*$height+$decender-$newRow*$height; - if ($options['showLines']){ - if (!$options['showHeadings']){ - $y0=$y1; - } - $this->ezPrvtTableDrawLines($pos,$options['gap'],$x0,$x1,$y0,$y1,$y2,$options['lineCol'],$options['innerLineThickness'],$options['outerLineThickness'],$options['showLines']); - } - if ($options['shaded']){ - $this->closeObject(); - $this->restoreState(); - } - $this->ezNewPage(); - // and the margins may have changed, this is due to the possibility of the columns being turned on - // as the columns are managed by manipulating the margins - - $dm = $this->ez['leftMargin']-$baseLeftMargin; - foreach($basePos as $k=>$v){ - $pos[$k]=$v+$dm; - } -// $x0=$x0+$dm; -// $x1=$x1+$dm; - $x0=$baseX0+$dm; - $x1=$baseX1+$dm; - - if ($options['shaded']){ - $this->saveState(); - $textObjectId = $this->openObject(); - $this->closeObject(); - $this->addObject($textObjectId); - $this->reopenObject($textObjectId); - } - $this->setColor($options['textCol'][0],$options['textCol'][1],$options['textCol'][2],1); - $y = $this->ez['pageHeight']-$this->ez['topMargin']; - $y0=$y+$decender; - $mx=0; - if ($options['showHeadings']){ - $this->ezPrvtTableColumnHeadings($cols,$pos,$maxWidth,$height,$decender,$options['rowGap'],$options['fontSize'],$y,$options); - $y1=$y; - } else { - $y1=$y0; - } - $firstLine=1; - $y -= $height; - } - $newRow=0; - // write the actual data - // if these cells need to be split over a page, then $newPage will be set, and the remaining - // text will be placed in $leftOvers - $newPage=0; - $leftOvers=array(); - - foreach($cols as $colName=>$colTitle){ - $this->ezSetY($y+$height); - $colNewPage=0; - if (isset($row[$colName])){ - if (isset($options['cols'][$colName]) && isset($options['cols'][$colName]['link']) && strlen($options['cols'][$colName]['link'])){ - - $lines = explode("\n",$row[$colName]); - if (isset($row[$options['cols'][$colName]['link']]) && strlen($row[$options['cols'][$colName]['link']])){ - foreach($lines as $k=>$v){ - $lines[$k]=''.$v.''; - } - } - } else { - $lines = explode("\n",$row[$colName]); - } - } else { - $lines = array(); - } - $this->y -= $options['rowGap']; - foreach ($lines as $line){ - $line = $this->ezProcessText($line); - $start=1; - - while (strlen($line) || $start){ - $start=0; - if (!$colNewPage){ - $this->y=$this->y-$height; - } - if ($this->y < $this->ez['bottomMargin']){ - // $this->ezNewPage(); - $newPage=1; // whether a new page is required for any of the columns - $colNewPage=1; // whether a new page is required for this column - } - if ($colNewPage){ - if (isset($leftOvers[$colName])){ - $leftOvers[$colName].="\n".$line; - } else { - $leftOvers[$colName] = $line; - } - $line=''; - } else { - if (isset($options['cols'][$colName]) && isset($options['cols'][$colName]['justification']) ){ - $just = $options['cols'][$colName]['justification']; - } else { - $just='left'; - } - - $line=$this->addTextWrap($pos[$colName],$this->y,$maxWidth[$colName],$options['fontSize'],$line,$just); - } - } - } - - $dy=$y+$height-$this->y+$options['rowGap']; - if ($dy-$height*$newPage>$mx){ - $mx=$dy-$height*$newPage; - } - } - // set $row to $leftOvers so that they will be processed onto the new page - $row = $leftOvers; - // now add the shading underneath - if ($options['shaded'] && $cnt%2==0){ - $this->closeObject(); - $this->setColor($options['shadeCol'][0],$options['shadeCol'][1],$options['shadeCol'][2],1); - $this->filledRectangle($x0-$options['gap']/2,$y+$decender+$height-$mx,$x1-$x0,$mx); - $this->reopenObject($textObjectId); - } - - if ($options['shaded']==2 && $cnt%2==1){ - $this->closeObject(); - $this->setColor($options['shadeCol2'][0],$options['shadeCol2'][1],$options['shadeCol2'][2],1); - $this->filledRectangle($x0-$options['gap']/2,$y+$decender+$height-$mx,$x1-$x0,$mx); - $this->reopenObject($textObjectId); - } - - if ($options['showLines']>1){ - // then draw a line on the top of each block -// $this->closeObject(); - $this->saveState(); - $this->setStrokeColor($options['lineCol'][0],$options['lineCol'][1],$options['lineCol'][2],1); -// $this->line($x0-$options['gap']/2,$y+$decender+$height-$mx,$x1-$x0,$mx); - if ($firstLine){ - $this->setLineStyle($options['outerLineThickness']); - $firstLine=0; - } else { - $this->setLineStyle($options['innerLineThickness']); - } - $this->line($x0-$options['gap']/2,$y+$decender+$height,$x1-$options['gap']/2,$y+$decender+$height); - $this->restoreState(); -// $this->reopenObject($textObjectId); - } - } // end of while - $y=$y-$mx+$height; - - // checking row split over pages - if ($options['splitRows']==0){ - if ( ( ($this->ezPageCount != $pageStart) || (isset($this->ez['columns']) && $this->ez['columns']['on']==1 && $columnStart != $this->ez['columns']['colNum'] )) && $secondTurn==0){ - // then we need to go back and try that again ! - $newPage=1; - $secondTurn=1; - $this->transaction('rewind'); - $row = $row_orig; - $y = $y_orig; - $y0 = $y0_orig; - $y1 = $y1_orig; - $ok=0; - - $dm = $this->ez['leftMargin']-$baseLeftMargin; - foreach($basePos as $k=>$v){ - $pos[$k]=$v+$dm; - } - $x0=$baseX0+$dm; - $x1=$baseX1+$dm; - - } else { - $this->transaction('commit'); - $ok=1; - } - } else { - $ok=1; // don't go round the loop if splitting rows is allowed - } - - } // end of while to check for row splitting - if ($abortTable){ - if ($ok==0){ - $this->transaction('abort'); - } - // only the outer transaction should be operational - $this->transaction('rewind'); - $this->ezNewPage(); - break; - } - - } // end of foreach ($data as $row) - - } // end of while ($abortTable) - - // table has been put on the page, the rows guarded as required, commit. - $this->transaction('commit'); - - $y2=$y+$decender; - if ($options['showLines']){ - if (!$options['showHeadings']){ - $y0=$y1; - } - $this->ezPrvtTableDrawLines($pos,$options['gap'],$x0,$x1,$y0,$y1,$y2,$options['lineCol'],$options['innerLineThickness'],$options['outerLineThickness'],$options['showLines']); - } - - // close the object for drawing the text on top - if ($options['shaded']){ - $this->closeObject(); - $this->restoreState(); - } - - $this->y=$y; - return $y; -} - -// ------------------------------------------------------------------------------ -function ezProcessText($text){ - // this function will intially be used to implement underlining support, but could be used for a range of other - // purposes - $search = array('','','',''); - $replace = array('','','',''); - return str_replace($search,$replace,$text); -} - -// ------------------------------------------------------------------------------ - -function ezText($text,$size=0,$options=array(),$test=0){ - // this will add a string of text to the document, starting at the current drawing - // position. - // it will wrap to keep within the margins, including optional offsets from the left - // and the right, if $size is not specified, then it will be the last one used, or - // the default value (12 I think). - // the text will go to the start of the next line when a return code "\n" is found. - // possible options are: - // 'left'=> number, gap to leave from the left margin - // 'right'=> number, gap to leave from the right margin - // 'aleft'=> number, absolute left position (overrides 'left') - // 'aright'=> number, absolute right position (overrides 'right') - // 'justification' => 'left','right','center','centre','full' - - // only set one of the next two items (leading overrides spacing) - // 'leading' => number, defines the total height taken by the line, independent of the font height. - // 'spacing' => a real number, though usually set to one of 1, 1.5, 2 (line spacing as used in word processing) - - // if $test is set then this should just check if the text is going to flow onto a new page or not, returning true or false - - // apply the filtering which will make the underlining function. - $text = $this->ezProcessText($text); - - $newPage=false; - $store_y = $this->y; - - if (is_array($options) && isset($options['aleft'])){ - $left=$options['aleft']; - } else { - $left = $this->ez['leftMargin'] + ((is_array($options) && isset($options['left']))?$options['left']:0); - } - if (is_array($options) && isset($options['aright'])){ - $right=$options['aright']; - } else { - $right = $this->ez['pageWidth'] - $this->ez['rightMargin'] - ((is_array($options) && isset($options['right']))?$options['right']:0); - } - if ($size<=0){ - $size = $this->ez['fontSize']; - } else { - $this->ez['fontSize']=$size; - } - - if (is_array($options) && isset($options['justification'])){ - $just = $options['justification']; - } else { - $just = 'left'; - } - - // modifications to give leading and spacing based on those given by Craig Heydenburg 1/1/02 - if (is_array($options) && isset($options['leading'])) { ## use leading instead of spacing - $height = $options['leading']; - } else if (is_array($options) && isset($options['spacing'])) { - $height = $this->getFontHeight($size) * $options['spacing']; - } else { - $height = $this->getFontHeight($size); - } - - - $lines = explode("\n",$text); - foreach ($lines as $line){ - $start=1; - while (strlen($line) || $start){ - $start=0; - $this->y=$this->y-$height; - if ($this->y < $this->ez['bottomMargin']){ - if ($test){ - $newPage=true; - } else { - $this->ezNewPage(); - // and then re-calc the left and right, in case they have changed due to columns - } - } - if (is_array($options) && isset($options['aleft'])){ - $left=$options['aleft']; - } else { - $left = $this->ez['leftMargin'] + ((is_array($options) && isset($options['left']))?$options['left']:0); - } - if (is_array($options) && isset($options['aright'])){ - $right=$options['aright']; - } else { - $right = $this->ez['pageWidth'] - $this->ez['rightMargin'] - ((is_array($options) && isset($options['right']))?$options['right']:0); - } - $line=$this->addTextWrap($left,$this->y,$right-$left,$size,$line,$just,0,$test); - } - } - - if ($test){ - $this->y=$store_y; - return $newPage; - } else { - return $this->y; - } -} - -// ------------------------------------------------------------------------------ - -function ezImage($image,$pad = 5,$width = 0,$resize = 'full',$just = 'center',$border = ''){ - //beta ezimage function - if (stristr($image,'://'))//copy to temp file - { - $fp = @fopen($image,"rb"); - while(!feof($fp)) - { - $cont.= fread($fp,1024); - } - fclose($fp); - $image = tempnam ("/tmp", "php-pdf"); - $fp2 = @fopen($image,"w"); - fwrite($fp2,$cont); - fclose($fp2); - $temp = true; - } - - if (!(file_exists($image))) return false; //return immediately if image file does not exist - $imageInfo = getimagesize($image); - switch ($imageInfo[2]){ - case 2: - $type = "jpeg"; - break; - case 3: - $type = "png"; - break; - default: - return false; //return if file is not jpg or png - } - if ($width == 0) $width = $imageInfo[0]; //set width - $ratio = $imageInfo[0]/$imageInfo[1]; - - //get maximum width of image - if (isset($this->ez['columns']) && $this->ez['columns']['on'] == 1) - { - $bigwidth = $this->ez['columns']['width'] - ($pad * 2); - } - else - { - $bigwidth = $this->ez['pageWidth'] - ($pad * 2); - } - //fix width if larger than maximum or if $resize=full - if ($resize == 'full' || $resize == 'width' || $width > $bigwidth) - { - $width = $bigwidth; - - } - - $height = ($width/$ratio); //set height - - //fix size if runs off page - if ($height > ($this->y - $this->ez['bottomMargin'] - ($pad * 2))) - { - if ($resize != 'full') - { - $this->ezNewPage(); - } - else - { - $height = ($this->y - $this->ez['bottomMargin'] - ($pad * 2)); //shrink height - $width = ($height*$ratio); //fix width - } - } - - //fix x-offset if image smaller than bigwidth - if ($width < $bigwidth) - { - //center if justification=center - if ($just == 'center') - { - $offset = ($bigwidth - $width) / 2; - } - //move to right if justification=right - if ($just == 'right') - { - $offset = ($bigwidth - $width); - } - //leave at left if justification=left - if ($just == 'left') - { - $offset = 0; - } - } - - - //call appropriate function - if ($type == "jpeg"){ - $this->addJpegFromFile($image,$this->ez['leftMargin'] + $pad + $offset, $this->y + $this->getFontHeight($this->ez['fontSize']) - $pad - $height,$width); - } - - if ($type == "png"){ - $this->addPngFromFile($image,$this->ez['leftMargin'] + $pad + $offset, $this->y + $this->getFontHeight($this->ez['fontSize']) - $pad - $height,$width); - } - //draw border - if ($border != '') - { - if (!(isset($border['color']))) - { - $border['color']['red'] = .5; - $border['color']['blue'] = .5; - $border['color']['green'] = .5; - } - if (!(isset($border['width']))) $border['width'] = 1; - if (!(isset($border['cap']))) $border['cap'] = 'round'; - if (!(isset($border['join']))) $border['join'] = 'round'; - - - $this->setStrokeColor($border['color']['red'],$border['color']['green'],$border['color']['blue']); - $this->setLineStyle($border['width'],$border['cap'],$border['join']); - $this->rectangle($this->ez['leftMargin'] + $pad + $offset, $this->y + $this->getFontHeight($this->ez['fontSize']) - $pad - $height,$width,$height); - - } - // move y below image - $this->y = $this->y - $pad - $height; - //remove tempfile for remote images - if ($temp == true) unlink($image); - -} -// ------------------------------------------------------------------------------ - -// note that templating code is still considered developmental - have not really figured -// out a good way of doing this yet. -function loadTemplate($templateFile){ - // this function will load the requested template ($file includes full or relative pathname) - // the code for the template will be modified to make it name safe, and then stored in - // an array for later use - // The id of the template will be returned for the user to operate on it later - if (!file_exists($templateFile)){ - return -1; - } - - $code = implode('',file($templateFile)); - if (!strlen($code)){ - return; - } - - $code = trim($code); - if (substr($code,0,5)==''){ - $code = substr($code,0,strlen($code)-2); - } - if (isset($this->ez['numTemplates'])){ - $newNum = $this->ez['numTemplates']; - $this->ez['numTemplates']++; - } else { - $newNum=0; - $this->ez['numTemplates']=1; - $this->ez['templates']=array(); - } - - $this->ez['templates'][$newNum]['code']=$code; - - return $newNum; -} - -// ------------------------------------------------------------------------------ - -function execTemplate($id,$data=array(),$options=array()){ - // execute the given template on the current document. - if (!isset($this->ez['templates'][$id])){ - return; - } - eval($this->ez['templates'][$id]['code']); -} - -// ------------------------------------------------------------------------------ -function ilink($info){ - $this->alink($info,1); -} - -function alink($info,$internal=0){ - // a callback function to support the formation of clickable links within the document - $lineFactor=0.05; // the thickness of the line as a proportion of the height. also the drop of the line. - switch($info['status']){ - case 'start': - case 'sol': - // the beginning of the link - // this should contain the URl for the link as the 'p' entry, and will also contain the value of 'nCallback' - if (!isset($this->ez['links'])){ - $this->ez['links']=array(); - } - $i = $info['nCallback']; - $this->ez['links'][$i] = array('x'=>$info['x'],'y'=>$info['y'],'angle'=>$info['angle'],'decender'=>$info['decender'],'height'=>$info['height'],'url'=>$info['p']); - if ($internal==0){ - $this->saveState(); - $this->setColor(0,0,1); - $this->setStrokeColor(0,0,1); - $thick = $info['height']*$lineFactor; - $this->setLineStyle($thick); - } - break; - case 'end': - case 'eol': - // the end of the link - // assume that it is the most recent opening which has closed - $i = $info['nCallback']; - $start = $this->ez['links'][$i]; - // add underlining - if ($internal){ - $this->addInternalLink($start['url'],$start['x'],$start['y']+$start['decender'],$info['x'],$start['y']+$start['decender']+$start['height']); - } else { - $a = deg2rad((float)$start['angle']-90.0); - $drop = $start['height']*$lineFactor*1.5; - $dropx = cos($a)*$drop; - $dropy = -sin($a)*$drop; - $this->line($start['x']-$dropx,$start['y']-$dropy,$info['x']-$dropx,$info['y']-$dropy); - $this->addLink($start['url'],$start['x'],$start['y']+$start['decender'],$info['x'],$start['y']+$start['decender']+$start['height']); - $this->restoreState(); - } - break; - } -} - -// ------------------------------------------------------------------------------ - -function uline($info){ - // a callback function to support underlining - $lineFactor=0.05; // the thickness of the line as a proportion of the height. also the drop of the line. - switch($info['status']){ - case 'start': - case 'sol': - - // the beginning of the underline zone - if (!isset($this->ez['links'])){ - $this->ez['links']=array(); - } - $i = $info['nCallback']; - $this->ez['links'][$i] = array('x'=>$info['x'],'y'=>$info['y'],'angle'=>$info['angle'],'decender'=>$info['decender'],'height'=>$info['height']); - $this->saveState(); - $thick = $info['height']*$lineFactor; - $this->setLineStyle($thick); - break; - case 'end': - case 'eol': - // the end of the link - // assume that it is the most recent opening which has closed - $i = $info['nCallback']; - $start = $this->ez['links'][$i]; - // add underlining - $a = deg2rad((float)$start['angle']-90.0); - $drop = $start['height']*$lineFactor*1.5; - $dropx = cos($a)*$drop; - $dropy = -sin($a)*$drop; - $this->line($start['x']-$dropx,$start['y']-$dropy,$info['x']-$dropx,$info['y']-$dropy); - $this->restoreState(); - break; - } -} - -// ------------------------------------------------------------------------------ - -} -?> \ No newline at end of file diff --git a/addon/class.pdf.php b/addon/class.pdf.php deleted file mode 100644 index f732ab100..000000000 --- a/addon/class.pdf.php +++ /dev/null @@ -1,3075 +0,0 @@ - -* @version 009 -* @package Cpdf -*/ -class Cpdf { - -/** -* the current number of pdf objects in the document -*/ -var $numObj=0; -/** -* this array contains all of the pdf objects, ready for final assembly -*/ -var $objects = array(); -/** -* the objectId (number within the objects array) of the document catalog -*/ -var $catalogId; -/** -* array carrying information about the fonts that the system currently knows about -* used to ensure that a font is not loaded twice, among other things -*/ -var $fonts=array(); -/** -* a record of the current font -*/ -var $currentFont=''; -/** -* the current base font -*/ -var $currentBaseFont=''; -/** -* the number of the current font within the font array -*/ -var $currentFontNum=0; -/** -* -*/ -var $currentNode; -/** -* object number of the current page -*/ -var $currentPage; -/** -* object number of the currently active contents block -*/ -var $currentContents; -/** -* number of fonts within the system -*/ -var $numFonts=0; -/** -* current colour for fill operations, defaults to inactive value, all three components should be between 0 and 1 inclusive when active -*/ -var $currentColour=array('r'=>-1,'g'=>-1,'b'=>-1); -/** -* current colour for stroke operations (lines etc.) -*/ -var $currentStrokeColour=array('r'=>-1,'g'=>-1,'b'=>-1); -/** -* current style that lines are drawn in -*/ -var $currentLineStyle=''; -/** -* an array which is used to save the state of the document, mainly the colours and styles -* it is used to temporarily change to another state, the change back to what it was before -*/ -var $stateStack = array(); -/** -* number of elements within the state stack -*/ -var $nStateStack = 0; -/** -* number of page objects within the document -*/ -var $numPages=0; -/** -* object Id storage stack -*/ -var $stack=array(); -/** -* number of elements within the object Id storage stack -*/ -var $nStack=0; -/** -* an array which contains information about the objects which are not firmly attached to pages -* these have been added with the addObject function -*/ -var $looseObjects=array(); -/** -* array contains infomation about how the loose objects are to be added to the document -*/ -var $addLooseObjects=array(); -/** -* the objectId of the information object for the document -* this contains authorship, title etc. -*/ -var $infoObject=0; -/** -* number of images being tracked within the document -*/ -var $numImages=0; -/** -* an array containing options about the document -* it defaults to turning on the compression of the objects -*/ -var $options=array('compression'=>1); -/** -* the objectId of the first page of the document -*/ -var $firstPageId; -/** -* used to track the last used value of the inter-word spacing, this is so that it is known -* when the spacing is changed. -*/ -var $wordSpaceAdjust=0; -/** -* the object Id of the procset object -*/ -var $procsetObjectId; -/** -* store the information about the relationship between font families -* this used so that the code knows which font is the bold version of another font, etc. -* the value of this array is initialised in the constuctor function. -*/ -var $fontFamilies = array(); -/** -* track if the current font is bolded or italicised -*/ -var $currentTextState = ''; -/** -* messages are stored here during processing, these can be selected afterwards to give some useful debug information -*/ -var $messages=''; -/** -* the ancryption array for the document encryption is stored here -*/ -var $arc4=''; -/** -* the object Id of the encryption information -*/ -var $arc4_objnum=0; -/** -* the file identifier, used to uniquely identify a pdf document -*/ -var $fileIdentifier=''; -/** -* a flag to say if a document is to be encrypted or not -*/ -var $encrypted=0; -/** -* the ancryption key for the encryption of all the document content (structure is not encrypted) -*/ -var $encryptionKey=''; -/** -* array which forms a stack to keep track of nested callback functions -*/ -var $callback = array(); -/** -* the number of callback functions in the callback array -*/ -var $nCallback = 0; -/** -* store label->id pairs for named destinations, these will be used to replace internal links -* done this way so that destinations can be defined after the location that links to them -*/ -var $destinations = array(); -/** -* store the stack for the transaction commands, each item in here is a record of the values of all the -* variables within the class, so that the user can rollback at will (from each 'start' command) -* note that this includes the objects array, so these can be large. -*/ -var $checkpoint = ''; -/** -* class constructor -* this will start a new document -* @var array array of 4 numbers, defining the bottom left and upper right corner of the page. first two are normally zero. -*/ -function Cpdf ($pageSize=array(0,0,612,792)){ - $this->newDocument($pageSize); - - // also initialize the font families that are known about already - $this->setFontFamily('init'); -// $this->fileIdentifier = md5('xxxxxxxx'.time()); - -} - -/** -* Document object methods (internal use only) -* -* There is about one object method for each type of object in the pdf document -* Each function has the same call list ($id,$action,$options). -* $id = the object ID of the object, or what it is to be if it is being created -* $action = a string specifying the action to be performed, though ALL must support: -* 'new' - create the object with the id $id -* 'out' - produce the output for the pdf object -* $options = optional, a string or array containing the various parameters for the object -* -* These, in conjunction with the output function are the ONLY way for output to be produced -* within the pdf 'file'. -*/ - -/** -*destination object, used to specify the location for the user to jump to, presently on opening -*/ -function o_destination($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch($action){ - case 'new': - $this->objects[$id]=array('t'=>'destination','info'=>array()); - $tmp = ''; - switch ($options['type']){ - case 'XYZ': - case 'FitR': - $tmp = ' '.$options['p3'].$tmp; - case 'FitH': - case 'FitV': - case 'FitBH': - case 'FitBV': - $tmp = ' '.$options['p1'].' '.$options['p2'].$tmp; - case 'Fit': - case 'FitB': - $tmp = $options['type'].$tmp; - $this->objects[$id]['info']['string']=$tmp; - $this->objects[$id]['info']['page']=$options['page']; - } - break; - case 'out': - $tmp = $o['info']; - $res="\n".$id." 0 obj\n".'['.$tmp['page'].' 0 R /'.$tmp['string']."]\nendobj\n"; - return $res; - break; - } -} - -/** -* set the viewer preferences -*/ -function o_viewerPreferences($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - $this->objects[$id]=array('t'=>'viewerPreferences','info'=>array()); - break; - case 'add': - foreach($options as $k=>$v){ - switch ($k){ - case 'HideToolbar': - case 'HideMenubar': - case 'HideWindowUI': - case 'FitWindow': - case 'CenterWindow': - case 'NonFullScreenPageMode': - case 'Direction': - $o['info'][$k]=$v; - break; - } - } - break; - case 'out': - - $res="\n".$id." 0 obj\n".'<< '; - foreach($o['info'] as $k=>$v){ - $res.="\n/".$k.' '.$v; - } - $res.="\n>>\n"; - return $res; - break; - } -} - -/** -* define the document catalog, the overall controller for the document -*/ -function o_catalog($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - $this->objects[$id]=array('t'=>'catalog','info'=>array()); - $this->catalogId=$id; - break; - case 'outlines': - case 'pages': - case 'openHere': - $o['info'][$action]=$options; - break; - case 'viewerPreferences': - if (!isset($o['info']['viewerPreferences'])){ - $this->numObj++; - $this->o_viewerPreferences($this->numObj,'new'); - $o['info']['viewerPreferences']=$this->numObj; - } - $vp = $o['info']['viewerPreferences']; - $this->o_viewerPreferences($vp,'add',$options); - break; - case 'out': - $res="\n".$id." 0 obj\n".'<< /Type /Catalog'; - foreach($o['info'] as $k=>$v){ - switch($k){ - case 'outlines': - $res.="\n".'/Outlines '.$v.' 0 R'; - break; - case 'pages': - $res.="\n".'/Pages '.$v.' 0 R'; - break; - case 'viewerPreferences': - $res.="\n".'/ViewerPreferences '.$o['info']['viewerPreferences'].' 0 R'; - break; - case 'openHere': - $res.="\n".'/OpenAction '.$o['info']['openHere'].' 0 R'; - break; - } - } - $res.=" >>\nendobj"; - return $res; - break; - } -} - -/** -* object which is a parent to the pages in the document -*/ -function o_pages($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - $this->objects[$id]=array('t'=>'pages','info'=>array()); - $this->o_catalog($this->catalogId,'pages',$id); - break; - case 'page': - if (!is_array($options)){ - // then it will just be the id of the new page - $o['info']['pages'][]=$options; - } else { - // then it should be an array having 'id','rid','pos', where rid=the page to which this one will be placed relative - // and pos is either 'before' or 'after', saying where this page will fit. - if (isset($options['id']) && isset($options['rid']) && isset($options['pos'])){ - $i = array_search($options['rid'],$o['info']['pages']); - if (isset($o['info']['pages'][$i]) && $o['info']['pages'][$i]==$options['rid']){ - // then there is a match - // make a space - switch ($options['pos']){ - case 'before': - $k = $i; - break; - case 'after': - $k=$i+1; - break; - default: - $k=-1; - break; - } - if ($k>=0){ - for ($j=count($o['info']['pages'])-1;$j>=$k;$j--){ - $o['info']['pages'][$j+1]=$o['info']['pages'][$j]; - } - $o['info']['pages'][$k]=$options['id']; - } - } - } - } - break; - case 'procset': - $o['info']['procset']=$options; - break; - case 'mediaBox': - $o['info']['mediaBox']=$options; // which should be an array of 4 numbers - break; - case 'font': - $o['info']['fonts'][]=array('objNum'=>$options['objNum'],'fontNum'=>$options['fontNum']); - break; - case 'xObject': - $o['info']['xObjects'][]=array('objNum'=>$options['objNum'],'label'=>$options['label']); - break; - case 'out': - if (count($o['info']['pages'])){ - $res="\n".$id." 0 obj\n<< /Type /Pages\n/Kids ["; - foreach($o['info']['pages'] as $k=>$v){ - $res.=$v." 0 R\n"; - } - $res.="]\n/Count ".count($this->objects[$id]['info']['pages']); - if ((isset($o['info']['fonts']) && count($o['info']['fonts'])) || isset($o['info']['procset'])){ - $res.="\n/Resources <<"; - if (isset($o['info']['procset'])){ - $res.="\n/ProcSet ".$o['info']['procset']." 0 R"; - } - if (isset($o['info']['fonts']) && count($o['info']['fonts'])){ - $res.="\n/Font << "; - foreach($o['info']['fonts'] as $finfo){ - $res.="\n/F".$finfo['fontNum']." ".$finfo['objNum']." 0 R"; - } - $res.=" >>"; - } - if (isset($o['info']['xObjects']) && count($o['info']['xObjects'])){ - $res.="\n/XObject << "; - foreach($o['info']['xObjects'] as $finfo){ - $res.="\n/".$finfo['label']." ".$finfo['objNum']." 0 R"; - } - $res.=" >>"; - } - $res.="\n>>"; - if (isset($o['info']['mediaBox'])){ - $tmp=$o['info']['mediaBox']; - $res.="\n/MediaBox [".sprintf('%.3f',$tmp[0]).' '.sprintf('%.3f',$tmp[1]).' '.sprintf('%.3f',$tmp[2]).' '.sprintf('%.3f',$tmp[3]).']'; - } - } - $res.="\n >>\nendobj"; - } else { - $res="\n".$id." 0 obj\n<< /Type /Pages\n/Count 0\n>>\nendobj"; - } - return $res; - break; - } -} - -/** -* define the outlines in the doc, empty for now -*/ -function o_outlines($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - $this->objects[$id]=array('t'=>'outlines','info'=>array('outlines'=>array())); - $this->o_catalog($this->catalogId,'outlines',$id); - break; - case 'outline': - $o['info']['outlines'][]=$options; - break; - case 'out': - if (count($o['info']['outlines'])){ - $res="\n".$id." 0 obj\n<< /Type /Outlines /Kids ["; - foreach($o['info']['outlines'] as $k=>$v){ - $res.=$v." 0 R "; - } - $res.="] /Count ".count($o['info']['outlines'])." >>\nendobj"; - } else { - $res="\n".$id." 0 obj\n<< /Type /Outlines /Count 0 >>\nendobj"; - } - return $res; - break; - } -} - -/** -* an object to hold the font description -*/ -function o_font($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - $this->objects[$id]=array('t'=>'font','info'=>array('name'=>$options['name'],'SubType'=>'Type1')); - $fontNum=$this->numFonts; - $this->objects[$id]['info']['fontNum']=$fontNum; - // deal with the encoding and the differences - if (isset($options['differences'])){ - // then we'll need an encoding dictionary - $this->numObj++; - $this->o_fontEncoding($this->numObj,'new',$options); - $this->objects[$id]['info']['encodingDictionary']=$this->numObj; - } else if (isset($options['encoding'])){ - // we can specify encoding here - switch($options['encoding']){ - case 'WinAnsiEncoding': - case 'MacRomanEncoding': - case 'MacExpertEncoding': - $this->objects[$id]['info']['encoding']=$options['encoding']; - break; - case 'none': - break; - default: - $this->objects[$id]['info']['encoding']='WinAnsiEncoding'; - break; - } - } else { - $this->objects[$id]['info']['encoding']='WinAnsiEncoding'; - } - // also tell the pages node about the new font - $this->o_pages($this->currentNode,'font',array('fontNum'=>$fontNum,'objNum'=>$id)); - break; - case 'add': - foreach ($options as $k=>$v){ - switch ($k){ - case 'BaseFont': - $o['info']['name'] = $v; - break; - case 'FirstChar': - case 'LastChar': - case 'Widths': - case 'FontDescriptor': - case 'SubType': - $this->addMessage('o_font '.$k." : ".$v); - $o['info'][$k] = $v; - break; - } - } - break; - case 'out': - $res="\n".$id." 0 obj\n<< /Type /Font\n/Subtype /".$o['info']['SubType']."\n"; - $res.="/Name /F".$o['info']['fontNum']."\n"; - $res.="/BaseFont /".$o['info']['name']."\n"; - if (isset($o['info']['encodingDictionary'])){ - // then place a reference to the dictionary - $res.="/Encoding ".$o['info']['encodingDictionary']." 0 R\n"; - } else if (isset($o['info']['encoding'])){ - // use the specified encoding - $res.="/Encoding /".$o['info']['encoding']."\n"; - } - if (isset($o['info']['FirstChar'])){ - $res.="/FirstChar ".$o['info']['FirstChar']."\n"; - } - if (isset($o['info']['LastChar'])){ - $res.="/LastChar ".$o['info']['LastChar']."\n"; - } - if (isset($o['info']['Widths'])){ - $res.="/Widths ".$o['info']['Widths']." 0 R\n"; - } - if (isset($o['info']['FontDescriptor'])){ - $res.="/FontDescriptor ".$o['info']['FontDescriptor']." 0 R\n"; - } - $res.=">>\nendobj"; - return $res; - break; - } -} - -/** -* a font descriptor, needed for including additional fonts -*/ -function o_fontDescriptor($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - $this->objects[$id]=array('t'=>'fontDescriptor','info'=>$options); - break; - case 'out': - $res="\n".$id." 0 obj\n<< /Type /FontDescriptor\n"; - foreach ($o['info'] as $label => $value){ - switch ($label){ - case 'Ascent': - case 'CapHeight': - case 'Descent': - case 'Flags': - case 'ItalicAngle': - case 'StemV': - case 'AvgWidth': - case 'Leading': - case 'MaxWidth': - case 'MissingWidth': - case 'StemH': - case 'XHeight': - case 'CharSet': - if (strlen($value)){ - $res.='/'.$label.' '.$value."\n"; - } - break; - case 'FontFile': - case 'FontFile2': - case 'FontFile3': - $res.='/'.$label.' '.$value." 0 R\n"; - break; - case 'FontBBox': - $res.='/'.$label.' ['.$value[0].' '.$value[1].' '.$value[2].' '.$value[3]."]\n"; - break; - case 'FontName': - $res.='/'.$label.' /'.$value."\n"; - break; - } - } - $res.=">>\nendobj"; - return $res; - break; - } -} - -/** -* the font encoding -*/ -function o_fontEncoding($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - // the options array should contain 'differences' and maybe 'encoding' - $this->objects[$id]=array('t'=>'fontEncoding','info'=>$options); - break; - case 'out': - $res="\n".$id." 0 obj\n<< /Type /Encoding\n"; - if (!isset($o['info']['encoding'])){ - $o['info']['encoding']='WinAnsiEncoding'; - } - if ($o['info']['encoding']!='none'){ - $res.="/BaseEncoding /".$o['info']['encoding']."\n"; - } - $res.="/Differences \n["; - $onum=-100; - foreach($o['info']['differences'] as $num=>$label){ - if ($num!=$onum+1){ - // we cannot make use of consecutive numbering - $res.= "\n".$num." /".$label; - } else { - $res.= " /".$label; - } - $onum=$num; - } - $res.="\n]\n>>\nendobj"; - return $res; - break; - } -} - -/** -* the document procset, solves some problems with printing to old PS printers -*/ -function o_procset($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - $this->objects[$id]=array('t'=>'procset','info'=>array('PDF'=>1,'Text'=>1)); - $this->o_pages($this->currentNode,'procset',$id); - $this->procsetObjectId=$id; - break; - case 'add': - // this is to add new items to the procset list, despite the fact that this is considered - // obselete, the items are required for printing to some postscript printers - switch ($options) { - case 'ImageB': - case 'ImageC': - case 'ImageI': - $o['info'][$options]=1; - break; - } - break; - case 'out': - $res="\n".$id." 0 obj\n["; - foreach ($o['info'] as $label=>$val){ - $res.='/'.$label.' '; - } - $res.="]\nendobj"; - return $res; - break; - } -} - -/** -* define the document information -*/ -function o_info($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - $this->infoObject=$id; - $date='D:'.date('Ymd'); - $this->objects[$id]=array('t'=>'info','info'=>array('Creator'=>'R and OS php pdf writer, http://www.ros.co.nz','CreationDate'=>$date)); - break; - case 'Title': - case 'Author': - case 'Subject': - case 'Keywords': - case 'Creator': - case 'Producer': - case 'CreationDate': - case 'ModDate': - case 'Trapped': - $o['info'][$action]=$options; - break; - case 'out': - if ($this->encrypted){ - $this->encryptInit($id); - } - $res="\n".$id." 0 obj\n<<\n"; - foreach ($o['info'] as $k=>$v){ - $res.='/'.$k.' ('; - if ($this->encrypted){ - $res.=$this->filterText($this->ARC4($v)); - } else { - $res.=$this->filterText($v); - } - $res.=")\n"; - } - $res.=">>\nendobj"; - return $res; - break; - } -} - -/** -* an action object, used to link to URLS initially -*/ -function o_action($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - if (is_array($options)){ - $this->objects[$id]=array('t'=>'action','info'=>$options,'type'=>$options['type']); - } else { - // then assume a URI action - $this->objects[$id]=array('t'=>'action','info'=>$options,'type'=>'URI'); - } - break; - case 'out': - if ($this->encrypted){ - $this->encryptInit($id); - } - $res="\n".$id." 0 obj\n<< /Type /Action"; - switch($o['type']){ - case 'ilink': - // there will be an 'label' setting, this is the name of the destination - $res.="\n/S /GoTo\n/D ".$this->destinations[(string)$o['info']['label']]." 0 R"; - break; - case 'URI': - $res.="\n/S /URI\n/URI ("; - if ($this->encrypted){ - $res.=$this->filterText($this->ARC4($o['info'])); - } else { - $res.=$this->filterText($o['info']); - } - $res.=")"; - break; - } - $res.="\n>>\nendobj"; - return $res; - break; - } -} - -/** -* an annotation object, this will add an annotation to the current page. -* initially will support just link annotations -*/ -function o_annotation($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - // add the annotation to the current page - $pageId = $this->currentPage; - $this->o_page($pageId,'annot',$id); - // and add the action object which is going to be required - switch($options['type']){ - case 'link': - $this->objects[$id]=array('t'=>'annotation','info'=>$options); - $this->numObj++; - $this->o_action($this->numObj,'new',$options['url']); - $this->objects[$id]['info']['actionId']=$this->numObj; - break; - case 'ilink': - // this is to a named internal link - $label = $options['label']; - $this->objects[$id]=array('t'=>'annotation','info'=>$options); - $this->numObj++; - $this->o_action($this->numObj,'new',array('type'=>'ilink','label'=>$label)); - $this->objects[$id]['info']['actionId']=$this->numObj; - break; - } - break; - case 'out': - $res="\n".$id." 0 obj\n<< /Type /Annot"; - switch($o['info']['type']){ - case 'link': - case 'ilink': - $res.= "\n/Subtype /Link"; - break; - } - $res.="\n/A ".$o['info']['actionId']." 0 R"; - $res.="\n/Border [0 0 0]"; - $res.="\n/H /I"; - $res.="\n/Rect [ "; - foreach($o['info']['rect'] as $v){ - $res.= sprintf("%.4f ",$v); - } - $res.="]"; - $res.="\n>>\nendobj"; - return $res; - break; - } -} - -/** -* a page object, it also creates a contents object to hold its contents -*/ -function o_page($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - $this->numPages++; - $this->objects[$id]=array('t'=>'page','info'=>array('parent'=>$this->currentNode,'pageNum'=>$this->numPages)); - if (is_array($options)){ - // then this must be a page insertion, array shoudl contain 'rid','pos'=[before|after] - $options['id']=$id; - $this->o_pages($this->currentNode,'page',$options); - } else { - $this->o_pages($this->currentNode,'page',$id); - } - $this->currentPage=$id; - //make a contents object to go with this page - $this->numObj++; - $this->o_contents($this->numObj,'new',$id); - $this->currentContents=$this->numObj; - $this->objects[$id]['info']['contents']=array(); - $this->objects[$id]['info']['contents'][]=$this->numObj; - $match = ($this->numPages%2 ? 'odd' : 'even'); - foreach($this->addLooseObjects as $oId=>$target){ - if ($target=='all' || $match==$target){ - $this->objects[$id]['info']['contents'][]=$oId; - } - } - break; - case 'content': - $o['info']['contents'][]=$options; - break; - case 'annot': - // add an annotation to this page - if (!isset($o['info']['annot'])){ - $o['info']['annot']=array(); - } - // $options should contain the id of the annotation dictionary - $o['info']['annot'][]=$options; - break; - case 'out': - $res="\n".$id." 0 obj\n<< /Type /Page"; - $res.="\n/Parent ".$o['info']['parent']." 0 R"; - if (isset($o['info']['annot'])){ - $res.="\n/Annots ["; - foreach($o['info']['annot'] as $aId){ - $res.=" ".$aId." 0 R"; - } - $res.=" ]"; - } - $count = count($o['info']['contents']); - if ($count==1){ - $res.="\n/Contents ".$o['info']['contents'][0]." 0 R"; - } else if ($count>1){ - $res.="\n/Contents [\n"; - foreach ($o['info']['contents'] as $cId){ - $res.=$cId." 0 R\n"; - } - $res.="]"; - } - $res.="\n>>\nendobj"; - return $res; - break; - } -} - -/** -* the contents objects hold all of the content which appears on pages -*/ -function o_contents($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch ($action){ - case 'new': - $this->objects[$id]=array('t'=>'contents','c'=>'','info'=>array()); - if (strlen($options) && intval($options)){ - // then this contents is the primary for a page - $this->objects[$id]['onPage']=$options; - } else if ($options=='raw'){ - // then this page contains some other type of system object - $this->objects[$id]['raw']=1; - } - break; - case 'add': - // add more options to the decleration - foreach ($options as $k=>$v){ - $o['info'][$k]=$v; - } - case 'out': - $tmp=$o['c']; - $res= "\n".$id." 0 obj\n"; - if (isset($this->objects[$id]['raw'])){ - $res.=$tmp; - } else { - $res.= "<<"; - if (function_exists('gzcompress') && $this->options['compression']){ - // then implement ZLIB based compression on this content stream - $res.=" /Filter /FlateDecode"; - $tmp = gzcompress($tmp); - } - if ($this->encrypted){ - $this->encryptInit($id); - $tmp = $this->ARC4($tmp); - } - foreach($o['info'] as $k=>$v){ - $res .= "\n/".$k.' '.$v; - } - $res.="\n/Length ".strlen($tmp)." >>\nstream\n".$tmp."\nendstream"; - } - $res.="\nendobj\n"; - return $res; - break; - } -} - -/** -* an image object, will be an XObject in the document, includes description and data -*/ -function o_image($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch($action){ - case 'new': - // make the new object - $this->objects[$id]=array('t'=>'image','data'=>$options['data'],'info'=>array()); - $this->objects[$id]['info']['Type']='/XObject'; - $this->objects[$id]['info']['Subtype']='/Image'; - $this->objects[$id]['info']['Width']=$options['iw']; - $this->objects[$id]['info']['Height']=$options['ih']; - if (!isset($options['type']) || $options['type']=='jpg'){ - if (!isset($options['channels'])){ - $options['channels']=3; - } - switch($options['channels']){ - case 1: - $this->objects[$id]['info']['ColorSpace']='/DeviceGray'; - break; - default: - $this->objects[$id]['info']['ColorSpace']='/DeviceRGB'; - break; - } - $this->objects[$id]['info']['Filter']='/DCTDecode'; - $this->objects[$id]['info']['BitsPerComponent']=8; - } else if ($options['type']=='png'){ - $this->objects[$id]['info']['Filter']='/FlateDecode'; - $this->objects[$id]['info']['DecodeParms']='<< /Predictor 15 /Colors '.$options['ncolor'].' /Columns '.$options['iw'].' /BitsPerComponent '.$options['bitsPerComponent'].'>>'; - if (strlen($options['pdata'])){ - $tmp = ' [ /Indexed /DeviceRGB '.(strlen($options['pdata'])/3-1).' '; - $this->numObj++; - $this->o_contents($this->numObj,'new'); - $this->objects[$this->numObj]['c']=$options['pdata']; - $tmp.=$this->numObj.' 0 R'; - $tmp .=' ]'; - $this->objects[$id]['info']['ColorSpace'] = $tmp; - if (isset($options['transparency'])){ - switch($options['transparency']['type']){ - case 'indexed': - $tmp=' [ '.$options['transparency']['data'].' '.$options['transparency']['data'].'] '; - $this->objects[$id]['info']['Mask'] = $tmp; - break; - } - } - } else { - $this->objects[$id]['info']['ColorSpace']='/'.$options['color']; - } - $this->objects[$id]['info']['BitsPerComponent']=$options['bitsPerComponent']; - } - // assign it a place in the named resource dictionary as an external object, according to - // the label passed in with it. - $this->o_pages($this->currentNode,'xObject',array('label'=>$options['label'],'objNum'=>$id)); - // also make sure that we have the right procset object for it. - $this->o_procset($this->procsetObjectId,'add','ImageC'); - break; - case 'out': - $tmp=$o['data']; - $res= "\n".$id." 0 obj\n<<"; - foreach($o['info'] as $k=>$v){ - $res.="\n/".$k.' '.$v; - } - if ($this->encrypted){ - $this->encryptInit($id); - $tmp = $this->ARC4($tmp); - } - $res.="\n/Length ".strlen($tmp)." >>\nstream\n".$tmp."\nendstream\nendobj\n"; - return $res; - break; - } -} - -/** -* encryption object. -*/ -function o_encryption($id,$action,$options=''){ - if ($action!='new'){ - $o =& $this->objects[$id]; - } - switch($action){ - case 'new': - // make the new object - $this->objects[$id]=array('t'=>'encryption','info'=>$options); - $this->arc4_objnum=$id; - // figure out the additional paramaters required - $pad = chr(0x28).chr(0xBF).chr(0x4E).chr(0x5E).chr(0x4E).chr(0x75).chr(0x8A).chr(0x41).chr(0x64).chr(0x00).chr(0x4E).chr(0x56).chr(0xFF).chr(0xFA).chr(0x01).chr(0x08).chr(0x2E).chr(0x2E).chr(0x00).chr(0xB6).chr(0xD0).chr(0x68).chr(0x3E).chr(0x80).chr(0x2F).chr(0x0C).chr(0xA9).chr(0xFE).chr(0x64).chr(0x53).chr(0x69).chr(0x7A); - $len = strlen($options['owner']); - if ($len>32){ - $owner = substr($options['owner'],0,32); - } else if ($len<32){ - $owner = $options['owner'].substr($pad,0,32-$len); - } else { - $owner = $options['owner']; - } - $len = strlen($options['user']); - if ($len>32){ - $user = substr($options['user'],0,32); - } else if ($len<32){ - $user = $options['user'].substr($pad,0,32-$len); - } else { - $user = $options['user']; - } - $tmp = $this->md5_16($owner); - $okey = substr($tmp,0,5); - $this->ARC4_init($okey); - $ovalue=$this->ARC4($user); - $this->objects[$id]['info']['O']=$ovalue; - // now make the u value, phew. - $tmp = $this->md5_16($user.$ovalue.chr($options['p']).chr(255).chr(255).chr(255).$this->fileIdentifier); - $ukey = substr($tmp,0,5); - - $this->ARC4_init($ukey); - $this->encryptionKey = $ukey; - $this->encrypted=1; - $uvalue=$this->ARC4($pad); - - $this->objects[$id]['info']['U']=$uvalue; - $this->encryptionKey=$ukey; - - // initialize the arc4 array - break; - case 'out': - $res= "\n".$id." 0 obj\n<<"; - $res.="\n/Filter /Standard"; - $res.="\n/V 1"; - $res.="\n/R 2"; - $res.="\n/O (".$this->filterText($o['info']['O']).')'; - $res.="\n/U (".$this->filterText($o['info']['U']).')'; - // and the p-value needs to be converted to account for the twos-complement approach - $o['info']['p'] = (($o['info']['p']^255)+1)*-1; - $res.="\n/P ".($o['info']['p']); - $res.="\n>>\nendobj\n"; - - return $res; - break; - } -} - -/** -* ARC4 functions -* A series of function to implement ARC4 encoding in PHP -*/ - -/** -* calculate the 16 byte version of the 128 bit md5 digest of the string -*/ -function md5_16($string){ - $tmp = md5($string); - $out=''; - for ($i=0;$i<=30;$i=$i+2){ - $out.=chr(hexdec(substr($tmp,$i,2))); - } - return $out; -} - -/** -* initialize the encryption for processing a particular object -*/ -function encryptInit($id){ - $tmp = $this->encryptionKey; - $hex = dechex($id); - if (strlen($hex)<6){ - $hex = substr('000000',0,6-strlen($hex)).$hex; - } - $tmp.= chr(hexdec(substr($hex,4,2))).chr(hexdec(substr($hex,2,2))).chr(hexdec(substr($hex,0,2))).chr(0).chr(0); - $key = $this->md5_16($tmp); - $this->ARC4_init(substr($key,0,10)); -} - -/** -* initialize the ARC4 encryption -*/ -function ARC4_init($key=''){ - $this->arc4 = ''; - // setup the control array - if (strlen($key)==0){ - return; - } - $k = ''; - while(strlen($k)<256){ - $k.=$key; - } - $k=substr($k,0,256); - for ($i=0;$i<256;$i++){ - $this->arc4 .= chr($i); - } - $j=0; - for ($i=0;$i<256;$i++){ - $t = $this->arc4[$i]; - $j = ($j + ord($t) + ord($k[$i]))%256; - $this->arc4[$i]=$this->arc4[$j]; - $this->arc4[$j]=$t; - } -} - -/** -* ARC4 encrypt a text string -*/ -function ARC4($text){ - $len=strlen($text); - $a=0; - $b=0; - $c = $this->arc4; - $out=''; - for ($i=0;$i<$len;$i++){ - $a = ($a+1)%256; - $t= $c[$a]; - $b = ($b+ord($t))%256; - $c[$a]=$c[$b]; - $c[$b]=$t; - $k = ord($c[(ord($c[$a])+ord($c[$b]))%256]); - $out.=chr(ord($text[$i]) ^ $k); - } - - return $out; -} - -/** -* functions which can be called to adjust or add to the document -*/ - -/** -* add a link in the document to an external URL -*/ -function addLink($url,$x0,$y0,$x1,$y1){ - $this->numObj++; - $info = array('type'=>'link','url'=>$url,'rect'=>array($x0,$y0,$x1,$y1)); - $this->o_annotation($this->numObj,'new',$info); -} - -/** -* add a link in the document to an internal destination (ie. within the document) -*/ -function addInternalLink($label,$x0,$y0,$x1,$y1){ - $this->numObj++; - $info = array('type'=>'ilink','label'=>$label,'rect'=>array($x0,$y0,$x1,$y1)); - $this->o_annotation($this->numObj,'new',$info); -} - -/** -* set the encryption of the document -* can be used to turn it on and/or set the passwords which it will have. -* also the functions that the user will have are set here, such as print, modify, add -*/ -function setEncryption($userPass='',$ownerPass='',$pc=array()){ - $p=bindec(11000000); - - $options = array( - 'print'=>4 - ,'modify'=>8 - ,'copy'=>16 - ,'add'=>32 - ); - foreach($pc as $k=>$v){ - if ($v && isset($options[$k])){ - $p+=$options[$k]; - } else if (isset($options[$v])){ - $p+=$options[$v]; - } - } - // implement encryption on the document - if ($this->arc4_objnum == 0){ - // then the block does not exist already, add it. - $this->numObj++; - if (strlen($ownerPass)==0){ - $ownerPass=$userPass; - } - $this->o_encryption($this->numObj,'new',array('user'=>$userPass,'owner'=>$ownerPass,'p'=>$p)); - } -} - -/** -* should be used for internal checks, not implemented as yet -*/ -function checkAllHere(){ -} - -/** -* return the pdf stream as a string returned from the function -*/ -function output($debug=0){ - - if ($debug){ - // turn compression off - $this->options['compression']=0; - } - - if ($this->arc4_objnum){ - $this->ARC4_init($this->encryptionKey); - } - - $this->checkAllHere(); - - $xref=array(); - $content="%PDF-1.3\n%âãÏÓ\n"; -// $content="%PDF-1.3\n"; - $pos=strlen($content); - foreach($this->objects as $k=>$v){ - $tmp='o_'.$v['t']; - $cont=$this->$tmp($k,'out'); - $content.=$cont; - $xref[]=$pos; - $pos+=strlen($cont); - } - $content.="\nxref\n0 ".(count($xref)+1)."\n0000000000 65535 f \n"; - foreach($xref as $p){ - $content.=substr('0000000000',0,10-strlen($p)).$p." 00000 n \n"; - } - $content.="\ntrailer\n << /Size ".(count($xref)+1)."\n /Root 1 0 R\n /Info ".$this->infoObject." 0 R\n"; - // if encryption has been applied to this document then add the marker for this dictionary - if ($this->arc4_objnum > 0){ - $content .= "/Encrypt ".$this->arc4_objnum." 0 R\n"; - } - if (strlen($this->fileIdentifier)){ - $content .= "/ID[<".$this->fileIdentifier."><".$this->fileIdentifier.">]\n"; - } - $content .= " >>\nstartxref\n".$pos."\n%%EOF\n"; - return $content; -} - -/** -* intialize a new document -* if this is called on an existing document results may be unpredictable, but the existing document would be lost at minimum -* this function is called automatically by the constructor function -* -* @access private -*/ -function newDocument($pageSize=array(0,0,612,792)){ - $this->numObj=0; - $this->objects = array(); - - $this->numObj++; - $this->o_catalog($this->numObj,'new'); - - $this->numObj++; - $this->o_outlines($this->numObj,'new'); - - $this->numObj++; - $this->o_pages($this->numObj,'new'); - - $this->o_pages($this->numObj,'mediaBox',$pageSize); - $this->currentNode = 3; - - $this->numObj++; - $this->o_procset($this->numObj,'new'); - - $this->numObj++; - $this->o_info($this->numObj,'new'); - - $this->numObj++; - $this->o_page($this->numObj,'new'); - - // need to store the first page id as there is no way to get it to the user during - // startup - $this->firstPageId = $this->currentContents; -} - -/** -* open the font file and return a php structure containing it. -* first check if this one has been done before and saved in a form more suited to php -* note that if a php serialized version does not exist it will try and make one, but will -* require write access to the directory to do it... it is MUCH faster to have these serialized -* files. -* -* @access private -*/ -function openFont($font){ - // assume that $font contains both the path and perhaps the extension to the file, split them - $pos=strrpos($font,'/'); - if ($pos===false){ - $dir = './'; - $name = $font; - } else { - $dir=substr($font,0,$pos+1); - $name=substr($font,$pos+1); - } - - if (substr($name,-4)=='.afm'){ - $name=substr($name,0,strlen($name)-4); - } - $this->addMessage('openFont: '.$font.' - '.$name); - if (file_exists($dir.'php_'.$name.'.afm')){ - $this->addMessage('openFont: php file exists '.$dir.'php_'.$name.'.afm'); - $tmp = file($dir.'php_'.$name.'.afm'); - $this->fonts[$font]=unserialize($tmp[0]); - if (!isset($this->fonts[$font]['_version_']) || $this->fonts[$font]['_version_']<1){ - // if the font file is old, then clear it out and prepare for re-creation - $this->addMessage('openFont: clear out, make way for new version.'); - unset($this->fonts[$font]); - } - } - if (!isset($this->fonts[$font]) && file_exists($dir.$name.'.afm')){ - // then rebuild the php_.afm file from the .afm file - $this->addMessage('openFont: build php file from '.$dir.$name.'.afm'); - $data = array(); - $file = file($dir.$name.'.afm'); - foreach ($file as $rowA){ - $row=trim($rowA); - $pos=strpos($row,' '); - if ($pos){ - // then there must be some keyword - $key = substr($row,0,$pos); - switch ($key){ - case 'FontName': - case 'FullName': - case 'FamilyName': - case 'Weight': - case 'ItalicAngle': - case 'IsFixedPitch': - case 'CharacterSet': - case 'UnderlinePosition': - case 'UnderlineThickness': - case 'Version': - case 'EncodingScheme': - case 'CapHeight': - case 'XHeight': - case 'Ascender': - case 'Descender': - case 'StdHW': - case 'StdVW': - case 'StartCharMetrics': - $data[$key]=trim(substr($row,$pos)); - break; - case 'FontBBox': - $data[$key]=explode(' ',trim(substr($row,$pos))); - break; - case 'C': - //C 39 ; WX 222 ; N quoteright ; B 53 463 157 718 ; - $bits=explode(';',trim($row)); - $dtmp=array(); - foreach($bits as $bit){ - $bits2 = explode(' ',trim($bit)); - if (strlen($bits2[0])){ - if (count($bits2)>2){ - $dtmp[$bits2[0]]=array(); - for ($i=1;$i=0){ - $data['C'][$dtmp['C']]=$dtmp; - $data['C'][$dtmp['N']]=$dtmp; - } else { - $data['C'][$dtmp['N']]=$dtmp; - } - break; - case 'KPX': - //KPX Adieresis yacute -40 - $bits=explode(' ',trim($row)); - $data['KPX'][$bits[1]][$bits[2]]=$bits[3]; - break; - } - } - } - $data['_version_']=1; - $this->fonts[$font]=$data; - $fp = fopen($dir.'php_'.$name.'.afm','w'); - fwrite($fp,serialize($data)); - fclose($fp); - } else if (!isset($this->fonts[$font])){ - $this->addMessage('openFont: no font file found'); -// echo 'Font not Found '.$font; - } -} - -/** -* if the font is not loaded then load it and make the required object -* else just make it the current font -* the encoding array can contain 'encoding'=> 'none','WinAnsiEncoding','MacRomanEncoding' or 'MacExpertEncoding' -* note that encoding='none' will need to be used for symbolic fonts -* and 'differences' => an array of mappings between numbers 0->255 and character names. -* -*/ -function selectFont($fontName,$encoding='',$set=1){ - if (!isset($this->fonts[$fontName])){ - // load the file - $this->openFont($fontName); - if (isset($this->fonts[$fontName])){ - $this->numObj++; - $this->numFonts++; - $pos=strrpos($fontName,'/'); -// $dir=substr($fontName,0,$pos+1); - $name=substr($fontName,$pos+1); - if (substr($name,-4)=='.afm'){ - $name=substr($name,0,strlen($name)-4); - } - $options=array('name'=>$name); - if (is_array($encoding)){ - // then encoding and differences might be set - if (isset($encoding['encoding'])){ - $options['encoding']=$encoding['encoding']; - } - if (isset($encoding['differences'])){ - $options['differences']=$encoding['differences']; - } - } else if (strlen($encoding)){ - // then perhaps only the encoding has been set - $options['encoding']=$encoding; - } - $fontObj = $this->numObj; - $this->o_font($this->numObj,'new',$options); - $this->fonts[$fontName]['fontNum']=$this->numFonts; - // if this is a '.afm' font, and there is a '.pfa' file to go with it ( as there - // should be for all non-basic fonts), then load it into an object and put the - // references into the font object - $basefile = substr($fontName,0,strlen($fontName)-4); - if (file_exists($basefile.'.pfb')){ - $fbtype = 'pfb'; - } else if (file_exists($basefile.'.ttf')){ - $fbtype = 'ttf'; - } else { - $fbtype=''; - } - $fbfile = $basefile.'.'.$fbtype; - -// $pfbfile = substr($fontName,0,strlen($fontName)-4).'.pfb'; -// $ttffile = substr($fontName,0,strlen($fontName)-4).'.ttf'; - $this->addMessage('selectFont: checking for - '.$fbfile); - if (substr($fontName,-4)=='.afm' && strlen($fbtype) ){ - $adobeFontName = $this->fonts[$fontName]['FontName']; -// $fontObj = $this->numObj; - $this->addMessage('selectFont: adding font file - '.$fbfile.' - '.$adobeFontName); - // find the array of fond widths, and put that into an object. - $firstChar = -1; - $lastChar = 0; - $widths = array(); - foreach ($this->fonts[$fontName]['C'] as $num=>$d){ - if (intval($num)>0 || $num=='0'){ - if ($lastChar>0 && $num>$lastChar+1){ - for($i=$lastChar+1;$i<$num;$i++){ - $widths[] = 0; - } - } - $widths[] = $d['WX']; - if ($firstChar==-1){ - $firstChar = $num; - } - $lastChar = $num; - } - } - // also need to adjust the widths for the differences array - if (isset($options['differences'])){ - foreach($options['differences'] as $charNum=>$charName){ - if ($charNum>$lastChar){ - for($i=$lastChar+1;$i<=$charNum;$i++){ - $widths[]=0; - } - $lastChar=$charNum; - } - if (isset($this->fonts[$fontName]['C'][$charName])){ - $widths[$charNum-$firstChar]=$this->fonts[$fontName]['C'][$charName]['WX']; - } - } - } - $this->addMessage('selectFont: FirstChar='.$firstChar); - $this->addMessage('selectFont: LastChar='.$lastChar); - $this->numObj++; - $this->o_contents($this->numObj,'new','raw'); - $this->objects[$this->numObj]['c'].='['; - foreach($widths as $width){ - $this->objects[$this->numObj]['c'].=' '.$width; - } - $this->objects[$this->numObj]['c'].=' ]'; - $widthid = $this->numObj; - - // load the pfb file, and put that into an object too. - // note that pdf supports only binary format type 1 font files, though there is a - // simple utility to convert them from pfa to pfb. - $fp = fopen($fbfile,'rb'); - $tmp = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - $data = fread($fp,filesize($fbfile)); - set_magic_quotes_runtime($tmp); - fclose($fp); - - // create the font descriptor - $this->numObj++; - $fontDescriptorId = $this->numObj; - $this->numObj++; - $pfbid = $this->numObj; - // determine flags (more than a little flakey, hopefully will not matter much) - $flags=0; - if ($this->fonts[$fontName]['ItalicAngle']!=0){ $flags+=pow(2,6); } - if ($this->fonts[$fontName]['IsFixedPitch']=='true'){ $flags+=1; } - $flags+=pow(2,5); // assume non-sybolic - - $list = array('Ascent'=>'Ascender','CapHeight'=>'CapHeight','Descent'=>'Descender','FontBBox'=>'FontBBox','ItalicAngle'=>'ItalicAngle'); - $fdopt = array( - 'Flags'=>$flags - ,'FontName'=>$adobeFontName - ,'StemV'=>100 // don't know what the value for this should be! - ); - foreach($list as $k=>$v){ - if (isset($this->fonts[$fontName][$v])){ - $fdopt[$k]=$this->fonts[$fontName][$v]; - } - } - - if ($fbtype=='pfb'){ - $fdopt['FontFile']=$pfbid; - } else if ($fbtype=='ttf'){ - $fdopt['FontFile2']=$pfbid; - } - $this->o_fontDescriptor($fontDescriptorId,'new',$fdopt); - - // embed the font program - $this->o_contents($this->numObj,'new'); - $this->objects[$pfbid]['c'].=$data; - // determine the cruicial lengths within this file - if ($fbtype=='pfb'){ - $l1 = strpos($data,'eexec')+6; - $l2 = strpos($data,'00000000')-$l1; - $l3 = strlen($data)-$l2-$l1; - $this->o_contents($this->numObj,'add',array('Length1'=>$l1,'Length2'=>$l2,'Length3'=>$l3)); - } else if ($fbtype=='ttf'){ - $l1 = strlen($data); - $this->o_contents($this->numObj,'add',array('Length1'=>$l1)); - } - - - // tell the font object about all this new stuff - $tmp = array('BaseFont'=>$adobeFontName,'Widths'=>$widthid - ,'FirstChar'=>$firstChar,'LastChar'=>$lastChar - ,'FontDescriptor'=>$fontDescriptorId); - if ($fbtype=='ttf'){ - $tmp['SubType']='TrueType'; - } - $this->addMessage('adding extra info to font.('.$fontObj.')'); - foreach($tmp as $fk=>$fv){ - $this->addMessage($fk." : ".$fv); - } - $this->o_font($fontObj,'add',$tmp); - - } else { - $this->addMessage('selectFont: pfb or ttf file not found, ok if this is one of the 14 standard fonts'); - } - - - // also set the differences here, note that this means that these will take effect only the - //first time that a font is selected, else they are ignored - if (isset($options['differences'])){ - $this->fonts[$fontName]['differences']=$options['differences']; - } - } - } - if ($set && isset($this->fonts[$fontName])){ - // so if for some reason the font was not set in the last one then it will not be selected - $this->currentBaseFont=$fontName; - // the next line means that if a new font is selected, then the current text state will be - // applied to it as well. - $this->setCurrentFont(); - } - return $this->currentFontNum; -} - -/** -* sets up the current font, based on the font families, and the current text state -* note that this system is quite flexible, a font can be completely different to a -* font, and even will have to be defined within the family to have meaning -* This function is to be called whenever the currentTextState is changed, it will update -* the currentFont setting to whatever the appropriatte family one is. -* If the user calls selectFont themselves then that will reset the currentBaseFont, and the currentFont -* This function will change the currentFont to whatever it should be, but will not change the -* currentBaseFont. -* -* @access private -*/ -function setCurrentFont(){ - if (strlen($this->currentBaseFont)==0){ - // then assume an initial font - $this->selectFont('./fonts/Helvetica.afm'); - } - $cf = substr($this->currentBaseFont,strrpos($this->currentBaseFont,'/')+1); - if (strlen($this->currentTextState) - && isset($this->fontFamilies[$cf]) - && isset($this->fontFamilies[$cf][$this->currentTextState])){ - // then we are in some state or another - // and this font has a family, and the current setting exists within it - // select the font, then return it - $nf = substr($this->currentBaseFont,0,strrpos($this->currentBaseFont,'/')+1).$this->fontFamilies[$cf][$this->currentTextState]; - $this->selectFont($nf,'',0); - $this->currentFont = $nf; - $this->currentFontNum = $this->fonts[$nf]['fontNum']; - } else { - // the this font must not have the right family member for the current state - // simply assume the base font - $this->currentFont = $this->currentBaseFont; - $this->currentFontNum = $this->fonts[$this->currentFont]['fontNum']; - } -} - -/** -* function for the user to find out what the ID is of the first page that was created during -* startup - useful if they wish to add something to it later. -*/ -function getFirstPageId(){ - return $this->firstPageId; -} - -/** -* add content to the currently active object -* -* @access private -*/ -function addContent($content){ - $this->objects[$this->currentContents]['c'].=$content; -} - -/** -* sets the colour for fill operations -*/ -function setColor($r,$g,$b,$force=0){ - if ($r>=0 && ($force || $r!=$this->currentColour['r'] || $g!=$this->currentColour['g'] || $b!=$this->currentColour['b'])){ - $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$r).' '.sprintf('%.3f',$g).' '.sprintf('%.3f',$b).' rg'; - $this->currentColour=array('r'=>$r,'g'=>$g,'b'=>$b); - } -} - -/** -* sets the colour for stroke operations -*/ -function setStrokeColor($r,$g,$b,$force=0){ - if ($r>=0 && ($force || $r!=$this->currentStrokeColour['r'] || $g!=$this->currentStrokeColour['g'] || $b!=$this->currentStrokeColour['b'])){ - $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$r).' '.sprintf('%.3f',$g).' '.sprintf('%.3f',$b).' RG'; - $this->currentStrokeColour=array('r'=>$r,'g'=>$g,'b'=>$b); - } -} - -/** -* draw a line from one set of coordinates to another -*/ -function line($x1,$y1,$x2,$y2){ - $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$x1).' '.sprintf('%.3f',$y1).' m '.sprintf('%.3f',$x2).' '.sprintf('%.3f',$y2).' l S'; -} - -/** -* draw a bezier curve based on 4 control points -*/ -function curve($x0,$y0,$x1,$y1,$x2,$y2,$x3,$y3){ - // in the current line style, draw a bezier curve from (x0,y0) to (x3,y3) using the other two points - // as the control points for the curve. - $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$x0).' '.sprintf('%.3f',$y0).' m '.sprintf('%.3f',$x1).' '.sprintf('%.3f',$y1); - $this->objects[$this->currentContents]['c'].= ' '.sprintf('%.3f',$x2).' '.sprintf('%.3f',$y2).' '.sprintf('%.3f',$x3).' '.sprintf('%.3f',$y3).' c S'; -} - -/** -* draw a part of an ellipse -*/ -function partEllipse($x0,$y0,$astart,$afinish,$r1,$r2=0,$angle=0,$nSeg=8){ - $this->ellipse($x0,$y0,$r1,$r2,$angle,$nSeg,$astart,$afinish,0); -} - -/** -* draw a filled ellipse -*/ -function filledEllipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360){ - return $this->ellipse($x0,$y0,$r1,$r2=0,$angle,$nSeg,$astart,$afinish,1,1); -} - -/** -* draw an ellipse -* note that the part and filled ellipse are just special cases of this function -* -* draws an ellipse in the current line style -* centered at $x0,$y0, radii $r1,$r2 -* if $r2 is not set, then a circle is drawn -* nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a -* pretty crappy shape at 2, as we are approximating with bezier curves. -*/ -function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0){ - if ($r1==0){ - return; - } - if ($r2==0){ - $r2=$r1; - } - if ($nSeg<2){ - $nSeg=2; - } - - $astart = deg2rad((float)$astart); - $afinish = deg2rad((float)$afinish); - $totalAngle =$afinish-$astart; - - $dt = $totalAngle/$nSeg; - $dtm = $dt/3; - - if ($angle != 0){ - $a = -1*deg2rad((float)$angle); - $tmp = "\n q "; - $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' '; - $tmp .= sprintf('%.3f',$x0).' '.sprintf('%.3f',$y0).' cm'; - $this->objects[$this->currentContents]['c'].= $tmp; - $x0=0; - $y0=0; - } - - $t1 = $astart; - $a0 = $x0+$r1*cos($t1); - $b0 = $y0+$r2*sin($t1); - $c0 = -$r1*sin($t1); - $d0 = $r2*cos($t1); - - $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$a0).' '.sprintf('%.3f',$b0).' m '; - for ($i=1;$i<=$nSeg;$i++){ - // draw this bit of the total curve - $t1 = $i*$dt+$astart; - $a1 = $x0+$r1*cos($t1); - $b1 = $y0+$r2*sin($t1); - $c1 = -$r1*sin($t1); - $d1 = $r2*cos($t1); - $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',($a0+$c0*$dtm)).' '.sprintf('%.3f',($b0+$d0*$dtm)); - $this->objects[$this->currentContents]['c'].= ' '.sprintf('%.3f',($a1-$c1*$dtm)).' '.sprintf('%.3f',($b1-$d1*$dtm)).' '.sprintf('%.3f',$a1).' '.sprintf('%.3f',$b1).' c'; - $a0=$a1; - $b0=$b1; - $c0=$c1; - $d0=$d1; - } - if ($fill){ - $this->objects[$this->currentContents]['c'].=' f'; - } else { - if ($close){ - $this->objects[$this->currentContents]['c'].=' s'; // small 's' signifies closing the path as well - } else { - $this->objects[$this->currentContents]['c'].=' S'; - } - } - if ($angle !=0){ - $this->objects[$this->currentContents]['c'].=' Q'; - } -} - -/** -* this sets the line drawing style. -* width, is the thickness of the line in user units -* cap is the type of cap to put on the line, values can be 'butt','round','square' -* where the diffference between 'square' and 'butt' is that 'square' projects a flat end past the -* end of the line. -* join can be 'miter', 'round', 'bevel' -* dash is an array which sets the dash pattern, is a series of length values, which are the lengths of the -* on and off dashes. -* (2) represents 2 on, 2 off, 2 on , 2 off ... -* (2,1) is 2 on, 1 off, 2 on, 1 off.. etc -* phase is a modifier on the dash pattern which is used to shift the point at which the pattern starts. -*/ -function setLineStyle($width=1,$cap='',$join='',$dash='',$phase=0){ - - // this is quite inefficient in that it sets all the parameters whenever 1 is changed, but will fix another day - $string = ''; - if ($width>0){ - $string.= $width.' w'; - } - $ca = array('butt'=>0,'round'=>1,'square'=>2); - if (isset($ca[$cap])){ - $string.= ' '.$ca[$cap].' J'; - } - $ja = array('miter'=>0,'round'=>1,'bevel'=>2); - if (isset($ja[$join])){ - $string.= ' '.$ja[$join].' j'; - } - if (is_array($dash)){ - $string.= ' ['; - foreach ($dash as $len){ - $string.=' '.$len; - } - $string.= ' ] '.$phase.' d'; - } - $this->currentLineStyle = $string; - $this->objects[$this->currentContents]['c'].="\n".$string; -} - -/** -* draw a polygon, the syntax for this is similar to the GD polygon command -*/ -function polygon($p,$np,$f=0){ - $this->objects[$this->currentContents]['c'].="\n"; - $this->objects[$this->currentContents]['c'].=sprintf('%.3f',$p[0]).' '.sprintf('%.3f',$p[1]).' m '; - for ($i=2;$i<$np*2;$i=$i+2){ - $this->objects[$this->currentContents]['c'].= sprintf('%.3f',$p[$i]).' '.sprintf('%.3f',$p[$i+1]).' l '; - } - if ($f==1){ - $this->objects[$this->currentContents]['c'].=' f'; - } else { - $this->objects[$this->currentContents]['c'].=' S'; - } -} - -/** -* a filled rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not -* the coordinates of the upper-right corner -*/ -function filledRectangle($x1,$y1,$width,$height){ - $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$x1).' '.sprintf('%.3f',$y1).' '.sprintf('%.3f',$width).' '.sprintf('%.3f',$height).' re f'; -} - -/** -* draw a rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not -* the coordinates of the upper-right corner -*/ -function rectangle($x1,$y1,$width,$height){ - $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$x1).' '.sprintf('%.3f',$y1).' '.sprintf('%.3f',$width).' '.sprintf('%.3f',$height).' re S'; -} - -/** -* add a new page to the document -* this also makes the new page the current active object -*/ -function newPage($insert=0,$id=0,$pos='after'){ - - // if there is a state saved, then go up the stack closing them - // then on the new page, re-open them with the right setings - - if ($this->nStateStack){ - for ($i=$this->nStateStack;$i>=1;$i--){ - $this->restoreState($i); - } - } - - $this->numObj++; - if ($insert){ - // the id from the ezPdf class is the od of the contents of the page, not the page object itself - // query that object to find the parent - $rid = $this->objects[$id]['onPage']; - $opt= array('rid'=>$rid,'pos'=>$pos); - $this->o_page($this->numObj,'new',$opt); - } else { - $this->o_page($this->numObj,'new'); - } - // if there is a stack saved, then put that onto the page - if ($this->nStateStack){ - for ($i=1;$i<=$this->nStateStack;$i++){ - $this->saveState($i); - } - } - // and if there has been a stroke or fill colour set, then transfer them - if ($this->currentColour['r']>=0){ - $this->setColor($this->currentColour['r'],$this->currentColour['g'],$this->currentColour['b'],1); - } - if ($this->currentStrokeColour['r']>=0){ - $this->setStrokeColor($this->currentStrokeColour['r'],$this->currentStrokeColour['g'],$this->currentStrokeColour['b'],1); - } - - // if there is a line style set, then put this in too - if (strlen($this->currentLineStyle)){ - $this->objects[$this->currentContents]['c'].="\n".$this->currentLineStyle; - } - - // the call to the o_page object set currentContents to the present page, so this can be returned as the page id - return $this->currentContents; -} - -/** -* output the pdf code, streaming it to the browser -* the relevant headers are set so that hopefully the browser will recognise it -*/ -function stream($options=''){ - // setting the options allows the adjustment of the headers - // values at the moment are: - // 'Content-Disposition'=>'filename' - sets the filename, though not too sure how well this will - // work as in my trial the browser seems to use the filename of the php file with .pdf on the end - // 'Accept-Ranges'=>1 or 0 - if this is not set to 1, then this header is not included, off by default - // this header seems to have caused some problems despite tha fact that it is supposed to solve - // them, so I am leaving it off by default. - // 'compress'=> 1 or 0 - apply content stream compression, this is on (1) by default - if (!is_array($options)){ - $options=array(); - } - if ( isset($options['compress']) && $options['compress']==0){ - $tmp = $this->output(1); - } else { - $tmp = $this->output(); - } - header("Content-type: application/pdf"); - header("Content-Length: ".strlen(ltrim($tmp))); - $fileName = (isset($options['Content-Disposition'])?$options['Content-Disposition']:'file.pdf'); - header("Content-Disposition: inline; filename=".$fileName); - if (isset($options['Accept-Ranges']) && $options['Accept-Ranges']==1){ - header("Accept-Ranges: ".strlen(ltrim($tmp))); - } - echo ltrim($tmp); -} - -/** -* return the height in units of the current font in the given size -*/ -function getFontHeight($size){ - if (!$this->numFonts){ - $this->selectFont('./fonts/Helvetica'); - } - // for the current font, and the given size, what is the height of the font in user units - $h = $this->fonts[$this->currentFont]['FontBBox'][3]-$this->fonts[$this->currentFont]['FontBBox'][1]; - return $size*$h/1000; -} - -/** -* return the font decender, this will normally return a negative number -* if you add this number to the baseline, you get the level of the bottom of the font -* it is in the pdf user units -*/ -function getFontDecender($size){ - // note that this will most likely return a negative value - if (!$this->numFonts){ - $this->selectFont('./fonts/Helvetica'); - } - $h = $this->fonts[$this->currentFont]['FontBBox'][1]; - return $size*$h/1000; -} - -/** -* filter the text, this is applied to all text just before being inserted into the pdf document -* it escapes the various things that need to be escaped, and so on -* -* @access private -*/ -function filterText($text){ - $text = str_replace('\\','\\\\',$text); - $text = str_replace('(','\(',$text); - $text = str_replace(')','\)',$text); - $text = str_replace('<','<',$text); - $text = str_replace('>','>',$text); - $text = str_replace(''','\'',$text); - $text = str_replace('"','"',$text); - $text = str_replace('&','&',$text); - - return $text; -} - -/** -* given a start position and information about how text is to be laid out, calculate where -* on the page the text will end -* -* @access private -*/ -function PRVTgetTextPosition($x,$y,$angle,$size,$wa,$text){ - // given this information return an array containing x and y for the end position as elements 0 and 1 - $w = $this->getTextWidth($size,$text); - // need to adjust for the number of spaces in this text - $words = explode(' ',$text); - $nspaces=count($words)-1; - $w += $wa*$nspaces; - $a = deg2rad((float)$angle); - return array(cos($a)*$w+$x,-sin($a)*$w+$y); -} - -/** -* wrapper function for PRVTcheckTextDirective1 -* -* @access private -*/ -function PRVTcheckTextDirective(&$text,$i,&$f){ - $x=0; - $y=0; - return $this->PRVTcheckTextDirective1($text,$i,$f,0,$x,$y); -} - -/** -* checks if the text stream contains a control directive -* if so then makes some changes and returns the number of characters involved in the directive -* this has been re-worked to include everything neccesary to fins the current writing point, so that -* the location can be sent to the callback function if required -* if the directive does not require a font change, then $f should be set to 0 -* -* @access private -*/ -function PRVTcheckTextDirective1(&$text,$i,&$f,$final,&$x,&$y,$size=0,$angle=0,$wordSpaceAdjust=0){ - $directive = 0; - $j=$i; - if ($text[$j]=='<'){ - $j++; - switch($text[$j]){ - case '/': - $j++; - if (strlen($text) <= $j){ - return $directive; - } - switch($text[$j]){ - case 'b': - case 'i': - $j++; - if ($text[$j]=='>'){ - $p = strrpos($this->currentTextState,$text[$j-1]); - if ($p !== false){ - // then there is one to remove - $this->currentTextState = substr($this->currentTextState,0,$p).substr($this->currentTextState,$p+1); - } - $directive=$j-$i+1; - } - break; - case 'c': - // this this might be a callback function - $j++; - $k = strpos($text,'>',$j); - if ($k!==false && $text[$j]==':'){ - // then this will be treated as a callback directive - $directive = $k-$i+1; - $f=0; - // split the remainder on colons to get the function name and the paramater - $tmp = substr($text,$j+1,$k-$j-1); - $b1 = strpos($tmp,':'); - if ($b1!==false){ - $func = substr($tmp,0,$b1); - $parm = substr($tmp,$b1+1); - } else { - $func=$tmp; - $parm=''; - } - if (!isset($func) || !strlen(trim($func))){ - $directive=0; - } else { - // only call the function if this is the final call - if ($final){ - // need to assess the text position, calculate the text width to this point - // can use getTextWidth to find the text width I think - $tmp = $this->PRVTgetTextPosition($x,$y,$angle,$size,$wordSpaceAdjust,substr($text,0,$i)); - $info = array('x'=>$tmp[0],'y'=>$tmp[1],'angle'=>$angle,'status'=>'end','p'=>$parm,'nCallback'=>$this->nCallback); - $x=$tmp[0]; - $y=$tmp[1]; - $ret = $this->$func($info); - if (is_array($ret)){ - // then the return from the callback function could set the position, to start with, later will do font colour, and font - foreach($ret as $rk=>$rv){ - switch($rk){ - case 'x': - case 'y': - $$rk=$rv; - break; - } - } - } - // also remove from to the stack - // for simplicity, just take from the end, fix this another day - $this->nCallback--; - if ($this->nCallback<0){ - $this->nCallBack=0; - } - } - } - } - break; - } - break; - case 'b': - case 'i': - $j++; - if ($text[$j]=='>'){ - $this->currentTextState.=$text[$j-1]; - $directive=$j-$i+1; - } - break; - case 'C': - $noClose=1; - case 'c': - // this this might be a callback function - $j++; - $k = strpos($text,'>',$j); - if ($k!==false && $text[$j]==':'){ - // then this will be treated as a callback directive - $directive = $k-$i+1; - $f=0; - // split the remainder on colons to get the function name and the paramater -// $bits = explode(':',substr($text,$j+1,$k-$j-1)); - $tmp = substr($text,$j+1,$k-$j-1); - $b1 = strpos($tmp,':'); - if ($b1!==false){ - $func = substr($tmp,0,$b1); - $parm = substr($tmp,$b1+1); - } else { - $func=$tmp; - $parm=''; - } - if (!isset($func) || !strlen(trim($func))){ - $directive=0; - } else { - // only call the function if this is the final call, ie, the one actually doing printing, not measurement - if ($final){ - // need to assess the text position, calculate the text width to this point - // can use getTextWidth to find the text width I think - // also add the text height and decender - $tmp = $this->PRVTgetTextPosition($x,$y,$angle,$size,$wordSpaceAdjust,substr($text,0,$i)); - $info = array('x'=>$tmp[0],'y'=>$tmp[1],'angle'=>$angle,'status'=>'start','p'=>$parm,'f'=>$func,'height'=>$this->getFontHeight($size),'decender'=>$this->getFontDecender($size)); - $x=$tmp[0]; - $y=$tmp[1]; - if (!isset($noClose) || !$noClose){ - // only add to the stack if this is a small 'c', therefore is a start-stop pair - $this->nCallback++; - $info['nCallback']=$this->nCallback; - $this->callback[$this->nCallback]=$info; - } - $ret = $this->$func($info); - if (is_array($ret)){ - // then the return from the callback function could set the position, to start with, later will do font colour, and font - foreach($ret as $rk=>$rv){ - switch($rk){ - case 'x': - case 'y': - $$rk=$rv; - break; - } - } - } - } - } - } - break; - } - } - return $directive; -} - -/** -* add text to the document, at a specified location, size and angle on the page -*/ -function addText($x,$y,$size,$text,$angle=0,$wordSpaceAdjust=0){ - if (!$this->numFonts){$this->selectFont('./fonts/Helvetica');} - - // if there are any open callbacks, then they should be called, to show the start of the line - if ($this->nCallback>0){ - for ($i=$this->nCallback;$i>0;$i--){ - // call each function - $info = array('x'=>$x,'y'=>$y,'angle'=>$angle,'status'=>'sol','p'=>$this->callback[$i]['p'],'nCallback'=>$this->callback[$i]['nCallback'],'height'=>$this->callback[$i]['height'],'decender'=>$this->callback[$i]['decender']); - $func = $this->callback[$i]['f']; - $this->$func($info); - } - } - if ($angle==0){ - $this->objects[$this->currentContents]['c'].="\n".'BT '.sprintf('%.3f',$x).' '.sprintf('%.3f',$y).' Td'; - } else { - $a = deg2rad((float)$angle); - $tmp = "\n".'BT '; - $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' '; - $tmp .= sprintf('%.3f',$x).' '.sprintf('%.3f',$y).' Tm'; - $this->objects[$this->currentContents]['c'] .= $tmp; - } - if ($wordSpaceAdjust!=0 || $wordSpaceAdjust != $this->wordSpaceAdjust){ - $this->wordSpaceAdjust=$wordSpaceAdjust; - $this->objects[$this->currentContents]['c'].=' '.sprintf('%.3f',$wordSpaceAdjust).' Tw'; - } - $len=strlen($text); - $start=0; - for ($i=0;$i<$len;$i++){ - $f=1; - $directive = $this->PRVTcheckTextDirective($text,$i,$f); - if ($directive){ - // then we should write what we need to - if ($i>$start){ - $part = substr($text,$start,$i-$start); - $this->objects[$this->currentContents]['c'].=' /F'.$this->currentFontNum.' '.sprintf('%.1f',$size).' Tf '; - $this->objects[$this->currentContents]['c'].=' ('.$this->filterText($part).') Tj'; - } - if ($f){ - // then there was nothing drastic done here, restore the contents - $this->setCurrentFont(); - } else { - $this->objects[$this->currentContents]['c'] .= ' ET'; - $f=1; - $xp=$x; - $yp=$y; - $directive = $this->PRVTcheckTextDirective1($text,$i,$f,1,$xp,$yp,$size,$angle,$wordSpaceAdjust); - - // restart the text object - if ($angle==0){ - $this->objects[$this->currentContents]['c'].="\n".'BT '.sprintf('%.3f',$xp).' '.sprintf('%.3f',$yp).' Td'; - } else { - $a = deg2rad((float)$angle); - $tmp = "\n".'BT '; - $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' '; - $tmp .= sprintf('%.3f',$xp).' '.sprintf('%.3f',$yp).' Tm'; - $this->objects[$this->currentContents]['c'] .= $tmp; - } - if ($wordSpaceAdjust!=0 || $wordSpaceAdjust != $this->wordSpaceAdjust){ - $this->wordSpaceAdjust=$wordSpaceAdjust; - $this->objects[$this->currentContents]['c'].=' '.sprintf('%.3f',$wordSpaceAdjust).' Tw'; - } - } - // and move the writing point to the next piece of text - $i=$i+$directive-1; - $start=$i+1; - } - - } - if ($start<$len){ - $part = substr($text,$start); - $this->objects[$this->currentContents]['c'].=' /F'.$this->currentFontNum.' '.sprintf('%.1f',$size).' Tf '; - $this->objects[$this->currentContents]['c'].=' ('.$this->filterText($part).') Tj'; - } - $this->objects[$this->currentContents]['c'].=' ET'; - - // if there are any open callbacks, then they should be called, to show the end of the line - if ($this->nCallback>0){ - for ($i=$this->nCallback;$i>0;$i--){ - // call each function - $tmp = $this->PRVTgetTextPosition($x,$y,$angle,$size,$wordSpaceAdjust,$text); - $info = array('x'=>$tmp[0],'y'=>$tmp[1],'angle'=>$angle,'status'=>'eol','p'=>$this->callback[$i]['p'],'nCallback'=>$this->callback[$i]['nCallback'],'height'=>$this->callback[$i]['height'],'decender'=>$this->callback[$i]['decender']); - $func = $this->callback[$i]['f']; - $this->$func($info); - } - } - -} - -/** -* calculate how wide a given text string will be on a page, at a given size. -* this can be called externally, but is alse used by the other class functions -*/ -function getTextWidth($size,$text){ - // this function should not change any of the settings, though it will need to - // track any directives which change during calculation, so copy them at the start - // and put them back at the end. - $store_currentTextState = $this->currentTextState; - - if (!$this->numFonts){ - $this->selectFont('./fonts/Helvetica'); - } - - // converts a number or a float to a string so it can get the width - $text = "$text"; - - // hmm, this is where it all starts to get tricky - use the font information to - // calculate the width of each character, add them up and convert to user units - $w=0; - $len=strlen($text); - $cf = $this->currentFont; - for ($i=0;$i<$len;$i++){ - $f=1; - $directive = $this->PRVTcheckTextDirective($text,$i,$f); - if ($directive){ - if ($f){ - $this->setCurrentFont(); - $cf = $this->currentFont; - } - $i=$i+$directive-1; - } else { - $char=ord($text[$i]); - if (isset($this->fonts[$cf]['differences'][$char])){ - // then this character is being replaced by another - $name = $this->fonts[$cf]['differences'][$char]; - if (isset($this->fonts[$cf]['C'][$name]['WX'])){ - $w+=$this->fonts[$cf]['C'][$name]['WX']; - } - } else if (isset($this->fonts[$cf]['C'][$char]['WX'])){ - $w+=$this->fonts[$cf]['C'][$char]['WX']; - } - } - } - - $this->currentTextState = $store_currentTextState; - $this->setCurrentFont(); - - return $w*$size/1000; -} - -/** -* do a part of the calculation for sorting out the justification of the text -* -* @access private -*/ -function PRVTadjustWrapText($text,$actual,$width,&$x,&$adjust,$justification){ - switch ($justification){ - case 'left': - return; - break; - case 'right': - $x+=$width-$actual; - break; - case 'center': - case 'centre': - $x+=($width-$actual)/2; - break; - case 'full': - // count the number of words - $words = explode(' ',$text); - $nspaces=count($words)-1; - if ($nspaces>0){ - $adjust = ($width-$actual)/$nspaces; - } else { - $adjust=0; - } - break; - } -} - -/** -* add text to the page, but ensure that it fits within a certain width -* if it does not fit then put in as much as possible, splitting at word boundaries -* and return the remainder. -* justification and angle can also be specified for the text -*/ -function addTextWrap($x,$y,$width,$size,$text,$justification='left',$angle=0,$test=0){ - // this will display the text, and if it goes beyond the width $width, will backtrack to the - // previous space or hyphen, and return the remainder of the text. - - // $justification can be set to 'left','right','center','centre','full' - - // need to store the initial text state, as this will change during the width calculation - // but will need to be re-set before printing, so that the chars work out right - $store_currentTextState = $this->currentTextState; - - if (!$this->numFonts){$this->selectFont('./fonts/Helvetica');} - if ($width<=0){ - // error, pretend it printed ok, otherwise risking a loop - return ''; - } - $w=0; - $break=0; - $breakWidth=0; - $len=strlen($text); - $cf = $this->currentFont; - $tw = $width/$size*1000; - for ($i=0;$i<$len;$i++){ - $f=1; - $directive = $this->PRVTcheckTextDirective($text,$i,$f); - if ($directive){ - if ($f){ - $this->setCurrentFont(); - $cf = $this->currentFont; - } - $i=$i+$directive-1; - } else { - $cOrd = ord($text[$i]); - if (isset($this->fonts[$cf]['differences'][$cOrd])){ - // then this character is being replaced by another - $cOrd2 = $this->fonts[$cf]['differences'][$cOrd]; - } else { - $cOrd2 = $cOrd; - } - - if (isset($this->fonts[$cf]['C'][$cOrd2]['WX'])){ - $w+=$this->fonts[$cf]['C'][$cOrd2]['WX']; - } - if ($w>$tw){ - // then we need to truncate this line - if ($break>0){ - // then we have somewhere that we can split :) - if ($text[$break]==' '){ - $tmp = substr($text,0,$break); - } else { - $tmp = substr($text,0,$break+1); - } - $adjust=0; - $this->PRVTadjustWrapText($tmp,$breakWidth,$width,$x,$adjust,$justification); - - // reset the text state - $this->currentTextState = $store_currentTextState; - $this->setCurrentFont(); - if (!$test){ - $this->addText($x,$y,$size,$tmp,$angle,$adjust); - } - return substr($text,$break+1); - } else { - // just split before the current character - $tmp = substr($text,0,$i); - $adjust=0; - $ctmp=ord($text[$i]); - if (isset($this->fonts[$cf]['differences'][$ctmp])){ - $ctmp=$this->fonts[$cf]['differences'][$ctmp]; - } - $tmpw=($w-$this->fonts[$cf]['C'][$ctmp]['WX'])*$size/1000; - $this->PRVTadjustWrapText($tmp,$tmpw,$width,$x,$adjust,$justification); - // reset the text state - $this->currentTextState = $store_currentTextState; - $this->setCurrentFont(); - if (!$test){ - $this->addText($x,$y,$size,$tmp,$angle,$adjust); - } - return substr($text,$i); - } - } - if ($text[$i]=='-'){ - $break=$i; - $breakWidth = $w*$size/1000; - } - if ($text[$i]==' '){ - $break=$i; - $ctmp=ord($text[$i]); - if (isset($this->fonts[$cf]['differences'][$ctmp])){ - $ctmp=$this->fonts[$cf]['differences'][$ctmp]; - } - $breakWidth = ($w-$this->fonts[$cf]['C'][$ctmp]['WX'])*$size/1000; - } - } - } - // then there was no need to break this line - if ($justification=='full'){ - $justification='left'; - } - $adjust=0; - $tmpw=$w*$size/1000; - $this->PRVTadjustWrapText($text,$tmpw,$width,$x,$adjust,$justification); - // reset the text state - $this->currentTextState = $store_currentTextState; - $this->setCurrentFont(); - if (!$test){ - $this->addText($x,$y,$size,$text,$angle,$adjust,$angle); - } - return ''; -} - -/** -* this will be called at a new page to return the state to what it was on the -* end of the previous page, before the stack was closed down -* This is to get around not being able to have open 'q' across pages -* -*/ -function saveState($pageEnd=0){ - if ($pageEnd){ - // this will be called at a new page to return the state to what it was on the - // end of the previous page, before the stack was closed down - // This is to get around not being able to have open 'q' across pages - $opt = $this->stateStack[$pageEnd]; // ok to use this as stack starts numbering at 1 - $this->setColor($opt['col']['r'],$opt['col']['g'],$opt['col']['b'],1); - $this->setStrokeColor($opt['str']['r'],$opt['str']['g'],$opt['str']['b'],1); - $this->objects[$this->currentContents]['c'].="\n".$opt['lin']; -// $this->currentLineStyle = $opt['lin']; - } else { - $this->nStateStack++; - $this->stateStack[$this->nStateStack]=array( - 'col'=>$this->currentColour - ,'str'=>$this->currentStrokeColour - ,'lin'=>$this->currentLineStyle - ); - } - $this->objects[$this->currentContents]['c'].="\nq"; -} - -/** -* restore a previously saved state -*/ -function restoreState($pageEnd=0){ - if (!$pageEnd){ - $n = $this->nStateStack; - $this->currentColour = $this->stateStack[$n]['col']; - $this->currentStrokeColour = $this->stateStack[$n]['str']; - $this->objects[$this->currentContents]['c'].="\n".$this->stateStack[$n]['lin']; - $this->currentLineStyle = $this->stateStack[$n]['lin']; - unset($this->stateStack[$n]); - $this->nStateStack--; - } - $this->objects[$this->currentContents]['c'].="\nQ"; -} - -/** -* make a loose object, the output will go into this object, until it is closed, then will revert to -* the current one. -* this object will not appear until it is included within a page. -* the function will return the object number -*/ -function openObject(){ - $this->nStack++; - $this->stack[$this->nStack]=array('c'=>$this->currentContents,'p'=>$this->currentPage); - // add a new object of the content type, to hold the data flow - $this->numObj++; - $this->o_contents($this->numObj,'new'); - $this->currentContents=$this->numObj; - $this->looseObjects[$this->numObj]=1; - - return $this->numObj; -} - -/** -* open an existing object for editing -*/ -function reopenObject($id){ - $this->nStack++; - $this->stack[$this->nStack]=array('c'=>$this->currentContents,'p'=>$this->currentPage); - $this->currentContents=$id; - // also if this object is the primary contents for a page, then set the current page to its parent - if (isset($this->objects[$id]['onPage'])){ - $this->currentPage = $this->objects[$id]['onPage']; - } -} - -/** -* close an object -*/ -function closeObject(){ - // close the object, as long as there was one open in the first place, which will be indicated by - // an objectId on the stack. - if ($this->nStack>0){ - $this->currentContents=$this->stack[$this->nStack]['c']; - $this->currentPage=$this->stack[$this->nStack]['p']; - $this->nStack--; - // easier to probably not worry about removing the old entries, they will be overwritten - // if there are new ones. - } -} - -/** -* stop an object from appearing on pages from this point on -*/ -function stopObject($id){ - // if an object has been appearing on pages up to now, then stop it, this page will - // be the last one that could contian it. - if (isset($this->addLooseObjects[$id])){ - $this->addLooseObjects[$id]=''; - } -} - -/** -* after an object has been created, it wil only show if it has been added, using this function. -*/ -function addObject($id,$options='add'){ - // add the specified object to the page - if (isset($this->looseObjects[$id]) && $this->currentContents!=$id){ - // then it is a valid object, and it is not being added to itself - switch($options){ - case 'all': - // then this object is to be added to this page (done in the next block) and - // all future new pages. - $this->addLooseObjects[$id]='all'; - case 'add': - if (isset($this->objects[$this->currentContents]['onPage'])){ - // then the destination contents is the primary for the page - // (though this object is actually added to that page) - $this->o_page($this->objects[$this->currentContents]['onPage'],'content',$id); - } - break; - case 'even': - $this->addLooseObjects[$id]='even'; - $pageObjectId=$this->objects[$this->currentContents]['onPage']; - if ($this->objects[$pageObjectId]['info']['pageNum']%2==0){ - $this->addObject($id); // hacky huh :) - } - break; - case 'odd': - $this->addLooseObjects[$id]='odd'; - $pageObjectId=$this->objects[$this->currentContents]['onPage']; - if ($this->objects[$pageObjectId]['info']['pageNum']%2==1){ - $this->addObject($id); // hacky huh :) - } - break; - case 'next': - $this->addLooseObjects[$id]='all'; - break; - case 'nexteven': - $this->addLooseObjects[$id]='even'; - break; - case 'nextodd': - $this->addLooseObjects[$id]='odd'; - break; - } - } -} - -/** -* add content to the documents info object -*/ -function addInfo($label,$value=0){ - // this will only work if the label is one of the valid ones. - // modify this so that arrays can be passed as well. - // if $label is an array then assume that it is key=>value pairs - // else assume that they are both scalar, anything else will probably error - if (is_array($label)){ - foreach ($label as $l=>$v){ - $this->o_info($this->infoObject,$l,$v); - } - } else { - $this->o_info($this->infoObject,$label,$value); - } -} - -/** -* set the viewer preferences of the document, it is up to the browser to obey these. -*/ -function setPreferences($label,$value=0){ - // this will only work if the label is one of the valid ones. - if (is_array($label)){ - foreach ($label as $l=>$v){ - $this->o_catalog($this->catalogId,'viewerPreferences',array($l=>$v)); - } - } else { - $this->o_catalog($this->catalogId,'viewerPreferences',array($label=>$value)); - } -} - -/** -* extract an integer from a position in a byte stream -* -* @access private -*/ -function PRVT_getBytes(&$data,$pos,$num){ - // return the integer represented by $num bytes from $pos within $data - $ret=0; - for ($i=0;$i<$num;$i++){ - $ret=$ret*256; - $ret+=ord($data[$pos+$i]); - } - return $ret; -} - -/** -* add a PNG image into the document, from a file -* this should work with remote files -*/ -function addPngFromFile($file,$x,$y,$w=0,$h=0){ - // read in a png file, interpret it, then add to the system - $error=0; - $tmp = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - $fp = @fopen($file,'rb'); - if ($fp){ - $data=''; - while(!feof($fp)){ - $data .= fread($fp,1024); - } - fclose($fp); - } else { - $error = 1; - $errormsg = 'trouble opening file: '.$file; - } - set_magic_quotes_runtime($tmp); - - if (!$error){ - $header = chr(137).chr(80).chr(78).chr(71).chr(13).chr(10).chr(26).chr(10); - if (substr($data,0,8)!=$header){ - $error=1; - $errormsg = 'this file does not have a valid header'; - } - } - - if (!$error){ - // set pointer - $p = 8; - $len = strlen($data); - // cycle through the file, identifying chunks - $haveHeader=0; - $info=array(); - $idata=''; - $pdata=''; - while ($p<$len){ - $chunkLen = $this->PRVT_getBytes($data,$p,4); - $chunkType = substr($data,$p+4,4); -// echo $chunkType.' - '.$chunkLen.'
'; - - switch($chunkType){ - case 'IHDR': - // this is where all the file information comes from - $info['width']=$this->PRVT_getBytes($data,$p+8,4); - $info['height']=$this->PRVT_getBytes($data,$p+12,4); - $info['bitDepth']=ord($data[$p+16]); - $info['colorType']=ord($data[$p+17]); - $info['compressionMethod']=ord($data[$p+18]); - $info['filterMethod']=ord($data[$p+19]); - $info['interlaceMethod']=ord($data[$p+20]); -//print_r($info); - $haveHeader=1; - if ($info['compressionMethod']!=0){ - $error=1; - $errormsg = 'unsupported compression method'; - } - if ($info['filterMethod']!=0){ - $error=1; - $errormsg = 'unsupported filter method'; - } - break; - case 'PLTE': - $pdata.=substr($data,$p+8,$chunkLen); - break; - case 'IDAT': - $idata.=substr($data,$p+8,$chunkLen); - break; - case 'tRNS': - //this chunk can only occur once and it must occur after the PLTE chunk and before IDAT chunk - //print "tRNS found, color type = ".$info['colorType']."
"; - $transparency = array(); - if ($info['colorType'] == 3) { // indexed color, rbg - /* corresponding to entries in the plte chunk - Alpha for palette index 0: 1 byte - Alpha for palette index 1: 1 byte - ...etc... - */ - // there will be one entry for each palette entry. up until the last non-opaque entry. - // set up an array, stretching over all palette entries which will be o (opaque) or 1 (transparent) - $transparency['type']='indexed'; - $numPalette = strlen($pdata)/3; - $trans=0; - for ($i=$chunkLen;$i>=0;$i--){ - if (ord($data[$p+8+$i])==0){ - $trans=$i; - } - } - $transparency['data'] = $trans; - - } elseif($info['colorType'] == 0) { // grayscale - /* corresponding to entries in the plte chunk - Gray: 2 bytes, range 0 .. (2^bitdepth)-1 - */ -// $transparency['grayscale']=$this->PRVT_getBytes($data,$p+8,2); // g = grayscale - $transparency['type']='indexed'; - $transparency['data'] = ord($data[$p+8+1]); - - } elseif($info['colorType'] == 2) { // truecolor - /* corresponding to entries in the plte chunk - Red: 2 bytes, range 0 .. (2^bitdepth)-1 - Green: 2 bytes, range 0 .. (2^bitdepth)-1 - Blue: 2 bytes, range 0 .. (2^bitdepth)-1 - */ - $transparency['r']=$this->PRVT_getBytes($data,$p+8,2); // r from truecolor - $transparency['g']=$this->PRVT_getBytes($data,$p+10,2); // g from truecolor - $transparency['b']=$this->PRVT_getBytes($data,$p+12,2); // b from truecolor - - } else { - //unsupported transparency type - } - // KS End new code - break; - default: - break; - } - - $p += $chunkLen+12; - } - - if(!$haveHeader){ - $error = 1; - $errormsg = 'information header is missing'; - } - if (isset($info['interlaceMethod']) && $info['interlaceMethod']){ - $error = 1; - $errormsg = 'There appears to be no support for interlaced images in pdf.'; - } - } - - if (!$error && $info['bitDepth'] > 8){ - $error = 1; - $errormsg = 'only bit depth of 8 or less is supported'; - } - - if (!$error){ - if ($info['colorType']!=2 && $info['colorType']!=0 && $info['colorType']!=3){ - $error = 1; - $errormsg = 'transparancey alpha channel not supported, transparency only supported for palette images.'; - } else { - switch ($info['colorType']){ - case 3: - $color = 'DeviceRGB'; - $ncolor=1; - break; - case 2: - $color = 'DeviceRGB'; - $ncolor=3; - break; - case 0: - $color = 'DeviceGray'; - $ncolor=1; - break; - } - } - } - if ($error){ - $this->addMessage('PNG error - ('.$file.') '.$errormsg); - return; - } - if ($w==0){ - $w=$h/$info['height']*$info['width']; - } - if ($h==0){ - $h=$w*$info['height']/$info['width']; - } -//print_r($info); - // so this image is ok... add it in. - $this->numImages++; - $im=$this->numImages; - $label='I'.$im; - $this->numObj++; -// $this->o_image($this->numObj,'new',array('label'=>$label,'data'=>$idata,'iw'=>$w,'ih'=>$h,'type'=>'png','ic'=>$info['width'])); - $options = array('label'=>$label,'data'=>$idata,'bitsPerComponent'=>$info['bitDepth'],'pdata'=>$pdata - ,'iw'=>$info['width'],'ih'=>$info['height'],'type'=>'png','color'=>$color,'ncolor'=>$ncolor); - if (isset($transparency)){ - $options['transparency']=$transparency; - } - $this->o_image($this->numObj,'new',$options); - - $this->objects[$this->currentContents]['c'].="\nq"; - $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$w)." 0 0 ".sprintf('%.3f',$h)." ".sprintf('%.3f',$x)." ".sprintf('%.3f',$y)." cm"; - $this->objects[$this->currentContents]['c'].="\n/".$label.' Do'; - $this->objects[$this->currentContents]['c'].="\nQ"; -} - -/** -* add a JPEG image into the document, from a file -*/ -function addJpegFromFile($img,$x,$y,$w=0,$h=0){ - // attempt to add a jpeg image straight from a file, using no GD commands - // note that this function is unable to operate on a remote file. - - if (!file_exists($img)){ - return; - } - - $tmp=getimagesize($img); - $imageWidth=$tmp[0]; - $imageHeight=$tmp[1]; - - if (isset($tmp['channels'])){ - $channels = $tmp['channels']; - } else { - $channels = 3; - } - - if ($w<=0 && $h<=0){ - $w=$imageWidth; - } - if ($w==0){ - $w=$h/$imageHeight*$imageWidth; - } - if ($h==0){ - $h=$w*$imageHeight/$imageWidth; - } - - $fp=fopen($img,'rb'); - - $tmp = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - $data = fread($fp,filesize($img)); - set_magic_quotes_runtime($tmp); - - fclose($fp); - - $this->addJpegImage_common($data,$x,$y,$w,$h,$imageWidth,$imageHeight,$channels); -} - -/** -* add an image into the document, from a GD object -* this function is not all that reliable, and I would probably encourage people to use -* the file based functions -*/ -function addImage(&$img,$x,$y,$w=0,$h=0,$quality=75){ - // add a new image into the current location, as an external object - // add the image at $x,$y, and with width and height as defined by $w & $h - - // note that this will only work with full colour images and makes them jpg images for display - // later versions could present lossless image formats if there is interest. - - // there seems to be some problem here in that images that have quality set above 75 do not appear - // not too sure why this is, but in the meantime I have restricted this to 75. - if ($quality>75){ - $quality=75; - } - - // if the width or height are set to zero, then set the other one based on keeping the image - // height/width ratio the same, if they are both zero, then give up :) - $imageWidth=imagesx($img); - $imageHeight=imagesy($img); - - if ($w<=0 && $h<=0){ - return; - } - if ($w==0){ - $w=$h/$imageHeight*$imageWidth; - } - if ($h==0){ - $h=$w*$imageHeight/$imageWidth; - } - - // gotta get the data out of the img.. - - // so I write to a temp file, and then read it back.. soo ugly, my apologies. - $tmpDir='/tmp'; - $tmpName=tempnam($tmpDir,'img'); - imagejpeg($img,$tmpName,$quality); - $fp=fopen($tmpName,'rb'); - - $tmp = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - $fp = @fopen($tmpName,'rb'); - if ($fp){ - $data=''; - while(!feof($fp)){ - $data .= fread($fp,1024); - } - fclose($fp); - } else { - $error = 1; - $errormsg = 'trouble opening file'; - } -// $data = fread($fp,filesize($tmpName)); - set_magic_quotes_runtime($tmp); -// fclose($fp); - unlink($tmpName); - $this->addJpegImage_common($data,$x,$y,$w,$h,$imageWidth,$imageHeight); -} - -/** -* common code used by the two JPEG adding functions -* -* @access private -*/ -function addJpegImage_common(&$data,$x,$y,$w=0,$h=0,$imageWidth,$imageHeight,$channels=3){ - // note that this function is not to be called externally - // it is just the common code between the GD and the file options - $this->numImages++; - $im=$this->numImages; - $label='I'.$im; - $this->numObj++; - $this->o_image($this->numObj,'new',array('label'=>$label,'data'=>$data,'iw'=>$imageWidth,'ih'=>$imageHeight,'channels'=>$channels)); - - $this->objects[$this->currentContents]['c'].="\nq"; - $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$w)." 0 0 ".sprintf('%.3f',$h)." ".sprintf('%.3f',$x)." ".sprintf('%.3f',$y)." cm"; - $this->objects[$this->currentContents]['c'].="\n/".$label.' Do'; - $this->objects[$this->currentContents]['c'].="\nQ"; -} - -/** -* specify where the document should open when it first starts -*/ -function openHere($style,$a=0,$b=0,$c=0){ - // this function will open the document at a specified page, in a specified style - // the values for style, and the required paramters are: - // 'XYZ' left, top, zoom - // 'Fit' - // 'FitH' top - // 'FitV' left - // 'FitR' left,bottom,right - // 'FitB' - // 'FitBH' top - // 'FitBV' left - $this->numObj++; - $this->o_destination($this->numObj,'new',array('page'=>$this->currentPage,'type'=>$style,'p1'=>$a,'p2'=>$b,'p3'=>$c)); - $id = $this->catalogId; - $this->o_catalog($id,'openHere',$this->numObj); -} - -/** -* create a labelled destination within the document -*/ -function addDestination($label,$style,$a=0,$b=0,$c=0){ - // associates the given label with the destination, it is done this way so that a destination can be specified after - // it has been linked to - // styles are the same as the 'openHere' function - $this->numObj++; - $this->o_destination($this->numObj,'new',array('page'=>$this->currentPage,'type'=>$style,'p1'=>$a,'p2'=>$b,'p3'=>$c)); - $id = $this->numObj; - // store the label->idf relationship, note that this means that labels can be used only once - $this->destinations["$label"]=$id; -} - -/** -* define font families, this is used to initialize the font families for the default fonts -* and for the user to add new ones for their fonts. The default bahavious can be overridden should -* that be desired. -*/ -function setFontFamily($family,$options=''){ - if (!is_array($options)){ - if ($family=='init'){ - // set the known family groups - // these font families will be used to enable bold and italic markers to be included - // within text streams. html forms will be used... - $this->fontFamilies['Helvetica.afm']=array( - 'b'=>'Helvetica-Bold.afm' - ,'i'=>'Helvetica-Oblique.afm' - ,'bi'=>'Helvetica-BoldOblique.afm' - ,'ib'=>'Helvetica-BoldOblique.afm' - ); - $this->fontFamilies['Courier.afm']=array( - 'b'=>'Courier-Bold.afm' - ,'i'=>'Courier-Oblique.afm' - ,'bi'=>'Courier-BoldOblique.afm' - ,'ib'=>'Courier-BoldOblique.afm' - ); - $this->fontFamilies['Times-Roman.afm']=array( - 'b'=>'Times-Bold.afm' - ,'i'=>'Times-Italic.afm' - ,'bi'=>'Times-BoldItalic.afm' - ,'ib'=>'Times-BoldItalic.afm' - ); - } - } else { - // the user is trying to set a font family - // note that this can also be used to set the base ones to something else - if (strlen($family)){ - $this->fontFamilies[$family] = $options; - } - } -} - -/** -* used to add messages for use in debugging -*/ -function addMessage($message){ - $this->messages.=$message."\n"; -} - -/** -* a few functions which should allow the document to be treated transactionally. -*/ -function transaction($action){ - switch ($action){ - case 'start': - // store all the data away into the checkpoint variable - $data = get_object_vars($this); - $this->checkpoint = $data; - unset($data); - break; - case 'commit': - if (is_array($this->checkpoint) && isset($this->checkpoint['checkpoint'])){ - $tmp = $this->checkpoint['checkpoint']; - $this->checkpoint = $tmp; - unset($tmp); - } else { - $this->checkpoint=''; - } - break; - case 'rewind': - // do not destroy the current checkpoint, but move us back to the state then, so that we can try again - if (is_array($this->checkpoint)){ - // can only abort if were inside a checkpoint - $tmp = $this->checkpoint; - foreach ($tmp as $k=>$v){ - if ($k != 'checkpoint'){ - $this->$k=$v; - } - } - unset($tmp); - } - break; - case 'abort': - if (is_array($this->checkpoint)){ - // can only abort if were inside a checkpoint - $tmp = $this->checkpoint; - foreach ($tmp as $k=>$v){ - $this->$k=$v; - } - unset($tmp); - } - break; - } - -} - -} // end of class - -?> \ No newline at end of file diff --git a/addon/data.txt b/addon/data.txt deleted file mode 100644 index 303f07191..000000000 --- a/addon/data.txt +++ /dev/null @@ -1,1400 +0,0 @@ -# this is the text which will end up within readme.pdf, when processed -# by readme.php. -# -# the syntax being used is fairly obvious: -# -# a line starting with '#' is a comment or a directive -# 1 is a first level heading (text is 'title') -# 2<heading> is a second level heading (text is 'heading') -# -# the table of contents is automatically generated from the titles and headings. -# -# "#NP" starts a new page -# "#C" starts a code section (put this on a line by itself -# "#c" end the code section -# "#X" and "#x" surround a block which will be executed as php code. -# -# <b></b> <i></i> can be used within the text with gleeful abandon -# -# a link can be added within the text using <c:alink:url_here>label</c:alink> - - -1<Introduction> - -This class is designed to provide a <b>non-module</b>, non-commercial alternative to dynamically creating pdf documents from within PHP. -Obviously this will not be quite as quick as the module alternatives, but it is surprisingly fast, this demonstration page is almost a worst case due to the large number of fonts which are displayed. -There are a number of features which can be within a Pdf document that it is not at the moment possible to use with this class, but I feel that it is useful enough to be released. - -This document describes the possible useful calls to the class, the readme.php file (which will create this pdf) should be sufficient as an introduction. - -Note that this document was generated using the demo script 'readme.php' which came with this package. - -1<Changes> - - -2<version 009> - -- support for underlining in the ezPdf class (but only in the base class functions using the callback function directly). -- improvements to the underlining of the links, so that it is sized and positioned better, will work with angled text now. -- automatic column support. -- some improvements to the table functions. Can set row and column gaps. The table will not now split rows across pages by default. -- addition of transaction control support to the base class (this is quite useful, recommend advanced users take special note). -- numerous small bug fixes, including notably some bugs relating to the inclusion of fonts, especially when using the differences array to take care of characters normally outside the default set. - - -2<version 008> - -changes to class.pdf.php: - -- adjustment to the way that type 1 fonts are loaded to make them more reliable -- changes to that angled text can use bold and italic tags -- implemented file encryption, which gives the ability to restrict user cut and paste, or printing. -- added callback functions activated by text markers, see the misc section for full decription. -- allow object to be added on the 'next' page. -- extended the newPage function to allow insertion of extra pages between existing pages. -- adjustment to ellipse function to allow partial curves. - -changes to class.ezpdf.php: - -- made the column headings in the tables have the same alignment as the settings for the column data. -- adjusted the size of an A4 page to be more accurate. -- fixed the table title alignment to stay centered on the table if the table position is fixed on the page -- used callback functions to add clickable links to the text. -- implemented a better algorithm for determining table widths when it needs to be shrunk to width. -- changed ezTable and ezText to return the y-position. -- made the page numbering system more functional. -- added insert page functionality. -- added link capability to tables, can specify one column to be links, using another column as URLs. - - -2<version 007> - -This is it - the james bond version - though all similarity ends with the name, but there are some funky new features and a few bug fixes. - -The ezTable features have been extended, it is now possible to define the justification of the individual columns, and to specify colum widths as well as the width of the entire table. - -You can now have <b>extra fonts!</b>. It is possible to add type 1 postscript fonts, or TrueType fonts. Though note that for the postscript font you have to have both a .pfb file and a .afm file - but there are free products out there which can convert a .pfa to a .pfb. Also to use a TrueType file you have to have a corersponding .afm file as this is required to specify the character widths - luckily there is a program which will generate one from a ttf file. - -Bugfixes: -- fix the open font command so that the font file can be in the same directory. -- fix a bug with full justification, a space was being left at the end of each line - the justification now lines up much better. -- added some binary characters near the start of the pdf file, this is so that transfer programs will recognise it as binary. -- adjusted addTextWrap so that a text angle can now be supplied. -- have found that the reasona that jpeg file loading was not working for a lot of people is that if magic_quotes_runtime is set on in the php.ini file, then the file read is not binary safe. Adjusted the code to turn that option off before the read, then on again afterwards - there is at least one report of it working much better now. -- added the missing code to specify the xPos of a table - this was documented in the last version, but someone forgot to code it. - - -2<version 006> - -Still more bug fixes of course, but also some improved functionality. - -It is now possible to use <b></b><i></i> markers within the text stream to do the obvious functionality. This depends on 'font families' being set up, which are described later. - -The table functionality within ezPdf has been enhanced so that the width of a table can be specified and the cell contents will be wrapped to fit. - -There is some trial functionality to allow the specification of adjusted character maps, this does mean that this version will have to re-create your 'php_<font>.afm' files, but it will do it automatically on first use, <b>but make sure you have the adobe .afm files in the directory and that the web-server has write access</b>, alternatively download the new ones. - -Also there has been a slight attempt to tidy the code a little, and improve the documentation. This is partly in preparation for this project to be put into SourceForge, as it will be immediatly following this release. - -2<version 005> - -Contains a few bug fixes from 004, and the addition of the capability to draw arbitrary Bezier curves, and ellipses at arbitrary angles. - -2<version 004> - -This release includes a certain amount of functionality which should have been in 003. The enhancements are: -- page numbering easily done within ezpdf, they can be started and stopped on any page, uses an arbitrary template for the format, and can be set to start numbering pages from a given number. -- can now pass content-disposition through to the headers, for what it is worth -- having the 'Accept-Ranges' header set is optional, and off by default - seemed to cause problems. -- lines can now have their width, dash patterns, join types and endings set. -- there is now a reopenObject function which will allow adding content to previous objects, as long as the id has been stored. This function will also now work on pages, and the newpage() function now returns an id so that these can be accessed. -- the first page of course does not return an id, so there is a getFirstPageId() function to find that one. - -2<notes from version 003> - -This is the document accompanying version 003 of this pdf class, the significant changes in this class version are: -- Creation of the ezpdf class, an extension to the base class to make life simpler. -Inclusion of compression within the content streams, code from Andrea Gagliardi (thanks). -- A new image function which will include a jpeg file straight from the file, so image inclusion without using GD. -- An extra content header, might improve life on some browsers (thanks John Arthur). - - -1<Use> - -It is free for use for any purpose (public domain), though we would prefer it if you retain the notes at the top of the class containing the authorship, and feedback details. - -Note that there is no guarantee or warranty, implied or otherwise with this class, or the extension. - -1<Extensions> - -In order to create simple documents with ease a class extension called 'ezPdf' has been developed, at the moment this includes auto page numbering, tabular data presentation, text wrapping to new pages, etc. This document has been created using mostly ezPdf functions. - -The functions of ezpdf are described in the next section, though as it is a class extension, all of the basic functions from the original class are still available. - -Please excuse this blatant 'plug', but if your company wishes some customization of these routines for your purposes, R&OS can do this at very reasonable rates, just drop us a line at info@ros.co.nz. - -#NP -1<EZPDF Class Extension> - - -(note that the creation of this document in readme.php was converted to ezpdf with the saving of many lines of code). - -It is anticipated that in practise only the simplest of documents will be able to be created using just ezpdf functions, they should be used in conjunction with the base class functions to achieve the desired result. - - -2<Cezpdf> - -Cezpdf([paper='a4'],[orientation='portrait']) - -This is the constructor function, and allows the user to set up a basic page without having to know exactly how many units across and up the page is going to be. -Valid values for paper are listed below, a two or four member array can also be passed, a two member array will be interpreted as the size of the page in centimeters, and a four member array will be the size of the page in points, similar to the call to the base calss constructor function. -Valid values for orientation are 'portrait','landscape'. -Starting ezpdf with the code below will create an a4 portrait document. - -#C -$pdf =& new Cezpdf(); -#c - -If you want to get started in an easy manner, then here is the 'hello world' program: - -#C -<?php -include ('class.ezpdf.php'); -$pdf =& new Cezpdf(); -$pdf->selectFont('./fonts/Helvetica.afm'); -$pdf->ezText('Hello World!',50); -$pdf->ezStream(); -?> -#c - -Note that some people have reported that this gives an error - it appears that some builds of PHP do not support the =& operator, if you are having problems then try changing the class instantiation line to: -#C -$pdf = new Cezpdf(); -#c - -The valid values for the paper (thanks to the work of Nicola Asuni) are: - -'4A0' (4767.87,6740.79), '2A0' (3370.39,4767.87), 'A0' (2383.94,3370.39), 'A1' (1683.78,2383.94), 'A2' (1190.55,1683.78), 'A3' (841.89,1190.55), 'A4' (595.28,841.89), 'A5' (419.53,595.28), 'A6' (297.64,419.53), 'A7' (209.76,297.64), 'A8' (147.40,209.76), 'A9' (104.88,147.40), 'A10' (73.70,104.88), 'B0' (2834.65,4008.19), 'B1' (2004.09,2834.65), 'B2' (1417.32,2004.09), 'B3' (1000.63,1417.32), 'B4' (708.66,1000.63), 'B5' (498.90,708.66), 'B6' (354.33,498.90), 'B7' (249.45,354.33), 'B8' (175.75,249.45), 'B9' (124.72,175.75), 'B10' (87.87,124.72), 'C0' (2599.37,3676.54), 'C1' (1836.85,2599.37), 'C2' (1298.27,1836.85), 'C3' (918.43,1298.27), 'C4' (649.13,918.43), 'C5' (459.21,649.13), 'C6' (323.15,459.21), 'C7' (229.61,323.15), 'C8' (161.57,229.61), 'C9' (113.39,161.57), 'C10' (79.37,113.39), 'RA0' (2437.80,3458.27), 'RA1' (1729.13,2437.80), 'RA2' (1218.90,1729.13), 'RA3' (864.57,1218.90), 'RA4' (609.45,864.57), 'SRA0' (2551.18,3628.35), 'SRA1' (1814.17,2551.18), 'SRA2' (1275.59,1814.17), 'SRA3' (907.09,1275.59), 'SRA4' (637.80,907.09), 'LETTER' (612.00,792.00), 'LEGAL' (612.00,1008.00), 'EXECUTIVE' (521.86,756.00), 'FOLIO' (612.00,936.00) - - -2<ezSetMargins> - -ezSetMargins(top,bottom,left,right) - -Sets the margins for the document, this command is optional and they will all be set to 30 by default. Setting these margins does not stop you writing outside them using the base class functions, but the ezpdf functions will wrap onto a new page when they hit the bottom margin, and will not write over the side margins when using the <b>ezText</b> command below. - -2<ezSetCmMargins> - -ezSetCmMargins(top,bottom,left,right) - -Sets the margins for the document using centimeters - -2<ezNewPage> - -ezNewPage() - -Starts a new page. This is subtly different to the newPage command in the base class as it also places the ezpdf writing pointer back to the top of the page. So if you are using the ezpdf text functions, then this is the one to use when manually requesting a new page. - -2<ezInsertMode> - -ezInsertMode([status=1,$pageNum=1,$pos='before']) - -This command can be used to stop and start page insert mode, while this mode is on then any new page will be inserted into the midst of the document. If it is called with status=1, then insert mode is started and subsequent pages are added before or after page number 'pageNum'. 'pos' can be set to 'before' or 'after' to define where the pages are put. The 'pageNum' is set to which page number this position is relative to. - -All subsequent pages added with ezNewPage are then inserted within the document following the last inserted page. - -Insertion page is ended by calling this command with 'status'=0, and further pages are added to the end of the document. - -2<ezSetY> - -ezSetY(y) - -Positions the ezpdf writing pointer to a particular height on the page, don't forget that pdf documents have <b>y-coordinates which are zero at the bottom of the page and increase as they go up</b> the page. - -2<ezSetDy> - -ezSetDy(dy [,mod]) - -Changes the vertical position of the writing point by a set amount, so to move the pointer 10 units down the page (making a gap in the writing), use: - -#C -ezSetDy(-10) -#c - -If this movement makes the writing location below the bottom margin, then a new page will automatically be made, and the pointer moved to the top of it. - -The optional parameter 'mod' can be set to the value 'makeSpace', which means that if a new page is forced, then the pointer will be moved the distance 'dy' on the new page as well. The intention of this is if you needed 100 units of space to draw a picture, then doing: - -#C -ezSetDy(-100,'makeSpace') -#c - -guarantees that there will be 100 units of space above the final writing point. - -2<ezTable> - -y=ezTable(array data,[array cols],[title],[array options] - -The easy way to throw a table of information onto the page, can be used with just the data variable, which must contain a two dimensional array of data. This function was made with data extracted from database queries in mind, so is expecting it in that format, a two dimensional array with the first array having one entry for each row (and each of those is another array). - -The table will start writing from the current writing point, and will proceed until the all the data has been presented, by default, borders will be drawn, alternate limes will be shaded gray, and the table will wrap over pages, re-printing the headers at the top of each page. - -The return value from the function is the y-position of the writing pointer after the table has been added to the document. - -The other options are described here: - -$cols (optional) is an associative array, the keys are the names of the columns from $data to be presented (and in that order), the values are the titles to be given to the columns, if this is not wanted, but you do want later options then '' (the empty string) is a suitable placeholder. - -$title (optional) is the title to be put on the top of the table - -$options is an associative array which can contain: - 'showLines'=> 0,1,2, default is 1 (1->show the borders, 0->no borders, 2-> show borders AND lines between rows.) - 'showHeadings' => 0 or 1 - 'shaded'=> 0,1,2, default is 1 (1->alternate lines are shaded, 0->no shading, 2->both sets are shaded) - 'shadeCol' => (r,g,b) array, defining the colour of the shading, default is (0.8,0.8,0.8) - 'shadeCol2' => (r,g,b) array, defining the colour of the shading of the second set, default is (0.7,0.7,0.7), used when 'shaded' is set to 2. - 'fontSize' => 10 - 'textCol' => (r,g,b) array, text colour - 'titleFontSize' => 12 - 'rowGap' => 2 , the space between the text and the row lines on each row - 'colGap' => 5 , the space between the text and the column lines in each column - 'lineCol' => (r,g,b) array, defining the colour of the lines, default, black. - 'xPos' => 'left','right','center','centre',or coordinate, reference coordinate in the x-direction - 'xOrientation' => 'left','right','center','centre', position of the table w.r.t 'xPos'. This entry is to be used in conjunction with 'xPos' to give control over the lateral position of the table. - 'width' => <number>, the exact width of the table, the cell widths will be adjusted to give the table this width. - 'maxWidth' => <number>, the maximum width of the table, the cell widths will only be adjusted if the table width is going to be greater than this. - 'cols' => array(<colname>=>array('justification'=>'left','width'=>100,'link'=><linkColName>),<colname>=>....) ,allow the setting of other paramaters for the individual columns, each column can have its width and/or its justification set. - 'innerLineThickness' => <number>, the thickness of the inner lines, defaults to 1 - 'outerLineThickness' => <number>, the thickness of the outer lines, defaults to 1 - 'protectRows' => <number>, the number of rows to keep with the heading, if there are less than this on a page, then all is moved to the next page. - -Note that the user will have had to have made a font selection already or this will not produce a valid pdf file. - -Note that in version 009, with the introduction of colGap and rowGap, the defaults for these have changed slightly, so default tables may appear slightly different, it will pay to check your documents if this is likely to cause a formatting problem for you. Problems could also be caused by the new default behaviour to not allow rows to be split across page boundaries. Another possible problem is that 'titleGap' was removed, as it was felt that this functionality was replaced by rowGap and colGap. - -A simple table example: - -#C -<?php -include ('class.ezpdf.php'); -$pdf =& new Cezpdf(); -$pdf->selectFont('./fonts/Helvetica.afm'); - -$data = array( - array('num'=>1,'name'=>'gandalf','type'=>'wizard') -,array('num'=>2,'name'=>'bilbo','type'=>'hobbit','url'=>'http://www.ros.co.nz/pdf/') -,array('num'=>3,'name'=>'frodo','type'=>'hobbit') -,array('num'=>4,'name'=>'saruman','type'=>'bad dude','url'=>'http://sourceforge.net/projects/pdf-php') -,array('num'=>5,'name'=>'sauron','type'=>'really bad dude') -); - -$pdf->ezTable($data); - -$pdf->ezStream(); -?> -#c - -#X -$pdf->selectFont('./fonts/Helvetica.afm'); - -$data = array( - array('num'=>1,'name'=>'gandalf','type'=>'wizard') -,array('num'=>2,'name'=>'bilbo','type'=>'hobbit','url'=>'http://www.ros.co.nz/pdf/') -,array('num'=>3,'name'=>'frodo','type'=>'hobbit') -,array('num'=>4,'name'=>'saruman','type'=>'bad dude','url'=>'http://sourceforge.net/projects/pdf-php') -,array('num'=>5,'name'=>'sauron','type'=>'really bad dude') -); - -$pdf->ezTable($data); -#x - -For a slightly more complex example, print that table again, but only the second and third columns, and in the other order, also have column headings and a table heading. - -#C -$pdf->ezTable($data,array('type'=>'Type','name'=>'<i>Alias</i>') - ,'Some LOTR Characters'); -#c - -#X -$pdf->selectFont('./fonts/Helvetica.afm'); -$pdf->ezTable($data,array('type'=>'Type','name'=>'<i>Alias</i>') - ,'Some LOTR Characters'); -#x - -and the same, but with no headings or shading, or lines: - -#C -$pdf->ezTable($data,array('type'=>'Type','name'=>'<i>Alias</i>') - ,'Some LOTR Characters' - ,array('showHeadings'=>0,'shaded'=>0,'showLines'=>0)); -#c - -#X -$pdf->selectFont('./fonts/Helvetica.afm'); -$pdf->ezTable($data,array('type'=>'Type','name'=>'<i>Alias</i>') - ,'' - ,array('showHeadings'=>0,'shaded'=>0,'showLines'=>0)); -#x - -Now a version with the width specified to be too small, so that the content has to wrap, and the table oriented over the the right. - -#C -$pdf->ezTable($data,array('type'=>'','name'=>''),'' - ,array('showHeadings'=>0,'shaded'=>0,'xPos'=>'right' - ,'xOrientation'=>'left','width'=>100)); -#c - -#X -$pdf->selectFont('./fonts/Helvetica.afm'); -$pdf->ezTable($data,array('type'=>'','name'=>'') - ,'' - ,array('showHeadings'=>0,'shaded'=>0,'xPos'=>'right','xOrientation'=>'left','width'=>100)); -#x - -Now the column headings have been changed, one to a long name which wraps, and also have a return code in it. The 'num' column has been right justified, and the 'name' column fixed to a width of 100. The entire table is fixed to a width of 300. The x position of the table is also fixed to 90, and the table is set to be on the right of this point. - -#C -$cols = array('num'=>"number a a a a a a a a a a a a a a a\nmore" - ,'name'=>'Name','type'=>'Type'); - -$pdf->ezTable($data,$cols,'', - array('xPos'=>90,'xOrientation'=>'right','width'=>300 - ,'cols'=>array( - 'num'=>array('justification'=>'right') - ,'name'=>array('width'=>100)) - )); -#c - -#X -$pdf->selectFont('./fonts/Helvetica.afm'); -$cols = array('num'=>"number a a a a a a a a a a a a a a a\nmore",'name'=>'Name','type'=>'Type'); - -$pdf->ezTable($data,$cols,'',array('xPos'=>90,'xOrientation'=>'right','width'=>300 - ,'cols'=>array('num'=>array('justification'=>'right'),'name'=>array('width'=>100)) - )); -#x - -A simple example, showing the table expanding to fit the specified width, and having links on one of the table columns. - -#C -$pdf->ezTable($data,array('type'=>'','name'=>''),'' - ,array('showHeadings'=>0 - ,'shaded'=>0 - ,'width'=>400 - ,'cols'=>array('name'=>array('link'=>'url')) )); -#c - -#X -$pdf->selectFont('./fonts/Helvetica.afm'); -$pdf->ezTable($data,array('type'=>'','name'=>'') - ,'' - ,array('showHeadings'=>0,'shaded'=>0,'width'=>400 - ,'cols'=>array('name'=>array('link'=>'url')) - )); -#x - - -2<ezText> - -y=ezText(text,[size],[array options]) - -This is designed for putting blocks of text onto the page. It will add a string of text to the document (note that the string can be very large, spanning multiple pages), starting at the current drawing position. It will wrap to keep within the margins, including optional offsets from the left and the right, if $size is not specified, then it will be the last one used, or the default value (12 I think). The text will go to the start of the next line when a return code "\n" is found. - -The return value from the function (y) is the vertical position on the page of the writing pointer, after the text has been added. - -possible options are: - 'left'=> number, gap to leave from the left margin - 'right'=> number, gap to leave from the right margin - 'aleft'=> number, absolute left position (overrides 'left') - 'aright'=> number, absolute right position (overrides 'right') - 'justification' => 'left','right','center','centre','full' - - only set one of the next two items (leading overrides spacing) - 'leading' => number, defines the total height taken by the line, independent of the font height. - 'spacing' => a real number, though usually set to one of 1, 1.5, 2 (line spacing as used in word processing) - -This function now supports the use of underlining markers (<u> </u>), these are implemented via a callback function, which is information that you need only of you want to use them in functions in the base class, as these markers will not work there and the full callback function markers wil have to be used (though note that ezPdf stillhas to be part of the class object as the callback function are included with that code base. The callback function markers would look like <c:uline>this</c:uline>. - - -2<ezImage> - -ezImage(image,[padding],[width],[resize],[justification],[array border]) - -This function makes it much easier to simply place an image (either jpeg or png) within the flow of text within a document. Although this function can certainly be used with full page documents, its functionality is most suited to documents that are formatted in multiple columns. - -This function can be used by simply supplying the name of an image file as the first argument. The image will be resized to fit centered within the current column with the default padding of 5 on each side. - -The arguments are: - -$image is a string containing the filename and path of the jpeg or png image you want to insert into the page. If allow_url_fopen is enabled in the PHP ini settings this can be an HTTP or FTP URL. - -$padding (optional) is the number of page units that will pad the image on all sides. The default is five (5). If you do not want any padding, you may enter 0. - -$width (optional) is the width of the image on the page. The default is to use the actual width of the image in pixels. Whether or not you specify a width, the actual width of the image on the page will depend on what you enter for the $resize argument as well as the placement of the image on the page. - -$resize (optional) can be one of 'full', 'width', or 'none'. The default value is 'full'. - -The value 'none' means that an image will not be sized up to fit the width of a column and will not be sized down vertically to fit within the current page. If the image is too long to fit on the page it will be placed on the next page or column. If the image is too wide to fit within the current column, it will still be sized down. This is because there is no alternative, other than to actually let the image run off the page. - -The value 'width' behaves the same as 'none' with the exception that images will be resized to fit the width of the current column if the given width is smaller that the current column (minus the padding). - -The value 'full' behaves the same as 'width' with the exception that images will be resized down vertically to fit within the current page and column if their height is too long to fit. - -$justification (optional) determines the horizontal position of the image within the current column. The default is 'center', and can be specified as either 'center', 'left', or 'right'. This setting has little meaning if the image has been resized to fit the column and only makes a practical difference if the width of the image is smaller than the width of the column. - -$border (optional) is an array which specifies the details of the border around the image. The default is no border if this argument is not given. You may specify any of the following border elements: - -$border['width'] is the width of the border. The default is 1. -$border['cap'] is the cap type as specified in setLineStyle. The default is 'round'. -$border['join'] is the join type as specified in setLineStyle. The default is 'round'. -$border['color'] is an associative array for specifying the line color of the border. -The values are as specified in setStrokeColor and should be assigned to: -$border['color']['red'], $border['color']['green'] and $border['color']['blue'] respectively. - - -2<ezStartPageNumbers> - -setNum = ezStartPageNumbers(x,y,size,[pos],[pattern],[num]) - - Add page numbers on the pages from here, place then on the 'pos' side of the coordinates (x,y) (pos can be 'left' or 'right'). - Use the given 'pattern' for display, where {PAGENUM} and {TOTALPAGENUM} are replaced as required, by default the pattern is set to '{PAGENUM} of {TOTALPAGENUM}' - If $num is set, then make the first page this number, the number of total pages will be adjusted to account for this. - - the following code produces a seven page document, numbered from the second page (which will be labelled '1 of 6'), and numbered until the 6th page (labelled '5 of 6') - -#C -$pdf = new Cezpdf(); -$pdf->selectFont('./fonts/Helvetica.afm'); -$pdf->ezNewPage(); -$pdf->ezStartPageNumbers(300,500,20,'','',1); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$pdf->line(300,400,300,600); // line drawn to check 'pos' is working -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$pdf->ezStopPageNumbers(); -$pdf->ezStream(); -#c - -This function was modified in version 009 to return a page numbering set number (setNum in the call above), this allows independent numbering schemes to be started and stopped within a single document. This number is passed back into <i>ezStopPageNumbers</i> when it is called. - -Here is a more complex example: - -#C - -$pdf->selectFont('./fonts/Helvetica'); -$pdf->ezNewPage(); -$i=$pdf->ezStartPageNumbers(300,500,20,'','',1); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$pdf->ezStopPageNumbers(1,1,$i); -$pdf->ezNewPage(); -$i=$pdf->ezStartPageNumbers(300,500,20,'','',1); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$pdf->ezStopPageNumbers(1,1,$i); -$pdf->ezNewPage(); -$i=$pdf->ezStartPageNumbers(300,500,20,'','',1); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$pdf->setColor(1,0,0); -$pdf->ezNewPage(); -$pdf->ezStopPageNumbers(1,1,$i); -$pdf->ezNewPage(); -$i=$pdf->ezStartPageNumbers(300,500,20,'','',1); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$j=$pdf->ezStartPageNumbers(300,400,20,'','',1); -$k=$pdf->ezStartPageNumbers(300,300,20,'','',1); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$pdf->ezStopPageNumbers(1,1,$i); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -$pdf->ezStopPageNumbers(1,1,$j); -$pdf->ezStopPageNumbers(0,1,$k); -$pdf->ezNewPage(); -$pdf->ezNewPage(); -#c - -This will create a document with 23 pages, the numbering shown on each of the pages is: - -#X -$array = array( -array('p'=>1,'c'=>'blank') -,array('p'=>2,'c'=>'1 of 3') -,array('p'=>3,'c'=>'2 of 3') -,array('p'=>4,'c'=>'3 of 3') -,array('p'=>5,'c'=>'1 of 3') -,array('p'=>6,'c'=>'2 of 3') -,array('p'=>7,'c'=>'3 of 3') -,array('p'=>8,'c'=>'1 of 3') -,array('p'=>9,'c'=>'2 of 3') -,array('p'=>10,'c'=>'3 of 3') -,array('p'=>11,'c'=>'4 of 4') -,array('p'=>12,'c'=>'1 of 8') -,array('p'=>13,'c'=>'2 of 8') -,array('p'=>14,'c'=>'3 of 8') -,array('p'=>15,'c'=>'4 of 8') -,array('p'=>16,'c'=>'5 of 8, 1 of 6, 1 of 8') -,array('p'=>17,'c'=>'6 of 8, 2 of 6, 2 of 8') -,array('p'=>18,'c'=>'7 of 8, 3 of 6, 3 of 8') -,array('p'=>19,'c'=>'8 of 8, 4 of 6, 4 of 8') -,array('p'=>20,'c'=>'5 of 6, 5 of 8') -,array('p'=>21,'c'=>'6 of 6, 6 of 8') -,array('p'=>22,'c'=>'blank') -,array('p'=>23,'c'=>'blank') -); -$pdf->ezTable($array,array('p'=>'page','c'=>'contents')); -#x - - -2<ezWhatPageNumber> - -num = ezWhatPageNumber(pageNum,[setNum]) - -Returns the number of a page within the specified page numbering system. - -'pageNum' => the absolute number of the page within the document (this is based on the order that they are created). -'setNum' => the page numbering set, returned from the <i>ezStartPageNumbers</i> command. - - -2<ezStopPageNumbers> - -ezStopPageNumbers([stopTotal],[next],[setNum]) - -In version 009 this function was enhanced to include a number of extra parameters: - -'stopTotal' => 0 or 1 (default 0), stops the totaling for the page numbering set. So for example if you start numbering a 10 page document on the second page, and stop it on the 4th page, with stopTotal set to 1, then the numbers will be reported as "x of 3". -'next' => 0 or 1, stops on the next page, not this one. -'setNum' => (defaults to 0) define which set number is to be stopped, this is the number returned from the <i>ezStartPageNumbers</i> command. - -2<ezOutput> - -ezOutput([debug]) - -Very similar to the output function from the base class, but performs any closing tasks that ezpdf requires, such as adding the page numbers. - -If you are using ezpdf, then you should use this function, rather than the one from the base class. - -2<ezStream> - -ezStream([options]) - -Very similar to the stream function from the base class (all the same options, see later in this document), but performs any closing tasks that ezpdf requires, such as adding the page numbers. - -If you are using ezpdf, then you should use this function, rather than the one from the base class. - -2<ezColumnsStart> - -ezColumnsStart([options]) - -This will start the text flowing into columns, <i>options</i> is an array which contains the control options. - -The options are: -'gap' => the gap between the columns -'num' => the number of columns. - -Both options (and the array itself) are optional, if missed out then the defaults are gap=10, num=2; - -Example calls could be (you would use only one of these): - -#C -$pdf->ezColumnsStart(); -$pdf->ezColumnsStart(array('num'=>3)); -$pdf->ezColumnsStart(array('num'=>3,'gap'=>2)); -$pdf->ezColumnsStart(array('gap'=>20)); -#c - -<i>ezColumnStop</i> is used to stop multi-column mode. - -2<ezColumnsStop> - -ezColumnsStop() - -This stops multi-column mode, it will leave the writing point at whatever level it was at, it is recommended that an ezNewPage() command is executed straight after this command, but for flexibility this is left up to the individual consumer. - -2<inline codes> - -There are a few callback functions (see the base class functions for an explanation of callback functions) which are contained within the ezPdf class, these are intended to make life easier. They enable complex operations to be done by including codes within the text stream. - - -<b>Underline</b> - -Though underlining is supported in the ezPdf class by using the <u> directive, if you choose to use the base class functions to add text (such as addtext) then this will not work, instead you can use the <i>uline</i> callback function. - -(Note that what the ezPdf class does internally is convert the <u> and </u> directives into callback function calls) - -So as an example, this code adds some text with two pieces of underlining, one done each way - -#C -$pdf->ezText('The <u>quick brown</u> fox, is <c:uline>sick of jumping</c:uline> the lazy dog') -#c - -The <u>quick brown</u> fox, is <c:uline>sick of jumping</c:uline> the lazy dog - - -<b>Links to URLs</b> - -If you are adding links to a document, it is quite tricky to figure out where to put the rectange which will be clckable, especially if the text in teh link starts wrapping across pages, etc. - -The <i>alink</i> callback allows for simple insertion of links, the format is: - -<c:alink:<i>your_url_here</i>>text to be clickable</c:alink> - - -So as an example: - -#C -$pdf->ezText('<c:alink:http://ros.co.nz/pdf/>R&OS pdf class</c:alink>'); -#c - -<c:alink:http://ros.co.nz/pdf/>R&OS pdf class</c:alink> - -<b>Links within the document</b> - -There is a directive similar to <i>alink</i>, but designed for linking within the document, this is the <i>ilink</i> callback function. - -It is similar to <i>alink</i> except that instead of providing a URL the label of a pre-created destination should be used. - -<c:ilink:<i>destination_label</i>>text to be clickable</c:ilink> - -#C -// place required to be marked -$pdf->addDestination('xxxyyyzzz','Fit'); -// add lots of stuff, new pages etc, then... -$pdf->ezText('<c:ilink:xxxyyyzzz>R&OS pdf class</c:ilink>'); -#c - -Click here to go to the <c:ilink:toc5>5th item</c:ilink> on the table of contents. - -Note that the code for the example and the actual one shown are not identical for technical reasons. - -#NP -1<Base Class Functions> - - -2<addText> - -addText(x,y,size,text,[angle=0],[adjust=0]) - -Add the text at a particular location on the page, noting that the origin on the axes in a pdf document is in the lower left corner by default. -An angle can be supplied as this will do the obvious (in degrees). - -'adjust', gives the value of units to be added to the width of each space within the text. This is used mainly to support the justification options within the ezpdf ezText function. - -The text stream can now (version 006) contain directives to make the text bold and/or italic. The directives are similar the basic html: - -<b><b>bold text</b></b> -<i><i>italic text</i></i> -<b><i><b><i>bold italic text</i></b><i></b> - -<b>Note</b> that there can be no spaces within the directives, and that they must be in lower case. - -By default, these will work only with the supplied fonts, and when the font was selected it must have been specified with the '.afm' suffix. For more information about why this is and how you can customise this behaviour see the <b>setFontFamily</b> command. - -If you do wish to print an actual '<', most of the time it would cause no problem, except in the instance where it would form a directive, in those cases the html replacement for the '<' can be used, "&lt;". In fact if any of the html entities which are supported by the PHP htmlspecialchars command are used, then they will be translated before presentation. - -#C -$pdf->addText(150,$y,10,"the quick brown fox <b>jumps</b> <i>over</i> the lazy dog!",-10); -#c -#X -$pdf->ezSetDy(-40,'makeSpace'); -$pdf->addText(150,$pdf->y,10,"the quick brown fox <b>jumps</b> <i>over</i> the lazy dog!",-10); -$pdf->ezSetDy(-5); -#x - -2<setColor> - -setColor(r,g,b,[force=0]) - -Set the fill colour to the r,g,b triplet, each in the range 0->1. -If force is set, then the entry will be forced into the pdf file, otherwise it will only be put in if it is different from the current state. - -2<setStrokeColor> - -setStrokeColor(r,g,b,[force=0]) - -Set the stroke color, see the notes for the fill color. - -2<setLineStyle> - -setLineStyle([width],[cap],[join],[dash],[phase]) - -This sets the line drawing style. - width, is the thickness of the line in user units - cap is the type of cap to put on the line, values can be 'butt','round','square' where the difference between 'square' and 'butt' is that 'square' projects a flat end past the end of the line. - join can be 'miter', 'round', 'bevel' - dash is an array which sets the dash pattern, is a series of length values, which are the lengths of the on and off dashes. - for example: (2) represents 2 on, 2 off, 2 on , 2 off ... - (2,1) is 2 on, 1 off, 2 on, 1 off.. etc - phase is a modifier on the dash pattern which is used to shift the point at which the pattern starts. - -#C -$pdf->setLineStyle(1); -#c -#X -$pdf->setLineStyle(1); -$pdf->ezSetDy(-8,'makeSpace'); -$pdf->line(100,$pdf->y,400,$pdf->y); -$pdf->ezSetDy(-5); -#x -#C -$pdf->setLineStyle(5); -#c -#X -$pdf->setLineStyle(5); -$pdf->ezSetDy(-8,'makeSpace'); -$pdf->line(100,$pdf->y,400,$pdf->y); -$pdf->ezSetDy(-5); -#x -#C -$pdf->setLineStyle(5,'round'); -#c -#X -$pdf->setLineStyle(5,'round'); -$pdf->ezSetDy(-8,'makeSpace'); -$pdf->line(100,$pdf->y,400,$pdf->y); -$pdf->ezSetDy(-5); -#x -#C -$pdf->setLineStyle(5,'','',array(5)); -#c -#X -$pdf->setLineStyle(5,'','',array(5)); -$pdf->ezSetDy(-8,'makeSpace'); -$pdf->line(100,$pdf->y,400,$pdf->y); -$pdf->ezSetDy(-5); -#x -#C -$pdf->setLineStyle(5,'','',array(10,5)); -#c -#X -$pdf->setLineStyle(5,'','',array(10,5)); -$pdf->ezSetDy(-8,'makeSpace'); -$pdf->line(100,$pdf->y,400,$pdf->y); -$pdf->ezSetDy(-5); -#x -#C -$pdf->setLineStyle(5,'','',array(20,5,10,5)); -#c -#X -$pdf->setLineStyle(5,'','',array(20,5,10,5)); -$pdf->ezSetDy(-8,'makeSpace',4); -$pdf->line(100,$pdf->y,400,$pdf->y); -$pdf->ezSetDy(-5); -#x -#C -$pdf->setLineStyle(5,'round','',array(0,15)); -#c -#X -$pdf->setLineStyle(5,'round','',array(0,15)); -$pdf->ezSetDy(-8,'makeSpace'); -$pdf->line(100,$pdf->y,400,$pdf->y); -$pdf->ezSetDy(-5); -#x - -Note that the code shown with each of these lines is just the line style command, the drawing of each line also requires a <b>line</b> command, which is not shown. - -2<line> - -line(x1,y1,x2,y2) - -Draw a line from (x1,y1) to (x2,y2), set the line width using setLineStyle. - -2<curve> - -curve(x0,y0,x1,y1,x2,y2,x3,y3) - -Draw a Bezier curve. The end points are (x0,y0)->(x3,y3), and the control points are the other two. - -Bezier curves are neat, but probably not for the novice. The <b>ellipse</b> command uses a series of Bezier curves to make the ellipse. - -The distinctive feature of these curves is that the curve is guaranteed to lie within the 4 sided polygon formed from the 4 control points (they are also computationally easy to draw). An example is shown below with the control points marked. - -#C -$pdf->curve(200,$y+40,250,$y+5,350,$y,400,$y+45); -#c -#X -$pdf->ezSetDy(-50,'makeSpace'); -$y = $pdf->y; -$pdf->setLineStyle(2); -$pdf->curve(200,$y+40,250,$y+5,350,$y,400,$y+45); -$pdf->setLineStyle(0.5); -$pdf->ellipse(200,$y+40,5); -$pdf->ellipse(250,$y+5,5); -$pdf->ellipse(350,$y,5); -$pdf->ellipse(400,$y+45,5); -$pdf->setLineStyle(0.5,'','',array(10,5)); -$pdf->line(200,$y+40,250,$y+5); -$pdf->line(250,$y+5,350,$y); -$pdf->line(350,$y,400,$y+45); -#x - -Note that the Bezier curve is a tangent to the line between the control points at either end of the curve. - -2<ellipse> - -ellipse(x0,y0,r1,[r2=0],[angle=0],[nSeg=8]) - -Draw an ellipse, centred ay (x0,y0), with radii (r1,r2), oriented at 'angle' (anti-clockwise), and formed from nSeg bezier curves (the default 8 gives a reasonable approximation to the required shape). - -If r2 is left out, or set to zero, then it is assumed that a circle is being drawn. - -#C -$pdf->ellipse(300,$y+25,20); -#c -#X -$pdf->ezSetDy(-50,'makeSpace'); -$pdf->setLineStyle(2); -$pdf->ellipse(300,$pdf->y+25,20); -#x - -#C -$pdf->ellipse(300,$y+25,40,20); -#c -#X -$pdf->ezSetDy(-50,'makeSpace'); -$pdf->setLineStyle(2); -$pdf->ellipse(300,$pdf->y+25,40,20); -#x - -#C -$pdf->ellipse(300,$y+25,40,20,45); -#c -#X -$pdf->ezSetDy(-50,'makeSpace'); -$pdf->setLineStyle(2); -$pdf->ellipse(300,$pdf->y+25,40,20,45); -#x - -Of course the previous line style features also apply to these lines - -#C -$pdf->setLineStyle(4,'round','',array(0,6,4,6)); -$pdf->ellipse(300,$y+25,40,20,45); -#c -#X -$pdf->ezSetDy(-50,'makeSpace'); -$pdf->setLineStyle(4,'round','',array(0,6,4,6)); -$pdf->ellipse(300,$pdf->y+25,40,20,45); -#x - -2<partEllipse> - -partEllipse(x,y,a1,a2,r1 [,r2] [,angle] [,nSeg]) - -Draw a part ellipse (or circle), draw an ellipse centered on (x,y) from angle 'a1' to angle 'a2' (in degrees), with radius 'r1' in the x-direction and 'r2' in the y-direction and oriented at angle 'angle'. If 'r2' is not supplied the it defaults to 'r1' and a circle is formed. - -#C -$pdf->ellipse(300,$y+25,38); -$pdf->partEllipse(300,$y+25,119,421,80,12,10); -$pdf->partEllipse(300,$y+25,117,423,84,14,10); -$pdf->partEllipse(300,$y+25,115,425,85,15,10); -#c - -#X -$pdf->ezSetDy(-60,'makeSpace'); -$pdf->ellipse(300,$pdf->y+25,38); -$pdf->partEllipse(300,$pdf->y+25,119,421,80,12,10); -$pdf->partEllipse(300,$pdf->y+25,117,423,84,14,10); -$pdf->partEllipse(300,$pdf->y+25,115,425,85,15,10); -#x - -2<polygon> - -polygon(p,np,[f=0]) - -Draw a polygon, where there are np points, and p is an array containing (x0,y0,x1,y1,x2,y2,...,x(np-1),y(np-1)). -If f=1 then fill the area. - -#C -$pdata = array(200,10,400,20,300,50,150,40); -$pdf->polygon($pdata,4); -#c -#X -$pdata = array(200,10,400,20,300,50,150,40); -$pdf->ezSetDy(-60,'makeSpace'); -for ($i=1;$i<count($pdata);$i+=2){ - $pdata[$i]+=$pdf->y; -} -$pdf->polygon($pdata,4); -#x - -#C -$pdf->polygon($pdata,4,1); -#c -#X -$pdf->ezSetDy(-60,'makeSpace'); -$pdata = array(200,10,400,20,300,50,150,40); -$pdf->ezSetDy(-60,'makeSpace'); -for ($i=1;$i<count($pdata);$i+=2){ - $pdata[$i]+=$pdf->y; -} -$pdf->polygon($pdata,4,1); -#x - -#C -$pdf->setColor(0.9,0.9,0.9); -$pdf->polygon($pdata,4,1); -#c -#X -$pdf->ezSetDy(-60,'makeSpace'); -$pdata = array(200,10,400,20,300,50,150,40); -$pdf->ezSetDy(-60,'makeSpace'); -for ($i=1;$i<count($pdata);$i+=2){ - $pdata[$i]+=$pdf->y; -} -$pdf->setColor(0.9,0.9,0.9); -$pdf->polygon($pdata,4,1); -#x - - -2<filledRectangle> - -filledRectangle(x1,y1,width,height) - -Obvious. - -2<rectangle> - -rectangle(x1,y1,width,height) - -Obvious. - -2<newPage> - -id=newPage([insert,id,pos]) - -Starts a new page and returns the id of the page contents, this can be safely ignored, but storing it will allow the insertion of more information back into the page later, through the use of the 'reopenObject' function. - -The command is usually used without any of the options to simply add a new page to the end of the current bunch, but with the options can be used to insert a page within the existing pages. The 'insert' value can be set to 0 or 1 (use 1 to insert). 'id' should be set to a value which was returned by a previous newPage command (this is actually the object id of the contents of a page). 'pos' will determine whether the page is inserted before or after the specified page, it should be set to 'before' or 'after'. - -2<getFirstPageId> - -id=getFirstPageId() - -A related command is this which returns the id of the first page, this page is created during the class instantiation and so does not have its id returned to the user, this is the only way to fetch it, but it can be done at any point. - -2<stream> - -stream([array options]) - -Used for output, this will set the required headers and output the pdf code. - -The options array can be used to set a number of things about the output: - - 'Content-Disposition'=>'filename' sets the filename, though not too sure how well this will work as in my trial the browser seems to use the filename of the php file with .pdf on the end. - 'Accept-Ranges'=>1 or 0 - if this is not set to 1, then this header is not included, off by default this header seems to have caused some problems despite the fact that it is supposed to solve them, so I am leaving it off by default. - 'compress'=> 1 or 0 - apply content stream compression, this is on (1) by default. - -2<getFontHeight> - -x=getFontHeight(size) - -Returns the height of the current font, in the given size. This is the distance from the bottom of the descender to the top of the Capitals. - -2<getFontDecender> - -x=getFontDecender(size) - -Returns a number which is the distance that the descender goes beneath the Baseline, for a normal character set this is a negative number. - -2<getTextWidth> - -x=getTextWidth(size,text) - -Returns the width of the given text string at the given size. - -2<addTextWrap> - -a=addTextWrap(x,y,width,size,text,[justification='left'][,angle=0]) - -Will print the text string to the page at the position (x,y), if the string is longer than width, then it will print only the part which will fit within that width (attempting to truncate at a space if possible) and will return the remainder of the string. - -'justification' is optional and can be set to 'left','right','center','centre','full'. It provides for the justification of the text and though quite usable here, was implemented for the ezpdf class. - -2<saveState> - -saveState() - -Save the graphic state. - -2<restoreState> - -restoreState() - -Restore a saved graphics state. - -2<openObject> - -id=openObject() - -Start an independent object. This will return an object handle, and all further writes to a page will actually go into this object, until a closeObject call is made. - -2<reopenObject> - -reopenObject(id) - -Makes the point of current content insertion the numbered object, this 'id' must have been returned from a call to 'openObject' or 'newPage' for it to be a valid object to insert content into. Do not forget to call 'closeObject' to close off input to this object and return it to where it was beforehand (most likely the current page). -This will allow the user to add information to previous pages, as long as they have stored the id of the pages. - -2<closeObject> - -closeObject() - -Close the currently open object. Further writes will now go to the current page. - -2<addObject> - -addObject(id,[options='add']) - -Add the object specified by id to the current page (default). If a string is supplied in options, then the following may be specified: -'add' - add to the current page only. -'all' - add to every page from the current one on. -'odd' - add to all odd numbered pages from now on. -'even' - add to all even numbered pages from now on. -'next' - add to just the next page. -'nextodd' - add to all odd numbered pages from the next one. -'nexteven' - add to all even numbered pages from the next one. - -2<stopObject> - -stopObject(id) - -If the object (id) has been appearing on pages up to now, then stop it, this page will be the last one that could contain it. - -2<addInfo> - -addInfo(label,value) - -Add document information, the valid values for label are: -Title, Author, Subject, Keywords, Creator, Producer, CreationDate, ModDate, Trapped - -modified in version 003 so that 'label' can also be an array of key->value pairs, in which case 'value' should not be set. - -2<setPreferences> - -setPreferences(label,value) - -Set some document preferences, the valid values for label are: -HideToolbar, HideMenuBar, HideWindoUI, FitWindow, CenterWindow, NonFullScreenPageMode, Direction - -modified in version 003 so that 'label' can also be an array of key->value pairs, in which case 'value' should not be set. - -2<addImage> - -addImage(img,x,y,w,[h],[quality=75]) - -Add an image to the document, this feature needs some development. But as it stands, img must be a handle to a GD graphics object, and one or both of w or h must be specified, if only one of them is specified, then the other is calculated by keeping the ratio of the height and width of the image constant. -The image will be placed with its lower left corner at (x,y), and w and h refer to page units, not pixels. - -2<addJpegFromFile> - -addJpegFromFile(imgFileName,x,y,w,[h]) - -Add a JPEG image to the document, this function does not require the GD functionality, so should be usable to more people, interestingly it also seems to -be more reliable and better quality. The syntax of the command is similar to the above 'addImage' function, though 'img' is a string containing the file name of the jpeg image. - -x,y are the position of the lower left corner of the image, and w,h are the width and height. Note that the resolution of the image in the document is defined only by the resolution of the image that you insert, and the size that you make it on the page. If you have an image which is 500 pixels across and then you place it on the page so that it is 72 units across then this image will be about 500 dpi (as 72 units is about 72 points which is 1 inch). - -2<addPngFromFile> - -addPngFromFile(imgFileName,x,y,w,[h]) - -Similar to <i>addJepgFromFile</i>, but should work for PNG images. - -2<output> - -a=output([debug=0]) - -As an alternative to streaming the output directly to the browser, this function simply returns the pdf code. No headers are set, so if you wish to stream at a later time, then you will have to manually set them. This is ideal for saving the code to make a pdf file, or showing the code on the screen for debug purposes. - -If the 'debug' parameter is set to 1, then the only effect at the moment is that the compression option is not used for the content streams, so that they can be viewed clearly. - -2<openHere> - -openHere(style[,a][,b][,c]) - -Make the document open at a specific page when it starts. The page will be the one which is the current page when the function is called. - -The style option will define how it will look when open, valid values are: -(where the extra parameters will be used to supply any values specified for the style chosen) - -'XYZ' left, top, zoom <i>open at a particular coordinate on the page, with a given zoom factor</i> -'Fit' <i>fit the page to the view</i> -'FitH' top <i>fit horizontally, and at the vertical position given</i> -'FitV' left <i>fit vertically, and at the horizontal position given</i> -'FitB' <i>fit the bounding box of the page into the viewer</i> -'FitBH' top <i>fit the width of the bounding box to the viewer and set at the vertical position given</i> -'FitBV' left <i>fit bounding box vertically and set given horizontal position</i> - -2<selectFont> - -selectFont(fontName [,encoding]) - -This selects a font to be used from this point in the document. Errors can occur if some of the other functions are used if a font has not been selected, so it is wise to do this early on. - -Postscript type 1 fonts and TrueType fonts can now be used! Though you do need a supporting .afm file for each of them. Things to note are: -- type 1 fonts are only acceptable as binary (.pfb) files, though there is a free utility (t1utils) to convert .pfa files to this format. You have to have the .afm file which goes with this file. -- TrueType fonts also have to have a .afm file, there is a free utility (ttf2pt1) to generate one from a .ttf file, and it seems to work for most cases. -- to use the font, simply place both of the files in the font directory, and select the font <b>using the name of the .afm file, including the .afm</b>. -- using lots of fonts will make your pdf files much larger, as the full font program (the .ttf or the .pfb file) is embedded within the pdf file (though this means that anyone receiving the file will see it just as intended). - -The encoding directive is a little experimental, it allows the user to re-map character numbers from the 0->255 range to any named character in the set (as most of the sets have more than 256 characters). It should be an array of <number> => <name> pairs in an associative array. This is important to ensure that the right width for the character is used within the presentation characters, it has been noticed that sometimes, although the right character appears on the page, the incorrect width has been caluclated, using this function to explicitly set that number to the named character should fix the problem. - -Note that the encoding directive will be effective <b>only the first time</b> that a font is selected, and it should not be used on symbolic fonts (such as Symbol or ZapfDingbats). - -The command can be used in two forms - either with encoding=string, which sets this as the encoding type, or as an array which allows the setting of the encoding type, and the differences array. Examples of both are shown below, the example that sets the differences array includes the differences to make the common german characters work correctly. - -#C -// use a Times-Roman font with MacExpertEncoding -$pdf->selectFont('./fonts/Times-Roman.afm','MacExpertEncoding'); -// this next line should be equivalent -$pdf->selectFont('./fonts/Times-Roman.afm',array('encoding'=>'MacExpertEncoding')); - -// setup the helvetica font for use with german characters -$diff=array(196=>'Adieresis',228=>'adieresis', - 214=>'Odieresis',246=>'odieresis', - 220=>'Udieresis',252=>'udieresis', - 223=>'germandbls'); -$pdf->selectFont('./fonts/Helvetica.afm' - ,array('encoding'=>'WinAnsiEncoding' - ,'differences'=>$diff)); -#c - - -2<setFontFamily> - -setFontFamily(family,options) - -This function defines the relationship between the various fonts that are in the system, so that when a base font is selected the program then knows which to use when it is asked for the <b>bold</b> version or the <i>italic</i> version (not forgetting of course <b><i>bold-italic</i></b>). - -It maintains a set of arrays which give the alternatives for the base fonts. The defaults that are in the system to start with are: - -'Helvetica.afm' - 'b'=>'Helvetica-Bold.afm' - 'i'=>'Helvetica-Oblique.afm' - 'bi'=>'Helvetica-BoldOblique.afm' - 'ib'=>'Helvetica-BoldOblique.afm' - -'Courier.afm' - 'b'=>'Courier-Bold.afm' - 'i'=>'Courier-Oblique.afm' - 'bi'=>'Courier-BoldOblique.afm' - 'ib'=>'Courier-BoldOblique.afm' - -'Times-Roman.afm' - 'b'=>'Times-Bold.afm' - 'i'=>'Times-Italic.afm' - 'bi'=>'Times-BoldItalic.afm' - 'ib'=>'Times-BoldItalic.afm' - -(where 'b' indicate bold, and 'i' indicates italic) - -Which means that (for example) if you have selected the 'Courier.afm' font, and then you use the italic markers then the system will change to the 'Courier-Oblique.afm' font. - -Note that at the moment it is not possible to have any more fonts, so there is little use in calling this function (except to change these settings, discussed below), but this is paving the way for when soon we will be able to add other fonts (both .afm, and .ttf), which is also why the suffix must be specified in the font name. - -Note also that it is possible to have a different font when some text is bolded, then italicized, as compared to when it is italicized, then bolded ('bi' vs 'ib'), though they have all been set to be the same by default. - -If you bold a font twice, then under the current system it would look for a 'bb' entry in the font family, and since there are none in the default families the font will revert to the base font. As an example here is the code that you would use to define a new font family for the Courier font which (for some reason) changed to Times-Roman when a double bold is used: - -#C -$tmp = array( - 'b'=>'Courier-Bold.afm' - ,'i'=>'Courier-Oblique.afm' - ,'bi'=>'Courier-BoldOblique.afm' - ,'ib'=>'Courier-BoldOblique.afm' - ,'bb'=>'Times-Roman.afm' - ); -$pdf->setFontFamily('Courier.afm',$tmp); -#c - -2<setEncryption> - -setEncryption([userPass=''],[ownerPass=''],[pc=array]) - -Calling this function sets up the document to be encrypted, this is the only way to mark the document so that they user cannot use cut and paste, or printing. - -Using the call without options, defaults to preventing the user from cut & paste or printing. There are no passwords require to open the document. - -#C -$pdf->setEncryption(); -#c - -Setting either off the passwords will mean that the user will have to enter a password to open the document. If the owner password is entered when the document is opened then the user will be able to print etc. If the two passwords are set to be the same (or the owner password is left blank) then there is noo owner password, and the document cannot be opened in the accesible mode. - -The pc array can be used to <b>allow</b> specific actions. The following example, sets an owner password, a user password, and allows printing and cut & paste. - -#C -$pdf->setEncryption('trees','frogs',array('copy','print')); -#c - - -2<addLink> - -addLink(url,x0,y0,x1,y1) - -Creates a clickable rectangular area within the document, which takes the user to the URL when clicked. The coordinates specify the area. - -See the information in the <i>inline codes</i> chapter of the ezPdf section to see and easy way of adding links to your code. - -#C -$pdf->addLink("http://www.ros.co.nz/pdf/",50,100,500,120); -$pdf->rectangle(50,100,450,20); -#c -#X -$pdf->ezSetDy(-40,'makeSpace'); -$pdf->addLink("http://www.ros.co.nz/pdf/",50,$pdf->y,500,$pdf->y+20); -$pdf->rectangle(50,$pdf->y,450,20); -#x - -2<addInternalLink> - -addInternalLink(label,x0,y0,x1,y1) - -Creates an internal link in the document, 'label' is the name of an target point, and the other settings are the coordinates of the enclosing rectangle of the clickable area. - -Note that the destination markers are created using the <i>addDestination</i> function described below. - -See the information in the <i>inline codes</i> chapter of the ezPdf section to see and easy way of adding links to your code. - -2<addDestination> - -addDestination(label,style[,a][,b][,c]) - -This marks a point in the document as a potential destination for an internal link, the 'label' can be any string, though should be unique for the document, else confusion may ensue. The remainer of the options are identical to the <i>openHere</i> function. - - -2<transaction> - -transaction(action) - -One of the major problems with this class has been the inability to format things so that they fit nicely, as you cannot know how large something is until you have it on the page, this function attempts to produce a solution this. - -Transaction support (terminology borrowed from databases) allows you to mark a point in the development of your document, and if you do not like how things are going from there you can abort and return to that place. This will allow tentatively trying a few different options for things, then settling with the one that looks like what you like. The most obvious application immediatly is support for stopping table cells being split over pages. If you start a row and on completion discover that you are on a new page, then just abort the transaction, going back to the position before you started making that row, and then make a new page there. - -'action' can be set to one of 'start','commit','rewind','abort', which are fairly obvious in their usage. - -'start' - mark a checkpoint, a position to return to upon 'abort' -'commit' - you are happy with this one, it releases the most recent 'start' though does not affect the document. -'rewind' - you are not happy, but are planning to start again from the last checkpoint, this is the same as an 'abort' and a 'start', but is much more efficient. -'abort' - you are not happy with you the document is looking, this will return you to the state at last 'start' point. - -Notes: -- 'start' commands can be nested, and 'abort' or 'commit' will always affect the most recent start. -- though often it seems that you do not need to 'commit' if you are happy with your changes, it is good practice, the 'start' command is effectively making an internal copy of the document, if you are working on a large document you may run out of space. The 'commit' command frees up that space once more. -- these commands, though they are part of the base class, save all the setting of the object in which they are contained, this means most often that they will work fine with an ezPdf object, and will also work with user class extensions. - - -#NP -1<Misc> - -2<Callback functions> - -Code has been included within class.pdf.php which allows the user to place a marker within the text, when the interpreter places that piece of text on the page, then the named function will be called, passing an array which has the details about the position. - -The marker is either of the forms: -#C -<c:<i>func</i>:<i>paramater</i>>aaa bbb ccc</c:<i>func</i>> -<C:<i>func</i>:<i>paramater</i>> -#c - -The first form (with the small 'c') is for when the situation requires both an opening and a closing tag, and the second form for when only one specific point needs to be marked. - -When this piece of text is placed, the class function 'func' will be called, and it must have been defined with a single paramater. This paramater will be an array, which will have members: - -#C -x => x-position -y => y-position -status => <see below> -f => function name -height => font height -decender => font decender -#c - -Where the status can have one of the values 'start','end','sol','eol'. The start and end values are obvious and indicate that this is either the start or the end of the marked range. The other two indicate start-of-line and end-of-line, which are called if the start or end of a line is reached between matching start and end markers. - -Note that the function needs to be a function of the pdf class, so if you wish to use a custom function then you need to extend the class and add your own functions. This is done within the script that makes this document, to collect the information which makes the table of contents, and to add the dots on each line within the table of contents display. - -<b>NOTE</b> For various technical reasons if there are any spaces within the marker, then these will affect the justification calculation, it is best to avoid having them. This is why the title names in the example below were urlencoded when placed in the paramater section. - -<b>NOTE</b> These functions should be used with care, it is possible to set up an infinite loop. If the function called by the two-part form has an addText command within it, then if it is not set up very carefully then an infinite loop is formed as the function is re-called at the start and end of the addText command... and so on... and so on... and so on... - -As an example, here is the code which extends the class for this document - -#C -include 'class.ezpdf.php'; - -class Creport extends Cezpdf { - -// <i>make a location to store the information that will be collected during document formation</i> -var $reportContents = array(); - -// <i>it is neccesary to manually call the constructor of the extended class</i> -function Creport($p,$o){ - $this->Cezpdf($p,$o); -} - -/* -<i>The function 'rf' records in an array the page number level number and heading for each title as the document is constructed. This information is used at the end to construct the table of contents. Each heading has had a marker put next to it of the form: -<C:rf:1top%20heading>, which would be for a level 1 heading called 'top heading'. -After the bulk of the document has been constructed, the array $pdf->reportContents is selected, and the table of contents made. -</i> */ -function rf($info){ - $tmp = $info['p']; - $lvl = $tmp[0]; - $lbl = rawurldecode(substr($tmp,1)); - $num=$this->ezWhatPageNumber($this->ezGetCurrentPageNumber()); - $this->reportContents[] = array($lbl,$num,$lvl ); -} - -/*<i> -The dots function is called by a marker of the form: -<C:dots:213> -Which would represent a heading being show for which the original document was on page 13, and the heading was level 2. The marker is placed at the end of the text being displayed within the table of contents, upon activation it draws a dotted line across from that point to the right hand side of the page, and puts the given label there (to be more accurate it draws the line from the right, back to the left, so that all the dots line up down the page). -</i>*/ -function dots($info){ - // draw a dotted line over to the right and put on a page number - $tmp = $info['p']; - $lvl = $tmp[0]; - $lbl = substr($tmp,1); - $xpos = 520; - - switch($lvl){ - case '1': - $size=16; - $thick=1; - break; - case '2': - $size=12; - $thick=0.5; - break; - } - $this->saveState(); - $this->setLineStyle($thick,'round','',array(0,10)); - $this->line($xpos,$info['y'],$info['x']+5,$info['y']); - $this->restoreState(); - $this->addText($xpos+5,$info['y'],$size,$lbl); -} -} -#c - -Both of these functions use only the single point call to a callback function, for an example of the more complicated two-part from, refer to the function 'alink' within class.ezpdf.php which uses callback functions to implement the url links on marked document text. - -2<Units> - -The units used for positioning within this class are the default pdf user units, in which each unit is roughly equivalent to 1/72 of an inch. - -and some additional user contributed notes are (thanks Andrew): - -1/72" is 0.3528mm or 1 point -1 point was historically 0.0138 inches, a little under 1/72" -10mm is 28.35 points -A4 is 210 x 297 mm or 595.28 x 841.89 points - diff --git a/addon/readme.pdf b/addon/readme.pdf deleted file mode 100644 index ded8c9d09cd42be744aa8a2004ca159cc5de5681..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 108502 zcmb5W1yo$i(l$(jLvZ)Ook0fo;BLV!xCD3i5Zr<U*WebMV8LAi1b26L0{kQ-_nzE) z{`;P9tyu%RyLNT;uG&>kS62_Yys#)e69Wqz`O50>7#tiEfDvG=Zw|-90|35qwJ`z! zh4dWsEUZo7fO3uw7G_pP_5kKb8bvsuyq?M91<TWgoQ;u{pn-##wH1Jg^+ywcj}Oks z%J2uTAM}6n{1+>rkhP<g!(;!yseds1lltdCa6l<DLwkTG+Yjb&%uG+?vM_S~yk=s5 zY6d<1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ebgwosMrs&z z;TXZh)&vcKJn*rENvsJPkw0{B!aXq_EILm3J{>tmFrOxL4=p2M9)#65!q0UkYI&F$ z5OYb0*hJ4)2XF&IHc02h_`+0|7+(!JpV2{!kr-dClE@!Am~auYLCHYU$hAAjszm<K zY1KsjfUVm^{?I|soRAlmQ%IVQ$RDUZPK+;11cWhL2R(QbG$MaMYn{j+KqG1f9TW}3 zc)+Cu#CR|!#t4!RF&>PGF@hc~p?jT)F@oSu_!|T^l139f0G-an7(x4w(7lN@C0I%z z<^fRMlVe1#IlurBV}xkJdKYL|?PwJp6*gjYc$Afk3p%!{=ZM&Fc1_*|{pT4tW=ymT pi~s;^ID%i~&@nEcLY4p^t?|)eQPJ#DKD-#3uvTtv9lCe4`ajg^@pk|K diff --git a/addon/readme.php b/addon/readme.php deleted file mode 100644 index 30695353b..000000000 --- a/addon/readme.php +++ /dev/null @@ -1,296 +0,0 @@ -<?php -//=================================================================================================== -// this is the php file which creates the readme.pdf file, this is not seriously -// suggested as a good way to create such a file, nor a great example of prose, -// but hopefully it will be useful -// -// adding ?d=1 to the url calling this will cause the pdf code itself to ve echoed to the -// browser, this is quite useful for debugging purposes. -// there is no option to save directly to a file here, but this would be trivial to implement. -// -// note that this file comprisises both the demo code, and the generator of the pdf documentation -// -//=================================================================================================== - - -// don't want any warnings turning up in the pdf code if the server is set to 'anal' mode. -//error_reporting(7); -error_reporting(E_ALL); -set_time_limit(1800); - -include 'class.ezpdf.php'; - -// define a clas extension to allow the use of a callback to get the table of contents, and to put the dots in the toc -class Creport extends Cezpdf { - -var $reportContents = array(); - -function Creport($p,$o){ - $this->Cezpdf($p,$o); -} - -function rf($info){ - // this callback records all of the table of contents entries, it also places a destination marker there - // so that it can be linked too - $tmp = $info['p']; - $lvl = $tmp[0]; - $lbl = rawurldecode(substr($tmp,1)); - $num=$this->ezWhatPageNumber($this->ezGetCurrentPageNumber()); - $this->reportContents[] = array($lbl,$num,$lvl ); - $this->addDestination('toc'.(count($this->reportContents)-1),'FitH',$info['y']+$info['height']); -} - -function dots($info){ - // draw a dotted line over to the right and put on a page number - $tmp = $info['p']; - $lvl = $tmp[0]; - $lbl = substr($tmp,1); - $xpos = 520; - - switch($lvl){ - case '1': - $size=16; - $thick=1; - break; - case '2': - $size=12; - $thick=0.5; - break; - } - - $this->saveState(); - $this->setLineStyle($thick,'round','',array(0,10)); - $this->line($xpos,$info['y'],$info['x']+5,$info['y']); - $this->restoreState(); - $this->addText($xpos+5,$info['y'],$size,$lbl); - - -} - - -} -// I am in NZ, so will design my page for A4 paper.. but don't get me started on that. -// (defaults to legal) -// this code has been modified to use ezpdf. - -//$pdf = new Cezpdf('a4','portrait'); -$pdf = new Creport('a4','portrait'); - -$pdf -> ezSetMargins(50,70,50,50); - -// put a line top and bottom on all the pages -$all = $pdf->openObject(); -$pdf->saveState(); -$pdf->setStrokeColor(0,0,0,1); -$pdf->line(20,40,578,40); -$pdf->line(20,822,578,822); -$pdf->addText(50,34,6,'http://ros.co.nz/pdf - http://www.sourceforge.net/projects/pdf-php'); -$pdf->restoreState(); -$pdf->closeObject(); -// note that object can be told to appear on just odd or even pages by changing 'all' to 'odd' -// or 'even'. -$pdf->addObject($all,'all'); - -$pdf->ezSetDy(-100); - -//$mainFont = './fonts/Helvetica.afm'; -$mainFont = './fonts/Times-Roman.afm'; -$codeFont = './fonts/Courier.afm'; -// select a font -$pdf->selectFont($mainFont); - -$pdf->ezText("PHP Pdf Creation\n",30,array('justification'=>'centre')); -$pdf->ezText("Module-free creation of Pdf documents\nfrom within PHP\n",20,array('justification'=>'centre')); -$pdf->ezText("developed by R&OS Ltd\n<c:alink:http://www.ros.co.nz/pdf/>http://www.ros.co.nz/pdf</c:alink>",18,array('justification'=>'centre')); -$pdf->ezText("\n<c:alink:http://sourceforge.net/projects/pdf-php>http://sourceforge.net/projects/pdf-php</c:alink>\n\nversion 0.09",18,array('justification'=>'centre')); - -$pdf->ezSetDy(-100); -// modified to use the local file if it can - -$pdf->openHere('Fit'); - -function ros_logo(&$pdf,$x,$y,$height,$wl=0,$wr=0){ - $pdf->saveState(); - $h=100; - $factor = $height/$h; - $pdf->selectFont('./fonts/Helvetica-Bold.afm'); - $text = 'R&OS'; - $ts=100*$factor; - $th = $pdf->getFontHeight($ts); - $td = $pdf->getFontDecender($ts); - $tw = $pdf->getTextWidth($ts,$text); - $pdf->setColor(0.6,0,0); - $z = 0.86; - $pdf->filledRectangle($x-$wl,$y-$z*$h*$factor,$tw*1.2+$wr+$wl,$h*$factor*$z); - $pdf->setColor(1,1,1); - $pdf->addText($x,$y-$th-$td,$ts,$text); - $pdf->setColor(0.6,0,0); - $pdf->addText($x,$y-$th-$td,$ts*0.1,'http://www.ros.co.nz'); - $pdf->restoreState(); - return $height; -} - -ros_logo($pdf,150,$pdf->y-100,80,150,200); -$pdf->selectFont($mainFont); - -/* -if (file_exists('ros.jpg')){ - $pdf->addJpegFromFile('ros.jpg',199,$pdf->y-100,200,0); -} else { - // comment out these two lines if you do not have GD jpeg support - // I couldn't quickly see a way to test for this support from the code. - // you could also copy the file from the locatioin shown and put it in the directory, then - // the code above which doesn't use GD will be activated. - $img = ImageCreatefromjpeg('http://www.ros.co.nz/pdf/ros.jpg'); - $pdf-> addImage($img,199,$pdf->y-100,200,0); -} -*/ -//----------------------------------------------------------- -// load up the document content -$data=file('./data.txt'); - -// try adding the faq's to the document, this will not work for people re-building the file from the -// download as I am not going to put in the faq file with that -$faqFile = '../ros/pdf/faqs.inc'; -if (file_exists($faqFile)){ - // then the file is there. - $data[] = "#NP\n"; - $data[] = "1<FAQs>\n"; - include($faqFile); - foreach($faqs as $v){ - $data[] = "2<".$v['t'].">\n"; - // these are some VERY rough conversions, I am not recommending others do this - $s = array('<br>','<p>','<pre>','</pre>','<ul>','</ul>','<li>'); - $r = array("\n","\n\n","\n#C","\n#c","",""," - "); - if (is_array($v['d'])){ - $tmp=''; - foreach($v['d'] as $section){ - $tmp.=$section."\n\n"; - } - } else { - $tmp = $v['d']; - } - $tmp = str_replace($s,$r,$tmp); - $bits = explode("\n",$tmp); - foreach($bits as $bit){ - $data[] = $bit."\n"; - } - } -} - -$pdf->ezNewPage(); - -$pdf->ezStartPageNumbers(500,28,10,'','',1); - -$size=12; -$height = $pdf->getFontHeight($size); -$textOptions = array('justification'=>'full'); -$collecting=0; -$code=''; - -foreach ($data as $line){ - // go through each line, showing it as required, if it is surrounded by '<>' then - // assume that it is a title - $line=chop($line); - if (strlen($line) && $line[0]=='#'){ - // comment, or new page request - switch($line){ - case '#NP': - $pdf->ezNewPage(); - break; - case '#C': - $pdf->selectFont($codeFont); - $textOptions = array('justification'=>'left','left'=>20,'right'=>20); - $size=10; - break; - case '#c': - $pdf->selectFont($mainFont); - $textOptions = array('justification'=>'full'); - $size=12; - break; - case '#X': - $collecting=1; - break; - case '#x': - $pdf->saveState(); - eval($code); - $pdf->restoreState(); - $pdf->selectFont($mainFont); - $code=''; - $collecting=0; - break; - } - } else if ($collecting){ - $code.=$line; -// } else if (((strlen($line)>1 && $line[1]=='<') || (strlen($line) && $line[0]=='<')) && $line[strlen($line)-1]=='>') { - } else if (((strlen($line)>1 && $line[1]=='<') ) && $line[strlen($line)-1]=='>') { - // then this is a title - switch($line[0]){ - case '1': - $tmp = substr($line,2,strlen($line)-3); - $tmp2 = $tmp.'<C:rf:1'.rawurlencode($tmp).'>'; - $pdf->ezText($tmp2,26,array('justification'=>'centre')); - break; - default: - $tmp = substr($line,2,strlen($line)-3); - // add a grey bar, highlighting the change - $tmp2 = $tmp.'<C:rf:2'.rawurlencode($tmp).'>'; - $pdf->transaction('start'); - $ok=0; - while (!$ok){ - $thisPageNum = $pdf->ezPageCount; - $pdf->saveState(); - $pdf->setColor(0.9,0.9,0.9); - $pdf->filledRectangle($pdf->ez['leftMargin'],$pdf->y-$pdf->getFontHeight(18)+$pdf->getFontDecender(18),$pdf->ez['pageWidth']-$pdf->ez['leftMargin']-$pdf->ez['rightMargin'],$pdf->getFontHeight(18)); - $pdf->restoreState(); - $pdf->ezText($tmp2,18,array('justification'=>'left')); - if ($pdf->ezPageCount==$thisPageNum){ - $pdf->transaction('commit'); - $ok=1; - } else { - // then we have moved onto a new page, bad bad, as the background colour will be on the old one - $pdf->transaction('rewind'); - $pdf->ezNewPage(); - } - } - break; - } - } else { - // then this is just text - // the ezpdf function will take care of all of the wrapping etc. - $pdf->ezText($line,$size,$textOptions); - } - -} - -$pdf->ezStopPageNumbers(1,1); - -// now add the table of contents, including internal links -$pdf->ezInsertMode(1,1,'after'); -$pdf->ezNewPage(); -$pdf->ezText("Contents\n",26,array('justification'=>'centre')); -$xpos = 520; -$contents = $pdf->reportContents; -foreach($contents as $k=>$v){ - switch ($v[2]){ - case '1': - $y=$pdf->ezText('<c:ilink:toc'.$k.'>'.$v[0].'</c:ilink><C:dots:1'.$v[1].'>',16,array('aright'=>$xpos)); -// $y=$pdf->ezText($v[0].'<C:dots:1'.$v[1].'>',16,array('aright'=>$xpos)); - break; - case '2': - $pdf->ezText('<c:ilink:toc'.$k.'>'.$v[0].'</c:ilink><C:dots:2'.$v[1].'>',12,array('left'=>50,'aright'=>$xpos)); - break; - } -} - - -if (isset($d) && $d){ - $pdfcode = $pdf->ezOutput(1); - $pdfcode = str_replace("\n","\n<br>",htmlspecialchars($pdfcode)); - echo '<html><body>'; - echo trim($pdfcode); - echo '</body></html>'; -} else { - $pdf->ezStream(); -} -?> \ No newline at end of file diff --git a/addon/ros.jpg b/addon/ros.jpg deleted file mode 100644 index 2b7ed4fe07f01c3a9a473072b68901ae852ae485..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10823 zcmbt)Wl)?!6XxOx1PFme7YI&pSuAL93GT8uVR83B0t5}VxFo@Cfer3XaCg|?8r<EE z@2=|Vu1>11ZsyNSbx(I!jr7~k^FGZztpHvt$|}eLP*6|+^3NUc^cNrnz(mKu#6ZWy z#K6SD!hC`K8XNoNOKc)M{8z6@h)79Eh=_^FDH*8ADd<4N#BbT&(lIi<V|hnL&CbQn z%*DX`j`=@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ib/document_test/facture.html +++ b/contrib/document_test/facture.html @@ -16,11 +16,19 @@ <h2>Détail</h2> <table border="0" align="left" cellspacing="1" cellpadding="1" width="75%"> <caption>marchandises </caption> +<tr><th>Article</th> +<th>Prix unitaire</th> +<th>Quantité</th> +<th>Code TVA</th> +<th>Montant TVA</th> +<th>Montant TVAC</th> +</tr> <tr> <td><<VEN_ART_NAME>> </td> <td><<VEN_ART_PRICE>> </td> <td><<VEN_ART_QUANT>></td> <td><<TVA_LABEL>> </td> +<td> <<TVA_AMOUNT>> </td> <td><<VEN_TVAC>><<MARCH_NEXT>></td> </tr> <tr> @@ -28,6 +36,7 @@ <td><<VEN_ART_PRICE>> </td> <td><<VEN_ART_QUANT>></td> <td><<TVA_LABEL>> </td> +<td> <<TVA_AMOUNT>> </td> <td><<VEN_TVAC>><<MARCH_NEXT>></td> </tr> <tr> @@ -35,6 +44,7 @@ <td><<VEN_ART_PRICE>> </td> <td><<VEN_ART_QUANT>></td> <td><<TVA_LABEL>> </td> +<td> <<TVA_AMOUNT>> </td> <td><<VEN_TVAC>><<MARCH_NEXT>></td> </tr> <tr> @@ -42,6 +52,7 @@ <td><<VEN_ART_PRICE>> </td> <td><<VEN_ART_QUANT>></td> <td><<TVA_LABEL>> </td> +<td> <<TVA_AMOUNT>> </td> <td><<VEN_TVAC>><<MARCH_NEXT>></td> </tr> <tr> @@ -49,6 +60,7 @@ <td><<VEN_ART_PRICE>> </td> <td><<VEN_ART_QUANT>></td> <td><<TVA_LABEL>> </td> +<td> <<TVA_AMOUNT>> </td> <td><<VEN_TVAC>><<MARCH_NEXT>></td> </tr> <tr> @@ -56,6 +68,7 @@ <td><<VEN_ART_PRICE>> </td> <td><<VEN_ART_QUANT>></td> <td><<TVA_LABEL>> </td> +<td> <<TVA_AMOUNT>> </td> <td><<VEN_TVAC>><<MARCH_NEXT>></td> </tr> </table> diff --git a/dev/add-db.sh b/dev/add-db.sh deleted file mode 100755 index d9c8837d4..000000000 --- a/dev/add-db.sh +++ /dev/null @@ -1,11 +0,0 @@ -NR_DOSSIER=$1 -BACKUP_FILE=$2 -USER_NAME=$3 -dropdb -h localhost -U phpcompta dossier$NR_DOSSIER -createdb -h localhost -U phpcompta dossier$NR_DOSSIER -psql -h localhost -U phpcompta dossier$NR_DOSSIER -f $BACKUP_FILE -psql -h localhost -U phpcompta -f html/admin/sql/patch/upgrade4.sql dossier$NR_DOSSIER -psql -h localhost -U phpcompta --command "INSERT INTO ac_users (use_login, use_active, use_pass, use_admin, use_usertype) VALUES ('$USER_NAME', 1, md5('plogastel'), 1, 'user')" account_repository -psql -h localhost -U phpcompta --command "INSERT INTO ac_dossier (dos_id, dos_name, dos_description) VALUES ($NR_DOSSIER, 'Sauvages', 'Comptabilité Sauvages SPRL')" account_repository -psql -h localhost -U phpcompta --command "INSERT INTO jnt_use_dos (use_id, dos_id) SELECT use_id,$NR_DOSSIER from ac_users WHERE use_login='$USER_NAME'" account_repository -psql -h localhost -U phpcompta -f html/admin/sql/patch/upgrade4.sql dossier$NR_DOSSIER diff --git a/dev/add_require.py b/dev/add_require.py new file mode 100755 index 000000000..6e64b9ffd --- /dev/null +++ b/dev/add_require.py @@ -0,0 +1,49 @@ +#!/usr/bin/python +# brief : replace the all class widget +# +# This file is a part of PhpCompta under GPL +# Author D. DE BONTRIDDER ddebontridder@yahoo.fr + +from transform import * +import sys +import os +import glob + +if len(sys.argv) == 1: + print "you need one or more filename as argument" + sys.exit(3) + +files=glob.glob(sys.argv[1]) +total=len(files) +print "Total file to handle %d " % (len(files)) +for file in files: + print "Working on file "+file + new_file=file + old_file=(file+'.arold') + os.rename(new_file,old_file) + fnew=open(new_file,'a+') + fold=open(old_file) + lines=fold.readlines() + widget=('IHidden','IText','ISpan','ISelect','IDate','ICheckBox','IPoste','ICard','IFile','IRadio','ITextarea','IButton','IConcerned','ITva','ISearch') + check={} + for w in widget: + check[w]=0 + require="" + for line in lines: + for w in widget: + if check[w] == 1: + continue + if line.find(w) != -1 : + require=require+'require_once("class_'+w.lower()+'.php");'+"\n" + check[w]=1 + flag=0 + for line in lines: + if line.find('require')!=-1 and flag == 0: + fnew.write(require) + flag=1 + fnew.write(line) + fnew.close() + fold.close() + total=total-1 + print 'finished, remaining %d' % (total) + diff --git a/dev/change.py b/dev/change.py new file mode 100755 index 000000000..4553baa69 --- /dev/null +++ b/dev/change.py @@ -0,0 +1,34 @@ +#!/usr/bin/python +# brief : replace the all class widget +# +# This file is a part of PhpCompta under GPL +# Author D. DE BONTRIDDER ddebontridder@yahoo.fr + +from transform import * +import sys +import os +import glob + +if len(sys.argv) == 1: + print "you need one or more filename as argument" + sys.exit(3) + +files=glob.glob(sys.argv[1]) +total=len(files) +print "Total file to handle %d " % (len(files)) +for file in files: + print "Working on file "+file + new_file=file + old_file=(file+'.old') + os.rename(new_file,old_file) + fnew=open(new_file,'a+') + fold=open(old_file) + lines=fold.readlines() + for line in lines: + buf=Transform(line) + fnew.write(buf.transform()) + fnew.close() + fold.close() + total=total-1 + print 'finished, remaining %d' % (total) + diff --git a/dev/cleanup.sh b/dev/cleanup.sh index 30f23db97..3be4db69b 100755 --- a/dev/cleanup.sh +++ b/dev/cleanup.sh @@ -1,8 +1,8 @@ #!/bin/bash # clean all phpcompta related DB. -DOMAIN="rel4102_" +DOMAIN="rel500_" export PGPASSWORD="dany" -export PGUSER="phpcompta" +export PGUSER="dany" export PGHOST=localhost echo "Etes vous sur de vouloir effacer les db du domaine $DOMAIN Y/N ?" read A @@ -13,6 +13,7 @@ if [ "$A" == 'Y' ];then dropdb ${DOMAIN}dossier4 dropdb ${DOMAIN}dossier5 dropdb ${DOMAIN}dossier13 + dropdb ${DOMAIN}dossier17 dropdb ${DOMAIN}mod1 dropdb ${DOMAIN}mod2 diff --git a/dev/compile_text.sh b/dev/compile_text.sh new file mode 100644 index 000000000..f0d210267 --- /dev/null +++ b/dev/compile_text.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Brief : compite the file .mo, +# It is used for the translation +# +# +# This file is a part of PhpCompta under GPL +# Author D. DE BONTRIDDER ddebontridder@yahoo.fr +cd .. +cd html/lang/en_US/LC_MESSAGES +msgfmt -c -v messages.po + diff --git a/dev/compose_list.sh b/dev/compose_list.sh index bc67390fc..47347c515 100755 --- a/dev/compose_list.sh +++ b/dev/compose_list.sh @@ -1,4 +1,8 @@ #!/bin/bash +# +# This file is a part of PhpCompta under GPL +# Author D. DE BONTRIDDER ddebontridder@yahoo.fr + cat <<EOF This script create a list of all the function on only page, you must first run doxygen and call this file from the phpcompta directory diff --git a/dev/extract_text.sh b/dev/extract_text.sh new file mode 100644 index 000000000..0ae02084c --- /dev/null +++ b/dev/extract_text.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Brief : extract strings from the file, in order to update a +# po file. It is used for the translation +# +# +# This file is a part of PhpCompta under GPL +# Author D. DE BONTRIDDER ddebontridder@yahoo.fr +echo "Extract" +cd .. +xgettext -L PHP -j --from-code=UTF-8 -p html/lang/en_US/LC_MESSAGES/ html/*.php include/*.php include/template/*.php diff --git a/dev/plugin_client.txt b/dev/plugin_client.txt new file mode 100644 index 000000000..13e99c5b8 --- /dev/null +++ b/dev/plugin_client.txt @@ -0,0 +1,4 @@ +"Nom client1","Prénom","C1","Rue de la boite,55" +"Nom client2","Prénom","C2","Rue du couvercle,55" +"Nom client3","Prénom","C3","Rue de la chaussure,55" +"Nom client4","Prénom","C4","Rue de la couleur,55" diff --git a/dev/reset.sql b/dev/reset.sql deleted file mode 100644 index 0ccc2aa67..000000000 --- a/dev/reset.sql +++ /dev/null @@ -1,13 +0,0 @@ -\t -\o reset_seq_jrn.sql -select 'select setval (''s_jrn_'||jrn_def_id||''',1,false);' from jrn_def; -\o -\t - -\i reset_seq_jrn.sql -select setval('s_centralized',1,false); -select setval('s_central',1,false); -delete from centralized; -update jrnx set j_centralized='f'; -select setval('s_central_order',1,false); - diff --git a/dev/reset_seq_jrn.sql b/dev/reset_seq_jrn.sql deleted file mode 100644 index 49112b6ce..000000000 --- a/dev/reset_seq_jrn.sql +++ /dev/null @@ -1,10 +0,0 @@ - select setval ('s_jrn_4',1,false); - select setval ('s_jrn_3',1,false); - select setval ('s_jrn_1',1,false); - select setval ('s_jrn_2',1,false); - select setval ('s_jrn_5',1,false); - select setval ('s_jrn_6',1,false); - select setval ('s_jrn_7',1,false); - select setval ('s_jrn_8',1,false); - select setval ('s_jrn_9',1,false); - diff --git a/dev/test_parse_formula.php b/dev/test_parse_formula.php index 5a3b3bbe8..ac62e01d1 100644 --- a/dev/test_parse_formula.php +++ b/dev/test_parse_formula.php @@ -1,4 +1,9 @@ <? +/* +# check the CheckFormula and the ParseFormula +# This file is a part of PhpCompta under GPL +# Author D. DE BONTRIDDER ddebontridder@yahoo.fr +*/ include_once('impress_inc.php'); echo '<hr>'; diff --git a/dev/transform.py b/dev/transform.py new file mode 100755 index 000000000..8368e79cc --- /dev/null +++ b/dev/transform.py @@ -0,0 +1,100 @@ +#!/usr/bin/python +# brief : replace the all class widget +# +# This file is a part of PhpCompta under GPL +# Author D. DE BONTRIDDER ddebontridder@yahoo.fr +import glob +import sys +import re +class Transform: + widget=re.compile("new widget.*;.*") + wegal=re.compile('.*=') + wtext=re.compile("text",re.IGNORECASE) + wselect=re.compile("select",re.IGNORECASE) + wjsDate=re.compile("js_date",re.IGNORECASE) + wHidden=re.compile("hidden",re.IGNORECASE) + wcheckbox=re.compile("checkbox",re.IGNORECASE) + wJSSearch_Poste=re.compile("js_search_poste",re.IGNORECASE) + wJSSearch_only=re.compile("js_search_only",re.IGNORECASE) + wSpan=re.compile("span",re.IGNORECASE) + wFile=re.compile("file",re.IGNORECASE) + wRadio=re.compile("radio",re.IGNORECASE) + wButton=re.compile("button",re.IGNORECASE) + wTextarea=re.compile("textarea",re.IGNORECASE) + wJSConcerned=re.compile("js_concerned",re.IGNORECASE) + wTva=re.compile("js_tva",re.IGNORECASE) + wSearch=re.compile("js_search\"",re.IGNORECASE) + string="" + def __init__(self,p_string): + self.string=p_string + def transform(self): + result=self.string + found_widgets=self.widget.findall(self.string) + if len(found_widgets) > 0: + sEgal=self.wegal.findall(result) + found_widget=found_widgets[0] + result="" + if len(self.wtext.findall(found_widget))>0: + result="new IText" + if len(self.wselect.findall(found_widget))>0: + result="new ISelect" + if len(self.wjsDate.findall(found_widget))>0: + result="new IDate" + if len(self.wHidden.findall(found_widget))>0: + result="new IHidden" + if len(self.wcheckbox.findall(found_widget))>0: + result="new ICheckBox" + if len(self.wJSSearch_Poste.findall(found_widget))>0: + result="new IPoste" + if len(self.wJSSearch_only.findall(found_widget))>0: + result="new ICard" + if len(self.wSpan.findall(found_widget))>0: + result="new ISpan" + if len(self.wFile.findall(found_widget))>0: + result="new IFile" + if len(self.wRadio.findall(found_widget))>0: + result="new IRadio" + if len(self.wTextarea.findall(found_widget))>0: + result="new ITextArea" + if len(self.wButton.findall(found_widget))>0: + result="new IButton" + if len(self.wJSConcerned.findall(found_widget))>0: + result="new IConcerned" + if len(self.wTva.findall(found_widget))>0: + result="new ITva" + if len(self.wSearch.findall(found_widget))>0: + result="new ISearch" + if result == "" : + print "Invalid widget :"+self.string + return 'INVALIDWIDGET '+self.string + result=sEgal[0]+result + reArg=re.compile('\(.*\)') + content=reArg.findall(self.string) + reSplit=re.compile(',') + aArg=reSplit.split(content[0]) + if len(aArg) == 1 : + return result+'();'+"\n" + b=aArg[1:] + virg="" + arg="" + for i in b: + arg=arg+virg+i + virg=',' + return result+'('+arg+';'+"\n" + return result + + +if __name__ == "__main__": + string=" $button_escape=new widget('button','Echapper');" + a=Transform(string) + print a.transform() + +# +# if len(sys.argv) < 1 : +# print "Erreur pas de fichier comme argument" +# sys.exit(1) +# files=glob.glob(sys.argv[1]) +# for file in files: +# lines=file.readlines() +# for line in lines: +# diff --git a/dev/usage_file.py b/dev/usage_file.py new file mode 100755 index 000000000..0658b7dca --- /dev/null +++ b/dev/usage_file.py @@ -0,0 +1,49 @@ +#!/usr/bin/python +# Check if the files in include are still used +# +# This file is a part of PhpCompta under GPL +# Author D. DE BONTRIDDER ddebontridder@yahoo.fr +from transform import * +import sys +import os +import glob +if len(sys.argv) < 2 : + print "you need at least two arguments : the file name and the files " + print " into you look" + sys.exit(3) + +filenames=glob.glob(sys.argv[1]) +if len(filenames) == 0: + filenames=[] + filenames.append(sys.argv[1]) +print str(filenames)+ "<-"+sys.argv[1] +for f in filenames: + file_usage=[] + filename=os.path.basename(f) + + for a in range(2,len(sys.argv)): + files=glob.glob(sys.argv[a]) + print str(a)+" : "+sys.argv[a] + reFunction=re.compile(filename) + #reFunction=re.compile('(require|include|form).*'+filename,re.IGNORECASE) + for file in files: + #print "Working on file "+file + fold=open(file) + lines=fold.readlines() + for line in lines: + found=reFunction.findall(line) + if len(found) != 0 : + tmp={file:filename} + file_usage.append(tmp) + + fold.close() + #print 'finished, remaining %d' % (total) + #print file_usage + #print "lenght "+str(len(file_usage)) + if len (file_usage) > 0 : + print "This file "+filename+" is used in " + for x in file_usage: + print x.keys()[0] + else: + print filename +" is never used " + diff --git a/dev/usage_function.py b/dev/usage_function.py new file mode 100755 index 000000000..73a34926a --- /dev/null +++ b/dev/usage_function.py @@ -0,0 +1,65 @@ +#!/usr/bin/python +# Check if a function is still used +# +# This file is a part of PhpCompta under GPL +# Author D. DE BONTRIDDER ddebontridder@yahoo.fr + +from transform import * +import sys +import os +import glob +if len(sys.argv) < 2 : + print "you need at least one argument : the file containing the function" + print " the second and the thirst are the files where you look for those functions" + sys.exit(3) + +files=glob.glob(sys.argv[1]) +total=len(files) +print "Total file to handle %d " % (len(files)) +reFunction=re.compile('(function) (\w+).*\((.*)\)') +function_name=[] +fList=open("function.txt","a+") +for file in files: + print "Working on file "+file + if file.find('class_') != -1: + continue + fold=open(file) + lines=fold.readlines() + for line in lines: + found=reFunction.findall(line) + if len(found) != 0 : + fctname=found[0][1] + tmp={file:fctname} + function_name.append(tmp) + fList.write(file + ";" + fctname+"\n") + fold.close() + total=total-1 + print 'finished, remaining %d' % (total) +fList.close() +if len(sys.argv) == 2 : + print "the fonctions are " + for e in function_name: + fct=e.values()[0] + print fct + +used={} +for e in function_name: + fct=e.values()[0] + used[fct]=0 +for a in range(2,len(sys.argv)): + print str(a)+ ': '+sys.argv[a] + files_target=glob.glob(sys.argv[a]) + + for e in function_name: + fct=e.values()[0] + for file in files_target: + fd=open(file) + buffer=fd.readlines() + for line in buffer: + if line.find(fct)!= -1: + used[fct]=used[fct]+1 + fd.close() + + +for u in used.keys(): + print "%s : %d " % ( u,used[u]) diff --git a/dev/without_check.py b/dev/without_check.py new file mode 100755 index 000000000..2b1332330 --- /dev/null +++ b/dev/without_check.py @@ -0,0 +1,42 @@ +#!/usr/bin/python +# brief = check if the files given in arguments using +# the -> check_dossier function +# +# This file is a part of PhpCompta under GPL +# Author D. DE BONTRIDDER ddebontridder@yahoo.fr + + +from transform import * +import sys +import os +import glob + +if len(sys.argv) == 1: + print "you need one or more filename as argument" + sys.exit(3) + +files=glob.glob(sys.argv[1]) +total=len(files) +print "Total file to handle %d " % (len(files)) +for file in files: + #print "Working on file "+file + fold=open(file) + lines=fold.readlines() + widget=('new User','->check_dossier','->Check') + check={} + for w in widget: + check[w]=0 + require="" + for line in lines: + for w in widget: + if check[w] == 1: + continue + if line.find(w) != -1 : + check[w]=1 + fold.close() + for w in widget: + if check[w] == 0 : + print "Missing in "+file+" "+w + total=total-1 + #print 'finished, remaining %d' % (total) + diff --git a/doc/Diagram5.dia b/doc/Diagram5.dia new file mode 100644 index 0000000000000000000000000000000000000000..db6c40003c3497e55f1ce1fe373e31cbd2386eff GIT binary patch literal 9787 zcmZvBWmHsc)b_w2-Q6GzJ<<(IcY~y$bV;Z5fFRx7B_${g(nCoOAuZh?FvLg+$TvRE z`~LWz_0Es8_PW+NYwr8(eP7qL_hE>|1pNJ>0#AZ;QkO;jPwxI;XS8y<7&=&>GD<^7 z)j1_b<_$bjomg@sC9Bw@f0ipT*~BzdTt9u>|C4Yx#0~i5+-lNb0+MN79MTt{zpT3? zBA&$9$U_9(+=bjYH{-sj*k$FqC|uJf?#B8aX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RHWD2$Bw?jHvc8;`T(a#iUX4Uh>ED ztQa$*g6JBDl~);4Y>nY<^;6_;R1mE_>HWRn^ZEsl#k@zdv(8(D;Md5;)B(SHP{&KU zk521sIyBPqqvN@s{5+@j^`*0w$BlvNAl7d!kqkj+Pr24%vxx}^OV}*zTDL4QgGi;8 zifL9p+`EUp7%G)FPS`NV2hRLi%`GANa|zsi*w2)AXR5f^2o(FANpwX?zMNq$66wbi zD=I!7`<dy5bLvXbyH^wN6pi&G42$m{9}e1X6+tQeRXbCo6hUpfaw}#YQ{AcWqe*da z#9uM?ev4b8>Po1QTYcp-RnY*n@`=!~<KynkpZ?|W{5H=h5H{0&prZEqV9`byOYhf` zN@%_>95I+8`xXeYA|h(pwQ#Z}IBE7Dm5=e#keo6~$X>c?C*Bw3=fYS=A1>YQG}T@F zl~0=W*|@pzYh1K^V#JJ!O!HG}?o3iIUlo}g<M7)x#o=1(k9c6`XIf6NSq`pZ7Oq(o zYl==WyPf;b!k<6({U{tyiH=y5%gd+Q(La8=bwxfBMFQ_^vhZa6d5a&ZJcl32OFhHR zl%_^u?0-7y@0Ca4De43>)Uz$TBV#2kR&DnI)9#Y6HKO*^aWn*Xsl#V3_Sffl#-&<q T8h+pUJ~9MO#bL67o&f$IE0vGi literal 0 HcmV?d00001 diff --git a/doc/data.dia b/doc/data.dia new file mode 100644 index 000000000..a380fc719 --- /dev/null +++ b/doc/data.dia @@ -0,0 +1,17911 @@ +<?xml version="1.0" encoding="UTF-8"?> +<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/"> + <dia:diagramdata> + <dia:attribute name="background"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="pagebreak"> + <dia:color val="#000099"/> + </dia:attribute> + <dia:attribute name="paper"> + <dia:composite type="paper"> + <dia:attribute name="name"> + <dia:string>#Letter#</dia:string> + </dia:attribute> + <dia:attribute name="tmargin"> + <dia:real val="2.5399999618530273"/> + </dia:attribute> + <dia:attribute name="bmargin"> + <dia:real val="2.5399999618530273"/> + </dia:attribute> + <dia:attribute name="lmargin"> + <dia:real val="2.5399999618530273"/> + </dia:attribute> + <dia:attribute name="rmargin"> + <dia:real val="2.5399999618530273"/> + </dia:attribute> + <dia:attribute name="is_portrait"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="scaling"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="fitto"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="grid"> + <dia:composite type="grid"> + <dia:attribute name="width_x"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="width_y"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="visible_x"> + <dia:int val="1"/> + </dia:attribute> + <dia:attribute name="visible_y"> + <dia:int val="1"/> + </dia:attribute> + <dia:composite type="color"/> + </dia:composite> + </dia:attribute> + <dia:attribute name="color"> + <dia:color val="#d8e5e5"/> + </dia:attribute> + <dia:attribute name="guides"> + <dia:composite type="guides"> + <dia:attribute name="hguides"/> + <dia:attribute name="vguides"/> + </dia:composite> + </dia:attribute> + </dia:diagramdata> + <dia:layer name="Background" visible="true"> + <dia:object type="UML - Class" version="0" id="O0"> + <dia:attribute name="obj_pos"> + <dia:point val="-371.112,24.0506"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-371.162,24.0006;-359.362,29.9006"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-371.112,24.0506"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="11.699999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5.8000000000000007"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#action#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#The different privileges#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ac_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ac_description#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ac_module#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ac_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(9)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O1"> + <dia:attribute name="obj_pos"> + <dia:point val="-358.024,-52.7693"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-358.074,-52.8193;-339.274,-42.1193"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-358.024,-52.7693"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="18.699999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="10.6"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#action_gestion#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Action for Managing#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ag_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('action_g ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ag_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># f_id_dest#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># f_id_exp#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ag_title#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(70)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ag_timestamp#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#timestamp without time zone#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#now()#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ag_cal#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character(1)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#'C'::bpchar#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ag_ref_ag_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ag_comment#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ag_ref#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O2"> + <dia:attribute name="obj_pos"> + <dia:point val="-368.714,22.8854"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-368.764,22.8354;-351.714,27.1354"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-368.714,22.8854"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#attr_def#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#The available attributs for the cards#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ad_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_attr_ ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ad_text#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O3"> + <dia:attribute name="obj_pos"> + <dia:point val="-383.41,20.1203"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-383.46,20.0703;-369.885,24.3703"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-383.41,20.1203"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="13.475"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#attr_min#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#The value of attributs for the cards#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># frd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ad_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O4"> + <dia:attribute name="obj_pos"> + <dia:point val="-327.653,32.225"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-327.703,32.175;-320.803,35.475"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-327.653,32.225"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="6.7999999999999998"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="3.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#attr_value#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jft_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># av_text#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O5"> + <dia:attribute name="obj_pos"> + <dia:point val="-383.003,71.9626"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-383.053,71.9126;-366.353,79.6126"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-383.003,71.9626"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.600000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="7.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#bilan#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#contains the template and the data ... nts #</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># b_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('bilan_b_ ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># b_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># b_file_template#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># b_file_form#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># b_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O6"> + <dia:attribute name="obj_pos"> + <dia:point val="-365.054,99.0696"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-365.104,99.0196;-348.054,106.52"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-365.054,99.0696"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="7.4000000000000004"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#bud_card#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#card for budget module#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bc_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('bud_card ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bc_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(10)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bc_description#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bc_price_unit#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#0.0#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bc_unit#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(20)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bh_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O7"> + <dia:attribute name="obj_pos"> + <dia:point val="-361.394,102.292"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-361.444,102.242;-344.394,108.942"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-361.394,102.292"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="6.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#bud_detail#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Detail for card #</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('bud_deta ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># po_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bc_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bh_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pcm_val#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O8"> + <dia:attribute name="obj_pos"> + <dia:point val="-357.734,89.8124"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-357.784,89.7624;-340.384,95.6624"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-357.734,89.8124"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="17.300000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5.8000000000000007"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#bud_detail_periode#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Module budget detail by periode#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bdp_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('bud_deta ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bdp_amount#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#0.0#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O9"> + <dia:attribute name="obj_pos"> + <dia:point val="-353.725,88.6473"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-353.775,88.5973;-336.725,94.2973"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-353.725,88.6473"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#bud_hypothese#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bh_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('seq_bud_ ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bh_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bh_saldo#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bh_description#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pa_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O10"> + <dia:attribute name="obj_pos"> + <dia:point val="-350.065,-39.8147"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-350.115,-39.8647;-333.415,-25.9647"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-350.065,-39.8147"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.600000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="13.800000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#centralized#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#The centralized journal#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_centr ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_j_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_internal#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_montant#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_debit#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#true#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_jrn_def#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_poste#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_description#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_grp#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_comment#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_rapt#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_periode#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># c_order#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O11"> + <dia:attribute name="obj_pos"> + <dia:point val="-386.815,48.7468"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-386.865,48.6968;-372.265,52.7968"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-386.815,48.7468"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="14.5"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#del_action#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># del_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#serial#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># del_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># del_time#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#timestamp without time zone#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O12"> + <dia:attribute name="obj_pos"> + <dia:point val="-346.755,0"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-346.805,-0.05;-330.805,17.65"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-346.755,0"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="15.9"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="17.600000000000005"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#del_jrn#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_def_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_montant#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_comment#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_grpt_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_internal#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_tech_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#timestamp without time zone#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_tech_per#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_ech#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_ech#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_rapt#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_valid#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_opid#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_c_opid#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_pj#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#oid#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_pj_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_pj_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># del_jrn_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#timestamp without time zone#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_pj_number#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O13"> + <dia:attribute name="obj_pos"> + <dia:point val="-379.694,-26.6895"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-379.744,-26.7395;-364.094,-13.0395"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-379.694,-26.6895"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="15.550000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="13.600000000000003"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#del_jrnx#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_montant#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_poste#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_grpt#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_rapt#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_jrn_def#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_debit#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_text#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_centralized#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_internal#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_tech_user#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_tech_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#timestamp without time zone#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_tech_per#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_qcode#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O14"> + <dia:attribute name="obj_pos"> + <dia:point val="-391.534,-52.4344"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-391.584,-52.4844;-374.884,-43.1844"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-391.534,-52.4344"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.600000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="9.1999999999999993"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#document#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#This table contains all the documen ... files#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># d_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('document ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ag_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># d_lob#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#oid#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># d_number#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#bigint#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># d_filename#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># d_mimetype#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># d_state#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O15"> + <dia:attribute name="obj_pos"> + <dia:point val="-332.145,-52.3495"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-332.195,-52.3995;-315.145,-43.8995"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-332.145,-52.3495"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="8.4000000000000004"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#document_modele#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string># contains all the template for the ... ments#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># md_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('document ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># md_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># md_lob#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#oid#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># md_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># md_filename#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># md_mimetype#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O16"> + <dia:attribute name="obj_pos"> + <dia:point val="-340.485,63.7379"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-340.535,63.6879;-323.835,67.9879"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-340.485,63.7379"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.600000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#document_state#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#State of the document#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># s_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('document ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># s_value#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(50)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O17"> + <dia:attribute name="obj_pos"> + <dia:point val="-336.025,71.5228"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-336.075,71.4728;-319.025,75.7728"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-336.025,71.5228"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#document_type#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Type of document : meeting, invoice,...#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># dt_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('document ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># dt_value#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(80)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O18"> + <dia:attribute name="obj_pos"> + <dia:point val="-333.515,87.2821"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-333.565,87.2321;-316.865,91.5321"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-333.515,87.2821"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.600000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fiche#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Cards#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># f_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_fiche ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O19"> + <dia:attribute name="obj_pos"> + <dia:point val="-330.206,-32.9798"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-330.256,-33.0298;-313.206,-26.3298"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-330.206,-32.9798"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="6.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fiche_def#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Cards definition#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_fdef' ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fd_class_base#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fd_label#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fd_create_account#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#false#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># frd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O20"> + <dia:attribute name="obj_pos"> + <dia:point val="-374.796,-31.9449"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-374.846,-31.9949;-357.446,-26.8949"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-374.796,-31.9449"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="17.300000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fiche_def_ref#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Family Cards definition#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># frd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_fiche ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># frd_text#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># frd_class_base#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O21"> + <dia:attribute name="obj_pos"> + <dia:point val="-322.536,58.2076"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-322.586,58.1576;-305.536,64.8576"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-322.536,58.2076"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="6.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#form#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Forms content#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fo_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_form' ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fo_fr_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fo_pos#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fo_label#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fo_formula#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O22"> + <dia:attribute name="obj_pos"> + <dia:point val="-341.684,3.76513"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-341.734,3.71513;-333.212,7.01513"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-341.684,3.76513"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="8.4224999999999994"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="3.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#format_csv_banque#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># include_file#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O23"> + <dia:attribute name="obj_pos"> + <dia:point val="-318.876,12.9954"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-318.926,12.9454;-301.876,16.2454"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-318.876,12.9954"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="3.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#formdef#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fr_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_formd ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fr_label#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O24"> + <dia:attribute name="obj_pos"> + <dia:point val="-372.702,101.927"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-372.752,101.877;-361.302,105.977"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-372.702,101.927"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="11.35"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#groupe_analytique#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ga_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(10)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pa_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ga_description#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O25"> + <dia:attribute name="obj_pos"> + <dia:point val="-259.778,45.7817"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-259.828,45.7317;-236.128,60.8317"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-259.778,45.7817"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="23.600000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="15.000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#import_tmp#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Table temporaire pour l'importation ... t CSV#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># date_exec#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># date_valeur#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># devise#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># compte_ordre#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># detail#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># num_compte#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># status#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(1)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#'n'::character varying#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># bq_account#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_rapt#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># montant#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#import_tmp_status_check#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#CHECK ((((((status)::text = 'n ... xt)))#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O26"> + <dia:attribute name="obj_pos"> + <dia:point val="-385.605,53.8166"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-385.655,53.7666;-371.577,59.0666"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-385.605,53.8166"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="13.977499999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#info_def#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Contains the types of additionnal i ... ation#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># id_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># id_description#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O27"> + <dia:attribute name="obj_pos"> + <dia:point val="-330.016,48.2514"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-330.066,48.2014;-313.016,52.3014"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-330.016,48.2514"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#invoice#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># iv_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_invoi ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># iv_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># iv_file#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#oid#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O28"> + <dia:attribute name="obj_pos"> + <dia:point val="-311.556,49.0863"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-311.606,49.0363;-294.206,55.1363"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-311.556,49.0863"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="17.300000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="6"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jnt_fic_att_value#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#join between the card and the attri ... ition#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jft_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_jnt_f ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># f_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ad_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O29"> + <dia:attribute name="obj_pos"> + <dia:point val="-297.946,14.1712"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-297.996,14.1212;-280.946,21.0212"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-297.946,14.1712"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="6.8000000000000007"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jnt_fic_attr#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#join between the family card and th ... ition#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ad_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jnt_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#bigint#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('s_jnt_id ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jnt_order#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O30"> + <dia:attribute name="obj_pos"> + <dia:point val="-20.9385,73"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-20.9885,72.95;-2.1885,91.85"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-20.9385,73"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="18.699999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="18.800000000000004"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jrn#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Journal: content one line for a gro ... iting#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_jrn': ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_def_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_montant#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_comment#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_grpt_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_internal#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_tech_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#timestamp without time zone#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#now()#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_tech_per#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_ech#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_ech#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_rapt#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_valid#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#true#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_opid#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_c_opid#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_pj#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#oid#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_pj_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_pj_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_pj_number#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O31"> + <dia:attribute name="obj_pos"> + <dia:point val="-303.887,-39.8036"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-303.937,-39.8536;-286.887,-30.5536"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-303.887,-39.8036"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="9.1999999999999993"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jrn_action#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Possible action when we are in jour ... menu)#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ja_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_jrnac ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ja_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ja_desc#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ja_url#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ja_action#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ja_lang#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#'FR'::text#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ja_jrn_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character(3)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O32"> + <dia:attribute name="obj_pos"> + <dia:point val="-296.127,58.6387"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-296.177,58.5887;-277.377,71.6887"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-296.127,58.6387"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="18.699999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="13.000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jrn_def#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Definition of a journal, his properties#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_jrn_d ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_class_deb#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_class_cred#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_fiche_deb#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_fiche_cred#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_deb_max_line#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#1#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_cred_max_line#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#1#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_ech#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#false#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_ech_lib#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character(3)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_pj_pref#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O33"> + <dia:attribute name="obj_pos"> + <dia:point val="-346.551,47.956"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-346.601,47.906;-340.051,52.806"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-346.551,47.956"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="6.4500000000000002"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4.8000000000000007"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jrn_info#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ji_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#serial#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># id_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ji_value#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O34"> + <dia:attribute name="obj_pos"> + <dia:point val="-353.391,45.7909"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-353.441,45.7409;-345.141,49.8409"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-353.391,45.7909"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="8.1999999999999993"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jrn_periode#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># status#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O35"> + <dia:attribute name="obj_pos"> + <dia:point val="-293.417,30.7258"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-293.467,30.6758;-276.067,35.7758"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-293.417,30.7258"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="17.300000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jrn_rapt#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Rapprochement between operation#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jra_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_jrn_r ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jr_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jra_concerned#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O36"> + <dia:attribute name="obj_pos"> + <dia:point val="-374.642,40.8606"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-374.692,40.8106;-364.292,46.1106"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-374.642,40.8606"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="10.300000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jrn_type#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Type of journal (Sell, Buy, Financial...)#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_type_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character(3)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_desc#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O37"> + <dia:attribute name="obj_pos"> + <dia:point val="85.4803,0.2"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="85.4303,0.15;103.88,15.85"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="85.4803,0.2"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="18.350000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="15.600000000000003"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jrnx#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Journal: content one line for each ... iting#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_jrn_o ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#now()#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_montant#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_poste#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_grpt#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_rapt#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_jrn_def#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_debit#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#true#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_text#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_centralized#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#false#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_internal#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_tech_user#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_tech_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#timestamp without time zone#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#now()#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_tech_per#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_qcode#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O38"> + <dia:attribute name="obj_pos"> + <dia:point val="-408.968,-56.6661"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-409.018,-56.7161;-394.486,-48.2161"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-408.968,-56.6661"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="14.432499999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="8.4000000000000004"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#mod_payment#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Contains the different media of pay ... edger#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># mp_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#serial#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># mp_lib#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># mp_jrn_def_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># mp_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(3)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># mp_fd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#bigint#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># mp_qcode#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O39"> + <dia:attribute name="obj_pos"> + <dia:point val="-290.807,-20.0546"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-290.857,-20.1046;-273.807,-12.6046"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-290.807,-20.0546"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="7.4000000000000004"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#op_predef#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#predefined operation#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># od_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('op_def_o ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># jrn_def_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># od_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># od_item#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># od_jrn_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># od_direct#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O40"> + <dia:attribute name="obj_pos"> + <dia:point val="51.7106,66.8"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="51.6606,66.75;69.0606,78.45"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="51.7106,66.8"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="17.300000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="11.6"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#op_predef_detail#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#contains the detail of predefined operations#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># opd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('op_prede ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># od_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># opd_poste#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># opd_amount#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># opd_tva_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># opd_quantity#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># opd_debit#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># opd_tva_amount#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># opd_comment#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># opd_qc#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O41"> + <dia:attribute name="obj_pos"> + <dia:point val="-287.147,-12.9418"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-287.197,-12.9918;-269.097,-2.2918"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-287.147,-12.9418"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="18"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="10.6"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#operation_analytique#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#History of the analytic account#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># oa_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('historiq ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># po_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pa_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># oa_amount#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># oa_description#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># oa_debit#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#true#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># oa_group#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('s_oa_gro ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># oa_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># oa_row#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O42"> + <dia:attribute name="obj_pos"> + <dia:point val="-377.632,39.0955"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-377.682,39.0455;-367.279,43.3455"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-377.632,39.0955"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="10.3025"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#parameter#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#parameter of the company#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pr_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pr_value#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O43"> + <dia:attribute name="obj_pos"> + <dia:point val="-358.482,57.8425"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-358.532,57.7925;-351.632,61.8925"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-358.482,57.8425"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="6.7999999999999998"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#parm_code#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_value#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_comment#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O44"> + <dia:attribute name="obj_pos"> + <dia:point val="-282.437,54.8774"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-282.487,54.8274;-265.437,59.9274"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-282.437,54.8774"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#parm_money#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Currency conversion#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pm_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_curre ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pm_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character(3)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pm_rate#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O45"> + <dia:attribute name="obj_pos"> + <dia:point val="-278.777,-11.5728"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-278.827,-11.6228;-261.077,-3.1228"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-278.777,-11.5728"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="17.649999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="8.4000000000000004"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#parm_periode#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Periode definition#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_perio ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_start#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_end#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_exercice#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#to_char(now(), 'Y ... text)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_closed#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#false#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_central#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#false#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#parm_periode_check#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#CHECK ((p_end >= p_start))#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O46"> + <dia:attribute name="obj_pos"> + <dia:point val="-383.776,98.962"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-383.826,98.912;-370.043,104.212"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-383.776,98.962"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="13.682499999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5.2000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#parm_poste#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Contains data for finding is the ty ... sset)#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_value#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># p_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O47"> + <dia:attribute name="obj_pos"> + <dia:point val="-274.418,97.1969"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-274.468,97.1469;-257.418,102.247"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-274.418,97.1969"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#plan_analytique#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Plan Analytique (max 5)#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pa_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('plan_ana ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pa_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#'Sans Nom'::text#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pa_description#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O48"> + <dia:attribute name="obj_pos"> + <dia:point val="-270.758,44.1538"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-270.808,44.1038;-253.758,51.6038"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-270.758,44.1538"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="7.4000000000000004"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#poste_analytique#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Poste Analytique#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># po_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('poste_an ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># po_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pa_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># po_amount#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#0.0#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># po_description#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ga_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(10)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O49"> + <dia:attribute name="obj_pos"> + <dia:point val="71.6,38.2"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="71.55,38.15;88.6,51.05"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="71.6,38.2"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="12.800000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#quant_purchase#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_quant ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_internal#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_fiche#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_quantite#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_price#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_vat#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#0.0#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_vat_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_nd_amount#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#0.0#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_nd_tva#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#0.0#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_nd_tva_recup#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#0.0#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_supplier#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_valid#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character(1)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#'Y'::bpchar#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qp_dep_priv#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#0.0#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O50"> + <dia:attribute name="obj_pos"> + <dia:point val="-15.5286,-33.8"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-15.5786,-33.85;1.4714,-23.15"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-15.5286,-33.8"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="10.6"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#quant_sold#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Contains about invoice for customer#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qs_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_quant ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qs_internal#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qs_fiche#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qs_quantite#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qs_price#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qs_vat#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(20,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qs_vat_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qs_client#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># qs_valid#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character(1)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#'Y'::bpchar#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O51"> + <dia:attribute name="obj_pos"> + <dia:point val="-249.468,30.6"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-249.518,30.55;-227.218,43.05"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-249.468,30.6"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="22.199999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="12.4"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#stock_goods#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#About the goods#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># sg_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_stock ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># f_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># sg_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># sg_quantity#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(8,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># sg_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character(1)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#'c'::bpchar#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># sg_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># sg_tech_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#now()#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># sg_tech_user#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># sg_comment#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(80)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># sg_exercice#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#character varying(4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#stock_goods_sg_type#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#CHECK (((sg_type = 'c'::bpchar ... ar)))#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O52"> + <dia:attribute name="obj_pos"> + <dia:point val="-383.383,50.6235"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-383.433,50.5735;-369.663,56.4735"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-383.383,50.6235"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="13.67"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5.8000000000000007"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#tmp_pcmn#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Plan comptable minimum normalisé#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pcm_val#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pcm_lib#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pcm_val_parent#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pcm_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O53"> + <dia:attribute name="obj_pos"> + <dia:point val="-267.098,72.5974"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-267.148,72.5474;-250.098,79.2474"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-267.098,72.5974"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="6.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#todo_list#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Todo list#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tl_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('todo_lis ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tl_date#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#date#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tl_title#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tl_desc#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># use_login#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O54"> + <dia:attribute name="obj_pos"> + <dia:point val="-95.6789,-24"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-95.7289,-24.05;-78.6789,-17.35"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-95.6789,-24"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="6.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#tva_rate#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#Rate of vat#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tva_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval('s_tva'::regclass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tva_label#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tva_rate#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(8,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#0.0#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tva_comment#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tva_poste#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O55"> + <dia:attribute name="obj_pos"> + <dia:point val="-380.62,72.2323"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-380.67,72.1823;-370.07,77.2823"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-380.62,72.2323"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="10.5"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="5"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#user_local_pref#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#The user's local parameter #</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># user_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># parameter_type#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># parameter_value#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O56"> + <dia:attribute name="obj_pos"> + <dia:point val="-263.438,95.2317"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-263.488,95.1817;-246.438,99.2817"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-263.438,95.2317"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#user_sec_act#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ua_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_user_ ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ua_login#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ua_act_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O57"> + <dia:attribute name="obj_pos"> + <dia:point val="-71.2,16.8"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-71.25,16.75;-54.2,21.65"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-71.2,16.8"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.949999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4.8000000000000007"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#user_sec_jrn#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># uj_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>#nextval(('s_user_ ... lass)#</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># uj_login#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># uj_jrn_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># uj_priv#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O58"> + <dia:attribute name="obj_pos"> + <dia:point val="-334.143,97.8838"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-334.193,97.8338;-328.343,100.334"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-334.143,97.8838"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="5.75"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.3999999999999999"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#version#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># val#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O59"> + <dia:attribute name="obj_pos"> + <dia:point val="56.1007,69.2"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="56.0507,69.15;65.0507,78.85"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="56.1007,69.2"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="8.9000000000000004"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="9.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#vw_client#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># f_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># quick_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tva_num#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># rue#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># code_postal#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pays#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># telephone#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># email#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O60"> + <dia:attribute name="obj_pos"> + <dia:point val="-13.4082,28"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-13.4582,27.95;-4.1082,40.05"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-13.4082,28"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="9.25"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="12.000000000000002"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#vw_fiche_attr#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># f_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># vw_name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># vw_sell#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># vw_buy#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tva_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tva_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tva_rate#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#numeric(8,4)#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tva_label#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># vw_addr#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># vw_cp#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># quick_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># frd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O61"> + <dia:attribute name="obj_pos"> + <dia:point val="-12.1681,40.8"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-12.2181,40.75;-0.0681,49.85"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-12.1681,40.8"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="12.050000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="9"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#vw_fiche_def#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#all the attributs for card family#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ad_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ad_text#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># av_text#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fd_class_base#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fd_label#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># fd_create_account#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#boolean#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># frd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O62"> + <dia:attribute name="obj_pos"> + <dia:point val="-12.6204,12.6"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-12.6704,12.55;1.1721,19.25"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-12.6204,12.6"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="13.7425"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="6.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#vw_fiche_min#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>#minimum attribut for reference card#</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># frd_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ad_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># ad_text#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># frd_text#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># frd_class_base#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O63"> + <dia:attribute name="obj_pos"> + <dia:point val="-364.972,70.2672"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-365.022,70.2172;-357.772,74.3172"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-364.972,70.2672"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="7.1500000000000004"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="4"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#vw_poste_qcode#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># f_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_poste#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># j_qcode#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O64"> + <dia:attribute name="obj_pos"> + <dia:point val="-67.5401,-7.4"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-67.5901,-7.45;-58.5901,2.25"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="-67.5401,-7.4"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="8.9000000000000004"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="9.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#vw_supplier#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># f_id#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#integer#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># name#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># quick_code#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># tva_num#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># poste_comptable#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># rue#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># code_postal#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># pays#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># telephone#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string># email#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#text#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="3"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O65"> + <dia:attribute name="obj_pos"> + <dia:point val="-383.41,23.0203"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-383.46,-29.8449;-357.046,23.0703"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-383.41,23.0203"/> + <dia:point val="-383.41,-29.0449"/> + <dia:point val="-357.496,-29.0449"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O3" connection="8"/> + <dia:connection handle="1" to="O20" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O66"> + <dia:attribute name="obj_pos"> + <dia:point val="-383.41,23.8203"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-383.46,23.7703;-351.314,26.5854"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-383.41,23.8203"/> + <dia:point val="-383.41,25.7854"/> + <dia:point val="-351.764,25.7854"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O3" connection="10"/> + <dia:connection handle="1" to="O2" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O67"> + <dia:attribute name="obj_pos"> + <dia:point val="-327.653,34.125"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-327.703,34.075;-293.806,53.7863"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-327.653,34.125"/> + <dia:point val="-327.653,52.9863"/> + <dia:point val="-294.256,52.9863"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O4" connection="8"/> + <dia:connection handle="1" to="O28" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O68"> + <dia:attribute name="obj_pos"> + <dia:point val="-365.054,105.97"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-365.104,89.8648;-336.325,106.02"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-365.054,105.97"/> + <dia:point val="-365.054,90.5473"/> + <dia:point val="-336.775,90.5473"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#bud_hypothese_bh_id#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O6" connection="18"/> + <dia:connection handle="1" to="O9" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O69"> + <dia:attribute name="obj_pos"> + <dia:point val="-365.054,105.97"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-365.104,89.8648;-336.325,106.02"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-365.054,105.97"/> + <dia:point val="-365.054,90.5473"/> + <dia:point val="-336.775,90.5473"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fk_bud_hypo_bh_id#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O6" connection="18"/> + <dia:connection handle="1" to="O9" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O70"> + <dia:attribute name="obj_pos"> + <dia:point val="-361.394,106.792"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-361.444,101.287;-347.654,106.842"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-361.394,106.792"/> + <dia:point val="-361.394,101.97"/> + <dia:point val="-348.104,101.97"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fk_bud_card#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O7" connection="12"/> + <dia:connection handle="1" to="O6" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O71"> + <dia:attribute name="obj_pos"> + <dia:point val="-361.394,107.592"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-361.444,89.8648;-336.325,107.642"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-361.394,107.592"/> + <dia:point val="-361.394,90.5473"/> + <dia:point val="-336.775,90.5473"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fk_bud_hypothese_not_null#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O7" connection="14"/> + <dia:connection handle="1" to="O9" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O72"> + <dia:attribute name="obj_pos"> + <dia:point val="-361.394,108.392"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-370.163,52.841;-361.344,108.442"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-361.394,108.392"/> + <dia:point val="-361.394,53.5235"/> + <dia:point val="-369.713,53.5235"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fk_tmp_pcmn#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O7" connection="16"/> + <dia:connection handle="1" to="O52" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O73"> + <dia:attribute name="obj_pos"> + <dia:point val="-357.734,94.3124"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-357.784,-9.35534;-260.677,94.3624"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-357.734,94.3124"/> + <dia:point val="-357.734,-8.67284"/> + <dia:point val="-261.127,-8.67284"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fk_parm_periode#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O8" connection="12"/> + <dia:connection handle="1" to="O45" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O74"> + <dia:attribute name="obj_pos"> + <dia:point val="-357.734,95.1124"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-357.784,95.0624;-343.994,106.109"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-357.734,95.1124"/> + <dia:point val="-357.734,105.192"/> + <dia:point val="-344.444,105.192"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fk_bud_detail_bd_id#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O8" connection="14"/> + <dia:connection handle="1" to="O7" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O75"> + <dia:attribute name="obj_pos"> + <dia:point val="-353.725,93.7473"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-353.775,93.6973;-257.018,101.014"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-353.725,93.7473"/> + <dia:point val="-353.725,100.097"/> + <dia:point val="-257.468,100.097"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fk_bud_hypo_pa_id#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O9" connection="16"/> + <dia:connection handle="1" to="O47" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O76"> + <dia:attribute name="obj_pos"> + <dia:point val="-350.065,-32.1147"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-350.115,-32.1647;-276.977,62.3387"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-350.065,-32.1147"/> + <dia:point val="-350.065,61.5387"/> + <dia:point val="-277.427,61.5387"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O10" connection="20"/> + <dia:connection handle="1" to="O32" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O77"> + <dia:attribute name="obj_pos"> + <dia:point val="-350.065,-31.3147"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-370.163,-31.3647;-350.015,54.3235"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-350.065,-31.3147"/> + <dia:point val="-350.065,53.5235"/> + <dia:point val="-369.713,53.5235"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O10" connection="22"/> + <dia:connection handle="1" to="O52" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O78"> + <dia:attribute name="obj_pos"> + <dia:point val="-332.145,-46.0495"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-332.195,-46.0995;-318.625,75.3403"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-332.145,-46.0495"/> + <dia:point val="-332.145,74.4228"/> + <dia:point val="-319.075,74.4228"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#md_type#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O15" connection="14"/> + <dia:connection handle="1" to="O17" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O79"> + <dia:attribute name="obj_pos"> + <dia:point val="-333.515,90.9821"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-333.565,-30.8798;-312.806,91.0321"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-333.515,90.9821"/> + <dia:point val="-333.515,-30.0798"/> + <dia:point val="-313.256,-30.0798"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O18" connection="10"/> + <dia:connection handle="1" to="O19" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O80"> + <dia:attribute name="obj_pos"> + <dia:point val="-330.206,-26.8798"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-357.946,-29.8449;-330.156,-26.8298"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-330.206,-26.8798"/> + <dia:point val="-330.206,-29.0449"/> + <dia:point val="-357.496,-29.0449"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O19" connection="16"/> + <dia:connection handle="1" to="O20" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O81"> + <dia:attribute name="obj_pos"> + <dia:point val="-322.536,61.9076"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-322.586,14.2129;-301.476,61.9576"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-322.536,61.9076"/> + <dia:point val="-322.536,14.8954"/> + <dia:point val="-301.926,14.8954"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#formdef_fk#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O21" connection="10"/> + <dia:connection handle="1" to="O23" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O82"> + <dia:attribute name="obj_pos"> + <dia:point val="-311.556,53.7863"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-317.365,53.7363;-311.506,90.9821"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-311.556,53.7863"/> + <dia:point val="-311.556,90.1821"/> + <dia:point val="-316.915,90.1821"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O28" connection="10"/> + <dia:connection handle="1" to="O18" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O83"> + <dia:attribute name="obj_pos"> + <dia:point val="-311.556,54.5863"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-352.214,24.9854;-311.506,54.6363"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-311.556,54.5863"/> + <dia:point val="-311.556,25.7854"/> + <dia:point val="-351.764,25.7854"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O28" connection="12"/> + <dia:connection handle="1" to="O2" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O84"> + <dia:attribute name="obj_pos"> + <dia:point val="-297.946,18.0712"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-313.706,-30.8798;-297.896,18.1212"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-297.946,18.0712"/> + <dia:point val="-297.946,-30.0798"/> + <dia:point val="-313.256,-30.0798"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O29" connection="8"/> + <dia:connection handle="1" to="O19" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O85"> + <dia:attribute name="obj_pos"> + <dia:point val="-297.946,18.8712"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-352.214,18.8212;-297.896,26.5854"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-297.946,18.8712"/> + <dia:point val="-297.946,25.7854"/> + <dia:point val="-351.764,25.7854"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O29" connection="10"/> + <dia:connection handle="1" to="O2" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O86"> + <dia:attribute name="obj_pos"> + <dia:point val="-20.9385,77.7"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-277.877,60.7387;-20.8885,77.75"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-20.9385,77.7"/> + <dia:point val="-20.9385,61.5387"/> + <dia:point val="-277.427,61.5387"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O30" connection="10"/> + <dia:connection handle="1" to="O32" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O87"> + <dia:attribute name="obj_pos"> + <dia:point val="-303.887,-31.1036"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-364.792,-31.1536;-303.837,45.5606"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-303.887,-31.1036"/> + <dia:point val="-303.887,44.7606"/> + <dia:point val="-364.342,44.7606"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O31" connection="20"/> + <dia:connection handle="1" to="O36" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O88"> + <dia:attribute name="obj_pos"> + <dia:point val="-296.127,69.5387"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-364.792,43.9606;-296.077,69.5887"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-296.127,69.5387"/> + <dia:point val="-296.127,44.7606"/> + <dia:point val="-364.342,44.7606"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O32" connection="28"/> + <dia:connection handle="1" to="O36" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O89"> + <dia:attribute name="obj_pos"> + <dia:point val="-346.551,50.656"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-346.601,50.606;-1.78849,77.8175"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-346.551,50.656"/> + <dia:point val="-346.551,76.9"/> + <dia:point val="-2.23849,76.9"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fk_jrn#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O33" connection="10"/> + <dia:connection handle="1" to="O30" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O90"> + <dia:attribute name="obj_pos"> + <dia:point val="-346.551,51.456"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-372.078,51.406;-346.501,58.6341"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-346.551,51.456"/> + <dia:point val="-346.551,57.7166"/> + <dia:point val="-371.628,57.7166"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#fk_info_def#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O33" connection="12"/> + <dia:connection handle="1" to="O26" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O91"> + <dia:attribute name="obj_pos"> + <dia:point val="-353.391,47.6909"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-353.441,47.6409;-276.977,62.4562"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-353.391,47.6909"/> + <dia:point val="-353.391,61.5387"/> + <dia:point val="-277.427,61.5387"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jrn_per_jrn_def_id#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O34" connection="8"/> + <dia:connection handle="1" to="O32" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O92"> + <dia:attribute name="obj_pos"> + <dia:point val="-353.391,48.4909"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-353.441,-9.35534;-260.677,48.5409"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-353.391,48.4909"/> + <dia:point val="-353.391,-8.67284"/> + <dia:point val="-261.127,-8.67284"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jrn_periode_p_id#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O34" connection="10"/> + <dia:connection handle="1" to="O45" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O93"> + <dia:attribute name="obj_pos"> + <dia:point val="85.4803,6.5"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-370.163,6.45;85.5303,54.3235"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="85.4803,6.5"/> + <dia:point val="85.4803,53.5235"/> + <dia:point val="-369.713,53.5235"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O37" connection="14"/> + <dia:connection handle="1" to="O52" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O94"> + <dia:attribute name="obj_pos"> + <dia:point val="85.4803,8.9"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-277.877,8.85;85.5303,62.3387"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="85.4803,8.9"/> + <dia:point val="85.4803,61.5387"/> + <dia:point val="-277.427,61.5387"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O37" connection="20"/> + <dia:connection handle="1" to="O32" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O95"> + <dia:attribute name="obj_pos"> + <dia:point val="-408.968,-51.1661"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-409.018,-51.2161;-276.977,62.4562"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-408.968,-51.1661"/> + <dia:point val="-408.968,61.5387"/> + <dia:point val="-277.427,61.5387"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#mod_payment_mp_jrn_def_id_fkey#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O38" connection="12"/> + <dia:connection handle="1" to="O32" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O96"> + <dia:attribute name="obj_pos"> + <dia:point val="-408.968,-49.5661"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-409.018,-49.6161;-312.806,-29.1623"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-408.968,-49.5661"/> + <dia:point val="-408.968,-30.0798"/> + <dia:point val="-313.256,-30.0798"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#mod_payment_mp_fd_id_fkey#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O38" connection="16"/> + <dia:connection handle="1" to="O19" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O97"> + <dia:attribute name="obj_pos"> + <dia:point val="-290.807,-16.3546"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-290.857,-16.4046;-276.977,62.4562"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-290.807,-16.3546"/> + <dia:point val="-290.807,61.5387"/> + <dia:point val="-277.427,61.5387"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#jrn_def_id_fk#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O39" connection="10"/> + <dia:connection handle="1" to="O32" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O98"> + <dia:attribute name="obj_pos"> + <dia:point val="-287.147,-9.24178"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-287.197,-9.29178;-253.358,47.9713"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-287.147,-9.24178"/> + <dia:point val="-287.147,47.0538"/> + <dia:point val="-253.808,47.0538"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#operation_analytique_po_id_fkey#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O41" connection="10"/> + <dia:connection handle="1" to="O48" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O99"> + <dia:attribute name="obj_pos"> + <dia:point val="-287.147,-5.24178"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-287.197,-5.29178;104.28,5.0175"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-287.147,-5.24178"/> + <dia:point val="-287.147,4.1"/> + <dia:point val="103.83,4.1"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#operation_analytique_j_id_fkey#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O41" connection="20"/> + <dia:connection handle="1" to="O37" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O100"> + <dia:attribute name="obj_pos"> + <dia:point val="-270.758,48.6538"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-270.808,48.6038;-257.018,101.014"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-270.758,48.6538"/> + <dia:point val="-270.758,100.097"/> + <dia:point val="-257.468,100.097"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#poste_analytique_pa_id_fkey#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O48" connection="12"/> + <dia:connection handle="1" to="O47" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O101"> + <dia:attribute name="obj_pos"> + <dia:point val="71.6,41.7"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="71.55,3.4175;104.28,41.75"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="71.6,41.7"/> + <dia:point val="71.6,4.1"/> + <dia:point val="103.83,4.1"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#quant_purchase_j_id_fkey#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O49" connection="12"/> + <dia:connection handle="1" to="O37" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O102"> + <dia:attribute name="obj_pos"> + <dia:point val="71.6,45.7"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-79.1789,-21.7825;71.65,45.75"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="71.6,45.7"/> + <dia:point val="71.6,-21.1"/> + <dia:point val="-78.7289,-21.1"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#qp_vat_code_fk#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O49" connection="22"/> + <dia:connection handle="1" to="O54" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O103"> + <dia:attribute name="obj_pos"> + <dia:point val="-15.5286,-26.1"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-79.1789,-26.15;-15.4786,-20.1825"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-15.5286,-26.1"/> + <dia:point val="-15.5286,-21.1"/> + <dia:point val="-78.7289,-21.1"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#qs_vat_code_fk#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O50" connection="20"/> + <dia:connection handle="1" to="O54" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O104"> + <dia:attribute name="obj_pos"> + <dia:point val="-15.5286,-23.7"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-15.5786,-23.75;104.28,5.0175"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-15.5286,-23.7"/> + <dia:point val="-15.5286,4.1"/> + <dia:point val="103.83,4.1"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#quant_sold_j_id_fkey#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O50" connection="26"/> + <dia:connection handle="1" to="O37" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O105"> + <dia:attribute name="obj_pos"> + <dia:point val="-263.438,98.7317"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-359.862,26.1506;-263.388,98.7817"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-263.438,98.7317"/> + <dia:point val="-263.438,26.9506"/> + <dia:point val="-359.412,26.9506"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O56" connection="12"/> + <dia:connection handle="1" to="O0" connection="9"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Dependency" version="1" id="O106"> + <dia:attribute name="obj_pos"> + <dia:point val="-71.2,20.3"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="-277.877,20.25;-71.15,62.4562"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="-71.2,20.3"/> + <dia:point val="-71.2,61.5387"/> + <dia:point val="-277.427,61.5387"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#uj_priv_id_fkey#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="draw_arrow"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O57" connection="12"/> + <dia:connection handle="1" to="O32" connection="9"/> + </dia:connections> + </dia:object> + </dia:layer> +</dia:diagram> diff --git a/doc/developper/Doxyfile b/doc/developper/Doxyfile index c37cf5240..c9254e672 100644 --- a/doc/developper/Doxyfile +++ b/doc/developper/Doxyfile @@ -4,7 +4,7 @@ # Project related configuration options #--------------------------------------------------------------------------- PROJECT_NAME = phpcompta -PROJECT_NUMBER = 1 +PROJECT_NUMBER = Version 5 OUTPUT_DIRECTORY = . CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English @@ -47,8 +47,8 @@ EXTRACT_PRIVATE = YES EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_METHODS = YES -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO @@ -139,7 +139,7 @@ FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- SOURCE_BROWSER = YES INLINE_SOURCES = YES -STRIP_CODE_COMMENTS = YES +STRIP_CODE_COMMENTS = NO REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES USE_HTAGS = NO @@ -244,12 +244,12 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = YES +HIDE_UNDOC_RELATIONS = NO HAVE_DOT = NO CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES -UML_LOOK = NO +UML_LOOK = YES TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES @@ -269,4 +269,4 @@ DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- -SEARCHENGINE = NO +SEARCHENGINE = YES diff --git a/doc/developper/create_doc.sh b/doc/developper/create_doc.sh index 3f4601e47..8db50412c 100755 --- a/doc/developper/create_doc.sh +++ b/doc/developper/create_doc.sh @@ -2,7 +2,8 @@ doxygen cd html; sed -i "s/utf-8/utf-8/g" * cd .. if [ ! -z "$PGUSER" ] ; then - postgresql_autodoc -u $PGUSER --password $PGPASSWORD -h localhost -d mod1 - postgresql_autodoc -u $PGUSER --password $PGPASSWORD -h localhost -d account_repository + echo "DOMAINE = $DOMAIN" + postgresql_autodoc -u $PGUSER --password $PGPASSWORD -h localhost -d ${DOMAIN}mod1 + postgresql_autodoc -u $PGUSER --password $PGPASSWORD -h localhost -d ${DOMAIN}account_repository fi -cd ../../ && dev/compose_list.sh +cd ../../ && bash dev/compose_list.sh diff --git a/doc/document.dia b/doc/document.dia new file mode 100644 index 0000000000000000000000000000000000000000..2de7623432ac9a26b48cfb43202a193a30e9d998 GIT binary patch literal 3365 zcmV+=4chV_iwFP!000021MOX1lj1fOeV<?9A`h8VF=|PcEo(?mDw(QOYHPCDs!g6L z1A=zO*sN`)hke-JzLE`e+u#Ol%RNnBs^$YQy1KH?m2`A;{o_wxm!b7VCTS2yw*!Lk zz>?84o(0k3cJSAqzrOPZKYe)f<1Fyst3QjxUs~!HQL5kF4(_sS_5SAO{{9|?o7B(Z z1ckvGrSj%~ei-^U>Y|&$hc}k>xPY0T`TDc%r+$_t!DO9DEAp4}b};d$pBG8Ij%I`6 zs_k{tIE)kPiyz(&zMJQ-!Ogaqn^HMXl)ds7a*{~@bA8cRy@Y5|^hzexVwbBp4b&ys zW_55$O*#7SN7rnxO4UWt;=^}8v+s&3Z9jM@>sUo=jbuwdSp?Cc9o05r(GV1Qlv33g zj_?HLjFVlPTyAdCueq>ab4kDEf^@u!lPvLr?9k*Sjzj53h1D!s%jR~{sUNB?_LN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4id!X<`s=c-F$+8 zW(YSXpifH{`q3x|N^M)a!X5j?YZNXaT)NOR+U_M91yTO7)0bw6kPhUGm^y{N&@n4z z#GF%)@*xq(bNNVNO%RU^DM8fjL&|u}PeXf9-$n><5F@m3nqdJU;6mAAn+VXUp1EdA znb6jI$^>CGD%-ZkhS?ouA(S181b0T1BU@YL$ZM*dJ99g^y?bYECcCIr@uyfErnloC zzdU2lw5w05@Uk|H!-~>K!64tyD<ntd+y<~|44cOAs5^Mn9qbvyo-ynh!=5qh8N;6O ztKKv2>JC2Fqwf6I@u0i?kqLOv9c(A}fvUV~KI3Cj9C%C$U<o#uJKkVc4G_uWn@e_U zewicc>g*L9G2B%5eICP{=c36i*$&|&N{~x!s#E5O#@SrXWSP5g@*JL-AsatFvLv|C zLrcy#bLRXRj>YysVfT6R_Sax~C;L5GTUrbsvIJLou9gVo=ApntE@KqV)pmET_LHA1 z<iGssXMb@lV*_EW$0{3P?C~MfqG^*!od{J!k}_m_$YY+~4fXU}#t?V0+5ONCTs&(- zlvSWdjqZ+OLY+spyw{%2!SLvNdT3myava8sAhPC3ytJ0_jI<stpW3`WzwoYPS6yV1 z6r2bh1Q<4~ytFCLqm6BQ?nuP|!dzR&0P6LSO7f_eM?zB`6xq-g$P+Gk$*L<YcH!L9 vP7Bubzzqm5&rBp)`L%bk?y7hn`Wu;icvHMle-??q{P5=g{&vKP^AiC8Vuy(b literal 0 HcmV?d00001 diff --git a/doc/document2.dia b/doc/document2.dia new file mode 100644 index 0000000000000000000000000000000000000000..e0b5238860aed68f66e3d9acc998e5448422d423 GIT binary patch literal 2316 zcmZvacQ_P|1IABg_DHDgRpg92XB?OLMJY*0Sx;H#oa_}DnO&SM`-`}^j_keZ?7hxK zTt+r0GSAQN-=6RL$NPMq=l$<}UqKWD;QzWpy_G%cQJ{Q1a_98U?LWE-rdO$`A!12} zTV9h>Q&Wb6-G`QqcJbu_fN~+pt>zg=8>$+vO?IL}eC(;OX#=q;U-W8FqVkFN(Q(?2 z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F} z!a)%Zif~YbgCZOh;cjkCoSh=vDy@Mc+->M#n1uqQfn|h&HGi$biE3Lo!H6lLdXyuq zaFE+g9U`p}DJBDnOl3g1uW^{WP0#cB)g^?*6|AqcQ#Q$=VgeNtsF*;-1S%#_F@cH+ zR7_xH91yr5aDg>{9f9k-ay{x;c0}dswkntUTU;3LF@s2;J9Hc*GgSGfzfwuffC;2A z@fIl4ta-3W)1gf#m9NblKk>v^=Z9$V#Mtq+e=oj(d^P;Uv<&Rjzhphekyh%Y#`eA7 zde<}Y@Qcnvluqhwyv(Y*vpU<YE)tV<pB!mJ>NaG*&DM`S!xz)iT){(%{pwzr%N{XE zQmi~Jg)q#U;6m|GygcIhA#>gJ;9lMlBbB~7UP^6xlp(234+m{%c|bATfR%W^iFqeh z65N)Sf*@Kwql+UR>d|5ZNoh!rNMwkvo-8Ict1KuJij+tEK79HZK}M|RaJ89l^)aO6 z(p|EmN1dc%Va7^&gkf)xQtmgA??uYi4|I2@OmSK*Tc`sqjOb_bNk%G2EcAeAH%3z9 zZ-^Dd1f%5<&yVa;MfrAj;(iP*y>nHsaCZq49fFtq2+7{y<zd)=FJ88P4&!=A2{-eU zy4Y=c#N|#z&;h3iW8?7|Wx)dY5w{NmxN%p7e>R4{<y@013*f>hl+-`CgBnUgkWwCD z*c+r|9~8ma*`!qANGXs~Zm{%_Sj(E0%!ezcunf*ib&{7?omettC}uquN+eP5KudW= ziDm1xja~9r{WL6`Dh%^uvvk7%CZd8QTnrp-G&9`m5-AJ{#mbkCpNR1-S3v%t2u=}W zob;$mFbNAXSgQ7!CI6rZF3!j-T^gu+)X9ey1Ip{PR77|sLaKX6JS{mj#-9Nu1Php1 z9(o?+iu*8H63%s{!ifpNO5A>|RPD#g>O&Ge+q{17{$_bJzyIO?+b1+4)}H_Xmy}ll diff --git a/html/access.php b/html/access.php index 36e402d11..09b64270d 100644 --- a/html/access.php +++ b/html/access.php @@ -23,6 +23,8 @@ /*!\file * \brief first page */ +require_once("class_idate.php"); +require_once("class_itext.php"); require_once ('constant.php'); require_once ('ac_common.php'); require_once ('class_user.php'); @@ -31,17 +33,22 @@ require_once('class_periode.php'); require_once ('user_menu.php'); require_once ('class_dossier.php'); require_once('class_todo_list.php'); +require_once("class_itextarea.php"); +require_once('class_calendar.php'); +require_once('class_acc_ledger.php'); - -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $user=new User($cn); $user->Check(); $user->check_dossier(dossier::id()); + +html_page_start($_SESSION['g_theme']); /* Check Browser version if < IE6 then unsupported */ $browser=$_SERVER['HTTP_USER_AGENT']; if ( strpos($browser,'MSIE 6')!=false || strpos($browser,'MSIE 5')!=false ) { + echo <<<EOF <!--[if lt IE 7]> <div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'> @@ -62,94 +69,35 @@ EOF; exit(); } if ( DBVERSION!=dossier::get_version($cn)) { - echo '<h2 class="error">Votre base de données n\'est pas à jour, '; - $a="cliquez ici pour appliquer le patch"; + + echo '<h2 class="error">'._("Votre base de données n'est pas à jour"); + $a=_("cliquez ici pour appliquer le patch"); $base=dirname($_SERVER['REQUEST_URI']).'/admin/setup.php'; echo '<a hreF="'.$base.'">'.$a.'</a></h2>'; } -html_page_start($_SESSION['g_theme']); echo '<div class="u_tmenu">'; echo menu_tool('access.php'); echo '</div>'; echo '<div class="content">'; -/* - * Todo list - */ -echo JS_PROTOTYPE; -echo JS_TODO; -if ( isset($_REQUEST['save_todo_list'])) { - /* Save the new elt */ - $add_todo=new Todo_List($cn); - $add_todo->set_parameter('id',$_REQUEST['tl_id']); - $add_todo->set_parameter('title',$_REQUEST['p_title']); - $add_todo->set_parameter('desc',$_REQUEST['p_desc']); - $add_todo->set_parameter('date',$_REQUEST['p_date']); - $add_todo->save(); -} -$todo=new Todo_List($cn); - -$array=$todo->load_all(); -echo '<div style="float:left;width:27%;">'; -echo '<fieldset> <legend>Liste des tâches</legend>'; -echo '<div id="add_todo_list" style="display:none;text-align:left;line-height:3em">'; -echo '<form method="post">'; -$wDate=new widget('js_date','','p_date'); -$wTitle=new widget('text','','p_title'); -$wDesc=new widget('textarea','','p_desc'); -$wDesc->heigh=5; -echo "Date ".$wDate->IOValue().'<br>'; -echo "Titre ".$wTitle->IOValue().'<br>'; -echo "Description<br>".$wDesc->IOValue().'<br>'; -echo widget::hidden('phpsessid',$_REQUEST['PHPSESSID']); -echo dossier::hidden(); -echo widget::hidden('tl_id',0); -echo widget::submit('save_todo_list','Sauve','onClick="$(\'add_todo_list\').hide();$(\'add\').show();return true;"'); -echo widget::button('hide','Annuler','onClick="$(\'add_todo_list\').hide();$(\'add\').show();"'); -echo '</form>'; - -echo '</div>'; -echo widget::button('add','Ajout','onClick="add_todo()"'); -if ( ! empty ($array) ) { - echo '<table id="table_todo" width="100%">'; - $nb=0; - foreach ($array as $row) { -if ( $nb % 2 == 0 ) $odd='class="odd" '; else $odd='class="even" '; -$nb++; - echo '<tr id="tr'.$row['tl_id'].'" '.$odd.'>'. - '<td>'. - $row['tl_date']. - '</td>'. - '<td>'. - htmlspecialchars($row['tl_title']). - '</td>'. - '<td>'. - widget::button('mod','M','onClick="todo_list_show('.$row['tl_id'].')"'). - widget::button('del','E','onClick="todo_list_remove('.$row['tl_id'].')"'). - '</td>'. - '</tr>'; - } - echo '</table>'; -} -echo '</fieldset>'; -echo '</div>'; /* * Mini Report */ $report=$user->get_mini_report(); + $rapport=new Acc_Report($cn); $rapport->id=$report; if ( $rapport->exist() == false ) { $user->set_mini_report(0); $report=0; } -if ( $report != 0 ) { +if ( $report != 0 ) { echo '<div style="float:right;width:27%">'; echo '<fieldset style="background-color:white"><legend>'.$rapport->get_name().'</legend>'; $exercice=$user->get_exercice(); if ( $exercice == 0 ) { - echo "<script>alert('Aucune periode par defaut');</script>"; + alert(_('Aucune periode par defaut')); } else { $periode=new Periode($cn); $limit=$periode->limit_year($exercice); @@ -172,9 +120,89 @@ if ( $report != 0 ) { echo '</div>'; } else { echo '<div style="float:right;width:20%">'; - echo '<fieldset style="background-color:white"><legend> Aucun rapport défini</legend>'; - echo '<a href="user_pref.php?'.dossier::get().'"> Cliquez ici pour mettre à jour vos préférences</a>'; + echo '<fieldset style="background-color:white"><legend>'._('Aucun rapport défini').'</legend>'; + echo '<a href="user_pref.php?'.dossier::get().'">'._('Cliquez ici pour mettre à jour vos préférences').'</a>'; echo '</fieldset>'; echo '</div>'; } +/* + * Todo list + */ +echo JS_TODO; +echo dossier::hidden(); +echo HtmlInput::phpsessid(); +echo js_include('prototype.js'); +if ( isset($_REQUEST['save_todo_list'])) { + /* Save the new elt */ + $add_todo=new Todo_List($cn); + $add_todo->set_parameter('id',$_REQUEST['tl_id']); + $add_todo->set_parameter('title',$_REQUEST['p_title']); + $add_todo->set_parameter('desc',$_REQUEST['p_desc']); + $add_todo->set_parameter('date',$_REQUEST['p_date']); + $add_todo->save(); +} +$todo=new Todo_List($cn); +$array=$todo->load_all(); + + +echo '<div style="float:right;width:35em;">'; +echo '<fieldset> <legend>'._('Pense-Bête').'</legend>'; +echo '<div id="add_todo_list" style="display:none;text-align:left;line-height:3em">'; +echo '<form method="post">'; +$wDate=new IDate('p_date'); +$wTitle=new IText('p_title'); +$wDesc=new ITextArea('p_desc'); +$wDesc->heigh=5; +echo _("Date")." ".$wDate->input().'<br>'; +echo _("Titre")." ".$wTitle->input().'<br>'; +echo _("Description")."<br>".$wDesc->input().'<br>'; +echo HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); +echo dossier::hidden(); +echo HtmlInput::hidden('tl_id',0); +echo HtmlInput::submit('save_todo_list',_('Sauve'),'onClick="hide(\'add_todo_list\');show(\'add\');return true;"'); +echo HtmlInput::button('hide',_('Annuler'),'onClick="$(\'add_todo_list\').hide();$(\'add\').show();return true;"'); +echo '</form>'; + echo '</div>'; +echo HtmlInput::button('add',_('Ajout'),'onClick="add_todo()"'); +if ( ! empty ($array) ) { + echo '<table id="table_todo" width="100%">'; + $nb=0; + foreach ($array as $row) { +if ( $nb % 2 == 0 ) $odd='class="odd" '; else $odd='class="even" '; +$nb++; + echo '<tr id="tr'.$row['tl_id'].'" '.$odd.'>'. + '<td>'. + $row['tl_date']. + '</td>'. + '<td>'. + '<a href="javascript:void" onclick="todo_list_show(\''.$row['tl_id'].'\')">'. + htmlspecialchars($row['tl_title']). + '</a>'. + '</td>'. + '<td>'. + HtmlInput::button('del','X','onClick="todo_list_remove('.$row['tl_id'].')"'). + '</td>'. + '</tr>'; + } + echo '</table>'; +} +echo '</fieldset>'; +echo '</div>'; + +/* others report */ +$cal=new Calendar(); +$cal->get_preference(); +$Ledger=new Acc_Ledger($cn,0); +$Operation=new Action($cn); +$last_ledger=$Ledger->get_last(10); +$last_operation=$Operation->get_last(10); +ob_start(); +require_once('template/dashboard.php'); +$ret=ob_get_contents(); +ob_end_clean(); +echo $ret; + +echo '</div>'; + + diff --git a/html/admin/setup.php b/html/admin/setup.php index 12b80563b..e0efde526 100644 --- a/html/admin/setup.php +++ b/html/admin/setup.php @@ -53,10 +53,10 @@ h2.error { /* $Revision*/ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /*!\file - * \brief This file permit to upgrade a version of phpcompta, it should be + * \brief This file permit to upgrade a version of phpcompta, it should be * used and immediately delete after an upgrade. * This file is included in each release for a new upgrade - * + * */ $inc_path=get_include_path(); @@ -76,26 +76,27 @@ if (isset($_POST['save_config'])) { $url=config_file_create($_POST,1,$os); } - -/* if the config file is not found we propose to create one */ -if ( is_writable ('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'constant.php') == false ) { -echo '<h2 class="error"> On ne peut pas écrire dans le répertoire de phpcompta, changez-en les droits </h2>'; -exit(); -} if ( ! file_exists('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'config.inc.php')) { + /* if the config file is not found we propose to create one */ + if ( is_writable ('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'constant.php') == false ) { + echo '<h2 class="error"> On ne peut pas écrire dans le répertoire de phpcompta, changez-en les droits </h2>'; + exit(); + } + echo '<form method="post">'; -echo '<h1 class="info">Entrez les informations nécessaires à phpcompta</h1>'; + echo '<h1 class="info">Entrez les informations nécessaires à phpcompta</h1>'; echo config_file_form(); - echo widget::submit('save_config','Sauver la configuration'); + echo HtmlInput::submit('save_config','Sauver la configuration'); echo '</form>'; exit(); } include_once('constant.php'); -include_once('postgres.php'); +require_once('class_database.php'); + include_once('debug.php'); include_once('ac_common.php'); /* If htaccess file doesn't exists we create them here - * if os == 1 then windows, 0 means Unix + * if os == 1 then windows, 0 means Unix */ $file='..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'.htaccess'; if ( ! file_exists ( $file) ) { @@ -165,13 +166,13 @@ foreach (array('magic_quotes_gpc','magic_quotes_runtime') as $a) { } $module=get_loaded_extensions(); -if ( in_array('pgsql',$module) == false ) +if ( in_array('pgsql',$module) == false ) { print '<h2 class="error">Désolé mais soit vous n\'avez pas installé le package pour postgresql soit php n\'a pas pas été compilé avec les bonnes options </h2>'; $flag_php++; } -if ( in_array('bcmath',$module) == false ) +if ( in_array('bcmath',$module) == false ) { print '<h2 class="error">Désolé mais soit vous n\'avez pas installé le package pour bcmath soit php n\'a pas pas été compilé avec les bonnes options </h2>'; $flag_php++; @@ -205,58 +206,52 @@ if ( $flag_php==0 ) { echo '<p class="error"> php mal configuré</p>'; exit -1; } -$cn=DbConnect(-2,'template1'); +/* check user */ +$cn=new Database(-1,'template'); -if ($cn == false ) { - print "<p> Vous devez absolument taper dans une console la commande 'createuser -A -d -P phpcompta et vous donnez dany comme mot de passe (voir la documentation)' </p> -<p>Ces commandes créeront l'utilisateur phpcompta avec le droit de créer des bases de donné.</p>"; - exit(); - } ?> <h2>Database version </h2> <?php // Verify Psql version //-- $sql="select setting from pg_settings where name='server_version'"; -$Res=ExecSql($cn,$sql); -$row=pg_fetch_array($Res,0); -$version=$row[0]; +$version=$cn->get_value($sql); var_dump($version); if ( $version[0] != '8' ) { ?> - <p> Vous devez absolument utiliser au minimum une version 8 de PostGresql, si votre distribution n'en + <p> Vous devez absolument utiliser au minimum une version 8.2 de PostGresql, si votre distribution n'en offre pas, installez en une en la compilant. </p><p>Lisez attentivement la notice sur postgresql.org pour migrer -vos bases de données en 8 +vos bases de données </p> <?php exit(); //' } ?> -<h2>Database Setting</h2> +<h2>Database Setting</h2> <?php -// Language plsql is installed +// Language plsql is installed //-- $sql="select lanname from pg_language where lanname='plpgsql'"; -$Res=CountSql($cn,$sql); +$Res=$cn->count_sql($sql); if ( $Res==0) { ?> <p> Vous devez installer le langage plpgsql pour permettre aux fonctions SQL de fonctionner.</p> -<p>Pour cela, sur la ligne de commande, faites createlang plpgsql template1 +<p>Pour cela, sur la ligne de commande en tant qu\'utilisateur postgres, faites createlang plpgsql template1 </p> <?php exit(); } // Memory setting //-- -$sql="select name,setting - from pg_settings - where +$sql="select name,setting + from pg_settings + where name in ('effective_cache_size','shared_buffers')"; -$Res=ExecSql($cn,$sql); +$cn->exec_sql($sql); $flag=0; -for ($e=0;$e<pg_NumRows($Res);$e++) { - $a=pg_fetch_array($Res,$e); +for ($e=0;$e<$cn->size();$e++) { + $a=$cn->fetch($e); switch ($a['name']){ case 'effective_cache_size': if ( $a['setting'] < 1000 ){ @@ -289,114 +284,103 @@ if ( ! isset($_POST['go']) ) { if ( ! isset($_POST['go']) ) exit(); // Check if account_repository exists -$account=CountSql($cn, - "select * from pg_database where datname='".domaine."account_repository'"); +$account=$cn->count_sql("select * from pg_database where datname=lower('".domaine."account_repository')"); // Create the account_repository if ($account == 0 ) { echo "Creation of ".domaine."account_repository"; - if ( DEBUG=='false') ob_start(); - ExecSql($cn,"create database ".domaine."account_repository encoding='utf8'"); - $cn=DbConnect(); - StartSql($cn); - execute_script($cn,"sql/account_repository/schema.sql"); - execute_script($cn,"sql/account_repository/data.sql"); - execute_script($cn,"sql/account_repository/constraint.sql"); - Commit($cn); + if ( DEBUG=='false') ob_start(); + $cn->exec_sql("create database ".domaine."account_repository encoding='utf8'"); + $cn=new Database(); + $cn->start(); + $cn->execute_script("sql/account_repository/schema.sql"); + $cn->execute_script("sql/account_repository/data.sql"); + $cn->execute_script("sql/account_repository/constraint.sql"); + $cn->commit($cn); if ( DEBUG=='false') ob_end_clean(); echo "Creation of Modele1"; - if ( DEBUG=='false') ob_start(); - ExecSql($cn,"create database ".domaine."mod1 encoding='utf8'"); - $cn=DbConnect(1,'mod'); - StartSql($cn); - execute_script($cn,'sql/mod1/schema.sql'); - execute_script($cn,'sql/mod1/data.sql'); - execute_script($cn,'sql/mod1/constraint.sql'); - Commit($cn); + if ( DEBUG=='false') ob_start(); + $cn->exec_sql("create database ".domaine."mod1 encoding='utf8'"); + + $cn=new Database(1,'mod'); + $cn->start(); + $cn->execute_script('sql/mod1/schema.sql'); + $cn->execute_script('sql/mod1/data.sql'); + $cn->execute_script('sql/mod1/constraint.sql'); + $cn->commit(); + if ( DEBUG=='false') ob_end_clean(); echo "Creation of Modele2"; - ExecSql($cn,"create database ".domaine."mod2 encoding='utf8'"); - $cn=DbConnect(2,'mod'); - StartSql($cn); + $cn->exec_sql("create database ".domaine."mod2 encoding='utf8'"); + $cn=new Database(2,'mod'); + $cn->start(); if ( DEBUG=='false') { ob_start(); } - execute_script($cn,'sql/mod1/schema.sql'); - execute_script($cn,'sql/mod2/data.sql'); - execute_script($cn,'sql/mod1/constraint.sql'); - Commit($cn); + $cn->execute_script('sql/mod1/schema.sql'); + $cn->execute_script('sql/mod2/data.sql'); + $cn->execute_script('sql/mod1/constraint.sql'); + $cn->commit(); if ( DEBUG=='false') ob_end_clean(); }// end if // Add a french accountancy model //-- -$cn=DbConnect(); +$cn=new Database(); -// Test the connection -//-- -$a=DbConnect(); -if ( $a==false) { - exit ("<h2 class=\"error\">".__LINE__." test has failed !!!</h2>"); - -} -if ( ($Res=ExecSql($a,"select * from ac_users") ) == false ) { - exit ("<h2 class=\"error\">".__LINE__." test has failed !!!</h2>"); -} else - print "Connect to database success <br>"; echo "<h2 class=\"info\"> Félicitation : Installation réussie</h2>"; echo '<hr>'; echo "<h1>Mise a jour du systeme</h1>"; echo "<h2 > Mise à jour dossier</h2>"; -$cn=DbConnect(); -$Resdossier=ExecSql($cn,"select dos_id, dos_name from ac_dossier"); -$MaxDossier=pg_NumRows($Resdossier); +$Resdossier=$cn->exec_sql("select dos_id, dos_name from ac_dossier"); +$MaxDossier=$cn->size($Resdossier); //---------------------------------------------------------------------- // Upgrade the folders //---------------------------------------------------------------------- for ($e=0;$e < $MaxDossier;$e++) { - $db_row=pg_fetch_array($Resdossier,$e); + $db_row=$cn->fetch($e); echo "<h3>Patching ".$db_row['dos_name'].'</h3>'; - $db=DbConnect($db_row['dos_id'],'dossier'); - apply_patch($db,$db_row['dos_name']); + $db=new Database($db_row['dos_id'],'dos'); + $db->apply_patch($db_row['dos_name']); } //---------------------------------------------------------------------- // Upgrade the template //---------------------------------------------------------------------- -$Resdossier=ExecSql($cn,"select mod_id, mod_name from modeledef"); -$MaxDossier=pg_NumRows($Resdossier); +$Resdossier=$cn->exec_sql("select mod_id, mod_name from modeledef"); +$MaxDossier=$cn->size(); echo '<hr>'; echo "<h2>Mise à jour modèle</h2>"; for ($e=0;$e < $MaxDossier;$e++) { - $db_row=pg_fetch_array($Resdossier,$e); + $db_row=$cn->fetch($e); echo "<h3>Patching ".$db_row['mod_name']."</h3>"; - $db=DbConnect($db_row['mod_id'],'mod'); - apply_patch($db,$db_row['mod_name']); + $db=new Database($db_row['mod_id'],'mod'); + $db->apply_patch($db_row['mod_name']); } echo '</ul>'; //---------------------------------------------------------------------- // Upgrade the account_repository //---------------------------------------------------------------------- echo '<hr>'; - echo "<h2>Mise à jour Repository</h2>"; - $cn=DbConnect(); - if ( DEBUG == 'false') ob_start(); - $MaxVersion=9; - for ($i=4;$i<= $MaxVersion;$i++) - { - if ( get_version($cn) <= $i ) { - execute_script($cn,'sql/patch/ac-upgrade'.$i.'.sql'); - } - } + echo "<h2>Mise à jour Repository</h2>"; + $cn=new Database(); + if ( DEBUG == 'false') ob_start(); + $MaxVersion=10; + for ($i=4;$i<= $MaxVersion;$i++) + { + if ( $cn->get_version() <= $i ) { + $cn->execute_script('sql/patch/ac-upgrade'.$i.'.sql'); + } + } - if (DEBUG=='false') ob_end_clean(); - echo "<h2 class=\"info\">Voilà tout est installé ;-) </H2>"; + if (DEBUG=='false') ob_end_clean(); + echo "<h2 class=\"info\">Voilà tout est installé ;-) </H2>"; ?> diff --git a/html/admin/sql/patch/ac-upgrade10.sql b/html/admin/sql/patch/ac-upgrade10.sql new file mode 100644 index 000000000..cff759eb5 --- /dev/null +++ b/html/admin/sql/patch/ac-upgrade10.sql @@ -0,0 +1,7 @@ +begin; +--- on account_repository +insert into user_global_pref(user_id,parameter_type,parameter_value ) select use_login,'LANG','fr_FR.utf8' from ac_users ; + +update version set val=11; +commit; + diff --git a/html/admin/sql/patch/upgrade59.sql b/html/admin/sql/patch/upgrade59.sql new file mode 100644 index 000000000..1b9be6e28 --- /dev/null +++ b/html/admin/sql/patch/upgrade59.sql @@ -0,0 +1,414 @@ +begin; + +insert into parameter(pr_id,pr_value) values ('MY_CHECK_PERIODE','Y'); +alter table jrn add jr_mt text ; +update jrn set jr_mt= extract (microseconds from jr_tech_date); +create index x_mt on jrn(jr_mt); +DROP FUNCTION insert_quant_purchase(text, numeric, character varying, numeric, numeric,numeric, integer, numeric, numeric, numeric, character varying); +DROP FUNCTION insert_quant_sold(text, character varying, numeric, numeric, numeric, integer, character varying); + +alter table groupe_analytique add constraint fk_pa_id foreign key(pa_id) references plan_analytique(pa_id) on delete cascade; +alter table stock_goods add constraint fk_stock_good_f_id foreign key(f_id) references fiche(f_id) ; + +drop table invoice; + +DROP FUNCTION account_parent(poste_comptable); + +CREATE FUNCTION account_parent(p_account poste_comptable) + RETURNS poste_comptable AS +$BODY$ +declare + nParent tmp_pcmn.pcm_val_parent%type; + sParent varchar; + nCount integer; +begin + sParent:=to_char(p_account,'9999999999999999'); + sParent:=trim(sParent::text); + 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'); + exit; + 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; + raise notice 'account_parent : Parent is %',nParent; + return nParent; +end; +$BODY$ +LANGUAGE 'plpgsql'; + +alter table document drop column d_state; + +--alter table action_gestion set ag_title type text; +ALTER TABLE action_gestion ADD COLUMN ag_hour text default null; +ALTER TABLE action_gestion ADD COLUMN ag_priority integer; +ALTER TABLE action_gestion ALTER COLUMN ag_priority SET DEFAULT 2; +ALTER TABLE action_gestion ADD COLUMN ag_dest text; +ALTER TABLE action_gestion ADD COLUMN ag_owner text; +ALTER TABLE action_gestion ADD COLUMN ag_contact int8; + +CREATE OR REPLACE FUNCTION action_gestion_ins_upd() + RETURNS trigger AS +$BODY$ +begin +NEW.ag_title := substr(trim(NEW.ag_title),1,70); +NEW.ag_hour := substr(trim(NEW.ag_hour),1,5); +return NEW; +end; +$BODY$ +LANGUAGE 'plpgsql' VOLATILE; + +CREATE TRIGGER action_gestion_t_insert_update + BEFORE INSERT OR UPDATE + ON action_gestion + FOR EACH ROW + EXECUTE PROCEDURE action_gestion_ins_upd(); + +COMMENT ON TRIGGER action_gestion_t_insert_update ON action_gestion IS 'Truncate the column ag_title to 70 char'; + +ALTER TABLE action_gestion ADD COLUMN ag_state integer; +update action_gestion set f_id_dest=f_id_exp where f_id_exp != 0; +alter table action_gestion drop column f_id_exp; +UPDATE document_state SET s_value= 'Clôturé' WHERE s_id=1; +UPDATE document_state SET s_value= 'A suivre' WHERE s_id=2; +UPDATE document_state SET s_value= 'A faire' WHERE s_id=3; +UPDATE document_state SET s_value= 'Abandonné' WHERE s_id=4; + + +CREATE TABLE action_detail +( + ad_id serial, + f_id int8, + ad_text text, + ad_pu numeric(20,4) DEFAULT 0, + ad_quant numeric(20,4) DEFAULT 0, + ad_tva_id integer DEFAULT 0, + ad_tva_amount numeric(20,4) DEFAULT 0, + ad_total_amount numeric(20,4) DEFAULT 0, + ag_id integer NOT NULL DEFAULT 0, + CONSTRAINT action_detail_pkey PRIMARY KEY (ad_id), + CONSTRAINT action_detail_ag_id_fkey FOREIGN KEY (ag_id) + REFERENCES action_gestion (ag_id) MATCH SIMPLE + ON UPDATE CASCADE ON DELETE CASCADE +); + +COMMENT ON TABLE action_detail IS 'Detail of action_gestion, see class Action_Detail'; +-- trim the qcode +CREATE OR REPLACE FUNCTION insert_quant_purchase(p_internal text, p_j_id numeric, p_fiche character varying, p_quant numeric, p_price numeric, p_vat numeric, p_vat_code integer, p_nd_amount numeric, p_nd_tva numeric, p_nd_tva_recup numeric, p_dep_priv numeric, p_client character varying) + RETURNS void AS +$BODY$ +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=upper(trim(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=upper(trim(p_fiche)); + insert into quant_purchase + (qp_internal, + j_id, + qp_fiche, + qp_quantite, + qp_price, + qp_vat, + qp_vat_code, + qp_nd_amount, + qp_nd_tva, + qp_nd_tva_recup, + qp_supplier, + qp_dep_priv) + values + (p_internal, + p_j_id, + fid_good, + p_quant, + p_price, + p_vat, + p_vat_code, + p_nd_amount, + p_nd_tva, + p_nd_tva_recup, + fid_client, + p_dep_priv); + return; +end; + $BODY$ +LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION insert_quant_sold(p_internal text, p_jid numeric, p_fiche character varying, p_quant numeric, p_price numeric, p_vat numeric, p_vat_code integer, p_client character varying) + RETURNS void AS +$BODY$ +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=upper(trim(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=upper(trim(p_fiche)); + insert into quant_sold + (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client,qs_valid) + values + (p_internal,p_jid,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client,'Y'); + return; +end; + $BODY$ +LANGUAGE 'plpgsql'; +drop view vw_fiche_attr; + +create view vw_fiche_attr +as 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, h.av_text as vw_description,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 ( 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 = 9) h ON a.f_id = h.f_id + LEFT JOIN tva_rate ON d.av_text = tva_rate.tva_id::text + JOIN fiche_def USING (fd_id); + +-- ajout n client dans attr_min +insert into attr_min values (2,30); +update attr_def set ad_text='Dpense charge du grant (partie prive)' where ad_id=31; + +CREATE OR REPLACE FUNCTION update_account_item_card() + RETURNS void AS +$BODY$ +declare +cCard cursor for select jft_id,fd_class_base from fiche join fiche_def using (fd_id) +join jnt_fic_att_value using (f_id) +join attr_value using (jft_id) +where +ad_id=5 and +fd_create_account=false +and av_text = ''; +njft_id integer; +sClass_base text; +begin +open cCard; +loop + fetch cCard into njft_id,sClass_base; + if NOT FOUND then + exit; + end if; + update attr_value set av_text=sClass_base where jft_id=njft_id; +end loop; + +end; +$BODY$ +LANGUAGE 'plpgsql'; + +select update_account_item_card(); + +drop function update_account_item_card(); + +delete from action where ac_module='budget'; + +drop table bud_hypothese cascade; +drop table bud_detail_periode cascade; +drop table bud_detail cascade; +drop table bud_card cascade; +-- drop sequence bud_card_bc_id_seq; +-- drop sequence bud_detail_bd_id_seq +-- drop sequence bud_detail_bdp_id_seq; +-- drop sequence bud_detail_periode_bdp_id_seq; +comment on column action.ac_code is 'this code will be used in the code with the function User::check_action '; +comment on column action_detail.f_id is 'the concerned card'; +comment on column action_detail.ad_text is ' Description '; +comment on column action_detail.ad_pu is ' price per unit '; +comment on column action_detail.ad_quant is 'quantity '; +comment on column action_detail.ad_tva_id is ' tva_id '; +comment on column action_detail.ad_tva_amount is ' tva_amount '; +comment on column action_detail.ad_total_amount is ' total amount'; +comment on column action_gestion.ag_type is ' type of action: see document_type '; +comment on column action_gestion.f_id_dest is ' third party '; +comment on column action_gestion.ag_title is ' title '; +comment on column action_gestion.ag_timestamp is ' '; +comment on column action_gestion.ag_cal is ' visible in the calendar if = C'; +comment on column action_gestion.ag_ref_ag_id is ' concerning the action '; +comment on column action_gestion.ag_comment is ' comment of the action'; +comment on column action_gestion.ag_ref is 'its reference '; +comment on column action_gestion.ag_priority is 'Low, medium, important '; +comment on column action_gestion.ag_dest is ' is the person who has to take care of this action '; +comment on column action_gestion.ag_owner is ' is the owner of this action '; +comment on column action_gestion.ag_contact is ' contact of the third part '; +comment on column action_gestion.ag_state is 'state of the action same as document_state '; +comment on table action_gestion is 'Contains the details for the follow-up of customer, supplier, administration'; +-- clean the bud part +delete from document where ag_id=0; + +INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (313, 'Administration', 'gestion', 'GEADM'); +INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (1600, 'Gestion des extensions', 'extension', 'EXTENSION'); +INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (1701, 'Consultation', 'prvision', 'PREVCON'); +INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (1702, 'Modification et cration', 'prvision', 'PREVMOD'); +update action_gestion set ag_state=2,ag_priority=2,ag_owner='phpcompta'; +-- Function: extension_ins_upd() + +-- DROP FUNCTION extension_ins_upd(); + +CREATE OR REPLACE FUNCTION extension_ins_upd() + RETURNS trigger AS +$BODY$ +declare + sCode text; +begin +sCode:=trim(upper(NEW.ex_code)); +sCode:=replace(sCode,' ','_'); +sCode:=substr(sCode,1,15); +sCode=upper(sCode); +NEW.ex_code:=sCode; +return NEW; + +end; + +$BODY$ +LANGUAGE 'plpgsql'; +-- Table: extension + +-- DROP TABLE extension; + +CREATE TABLE extension +( + ex_id serial NOT NULL, + ex_name character varying(30) NOT NULL, + ex_code character varying(15) NOT NULL, + ex_desc character varying(250), + ex_file character varying NOT NULL, + ex_enable "char" NOT NULL DEFAULT 'Y'::"char", + CONSTRAINT pk_extension PRIMARY KEY (ex_id), + CONSTRAINT idx_ex_code UNIQUE (ex_code) +); +COMMENT ON TABLE extension IS 'Content the needed information for the extension'; +COMMENT ON COLUMN extension.ex_id IS 'Primary key'; +COMMENT ON COLUMN extension.ex_code IS 'code of the extension '; +COMMENT ON COLUMN extension.ex_name IS 'code of the extension '; +COMMENT ON COLUMN extension.ex_desc IS 'Description of the extension '; +COMMENT ON COLUMN extension.ex_file IS 'path to the extension to include'; +COMMENT ON COLUMN extension.ex_enable IS 'Y : enabled; N : disabled '; + +CREATE TRIGGER trg_extension_ins_upd + BEFORE INSERT OR UPDATE + ON extension + FOR EACH ROW + EXECUTE PROCEDURE extension_ins_upd(); + +CREATE TABLE user_sec_extension +( + use_id serial NOT NULL, + ex_id integer NOT NULL, + use_login text NOT NULL, + use_access character(1) NOT NULL DEFAULT 0, + CONSTRAINT user_sec_extension_pkey PRIMARY KEY (use_id), + CONSTRAINT user_sec_extension_ex_id_key UNIQUE (ex_id, use_login) +); +COMMENT ON TABLE user_sec_extension IS 'Security for extension'; + +CREATE TABLE forecast +( + f_id serial NOT NULL, + f_name text NOT NULL, + CONSTRAINT forecast_pk PRIMARY KEY (f_id) +); + +COMMENT ON TABLE forecast IS 'contains the name of the forecast'; + + +CREATE TABLE forecast_cat +( + fc_id serial NOT NULL, -- primary key + fc_desc text NOT NULL, -- text of the category + f_id bigint, -- Foreign key, it is the parent from the table forecast + fc_order integer NOT NULL DEFAULT 0, -- Order of the category, used when displaid + CONSTRAINT forecast_cat_pk PRIMARY KEY (fc_id), + CONSTRAINT forecast_child FOREIGN KEY (f_id) + REFERENCES forecast (f_id) MATCH SIMPLE + ON UPDATE CASCADE ON DELETE CASCADE +); +COMMENT ON COLUMN forecast_cat.fc_id IS 'primary key'; +COMMENT ON COLUMN forecast_cat.fc_desc IS 'text of the category'; +COMMENT ON COLUMN forecast_cat.f_id IS 'Foreign key, it is the parent from the table forecast'; +COMMENT ON COLUMN forecast_cat.fc_order IS 'Order of the category, used when displaid'; + +CREATE TABLE forecast_item +( + fi_id serial NOT NULL, + fi_text text, + fi_account text, + fi_card integer, + fi_order integer, + fc_id integer, + fi_amount numeric(20,4) DEFAULT 0, + fi_debit "char" NOT NULL DEFAULT 'd'::"char", + fi_pid integer, + CONSTRAINT forecast_item_pkey PRIMARY KEY (fi_id), + CONSTRAINT card FOREIGN KEY (fi_card) + REFERENCES fiche (f_id) MATCH SIMPLE + ON UPDATE CASCADE ON DELETE CASCADE, + CONSTRAINT fk_forecast FOREIGN KEY (fc_id) + REFERENCES forecast_cat (fc_id) MATCH SIMPLE + ON UPDATE CASCADE ON DELETE CASCADE +); +COMMENT ON COLUMN forecast_item.fi_id IS 'Primary key'; +COMMENT ON COLUMN forecast_item.fi_text IS 'Label of the i tem'; +COMMENT ON COLUMN forecast_item.fi_account IS 'Accountancy entry'; +COMMENT ON COLUMN forecast_item.fi_card IS 'Card (fiche.f_id)'; +COMMENT ON COLUMN forecast_item.fi_amount IS 'Amount'; +COMMENT ON COLUMN forecast_item.fi_debit IS 'possible values are D or C'; +COMMENT ON COLUMN forecast_item.fi_order IS 'Order of showing (not used)'; +COMMENT ON COLUMN forecast_item.fi_pid IS '0 for every month, or the value parm_periode.p_id '; + +update version set val=60; + +commit; diff --git a/html/admin/sql/patch/upgrade60.sql b/html/admin/sql/patch/upgrade60.sql new file mode 100644 index 000000000..503bab89f --- /dev/null +++ b/html/admin/sql/patch/upgrade60.sql @@ -0,0 +1,40 @@ +begin; +alter SEQUENCE document_type_dt_id_seq start 25; + +insert into document_type (dt_id,dt_value) values (20,'Réception commande Fournisseur'); +insert into document_type (dt_id,dt_value) values (21,'Réception commande Client'); +insert into document_type (dt_id,dt_value) values (22,'Réception magazine'); + +CREATE OR REPLACE FUNCTION extension_ins_upd() + RETURNS "trigger" AS +$BODY$ +declare + sCode text; + sFile text; +begin +sCode:=trim(upper(NEW.ex_code)); +sCode:=replace(sCode,' ','_'); +sCode:=substr(sCode,1,15); +sCode=upper(sCode); +NEW.ex_code:=sCode; +-- remove forbidden char +sFile:=NEW.ex_file; +sFile:=replace(sFile,';','_'); +sFile:=replace(sFile,'<','_'); +sFile:=replace(sFile,'>','_'); +sFile:=replace(sFile,'..',''); +sFile:=replace(sFile,'&',''); +sFile:=replace(sFile,'|',''); + + + +return NEW; + +end; + +$BODY$ +LANGUAGE 'plpgsql'; + +update version set val=61; + +commit; diff --git a/html/admin/sql/patch/upgrade61.BE.sql b/html/admin/sql/patch/upgrade61.BE.sql new file mode 100644 index 000000000..8339ae0d4 --- /dev/null +++ b/html/admin/sql/patch/upgrade61.BE.sql @@ -0,0 +1,13 @@ + +begin; +insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4515,'Tva Intracomm 0%',451,'PAS'); +insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4516,'Tva Export 0%',451,'PAS'); +insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4115,'Tva Intracomm 0%',411,'ACT'); +insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4116,'Tva Export 0%',411,'ACT'); +insert into tva_rate (tva_id,tva_label,tva_rate,tva_comment,tva_poste) values (5,'INTRA',0,'Tva pour les livraisons / acquisition intra communautaires','4115,4515'); +insert into tva_rate (tva_id,tva_label,tva_rate,tva_comment,tva_poste) values (6,'EXPORT',0,'Tva pour les exportations','4116,4516'); + +update version set val=62; +commit; + + diff --git a/html/admin/sql/patch/upgrade61.FR.sql b/html/admin/sql/patch/upgrade61.FR.sql new file mode 100644 index 000000000..a99bfc6cf --- /dev/null +++ b/html/admin/sql/patch/upgrade61.FR.sql @@ -0,0 +1,90 @@ +begin; +-- insert into parm_code(p_code,p_value,p_comment)values('SUPPLIER','400','Poste comptable par défaut pour les fournisseurs'); +-- update tva_rate set tva_poste = '445,445' where tva_poste is null or tva_poste='' or tva_poste like '%,0'; +update tva_rate set tva_label='FR_NOR' where tva_id= 101; +update tva_rate set tva_label='FR_RED' where tva_id= 102; +update tva_rate set tva_label='FR_SRED' where tva_id= 103; +update tva_rate set tva_label='FR_ANC' where tva_id= 105; +update tva_rate set tva_label='DOM' where tva_id= 201; +update tva_rate set tva_label='DOM_NPR' where tva_id= 202; +update tva_rate set tva_label='DOM_REDUIT' where tva_id= 203; +update tva_rate set tva_label='DOM_I' where tva_id= 204; +update tva_rate set tva_label='DOM_PRESSE' where tva_id= 205; +update tva_rate set tva_label='DOM_OCTROI' where tva_id= 206; +update tva_rate set tva_label='COR_I' where tva_id= 301; +update tva_rate set tva_label='COR_II' where tva_id= 302; +update tva_rate set tva_label='COR_III' where tva_id= 303; +update tva_rate set tva_label='COR_IV' where tva_id= 304; +update tva_rate set tva_label='INTRA' where tva_id= 401; +update tva_rate set tva_label='DOM_IMMO' where tva_id= 207; +update tva_rate set tva_label='COR_IMMO' where tva_id= 305; +update tva_rate set tva_label='INTRA_IMMMO' where tva_id= 402; +update tva_rate set tva_label='FRANCH' where tva_id= 501; +update tva_rate set tva_label='EXPORT' where tva_id= 502; +update tva_rate set tva_label='AUTRE' where tva_id= 503; +update tva_rate set tva_label='INTRA_LIV' where tva_id= 504; +update tva_rate set tva_label='FR_IMMO' where tva_id= 104; +update tmp_pcmn set pcm_type='ACT' where pcm_val in ('445661','445662','445663'); +update tva_rate set tva_poste='4456601,445701' where tva_id='104' and tva_poste='44562,0'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456601,'TVA 19,6% - France métropolitaine - Taux immobilisations Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445701,'TVA 19,6% - France métropolitaine - Taux immobilisations Collectée ','4457','PAS'); +update tva_rate set tva_poste='4456602,445702' where tva_id='105' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456602,'TVA x% - France métropolitaine - Taux anciens Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445702,'TVA x% - France métropolitaine - Taux anciens Collectée ','4457','PAS'); +update tva_rate set tva_poste='4456603,445703' where tva_id='201' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456603,'TVA 8,5% - DOM - Taux normal Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445703,'TVA 8,5% - DOM - Taux normal Collectée ','4457','PAS'); +update tva_rate set tva_poste='4456604,445704' where tva_id='202' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456604,'TVA 8,5% - DOM - Taux normal NPR Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445704,'TVA 8,5% - DOM - Taux normal NPR Collectée ','4457','PAS'); +update tva_rate set tva_poste='4456605,445705' where tva_id='203' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456605,'TVA 2,1% - DOM - Taux réduit Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445705,'TVA 2,1% - DOM - Taux réduit Collectée ','4457','PAS'); +update tva_rate set tva_poste='4456606,445706' where tva_id='204' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456606,'TVA 1,75% - DOM - Taux I Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445706,'TVA 1,75% - DOM - Taux I Collectée ','4457','PAS'); +update tva_rate set tva_poste='4456607,445707' where tva_id='205' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456607,'TVA 1,05% - DOM - Taux publications de presse Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445707,'TVA 1,05% - DOM - Taux publications de presse Collectée ','4457','PAS'); +update tva_rate set tva_poste='4456608,445708' where tva_id='206' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456608,'TVA x% - DOM - Taux octroi de mer Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445708,'TVA x% - DOM - Taux octroi de mer Collectée ','4457','PAS'); +update tva_rate set tva_poste='4456609,445709' where tva_id='207' and tva_poste='445,0'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456609,'TVA x% - DOM - Taux immobilisations Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445709,'TVA x% - DOM - Taux immobilisations Collectée ','4457','PAS'); +update tva_rate set tva_poste='44566010,4457010' where tva_id='301' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566010,'TVA 13% - Corse - Taux I Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457010,'TVA 13% - Corse - Taux I Collectée ','4457','PAS'); +update tva_rate set tva_poste='44566011,4457011' where tva_id='302' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566011,'TVA 8% - Corse - Taux II Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457011,'TVA 8% - Corse - Taux II Collectée ','4457','PAS'); +update tva_rate set tva_poste='44566012,4457012' where tva_id='303' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566012,'TVA 2,1% - Corse - Taux III Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457012,'TVA 2,1% - Corse - Taux III Collectée ','4457','PAS'); +update tva_rate set tva_poste='44566013,4457013' where tva_id='304' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566013,'TVA 0,9% - Corse - Taux IV Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457013,'TVA 0,9% - Corse - Taux IV Collectée ','4457','PAS'); +update tva_rate set tva_poste='44566014,4457014' where tva_id='305' and tva_poste='445,0'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566014,'TVA x% - Corse - Taux immobilisations Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457014,'TVA x% - Corse - Taux immobilisations Collectée ','4457','PAS'); +update tva_rate set tva_poste='44566015,4457015' where tva_id='401' and tva_poste='445,445'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566015,'TVA x% - Acquisitions intracommunautaires/Pays Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457015,'TVA x% - Acquisitions intracommunautaires/Pays Collectée ','4457','PAS'); +update tva_rate set tva_poste='44566016,4457016' where tva_id='402' and tva_poste='445,0'; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566016,'TVA x% - Acquisitions intracommunautaires immobilisations/Pays Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457016,'TVA x% - Acquisitions intracommunautaires immobilisations/Pays Collectée ','4457','PAS'); +update tva_rate set tva_poste='44566017,4457017' where tva_id='501' and tva_poste=''; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566017,'TVA x% - Non imposable : Achats en franchise Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457017,'TVA x% - Non imposable : Achats en franchise Collectée ','4457','PAS'); +update tva_rate set tva_poste='44566018,4457018' where tva_id='502' and tva_poste=''; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566018,'TVA x% - Non imposable : Exports hors CE/Pays Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457018,'TVA x% - Non imposable : Exports hors CE/Pays Collectée ','4457','PAS'); +update tva_rate set tva_poste='44566019,4457019' where tva_id='503' and tva_poste=''; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566019,'TVA x% - Non imposable : Autres opérations Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457019,'TVA x% - Non imposable : Autres opérations Collectée ','4457','PAS'); +update tva_rate set tva_poste='44566020,4457020' where tva_id='504' and tva_poste=''; +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566020,'TVA x% - Non imposable : Livraisons intracommunautaires/Pays Déductible','4456','ACT'); +insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457020,'TVA x% - Non imposable : Livraisons intracommunautaires/Pays Collectée ','4457','PAS'); + +update version set val=62; +commit; diff --git a/html/admin/sql/patch/upgrade61.sql b/html/admin/sql/patch/upgrade61.sql new file mode 100644 index 000000000..2ca731b9a --- /dev/null +++ b/html/admin/sql/patch/upgrade61.sql @@ -0,0 +1,15 @@ +begin; +-- View: vw_fiche_def + +DROP VIEW vw_fiche_def; + +CREATE VIEW vw_fiche_def AS + SELECT jnt_fic_attr.fd_id, jnt_fic_attr.ad_id, attr_def.ad_text,fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def.frd_id + from fiche_def + join jnt_fic_attr USING (fd_id) + JOIN attr_def ON attr_def.ad_id = jnt_fic_attr.ad_id +; +COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family'; + + +commit; diff --git a/html/admin/test.php b/html/admin/test.php deleted file mode 100644 index 1596a7d4d..000000000 --- a/html/admin/test.php +++ /dev/null @@ -1,73 +0,0 @@ - -<style type="text/css"> -<!-- -h2 { - color:green; - font-size:20px; -} -.error { - color:red; - font-size:20px; -} ---> -</style> -<?php -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision*/ -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - -include_once("ac_common.php"); -include_once("postgres.php"); -require_once ('class_dossier.php'); -if ( ! file_exists('authorized_debug') ) { -echo "Pour pouvoir utiliser ce fichier vous devez créer un fichier nomme authorized_debug -dans le repertoire html du server"; -exit(); - -} -// Test the connection -echo __FILE__.":".__LINE__; -if ( ! isset($_REQUEST['gDossier'])) { - echo "Vous avez oublie de specifier le gDossier ;)"; - exit(); - } - - -/* -require_once('class_plananalytic.php'); -PlanAnalytic::testme(); - - - -//-------------------------------------------------------------------------------- -require_once("class_poste_analytic.php"); -Poste_analytique::testme(); - - -require_once ('class_bud_card.php'); -Bud_Card::testme(); - - - -require_once('class_bud_hypo.php'); -Bud_Hypo::testme(); -*/ -require_once ('class_bud_data.php'); -Bud_Data::test_me(); - diff --git a/html/admin/test_me.php b/html/admin/test_me.php deleted file mode 100644 index 1301b464f..000000000 --- a/html/admin/test_me.php +++ /dev/null @@ -1,152 +0,0 @@ -<? -ini_set('include_path','.:../../include'); -require_once('ac_common.php'); -include_once('postgres.php'); -include_once('class_jrn.php'); -include_once('class_poste.php'); -include_once('class_balance.php'); -include_once('impress_inc.php'); -// $cn=DbConnect(13); -// $a=new jrn($cn,3); -// echo $a->GetRowSimple(1,100,'on'); -// exit(); - -echo "<h1>isNumber</h1>"; -echo "isNumber('40%')".isNumber('40%')."<br>"; -echo "isNumber('40')".isNumber('40')."<br>"; -echo "isNumber('A')".isNumber('A')."<br>"; -echo "isNumber('40.2')".isNumber('240000000099999999999')."<br>"; - $a_poste=array("pmc_val"=>"400"); -var_dump($a_poste); -exit(); -// date -$nb_day=array(31,$fev,31,30,31,30,31,31,30,31,30,31); -$m=1; -$year=2007; -foreach ($nb_day as $day) -{ - $p_start=sprintf("01-%d-%s",$m,$year); - $p_end=sprintf("%d-%d-%s",$day,$m,$year); - $m++; - echo $p_start." - ".$p_end.'<br>'; -} - - -$cn=DbConnect(1); -echo '<h1> Test GetRappelSimple </h1>'; -$a_Tva=GetArray($cn,"select tva_id,tva_label,tva_poste from tva_rate where tva_rate != 0.0000 order by tva_id"); -$per_from=68;$jrn=3;$type='ACH'; -$space=0; -foreach($a_Tva as $line_tva) -{ - //initialize Amount TVA - $tmp1=$line_tva['tva_label']; - $rap_tva[$tmp1]=0.0; - if ( $space == 0 ) - $col_tva=str_repeat(" ",6).$line_tva['tva_label']; - else - $col_tva.=str_repeat(" ",$space-strlen($line_tva['tva_label'])).$line_tva['tva_label']; - $space=9; -} - -$htva=GetRappelSimple($cn,$jrn,$type,$per_from,$rap_tva); - -echo "HTVA = $htva <br>"; -var_dump($rap_tva); - - - - - - - -echo "<h1>check sql_filter_per</h1>"; -$a=sql_filter_per($cn,'01.01.1999','01.01.1999','date','jr_tech_per'); -echo $a."<br>"; -$b= sql_filter_per($cn,'01.01.2000','01.11.2006','date','j_tech_per'); - -echo "Received $b <br> "; - -echo '<h1>check getRow function</h1>'; -echo 'Check Jrn<br>'; -$a=new jrn($cn,0); // grand livre -$b=$a->GetRow('1','9999','off'); - - - -echo 'class_jrn il y a '.count($b[0]).' données trouvée<br>'; - -$b=$a->GetRow('1','9999','on'); -echo 'Class_jrn il y a '.sizeof($b[0]).' données Centralisees trouvée<br>'; -echo '<h1> $a->GetRowSimple</H1>'; -$per_from=67;$per_to=70;$jrn=3; -$c=0; -$ven=new jrn($cn,$jrn); -$b=$ven->GetRowSimple ( $per_from,$per_to,'off',-1,-1); -foreach ($b as $line) { - $c++; - print_r ($line);echo '<hr>';} - -foreach ($b as $line) { - echo $line['client']." htva : ".$line['HTVA']." tva ".$line['AMOUNT_TVA']." TVAC ".$line['TVAC']." inline ".$line['TVA_INLINE']; - $tot=(float) $line['HTVA']+(float)$line['AMOUNT_TVA']-$line['TVAC']; - if ( round($tot,8) == 0.0 ) - print ' ok'; - else { - print ' FAILED '; - echo "Diff = ".$tot." TVAC ".$line['TVAC']; } - -echo '<hr>'; -} - -echo "Il y a $c données trouvées par GetRowSimple "; -$s=sql_filter_per($cn,$per_from,$per_to,'p_id','jr_tech_per'); -$count_rowS=GetArray($cn,"select count(*) as mcount from jrn where $s and jr_def_id=$jrn"); -if ( $c != $count_rowS[0]['mcount'] ) { - echo "<b>ERREUR : GetRowSimple ne renvoie pas le bon nombre de lignes GetRowSimple = $c Jrn = ".$count_rowS[0]['mcount']."</b><hr>"; -} else -echo "ok"; -echo "<h1>Computing TVA</h1>"; -$a_Tva=GetArray($cn,"select tva_id,tva_label from tva_rate where tva_rate != 0.0000 order by tva_id"); -$space=4;$col_tva=""; -foreach($a_Tva as $line_tva) - { - //initialize Amount TVA - $tmp1=$line_tva['tva_id']; - $rap_tva[$tmp1]=0.0; - if ( $space == 0 ) - $col_tva=str_repeat(" ",6).$line_tva['tva_label']; - else - $col_tva.=str_repeat(" ",$space-strlen($line_tva['tva_label'])).$line_tva['tva_label']; - $space=9; - } - -foreach ($b as $row) -{ - echo "Line "; var_dump ($row);echo "<hr>"; - foreach ($row['TVA'] as $line) - { - var_dump($line);echo "<hr>"; - $tva_id=$line[1][0]; - $rap_tva[$tva_id]+=$line[1][2]; - } -} -var_dump($rap_tva); - - -echo '<h1>Poste->GetRow</h1>'; -$a=new poste($cn,4511); // grand livre -$b=$a->GetRow('1','9999'); - -echo 'class_poste il y a '.sizeof($b[0]).' données trouvée<br>'; - -$a=new Balance($cn,4519); // grand livre -$b=$a->GetRow('1','9999'); -echo 'class_balance il y a '.sizeof($b).' données trouvée<br>'; - -echo_debug('Testing echo_debug'); -echo_error('Testing echo_error'); - - - -?> diff --git a/html/admin_repo.php b/html/admin_repo.php index dcd5fd81a..901f06663 100644 --- a/html/admin_repo.php +++ b/html/admin_repo.php @@ -25,15 +25,14 @@ */ require_once("user_common.php"); include_once("ac_common.php"); -include_once("postgres.php"); +require_once('class_database.php'); include_once("debug.php"); include_once("user_menu.php"); -$rep=DbConnect(); +$rep=new Database(); include_once ("class_user.php"); $User=new User($rep); $User->Check(); - html_page_start($User->theme); echo_debug('admin_repo.php',__LINE__,"entering admin_repo"); diff --git a/html/ajax_card.php b/html/ajax_card.php new file mode 100644 index 000000000..0a4680365 --- /dev/null +++ b/html/ajax_card.php @@ -0,0 +1,326 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file respond to an ajax request and return an object with the ctl and the html string + * at minimum + \verbatim + {'ctl':'','html':''} +\endverbatim + * The parameters are + * - PHPSESSID + * - gDossier + * - op + - dc Detail of a card + parameter : $qcode + - bc Blank Card : display form for adding a card + parameter fd_id (fiche_def:fd_id) + - st Show Type : select type of card + parameter fil : possible values of fd_id if empty it means all the fiche cat. + - sc Save Card : insert a new card (call first bc) + specific parameter qcode + - fs Form to search card + parameter like + - inp : the input text field to update + - label : the element to put the name of the card + - price : the element to put the price of the card (if exists) + - tvaid : the element to put the tvaid of the card (if exists) + - jrn : the concerned ledger (or all) + - typecard : possible values are cred, deb, filter (list of fd_id) + - ac Add Category + - cat type of cat to add (FICHE_TYPE_CLIENT,...) + * - ctl (to return) + * - popup + * - ref if we want to refresh the window + *\see fiche fiche::Save constant.php + */ +require_once('class_database.php'); +require_once ('class_fiche.php'); +require_once('class_iradio.php'); +require_once('function_javascript.php'); +require_once('ac_common.php'); +require_once ('class_user.php'); + +$var=array('PHPSESSID','gDossier','op','ctl'); +$cont=0; +/* check if mandatory parameters are given */ +foreach ($var as $v) { + if ( ! isset ($_REQUEST [$v] ) ) { + echo "$v is not set "; + $cont=1; + } +} +if ( $cont != 0 ) exit(); +extract($_REQUEST ); +set_language(); + +$cn=new Database($gDossier); +$user=new User($cn); $user->check(true);$user->check_dossier($gDossier,true); +$html=var_export($_REQUEST,true); +switch($op) { + /* ------------------------------------------------------------ */ + /* Display card detail */ + /* ------------------------------------------------------------ */ + +case 'dc': + $f=new fiche($cn); + $f->get_by_qcode($qcode); + $html=$f->Display(true); + break; + /* ------------------------------------------------------------ */ + /* Blank card */ + /* ------------------------------------------------------------ */ +case 'bc': + if ( $user->check_action(FICADD)==1 ) { + $r=''; + $f=new Fiche($cn); + $popup=str_replace('_content','',$ctl); + $r.='<form id="save_card" method="POST" onsubmit="this.ipopup=\''.$popup.'\';save_card(this);return false;" >'; + $r.=dossier::hidden();$r.=HtmlInput::phpsessid(); + $r.=(isset($ref))?HtmlInput::hidden('ref',1):''; + $r.=HtmlInput::hidden('fd_id',$fd_id); + $r.=HtmlInput::hidden('ctl',$ctl); + $r.=$f->blank($fd_id); + $r.=HtmlInput::submit('sc','Sauve'); + $r.='</form>'; + $html=$r; + } else { + $html=alert(_('Action interdite'),true); + } + break; + /* ------------------------------------------------------------ */ + /* Show Type */ + /* Before inserting a new card, the type must be selected */ + /* ------------------------------------------------------------ */ +case 'st': + $sql="select fd_id,fd_label from fiche_def"; + if ( isset($cat)) { + $sql=$sql.sprintf(' where frd_id = '.FormatString ($cat)); + } + if ( !isset($cat) && isset($fil) && strlen(trim($fil)) > 0 ){ + $sql=$sql.sprintf(" where fd_id in (%s)", + FormatString($fil)); + } + $array=$cn->make_array($sql); + if ( empty($array)) { + $html=_("Aucune catégorie de fiche ne correspondant à". + " votre demande"); + $html.=$sql; + } else { + $r=''; + $isel=new ISelect('fd_id'); + $isel->value=$array; + $popup=str_replace('_content','',$ctl); + $r.='<form id="sel_type" method="GET" onsubmit="this.ipopup=\''.$popup.'\';dis_blank_card(this);return false;" >'; + $r.=dossier::hidden();$r.=HtmlInput::phpsessid(); + $r.=(isset($ref))?HtmlInput::hidden('ref',1):''; + $r.='<p>choisissez le type de fiche à ajouter</p>'; + $r.=$isel->input(); + $r.=HtmlInput::submit('st','choix'); + $r.='</form>'; + $html=$r; + } + break; + /*---------------------------------------------------------------------- + * SC save card + * save the new card (insert) + * + ----------------------------------------------------------------------*/ +case 'sc': + if ( $user->check_action(FICADD)==1 ) { + $f=new Fiche($cn); + $f->insert($fd_id,$_POST); + $html='<h2 class="info">Fiche sauvée</h2>'; + $html.=$f->Display(true); + $js=""; + if ( isset( $_POST['ref'])) $js=create_script(' window.location.reload()'); + $html.=$js; + } else { + $html=alert(_('Action interdite'),true); + } + break; + /*---------------------------------------------------------------------- + * Search a card + * + *----------------------------------------------------------------------*/ +case 'fs': + require_once('class_acc_ledger.php'); + $r=''; + $r.='<form method="GET" onsubmit="this.ctl=\'ipop_card\';search_get_card(this);return false;">'; + $q=new IText('query'); + $q->value=(isset($query))?$query:''; + $r.=_('Fiche contenant'); + $r.=$q->input(); + $r.=HtmlInput::submit('fs',_('Recherche')); + $r.=dossier::hidden().HtmlInput::phpsessid().HtmlInput::hidden('op','fs'); + $array=array(); + foreach (array('query','inp','jrn','label','typecard','price','tvaid') as $i) { + if (isset(${$i}) ){ + $r.=HtmlInput::hidden($i,${$i}); + $sql_array[$i]=${$i}; + } + } + /* what is the type of the ledger */ + $type="GL"; + if (isset($jrn) && $jrn > 1) { + $ledger=new Acc_Ledger($cn,$jrn); + $type=$ledger->get_type(); + } + $fiche=new fiche($cn); + /* Build the SQL and show result */ + $sql=$fiche->build_sql($sql_array); + + /* We limit the search to 20 records */ + $sql=$sql.' order by vw_name limit 20'; + $a=$cn->get_array($sql); + + for($i=0;$i<count($a);$i++) { + $array[$i]['quick_code']=$a[$i]['quick_code']; + $array[$i]['name']=$a[$i]['vw_name']; + $array[$i]['description']=FormatString($a[$i]['vw_description']); + $array[$i]['javascript']=sprintf("set_value('%s','%s');", + $inp,$array[$i]['quick_code']); + $array[$i]['javascript'].=sprintf("set_value('%s','%s');", + $label,FormatString($a[$i]['vw_name'])); + + /* if it is a ledger of sales we use vw_buy + if it is a ledger of purchase we use vw_sell*/ + if ( $type=="ACH" ) + $array[$i]['javascript'].=sprintf("set_value('%s','%s');", + $price,$a[$i]['vw_buy']); + if ( $type=="VEN" ) + $array[$i]['javascript'].=sprintf("set_value('%s','%s');", + $price,$a[$i]['vw_sell']); + $array[$i]['javascript'].=sprintf("set_value('%s','%s');", + $tvaid,$a[$i]['tva_id']); + $array[$i]['javascript'].=sprintf("hideIPopup('%s')", + $ctl); + + }//foreach + + ob_start(); + require_once('template/card_result.php'); + $r.=ob_get_contents(); + ob_clean(); + $ctl=$ctl.'_content'; + $html=$r; + break; +case 'ac': + if ( $user->check_action(FICCAT)==1 ) { + + /*---------------------------------------------------------------------- + * Add a category, display first the form + * + *----------------------------------------------------------------------*/ + $ipopup=str_replace('_content','',$ctl); + switch($cat) { + case FICHE_TYPE_CLIENT: + $msg=_(' de clients'); + $base=$cn->get_value("select p_value from parm_code where p_code='CUSTOMER'"); + break; + case FICHE_TYPE_FOURNISSEUR: + $msg=_(' de fournisseurs'); + $base=$cn->get_value("select p_value from parm_code where p_code='SUPPLIER'"); + break; + case FICHE_TYPE_ADM_TAX: + $msg=_(' d\'administration'); + $base=''; + break; + } + + $html=''; + $html.="<h2>"._("Ajout d'une catégorie")." ".$msg."</h2>"; + /* show the form */ + $html.= '<div class="u_content">'; + $html.=$ctl; + $html.= '<form id="newcat" name="newcat" method="post" onsubmit="this.ipopup=\''.$ipopup.'\';save_card_category(this);return false;">'; + $html.= dossier::hidden().HtmlInput::phpsessid(); + $html.=HtmlInput::hidden('cat',$cat); + $search=new IPoste("class_base"); + $search->size=40; + $search->value=$base; + $search->label=_("Recherche poste"); + $search->set_attribute('gDossier',dossier::id()); + $search->set_attribute('account',$search->name); + $search->set_attribute('ipopup','ipop_account'); + + $str_poste=$search->input(); + ob_start(); + require('template/category_of_card.php'); + $html.=ob_get_contents(); + ob_clean(); + $submit=HtmlInput::submit('save',_('Sauve')); + $html.= '<p>'; + $html.= $submit; + $html.= '</p>'; + $html.= '</form>'; + $html.= '</div>'; + } else { + $html=alert(_('Action interdite'),true); + } + break; +case 'scc': + /*---------------------------------------------------------------------- + * Save card Category into the database and return a ok message + * + *----------------------------------------------------------------------*/ + $html=''; + if ( $user->check_action(FICCAT) == 1 ) { + if ( strlen(trim($_POST['nom_mod'])) != 0 && + strlen(trim($_POST['class_base'])) != 0 ) { + $array=array("FICHE_REF"=>$cat, + "nom_mod"=>$_POST['nom_mod'], + "class_base"=>$_POST['class_base']); + if ( isset ($_POST['create'])) $array['create']=1; + $catcard=new Fiche_def($cn); + if ( $catcard->Add($array) == -1) + $html.="alert('"._('Catégorie existe déjà')."')"; + else + $html.="alert('"._('Catégorie sauvée')."')"; + $html.=create_script($html); + } else { + $html.="alert('"._("Le nom et la classe base ne peuvent être vide")."')"; + $html.=create_script($html); + + $invalid=1; + } + $ipop=str_replace('_content','',$ctl); + $html.=create_script('hideIPopup(\''.$ipop.'\');'); + } else { + $html=alert(_('Action interdite'),true); + } + break; +} // switch +$html=escape_xml($html); + +header('Content-type: text/xml; charset=UTF-8'); +echo <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<data> +<ctl>$ctl</ctl> +<code>$html</code> +</data> + + + + +EOF; diff --git a/html/ajax_extension.php b/html/ajax_extension.php new file mode 100644 index 000000000..4f8f4b699 --- /dev/null +++ b/html/ajax_extension.php @@ -0,0 +1,204 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file answer to ajax + * parameters : + * - action =de details extension + * parameters : dossier, phpsessid and ex_id + * + * + */ +require_once('class_dossier.php'); +require_once('constant.security.php'); +require_once('class_extension.php'); +require_once('function_javascript.php'); +require_once('ac_common.php'); +require_once('class_user.php'); +require_once('class_iselect.php'); +require_once ('class_user.php'); + +$cn=new Database(dossier::id()); +/* check user */ +$user=new User($cn); +set_language(); +$user->check(true);$user->check_dossier(dossier::id(),true); +if ($user->check_action(EXTENSION)==0 ) exit; +$var=array('PHPSESSID','gDossier','action'); +$cont=0; +/* check if mandatory parameters are given */ +foreach ($var as $v) { + if ( ! isset ($_REQUEST [$v] ) ) { + echo "$v is not set "; + $cont=1; + } +} +extract ($_REQUEST); +$r="";$extra="";$ctl=""; +switch($action) { + /*---------------------------------------------------------------------- + *detail of an extension + * + *----------------------------------------------------------------------*/ + case 'de': + $ext=new Extension($cn); + $ext->set_parameter("id",$ex_id); + $ext->load(); + $str_hidden=HtmlInput::hidden('ex_id',$ex_id); + $name=new IText('name',$ext->get_parameter("name")); + $str_name=$name->input(); + + $code=new IText('code',$ext->get_parameter("code")); + $str_code=$code->input(); + + $desc=new IText('desc',$ext->get_parameter("desc")); + $str_desc=$desc->input(); + + $file=new IText('file',$ext->get_parameter("filepath")); + $str_file=$file->input(); + + $enable=new ISelect('enable'); + $array=array( + array ('label'=>_('Oui'),'value'=>'Y'), + array('label'=>_('Non'),'value'=>'N') + ); + $enable->value=$array; + $enable->selected=$ext->get_parameter('enable'); + $str_enable=$enable->input(); + $r.='<div style="overflow:auto;">'; + $r.='<form id="extde" onsubmit="extension_save(this)">'; + $r.=dossier::hidden().HtmlInput::phpsessid(); + /* property of the extension */ + ob_start(); + require_once('template/extension-detail.php'); + $r.=ob_get_contents(); + ob_clean(); + /* security */ + $ans=array(array('value'=>'Y','label'=>_('Accès')), + array('value'=>'N','label'=>_('Interdit')) + ); + $array=User::get_list(dossier::id()); + for ($i=0;$i<sizeof($array);$i++){ + $i_select=new ISelect("is_".$array[$i]['use_login']); + $i_select->value=$ans; + $i_select->selected=($ext->can_request($array[$i]['use_login'])==1)?'Y':'N'; + $array[$i]['access']=$i_select->input(); + } + require_once('template/extension-sec.php'); + $r.=ob_get_contents(); + ob_clean(); + + /* submit */ + $r.=HtmlInput::submit('ex_save',_('Sauve')); + $r.='</form>'; + $r.='</div>'; + $ctl='dtext'; + break; + /* ---------------------------------------------------------------------- + * new extension + *----------------------------------------------------------------------*/ + case 'ne': + $ext=new Extension($cn); + $ext->set_parameter("id",0); + $str_hidden=HtmlInput::hidden('ex_id',0); + + $name=new IText('name',""); + $str_name=$name->input(); + + $code=new IText('code',""); + $str_code=$code->input(); + + $desc=new IText('desc',""); + $str_desc=$desc->input(); + + $file=new IText('file',""); + $str_file=$file->input(); + + $enable=new ISelect('enable'); + $array=array( + array ('label'=>_('Oui'),'value'=>'Y'), + array('label'=>_('Non'),'value'=>'N') + ); + $enable->value=$array; + $enable->selected='Y'; + $str_enable=$enable->input(); + $r.='<div style="overflow:auto">'; + $r.='<form id="extde" onsubmit="extension_save(this);">'; + $r.=dossier::hidden().HtmlInput::phpsessid(); + ob_start(); + require_once('template/extension-detail.php'); + $r.=ob_get_contents(); + ob_clean(); + + /* security */ + $ans=array(array('value'=>'Y','label'=>_('Accès')), + array('value'=>'N','label'=>_('Interdit')) + ); + $array=User::get_list(dossier::id()); + for ($i=0;$i<sizeof($array);$i++){ + $i_select=new ISelect("is_".$array[$i]['use_login']); + $i_select->value=$ans; + $i_select->selected=($ext->can_request($array[$i]['use_login'])==1)?'Y':'N'; + $array[$i]['access']=$i_select->input(); + } + require_once('template/extension-sec.php'); + $r.=ob_get_contents(); + ob_clean(); + + + $r.=HtmlInput::submit('ex_save',_('Sauve')); + $r.='</form>'; + $r.='</div>'; + $ctl='dtext'; + break; + /*---------------------------------------------------------------------- + * save the extension + * + *----------------------------------------------------------------------*/ +case 'se': + $ext=new Extension($cn); + $ext->fromArray($_POST); + try { + $ext->save(); + $ext->save_security($_POST); + }catch (Exception $e) { + $r=alert(j( $e->getMessage()),true); + } + break; +case 're': + $ext=new Extension($cn); + $ext->set_parameter('id',$ex_id); + $ext->delete(); + break; +} + +$html=escape_xml($r); + +header('Content-type: text/xml; charset=UTF-8'); +echo <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<data> +<ctl>$ctl</ctl> +<code>$html</code> +<extra>$extra</extra> +</data> +EOF; diff --git a/html/ajax_get.php b/html/ajax_get.php new file mode 100644 index 000000000..9e3f59715 --- /dev/null +++ b/html/ajax_get.php @@ -0,0 +1,149 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file respond to an ajax request and return an object with the ctl and the html string + * at minimum + \verbatim + {'ctl':'','html':''} +\endverbatim + * The parameters are + * - PHPSESSID + * - gDossier + * - action + - dc Detail of a card + specific parameter qcode + * - ctl (to return) + */ +require_once('class_database.php'); +require_once ('class_fiche.php'); +require_once('class_iradio.php'); +require_once('function_javascript.php'); + +/** + *\todo add the security to avoid that everyone can see or modify all card + */ +$var=array('PHPSESSID','gDossier','op','ctl'); +$cont=0; +/* check if mandatory parameters are given */ +foreach ($var as $v) { + if ( ! isset ($_REQUEST [$v] ) ) { + echo "$v is not set "; + $cont=1; + } +} +if ( $cont != 0 ) exit(); +extract($_REQUEST ); +$cn=new Database($gDossier); +switch($op) { + /* ------------------------------------------------------------ */ + /* Display card detail */ + /* ------------------------------------------------------------ */ + +case 'dc': + $f=new Fiche($cn); + $f->get_by_qcode($qcode); + $html=$f->Display(true); + break; + /* ------------------------------------------------------------ */ + /* Blank card */ + /* ------------------------------------------------------------ */ +case 'bc': + /** + *\todo check if the user can add a card + */ + $r=''; + $f=new Fiche($cn); + $popup=str_replace('_content','',$ctl); + $r.='<form id="save_card" method="POST" onsubmit="this.ipopup=\''.$popup.'\';save_card(this);return false;" >'; + $r.=dossier::hidden();$r.=HtmlInput::phpsessid(); + $r.=HtmlInput::hidden('fd_id',$fd_id); + $r.=HtmlInput::hidden('ctl',$ctl); + $r.=$f->blank($fd_id); + $r.=HtmlInput::submit('sc','Sauve'); + $r.='</form>'; + $html=$r; + + break; + /* ------------------------------------------------------------ */ + /* Show Type */ + /* Before inserting a new card, the type must be selected */ + /* ------------------------------------------------------------ */ +case 'st': + $sql="select fd_id,fd_label from fiche_def"; + if ( strlen(trim($fil)) > 0 ){ + $sql=$sql.sprintf(" where fd_id in (%s)", + FormatString($fil)); + } + $array=$cn->make_array($sql); + /** + *\todo if empty returns a error message : there is no type card to select + * + */ + if ( empty($array)) { + $html="Aucune catégorie de fiche ne correspondant a". + " votre demande"; + } else { + $r=''; + $isel=new ISelect('fd_id'); + $isel->value=$array; + $popup=str_replace('_content','',$ctl); + $r.='<form id="sel_type" method="GET" onsubmit="this.ipopup=\''.$popup.'\';dis_blank_card(this);return false;" >'; + $r.=dossier::hidden();$r.=HtmlInput::phpsessid(); + $r.='<p>choisissez le type de fiche à ajouter</p>'; + $r.=$isel->input(); + $r.=HtmlInput::submit('st','choix'); + $r.='</form>'; + $html=$r; + } + break; + /*---------------------------------------------------------------------- + * SC save card + * save the new card (insert) + * + ----------------------------------------------------------------------*/ +case 'sc': + $f=new Fiche($cn); + $f->insert($fd_id,$_POST); + $html='<h2 class="info">Fiche sauvée</h2>'; + $html.=$f->Display(true); + + break; +} +$html=str_replace('&','&',$html); +$html=str_replace('<','<',$html); +$html=str_replace('>','>',$html); +$html=str_replace("'",''',$html); +$html=str_replace('"','"',$html); + +header('Content-type: text/xml; charset=UTF-8'); +echo <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<data> +<ctl>$ctl</ctl> +<code>$html</code> +</data> + + + + +EOF; diff --git a/html/ajax_import.php b/html/ajax_import.php index 196708b60..ff08bac6c 100644 --- a/html/ajax_import.php +++ b/html/ajax_import.php @@ -28,13 +28,13 @@ * */ include_once ("constant.php"); -include_once ("postgres.php"); +require_once('class_database.php'); require_once ('class_user.php'); require_once ('class_dossier.php'); -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $User=new User($cn); $User->check_dossier(dossier::id()); @@ -52,7 +52,7 @@ if ( isset ($_GET['action']) && $sql = "update import_tmp set poste_comptable='$poste' ,status='w',". "jr_rapt='$concern' where code='$code'"; - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); exit(); } @@ -63,7 +63,7 @@ if ( isset ($_GET['action']) && { $code=FormatString($_GET['code']); $sql="update import_tmp set status='d' where code='".$code."'"; - ExecSql($cn,$sql); + $cn->exec_sql($sql); exit(); } if ( isset ($_GET['action']) && @@ -73,6 +73,6 @@ if ( isset ($_GET['action']) && { $code=FormatString($_GET['code']); $sql="update import_tmp set status='n' where code='".$code."'"; - ExecSql($cn,$sql); + $cn->exec_sql($sql); exit(); } diff --git a/html/ajax_misc.php b/html/ajax_misc.php new file mode 100644 index 000000000..b28b4df5a --- /dev/null +++ b/html/ajax_misc.php @@ -0,0 +1,75 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file respond to an ajax request + * The parameters are + * - PHPSESSID + * - gDossier + * - $op operation the file has to execute + * + */ +require_once('class_database.php'); +require_once ('class_fiche.php'); +require_once('class_iradio.php'); +require_once('function_javascript.php'); +require_once('ac_common.php'); +require_once ('class_user.php'); + +$var=array('PHPSESSID','gDossier'); +$cont=0; +/* check if mandatory parameters are given */ +foreach ($var as $v) { + if ( ! isset ($_REQUEST [$v] ) ) { + echo "$v is not set "; + $cont=1; + } +} +if ( $cont != 0 ) exit(); +extract($_GET ); +set_language(); + +$cn=new Database($gDossier); +$user=new User($cn); $user->check(true);$user->check_dossier($gDossier,true); +$html=var_export($_REQUEST,true); +switch($op) + { + case 'cal': + require_once('class_calendar.php'); + /* others report */ + $cal=new Calendar(); + $cal->set_periode($per); + + + $html=""; + $html=$cal->display(); + $html=escape_xml($html); + +header('Content-type: text/xml; charset=UTF-8'); +echo <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<data> +<code>$html</code> +</data> +EOF; + break; + } diff --git a/html/ajax_poste.php b/html/ajax_poste.php new file mode 100644 index 000000000..3fa91e30c --- /dev/null +++ b/html/ajax_poste.php @@ -0,0 +1,158 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file answer to the Ajax request from js/accounting_item.js + * - op + - sf show form of search + - param j : ledger -> php jrn + - param c : control for storing the pcm_val -> javascript account + - param l : control for storing the pcm_lib -> javascript label + - param ctl : the node to update (ipopup) + - param q : the query -> javascript query + * - ctl (to return) + * + * + */ +require_once ("ac_common.php"); +require_once('class_acc_ledger.php'); +require_once ('class_database.php'); +require_once('function_javascript.php'); +require_once('class_acc_account_ledger.php'); + +extract($_REQUEST); +$var=array('PHPSESSID','gDossier','op','ctl'); +$cont=0; +/* check if mandatory parameters are given */ +foreach ($var as $v) { + if ( ! isset ($_REQUEST [$v] ) ) { + echo "$v is not set "; + $cont=1; + } +} +set_language(); + +if ( $cont != 0 ) exit(); +$cn=new Database(dossier::id()); +include_once ("class_user.php"); +$User=new User($cn); +$User->Check(); +if ($User->get_ledger_access(dossier::id()) == 'X') exit(); +$xml=""; + +switch ($op) { + /*---------------------------------------------------------------------- + * Show the form and the result + * + ----------------------------------------------------------------------*/ +case "sf": + $ipopup=$ctl; + $attr=sprintf('this.ctl=\'%s\';',$ipopup); + $ctl.='_content'; + $it=new IText('query'); + $it->size=30; + $it->value=(isset($q))?$q:''; + $str_poste=$it->input(); + $str_submit=HtmlInput::submit('sf',_('Recherche')); + + $r='<form id="sp" method="get" onsubmit="'.$attr.'search_get_poste(this);return false;">'; + ob_start(); + require_once('template/account_search.php'); + $r.=ob_get_contents(); + ob_clean(); + $r.=dossier::hidden();$r.=HtmlInput::phpsessid(); + $r.=(isset ($c))?HtmlInput::hidden('account',$c):""; + $r.=(isset ($l))?HtmlInput::hidden('label',$l):""; + $r.=(isset ($j))?HtmlInput::hidden('jrn',$j):""; + $r.=(isset ($nover))?HtmlInput::hidden('nover','1'):""; + $r.=(isset ($nosearch))?HtmlInput::hidden('nosearch','1'):""; + $r.=(isset ($bracket))?HtmlInput::hidden('bracket','1'):""; + + + $r.='</form>'; + $sql="select pcm_val,pcm_lib,pcm_val_parent,pcm_type ". + " from tmp_pcmn "; + $sep=" where "; + /* build the sql stmt */ + if ( isset($j) && $j > 0 && isNumber($j)) { + /* create a filter on the ledger */ + $ledger=new Acc_Account_Ledger($cn,0); + $fd_id=$ledger->build_sql_account($j); + if ( $fd_id != '' ){ + $sql.=" $sep (".$fd_id.')'; + $sep=" and "; + } + } + /* show result */ + if ( isset($q) && strlen(trim($q)) > 0) { + $sql.=sprintf(" $sep ( pcm_val::text like '%s%%' or pcm_lib::text ilike '%%%s%%') ", + $q,$q); + } + $sql.=' order by pcm_val::text limit 50'; + if ( isset($q) && strlen(trim($q))> 0 ) { + $array=$cn->get_array($sql); + } + if ( ! isset($q) ) $array=array(); + if ( isset($q) && strlen(trim($q))==0) $array=array(); + + /* set the javascript */ + for ($i=0;$i<count($array);$i++) { + $pcm_val=$array[$i]['pcm_val']; + if ( isset($bracket)) {$pcm_val='['.$pcm_val.']'; } + if (isset($nover)) { + /* no overwrite */ + $str=sprintf("$('%s').value=$('%s').value+' '+'%s';", + $c,$c,$pcm_val); + + } else { + $str=sprintf("$('%s').value='%s';", + $c,$pcm_val); + } + + if ( isset($l) ){ + $lib=str_replace("'","\'",$array[$i]['pcm_lib']); + $str.=sprintf("set_value('%s','%s');", + $l,$lib); + + } + $str.="hideIPopup('$ipopup');"; + $array[$i]['javascript']=$str; + } + ob_start(); + + require_once('template/account_result.php'); + $r.=ob_get_contents(); + ob_clean(); + + $html=$r; + break; +} +$html=escape_xml($html); +header('Content-type: text/xml; charset=UTF-8'); +echo <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<data> +<ctl>$ctl</ctl> +<code>$html</code> +</data> + +EOF; diff --git a/html/ajax_report.php b/html/ajax_report.php index c4f993fee..906fc11df 100644 --- a/html/ajax_report.php +++ b/html/ajax_report.php @@ -26,7 +26,7 @@ require_once ("constant.php"); -require_once ("postgres.php"); +require_once('class_database.php'); require_once ("user_common.php"); require_once ("debug.php"); require_once('class_dossier.php'); @@ -40,7 +40,7 @@ if ( ! isset($_GET['gDossier']) || print $a; exit(); } -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $User=new User($cn); $User->Check(); @@ -54,7 +54,7 @@ if ( ! is_dir('tmp') ) { mkdir ('tmp'); } -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); if ( isset($_SESSION['isValid']) && $_SESSION['isValid'] == 1) { $rap=new Acc_Report($cn,$_GET['f']); diff --git a/html/annulation.php b/html/annulation.php index 88e737710..ec35cdbdf 100644 --- a/html/annulation.php +++ b/html/annulation.php @@ -22,14 +22,12 @@ * \brief in a popup window manage the deletion of the operations */ include_once ("ac_common.php"); -include_once ("poste.php"); -include_once("preference.php"); include_once("central_inc.php"); include_once("user_common.php"); -include_once("check_priv.php"); -include_once ("postgres.php"); +require_once('class_database.php'); include_once("jrn.php"); -require_once("class_widget.php"); +require_once("class_itext.php"); +require_once("class_ibutton.php"); require_once("class_acc_ledger.php"); require_once("class_acc_operation.php"); require_once ('class_periode.php'); @@ -41,7 +39,7 @@ include_once ("class_user.php"); require_once('class_dossier.php'); $gDossier=dossier::id(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $User=new User($cn); $User->Check(); $User->check_dossier(dossier::id()); @@ -51,7 +49,7 @@ if ($User->check_action(GEOP,0) == 0 ) { } html_page_start($User->theme,"onLoad='window.focus();'"); -echo JS_VIEW_JRN_MODIFY; +echo JS_LEDGER; if ( isset( $_REQUEST['p_jrn'] )) { $p_jrn=$_GET['p_jrn']; } @@ -87,7 +85,7 @@ if ( isset ($_POST['annul']) ) { <p> <h2 class="info">Confirmation</h2> <br> - <p><span class="error">Attention: l'effacement d'une opération peut rompre la séquence de la numérotation des factures surtout celles générées automatiquement, soyez très prudent quand vous effacez. La pièce jointe sera elle aussi effacée. Si vous utilisez la comptabilité analytique les opérations liées seront effacées. + <p><span class="error">Attention: l'effacement d'une opération peut rompre la séquence de la numérotation des factures surtout celles générées automatiquement ainsi que celle des pièces justificatives, soyez très prudent quand vous effacez. La pièce jointe sera elle aussi effacée. Si vous utilisez la comptabilité analytique les opérations liées seront effacées. </span> </p> @@ -139,13 +137,13 @@ if ($p_id != -1 ) { // A if ( $p_id != -1 ) { //B // Test whether date of the operation is in a closed periode // get the period_id - $p=ExecSqlParam($cn,"select jr_tech_per from jrn where jr_grpt_id=$1",array($_REQUEST['jrn_op'])); - $period_id=pg_fetch_result($p,0,0); + $p=$cn->exec_sql("select jr_tech_per from jrn where jr_grpt_id=$1",array($_REQUEST['jrn_op'])); + $period_id=Database::fetch_result($p,0,0); // thanks jrn_op (jrn.jr_id) we find out the concerned ledger $sql="select jr_def_id from jrn where jr_grpt_id=".$_REQUEST['jrn_op']; - $r=ExecSql($cn,$sql); - $nJrn=pg_fetch_result($r,0,0); + $r=$cn->exec_sql($sql); + $nJrn=Database::fetch_result($r,0,0); $per=new Periode($cn); $per->set_jrn($nJrn); $per->set_periode($period_id); @@ -158,9 +156,9 @@ if ($p_id != -1 ) { // A // if the operation is in a closed or centralized period // the operation is voided thanks the opposite operation - StartSql($cn); - $grp_new=NextSequence($cn,'s_grpt'); - $seq=NextSequence($cn,"s_jrn"); + $cn->start(); + $grp_new=$cn->get_next_seq('s_grpt'); + $seq=$cn->get_next_seq("s_jrn"); $oJrn=new Acc_Ledger($cn,$l_array['jr_def_id']); $p_internal=$oJrn->compute_internal_code($seq); @@ -174,7 +172,7 @@ if ($p_id != -1 ) { // A from jrn where jr_grpt_id=$2"; - $Res=ExecSqlParam($cn,$sql,array($l_date_start,$_POST['p_id'])); + $Res=$cn->exec_sql($sql,array($l_date_start,$_POST['p_id'])); // Check return code if ( $Res == false) throw (new Exception(__FILE__.__LINE__."sql a echoue [ $sql ]")); @@ -190,7 +188,7 @@ if ($p_id != -1 ) { // A from jrnx where j_grpt=".$_POST['p_id']; - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); // Check return code if ( $Res == false) throw (new Exception(__FILE__.__LINE__."sql a echoue [ $sql ]")); @@ -199,7 +197,7 @@ if ($p_id != -1 ) { // A // Mark the operation invalid into the ledger // to avoid to nullify twice the same op. $sql="update jrn set jr_comment='Annule : '||jr_comment where jr_grpt_id=".$_POST['p_id']; - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); // Check return code if ( $Res == false) throw (new Exception(__FILE__.__LINE__."sql a echoue [ $sql ]")); @@ -208,7 +206,7 @@ if ($p_id != -1 ) { // A // Set the record to A (annulate) in quant_sold and quand_purchase - $Res=ExecSql($cn,"update quant_sold set ". + $Res=$cn->exec_sql("update quant_sold set ". " qs_valid='A' where qs_internal='".$l_array['jr_internal']."'" ); @@ -216,7 +214,7 @@ if ($p_id != -1 ) { // A throw (new Exception(__FILE__.__LINE__."sql a echoue [ $sql ]")); - $Res=ExecSql($cn,"update quant_purchase set ". + $Res=$cn->exec_sql("update quant_purchase set ". " qp_valid='A' where qp_internal='".$l_array['jr_internal']."'" ); if ( $Res == false) @@ -241,14 +239,14 @@ if ($p_id != -1 ) { // A // also in the stock table $sql="delete from stock_goods where sg_id = any ( select sg_id from stock_goods natural join jrnx where j_grpt=".$_POST['p_id'].")"; - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); // Check return code if ( $Res == false) throw (new Exception(__FILE__.__LINE__."sql a echoue [ $sql ]")); } catch (Exception $e) { - Rollback($cn); + $cn->rollback(); $msg="Désolé mais il n a pas été possible d'annuler ". "cette opération"; @@ -266,7 +264,7 @@ if ($p_id != -1 ) { // A $p_id=-1; exit(-1); } - Commit($cn); + $cn->commit(); // close the window echo '<h2 class="info"> Opération Annulée</h2>'; ?> @@ -283,21 +281,21 @@ self.opener.RefreshMe(); try { // Start Sql - StartSql($cn); + $cn->start(); $sql="insert into del_action(del_name,del_time) values ($1,now());"; - ExecSqlParam($cn,$sql,array($_SESSION['g_user'])); + $cn->exec_sql($sql,array($_SESSION['g_user'])); // Set the record to A (annulate) in quant_sold and quand_purchase // delete from the rapt table $sql="delete from jrn_rapt where jr_id = any (select jr_id from jrn ". " where jr_grpt_id = ".$_POST['p_id'].")"; - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); if ( $Res == false) throw (new Exception(__FILE__.__LINE__."sql a echoue [ $sql ]")); - $Res=ExecSql($cn,"delete from quant_sold ". + $Res=$cn->exec_sql("delete from quant_sold ". " where qs_internal='".$l_array['jr_internal']."'" ); @@ -305,7 +303,7 @@ self.opener.RefreshMe(); throw (new Exception(__FILE__.__LINE__."sql a echoue [ $sql ]")); - $Res=ExecSql($cn,"delete from quant_purchase ". + $Res=$cn->exec_sql("delete from quant_purchase ". " where qp_internal='".$l_array['jr_internal']."'" ); @@ -314,7 +312,7 @@ self.opener.RefreshMe(); if ( isset($l_array['jr_pj']) && $l_array['jr_pj'] != "") { - $Res=pg_lo_unlink($cn,$l_array['jr_pj']); + $Res=$cn->lo_unlink($l_array['jr_pj']); if ( $Res == false) throw (new Exception(__FILE__.__LINE__. "Echec Effacement lob [ $sql ]")); @@ -324,27 +322,27 @@ self.opener.RefreshMe(); // delete from the stock table $sql="delete from stock_goods where sg_id = any ( select sg_id from stock_goods natural join jrnx where j_grpt=".$_POST['p_id'].")"; - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); if ( $Res == false) throw (new Exception(__FILE__.__LINE__."sql a echoue [ $sql ]")); // delete from CA $sql="delete from operation_analytique where j_id in (select j_id from"; $sql.=" jrnx where j_grpt=".$_POST['p_id'].")"; - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); if ( $Res == false) throw (new Exception(__FILE__.__LINE__."sql a echoue [ $sql ]")); // delete from jrnx & jrn $sql="delete from jrnx where j_grpt=".$_POST['p_id']; - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); if ( $Res == false) throw (new Exception(__FILE__.__LINE__."sql a echoue [ $sql ]")); // build the sql stmt for jrn $sql= "delete from jrn where jr_grpt_id=".$_POST['p_id']; - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); if ( $Res == false) throw (new Exception(__FILE__.__LINE__." sql a echoue [ $sql ]")); @@ -352,7 +350,7 @@ self.opener.RefreshMe(); } catch (Exception $e) { - Rollback($cn); + $cn->rollback(); $msg="Desole mais il n a pas ete possible d'annuler ". "cette operation"; echo "<SCRIPT>alert('$msg');</SCRIPT>"; @@ -370,7 +368,7 @@ self.opener.RefreshMe(); exit(-1); } - Commit($cn); + $cn->commit(); echo '<h2 class="info"> Opération Annulée</h2>'; ?> <script> @@ -389,26 +387,29 @@ echo '<div align="center"> Opération '.$l_array['jr_internal'].'</div> <div> <form action="'.$_SERVER['REQUEST_URI'].'" method="post" >'; -$a=new widget("text"); -$a->SetReadOnly(false); +$a=new IText(); +$a->setReadOnly(false); echo '<div style="border-style:solid;border-width:1pt;">'; $a->size=80; -echo $a->IOValue("comment",$e_comment,"Description"); +echo $a->input("comment",$e_comment,"Description"); echo '</DIV>'; if ( isset ($e_ech) ) { echo "<DIV> Echeance $e_ech </DIV>"; } for ( $i = 0; $i < $max_deb;$i++) { - $lib=GetPosteLibelle($gDossier,${"e_class_deb$i"}); + $poste=new Acc_Account($gDossier,${"e_class_deb$i"}); + $lib=$poste->get_lib(); + echo '<div style="background-color:#BFC2D5;">'; echo ${"e_class_deb$i"}." $lib "."<B>".${"e_mont_deb$i"}."</B>"; echo "</div>"; } for ( $i = 0; $i < $max_cred;$i++) { - $lib=GetPosteLibelle($gDossier,${"e_class_cred$i"}); + $poste=new Acc_Account($gDossier,${"e_class_cred$i"}); + $lib=$poste->get_lib(); echo '<div style="background-color:#E8F4FF;">'; echo ${"e_class_cred$i"}." $lib "."<B>".${"e_mont_cred$i"}."</B>"; echo '</div>'; @@ -425,11 +426,11 @@ if ( $a != null ) { $operation=new Acc_Operation($cn); $operation->jr_id=$element; - $w=new widget("button"); + $w=new IButton(); $w->label=$operation->get_internal(); $w->javascript="modifyOperation('".$element."','".$_REQUEST['PHPSESSID']."',".dossier::id(). ','.$_REQUEST['p_jrn'].",'S')"; - echo $w->IOValue().'<br>'; + echo $w->input().'<br>'; }//for }// if ( $a != null ) { diff --git a/html/backup.php b/html/backup.php index 255075f72..806cfaf3f 100644 --- a/html/backup.php +++ b/html/backup.php @@ -20,13 +20,12 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr require_once("constant.php"); -require_once("postgres.php"); -require_once("class_widget.php"); +require_once('class_database.php'); require_once ("class_user.php"); require_once ("debug.php"); require_once ('ac_common.php'); -$rep=DbConnect(); +$rep=new Database(); $User=new User($rep); $User->Check(); @@ -61,7 +60,7 @@ if ( isset ($_REQUEST['sa']) ) { echo_debug ("commande backup ".$cmd); if ( $_REQUEST['t'] == 'd' ) { $database=domaine."dossier".$_REQUEST['d']; - $args= " -Fc -Z9 -p ".phpcompta_psql_port." ".$database; + $args= " -Fc -Z9 --no-owner -p ".phpcompta_psql_port." ".$database; header('Content-type: application/octet'); header('Content-Disposition:attachment;filename="'.$database.'.bin"',FALSE); @@ -71,7 +70,7 @@ if ( isset ($_REQUEST['sa']) ) { if ( $_REQUEST['t'] == 'm' ) { $database=domaine."mod".$_REQUEST['d']; - $args= " -Fc -Z9 -p ".phpcompta_psql_port." ".$database; + $args= " -Fc -Z9 --no-owner -p ".phpcompta_psql_port." ".$database; header('Content-type: bin/x-application'); header('Content-Disposition: attachment;filename="'.$database.'.bin"',FALSE); $a=passthru ($cmd.$args); diff --git a/html/bal_csv.php b/html/bal_csv.php index 20162306d..673b48ada 100644 --- a/html/bal_csv.php +++ b/html/bal_csv.php @@ -25,16 +25,16 @@ header('Content-type: application/csv'); header('Content-Disposition: attachment;filename="balance.csv"',FALSE); include_once ("ac_common.php"); include_once("class_acc_balance.php"); -include_once ("postgres.php"); +require_once('class_database.php'); require_once('class_dossier.php'); $gDossier=dossier::id(); require_once("class_acc_ledger.php"); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); require_once ('class_user.php'); -$User=new User(DbConnect()); +$User=new User(new Database()); $User->Check(); if ( $User->check_action(IMPBAL) == 0) { diff --git a/html/bilan.php b/html/bilan.php index 06cd1efe8..62bf824b3 100644 --- a/html/bilan.php +++ b/html/bilan.php @@ -23,7 +23,7 @@ */ include_once("ac_common.php"); include_once("impress_inc.php"); -include_once("postgres.php"); +require_once('class_database.php'); require_once ('header_print.php'); require_once ('class_acc_bilan.php'); @@ -33,7 +33,7 @@ $gDossier=dossier::id(); /* Admin. Dossier */ -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $User=new User($cn); $User->Check(); diff --git a/html/bud_ajax.php b/html/bud_ajax.php index 0de652ddf..1c7779d6f 100644 --- a/html/bud_ajax.php +++ b/html/bud_ajax.php @@ -22,7 +22,6 @@ /*!\file * \brief Ajax action for budget remove or save record - *\todo the security must be added here * */ extract ($_POST); @@ -32,7 +31,7 @@ require_once ('debug.php'); require_once('class_user.php'); echo_debug(__FILE__.':'.__LINE__,' $POST ',$_POST); -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $User=new User($cn); $User->Check(); $User->check_dossier(dossier::id()); diff --git a/html/bud_csv.php b/html/bud_csv.php index 81bffa897..535bf9d77 100644 --- a/html/bud_csv.php +++ b/html/bud_csv.php @@ -31,7 +31,7 @@ require_once ('class_dossier.php'); if (! isset($_GET['do'])) return ""; $do=$_GET['do']; -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); /* First synthese */ if ( $do == 'po') { require_once ('class_bud_synthese_anc.php'); diff --git a/html/bud_search_poste.php b/html/bud_search_poste.php index 8623b90f1..e9aaed494 100644 --- a/html/bud_search_poste.php +++ b/html/bud_search_poste.php @@ -24,11 +24,11 @@ */ include_once ("ac_common.php"); require_once('class_acc_ledger.php'); - -include_once ("postgres.php"); +require_once('class_html_input.php'); +require_once('class_database.php'); include_once("jrn.php"); /* Admin. Dossier */ -$rep=DbConnect(); +$rep=new Database(); html_page_start($_SESSION['g_theme'],'onLoad="window.focus();"'); @@ -48,7 +48,7 @@ $c_comment=""; $c_class=""; $condition=""; -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); extract ($_GET); if ( isset($_GET['search']) ) { @@ -84,14 +84,14 @@ echo '<TD> contient </TD>'; if ( ! isset ($p_comment) ) $p_comment=""; echo '<TD> <INPUT TYPE="text" name="p_comment" VALUE="'.$p_comment.'"></TD></TR>'; echo '</TABLE>'; -echo '<INPUT TYPE="submit" name="search" value="cherche">'; +echo HtmlInput::submit('search','Cherche'); echo '</FORM>'; // if request search if ( isset($_GET['search'])){ - $Res=ExecSql($cn,"select pcm_val,pcm_lib from tmp_pcmn $condition order by pcm_val::text"); + $Res=$cn->exec_sql("select pcm_val,pcm_lib from tmp_pcmn $condition order by pcm_val::text"); - $MaxLine=pg_NumRows($Res); + $MaxLine=Database::num_row($Res); if ( $MaxLine==0) { html_page_stop(); return; @@ -100,7 +100,7 @@ if ( isset($_GET['search'])){ $l_id=""; for ( $i=0; $i < $MaxLine; $i++) { - $l_line=pg_fetch_array($Res,$i); + $l_line=Database::fetch_array($Res,$i); echo "<TR>"; // if p_ctl is set we need to be able to return the value if (isset($p_ctl) && $p_ctl != 'not' ){ diff --git a/html/budget.php b/html/budget.php index 29a8eb3c8..4a0c2255f 100644 --- a/html/budget.php +++ b/html/budget.php @@ -29,7 +29,7 @@ */ require_once ('user_menu.php'); require_once("constant.php"); -include_once ("postgres.php"); +require_once('class_database.php'); require_once('class_dossier.php'); require_once ('class_bud_hypo.php'); html_page_start($_SESSION['g_theme']); @@ -40,9 +40,9 @@ $g_name=dossier::name(); $str_dossier=dossier::get(); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$rep=DbConnect($gDossier); +$rep=new Database($gDossier); require_once ("class_user.php"); $User=new User($rep); $User->Check(); @@ -88,7 +88,7 @@ echo '</div>'; echo '</div>'; $User->can_request(BUDLEC,1); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $obj=new Bud_Hypo($cn); //----------------------------------------------------- diff --git a/html/ca_bc_csv.php b/html/ca_bc_csv.php index b7b43e0b5..e813a355c 100644 --- a/html/ca_bc_csv.php +++ b/html/ca_bc_csv.php @@ -32,7 +32,7 @@ header('Content-Disposition: attachment;filename="ca_bal_croise.csv"',FALSE); require_once ('class_anc_balance_double.php'); -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $bal=new Anc_Balance_Double($cn); $bal->get_request(); diff --git a/html/ca_bc_pdf.php b/html/ca_bc_pdf.php index 9928c5e7d..5bd728a28 100644 --- a/html/ca_bc_pdf.php +++ b/html/ca_bc_pdf.php @@ -27,7 +27,7 @@ require_once ('class_anc_balance_double.php'); require_once ('header_print.php'); -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $balance=new Anc_Balance_Double($cn); diff --git a/html/ca_bs_csv.php b/html/ca_bs_csv.php index b0aced140..c61d70f70 100644 --- a/html/ca_bs_csv.php +++ b/html/ca_bs_csv.php @@ -29,7 +29,7 @@ header('Content-Disposition: attachment;filename="ca_bal_simple.csv"',FALSE); require_once ('class_anc_balance_simple.php'); -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $bal=new Anc_Balance_Simple($cn); $bal->get_request(); diff --git a/html/ca_bs_pdf.php b/html/ca_bs_pdf.php index 0358e87f0..d38cd69ee 100644 --- a/html/ca_bs_pdf.php +++ b/html/ca_bs_pdf.php @@ -20,15 +20,14 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * \brief export the operation in pdf * */ require_once ('class_anc_balance_simple.php'); require_once ('header_print.php'); -$cn=DbConnect(dossier::id()); - +$cn=new Database(dossier::id()); $balance=new Anc_Balance_Simple($cn); diff --git a/html/ca_list_csv.php b/html/ca_list_csv.php index f57ed1eaa..e002f8a73 100644 --- a/html/ca_list_csv.php +++ b/html/ca_list_csv.php @@ -29,7 +29,7 @@ header('Content-Disposition: attachment;filename="jrn.csv"',FALSE); require_once ('class_anc_listing.php'); -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $bal=new Anc_Listing($cn); $bal->get_request(); diff --git a/html/ca_list_pdf.php b/html/ca_list_pdf.php index 259d14ca0..ad1dae46c 100644 --- a/html/ca_list_pdf.php +++ b/html/ca_list_pdf.php @@ -25,10 +25,10 @@ * */ require_once('constant.php'); -require_once('postgres.php'); +require_once('class_database.php'); require_once('class_anc_operation.php'); -$cn=DbConnect(dossier::id); +$cn=new Database(dossier::id); $op=new Anc_Operation($cn); $op->pa_id=$_GET['pa_id']; $array=$op->get_list($_GET['from'],$_GET['to']); diff --git a/html/calculator.js b/html/calculator.js deleted file mode 100644 index 9cf8e3c52..000000000 --- a/html/calculator.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -<!-- ONE STEP TO INSTALL BASIC CALCULATOR: - - 1. Paste the coding into the BODY of your HTML document --> - -<!-- STEP ONE: Copy this code into the BODY of your HTML document --> - -<BODY> - -<CENTER> -<FORM NAME="Calc"> - -<!-- This script and many more are available free online at --> -<!-- The JavaScript Source!! http://javascript.internet.com --> - -<TABLE BORDER=4> -<TR> -<TD> -<INPUT TYPE="text" NAME="Input" Size="16"> -<br> -</TD> -</TR> -<TR> -<TD> -<INPUT TYPE="button" NAME="one" VALUE=" 1 " OnClick="Calc.Input.value += '1'"> -<INPUT TYPE="button" NAME="two" VALUE=" 2 " OnCLick="Calc.Input.value += '2'"> -<INPUT TYPE="button" NAME="three" VALUE=" 3 " OnClick="Calc.Input.value += '3'"> -<INPUT TYPE="button" NAME="plus" VALUE=" + " OnClick="Calc.Input.value += ' + '"> -<br> -<INPUT TYPE="button" NAME="four" VALUE=" 4 " OnClick="Calc.Input.value += '4'"> -<INPUT TYPE="button" NAME="five" VALUE=" 5 " OnCLick="Calc.Input.value += '5'"> -<INPUT TYPE="button" NAME="six" VALUE=" 6 " OnClick="Calc.Input.value += '6'"> -<INPUT TYPE="button" NAME="minus" VALUE=" - " OnClick="Calc.Input.value += ' - '"> -<br> -<INPUT TYPE="button" NAME="seven" VALUE=" 7 " OnClick="Calc.Input.value += '7'"> -<INPUT TYPE="button" NAME="eight" VALUE=" 8 " OnCLick="Calc.Input.value += '8'"> -<INPUT TYPE="button" NAME="nine" VALUE=" 9 " OnClick="Calc.Input.value += '9'"> -<INPUT TYPE="button" NAME="times" VALUE=" x " OnClick="Calc.Input.value += ' * '"> -<br> -<INPUT TYPE="button" NAME="clear" VALUE=" c " OnClick="Calc.Input.value = ''"> -<INPUT TYPE="button" NAME="zero" VALUE=" 0 " OnClick="Calc.Input.value += '0'"> -<INPUT TYPE="button" NAME="DoIt" VALUE=" = " OnClick="Calc.Input.value = eval(Calc.Input.value)"> -<INPUT TYPE="button" NAME="div" VALUE=" / " OnClick="Calc.Input.value += ' / '"> -<br> -</TD> -</TR> -</TABLE> -</FORM> -</CENTER> - -<p><center> -<font face="arial, helvetica" size="-2">Free JavaScripts provided<br> -by <a href="http://javascriptsource.com">The JavaScript Source</a></font> -</center><p> - -<!-- Script Size: 1.89 KB --> diff --git a/html/calendar.js b/html/calendar.js deleted file mode 100644 index 0aa66c77f..000000000 --- a/html/calendar.js +++ /dev/null @@ -1,629 +0,0 @@ -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -<!-- TWO STEPS TO INSTALL DATE PICKER: - - 1. Copy the coding into the HEAD of your HTML document - 2. Add the last code into the BODY of your HTML document --> - -<!-- STEP ONE: Paste this code into the HEAD of your HTML document --> - -<HEAD> - -<!-- This script and many more are available free online at --> -<!-- The JavaScript Source!! http://javascript.internet.com --> -<!-- Original: James O'Connor (joconnor@nordenterprises.com) --> -<!-- Web Site: http://nordenterprises.com --> -<script language="JavaScript"> -<!-- Original: Kedar R. Bhave (softricks@hotmail.com) --> -<!-- Web Site: http://www.softricks.com --> -<!-- This script and many more are available free online at --> -<!-- The JavaScript Source!! http://javascript.internet.com --> -<!-- --> -<!-- modifications and customizations to work with the "overLIB" library: --> -<!-- Author: James B. O'Connor (joconnor@nordenterprises.com) --> -<!-- Web Site: http://www.nordenterprises.com --> -<!-- developed for use with http://home-owners-assoc.com --> -<!-- Note: while overlib works fine with Netscape 4, this function does not work very well, since portions of the "over" div --> -<!-- end up under other fields on the form and cannot be seen. If you really want to use this with NS4, --> -<!-- you'll need to change the positioning in the overlib() call to make sure the "over" div gets positioned --> -<!-- away from all other form fields --> -<!-- you can get overLIB from: --> -//\ overLIB 3.50 -- This notice must remain untouched at all times. -//\ Copyright Erik Bosrup 1998-2001. All rights reserved. -//\ By Erik Bosrup (erik@bosrup.com). Last modified 2001-08-28. -//\ Portions by Dan Steinman (dansteinman.com). Additions by other people are -//\ listed on the overLIB homepage. -//\ Get the latest version at http://www.bosrup.com/web/overlib/ - -var weekend = [0,6]; -var weekendColor = "#e0e0e0"; -var fontface = "Verdana"; -var fontsize = 8; // in "pt" units; used with "font-size" style element - -var gNow = new Date(); -var ggWinContent; -var ggPosX = -1; -var ggPosY = -1; - -Calendar.Months = ["January", "February", "March", "April", "May", "June", -"July", "August", "September", "October", "November", "December"]; - -// Non-Leap year Month days.. -Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -// Leap year Month days.. -Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - -function Calendar(p_item, p_month, p_year, p_format) { - if ((p_month == null) && (p_year == null)) return; - - if (p_month == null) { - this.gMonthName = null; - this.gMonth = null; - this.gYearly = true; - } else { - this.gMonthName = Calendar.get_month(p_month); - this.gMonth = new Number(p_month); - this.gYearly = false; - } - - this.gYear = p_year; - this.gFormat = p_format; - this.gBGColor = "white"; - this.gFGColor = "black"; - this.gTextColor = "black"; - this.gHeaderColor = "black"; - this.gReturnItem = p_item; -} - -Calendar.get_month = Calendar_get_month; -Calendar.get_daysofmonth = Calendar_get_daysofmonth; -Calendar.calc_month_year = Calendar_calc_month_year; - -function Calendar_get_month(monthNo) { - return Calendar.Months[monthNo]; -} - -function Calendar_get_daysofmonth(monthNo, p_year) { - /* - Check for leap year .. - 1.Years evenly divisible by four are normally leap years, except for... - 2.Years also evenly divisible by 100 are not leap years, except for... - 3.Years also evenly divisible by 400 are leap years. - */ - if ((p_year % 4) == 0) { - if ((p_year % 100) == 0 && (p_year % 400) != 0) - return Calendar.DOMonth[monthNo]; - - return Calendar.lDOMonth[monthNo]; - } else - return Calendar.DOMonth[monthNo]; -} - -function Calendar_calc_month_year(p_Month, p_Year, incr) { - /* - Will return an 1-D array with 1st element being the calculated month - and second being the calculated year - after applying the month increment/decrement as specified by 'incr' parameter. - 'incr' will normally have 1/-1 to navigate thru the months. - */ - var ret_arr = new Array(); - - if (incr == -1) { - // B A C K W A R D - if (p_Month == 0) { - ret_arr[0] = 11; - ret_arr[1] = parseInt(p_Year) - 1; - } - else { - ret_arr[0] = parseInt(p_Month) - 1; - ret_arr[1] = parseInt(p_Year); - } - } else if (incr == 1) { - // F O R W A R D - if (p_Month == 11) { - ret_arr[0] = 0; - ret_arr[1] = parseInt(p_Year) + 1; - } - else { - ret_arr[0] = parseInt(p_Month) + 1; - ret_arr[1] = parseInt(p_Year); - } - } - - return ret_arr; -} - -function Calendar_calc_month_year(p_Month, p_Year, incr) { - /* - Will return an 1-D array with 1st element being the calculated month - and second being the calculated year - after applying the month increment/decrement as specified by 'incr' parameter. - 'incr' will normally have 1/-1 to navigate thru the months. - */ - var ret_arr = new Array(); - - if (incr == -1) { - // B A C K W A R D - if (p_Month == 0) { - ret_arr[0] = 11; - ret_arr[1] = parseInt(p_Year) - 1; - } - else { - ret_arr[0] = parseInt(p_Month) - 1; - ret_arr[1] = parseInt(p_Year); - } - } else if (incr == 1) { - // F O R W A R D - if (p_Month == 11) { - ret_arr[0] = 0; - ret_arr[1] = parseInt(p_Year) + 1; - } - else { - ret_arr[0] = parseInt(p_Month) + 1; - ret_arr[1] = parseInt(p_Year); - } - } - - return ret_arr; -} - -// This is for compatibility with Navigator 3, we have to create and discard one object before the prototype object exists. -new Calendar(); - -Calendar.prototype.getMonthlyCalendarCode = function() { - var vCode = ""; - var vHeader_Code = ""; - var vData_Code = ""; - - // Begin Table Drawing code here.. - vCode += ("<div align=center><TABLE BORDER=1 BGCOLOR=\"" + this.gBGColor + "\" style='font-size:" + fontsize + "pt;'>"); - - vHeader_Code = this.cal_header(); - vData_Code = this.cal_data(); - vCode += (vHeader_Code + vData_Code); - - vCode += "</TABLE></div>"; - - return vCode; -} - -Calendar.prototype.show = function() { - var vCode = ""; - - // build content into global var ggWinContent - ggWinContent += ("<FONT FACE='" + fontface + "' ><B>"); - ggWinContent += (this.gMonthName + " " + this.gYear); - ggWinContent += "</B><BR>"; - - // Show navigation buttons - var prevMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, -1); - var prevMM = prevMMYYYY[0]; - var prevYYYY = prevMMYYYY[1]; - - var nextMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, 1); - var nextMM = nextMMYYYY[0]; - var nextYYYY = nextMMYYYY[1]; - - ggWinContent += ("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0' style='font-size:" + fontsize + "pt;'><TR><TD ALIGN=center>"); - ggWinContent += ("[<A HREF=\"javascript:void(0);\" " + - "onMouseOver=\"window.status='Go back one year'; return true;\" " + - "onMouseOut=\"window.status=''; return true;\" " + - "onClick=\"Build(" + - "'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)-1) + "', '" + this.gFormat + "'" + - ");" + - "\"><<Year<\/A>]</TD><TD ALIGN=center>"); - ggWinContent += ("[<A HREF=\"javascript:void(0);\" " + - "onMouseOver=\"window.status='Go back one month'; return true;\" " + - "onMouseOut=\"window.status=''; return true;\" " + - "onClick=\"Build(" + - "'" + this.gReturnItem + "', '" + prevMM + "', '" + prevYYYY + "', '" + this.gFormat + "'" + - ");" + - "\"><Mon<\/A>]</TD><TD ALIGN=center>"); - ggWinContent += " </TD><TD ALIGN=center>"; - ggWinContent += ("[<A HREF=\"javascript:void(0);\" " + - "onMouseOver=\"window.status='Go forward one month'; return true;\" " + - "onMouseOut=\"window.status=''; return true;\" " + - "onClick=\"Build(" + - "'" + this.gReturnItem + "', '" + nextMM + "', '" + nextYYYY + "', '" + this.gFormat + "'" + - ");" + - "\">Mon><\/A>]</TD><TD ALIGN=center>"); - ggWinContent += ("[<A HREF=\"javascript:void(0);\" " + - "onMouseOver=\"window.status='Go forward one year'; return true;\" " + - "onMouseOut=\"window.status=''; return true;\" " + - "onClick=\"Build(" + - "'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)+1) + "', '" + this.gFormat + "'" + - ");" + - "\">Year>><\/A>]</TD></TR></TABLE><BR>"); - - // Get the complete calendar code for the month, and add it to the - // content var - vCode = this.getMonthlyCalendarCode(); - ggWinContent += vCode; -} - -Calendar.prototype.showY = function() { - var vCode = ""; - var i; - - ggWinContent += "<FONT FACE='" + fontface + "' ><B>" - ggWinContent += ("Year : " + this.gYear); - ggWinContent += "</B><BR>"; - - // Show navigation buttons - var prevYYYY = parseInt(this.gYear) - 1; - var nextYYYY = parseInt(this.gYear) + 1; - - ggWinContent += ("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0' style='font-size:" + fontsize + "pt;'><TR><TD ALIGN=center>"); - ggWinContent += ("[<A HREF=\"javascript:void(0);\" " + - "onMouseOver=\"window.status='Go back one year'; return true;\" " + - "onMouseOut=\"window.status=''; return true;\" " + - "onClick=\"Build(" + - "'" + this.gReturnItem + "', null, '" + prevYYYY + "', '" + this.gFormat + "'" + - ");" + - "\"><<Year<\/A>]</TD><TD ALIGN=center>"); - ggWinContent += " </TD><TD ALIGN=center>"; - ggWinContent += ("[<A HREF=\"javascript:void(0);\" " + - "onMouseOver=\"window.status='Go forward one year'; return true;\" " + - "onMouseOut=\"window.status=''; return true;\" " + - "onClick=\"Build(" + - "'" + this.gReturnItem + "', null, '" + nextYYYY + "', '" + this.gFormat + "'" + - ");" + - "\">Year>><\/A>]</TD></TR></TABLE><BR>"); - - // Get the complete calendar code for each month. - // start a table and first row in the table - ggWinContent += ("<TABLE WIDTH='100%' BORDER=0 CELLSPACING=0 CELLPADDING=5 style='font-size:" + fontsize + "pt;'><TR>"); - var j; - for (i=0; i<12; i++) { - // start the table cell - ggWinContent += "<TD ALIGN='center' VALIGN='top'>"; - this.gMonth = i; - this.gMonthName = Calendar.get_month(this.gMonth); - vCode = this.getMonthlyCalendarCode(); - ggWinContent += (this.gMonthName + "/" + this.gYear + "<BR>"); - ggWinContent += vCode; - ggWinContent += "</TD>"; - if (i == 3 || i == 7) { - ggWinContent += "</TR><TR>"; - } - - } - - ggWinContent += "</TR></TABLE></font><BR>"; -} - -Calendar.prototype.cal_header = function() { - var vCode = ""; - - vCode = vCode + "<TR>"; - vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sun</B></FONT></TD>"; - vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Mon</B></FONT></TD>"; - vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Tue</B></FONT></TD>"; - vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Wed</B></FONT></TD>"; - vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Thu</B></FONT></TD>"; - vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Fri</B></FONT></TD>"; - vCode = vCode + "<TD WIDTH='16%'><FONT FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sat</B></FONT></TD>"; - vCode = vCode + "</TR>"; - - return vCode; -} - -Calendar.prototype.cal_data = function() { - var vDate = new Date(); - vDate.setDate(1); - vDate.setMonth(this.gMonth); - vDate.setFullYear(this.gYear); - - var vFirstDay=vDate.getDay(); - var vDay=1; - var vLastDay=Calendar.get_daysofmonth(this.gMonth, this.gYear); - var vOnLastDay=0; - var vCode = ""; - - /* - Get day for the 1st of the requested month/year.. - Place as many blank cells before the 1st day of the month as necessary. - */ - vCode = vCode + "<TR>"; - for (i=0; i<vFirstDay; i++) { - vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(i) + "><FONT FACE='" + fontface + "'> </FONT></TD>"; - } - - // Write rest of the 1st week - for (j=vFirstDay; j<7; j++) { - vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT FACE='" + fontface + "'>" + - "<A HREF='javascript:void(0);' " + - "onMouseOver=\"window.status='set date to " + this.format_data(vDay) + "'; return true;\" " + - "onMouseOut=\"window.status=' '; return true;\" " + - "onClick=\"document." + this.gReturnItem + ".value='" + - this.format_data(vDay) + - "';ggPosX=-1;ggPosY=-1;nd();nd();\">" + - this.format_day(vDay) + - "</A>" + - "</FONT></TD>"; - vDay=vDay + 1; - } - vCode = vCode + "</TR>"; - - // Write the rest of the weeks - for (k=2; k<7; k++) { - vCode = vCode + "<TR>"; - - for (j=0; j<7; j++) { - vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT FACE='" + fontface + "'>" + - "<A HREF='javascript:void(0);' " + - "onMouseOver=\"window.status='set date to " + this.format_data(vDay) + "'; return true;\" " + - "onMouseOut=\"window.status=' '; return true;\" " + - "onClick=\"document." + this.gReturnItem + ".value='" + - this.format_data(vDay) + - "';window.scroll(0,ggPosY);ggPosX=-1;ggPosY=-1;nd();nd();\">" + - this.format_day(vDay) + - "</A>" + - "</FONT></TD>"; - vDay=vDay + 1; - - if (vDay > vLastDay) { - vOnLastDay = 1; - break; - } - } - - if (j == 6) - vCode = vCode + "</TR>"; - if (vOnLastDay == 1) - break; - } - - // Fill up the rest of last week with proper blanks, so that we get proper square blocks - for (m=1; m<(7-j); m++) { - if (this.gYearly) - vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) + - "><FONT FACE='" + fontface + "' COLOR='gray'> </FONT></TD>"; - else - vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) + - "><FONT FACE='" + fontface + "' COLOR='gray'>" + m + "</FONT></TD>"; - } - - return vCode; -} - -Calendar.prototype.format_day = function(vday) { - var vNowDay = gNow.getDate(); - var vNowMonth = gNow.getMonth(); - var vNowYear = gNow.getFullYear(); - - if (vday == vNowDay && this.gMonth == vNowMonth && this.gYear == vNowYear) - return ("<FONT COLOR=\"RED\"><B>" + vday + "</B></FONT>"); - else - return (vday); -} - -Calendar.prototype.write_weekend_string = function(vday) { - var i; - - // Return special formatting for the weekend day. - for (i=0; i<weekend.length; i++) { - if (vday == weekend[i]) - return (" BGCOLOR=\"" + weekendColor + "\""); - } - - return ""; -} - -Calendar.prototype.format_data = function(p_day) { - var vData; - var vMonth = 1 + this.gMonth; - vMonth = (vMonth.toString().length < 2) ? "0" + vMonth : vMonth; - var vMon = Calendar.get_month(this.gMonth).substr(0,3).toUpperCase(); - var vFMon = Calendar.get_month(this.gMonth).toUpperCase(); - var vY4 = new String(this.gYear); - var vY2 = new String(this.gYear.substr(2,2)); - var vDD = (p_day.toString().length < 2) ? "0" + p_day : p_day; - - switch (this.gFormat) { - case "MM\/DD\/YYYY" : - vData = vMonth + "\/" + vDD + "\/" + vY4; - break; - case "MM\/DD\/YY" : - vData = vMonth + "\/" + vDD + "\/" + vY2; - break; - case "MM-DD-YYYY" : - vData = vMonth + "-" + vDD + "-" + vY4; - break; - case "YYYY-MM-DD" : - vData = vY4 + "-" + vMonth + "-" + vDD; - break; - case "MM-DD-YY" : - vData = vMonth + "-" + vDD + "-" + vY2; - break; - case "DD\/MON\/YYYY" : - vData = vDD + "\/" + vMon + "\/" + vY4; - break; - case "DD\/MON\/YY" : - vData = vDD + "\/" + vMon + "\/" + vY2; - break; - case "DD-MON-YYYY" : - vData = vDD + "-" + vMon + "-" + vY4; - break; - case "DD-MON-YY" : - vData = vDD + "-" + vMon + "-" + vY2; - break; - case "DD\/MONTH\/YYYY" : - vData = vDD + "\/" + vFMon + "\/" + vY4; - break; - case "DD\/MONTH\/YY" : - vData = vDD + "\/" + vFMon + "\/" + vY2; - break; - case "DD-MONTH-YYYY" : - vData = vDD + "-" + vFMon + "-" + vY4; - break; - case "DD-MONTH-YY" : - vData = vDD + "-" + vFMon + "-" + vY2; - break; - case "DD\/MM\/YYYY" : - vData = vDD + "\/" + vMonth + "\/" + vY4; - break; - case "DD\/MM\/YY" : - vData = vDD + "\/" + vMonth + "\/" + vY2; - break; - case "DD-MM-YYYY" : - vData = vDD + "-" + vMonth + "-" + vY4; - break; - case "DD-MM-YY" : - vData = vDD + "-" + vMonth + "-" + vY2; - break; - default : - vData = vMonth + "\/" + vDD + "\/" + vY4; - } - - return vData; -} - -function Build(p_item, p_month, p_year, p_format) { - gCal = new Calendar(p_item, p_month, p_year, p_format); - - // Customize your Calendar here.. - gCal.gBGColor="white"; - gCal.gLinkColor="black"; - gCal.gTextColor="black"; - gCal.gHeaderColor="darkgreen"; - - // initialize the content string - ggWinContent = ""; - - // Choose appropriate show function - if (gCal.gYearly) { - // and, since the yearly calendar is so large, override the positioning and fontsize - // warning: in IE6, it appears that "select" fields on the form will still show - // through the "over" div; Note: you can set these variables as part of the onClick - // javascript code before you call the show_yearly_calendar function - if (ggPosX == -1) ggPosX = 10; - if (ggPosY == -1) ggPosY = 10; - if (fontsize == 8) fontsize = 6; - // generate the calendar - gCal.showY(); - } - else { - gCal.show(); - } - - // if this is the first calendar popup, use autopositioning with an offset - if (ggPosX == -1 && ggPosY == -1) { - overlib(ggWinContent, AUTOSTATUSCAP, STICKY, CLOSECLICK, CSSSTYLE, - TEXTSIZEUNIT, "pt", TEXTSIZE, 8, CAPTIONSIZEUNIT, "pt", CAPTIONSIZE, 8, CLOSESIZEUNIT, "pt", CLOSESIZE, 8, - CAPTION, "Select a date", OFFSETX, 20, OFFSETY, -20); - // save where the 'over' div ended up; we want to stay in the same place if the user - // clicks on one of the year or month navigation links - if ( (ns4) || (ie4) ) { - ggPosX = parseInt(over.left); - ggPosY = parseInt(over.top); - } else if (ns6) { - ggPosX = parseInt(over.style.left); - ggPosY = parseInt(over.style.top); - } - } - else { - // we have a saved X & Y position, so use those with the FIXX and FIXY options - overlib(ggWinContent, AUTOSTATUSCAP, STICKY, CLOSECLICK, CSSSTYLE, - TEXTSIZEUNIT, "pt", TEXTSIZE, 8, CAPTIONSIZEUNIT, "pt", CAPTIONSIZE, 8, CLOSESIZEUNIT, "pt", CLOSESIZE, 8, - CAPTION, "Select a date", FIXX, ggPosX, FIXY, ggPosY); - } - window.scroll(ggPosX, ggPosY); -} - -function show_calendar() { - /* - p_month : 0-11 for Jan-Dec; 12 for All Months. - p_year : 4-digit year - p_format: Date format (mm/dd/yyyy, dd/mm/yy, ...) - p_item : Return Item. - */ - - p_item = arguments[0]; - if (arguments[1] == null) - p_month = new String(gNow.getMonth()); - else - p_month = arguments[1]; - if (arguments[2] == "" || arguments[2] == null) - p_year = new String(gNow.getFullYear().toString()); - else - p_year = arguments[2]; - if (arguments[3] == null) - p_format = "YYYY-MM-DD"; - else - p_format = arguments[3]; - - Build(p_item, p_month, p_year, p_format); -} -/* -Yearly Calendar Code Starts here -*/ -function show_yearly_calendar() { - // Load the defaults.. - //if (p_year == null || p_year == "") - // p_year = new String(gNow.getFullYear().toString()); - //if (p_format == null || p_format == "") - // p_format = "YYYY-MM-DD"; - - p_item = arguments[0]; - if (arguments[1] == "" || arguments[1] == null) - p_year = new String(gNow.getFullYear().toString()); - else - p_year = arguments[1]; - if (arguments[2] == null) - p_format = "YYYY-MM-DD"; - else - p_format = arguments[2]; - - Build(p_item, null, p_year, p_format); -} -</script> -<script language="JavaScript" src="overlib_mini.js"></script> -</HEAD> - -<!-- STEP TWO: Copy this code into the BODY of your HTML document --> - -<BODY> - -<!-- This script and many more are available free online at --> -<!-- The JavaScript Source!! http://javascript.internet.com --> -<!-- Original: James O'Connor (joconnor@nordenterprises.com) --> -<!-- Web Site: http://nordenterprises.com --> -<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div> -<p>Pop-up calendar sample page:</p> -<form name="sample" method="post" action="popupcalsample.html"> - <p>Beginning date: <input type="text" name="T1" size="20"> - <!-- ggPosX and ggPosY not set, so popup will autolocate to the right of the graphic --> - <a href="javascript:show_calendar('sample.T1');" onMouseOver="window.status='Date Picker'; overlib('Click here to choose a date from a one month pop-up calendar.'); return true;" onMouseOut="window.status=''; nd(); return true;"><img src="http://nordenterprises.com/h-o-a-home/images/show-calendar.gif" width=24 height=22 border=0></a> - </p> - <p>Ending date: <input type="text" name="T2" size="20"> - <!-- ggPosX and ggPosY are set, so popup goes where you tell it --> - <a href="javascript:ggPosX=5;ggPosY=200;show_yearly_calendar('sample.T2');" onMouseOver="window.status='Date Picker'; overlib('Click here to choose a date from a full year pop-up calendar.'); return true;" onMouseOut="window.status=''; nd(); return true;"><img src="http://nordenterprises.com/h-o-a-home/images/show-calendar.gif" width=24 height=22 border=0></a> - </p> - <p><input type="submit" value="Submit" name="B1"><input type="reset" - value="Reset" name="B2"></p> -</form> - -<a href="http://nordenterprises.com/scripts/overlib_mini.js"> Download JS </a> - -<p><center> -<font face="arial, helvetica" size"-2">Free JavaScripts provided<br> -by <a href="http://javascriptsource.com">The JavaScript Source</a></font> -</center><p> - -<!-- Script Size: 22.17 KB --> \ No newline at end of file diff --git a/html/commercial.php b/html/commercial.php index 15182558f..88d76458f 100644 --- a/html/commercial.php +++ b/html/commercial.php @@ -25,11 +25,9 @@ * 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"); - +require_once('class_database.php'); echo JS_AJAX_FICHE; require_once('class_dossier.php'); $gDossier=dossier::id(); @@ -37,9 +35,9 @@ $gDossier=dossier::id(); $g_name=dossier::name(); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$rep=DbConnect($gDossier); +$rep=new Database($gDossier); require_once ("class_user.php"); $User=new User($rep); $User->Check(); @@ -61,50 +59,74 @@ if ( isset ( $_POST['p_size']) ) { } /// -html_page_start($_SESSION['g_theme'],"","richtext.js"); +html_page_start($_SESSION['g_theme'],"",""); if ( ! isset ( $gDossier ) ) { - echo "Vous devez choisir un dossier "; + echo _("Vous devez choisir un dossier "); exit -2; } -require_once('class_widget.php'); -include_once("preference.php"); include_once("user_menu.php"); $str_dossier=dossier::get(); $p_action=(isset ($_REQUEST['p_action']))?$_REQUEST['p_action']:""; -// TODO Menu with all the customer -//echo '<div class="u_tmenu">'; -///echo '<div style="float:left">'; echo '<div class="u_tmenu">'; echo menu_tool('commercial.php'); echo '<div style="float:left;background-color:#879ED4;width:100%;">'; +$def=0; +if ( isset($_REQUEST['p_action'])) { + switch($_REQUEST['p_action']) { + case'tdb': + $def=1; + break; + case'client': + $def=2; + break; + case'tdb': + $def=1; + break; + case'supplier': + $def=3; + break; + case'adm': + $def=4; + break; + case'stock': + $def=5; + break; + case'fiche': + $def=6; + break; + case'prev': + $def=7; + break; + case'suivi_courrier': + $def=8; + break; + case'impress': + $def=9; + break; + } +} echo ShowItem(array( - array('?p_action=client&'.$str_dossier,'Client'), - array('?p_action=ven&'.$str_dossier,'Vente/Facture'), - array('?p_action=fournisseur&'.$str_dossier,'Fournisseur'), - array('?p_action=ach&'.$str_dossier,'Achat/Dépense'), - array('?p_action=bank&'.$str_dossier,'Banque'), - array('?p_action=quick_writing&'.$str_dossier,'Ecriture directe'), - array('?p_action=impress&'.$str_dossier,'Impression'), - array('?p_action=stock&'.$str_dossier,'Stock'), - array('?p_action=fiche&'.$str_dossier,'Fiche'), - array('?p_action=periode&'.$str_dossier,'Ferm. Periode'), - array('?p_action=central&'.$str_dossier,'Centralisation'), - array('?p_action=defreport&'.$str_dossier,'Rapport'), - array('?p_action=contact&'.$str_dossier,'Contact'), - array('?p_action=suivi_courrier&'.$str_dossier,'Suivi Courrier'), + array('?p_action=client&'.$str_dossier,_('Client'),'',2), + array('?p_action=supplier&'.$str_dossier,_('Fournisseur'),'',3), + array('?p_action=adm&'.$str_dossier,_('Administration'),'',4), + array('?p_action=impress&'.$str_dossier,_('Impression'),'',9), + array('?p_action=stock&'.$str_dossier,_('Stock'),'',5), + array('?p_action=fiche&'.$str_dossier,_('Fiche'),'',6), + array('?p_action=prev&'.$str_dossier,_('Prevision'),'',7), + array('?p_action=suivi_courrier&my_action&'.$str_dossier,_('Suivi Courrier'),'',8), ), - 'H',"mtitle","mtitle","?p_action=$p_action&".$str_dossier,' width="100%"'); + 'H',"mtitle","mtitle",$def,' width="100%"'); echo '</div>'; echo '</div>'; -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); -echo JS_VIEW_JRN_MODIFY; +echo JS_LEDGER; echo JS_AJAX_FICHE; //----------------------------------------------------- @@ -114,7 +136,23 @@ if ( $p_action == "pref" ) { require_once("pref.inc.php"); } +//----------------------------------------------------- +// p_action == impression +//----------------------------------------------------- +if ( $p_action == "impress" ) +{ + require_once("impress.inc.php"); +} + +//----------------------------------------------------- +// p_action == adm +//----------------------------------------------------- +if ( $p_action == "adm" ) +{ + $User->can_request(GEADM,1); + require_once("adm.inc.php"); +} //----------------------------------------------------- // p_action == client //----------------------------------------------------- @@ -122,10 +160,11 @@ if ( $p_action == "client" ) { $User->can_request(GECUST,1); require_once("client.inc.php"); -}// $p_action == fournisseur +} +// $p_action == fournisseur //----------------------------------------------------- // Fournisseur -if ( $p_action == 'fournisseur') +if ( $p_action == 'supplier') { $User->can_request(GESUPPL,1); require_once("supplier.inc.php"); @@ -139,35 +178,11 @@ if ( $p_action == 'suivi_courrier') require_once("action.inc.php"); } //----------------------------------------------------- -// p_action == facture -//----------------------------------------------------- -if ( $p_action == "ven" ) -{ - require_once("compta_ven.inc.php"); -} -//----------------------------------------------------- // Contact -if ( $p_action == 'contact') +if ( $p_action == 'fiche') { - require_once("contact.inc.php"); + require_once("fiche.inc.php"); } -//----------------------------------------------------- -// Expense -if ( $p_action == 'ach') -{ - require_once("compta_ach.inc.php"); -} - -//----------------------------------------------------- -// Banque -if ( $p_action == 'bank') -{ - require_once("compta_fin.inc.php"); -} -if ( $p_action=='quick_writing') { - require_once ('quick_writing.inc.php'); - } - //----------------------------------------------------- // Impression if ( $p_action == 'impress') @@ -205,3 +220,11 @@ if ( $p_action == 'defreport') $User->can_request(PARPREDE,1); require_once("report.inc.php"); } +/*---------------------------------------------------------------------- + * Prevision + * + *----------------------------------------------------------------------*/ +if ( $p_action=='prev') { + $User->can_request(PREVCON,1); + require_once ('forecast.inc.php'); +} \ No newline at end of file diff --git a/html/compta.php b/html/compta.php index 6060fd762..d64eeec92 100644 --- a/html/compta.php +++ b/html/compta.php @@ -24,41 +24,31 @@ * \brief Main page for accountancy */ require_once('class_dossier.php'); +require_once('user_common.php'); + $gDossier=dossier::id(); include_once ("ac_common.php"); $action=(isset($_REQUEST['p_action']))?$_REQUEST['p_action']:''; $use_html=1; - -//---------------------------------------------------------------------- -/*!\todo find a way to improve performance : the calendar must not - * always be loaded and takes at least 50KB - */ -if ( $action == 'ven' && ! isset ($_REQUEST['sa']) ) - $use_html=1; - if ( ! isset ($_SESSION['g_theme'])) { - echo '<h2 class="error"> Vous êtes déconnecté</h2>'; + echo '<h2 class="error">'._(' Vous êtes déconnecté').'</h2>'; + redirect('index.php',1); exit(); } -if ( $action == 'ven' && isset ($_REQUEST['sa']) && in_array($_REQUEST['sa'],array('n','p') )) - $use_html=1; -if ( $use_html == 1) - html_page_start($_SESSION['g_theme']); -else - html_min_page_start($_SESSION['g_theme']); //---------------------------------------------------------------------- - -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); require_once ('class_user.php'); $User=new User($cn); $User->Check(); +$User->check_dossier($gDossier); + +html_page_start($_SESSION['g_theme']); -require_once ("check_priv.php"); include_once ("user_menu.php"); echo '<div class="u_tmenu">'; @@ -67,11 +57,8 @@ echo ShowMenuCompta("user_advanced.php?".dossier::get()); echo '</div>'; // Get action - - // call impress sub-menu if ( $action == 'impress' ) { - require_once('impress.inc.php'); } @@ -97,7 +84,7 @@ if ( $action == 'ach' || $action == 'fournisseur') { require_once ('compta_ach.inc.php'); } -if ( $action == 'bank') { +if ( $action == 'fin') { require_once ('compta_fin.inc.php'); } diff --git a/html/comptanalytic.php b/html/comptanalytic.php index 3c7c33871..70fe243f8 100644 --- a/html/comptanalytic.php +++ b/html/comptanalytic.php @@ -20,7 +20,7 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * \brief Main page for the analytic module */ @@ -28,12 +28,12 @@ * */ require_once("constant.php"); -require_once("postgres.php"); +require_once('class_database.php'); require_once("ac_common.php"); require_once('class_dossier.php'); $gDossier=dossier::id(); $str_dossier=dossier::get(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); require_once ("class_user.php"); require_once ('user_menu.php'); $User=new User($cn); @@ -42,7 +42,8 @@ $User->check_dossier($gDossier); html_page_start($_SESSION['g_theme']); - +echo js_include('prototype.js'); +echo js_include('anc_script.js'); //----------------------------------------------------------------- //Header echo '<div class="u_tmenu">'; @@ -107,7 +108,7 @@ if ( !isset($_REQUEST['p_action'])) //----------------------------------------------------- // p_action == pref //----------------------------------------------------- -if ( $_REQUEST['p_action'] == "pref" ) +if ( $_REQUEST['p_action'] == "pref" ) { require_once("pref.inc.php"); exit(); @@ -140,7 +141,7 @@ if ($_REQUEST['p_action'] == 'ca_groupe' ) if ($_REQUEST['p_action'] == 'ca_imp' ) { echo '<div class="content">'; - + require_once('anc_imp.inc.php'); echo '</div>'; diff --git a/html/compute.php b/html/compute.php index ec1c652b4..695d2290e 100644 --- a/html/compute.php +++ b/html/compute.php @@ -31,22 +31,24 @@ * - gDossier * - PHPSESSID * Must return at least tva, htva and tvac - * \todo must add the security */ require_once ('constant.php'); -require_once ('postgres.php'); +require_once ('class_database.php'); require_once ('debug.php'); require_once ('class_acc_compute.php'); require_once('class_dossier.php'); require_once ('class_acc_tva.php'); +require_once ('class_user.php'); // Check if the needed field does exist extract ($_GET); foreach (array('t','c','p','q','n','gDossier') as $a) { if ( ! isset (${$a}) ) { echo "error $a is not set "; exit();} } -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); +$User=new User($cn); +$User->Check(); // Retrieve the rate of vat, it $t == -1 it means no VAT if ( $t != -1 ){ diff --git a/html/extension.php b/html/extension.php new file mode 100644 index 000000000..bd1d933ba --- /dev/null +++ b/html/extension.php @@ -0,0 +1,89 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file includes the called plugin. It check first + * the security. Load several javascript files + */ +require_once('class_database.php'); +require_once('class_dossier.php'); +require_once("ac_common.php"); +require_once("constant.php"); +require_once('function_javascript.php'); +require_once('class_extension.php'); +require_once ('class_html_input.php'); +require_once('class_iselect.php'); +require_once ('constant.security.php'); +require_once ('class_user.php'); + +html_page_start($_SESSION['g_theme']); +$cn=new Database(dossier::id()); +$user=new User($cn); +$user->check(); +$user->check_dossier(dossier::id()); + + +/* javascript file */ +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo js_include('acc_ledger.js'); +echo js_include('accounting_item.js'); +echo js_include('card.js'); +echo js_include('compute.js'); +echo js_include('compute_direct.js'); +echo JS_INFOBULLE; + +/* show button to return to access */ +echo "<h2 class=\"info\">".dossier::name()."</h2>"; + +/* return button */ +$msg=_('Retour au tableau de bord'); +$hidden=dossier::hidden().HtmlInput::phpsessid(); +echo <<<EOF +<form method="get" action="access.php"> + $hidden + <input type="SUBMIT" value="$msg"> +</form> +EOF; + +/* show all the extension we can access */ +$a=new ISelect('code'); +$a->value=Extension::make_array($cn); + +/* no plugin available */ +if ( count($a->value) == 0 ) {alert(j(_("Aucune extension disponible")));exit;} + +/* only one plugin available then we don't propose a choice*/ +if ( count($a->value==1) ) { + $_REQUEST['code']=$a->value[0]['value']; +} else { + echo '<form method="get" action="extension.php">'; + echo $hidden; + echo _('Extension').$a->input().HtmlInput::submit('go',_("Choix de l'extension")); + echo '</form>'; + echo '<hr>'; +} + +require_once('ext_inc.php'); diff --git a/html/fiche_csv.php b/html/fiche_csv.php index a9a0f22de..fca0c7a69 100644 --- a/html/fiche_csv.php +++ b/html/fiche_csv.php @@ -26,13 +26,12 @@ header('Content-type: application/csv'); header('Content-Disposition: attachment;filename="fiche.csv"',FALSE); include_once ("ac_common.php"); include_once('class_fiche.php'); -include_once ("postgres.php"); -include_once("check_priv.php"); +require_once('class_database.php'); require_once('class_dossier.php'); $gDossier=dossier::id(); if ( isset ($_REQUEST['with_amount'])) include_once("class_acc_account_ledger.php"); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); require_once ('class_user.php'); $User=new User($cn); diff --git a/html/fiche_new.php b/html/fiche_new.php index 22b804a27..228e49718 100644 --- a/html/fiche_new.php +++ b/html/fiche_new.php @@ -18,10 +18,10 @@ */ // Auteur Dany De Bontridder ddebontridder@yahoo.fr include_once ("ac_common.php"); -include_once ("postgres.php"); -include_once ("check_priv.php"); +require_once('class_database.php'); require_once("class_fiche.php"); require_once("class_fiche_def.php"); +require_once('class_html_input.php'); /*! \file * \brief Create a new card in a popup window @@ -34,7 +34,7 @@ require_once("class_fiche_def.php"); /* $Revision$ */ /* Admin. Dossier */ $gDossier=dossier::id(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include_once ("class_user.php"); $User=new User($cn); @@ -51,7 +51,6 @@ if ( $User->check_action(FICADD)== 0) { return; } -include_once("fiche_inc.php"); foreach ($_GET as $key=>$element) { @@ -73,7 +72,7 @@ function new_fiche($p_cn,$p_type) { $r.= '<H2 class="info"> '.$fiche_def->label.'<br>Nouveau </H2>'; $r.= $fiche->blank($p_type); - $r.='<INPUT TYPE="SUBMIT" name="add_fiche" value="Mis à jour">'; + $r.=HtmlInput::submit('add_fiche','Mise à jour'); $r.='</FORM>'; return $r; @@ -100,17 +99,18 @@ if ( isset($_POST['add_fiche'])) { // if e_type contains a list of value if ( $e_type != 'cred' and $e_type != 'deb' && $e_type!='filter') { // $list['fiche']=$e_type; - $sql="select fd_id from fiche_def where frd_id in ($e_type)"; - $Res=ExecSql($cn,$sql); + $sql="select fd_id from fiche_def where fd_id in ($e_type)"; + + $Res=$cn->exec_sql($sql); // fetch it - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); if ( $Max==0) { echo_warning("No rows"); exit(); } - $n=pg_NumRows($Res); + $n=Database::num_row($Res); for ($i=0;$i <$n;$i++) { - $f=pg_fetch_array($Res,$i); + $f=Database::fetch_array($Res,$i); $e[$i]=$f['fd_id']; } $list['fiche']=join(',',$e); @@ -135,16 +135,16 @@ if ( isset($_POST['add_fiche'])) { - $Res=ExecSqlParam($cn,$sql,array($_GET['p_jrn'])); - + $Res=$cn->exec_sql($sql,array($_GET['p_jrn'])); + // fetch it - $Max=pg_NumRows($Res); + $Max=$cn->size(); if ( $Max==0) { echo_warning("No rows"); exit(); } // Normally Max must be == 1 - $list=pg_fetch_array($Res,0); + $list=$cn->fetch(0); if ( $list['fiche']=="") { echo_warning("Journal mal paramètré"); return; @@ -184,7 +184,7 @@ if ( sizeof($a)>1 and !isset ($_POST['cat'])) $element,$name); } - echo '<INPUT TYPE="SUBMIT" value="Choisir">'; + echo HtmlInput::submit("chx","Choisir"); echo "</FORM>"; } ?> diff --git a/html/fiche_new.php.deprecated b/html/fiche_new.php.deprecated new file mode 100644 index 000000000..27d7e89d5 --- /dev/null +++ b/html/fiche_new.php.deprecated @@ -0,0 +1,192 @@ +<?php +/* + * This file is part of PHPCOMPTA + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PHPCOMPTA; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +// Auteur Dany De Bontridder ddebontridder@yahoo.fr +include_once ("ac_common.php"); +require_once('class_database.php'); +require_once("class_fiche.php"); +require_once("class_fiche_def.php"); +require_once('class_html_input.php'); + +/*! \file + * \brief Create a new card in a popup window + * \note parameter (GET) e_type (deb, cred, filter) if filter is + * specified, you can give a p_jrn parameter, otherwise e_type + * contains a list of value + *\deprecated the way to add new card is to use Ipopup + *\see card.js ajax_get.php + * + */ + +/* $Revision$ */ +/* Admin. Dossier */ +$gDossier=dossier::id(); +$cn=new Database($gDossier); + +include_once ("class_user.php"); +$User=new User($cn); +$User->Check(); +$User->check_dossier($gDossier); +html_min_page_start($User->theme,"onLoad='window.focus();'"); +require_once('class_dossier.php'); + +// TODO add security here +// Get The priv on the selected folder +if ( $User->check_action(FICADD)== 0) { + /* Cannot Access */ + echo '<h2 class="error"> Vous ne pouvez pas ajouter de fiche</h2>'; + return; +} + + + +foreach ($_GET as $key=>$element) { + // The value are e_name e_type e_PHPSESSID + ${"e_$key"}=$element; + echo_debug('fiche_new.php',__LINE__,"e_$key =$element<br>"); + +} +echo JS_TVA; +function new_fiche($p_cn,$p_type) { + $fiche=new fiche($p_cn); + $r='<FORM action="fiche_new.php" method="post">'; + $r.=dossier::hidden(); + $r.='<INPUT TYPE="HIDDEN" name="fiche" value="'.$p_type.'">'; + $l_sessid=(isset ($_POST["PHPSESSID"]))?$_POST["PHPSESSID"]:$_GET["PHPSESSID"]; + + $fiche_def=new fiche_def($p_cn,$p_type); + $fiche_def->Get(); + + $r.= '<H2 class="info"> '.$fiche_def->label.'<br>Nouveau </H2>'; + $r.= $fiche->blank($p_type); + $r.=HtmlInput::submit('add_fiche','Mise à jour'); + + $r.='</FORM>'; + return $r; +} + +if ( isset($_POST['add_fiche'])) { + $fiche=new fiche($cn); + try { + $fiche->Save($_POST['fiche']); + } catch (Exception $e) { + alert ($e->getMessage()); + } + +?> +<SCRIPT> + + window.close(); +</SCRIPT> +<?php + return; +} +// Prob : ajout de fiche mais si plusieur cat possible ??? + // Get the field from database + // if e_type contains a list of value + if ( $e_type != 'cred' and $e_type != 'deb' && $e_type!='filter') { + // $list['fiche']=$e_type; + $sql="select fd_id from fiche_def where fd_id in ($e_type)"; + + $Res=$cn->exec_sql($sql); + // fetch it + $Max=Database::num_row($Res); + if ( $Max==0) { + echo_warning("No rows"); + exit(); + } + $n=Database::num_row($Res); + for ($i=0;$i <$n;$i++) { + $f=Database::fetch_array($Res,$i); + $e[$i]=$f['fd_id']; + } + $list['fiche']=join(',',$e); + } else { // We have to find it from the database + if ( $e_type == 'deb' ) { + $get='jrn_def_fiche_deb'; + $sql="select $get as fiche from jrn_def where jrn_def_id=$1"; + } + if ( $e_type == 'cred' ) { + $get='jrn_def_fiche_cred'; + $sql="select $get as fiche from jrn_def where jrn_def_id=$1"; + } + if ($e_type=='filter') { + + $get_cred='jrn_def_fiche_cred'; + + $get_deb='jrn_def_fiche_deb'; + + $sql="select $get_cred||','||$get_deb as fiche from jrn_def where jrn_def_id=$1"; + + } + + + + $Res=$cn->exec_sql($sql,array($_GET['p_jrn'])); + + // fetch it + $Max=$cn->size(); + if ( $Max==0) { + echo_warning("No rows"); + exit(); + } + // Normally Max must be == 1 + $list=$cn->fetch(0); + if ( $list['fiche']=="") { + echo_warning("Journal mal paramètré"); + return; + } + } + + +// Compter le nombre de cat. possible +$a=explode(",",$list['fiche']); + +// sinon si cat = 1 ou si var. cat vaut qq chose +// Montrer le contenu de fiche +if ( sizeof($a) == 1 ) { + if ( strlen(trim($a[0])) != 0) + // Display a blank card from the selected category + $f=new_fiche($cn,$a[0]); + echo $f; +} + +if ( isset($_POST['cat'])) { + $f=new_fiche($cn,$_POST['cat']); + echo $f; +} + +// si cat > 1 proposer choix cat +// recharger avec var. cat +if ( sizeof($a)>1 and !isset ($_POST['cat'])) + { + echo "Choix catégories fiche"; + echo '<FORM METHOD="POST" ACTION="'.$_SERVER['REQUEST_URI'].'">'; + echo dossier::hidden(); + foreach ($a as $element) { + $fiche_def=new fiche_def($cn,$element); + $fiche_def->Get(); + $name=$fiche_def->label; + printf('<INPUT TYPE="RADIO" NAME="cat" value="%s">%s<br>', + $element,$name); + + } + echo HtmlInput::submit("chx","Choisir"); + echo "</FORM>"; + } +?> diff --git a/html/fiche_search.php b/html/fiche_search.php index 4fb970e67..bec7c7e6f 100644 --- a/html/fiche_search.php +++ b/html/fiche_search.php @@ -23,41 +23,49 @@ * * This parameter given to this file via the javascript popup windows are * caller = searchcard - * - first when is the first call it doesn't lookup directly + * - first when is the first call it doesn't lookup directly * - search * - p_jrn the ledger id * - PHPSESSID * - type deb only the deb card from the ledger, cred means credit only, all the card, filter all the card of the ledger * - name of the control * - gDossier the dossier id - * -the caller (what jascript function triggers this window) - * caller = searchcardCtrl - * - first + * - the caller (what jascript function triggers this window) + * + * caller = searchcardCtrl + * - first * - searh * - p_jrn the ledger id * - PHPSESSID - * - type deb only the deb card from the ledger, cred means credit only, all the card, filter all the card of the ledger + * - type + * - deb only the deb card from the ledger, + * - cred means credit only, + * - all the card, + * - filter get int the setting of the ledger the FD_ID + * - List of value (fd_id) + * - start with the [sql] tag if we use a SQL where clause * - name of the control * - ctrl the second control to set up * - gDossier the dossier id * -the caller (what jascript function triggers this window) + * + *\note if the p_jrn is -1 then all the card are shown */ - +print_r( $_REQUEST); include_once ("ac_common.php"); -include_once ("poste.php"); -include_once ("postgres.php"); +require_once('class_database.php'); include_once("jrn.php"); +require_once("class_ibutton.php"); require_once('class_dossier.php'); include_once ("class_user.php"); -// include_once ("check_priv.php"); $gDossier=dossier::id(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $User=new User($cn); $User->Check(); $User->check_dossier($gDossier); -echo JS_SEARCH_CARD; +echo JS_LEDGER; echo JS_MINTOOLKIT; //determine focus: if ( isset ( $_GET['search']) ) @@ -72,19 +80,21 @@ if ( isset ( $_GET['search']) ) function get_list_fiche($p_cn,$get,$p_jrn) { - $sql="select $get as fiche from jrn_def where jrn_def_id=$p_jrn"; - $Res=ExecSql($p_cn,$sql); + + $sql="select $get as fiche from jrn_def where jrn_def_id=$1"; + $Res=$p_cn->exec_sql($sql,array($p_jrn)); // fetch it - $Max=pg_NumRows($Res); + $Max=$p_cn->size(); if ( $Max==0) { - echo_warning("No rows"); + echo_warning("Aucune fiche trouvée"); exit(); } // Normally Max must be == 1 - $list=pg_fetch_array($Res,0); + $list=$p_cn->fetch(0); if ( $list['fiche']=="") { echo_warning("Journal mal paramètré"); + echo_warning('Changez-en les réglages dans paramètre->journaux'); exit(); } $list_fiche=$list['fiche']; @@ -102,17 +112,21 @@ function setCtrl(name_ctl,value,name_ctl2,value_3) { } </script> <?php -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $r=""; // Propose to add a card if the ledger is not 0 (the great ledger) -if (!isset($_REQUEST['noadd']) && $User->check_action(FICADD)==1 && $_GET['p_jrn'] != 0 ) { +$add=1; +if ( isset($_REQUEST['add'])&& $_REQUEST['add']=='no' ) $add=0; + +if ($add==1 && $User->check_action(FICADD)==1 ) { if ( $User->check_action(FICADD)==1) { - $add_card=new widget('button'); - $add_card->javascript=sprintf("NewCard('%s','%s','%s')", + $add_card=new IButton(); + $add_card->javascript=sprintf("NewCard('%s','%s','%s',%s)", $_REQUEST['PHPSESSID'], $_GET['type'], - "fic_search"); + "fic_search", + $_REQUEST['p_jrn']); $add_card->label="Ajout d'une fiche"; } } @@ -121,15 +135,17 @@ foreach ($_GET as $key=>$element) { ${"e_$key"}=$element; } +extract($_GET,EXTR_PREFIX_ALL ,'e_'); + $e_fic_search=(isset ($_REQUEST['fic_search']))?$_REQUEST['fic_search']:""; $r.="<FORM METHOD=\"GET\" >"; $r.="Recherche : ".'<INPUT TYPE="TEXT" id="fic_search" NAME="fic_search" VALUE="'.$e_fic_search.'">'; -if ( isset($_REQUEST['noadd' ])) $r.=widget::hidden('noadd','noadd'); +if ( isset($_REQUEST['noadd' ])) $r.=HtmlInput::hidden('noadd','noadd'); $r.='<INPUT TYPE="submit" name="search" value="Go">'; if ( isset ($_REQUEST['p_jrn'])) - echo widget::hidden('p_jrn',$_REQUEST ['p_jrn']); -echo dossier::hidden(); + $r.= HtmlInput::hidden('p_jrn',$_REQUEST ['p_jrn']); +$r.= dossier::hidden(); $r.="<div>"; echo $r; $r=""; @@ -146,71 +162,73 @@ if ( ) { - // Get the field from database - if ( $e_type == 'deb' ) { - $get='jrn_def_fiche_deb'; - $list_fiche=get_list_fiche($cn,$get,$_GET['p_jrn']); - $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; - } - elseif ( $e_type == 'cred' ) { - $get='jrn_def_fiche_cred'; - $list_fiche=get_list_fiche($cn,$get,$_GET['p_jrn']); - $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; - } - /*!\brief if $e_type (from widget::extra) equal all, all the card are shown - * without restriction - */ - elseif ( $e_type == 'all' ) { - $sql="select * from vw_fiche_attr where true"; - } - elseif ($e_type=='filter') { + if ( $_GET['p_jrn'] == -1 ) + $e_type='all'; - $get='jrn_def_fiche_cred'; - $list_cred=get_list_fiche($cn,$get,$_GET['p_jrn']); - - - $get='jrn_def_fiche_deb'; - $list_deb=get_list_fiche($cn,$get,$_GET['p_jrn']); - $list_fiche=$list_cred.','.$list_deb; - - if ( $list_fiche == ',' ) - exit("Vous n'avez pas bien configure ce journal, vous devez aller dans Avance->Journal et indiquez les fiches utilisables"); - - $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; + // Get the field from database + if ( $e_type == 'deb' ) { + $get='jrn_def_fiche_deb'; + $list_fiche=get_list_fiche($cn,$get,$_GET['p_jrn']); + $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; + } + elseif ( $e_type == 'cred' ) { + $get='jrn_def_fiche_cred'; + $list_fiche=get_list_fiche($cn,$get,$_GET['p_jrn']); + $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; + } + /*!\brief if $e_type (from widget::extra) equal all, all the card are shown + * without restriction + */ + elseif ( $e_type == 'all' ) { + $sql="select * from vw_fiche_attr where true"; + } + elseif ($e_type=='filter') { + + $get='jrn_def_fiche_cred'; + $list_cred=get_list_fiche($cn,$get,$_GET['p_jrn']); + + + $get='jrn_def_fiche_deb'; + $list_deb=get_list_fiche($cn,$get,$_GET['p_jrn']); + $list_fiche=$list_cred.','.$list_deb; + + if ( $list_fiche == ',' ) + exit("Vous n'avez pas bien configure ce journal, vous devez aller dans Paramètre->Journal et indiquez les fiches utilisables"); + + $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; + + } elseif (strpos($e_type,'sql') != 0 ) { + $t=str_replace('[sql]',' ',$e_type); + $sql="select * from vw_fiche_attr where true $t"; + } + // if e_type contains a list of value for filtering on fiche_def_ref.frd_id + else{ + $list_fiche=$e_type; + $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; + } + + // e_fic_search contains the pattern - } elseif( strpos($e_type,'frd_id')===0 ) { - /* $e_type must be something like frd_id in (...) */ - $sql="select * from vw_fiche_attr where $e_type "; - - } - // if e_type contains a list of value for filtering on fiche_def_ref.frd_id - else{ - $list_fiche=$e_type; - $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; - } - -// e_fic_search contains the pattern - - if (strlen(trim($e_fic_search) ) == 0 ) { - $Res=ExecSql($cn,$sql); - } else { - $e_fic_search=FormatString($e_fic_search); - $Res=ExecSql($cn,"$sql and ( upper(vw_name) like upper('%$e_fic_search%') or ". - "upper(quick_code) like upper('%$e_fic_search%'))" ); - } - - // Test whether rows are returned - if ( ($Max = pg_NumRows($Res) ) == 0 && $_GET['p_jrn'] != 0) { - echo_warning("Pas de fiche trouvée"); - if (isset($add_card)) echo $add_card->IOValue(); - return; + if (strlen(trim($e_fic_search) ) == 0 ) { + $Res=$cn->exec_sql($sql); + } else { + $e_fic_search=FormatString($e_fic_search); + $Res=$cn->exec_sql("$sql and ( upper(vw_name) like upper('%$e_fic_search%') or ". + "upper(quick_code) like upper('%$e_fic_search%'))" ); + } + + // Test whether rows are returned + if ( ($Max = Database::num_row($Res) ) == 0 && $_GET['p_jrn'] != 0) { + echo_warning("Pas de fiche trouvée"); + if (isset($add_card)) echo $add_card->input(); + return; } // Show the cards for ( $i=0; $i < $Max; $i++) { //set focus on first "Select" button. - $row=pg_fetch_array($Res,$i); + $row=Database::fetch_array($Res,$i); // if quick code is empty pass if (trim($row['quick_code']) == "") continue; @@ -224,6 +242,7 @@ if ( $r.="<span class=\"$class\">"; $qcode= $row['quick_code'] ; if ( $e_caller=='searchcard') { +// SetData set the quickcode, name, price, and VAT $r.=sprintf ('<input name="%s" type="button" onClick="'."SetData('%s','%s','%s','%s','%s','%s','%s')".'" value="%s">', "select" . $i, $e_name, @@ -236,6 +255,7 @@ if ( $e_caller=='searchcard') { $qcode ); } else { + //SetCtrl set only the quickcode and the label in the control given as parameter $r.=sprintf ('<input name="%s" type="button" onClick="'."setCtrl('%s','%s','%s','%s')".'" value="%s">', "select" . $i, $e_name, @@ -258,6 +278,6 @@ echo $r; ?> <?php -if ( isset($add_card) )echo $add_card->IOValue(); +if ( isset($add_card) )echo $add_card->input(); html_page_stop(); ?> diff --git a/html/fid.php b/html/fid.php index e78d504e7..e3658510b 100644 --- a/html/fid.php +++ b/html/fid.php @@ -22,72 +22,93 @@ /*!\file * \brief Fid for the ajax request for cards - * + * \see fiche_search.php * Valid parameter GET are - * - d type = cred, deb, all or filter (see fiche_search.php') - * - j is the legdger + * - d type = cred, deb, all or filter or any sql where clause if the d starts with [sql] + * - j is the legdger + * - l field for the label + * - t field for the tva_id + * - p field for the price (sale) + * - b field for the price (purchase) + * - FID is the QuickCode * - PHPSESSID - * - caller give you what is the caller - * - caller=searchcardCtrl : p_extra contains the control to update - * - caller =searchcard p_extra is not used - * - extra extra data, its meaning depends of the caller + *\note if the j is -1 then all the card are shown */ require_once('class_own.php'); require_once ("constant.php"); -require_once ("postgres.php"); +require_once('class_database.php'); require_once ("user_common.php"); require_once ("debug.php"); require_once('class_dossier.php'); $gDossier=dossier::id(); -$caller=$_GET['caller']; -$extra=$_GET['extra']; -echo_debug('fid.php',__LINE__,"Recherche fid.php".$_GET["FID"]); -$cn=DbConnect($gDossier); +require_once('class_user.php'); + +$cn=new Database(dossier::id()); +$user=new User($cn); +$user->check(); +$user->check_dossier(dossier::id()); + +$fLabel=(isset($_REQUEST['l']))?$_REQUEST['l']:'none'; +$fTva_id=(isset($_REQUEST['t']))?$_REQUEST['t']:'none'; +$fPrice_sale=(isset($_REQUEST['p']))?$_REQUEST['p']:'none'; +$fPrice_purchase=(isset($_REQUEST['b']))?$_REQUEST['b']:'none'; + + +echo_debug('fid.php',__LINE__,"Recherche fid.php".$_REQUEST["FID"]); + if ( isset($_SESSION['isValid']) && $_SESSION['isValid'] == 1) { - $d=FormatString($_GET['d']); $jrn=FormatString($_GET['j']); + $d=FormatString($_GET['d']); - switch ($d) { - case 'cred': - $filter_jrn=getDbValue($cn,"select jrn_def_fiche_cred from jrn_def where jrn_def_id=$1",array($jrn)); - $filter_card="and fd_id in ($filter_jrn)"; - break; - case 'deb': - $filter_jrn=getDbValue($cn,"select jrn_def_fiche_deb from jrn_def where jrn_def_id=$1",array($jrn)); - $filter_card="and fd_id in ($filter_jrn)"; - break; - case 'all': - $filter_card=""; - break; - case 'filter': - $get_cred='jrn_def_fiche_cred'; + if ( $jrn == -1 ) + $d='all'; + if ( strpos($d,'sql') == false ) { - $get_deb='jrn_def_fiche_deb'; + switch ($d) { + case 'cred': + $filter_jrn=$cn->make_list("select jrn_def_fiche_cred from jrn_def where jrn_def_id=$1",array($jrn)); + $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; + + break; + case 'deb': + $filter_jrn=$cn->make_list("select jrn_def_fiche_deb from jrn_def where jrn_def_id=$1",array($jrn)); + $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; + break; + case 'all': + $filter_card=""; + break; + case 'filter': + $get_cred='jrn_def_fiche_cred'; + $get_deb='jrn_def_fiche_deb'; + $filter_jrn=$cn->make_list("select $get_cred||','||$get_deb as fiche from jrn_def where jrn_def_id=$1",array($jrn)); + $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; - $filter_jrn=getDbValue($cn,"select $get_cred||','||$get_deb as fiche from jrn_def where jrn_def_id=$1",array($jrn)); + break; + case 'all': + $filter_card=''; + break; - $filter_card="and fd_id in ($filter_jrn)"; - break; - default: - $filter_card="and frd_id in ($d)"; + default: + $filter_card="and fd_id in ($d)"; + } + } else { + $filter_card=$d; + $filter_card=str_replace('[sql]','',$d); } - $sql="select vw_name,vw_addr,vw_cp,vw_buy,vw_sell,tva_id from vw_fiche_attr where quick_code=upper($1)". $filter_card; - $array=get_array($cn,$sql, array($_GET['FID'])); + $array=$cn->get_array($sql, array($_REQUEST['FID'])); + + if ( empty($array)) { echo '{"answer":"nok","flabel":"'.$fLabel.'"}'; exit;} echo_debug("fid",__LINE__,$array); - /* Different behaviour depending of the caller */ - if ( strcmp($caller,'searchcardCtrl') === 0 ){ - $name=$array[0]['vw_name']; - } else - $name=$array[0]['vw_name']." ".$array[0]['vw_addr']." ".$array[0]['vw_cp']; - + + $name=$array[0]['vw_name']; $sell=$array[0]['vw_sell'] ; $buy=$array[0]['vw_buy']; $tva_id=$array[0]['tva_id']; @@ -97,15 +118,24 @@ if ( isset($_SESSION['isValid']) && $_SESSION['isValid'] == 1) $sell=($sell==null)?" ":str_replace('"','',$sell); $buy=($buy==null)?" ":str_replace('"','',$buy); $tva_id=($tva_id==null)?" ":str_replace('"','',$tva_id); - - - - $a='{"answer":"ok","name":"'.$name.'","sell":"'.$sell.'","buy":"'.$buy.'","tva_id":"'.$tva_id.'","ctl":"'.$_GET['ctl'].'","caller":"'.$caller.'","extra":"'.$extra.'"}'; - + /* store the answer in an array and transform it later into a JSON object */ + $tmp=array(); + $tmp[]=array('flabel',$fLabel); + $tmp[]=array('name',$name); + $tmp[]=array('ftva_id',$fTva_id); + $tmp[]=array('tva_id',$tva_id); + $tmp[]=array('fPrice_sale',$fPrice_sale); + $tmp[]=array('sell',$sell); + $tmp[]=array('fPrice_purchase',$fPrice_purchase); + $tmp[]=array('buy',$buy); + $a='{"answer":"ok"'; + for ($o=0;$o < count($tmp);$o++) { + $a.=sprintf(',"%s":"%s"',$tmp[$o][0],$tmp[$o][1]); + } + $a.='}'; } else - $a='{"answer":"nok"}'; -echo_debug("fid.php",__LINE__,"Answer is \n $a"); + $a='{"answer":"unauthorized"}'; header("Content-type: text/html; charset: utf8",true); print $a; ?> diff --git a/html/fid_card.php b/html/fid_card.php new file mode 100644 index 000000000..c85e6e518 --- /dev/null +++ b/html/fid_card.php @@ -0,0 +1,130 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file is used by the autocomplete functionnality + *\see ICard + */ + + +require_once('class_database.php'); +require_once('class_dossier.php'); +/*!\brief + * Received parameters are + * - j for the ledger + * - e for extra (typecard) + * - type is the ledger type (ach, ven, fin, gl or nothing) + * - FID contains the string the user is typing + *\note the typecard can be + * - cred card for the debit only if j is set + * - deb card for the debit only if j is set + * - filter card for debit and credit only if j OR type is set + * - list of fd_id + * + */ + +$jrn= ( ! isset($_REQUEST['j']))?-1:$_REQUEST['j']; +$filter_card=""; +$cn=new Database(dossier::id()); +$d=$_REQUEST['e']; +$filter_card=''; + +require_once('class_user.php'); +$user=new User($cn); +$user->check(); +$user->check_dossier(dossier::id()); + +switch ($d) { + case 'all': + $filter_card=''; + break; + + default: + $filter_card="and fd_id in ($d)"; +} + +if ( $jrn != -1 ) { + switch ($d) { + case 'cred': + $filter_jrn=$cn->make_list("select jrn_def_fiche_cred from jrn_def where jrn_def_id=$1",array($jrn)); + $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; + + break; + case 'deb': + $filter_jrn=$cn->make_list("select jrn_def_fiche_deb from jrn_def where jrn_def_id=$1",array($jrn)); + $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; + break; + case 'filter': + $get_cred='jrn_def_fiche_cred'; + $get_deb='jrn_def_fiche_deb'; + $filter_jrn=$cn->make_list("select $get_cred||','||$get_deb as fiche from jrn_def where jrn_def_id=$1",array($jrn)); + $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; + + break; + + } +} else { + if (isset($_REQUEST['type'])) { + if ($_REQUEST['type']=='gl' || $_REQUEST['type']=='') $filter_card=''; + else { + $get_cred='jrn_def_fiche_cred'; + $get_deb='jrn_def_fiche_deb'; + + $filter_jrn=$cn->make_list("select $get_cred||','||$get_deb as fiche from jrn_def where jrn_def_type=$1",array($_REQUEST['type'])); + $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; + + } + } +} + + +/* create a filter based on j */ +$sql_str="select f_id, vw_name,quick_code,vw_description ". + " from vw_fiche_attr where ". + " ( vw_name ilike '%'||$1||'%' or quick_code ilike $2||'%' or vw_description ilike '%'||$3||'%') ". + $filter_card; + +$sql=$cn->get_array($sql_str + ,array($_REQUEST['FID'],$_REQUEST['FID'],$_REQUEST['FID'])); +if (sizeof($sql) != 0 ) { + echo "<ul>"; + for ($i =0;$i<12 && $i < count($sql) ;$i++) { + /* Highlight the found pattern with bold format */ + $name=str_ireplace($_REQUEST['FID'],'<em>'.$_REQUEST['FID'].'</em>',$sql[$i]['vw_name']); + $qcode=str_ireplace($_REQUEST['FID'],'<em>'.$_REQUEST['FID'].'</em>',$sql[$i]['quick_code']); + $desc=str_ireplace($_REQUEST['FID'],'<em>'.$_REQUEST['FID'].'</em>',$sql[$i]['vw_description']); + printf('<li id="%s">%s <span class="informal"> %s %s</span></li>', + $sql[$i]['quick_code'], + $qcode, + $name, + $desc + ); + } + echo '</ul>'; + if (count($sql) > 12) { + printf ('<i>...Résultat limité à 12 ...</i>'); + } +} else { + echo "<ul><li>Non trouvé</li></ul>"; +} +?> diff --git a/html/form_csv.php b/html/form_csv.php index 7bdd974f3..04c0345c5 100644 --- a/html/form_csv.php +++ b/html/form_csv.php @@ -22,7 +22,7 @@ * \brief Send a report in CSV format */ include_once("ac_common.php"); -include_once ("postgres.php"); +require_once('class_database.php'); include ('class_user.php'); require_once("class_acc_report.php"); require_once("impress_inc.php"); @@ -32,7 +32,7 @@ require_once('class_dossier.php'); $gDossier=dossier::id(); /* Admin. Dossier */ -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $User=new User($cn); diff --git a/html/form_pdf.php b/html/form_pdf.php index f4d01687c..cf55756c0 100644 --- a/html/form_pdf.php +++ b/html/form_pdf.php @@ -26,7 +26,7 @@ include_once("class_acc_report.php"); include_once("ac_common.php"); -include_once("postgres.php"); +require_once('class_database.php'); include_once("class.ezpdf.php"); include_once("impress_inc.php"); require_once('class_user.php'); @@ -36,7 +36,7 @@ require_once('class_acc_report.php'); $gDossier=dossier::id(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); foreach ($_GET as $key=>$element) { ${"$key"}=$element; diff --git a/html/get_pj.php b/html/get_pj.php index 09aa5d226..0d041e7ee 100644 --- a/html/get_pj.php +++ b/html/get_pj.php @@ -27,14 +27,15 @@ * - gDossier * - PHPSESSID * Must return at least tva, htva and tvac - * \todo must add the security + */ require_once ('constant.php'); -require_once ('postgres.php'); +require_once ('class_database.php'); require_once ('debug.php'); require_once('class_dossier.php'); require_once('class_acc_ledger.php'); +require_once ('class_user.php'); // Check if the needed field does exist extract ($_GET); @@ -42,12 +43,14 @@ foreach (array('l','gDossier') as $a) { if ( ! isset (${$a}) ) { echo "error $a is not set "; exit();} } if ( ereg('^[0-9]+$',$l) == false ) {exit();} -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); +$User=new User($cn); +$User->Check(); + $Ledger=new Acc_Ledger($cn,$l); $prop=$Ledger->get_propertie(); -$pj_pref=$prop["jrn_def_pj_pref"]; -$pj_seq=$Ledger->get_last_pj(); -$string='{"pj":"'.$pj_pref.$pj_seq.'"}'; +$pj_seq=$Ledger->guess_pj(); +$string='{"pj":"'.$pj_seq.'"}'; header("Content-type: text/json; charset: utf8",true); echo $string; diff --git a/html/get_predef.php b/html/get_predef.php index 3f2fc6315..b9c4c748d 100644 --- a/html/get_predef.php +++ b/html/get_predef.php @@ -27,11 +27,10 @@ * - gDossier * - PHPSESSID * Must return at least tva, htva and tvac - * \todo must add the security */ require_once ('constant.php'); -require_once ('postgres.php'); +require_once ('class_database.php'); require_once ('debug.php'); require_once('class_dossier.php'); require_once('class_pre_operation.php'); @@ -40,7 +39,7 @@ extract ($_GET); foreach (array('l','t','d','gDossier') as $a) { if ( ! isset (${$a}) ) { echo "error $a is not set "; exit();} } -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $op=new Pre_operation_detail($cn); $op->set('ledger',$l); $op->set('ledger_type',$t); diff --git a/html/get_saldo.php b/html/get_saldo.php index b8589b6c9..09bc5115a 100644 --- a/html/get_saldo.php +++ b/html/get_saldo.php @@ -38,7 +38,7 @@ foreach ( array('j','ctl') as $a ) { } } -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $user=new User($cn); $user->check(); if ( $user->check_jrn($_GET['j'])=='X' ) return '{"saldo":"0"}'; diff --git a/html/image/body-aqua.jpg b/html/image/body-aqua.jpg deleted file mode 100644 index 9e7b729f0994d1266fc47855b076ecb75b722934..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30713 zcmdtL2|Sfs8#ewJGE}BS$2>+wRFWa05Dk*bSfWxSWiASvNTCcVrGe5QB%x9&Lla6V zkt9)Mib&>R`_@{|dNw-4d(L^^|L_0(zH{E=-Fr>@*?T{0-S>T6*M0BN_oH<L@5<#X zmJ>`&OoS2mml&lJGxglJZ}Hr2FS&20r=#Qs$L*4aD~#7lZuOB|>b%Wy=kD$9J|3gh zgdUvqU;P6Y`L7m$lSlIjJ`QF}7D*N+X@Z%LiG`18^a&wMT^zyqhlQDyX%Z*sTgXc= z6O&k2m?yDJB3Qs1CkQ6yX{Hz7@bO2l+wz&^_}0M0jL!K>zeq{TxD_m0Uv|(P%o4&^ z%2*H1VqxO|U8;QG)!3QYn3>20nFuCuCDTl|M0Z|%!!NbY?emYojHN8nTV>|2Kc2Yk zV8J#$_t6i;R2Ddlg^$o7MlKK%j>_Tz#1Vqy|H(f*o}Rw*FJ1Z^>>a;l#%7ipF^Q>; z&HY;pLyz_<Jz&q#T=LtSH=U2PRy$;P)oFu=&mtm2_`Yn@4o_$L4jwM_^qm*UFVtq^ z&9gm}UfSNLeSD6Mz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pdl{|w44B9ys8r@k~6U4i|2f?GsPY8v+A^I1X) zjr1vJi-47yDN#G2?(7-7nfz5TRWIM0tW!OYcJqNp(BTfS6q4vay7y7h8S*a4=T#}2 zTWuGLZzLubZRwgj9KY|3C#3BC*%ogJP9z}KdAjQe0gt-?z>3=a{vk6W{B=nYBpd_k axDzDhPoUE8`qb}+jQxVhpFOf2t@=N>wUm$m diff --git a/html/image/bouton.jpg b/html/image/bouton.jpg deleted file mode 100644 index e95940e22388fcc1e6140e64a8d26e5e7a93acec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2326 zcmbu4cR1S%7sr1QGc|%(DJ5o6)M|{|+Nq>mo3@A<d(;Z5v|iT;H4;Jb)~=CsnbD%< zMr~TNv1+u%tyXDVr7d~&dEe*h`~N-Xuk(Dr-_JRR#b7N1Pz(x<0ze=TV0qjC>j)4t zi^O?F<9uae1ET|E90PDN7tz+Xta-rfr|lorPsl$4{0y_Y0YPry6yOa8$pUPGAg~~a z)eA@g02_$o_>Eu117QPmaGl_0KbDQ400<0b1G8~MPW;!y0b=K519Jh~Jc0;KJBX0D ziIW#`T3AFv*7R~jQR56uR8HH%KAA)==$rh>2OR@A{vQv3IJnrr?A$z@$MShW0K^6c zb3(Xy{^vO!**OF`g}eYRVT6etOhnYlCxS?B+?LgJ@b)dJ)UuCEB~|r|PfW4q0A4WY z_!Y1qU<4EyL30r8!`}Pfs4o|?h<^H~JGMOIj+h0mc=&@bxPxx-#LQuO2;yTIGQz7g z*kuk@T<Es}72};hn?LAH1dn!xBg2boJZfe~v;)NP@;Qc3B-|h(CsixNYcy*~)aAP5 zN4GR%9rxPoIrfLXD2!9e_3)`bsCaWKZ7%9|*@pGn==Uw<1~?&yFULRqaW~Ya=J(uI zQKV33MDF4nURtSElVnJhF?4tDU1BK)o~5a-7DiL>aNZphF~ZF!d}x{Lu#S<9x@wmc zEB}5pK30~ZbYUz}cXDLXFKux4gpyol7IC=NxfZ9EQZiaQX=$lUwt`u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a$9;LyW-Ql etRBo$qIvBXGKDWlo`j9&OYGf?xoM`sn*9&x7yP#X diff --git a/html/image/bouton2.jpg b/html/image/bouton2.jpg deleted file mode 100644 index 3321eebc0c3ffb6b74c1fb9c5d32e0afcf0da2be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1371 zcmex=<NpH&0WUXCHwH#V1_nkTWcYuZ!I^=Bjg6g+m4ls~os*M;i${c)hnt&6Qb?Fz zL{>^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<<Uft5x!pKI?*u)5A2qPyaCl5D|1TU|I zk)n*E5y{~H0R}-1204ZbW=16jCP7AKLB{__803NOWMu>c1}I=;VrF4wW9Q)H;sz?% zD!{<R$jr>d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$<t(;w4-P}Dqy@EqR!@?sXqmoln)6z3Cvx-Yf%gQS% ztD0L{+uA!iyCzMZGIiSY88c@sTD)ZGvgIpQuG+MD%hqk%ckJAC=<t!F$Bv&kdFs;T zD_5^wzj5={!$*&wJbm{3#miS8KYjl4_1pI!KYxMz#mK-6@fMJTcnr;7f<S*Uv9K_+ zu!H=?$W#u*%z`YeiiT`Lj)Clng~CckjT|CQ6Blkg$f;}`^g%SK=pvVxipfLOk07ss zeMX$en#l4Q++zrT-D2QjW&}navmk>#!@D|_KkoepxkUt8XZ=gzn=mIaT!&fihpNZp z*Kca3{}Z3zx$*md29N&?Kkj;e{O3CP__ow&i_6LE|NeQ$g~kUq91aRmx)YpVz4~9e ztcT{QxBDk&e@b8RpW)EwkLG{A*iWhdlQ-p0(MJR3@9pz5K&Dg{NWQ)h;OA+2_iGlH zc|rfQj{ao1_wVbURki=ow->HI@BGvKKf|$??#K0oh5HTu1^#FFxa-rc!iR--K4r8? zwY?ME^vUr}^4-7h|D5;#&(Qk(QU1>t^%@|f<v;BC<NKe%mj9{ve+KFGdP@T*cTH_u za(9aIcg5cl-|MUYGZ<g-2b#;kKcn(n|9^(wOZ7<Z+_SgOFVomBqDuUd;P2@_xo;fb z{rmpUc^4nP@4Nnbl}gmD&5>SCTTY2=v45KzBHg~?^~)Ev)ApIDn|_O}kX*}E@>J3> z>ig|nosvs2tEYc1|8uBIW4+3a-OK8apRV6gKVwm^{y)3uzlZ-E6=D2*|1Hywk6&kg zy_{_SQ!MJ!yscl$kF0MuyJx;Ba&gAnuO7m=drzm&^FQ%JW|{xhs=fz5W#%*41Ts&! z{>xIiPi^{T`_Jd^?VGKC^ioOElDD~MWMaSA?D=5Ue{6Q#^#2T8_DA-A{=4Kq!~K`` zKknK+eh}ZecI~C~eV4d)AD3W?ES_G_{4es$X|A`^^ybWaa_hurRaws$nw%$9zM8%| z{(!&h1VfgT8T(%|pi#XS|1<FXXLz*!7e~hZ@4w>znY(P9l6z|YGrO=#U+YEH+dr)j z`OnZ+|1qrcN=g3jzxu#{U+{<FW1!`~ix>C5f3qJL{e@G4@_w~z+brw)8u)?xsLRB^ z3l|p@{@WGr^Pl0ol`~MtYmFaJ$QUT}&)oZU$nMsePfNe$R=jVi<DD%VnP20syY`O2 z2Ek~D$Z5c|v26B~n#I5OJm1gI{3i5K+SbQ`N8Ojd%4AJg)TMpWMDJz&$4~d)$v@Lr W?ERmif7*YBg8vMLt_=16Zvp`9CTU*) diff --git a/html/image/bouton3.jpg b/html/image/bouton3.jpg deleted file mode 100644 index df1564ce1f307f135bb5a4ab1863fc8d66e28116..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1269 zcmex=<NpH&0WUXCHwH#V1_nkTWcYuZ!I^=Bjg6g+m4ls~os*M;i${c)hnt&6Qb?Fz zL{>^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<<Uft5x!pKI?*u)5A2qPyaCl5D|1TU|I zk)n*E5y{~H0R}-1204ZbW=16jCP7AKLB{__803NOWMu>c1}I=;VrF4wW9Q)H;sz?% zD!{<R$jr>d!pzFb!U9xX3zTPI5o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v9j^SS4L1}^WT4CcSeCSJCGy%ZF2jL+V-y8Q~jmV0>n-pcUSe}Y@5Et@`1 zY1*|{95Xo9E=WtA_@CkBvZwMI|K3}^KcMgnm_*hrVCvFXz`ZN}PtEq<?LWITE&&aC Oy8n*-nLr2m|2F|-RwH2m diff --git a/html/image/bouton4.png b/html/image/bouton4.png deleted file mode 100644 index 552b8bfb5ffe03e3a79ef5c01a1eae86a2d1dffc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 385 zcmV-{0e=38P)<h;3K|Lk000e1NJLTq003kF001Be1^@s6<SX4S0003<Nkl<Zc%1E; z!I8o+3`HH!mO>w-5Y8zf*FY~60)3cTb}zsf$Btx2!kXFtP8lK;k{3xc#zP3f)o{2T zeyhIlkC>L}eLO$rp(V$_6#@}__J|>cKtwyS80UC$ib5blo@tp#DJvl=A{OzC{kRb4 z(|b+g!zpwYG7984GUM(7*P=MOZ7I2zFB4x9^C3iB#!WPv4bE;`N~s$#rTEtYWH33q zwn}8SZBK`Q6<aNonlTZ%BJiaXU<VaaQcxjUFr}o$@T2itz>|hb@n~25i5;M283RI$ z0U^eK5Mw}yF(AYk5Mm5Zt<M8}Vh5;@&ZGt5b03N@if6RLj>SU?-3l31v-e??OO-1G z-G2-LNh$@ay`3nH3C{@v-(xjHAVr_8XPh1CkfKNRzN{Dwc{#W*Icu{u#I#e}ZP>ft fUqB9z*0%o#Y<GPFD2J_?00000NkvXXu0mjfES{Si diff --git a/html/image/clouds2.jpg b/html/image/clouds2.jpg deleted file mode 100644 index 084b4406f010954d8c205875ba6940fcafc070eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 962 zcmex=<NpH&0WUXCHwH#VMur3+WcYuZ!I^=Bjg6g+m4ls~os*M;i${c)hnt&6Qb?Fz zL{>^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<<Uft5x!pKI?*u)5A2qPyaCl5D|1TU|I zk)n*E5y{~HAqGJX204ZbW=16jCP7AKLB{__7^D~&n3#c%MFNaW%q*;IKsgCU1~e%K zklg=U3_Q$?3`_#d0t^g{-xm~bQ|u8iar4wT6x%gJ>%!&}TH0#6+U=~KU$T6=_L)%c z#uG~}b8)OzWSKkZ+~iaxd!Wg30t`$*YZ;gk)-nkSGcpS)C>a<5&F28Rh>?})m&znh zD=YJT+22*>$_ja^{bxA7LgC4iC(l)6W^epZ`}5s1y(AFQPx=N%Ahvv3ygbkbaY0}d zpm<A=K|ug)G|*4>j0Xj$rSAu-lLn~+1_8n$j0}QILIMhkV6{vjwc)wBd1r5K-TGmF z!Y+SqTaX8&1%N>VLI}WU=qPB==m2#+n?2L-+V@{FHCz(g1i?VU#iif})bq?B8<Fi4 zR7@05Fmwzogn8axF;8TvrdLpx#$M4yUy>$IJ<k5VLaN91c)j`ykBav9kq4(q_x|g3 z?d)+_Byw0uJ@86t`H7CM*UybPs&?1|O#w#{*bad=2dB%gu37k?`SoIumnFeLgB&<O zFDnWdf~^Jxj=-}jLGBsMPv=a#5%4H?J5Y-hPz!2WU}O*w3`~UR0R@tPHk<Xm%a^L} zeZCd?JFjTxy3Lzn>VZ0yfica<#D<)X7zHmr6i@_uHgVy`j|vDM3nV)=)hN{pJrsH| z-Q}11AuE9&f>+uauE<?)T>R=Mmz>j&IwPYexxCVy@6<C6cxa{=Y*qTt(0y5!rz66t zLZ;2IKe@5p<ehPnfqwA0exE5T@}BE1pVzZl)-|tGbmx_y=a!!-wNqa4rf>O?QrU@D a%Gd*M&vjq@pj39_6;Fq0jn_B-zX<?4IT3{b diff --git a/html/image/clouds3.jpg b/html/image/clouds3.jpg deleted file mode 100644 index 5bc522102d91512cd2ab7ae5d1b14876778c63dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1069 zcmex=<NpH&0WUXCHwH#VMur3+WcYuZ!I^=Bjg6g+m4ls~os*M;i${c)hnt&6Qb?Fz zL{>^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<<Uft5x!pKI?*u)5A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H^MaOiawu{ISh=WqL#1(OE3|P85SJuhC0O-8rq9^&Nx^2K6H_*i zj=9v_JTH#buH_%KdEVE4J1F!IJQHs)-rqMd7C1z*%FBgF1f(cbjLs^e!yB|p^Vi1_ z<ELoi=FHFG&#VzN9Hz}R>4>hs<ryzvP##?3k(WxB?BtXm*7n>@bl8<C$rq?vyZ5Di z{DC>oDb9|5Mwe7tE@U|l_`Fu2{||aw@LKbTrgi?LYZ7_eATFiPR*<Ln_*bJ5RKPx3 zu(7@$KW?csc8iXT5K^kyxbqfoJ^cW#tb;tI&5aH7re{>0OsSmh{qwKK#i6uznB??1 zoPBGPm>Q*>*`NeF__8fGHI+EQ3u!g`F1J9TAI{BI0kDTxkW9=$?2`XjzalTKELAJ< HE%bi?UHTIv diff --git a/html/image/comptaanal.png b/html/image/comptaanal.png deleted file mode 100644 index 8a6813154a42cd5779afb52421205b129cfa945d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2977 zcmV;S3tsezP)<h;3K|Lk000e1NJLTq001Na001Ni1^@s6;Q*MJ00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru*9id%FEmJe$}Io@3oc1S zK~z}7y_jiiT-SBSfA?*(a>yADcZw8O(bQ^6)MCkwWCyZkCrnx!iQ6cS1J|q@plN^> z$nv4JfuJqgBFUGc0pq#}syb~P*p`smjV)P`WLvTri55kPq(qTJisClI84k(W-n{p2 zKai5FN@5YY=mFjg<^uP<-<<QmXL*9((K@;e-R~}X(B~?ARw!(B8{P_CbNQrAJUV~v z?PNOo%|o4Ll6y4m9`<Zm9d13erS&17$8TVfAun@O85>J}-Tfb5`R(vKUBCzbpFr!^ zRX^y98yASDM*(mv0sOgYhG))o1Lye^b}v9@hNgS+n=01pacc=^wR=0KdynMfi_<S1 z>NMv8&hDoKr~`@sH!u(MwjCh;e+_hgVDj|qTN)q!vP%?_&86{CL*LaOp8$@Y-H#y@ z<<I?%TORe*v<5X_&@FVA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GCwa&7oRK%TcwxcBk&<F$o7u;bgS;^w@m><|G z;VGoty8Qkpz)}}73tSRH{08_X5O*B;83d0B*Z@=mh0A{`v+Vf+A;kN@Az&yJ3g`bD XEwA+sl+fV>00000NkvXXu0mjfR!+Z| diff --git a/html/image/down.gif b/html/image/down.gif new file mode 100644 index 0000000000000000000000000000000000000000..c6259b9c71f3b59912cc4d3111587e3e0f0ca189 GIT binary patch literal 74 zcmZ?wbhEHb<Y3@nXkcVuU}*UN|G(ltLFb~>#FEq$h4Rdj3<Y;j-v9>1pDc`A42%pq cKt({s91ILhJU#s@+26{_ndqNQ<zlb~002P~2><{9 literal 0 HcmV?d00001 diff --git a/html/image/down.png b/html/image/down.png deleted file mode 100644 index 1419c4c2e1ad800abe30f88bd1d08cdbedc9adff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 96 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq>Ygr+Are!Q6Bbw|q$Fhg@ONNj sX3lfv?dkED^Z&)98zq0#Q&fTKC1!9m_E>J74AjEl>FVdQ&MBb@03!7oEdT%j diff --git a/html/image/elegant-l.jpg b/html/image/elegant-l.jpg deleted file mode 100644 index a1978eac84b47dd75da80e9e62826c4a2b969723..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1623 zcmbu3dpOg39LK-E?KcczSv65}n|sbiB??0>!?0QFxRgs%DqT1_;W^}1x{_mRl>3Zz z*@HHz5LzzL357Cxx@l3uK_?bF>pACn&U60m{rT(tyg%>P^OirCzXDp`9uyA%K@bR6 z9FR+Z+jsXv`VRRa!1uDe1z=Rb8W4<x3;_ZIAu*6#4Aubv!AQm0|AbOfRzbpOgsLLm ztOXz>0)`bH_0I={Kw@A6fKno@bfHBks~DoSW7Dv!jErqqxn+H;ajucmiXILE|Azu3 zi~<NnVuJw+gc1Uc{1>RO7=Sc@SCU+4u@Pw~ZLFb<D?NAGwyZC`wyw2JJ`B{6kYX_s z1DwI)!c1V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~~YW5=<l(ms!0$4XESH*%e5Q~YN< z3e(`k)EW;HRpDS&vD8w3ax2rccy@SmYlcRsCpUSS<yhWW+P`DACwIxSLW=jS?tHrT ztY+BtwDF^sUhOA6uS{b9T=kGAvKoFDmBsls<%=UyqN)3NjR~#q66L^uF;kRS+ozUU zWXGo%%R%-|$!tYjQoICr;M+hnPgm9N>a#A>s)2M?(ek(Br*leTa71(}>Y^DkrA^sx z!t(NrR@dX-q%3xsAN^f$nE+=r8P}I$W*8V^r#zn~Y8Ox@wX3>E-ED_|p)-j2#z{rp zjM4)AVgj@0T4H?j10{8Pf(qwkm^USY2?nP$LR|X~)w6rN1BscpZWW2T&92trqX#+F zR+YhlJ2tDPGPYjEz`yUAy3`~GA-OTsAiPl9$ALYwe<^^qO!l2T!Si2QU7)1yU1UOM zlD))BSEPDxM8yM+K2hea=CIbQXX-@hd5ZAm@wx0H-t*3L?Of~ozKdF~nY-0kPw&Bb z!Hx!@s8FYJ7}`>m5$ph<c`h)p*x%3nLZi|sMv-(c(?}0>To4&SR#yrw?~m%HyRtJ^ Nx_$N3Y{`+o_#3QljgkNW diff --git a/html/image/elegant-n.jpg b/html/image/elegant-n.jpg deleted file mode 100644 index 9188d8368e0ced843f75f794a6a7a07e1e96ef04..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 633 zcmex=<NpH&0WUXCHwH#VMur3+WcYuZ!I^=Bjg6g+m4ls~os*M;i${c)hnt&6Qb?Fz zL{>^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<<Uft5x!pKI?*u)5A2qPyaCl5D|1TU|I zk)n*E5y{~H0R}-121$k#W=16jCP7AKLB{__7^E2(7+HaiMF3U?MrIZ^b|#>tfdB&& zBQp~-8#5<Vo{@=xnT1u*P|<NBn~<o9OQ48KqpGQMP;f|5@kXEyF`&nh4Fj6a!~hhR z6$FVhF)<_TVH6ZnWMVdSEc}0qfrl9=Dab6yV9)Tz{Abp;>uIyft9LOU$yWBco4hk_ z^0}mj>`(4b1u7Ss9d&Fy9cpuZ$%K?u^OBda2~M9mNqf`b4`0l-f93n-%~|2Ug<<QL z$xE+Gq=v^QuP)$w<e{~)ang(G)0_p%=UBJ5_x=!Jkyxr296Q@n>1uw(C)cl6S8SQ6 z8(Th!c}=Ng&oS4z>t8i_a+S!G3A&w_zeT%VWAU1=Gxu*>JTax}goMVG>@D(-%IbG` z&OTZDwes)!f2TGlJ&u1=7Qb#{pVx_hRz4j)$-PpWCv3icMm^%bd`7KP=}eE;rlu<` ztwX+QUUMtn_VSfb>MO6UWwX=^cP_nEZRB8jr8f0e?V?RqHJ3`~oHd`eGEXrjT<hhO w&)3qgs7EFihow|bm5)4^>AhvA=TX1o`TETFLR0EKO?%)H5P9dQ;fen@0g-CYTL1t6 diff --git a/html/image/freebtn1-b.jpg b/html/image/freebtn1-b.jpg deleted file mode 100644 index 261441ebb48b4a1989fdebb72332802011294058..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1343 zcmbV}X;4#F7>3Wy%?^wN2oPjTz#!-dgjhhfDvE+-m`GV26;Y&Urxa2|gm?$AZs0_u zpkS2&lvV^fP!!OPXhcZsNDLtEiY!KfDTF0vfqQyUrk(Lu+xN_O{+#!G-}{^cAHxA) z8Ws{70uTfMgjfJR1Hph!rP8PrI*mqSFz8HU3ln1_BV&%4`4S5|8wYzk8(UjP=T$C_ zyp>M2w#&U;S9*8~g+d1x-vA$h|0*w`V4(@ZU@(l0jIB*ftOZ<KuHZil-U2K-;DQ7c z;Q<m0L0Jgw01iY>3i3f<Q3weoQ>ZjLgK0z<u9^Z8f}$icN}-U+gj+(K12T(Z#`RoF zH5cuq@zN{=xkZ(9r*)0D*;|y8&R&V>c?_ndl{Lp^8Q*2OtDA83XWl-(Yl7Er2-&zP zG%WJVsOXs3xcFVWllCNkm9kg-UB>>*16c?24}X8;=&|D`P8a`BQhMfWS$S3U#Y;6m z{d~E$>DT6~*IHWJuFLLp-0kd=|Nci$Z{NfIM~|O8eLX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 100644 index 1724031cb8359dcb2ba2d019b61f5911f5879b8f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2267 zcmWlYc~leU0>zUOH9iDUD}+TBu?3YShzg1xf*TQmM6DGqng~9Pb;*b*Sg{G9CIXV7 zrIofq2H{D7N`gf}B4&^!RD=u|2@jPFAO;coeF{{HuS|LO-19s4k9+QaH+=iH;B|+1 zG<TYXMx!Xo|ESI%(fA`ec9M>rtP4dnp%-*+V%$w+uoDw@NrYXp*<FOYi_HEa!X3dw zMR=%~U`y~&#O#ld{u01O$k0TRgXjbzoghggl<0Uz^&F9zgP3^;!A~;qFIa>k{OEB) zj1Wk&St23rq@<gibe92tDR93I{I5f{0)(c6P&r_i0JaKnq&k6Ahe&li8P1dA{A)O0 zZV)JN0Xky?=NjN;0-geL@&FG7yk7uc0R=KB$b@_p@ReXM3OO?)806GIo(>9%fItQK zDkxAvz6S7hK%fD_>jq(-L0n)!l!gmw14tf3Fav@Sk`h9qB825YsDffO6l#F@0TAk- zSOdj1P*MUBEkLRvqJxsVkgo@PJ><7QK^qhhln@8vRv^?vaRU^ZfY3yVO%Txoq!mco z0HTLTE0i=sNee^>An62>?ioS}2_zPH`D%|siKD1F_0pgMC8Z?>X&IqV6ABH1R-4fp zv$EE#D1lN9yp92-8loDAsR(rqQBqD~YAAgI6$U6Z0_k(0Fabq3kaj_750pNq6h^4% zfr?%VeF;z#L`@Xh3zgkaN&<xiD29NPgwg>@F$fiXlwt@fhA5N-=qOMQ0_7Wkk`V2u zPyo>pO8FWpEtK*NRL*oDM8_%RI8=V1l#>*On=zbJ>q&JBi5Xy757ay%bvV!&NF71y zIsj$?*f3C!&IE{!Kx~v!1E_vWVecUZDQuEbk3;o)N<B$w0MGzfGw}g8ka!EkO#tr( z27)vYz|aGTm%wZWL^s3%&|6^3_!vO~Vg#6HNJ8@~XdZ$u$KH*O0MY`<5eNVzAtWa$ z03m=Bd=KFV3Qkhg-;~E+3_6YWH_eAOqyK+`#+;^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_)vhEp+H8wR~%9J}nz1-ura?6=9mk+O#CDH4Aif=5GyZ)Qg(O@Ol{uXRw z&!qpg<l9$=zFGN0QFcbh&z^1TVB?wg`$K0I&F2mlU%E5J;^B6<X|;cW+=>%P*Dpz_ z?)UAguIkL_edXo*aB{Fjk~GzCess<oo6Komw33B4;mTX_kyd_NQbXL!_)RNjv#bvc zEfrO=$Q6wa`0NZ`>fBhNl^3_Zcqg=H<TlX{(3u;(J?QK0SSYhIJ3cmyz8$8!&#upi zebw)vV>Yvo1ZN2u15WJ3LR$f|;dnP&HXZW9W95~Wf6ZE0d3i%_ANx|F_1>1SSyrk? zOS5va|HO+N6&ku#vAaB$HSA;}wy~=!m$5I-%@Q#@^Ku!tR^RN{c~4&Ca`N5QHCL89 z<C@LZc2X<f)tej(?)(_Q%1NKqD7F1nRb-Q2Y!lQ2bK+g%9h-)lgZ@00oj9`F=_E5N zj7^_qr=c(YG&MA6O*-oU_K0DRe&VPpv`IkIosYbk9rJMEk5xAYozLx)1rfV!Pcm<@ zQ~!Hq4Qni~C3Z7A^*+O%O{34T`^>?W-jXgIW+{f!79+xRM;9rLbirv1PJ6=7V>gB( zOV)QRk46?^w7@*NZ5e)fn@iFDt~wWefV@!d8<RRGxTfCb1cyj-8poJXs!b02`KkTF zIeUn-rLL#vo%Z(gz~Z(AxYo=4kTC20HEG=2oX+ol9xwKeDvj8^Vi%fFXq_oy1mp%} zXRg@dI%+p3Fni~`xDEXavYBOkS%mSX(}aq<c$jxJY+gK3wIr<eO;odo?NN4-V@zAw zm(`D-ReUp19#dBq*yv&V%a&)KadTuLWPR7Y+KJo9wencY<F326CVut%z5L*Z$EJr< L6KbgqlNRz1MHSoA diff --git a/html/image/freebtn1-l.jpg b/html/image/freebtn1-l.jpg deleted file mode 100644 index 3b5f48650f0c57999f597230341c7af027c554a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1340 zcmex=<NpH&0WUXCHwH#V1_nkTWcYuZ!I^=Bjg6g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(ua2Chdt7C4?%7OtL2=LE$y<92D?HEDd@#Frawg*)d#iONKaH={ zmA3z9;Hdrn=RZTte}?<d{xe9~Kjh!{pJD#%`M>|%e;ifp{PRBp^Ym9!tEFEj{I2^U zDtY<I`M`+zAKK&Pf7b2%&#?dOKa=`HvNiTke?9;ApTYdcrDy%0|1teq8h7m1%S$=G zugZU`nfc1z>d1eF7N`FV|LWh>zyDm{tNusv`u@+q3;#3J&;FD78Dt9sNYBMhldl9{ zI_LjB`QsY>AI|yp&%ZtX_iy`;3pUc#^MCx^0km-KKa=9aQ1wUuGYD)6i>mfCIl(Cr zdS0iN;l1~R>P*GU-6sqpru`Bs4qaO#u)08P$AsPWmFIj*uU)%%>yT1U0@r!Lj{Z&G e3d^kxW<(yUxvaLROZ%Ly!J;k=1~kn4|0Vzx<5aHz diff --git a/html/image/freebtn1-ll.gif b/html/image/freebtn1-ll.gif deleted file mode 100644 index beaaaf2dc8483814580f6745636b8bd6c67ffaf3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1541 zcmbu4YdF&j9LN8=9l{ecBObR+QPIs>a?cZT*G-#y?w839-OiMeh~u^<)|8C)$aTV8 zjwcC+nC3Q@q3CjKODztKIAUkcb6)hm@9*X3`}sc4PdX`m2dKC>Iy(X&5D0LR9U$ET zG)~5c1ziaX)ek1=+r@-LMqLVvCta4l22O6*ek$7|KQ*u|OFIC#JfI7pAs{pWhJzq* zkhB}n0st^X_Qem`0sBP`DlcOOD%%VI!M64P3J@p=ETe!tTor*-LmS9SyJSdK`XMl| zoIG?}hs$&TEDPj+DqDlXenG%h0Xa1!3XPFY14=R%42Qr0Ti~*;W(ThItAdUBNW>|a zQnp|2tJ?AYAn|OmglBzpU6+V(sYaFc9=S5?+b}#&;(M~6X0>n*WHsG-sB_lZ(i8Xk zMe~`=JfiZio>~qnj@L-y%>gu*Ck4u;coXT2D{R|xF(=p8k70%~ocLYBaOS0_ed`gm z#T25Q=gj{qx;bp;YqZWbwesvLD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=(H;YS zQFmvMAAQeT0v0`XBL{Vgk~y7Q74}5P&g$9E&zZi{Qh>s}ael6HQ(I4O#bWxMel4_d zw6n*7eg_1lVb#ZG!@R2+_eFs@(JfY8QebVE78&PHj9^VR6zXa@8PHkh`@1=s{9dm1 z@acguf100F!@9!--Agol=(k&7Mf-dQuZZh;<E_1-><`8s7@hbgmh1E?HC)il^XoE( zdbvAPo=_&z)z*u7$MAIodz4-+xwO7}m2x*a(7!s-w2D)+8=2QYXP}kL8e9@J4BbdW W)C_z@=;P=B$|>e>;2{b_I`uF48j!aD diff --git a/html/image/freebtn1.gif b/html/image/freebtn1.gif deleted file mode 100644 index 4fd820d41efae8697e2635953ed289e8e78753ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2454 zcmWlYdpwl+0>;NBA!|oR5tfN|Q*M*oiak{1(qaxyZEBB+TC=Emvz^$ed2=1H-U%%y z)=X3;wDV?@yP4=1nw%M3uqyL1<Pv^Aw@}u5?DKg(-_P^M^LhSzeEko*xt?NDwo{fU z6p|zzqQwpf?tqBt31WJp*b~7$lf)Kmi3LkeWh<x&3TmQ~#*)xjN(YvLhDbbF5>K{* z&XIT`N(Y2+-~c*8cwQj95OD-c9Fc%CIpW}GsTWJ>g(!m&1tUSuNE&0ZB+;=7Hljch zl^hO1MF|ToLCXXVD4-PrheAllfM+W3<N|sHpbLQ)Dvm(K2r3TFlmv4njGrY8t~>&h zMDW%v_xc$GXM<o2dKH0S9tbW53=BqO!ia3h-~k379OFT+^$`K|s)xa17*P%)gn%K0 z5kkno0YeNTaKJ2-GmGTxQaQqxC#9&6B8Uj&h(N)qP;i6_W))xxAzK8QIAAverWmqu z$gYQ+3WziTqz)ot$f<=4DPTw;qZ3AS!w3b*lmNC2Fr|>)4w-#`*+;VbAR+~b3~;&u zB87+ya-Kj=Cqxv0^Bi#c*9kcU;EciatO1NK;qjDL(?&5KfmX=TN(ClTV7P);r{vWu z`Hf1f0-`u96ac;m@^B~+Dn#{)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(wG{%ty8jvF<N^Xz0!4TX&W4whfGIk8(r%c?wn)&aO9M3=)UT( zJ2rPFOfQCKx;DSOdsaJ!akVj{%w$m*YaC<xi$q<EMo_*OZL^xnq9R|Y48FtF_2cNN z8dRc6!x*J>1oYP2T&!jVR)zNk^x{`;P&O1j)<YN@?45><O{*r|au4YF#68yakUakE z95c1e<O9wPtd2C2^>;X4#NGN2Y<Vc)`kEawQ-x~R7yTp0mtMB%q#|YOZ(iXxMIRmt z1MkNilMVDXZmqq&#m=Y^=N|r%dT5)fbL!wokN$bO%J{#u4lDB^?y$*HeP`fr@rANC z?;I2ApU^V)Ag^=xPyb@AqGs+b>dBe8wA4g=CQ6hZ8Jx>4Z2BKH(=8+NZDyR0`3#zw mJa$C+abT%+xm$E))>OIlsL+z4kE0vEA=FKcx2vg9-2V@%y+R29 diff --git a/html/image/freebtn2.gif b/html/image/freebtn2.gif deleted file mode 100644 index 231587c5144b6c99e7bbf0b5e620cf0f6d10bfe1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1972 zcmX|=Z%|Wb7RG~OVF`6`bSqUV5txliFwsy&!6t|mFrkUs(b=w=sEdSgI=Lb%Ah@}L zLXg;d(Ym^$k`SQ;*^-D_(1`bft_lCl1zbZx$OX}W1>cu|g<9lp_RF3*^PA_xd7e2l zXHH`B_LxlvlUSd!+$<KuF#I%vk68E!A;=;G*@OtOh;oTgH5saM1gWW@EGj75#Zi$Q zm5Z;UI0z|Hks>uE(2yd;#Ybqq1_%&Zlu3&bLZKoQSr(;+kfqtgDwh~>$q-7O<&fvP zl`1mrD5XXyB-^FY&_O62s--zafR6&sWx&4-1sD(&0Ff35s(`=*#3-Ra2?Ql%MWjqi z%FmN>twVv43f$Wc@p&LC0Wu7VuK*biWLJS4gNh=kD1mYu$n{_^4#nOO0~9wv837eH zfWidiCa5q$xdq4xps)btWry;LLtW-T^p4#8m&g@}7#xU!(o|6z6Q!&HN)uF@q0$1> z4}g+@Y7101Kur}ytN^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Zr|H>Iv= zjJYR?`sV2_iPu&q;Ws9QcSQG4BW%72`fLw6w?ybo(M>ijO&>np8fBdsVsCgDlT-42 zS;U*-f7Bb+R~pNba@s0(|7o+tcw2h2`f~oEM{Q9*z(w1G_6LP~z1r~j#i=hQ5{+{v zGOUDGZ!oI3=&X;u7C+h5QmYvYNHUtTyOO!qxd~hCxf4Ul++t&X0I!bps`Qx7f={p* zAs#oh4cQi)K0A@j?P{La7G=t=tEq!?w~iXEPilCa>k;>B8a4hkW3|OQ*zDD1zPkz+ zZ&6Jo3Fo(jfAvwKv~>FlP2M~$w}RYyj*I5a^C!HpbM>rdK1a{;wA9Z26lmw7*;@lv zSNZPxXvzP*VPdI|E!6r`err@6nIVb%(f^ldj<nu$r+cUD!&InDc#6#{M=v~C9Ers1 zV&=D8{BGUaZO8mLH%)b|Yi^CKKgz3l(e-Qp%?F>g&GpsX$<K<+Bl-gd&VX~%eYZx! zN+M6LDitq%to7d7whBKJT41@*#wUD*?d~RIPO`S*;?o>K)4oZ`XvOirrwFdyKCn6R z4v`WYc@J69E@&PJD+-v;J0#ug+ag>TzKJLHi|l?79JsMpRq%f5nct0$68@ghEoVFZ z3O-DC_k=x+a!LzM3CO@^U*8RK@4lX(VOi|s%=mxLTWzNbLoyl$31;?pJ?l4H;Rbs= zs?JXMY=9PRx-)qCTRdU;b8%C^9?QoWs`>0-l(k%bn%$}@nw?#V9gZ`yV=PU9{$#U{ zKYdo9D-TRddbI30!s7ABz$5YnYoiZ^<avV2MZ={FkHqCK+E3+wQj08zjF~8w>x@gP zlD=HCekXh1NOPFBTzAa>7{{aX6MnZ-ml)T)NF}|o%xQnJ;r_(=^gQ2n+Jm}dcM?`8 zBK)^M84NrU{Sre1D>#11_N~i2Si7n)=5gu5oZ*R5TvrjnO>WuojpxFpKz~;3e*vCy BRhR$( diff --git a/html/image/freebtn21.gif b/html/image/freebtn21.gif deleted file mode 100644 index d61503e15cc49df73063f0caa51d6c8661ea0be0..0000000000000000000000000000000000000000 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3qN=+$<-2c3t8jI_< zd1?}Z$3?Vg<t!uJYViM?Yi#G=pO_Kv4w$~%^;+@}L*X_A&6D4*>eu_IMP!b1rYc&o z+-M!|cs2gowUiUfr!6bPY?qR@wL7oY`xhO-H&NQw{^d{Yb!Rsh?fy;X-DQg{xgyw& g?D_bkKQ}qNJ4Hgj#{A%?R#$RoY|}Xu0f0CD4YTbhng9R* diff --git a/html/image/freebtn31.gif b/html/image/freebtn31.gif deleted file mode 100644 index 0c8ab75879e77363f78004c17323978ae3faf958..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2382 zcmWlYX;c%30)@jOn^htxjertF0a*k+sHg~uT0x{uv{ZOj$+&`w%|y^3S~CbCku3xA zO29$}qYx08F#<+}CL#i|B}mKmkPLzZp_0MJR_im5e&;*)ocrtky1@tb`)@ySoJ1wf zlSl@Gfef;J7!2P-%%DgXHGvhxV=^Kc43I$s0LEE>5yNK2vRUyUo67(|0N{c^BF|dD zBSY*JH*ZiOo=+ZcdkQ;9zza?XXnAa!1dK?Jj>rX$mR$x!3?PpMCI|Dx44#C^7J*zT z>q04;je>Ed01pGLg%COQrV}h8=fQ620$(8%1j8&LM3ae_3JFbtvIP(z&I1JyC=~HT zA|4F$#4t|@v1KT$1p`&^$u{(&`Z2o;<Ear&e?3>Lg4jV27$i#Ym2iC|Twe*#SHxpL zJSHRz62U<Qxk0GV2Z4Ptfsaz;iy=Xfgdq{rAQ1>HE+7m+*^hZrMsCHC!m20%3Z&PZ zORc+nr#3oA2_mHo1ZAKy8iFzrjEU5+5Csc;%tRH7vXnBK5@X2gk4x)LVoIPu#V%;P zqExX;8ZMN);-VU!;$?JI2j{Wox(fEuNPN_?AXO<trDSTK(6kDgx|#K&^^8glsx|DU z*Px~a(5eBAhOO;oYx~%mUQp8qYWjKFJ`h&}xCYSo0r((@Yk5R3K=kr(oTt};`Y|3P z7D0J1B$kL4MG&|Ifl*Xaj=~Bhf}#k9Axb6s1Va@{OsV9*<O|y1!j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rv z70JvCFI&ol!b?N{C_g$|9@$ZTr1(>~nIF}7tLC{|YT9@7Y8T3V65lNzHgUvpv+c5^ zW4h4Z+JV{1gpLPM@2q+q6hD|3E|_jSOwW*?f3>DDWQj*8-Rh9gcqN=!aoX)*f9ugX zx%gp)d&r@*@5w!D0^%$JhK94QkWW!$-#$Da(KgUiJ6DbIFYX!`Ue5Kb+k4FBsrhbv q^8j~Y?ulwyB`7#J_|~4QsJn0e)5eCuv7PfzHJO$1);46)uKxooQQ3h2 diff --git a/html/image/freebtn91.gif b/html/image/freebtn91.gif deleted file mode 100644 index dd35657b7e8d2ad5abe76fb0e53c75830de754ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2495 zcmWmDi(5<y0|xLjHC<%uoGw<|#W_>j+LCihD_zz(U4_vcxzsLpPHn_u8@GxtW>T3+ z(vXLCLqpM^ZAN!O(|x)y6Jd1Gq%w)FT1`v(+V}ZA@ALix@0zv2t2`saf$xE70GOMb z0|)?I1A<Ht*aQF(02mH}Y!C{8-~bpRAt(ZZH^FcO3`7CIegKRC0S*9iK#&VUF%TRN zBjE`0GlFhI5eh-0P;@tn#-nHghQ(mmZVZpX@x8cL!b&2BV8ybCc!CwrVjX3Xu_T#5 zQd|l+34nYMOa}oW00=?g3IGa0hzCKL5X^^RAq?ljfCvDJ08k79cLAUh0Hq*U4S-c3 zR0zS>VOR{o5*Vt6;QO#6A9cRu;3e?%$?`@D5i}1)B`8vgAomfZ5=Dzq^dX8?Vpu-v zljrSO?ulO_fLZ`(1wa`HDnLjELQN3V2Ek1*tbidU1S?@!jv%!N(uyDo6m3G#dK7(v zBF_*+i6XrS(u1N(1bvF4y$CwLpJSLDUD37zdx~L79P7d`6^^ +C&a72TkeJHBN zu(ued#<6!8uEy{I93R8*4><l2$2$ppgdn6iOTZ%jBuE~~PGOU|B(s3Ip=86B{4JZx zH?buYl}u3rDpoizmUD^2&E--OHg$vI6mYl|T;e%SXmDa24`>buQU$TP$nd6cQp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qM2aon20J+e<2f9wpSZJ52i~QK|9X*w>0{JFbj%*I9KC9oMb?5r_OZO!9~I6Gm$a zQW6?mqWTv66y0ZJ3i0%p)jUp4_|5FQ1m40wgt|+#l;O6Jy}#V$r81@{15OXk<S-F# z)AqdRNZFlVr(0fD4O2zj8+*6km8PPJeYe9a{b)KIS`e1JWZ}^!_stYdZxyA7W$)b{ zFMMgOmX%yhtuYQ>-}&^fPo?4@*I(nQRNHP!k8a2VtSFu6%O6r1BN2^DePsZRuC9<7 z7jgLOyWdz%SJv6`bUZ|c(aaXcu)5K~f~I4<c`MC`;Kfz6_KY5zu2LJ1#ouiO7ADH* z7pcbmjPqxAA$4Y1WQtuF(fe=b^ds$K$%*MZ?3vK(W=+&7FT~pX$mKel*F(W89@MDy peY7>uS!s%+Z(nS7oye_Oddjn{&*XpFI>h9zU=8z4Hk}Um{2!UugCPI_ diff --git a/html/image/glaslake1.jpg b/html/image/glaslake1.jpg deleted file mode 100644 index a10da8b25ef3cae64bc458971b2cff43317a10ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 995 zcmex=<NpH&0WUXCHwH#VMur3+WcYuZ!I^=Bjg6g+m4ls~os*M;i${c)hnt&6Qb?Fz zL{>^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<<Uft5x!pKI?*u)5A2qPyaCl5D|1TU|I zk)n*E5y{~HAqGJX204ZbW=16jCP7AKLB{__7^D~&7+Dz^kN^t<BNH<#8&FOZ<O>wQ z$ngIb0}nGJ1Cs!=08r<fhm7ftpP#y)knFs~bx`-%oS4-mv(g(ctF1{qI#=yn=z;?# zFT73Nmd+^k_q9uV_+t6_+fmu3?m)8@1Q-}un3#Y@!2u(apfIx#i-3ZXkqFQl4xr_X ztV}1TM!mkW(>r9NH}BcbPiHoqdHG(}Q)Lne*{1(E`}ImiPLA@~-cFS>`)2;+&V6U^ z+<hnR(RcA3dyl@;ub4Bv^AwQaJX!GO)EA(&l7bA(K!^+k1Q~@C!1ggSGTJj1vn_cy z)fuQ%9H<n@bs#N*3Ibq-Ody5RGopd2qy-pIeE|#=Lq|b_Mn$L>*zB1OM(^Cc+`J@H z<3o#+MvIf8K$pg%4p)f^d!T+fpnhNkAO|#~pn#%bV4|bKM_4G>D|)$XG#B0@BY03| z!fcNa1^?4)_UuTV%DvD4XjGGsXbv;4pi5AsqKn^=AWoNXZg!E!H~!qxw{JVKA#T!F zmKrOO%`T2U%Z>vL1jimY2n23Maq;^$gx+5%plt|riWE3(P`nIuih^Pw*cqU}5pZYa z;y-X_MwI69p2<KR5}+VL(ZB!<O^DAyVI=U7Z?4|bfR?~z9s7aGRRn+uhmnbm2_6BA z3>O6r9Tfu;CvN;G@KB*~A>79TF@-klv#({vE_-lgJNwcdwcdqR-;}Hc^fu%^kp0gf z&@AyGFY%$tKYyJw?N-e34VH(WTWzR3w@e|=aOUJR#+hgSnYShWx);%Gm?n7Ktx!#a zZF9+Si$nZ}+&&m?mdUcPF*q-oFSY3DgO`R8J6}l8Tf6g>^t_2XY<Uk~xKrwTz{Xnl a)Ww~X(zo3CrCnIMor^(=-LC5V|C<1Js~rdc diff --git a/html/image/glaslake2.jpg b/html/image/glaslake2.jpg deleted file mode 100644 index 981d077a836358517db619fa3587838fdd500320..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1028 zcmex=<NpH&0WUXCHwH#VMur3+WcYuZ!I^=Bjg6g+m4ls~os*M;i${c)hnt&6Qb?Fz zL{>^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<<Uft5x!pKI?*u)5A2qPyaCl5D|1TU|I zk)n*E5y{~HAqGJX204ZbW=16jCP7AKLB{__7^D~&n1POEWIzBWW)?<PHlUn1NCH`g zfsuiU`Ts2j9%djzfLVZnf$_UhwS{lx=li-6KUWIz+$lOQcdh-*)s>$%v=!}JZnN<8 zx|ye^To!B*Wpr7nsN+0g5iihOSpfznCXlU2b_xjt9i(I=05qKgD8b0ebo)xqZsDY3 zx=GjclAh@&eS;wLcU9k)?^!rEH8q7pP|4-t;rX-onf)#36k_q1sN~Wq+|K*s<L<hg zz1=f*c1LVQMr}3Q?17d`3NkPQAu<pUWE4^WTMTrRJ!9Jvb&EoGpi&7zi~tZ65`d^= z0;#<0weQuc??9C@0w6<Ce8gxd=-6nWSP1nHn?2K^gMv`7*sWK}(4Mcl<oR~DN%J{6 zI(nfJQc4CN>Vf7d07Hn81sFyMXEF*3C<Z=M_-L3o(GeC%_KF?uEq5-kuaMica<0PG zMWPAXj1i{}g~?BRF>7+0$fYH9%{==!x-=ZNv2N?;*>GBazBZ#!;O~&srjKIY7kcDc zUih`V@((|&W>V?f4>S}Uui(HD_|I@;_xak-+W#4B9yWY{h8v0pfsqe%k|8|Y1g2kX z%gC7hSmDBq7EnNA2|bVouzFDF2~24zn7ViKwS}CAqkzhlAzlV147i^eFA6F;J~RwW z+*tUrapFO^uLa6o<_lh*e%WkG*Qtr_`L`x65?9rTnX=S#i^>(5S)V8S6=nGOYM$Jx zvN&p6$n21^wcgC_+te3|Z&<Ldr9?F$YeU$K*$embyx4zWk58Q3%;?9}$*WmoL^o8l zui=%xaO#6_=QZwvFyoJV4VO-qw!WRYYquTilA_w=iCh23^twDrVpqE`*`dg`$$x{V Wm&^QuiEk#^Do>1Miean&e-i+?KP=J! diff --git a/html/image/load.gif b/html/image/load.gif new file mode 100644 index 0000000000000000000000000000000000000000..16278c05e8fa42bfe6c1b69dd5574f5b3f7de30a GIT binary patch literal 563 zcmZ?wbhEHb{J>zq(7?#hGv_}LDE{a6a}5c0b_{Se(lcOYWME)W{3q&Ml$uzQnxasi zS(2d;l98(5?&%xAp!k!8QHX(&K?kUa0b~jT(~+M3m8akGFP^jIR`=$6dw%n`J@T0L ztaI6`Q`_EgAOGZY{af#I?E~Nc@xOW5b|m^khmO{Cy(OQI_jq}q*GlL*TeQZ1?RV>k zRtKMKa++hZ`s9npzuxAuKm4*%CgQyQ`+&Xi$De;T&k#A`++mSiG2_OKEiWW?GHXU= zZmLLKsoAvi<<E;hHCG8*Wkm&6t>T)v>(#CczqGOitba#k@9vsiz3a5~tKYvRb@q71 z<W%<PtlabF#v2)3Ti@8++TOWq_ny7`_Ajs8yl9}0VIH$&U}KPAPy~8Rss)F~xI_`k XLr7DePnz;B(v&YDP5C~elv@J;_s;T- literal 0 HcmV?d00001 diff --git a/html/image/loading.gif b/html/image/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..ac06a66bd2e8c2bd6d40cd36ebcf2b5c257c8f22 GIT binary patch literal 12043 zcmcKAXH*l)x;OB2LMUPg5D*m*5fBj+kfsI{1f(}9N=J&6NUxI6doQ8)j)3$QdY9f2 zrAe=1L9pNryPUJ`J?HNGuC?FuC5vP&zRW!HoBuO24`ii<MGP|lXh0?aK*<#Q<Kzb= zTL}OFVEsj*D5b7;PeNJh1}`5Nc>2>Zgd7F{0(eM&15W=106GedD15zpCOf6-O-SW@ z)Auv}%QEq6L3vyKHG332Hz+3#ci)Oe?mO+j7xWg)7_PgwW#^q&$z=ja8{ROI^Se<A zDh4Hg;b>Lo_kR4&f6~;+t#`K}bq$<!XS%)KvE#{gx@m?FS88jWX5x?NdlSrN0@1U6 z32-49r@lN3ZIQm?O;?S}-=MiOf&Q-j!g8~g-*iN~Mcp+iHj2L0ZPl4SyV5K6Bl+Cb zO}XjG;>T6OtKzbZsUC8kR)Z<Ku$NRiKf}%|7F)^dZBy+$uzaCQ?JAYydy`%NqQEbE zud4Kk7J*9{t#}9plXxIsX1gEdIZ+Qde^#eI^xq7IHzmFA>F8a^Aq^vG3@MpHDKDIk zB=`i~@b-kSU$&Siygk_X%YZZ7#KH&)$l-1*x{e)kPyqU}to+#fbR!un13q%-HMt>U zC3;u*iLE8zPMKCH|Dz4J7MV383~%z~wa<W;yp?m?@RT1m)05!^87%0}zraupkP!k5 z2@DE^ng<7m+Jy&2(gZ|9V$Z}!CsHSer&6UyxZd%Q6ZO#W0|vm#$|29=Amy(rld5Yp z>e3o&D#99@+8f)VI(jHoV9*!CUT!5|jo?n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S literal 0 HcmV?d00001 diff --git a/html/image/select1.gif b/html/image/select1.gif new file mode 100644 index 0000000000000000000000000000000000000000..6d7b844b19a30f788723c51b89d610a9a9a0b08f GIT binary patch literal 74 zcmZ?wbhEHb<Y3@nXkcXc&%p5i|9{1Qg3d*$i6yBi3gww484B*6z5xu1KUo;L7#JCJ b7=QqzoPmj_hjCfQ>A&-4ZHbCzV6X-NE2I?~ literal 0 HcmV?d00001 diff --git a/html/image/select1.png b/html/image/select1.png deleted file mode 100644 index 20d3adeb5a629f6336d6b339d726640e7d387a67..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 96 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq>Ygr+Are!Q6C9ZSOG^CvpPule tU*}kdPN&*Ij_?M(&NUr^)1M?TF+|35{`-Bo;0sU-gQu&X%Q~loCIEQ19X|j7 diff --git a/html/image/select2.gif b/html/image/select2.gif new file mode 100644 index 0000000000000000000000000000000000000000..104e718bd90c2c5d0b6b07592021fe916d8d3288 GIT binary patch literal 74 zcmZ?wbhEHb<Y3@nXkcXc&%p5i|9{1Qg3d*$i6yBi3gww484B*6z5xu1KUo;L7#JCJ a7=QqzoPmj_r++2;TUj|1{j;fD4AuZ2gcFDW literal 0 HcmV?d00001 diff --git a/html/image/select2.png b/html/image/select2.png deleted file mode 100644 index d3910f2a8f56e83d9b0ada917118050837c8a913..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq`kpS1Are!Q6Bbw|{5gN%gZz3X zHXw-Ul8}^;kW7>*aqS5>tMR~|`Eb2cSP}!n_B76aSx2P3fLa+mUHx3vIVCg!0Oh(H A;{X5v diff --git a/html/image/up.gif b/html/image/up.gif new file mode 100644 index 0000000000000000000000000000000000000000..3c39716c39438a2947f5888aa5818cc6deb48ac3 GIT binary patch literal 74 zcmZ?wbhEHb<Y3@nXkcVuU}*UN|G(ltLFb~>#FEq$h4Rdj3<Y;j-v9>1pDc`A42%pq cKt({s91ILhJUxudI!^zcH)~5&Gy{V*01ROin*aa+ literal 0 HcmV?d00001 diff --git a/html/image/up.png b/html/image/up.png deleted file mode 100644 index da1416a9c09b9f206da8a2b333402fa8043f9d65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqN}eu`Are!Q6C4<M|0_x`N(8C~ niWn<tI!t%bNIIfxS;4^Y^*=|WPVhD<plSwBS3j3^P6<r_9jX+` diff --git a/html/import.php b/html/import.php index bb349456e..786bcf236 100644 --- a/html/import.php +++ b/html/import.php @@ -26,14 +26,12 @@ 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('class_database.php'); require_once('class_dossier.php'); $gDossier=dossier::id(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include ('class_user.php'); $User=new User($cn); @@ -90,9 +88,23 @@ if ( isset ($_GET["action"]) ) { if ($action == "transfer" ) { echo '<DIV class="u_redcontent">'; - echo '<span class="notice"> Seulement les opérations de la période par défaut (voir préférence) seront transfèrées</span><hr>'; + /* show the possible period */ + $default_period=$User->get_periode(); + $ip=new IPeriod('period'); + $ip->filter_year=true; + $ip->user=$User; + $ip->value=(isset($_GET['period']))?$_GET['period']:$default_period; + $ip->cn=$cn; + $ip->type=OPEN; + $ip->javascript="onchange=submit(this)"; + echo '<form method="get" action="import.php" >'; + echo dossier::hidden().HtmlInput::phpsessid(); + echo HtmlInput::hidden('action','transfer'); + echo _('Choississez la période à transfèrer'); + echo $ip->input(); + echo '</form>'; // TransferCSV($cn, - ConfirmTransfert($cn,$User->get_periode()); + ConfirmTransfert($cn,$ip->value); echo "</DIV>"; } } diff --git a/html/index.php b/html/index.php index 30bda30aa..3dea94e73 100644 --- a/html/index.php +++ b/html/index.php @@ -1,10 +1,13 @@ - <?php /*! \file * \brief default page where user access */ /*! \mainpage PhpCompta + * Documentation + * - \subpage Francais + * - \subpage English * + *\page Francais * \section intro_sec Introduction * * Cette partie contient de la documentation pour les développeurs. @@ -37,7 +40,7 @@ * <li>Global -> function pour lire toute la doc sur les fonctions</li> * <li>Regarder dans dossier1.html et account_repository.html pour la doc des base de données *</ul> - * et il ne faut connaître que 7 tags + * et il ne faut connaître que ces tags * <ul> * <li> \\file en début de fichier</li> * <li> \\todo ajouter un todo </li> @@ -45,7 +48,62 @@ * <li> \\param pour commenter le paramètre d'une fonction</li> * <li> \\brief Commentaire du fichier, de la fonction ou de la classe</li> * <li> \\note des notes, des exemples</li> + * <li> \\throw or exception is a function can throw an exception + * <li> \\par to create a new paragraph * <li> \\return ce que la fonction retourne</li> + * <li> \\code et \\endcode si on veut donner un morceau de code comme documentation</li> + * <li> \\verbatim et \\endverbatim si on veut donner une description d'un tableau, comme documentation</li> + *<li> \\see xxxx Ajoute un lien vers un fichier, une fonction ou une classe </li> + * </ul> + *---------------------------------------------------------------------- + *\page English + * \section intro_sec Introduction + * + * This parts contains documentation for developpers + * + * \section convention_code Coding convention + * <p> + * Some coding conventions to have a homogene code + * <ol> + * <li>Reuse the existing code , </li> + * <li>Improve and check that the function is still working</li> + * <li>Make documentation thanks doxygen tag</li> + * <li>In the folder include: filenames ending by *.inc.php will be executer after being included</li> + * <li>Dans le répertoire include: Les noms de fichiers sont *.php pour les fichiers contenant des fonctions uniquement</li> + * <li>In the folder include: filenames end by *.php if they contains only function</li> + * <li>In the folder include: filenames starting with + * class_*.php if it is related to a class.</li> + * <li>In the folder include/template: files for the HTML presentation + * </li> + * <li>Use sql/upgrade.sql as temporary file to modify the database,this file will be the base for a SQL patch + * </li> + * <li>Write documentation </li> + * </ol> + * + * </p> + * \section advice Advices + * <p> + * Use this document, it is generated automatically by doxygen, check the documentation your made, read it first this + * documentation before making change + * <ul> + * <li>Related contains all the \\todo</li> + * <li>Global -> all the functions</li> + * <li>check into mod1.html and account_repository.html for the database design + *</ul> + * You need to know only this tags + * <ul> + * <li> \\file in the beginning of a file</li> + * <li> \\todo add a todo </li> + * <li> \\enum comment a variable</li> + * <li> \\param about the parameter of a function</li> + * <li> \\brief Documentation of the file, function or class</li> + * <li> \\note note exemple</li> + * <li> \\throw or exception is a function can throw an exception + * <li> \\par to create a new paragraph + * <li> \\return what the function returns</li> + * <li> \\code and \\endcode code snippet given as example</li> + * <li> \\verbatim and \\endverbatim if we want to keep the formatting without transformation</li> + *<li> \\see xxxx create a link to the file, function or object xxxx </li> * </ul> */ @@ -84,7 +142,7 @@ BODY { </style> <script src="js/scripts.js" type="text/javascript"></script> </head> -<BODY onLoad="SetFocus(\'login\',0)">'; +<BODY onLoad="SetFocus(\'p_user\')">'; $my_domain=""; require ('config.inc.php'); if ( strlen(domaine) > 0 ) { @@ -93,7 +151,7 @@ if ( strlen(domaine) > 0 ) { echo ' <span style="background-color:#879ed4;color:white;padding-left:4px;padding-right:4px;"> -version 4.3.build SVNINFO - '.$my_domain.' +version 5.0.build SVNINFO - '.$my_domain.' </span> <BR> <BR> @@ -125,6 +183,9 @@ version 4.3.build SVNINFO - '.$my_domain.' </TD></TR></TABLE> </form> </Center> +<div style="position:fixed;bottom:5em;border:1px solid red;text-align:right;width:20em;"> +<span style="display:block">Pour une meilleure expérience web, nous vous conseillons <a href="http://www.mozilla.com/fr/">firefox</a></span> +<span style="display:block">For a better web experience, we recommend you <a href="http://www.mozilla.com/en/">firefox</a></span> </body> </html>'; diff --git a/html/jrn_csv.php b/html/jrn_csv.php index 9c690a9e8..94836b9b9 100644 --- a/html/jrn_csv.php +++ b/html/jrn_csv.php @@ -30,10 +30,9 @@ require_once('class_own.php'); require_once('class_dossier.php'); $gDossier=dossier::id(); -include_once ("postgres.php"); -include_once("check_priv.php"); +require_once('class_database.php'); require_once("class_acc_ledger.php"); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); require_once ('class_user.php'); @@ -101,7 +100,7 @@ if ( $_GET['p_simple'] == 0 ) '"montant";'. "\r\n"); // set a filter for the FIN - $a_parm_code=get_array($cn,"select p_value from parm_code where p_code in ('BANQUE','COMPTE_COURANT','CAISSE')"); + $a_parm_code=$cn->get_array("select p_value from parm_code where p_code in ('BANQUE','COMPTE_COURANT','CAISSE')"); $sql_fin="("; $or=""; foreach ($a_parm_code as $code) { @@ -122,7 +121,7 @@ if ( $_GET['p_simple'] == 0 ) // the credit must be negative and written in red // Get the jrn type if ( $line['jrn_def_type'] == 'FIN' ) { - $positive = CountSql($cn,"select * from jrn inner join jrnx on jr_grpt_id=j_grpt ". + $positive = $cn->count_sql("select * from jrn inner join jrnx on jr_grpt_id=j_grpt ". " where jr_id=".$line['jr_id']." and $sql_fin ". " and j_debit='f'"); @@ -145,7 +144,7 @@ if ( $_GET['p_simple'] == 0 ) $col_tva=""; if ( $own->MY_TVA_USE=='Y') { - $a_Tva=get_array($cn,"select tva_id,tva_label from tva_rate where tva_rate != 0.0000 order by tva_rate"); + $a_Tva=$cn->get_array("select tva_id,tva_label from tva_rate where tva_rate != 0.0000 order by tva_rate"); foreach($a_Tva as $line_tva) { $col_tva.='"Tva '.$line_tva['tva_label'].'";'; diff --git a/html/jrn_pdf.php b/html/jrn_pdf.php index 89b643006..61587f440 100644 --- a/html/jrn_pdf.php +++ b/html/jrn_pdf.php @@ -24,8 +24,6 @@ /*! \file * \brief Send a ledger in a pdf format * - *\todo for the pdf, which doesn't support unicode you must - translate all the string to latin-1 with the utf8-decode function */ require_once('class_dossier.php'); @@ -34,18 +32,19 @@ $gDossier=dossier::id(); include_once('class_user.php'); include_once("jrn.php"); include_once("ac_common.php"); -include_once("postgres.php"); +require_once('class_database.php'); include_once("class.ezpdf.php"); include_once("impress_inc.php"); -include_once("preference.php"); include_once("class_acc_ledger.php"); -include_once("check_priv.php"); require_once ('header_print.php'); require_once('class_own.php'); +require_once('class_periode.php'); +$cn=new Database($gDossier); +$periode=new Periode($cn); echo_debug('jrn_pdf.php',__LINE__,"imp pdf journaux"); -$cn=DbConnect($gDossier); + $l_type="JRN"; $centr=" Non centralisé"; $l_centr=0; @@ -98,15 +97,13 @@ if ( $Jrn->id==0 || $jrn_type=='FIN' || $jrn_type=='ODS' || $_REQUEST['p_simple if ( $a_jrn==null) break; $offset+=$step; $first_id=$a_jrn[0]['int_j_id']; - $Exercice=get_exercice($cn,$a_jrn[0]['periode']); + $Exercice=$periode->get_exercice($a_jrn[0]['periode']); list($rap_deb,$rap_cred)=get_rappel($cn,$first_id,$Jrn->id,$Exercice,FIRST, $filter, $l_centr ); - echo_debug('jrn_pdf.php',__LINE__,"MONTANT $rap_deb,$rap_cred"); - echo_debug('jrn_pdf.php',__LINE__," list($rap_deb,$rap_cred)=get_rappel($cn,$first_id,".$Jrn->id.",$Exercice,FIRST)"); $pdf->ezText(utf8_decode($Jrn->name),30); if ( $l_centr == 1 ) { @@ -143,7 +140,7 @@ if ( $Jrn->id==0 || $jrn_type=='FIN' || $jrn_type=='ODS' || $_REQUEST['p_simple $count=count($a_jrn)-1; $last_id=$a_jrn[$count]['int_j_id']; - $Exercice=get_exercice($cn,$a_jrn[$count]['periode']); + $Exercice=$periode->get_exercice($a_jrn[$count]['periode']); if ( $l_centr == 1) { // Montant de rappel si centralisé list($rap_deb,$rap_cred)=get_rappel($cn,$last_id,$Jrn->id,$Exercice,LAST,$filter,$l_centr); @@ -168,7 +165,7 @@ if ( $Jrn->id==0 || $jrn_type=='FIN' || $jrn_type=='ODS' || $_REQUEST['p_simple 'cred'=> array('justification'=>'right'))),true); $count=count($a_jrn)-1; $last_id=$a_jrn[$count]['int_j_id']; - $Exercice=get_exercice($cn,$a_jrn[$count]['periode']); + $Exercice=$periode->get_exercice($a_jrn[$count]['periode']); list($rap_deb,$rap_cred)=get_rappel($cn,$last_id,$Jrn->id,$Exercice,LAST,$filter,$l_centr); $str_debit=utf8_decode(sprintf( "à reporter Débit % 10.2f",$rap_deb)); @@ -195,7 +192,7 @@ if ( ($jrn_type=='ACH' || $jrn_type=='VEN' ) && $_REQUEST['p_simple']== 1 ) header_pdf($cn,$pdf); $offset=0;$limit=30;$step=30; - $a_Tva=get_array($cn,"select tva_id,tva_label,tva_poste from tva_rate where tva_rate != 0.0000 order by tva_id"); + $a_Tva=$cn->get_array("select tva_id,tva_label,tva_poste from tva_rate where tva_rate != 0.0000 order by tva_id"); $col_tva="TVA "; $space=0; $total_HTVA=0.0; diff --git a/html/jrn_search.php b/html/jrn_search.php index b240f43e1..931479428 100644 --- a/html/jrn_search.php +++ b/html/jrn_search.php @@ -23,11 +23,12 @@ */ require_once ("ac_common.php"); -require_once ("postgres.php"); +require_once('class_database.php'); require_once("user_common.php"); /* Admin. Dossier */ -$rep=DbConnect(); +$rep=new Database(); include_once ("class_user.php"); +require_once('class_html_input.php'); $User=new User($rep); $User->Check(); @@ -38,7 +39,7 @@ require_once('class_dossier.php'); $gDossier=dossier::id(); // Javascript -echo JS_CONCERNED_OP; +echo JS_LEDGER; if ( isset( $p_jrn )) { $p_jrn=$p_jrn; $_SESSION[ "p_jrn"]=$p_jrn; @@ -59,7 +60,7 @@ $c_internal=""; $c_date=""; $condition=""; $part=" where "; -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); // if search then build the condition if ( isset ($_GET["search"]) ) { $c1=0; @@ -148,7 +149,7 @@ echo '<TD> <INPUT TYPE="text" name="p_internal" VALUE="'.$p_internal.'"></TD>'; echo "</TR>"; echo '</TABLE>'; -echo '<INPUT TYPE="submit" name="search" value="cherche">'; +echo HtmlInput::submit('search','cherche'); echo '<input type="button" name="update_concerned" value="Mise à jour des réconciliation" onClick="updateJrn(\''.$p_ctl.'\')">'; echo '</FORM>'; echo '<div class="content">'; @@ -165,9 +166,9 @@ if ( isset ($_GET["search"]) ) { jrn on jr_grpt_id=j_grpt inner join tmp_pcmn on j_poste=pcm_val ". $jnt. $condition." order by jr_date,jr_id,j_debit desc"; - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); - $MaxLine=pg_NumRows($Res); + $MaxLine=Database::num_row($Res); $offset=(isset($_GET['offset']))?$_GET['offset']:0; $limit=$_SESSION['g_pagesize']; $sql_limit=""; @@ -185,12 +186,12 @@ if ( isset ($_GET["search"]) ) { html_page_stop(); return; } - $Res=ExecSql($cn,$sql); - $MaxLine=pg_NumRows($Res); + $Res=$cn->exec_sql($sql); + $MaxLine=Database::num_row($Res); $col_vide="<TD></TD>"; echo '<form id="form_jrn_concerned">'; - echo widget::hidden('nb_item',$MaxLine); + echo HtmlInput::hidden('nb_item',$MaxLine); echo $bar; echo '<TABLE ALIGN="center" BORDER="0" CELLSPACING="O" width="100%">'; $l_id=""; @@ -200,7 +201,7 @@ echo '<form id="form_jrn_concerned">'; // return; // } for ( $i=0; $i < $MaxLine; $i++) { - $l_line=pg_fetch_array($Res,$i); + $l_line=Database::fetch_array($Res,$i); if ( $l_id == $l_line['j_grpt'] ) { echo $col_vide.$col_vide; } else { diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js new file mode 100644 index 000000000..6a51bd000 --- /dev/null +++ b/html/js/acc_ledger.js @@ -0,0 +1,469 @@ +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 2546 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief javascript script for the ledger in accountancy, + * compute the sum, add a row at the table.. + * + */ + +/** +* @brief update the list of available predefined operation when we change the ledger. +*/ +function update_predef(p_type,p_direct) { + var jrn=g("p_jrn").value; + var phpsessid=g("phpsessid").value; + var dossier=g("gDossier").value; + var querystring='?PHPSESSID='+phpsessid+'&gDossier='+dossier+'&l='+jrn+'&t='+p_type+'&d='+p_direct; + g("p_jrn_predef").value=jrn; + var action=new Ajax.Request( + "get_predef.php", + { + method:'get', + parameters:querystring, + onFailure:error_get_predef, + onSuccess:success_get_predef + } + ); +} +/** + * @brief update the field predef + */ +function success_get_predef(request,json) { + var i=0; + var answer=request.responseText.evalJSON(true); + obj=g("pre_def"); + obj.innerHTML=''; + if ( answer.count == 0 ) return; + + for ( i = 0 ; i < answer.count;i++) { + value=answer['value'+i]; + label=answer['label'+i]; + obj.options[obj.options.length]=new Option(label,value); + } + +} +/** + * @brief update the field predef + */ +function error_get_predef(request,json) { + alert ("Erreur mise à jour champs non possible"); + +} +/** +* @brief update the list of available predefined operation when we change the ledger. +*/ +function update_pj() { + var jrn=g("p_jrn").value; + var phpsessid=g("phpsessid").value; + var dossier=g("gDossier").value; + var querystring='?PHPSESSID='+phpsessid+'&gDossier='+dossier+'&l='+jrn; + var action=new Ajax.Request( + "get_pj.php", + { + method:'get', + parameters:querystring, + onFailure:error_get_pj, + onSuccess:success_get_pj + } + ); +} +/** + * @brief update the field predef + */ +function success_get_pj(request,json) { + + var answer=request.responseText.evalJSON(true); + obj=g("e_pj"); + obj.value=''; + if ( answer.count == 0 ) return; + obj.value=answer.pj; + g("e_pj_suggest").value=answer.pj; +} +/** + * @brief update the field predef + */ +function error_get_pj(request,json) { + alert("Ajax a echoue"); +} + +/** + * @brief add a line in the form for the ledger fin + */ +function ledger_fin_add_row(){ + var style='class="input_text"'; + var mytable=g("fin_item").tBodies[0]; + var line=mytable.rows.length; + var row=mytable.insertRow(line); + var phpsessid=g("phpsessid"); + var nb=g("nb_item"); + var rowToCopy=mytable.rows[1]; + var nNumberCell=rowToCopy.cells.length; + for ( var e=0;e < nNumberCell;e++) { + var newCell=row.insertCell(e); + var tt=rowToCopy.cells[e].innerHTML; + var new_tt=tt.replace(/e_other0/g,"e_other"+nb.value); + new_tt=new_tt.replace(/e_other0_comment/g,"e_other"+nb.value+'_comment'); + new_tt=new_tt.replace(/e_other0_amount/g,"e_other"+nb.value+'_amount'); + new_tt=new_tt.replace(/e_concerned0/g,"e_concerned"+nb.value); + new_tt=new_tt.replace(/e_other0_label/g,"e_other"+nb.value+'_label'); + newCell.innerHTML=new_tt; + new_tt.evalScripts(); + } + g("e_other"+nb.value).value=""; + g("e_other"+nb.value+'_amount').value="0"; + g("e_other"+nb.value+'_comment').value=""; + nb.value++; +} +/** + * @brief add a line in the form for the purchase ledger + */ +function ledger_add_row(){ + style='class="input_text"'; + var mytable=g("sold_item").tBodies[0]; + var ofirstRow=mytable.rows[1]; + var line=mytable.rows.length; + var nCell=9; + var row=mytable.insertRow(line); + var phpsessid=g("phpsessid"); + var nb=g("nb_item"); + for (var e=0;e<nCell;e++) { + var newCell=row.insertCell(e); + var tt=ofirstRow.cells[e].innerHTML; + var new_tt=tt.replace(/march0/g,"march"+nb.value); + new_tt=new_tt.replace(/quant0/g,"quant"+nb.value); + new_tt=new_tt.replace(/sold\(0\)/g,"sold("+nb.value+")"); + new_tt=new_tt.replace(/compute_ledger\(0\)/g,"compute_ledger("+nb.value+")"); + new_tt=new_tt.replace(/clean_tva\(0\)/g,"clean_tva("+nb.value+")"); + newCell.innerHTML=new_tt; + new_tt.evalScripts(); + } + + g("e_march"+nb.value+"_label").innerHTML=' '; + g("e_march"+nb.value+"_price").value='0'; + g("e_march"+nb.value).value=""; + g("e_quant"+nb.value).value="1"; + + nb.value++; + +new_tt.evalScripts(); + +} +/** + * @brief compute the sum of a purchase, update the span tvac, htva and tva + * all the needed data are taken from the document (hidden field : phpsessid and gdossier) + * @param the number of the changed ctrl + */ +function compute_ledger(p_ctl_nb) { + var phpsessid=g("phpsessid").value; + var dossier=g("gDossier").value; + var a=-1; + if ( document.getElementById("e_march"+p_ctl_nb+'_tva_amount')) { + a=trim(g("e_march"+p_ctl_nb+'_tva_amount').value); + g("e_march"+p_ctl_nb+'_tva_amount').value=a; + } + g("e_march"+p_ctl_nb).value=trim(g("e_march"+p_ctl_nb).value); + var qcode=g("e_march"+p_ctl_nb).value; + + if ( qcode.length == 0 ) { clean_ledger(p_ctl_nb);refresh_ledger();return;} + var tva_id=-1; + if ( g('e_march'+p_ctl_nb+'_tva_id') ) { + tva_id=g('e_march'+p_ctl_nb+'_tva_id').value; + } + + g('e_march'+p_ctl_nb+'_price').value=trim(g('e_march'+p_ctl_nb+'_price').value); + var price=g('e_march'+p_ctl_nb+'_price').value; + + g('e_quant'+p_ctl_nb).value=trim(g('e_quant'+p_ctl_nb).value); + var quantity=g('e_quant'+p_ctl_nb).value; + var querystring='?PHPSESSID='+phpsessid+'&gDossier='+dossier+'&c='+qcode+'&t='+tva_id+'&p='+price+'&q='+quantity+'&n='+p_ctl_nb; + $('sum').hide(); + var action=new Ajax.Request( + "compute.php", + { + method:'get', + parameters:querystring, + onFailure:error_compute_ledger, + onSuccess:success_compute_ledger + } + ); +} +/** +*@brief refresh the purchase screen, recompute vat, total... +*/ +function refresh_ledger() { + var tva=0; var htva=0;var tvac=0; + + for (var i=0;i<g("nb_item").value;i++) { + if( g('tva_march'+i)) tva+=g('tva_march'+i).value*1; + htva+=g('htva_march'+i).value*1; + tvac+=g('tvac_march'+i).value*1; + } + + if ( g('tva') ) g('tva').innerHTML=Math.round(tva*100)/100; + g('htva').innerHTML=Math.round(htva*100)/100; + if (g('tvac')) g('tvac').innerHTML=Math.round(tvac*100)/100; +} +/** + * @brief update the field htva, tva_id and tvac, callback function for compute_sold + * it the field TVA in the answer contains NA it means that VAT is appliable and then do not + * update the VAT field except htva_martc + */ +function success_compute_ledger(request,json) { + + var answer=request.responseText.evalJSON(true); + var ctl=answer.ctl; + var rtva=answer.tva; + var rhtva=answer.htva; + var rtvac=answer.tvac; + + if ( rtva == 'NA' ) { + var rhtva=answer.htva*1; + g('htva_march'+ctl).value=rhtva; + g('tvac_march'+ctl).value=rtvac; + g('sum').show(); + refresh_ledger(); + + return; + } + rtva=answer.tva*1; + + + + g('sum').show(); + if ( g('e_march'+ctl+'_tva_amount').value=="" || g('e_march'+ctl+'_tva_amount').value==0 ){ + g('tva_march'+ctl).value=rtva; + g('e_march'+ctl+'_tva_amount').value=rtva; + } + else { + g('tva_march'+ctl).value=g('e_march'+ctl+'_tva_amount').value; + } + g('htva_march'+ctl).value=Math.round(parseFloat(rhtva)*100)/100; + var tmp1=Math.round(parseFloat(g('htva_march'+ctl).value)*100)/100; + var tmp2=Math.round(parseFloat(g('tva_march'+ctl).value)*100)/100; + g('tvac_march'+ctl).value=Math.round((tmp1+tmp2)*100)/100; + + refresh_ledger(); +} + +/** + * @brief callback error function for compute_sold + */ +function error_compute_ledger(request,json) { + alert('Ajax does not work'); +} +function compute_all_ledger() { + var loop=0; + for (loop=0;loop<g("nb_item").value;loop++){ + compute_ledger(loop); + } + var tva=0; var htva=0;var tvac=0; + + for (var i=0;i<g("nb_item").value;i++) { + if ( g('tva_march') ) tva+=g('tva_march'+i).value*1; + htva+=g('htva_march'+i).value*1; + tvac+=g('tvac_march'+i).value*1; + } + + if ( g('tva') ) g('tva').innerHTML=Math.round(tva*100)/100; + g('htva').innerHTML=Math.round(htva*100)/100; + if (g('tvac'))g('tvac').innerHTML=Math.round(tvac*100)/100; + + +} + +function clean_tva(p_ctl) { +if ( g('e_march'+p_ctl+'_tva_amount') )g('e_march'+p_ctl+'_tva_amount').value=0; +} + +function clean_ledger( p_ctl_nb) +{ + if ( g("e_march"+p_ctl_nb) ) { g("e_march"+p_ctl_nb).value=trim(g("e_march"+p_ctl_nb).value); } + if (g('e_march'+p_ctl_nb+'_price')) { g('e_march'+p_ctl_nb+'_price').value='';} + if ( g('e_quant'+p_ctl_nb)) { g('e_quant'+p_ctl_nb).value='1'; } + if ( g('tva_march'+p_ctl_nb+'_show') ) { g('tva_march'+p_ctl_nb+'_show').value='0';} + if (g('tva_march'+p_ctl_nb)) { g('tva_march'+p_ctl_nb).value=0;} + if ( g('htva_march'+p_ctl_nb)) { g('htva_march'+p_ctl_nb).value=0;} + if ( g('tvac_march'+p_ctl_nb)) {g('tvac_march'+p_ctl_nb).value=0;} + +} +/** + * @brief add a line in the form for the quick_writing + */ +function quick_writing_add_row(){ + style='class="input_text"'; + var mytable=g("quick_item").tBodies[0]; + var nNumberRow=mytable.rows.length; + var oRow=mytable.insertRow(nNumberRow); + var rowToCopy=mytable.rows[1]; + var nNumberCell=rowToCopy.cells.length; + var phpsessid=g("phpsessid"); + var nb=g("nb_item"); + + var oNewRow = mytable.insertRow(nNumberRow); + for ( var e=0;e < nNumberCell;e++) { + var newCell=oRow.insertCell(e); + var tt=rowToCopy.cells[e].innerHTML; + new_tt=tt.replace(/qc_0/g,"qc_"+nb.value); + new_tt=new_tt.replace(/amount0/g,"amount"+nb.value); + new_tt=new_tt.replace(/poste0/g,"poste"+nb.value); + new_tt=new_tt.replace(/ck0/g,"ck"+nb.value); + new_tt=new_tt.replace(/ld0/g,"ld"+nb.value); + newCell.innerHTML=new_tt; + new_tt.evalScripts(); + } + $("qc_"+nb.value).value=""; + nb.value++; + +} +/*! \file + * \brief + * open a windows to confirm and cancel an operation + */ +function cancelOperation(p_value,p_sessid,p_dossier,p_jrn) + { + var win=window.open('annulation.php?p_jrn='+p_jrn+'&jrn_op='+p_value+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier,'Annule','toolbar=no,width=400,height=400,scrollbars=yes,resizable=yes'); + } +function RefreshMe() { +window.location.reload(); +} +/*! \brief this function search into the ledger + * \param p_sessid PHPSESSID + * \param p_ctl ctl name + * \param p_montant amount to search (if 0 get it from the e_other_amount + */ +function SearchJrn(p_sessid,p_dossier,p_ctl,p_montant,p_paid) + { + var url='jrn_search.php?p_ctl='+p_ctl+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier+'&'+p_paid; + + + if ( p_montant == 0 ) { + // compute amount name replace the number + num=p_ctl.replace("e_concerned",""); + + /* Get the amount */ + var ctl_montant_name="e_other"+num+"_amount"; + + if ( document.forms[0]) { + + for ( i=0; i < document.forms[0].length; i++) + { + var e=document.forms[0].elements[i]; + if ( e.name == ctl_montant_name ) { + p_montant=e.value; + break; + } + } + } + if ( p_montant == 0 && document.forms[1]) { + + for ( i=0; i < document.forms[1].length; i++) + { + var e=document.forms[1].elements[i]; + if ( e.name == ctl_montant_name ) { + p_montant=e.value; + break; + } + } + } + + } + + + if ( p_montant == 0 ) { + var win=window.open(url,'Cherche','toolbar=no,width=600,height=600,scrollbars=yes'); + + } else { + var win=window.open(url+'&search&p_montant='+p_montant+'&p_montant_sel=%3D','Cherche','toolbar=no,width=600,height=600,scrollbars=yes'); + } +} + +function updateJrn(p_ctl) { + var form=document.forms[1]; + + for (var e=0;e<form.elements.length;e++) { + var elmt=form.elements[e]; + if ( elmt.type == "checkbox") { + if (elmt.checked==true ) { + var str_name=elmt.name; + var nValue=str_name.replace("jr_concerned",""); + + set_inparent(p_ctl,nValue,1); + } + } + } + window.close(); +} + +function go_next_concerned() { + var form=document.forms[1]; + + for (var e=0;e<form.elements.length;e++) { + var elmt=form.elements[e]; + if ( elmt.type == "checkbox") { + if (elmt.checked==true ) { + return confirm("Si vous changez de page vous perdez les reconciliations, continuez ?"); + } + } + } +return true; +} + +/*!\brief + * \param p_value jrn.jr_id + * \param p_sessid PHPSESSID + * \param p_jrn ledger number + * \param p_vue easy or expert view of the operation + */ + +function modifyOperation(p_value,p_sessid,p_dossier,p_jrn,p_vue) + { + + var win=window.open('modify_op.php?action=update&p_jrn='+p_jrn+'&line='+p_value+'&PHPSESSID='+p_sessid+'&p_view='+p_vue+'&gDossier='+p_dossier,'','toolbar=no,width=720,height=510,scrollbars=yes,resizable=yes'); + win.focus(); + } + +/*!\brief + * \param p_value jrn.jr_id + * \param p_sessid PHPSESSID + */ + +function viewOperation(p_value,p_sessid,p_dossier) + { + var win=window.open('modify_op.php?action=view_ca&line='+p_value+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier,'','toolbar=no,width=690,height=410,scrollbars=yes,resizable=yes'); + win.focus(); + } +function dropLink(p_value,p_value2,p_sessid,p_dossier) { + var win=window.open('modify_op.php?action=delete&line='+p_value+'&line2='+p_value2+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier,'Liaison','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes'); + } +/** + *@brief this function is called before the querystring is send to the + * fid2.php, add a filter based on the ledger 'p_jrn' + *@param obj is the input field + *@param queryString is the queryString to modify + *@see ICard::input + */ +function filter_card(obj,queryString){ + jrn=$('p_jrn').value; + if ( jrn == -1 ) { type=$('ledger_type').value; queryString=queryString+'&type='+type;} + else { queryString=queryString+'&j='+jrn;} + return queryString; +} diff --git a/html/js/acc_report.js b/html/js/acc_report.js new file mode 100644 index 000000000..1f67dd4ff --- /dev/null +++ b/html/js/acc_report.js @@ -0,0 +1,83 @@ +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 2546 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief javascript script for the report (in accountancy) + * + */ +/** + * @brief add a line in the form for the report + * @param p_dossier dossier id to connect + * @param p_sessid session id + */ +function rapport_add_row(p_dossier,p_sessid){ + style='style="border: 1px solid blue;"'; + var table=$("rap1"); + var line=table.rows.length; + + var row=table.insertRow(line); + // left cell + var cellPos = row.insertCell(0); + cellPos.innerHTML='<input type="text" '+style+' size="3" id="pos'+line+'" name="pos'+line+'" value="'+line+'">'; + + // right cell + var cellName = row.insertCell(1); + cellName.innerHTML='<input type="text" '+style+' size="50" id="text'+line+'" name="text'+line+'">'; + + // Formula + var cellFormula = row.insertCell(2); + cellFormula.innerHTML='<input type="text" '+style+' size="35" id="form'+line+'" name="form'+line+'">'; + + // Search Button + var cellSearch = row.insertCell(3); + cellSearch.innerHTML='<input type="button" value="Recherche Poste" onclick="SearchPoste(\''+p_sessid+'\','+p_dossier+',\'form'+line+'\',\'\',\'poste\',\'N\')" class="inp"/>'; + +} + +/** + * @brief create a file to export a report + * @param p_sessid the Session id + * @param p_dossier the dossier id + */ +function report_export(p_sessid,p_dossier,p_fr_id) { + var queryString="?PHPSESSID="+p_sessid+"&gDossier="+p_dossier+"&f="+p_fr_id; + var action=new Ajax.Request( + "ajax_report.php", + { + method:'get', + parameters:queryString, + onSuccess:report_export_success + } + ); + +} +/** + * @brief callback function for exporting a report + * @param request object request + * @param json json answer + */ +function report_export_success(request,json) { + var answer = request.responseText.evalJSON(true); + var ok=answer.answer; + var link=answer.link; + $('export').hide(); + $('export_link').innerHTML='<a class="mtitle" href="'+link+'"> Cliquez ici pour télécharger le rapport</a>'; +} \ No newline at end of file diff --git a/html/js/accounting_item.js b/html/js/accounting_item.js new file mode 100644 index 000000000..dfe27b7d5 --- /dev/null +++ b/html/js/accounting_item.js @@ -0,0 +1,155 @@ +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*! \file + * \brief + * containing the javascript for opening a windows to search an account (poste comptable) + */ + +function set_poste_parent(p_ctl,p_value) { + var f=g(p_ctl); + f.value+='['+p_value+']'; +} + +function set_jrn_parent(p_ctl,p_value) { + var f=g(p_ctl); + if ( f ) { + if ( trim(f.value)!="") f.value+=' '; + f.value+=p_value; + } +} + + +function PcmnUpdate(p_value,p_lib,p_parent,p_type,p_sessid,p_dossier) + { + var win=window.open('line_update.php?l='+p_value+'&n='+p_lib+'&p='+p_parent+'&m'+p_type+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier,'Modifie','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes'); + } +/** + *@brief show the popup for search an accounting item + *@param object this, it must contains some attribute as + * - jrn if set and different to 0, will filter the accounting item for a + * ledger + * - account the tag which will contains the number + * - label the tag which will contains the label + * - bracket if the value must be surrounded by [ ] + * - query for the initial query + *\see ajax_poste.php + */ +function search_poste(obj) { + showIPopup(obj.ipopup); + var dossier=$('gDossier').value; + var phpsessid=$('phpsessid').value; + + var queryString="?gDossier="+dossier; + queryString+="&PHPSESSID="+phpsessid; + queryString+="&op=sf"; + + if ( obj.jrn) { queryString+="&j="+obj.jrn;} + if ( obj.account) { queryString+="&c="+obj.account;} + if ( obj.label) { queryString+="&l="+obj.label;} + if ( obj.bracket) { queryString+="&b="+obj.bracket;} + if( obj.noquery) {queryString+="&nq";} + if( obj.no_overwrite) {queryString+="&nover";} + if( obj.bracket) {queryString+="&bracket";} + if ( ! obj.noquery) { + if( obj.query) {queryString+="&q="+obj.query;} + else { + if ($(obj).account) { + var e=$(obj).account; + queryString+="&q="+$(e).value; + } + } + } + queryString+="&ctl="+obj.ipopup; + var action=new Ajax.Request ( 'ajax_poste.php', + { + method:'get', + parameters:queryString, + onFailure:errorPoste, + onSuccess:result_poste_search + } + ); +} +/** + *@brief when you submit the form for searching a accounting item + *@param obj form + *@note the same as search_poste, except it answer to a FORM and not + * to a click event + */ +function search_get_poste(obj) { + var dossier=$('gDossier').value; + var phpsessid=$('phpsessid').value; + + var queryString="?gDossier="+dossier; + queryString+="&PHPSESSID="+phpsessid; + queryString+="&op=sf"; + + if ( obj.elements['jrn'] ) { queryString+="&j="+$F('jrn');} + if ( obj.elements['account']) { queryString+="&c="+$F('account');} + if ( obj.elements['label']) { queryString+="&l="+$F('label');} + if( obj.elements['query']) {queryString+="&q="+$F('query');} + if (obj.ctl ) {queryString+="&ctl="+obj.ctl;} + if( obj.elements['nosearch']) {queryString+="&nq";} + if( obj.elements['nover']) {queryString+="&nover";} + if( obj.elements['bracket']) {queryString+="&bracket";} + + $('asearch').innerHTML="<image src='image/loading.gif' border='0'>"; + var action=new Ajax.Request ( 'ajax_poste.php', + { + method:'get', + parameters:queryString, + onFailure:errorPoste, + onSuccess:result_poste_search + } + ); +} + +/** + *@brief show the answer of ajax request + *@param answer in XML + */ +function result_poste_search(req) { + try{ + var answer=req.responseXML; + var a=answer.getElementsByTagName('ctl'); + if ( a.length == 0 ) { var rec=req.responseText;alert ('erreur :'+rec);} + var html=answer.getElementsByTagName('code'); + + var name_ctl=a[0].firstChild.nodeValue; + var nodeXml=html[0]; + var code_html=getNodeText(nodeXml); + code_html=unescape_xml(code_html); + $(name_ctl).innerHTML=code_html; + } + catch (e) { + alert(e.message);} + try{ + code_html.evalScripts();} + catch(e){ + alert("Impossible executer script de la reponse\n"+e.message);} + +} +/** +*@brief error for ajax +*/ +function errorPoste() { + alert('Ajax failed'); +} \ No newline at end of file diff --git a/html/js/ajax_fiche.js b/html/js/ajax_fiche.js index 746e7a704..6ad68f584 100644 --- a/html/js/ajax_fiche.js +++ b/html/js/ajax_fiche.js @@ -25,56 +25,57 @@ * */ -/*!\brief this function fills the data from fid.php, - * \param p_ctl the ctrl to fill - * \param p_deb if debit of credit - * \param p_jrn the ledger - */ -function trim(s) { - return s.replace(/^\s+/, '').replace(/\s+$/, ''); -} /*!\brief clean the row (the label, price and vat) * \param p_ctl the calling ctrl */ function clean_Fid(p_ctl) { nSell=p_ctl+"_price"; + nTvaAmount=p_ctl+"_tva_amount"; nBuy=p_ctl+"_price"; nTva_id=p_ctl+"_tva_id"; if ( $(nSell) ) { $(nSell).value=""; } if ( $(nBuy) ) { $(nBuy).value="";} if ( $(nTva_id) ) { $(nTva_id).value="-1"; } - + if ( $(nTvaAmount)) {$(nTvaAmount).value=0;} } function errorFid(request,json) { alert('erreur : ajax fiche'); } /*!\brief this function fills the data from fid.php, - * \param p_ctl the ctrl to fill - * \param p_deb if debit of credit - * \param p_jrn the ledger - * \param phpsessid - *\param p_caller id of the caller - *\param p_extra extra parameter, change depends of the caller + * \param p_ctl object : field of the input, + * possible object member + * - label field to update with the card's name + * - price field to update with the card's price + * - tvaid field to update with the card's tva_id + * - jrn field to force the ledger + *\see successFid errorFid fid.php */ -function ajaxFid(p_ctl,p_deb,phpsessid,p_caller,p_extra) +function ajaxFid(p_ctl) { var gDossier=$('gDossier').value; - var ctl_value=trim($(p_ctl).value); - $(p_ctl).value=ctl_value; - var p_jrn=$('p_jrn').value; - if ( trim(ctl_value)==0 ) { - nLabel=p_ctl+"_label"; - if ($(nLabel) ){$(nLabel).value="";} + var phpsessid=$('phpsessid').value; + var jrn=$(p_ctl).jrn; + $(p_ctl).value=$(p_ctl).value.toUpperCase(); + if ( jrn == undefined ) { if ($('p_jrn')!=undefined) {jrn=$('p_jrn').value; } } + if ( jrn == undefined ) { jrn=-1;} + if ( trim($(p_ctl).value)=="" ) { + nLabel=$(p_ctl).label; + if ($(nLabel) ){$(nLabel).value=""; $(nLabel).innerHTML=" "; clean_Fid(p_ctl); return; + } } - queryString="?FID="+ctl_value; - queryString=queryString+"&d="+p_deb+"&j="+p_jrn+'&gDossier='+gDossier; - queryString=queryString+'&ctl='+p_ctl+'&PHPSESSID='+phpsessid; - queryString=queryString+'&caller='+p_caller+'&extra='+p_extra; - /* alert(queryString); */ + var queryString="?FID="+trim($(p_ctl).value); + if ( $(p_ctl).label) { queryString+='&l='+$(p_ctl).label;} + if ( $(p_ctl).tvaid) { queryString+='&t='+$(p_ctl).tvaid;} + if ( $(p_ctl).price) { queryString+='&p='+$(p_ctl).price;} + if ( $(p_ctl).purchase) { queryString+='&b='+$(p_ctl).purchase;} + if ( $(p_ctl).typecard) { queryString+='&d='+$(p_ctl).typecard;} + queryString=queryString+"&j="+jrn+'&gDossier='+gDossier; + queryString=queryString+'&ctl='+p_ctl.id+'&PHPSESSID='+phpsessid; + var action=new Ajax.Request ( "fid.php", { @@ -89,43 +90,36 @@ function ajaxFid(p_ctl,p_deb,phpsessid,p_caller,p_extra) } /*!\brief callback function for ajax * \param request : object request - * \param json : json answer */ + * \param json : json answer +\verbatim + {"answer":"ok", + "flabel":"none", + "name":"Chambre de commerce", + "ftva_id":"none", + "tva_id":" ", + "fPrice_sale":"none", + "sell":" ", + "fPrice_purchase":"none", + "buy":" "} +\endverbatim + */ function successFid(request,json) { var answer=request.responseText.evalJSON(true); + var flabel=answer.flabel; + if ( answer.answer=='nok' ){ + set_value(flabel," Fiche inexistante"); + return; + } + + var ftva_id=answer.ftva_id; + var fsale=answer.fPrice_sale; + var fpurchase=answer.fPrice_purchase; + + if ( ftva_id != 'none') { set_value(ftva_id,answer.tva_id);} + if ( flabel != 'none') { set_value(flabel,answer.name);} + if ( fpurchase != 'none') { set_value(fpurchase,answer.buy);} + if ( fsale != 'none') { set_value(fsale,answer.sell);} - var data=answer.name; - var sell=answer.sell; - var buy=answer.buy; - var tva_id=answer.tva_id; - var ctl=answer.ctl; - var extra=answer.extra; - var caller=answer.caller; - if ( caller == 'searchcardControl') { - if ( trim (data)== "") { $(ctl).style.color="red";} - else { $(ctl).style.color="black"; $(extra).value=data;} - } - var toSet=ctl+'_label'; - if (trim(data) == "" ) { - $(toSet).innerHTML="Fiche Inconnue"; - $(toSet).style.color="red"; - clean_Fid(ctl); - $(ctl).style.color="red"; - } else { - $(ctl).style.color="black"; - var nSell=ctl+"_price"; - var nBuy=ctl+"_price"; - var nTva_id=ctl+"_tva_id"; - $(toSet).innerHTML=data; - $(toSet).style.color="black"; - if ( $(nTva_id) ) { - $(nTva_id).value=tva_id; - } - if ( $(nSell ) && trim(sell)!="" ) { - $(nSell).value=sell; - } - if ( $(nBuy) && trim(buy)!="") { $(nBuy).value=buy; } - - } } function ajax_error_saldo(request,json) { @@ -138,8 +132,8 @@ function ajax_error_saldo(request,json) { function ajax_saldo(phpsessid,p_ctl) { var gDossier=$('gDossier').value; - var ctl_value=trim($(p_ctl).value); - var jrn=$('p_jrn').value; + var ctl_value=trim($(p_ctl).value); + var jrn=$('p_jrn').value; queryString="?FID="+ctl_value; queryString=queryString+'&gDossier='+gDossier+'&j='+jrn; queryString=queryString+'&ctl='+ctl_value+'&PHPSESSID='+phpsessid; @@ -164,4 +158,35 @@ function ajax_success_saldo(request,json) { $('first_sold').value=answer.saldo; } +/*!\brief this function get data from ajax_card.php and fill the hidden div with the return html string +* \param phpsessid +* \param p_dossier +* \param f_id fiche.f_id +* \param p_operation what to do : op : history of operation +* \param ctl : id of the div to show +* \param page +*/ +function ajax_card(phpsessid,p_dossier,f_id,p_operation,ctl,page) { +$(ctl).show(); +var queryString="PHPSESSID="+phpsessid+"&gDossier="+p_dossier+"&f_id="+f_id+"&op="+p_operation+"&p="+page+'&ctl='+ctl; +var action = new Ajax.Request( + "ajax_card.php" , { method:'get', parameters:queryString,onFailure:ajax_get_failure,onSuccess:ajax_get_success} + ); +} +/*!\brief callback function for ajax_get when successuf +*/ +function ajax_get_success(request,json) +{ +var answer=request.responseText.evalJSON(false); +$(answer.ctl).show(); +$(answer.ctl).innerHTML=answer.html; +} +/*!\brief callback function for ajax_get when fails +*/ +function ajax_get_failure(request,json) +{ +alert("Ajax do not work for ajax_get"); + +} + //--> diff --git a/html/js/ajax_op.js b/html/js/ajax_op.js deleted file mode 100644 index 9181b80fa..000000000 --- a/html/js/ajax_op.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - -/*! \file - * \brief This file permit to use the AJAX function to fill up - * info from fiche - * - */ -function op_remove(p_sessid,p_dossier,p_oa_group) { - var a=confirm("Etes-vous sur de vouloir effacer cette operation ?\n"); - if ( a == false ) return; - var ajaxRequest; // The variable that makes Ajax possible! - - try{ - // Opera 8.0+, Firefox, Safari - ajaxRequest = new XMLHttpRequest(); - } catch (e){ - // Internet Explorer Browsers - try{ - ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - try{ - ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (e){ - // Something went wrong - alert("Your browser broke!"); - return false; - } - } - } - queryString="?PHPSESSID"+p_sessid+"&oa="+p_oa_group+"&gDossier="+p_dossier; - - ajaxRequest.open("GET", "remove_op.php"+queryString, true); - ajaxRequest.send(null); - document.getElementById(p_oa_group).style.display='none'; -} - -/*!\brief this function fills the data from fid.php, - * \param p_ctl the ctrl to fill - * \param p_deb if debit of credit - * \param p_jrn the ledger - */ -function trim(s) { - return s.replace(/^\s+/, '').replace(/\s+$/, ''); -} - - -//--> \ No newline at end of file diff --git a/html/js/anc_script.js b/html/js/anc_script.js new file mode 100644 index 000000000..a0bfd071b --- /dev/null +++ b/html/js/anc_script.js @@ -0,0 +1,188 @@ +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 2546 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/** + * @brief javascript for the analytic accountancy + */ + +/*!\brief add a row for the CA + * \param p_table_id + * \param p_amount amount to reach + * \param p_count count of col. + */ +function add_row(p_table,p_seq,p_count) { + var elt=g("nb_"+p_table); + + + if ( ! elt ) {return;} + + // number of elt = elt.value + var old_value=elt.value; + var new_value=1*elt.value+1; + if ( new_value > 4 ) { + alert("Maximum 4 lignes "); + return; + } + elt.value=new_value; + // For the detail view (modify_op) there is several form and then several time the + // element + var all_elt=document.getElementsByName("nb_"+p_table); + for (var e=0;e<all_elt.length;e++) { + all_elt[e].value=new_value; + } + var tbody=g(p_table).getElementsByTagName("tbody")[0]; + var row=document.createElement("TR"); + for ( i=1;i<=p_count;i++) { + var cell=document.createElement("TD"); + var col=g(p_table+"td"+i+'c1'); + var txt=col.innerHTML; + txt=txt.replace(/row_1/g,"row_"+new_value); + cell.innerHTML=txt; + + row.appendChild(cell); + } + + // create the amount cell + var cell_montant=document.createElement("TD"); + cell_montant.innerHTML='<input type="TEXT" name="val'+p_seq+"l"+new_value+'" id="val'+p_seq+"l"+new_value+'" size="6" style="border:solid 1px blue;" >'; + row.appendChild(cell_montant); + tbody.appendChild(row); + +} +/*! + * \brief Check the amount of the CA + * \param p_style : error or ok, if ok show a ok box if the amount are equal + * + * + * \return true if the amounts are equal + */ +function verify_ca(p_style) { + var nb_item=g('nb_item').value; + + for ( var item=0;item<=nb_item-1;item++) { + if ( g('nb_t'+item) ) { + var nb_row=1*g('nb_t'+item).value; + var amount=1*g('amount_t'+item).value; + var get=0; + for (var row=1;row <= nb_row;row++) { + + if ( g('ta_'+item+'o1row_'+row).value != -1) { + val=g('val'+item+'l'+row).value; + if ( isNaN(val)) { continue;} + get=get+(val*1); + } else { + get=amount; + } + } + if ( Math.round(get,2) != Math.round(amount,2) ) { + diff=Math.round(get,2)-Math.round(amount,2); + alert ("montant differents \ntotal CA="+get+"\ntotal Operation "+amount+"\nDiff = "+diff); + return false; + }else { + if ( p_style=='ok') { + alert('les montants correspondent'); + } + } + } + } + return true; +} +/*! + * \brief open a window for searching a CA account, + * \param p_sessid PHPSESSID + * \param p_dossier dossier id + * \param p_target ctrl to update + * \param p_source ctrl containing the pa_id + * + * + * \return + */ +function search_ca (p_sessid,p_dossier,p_target,p_source) +{ + var pa_id=g(p_source).value; + var url="?PHPSESSID="+p_sessid+"&gDossier="+p_dossier+"&c1="+p_target+"&c2="+pa_id; + var a=window.open("search_ca.php"+url,"CA recherche",'statusbar=no,scrollbars=yes,toolbar=no'); + a.focus(); +} + +function caod_checkTotal() { + var ie4=false; + if ( document.all ) { + ie4=true; + }// Ajouter getElementById par document.all[str] + var total_deb=0.0; + var total_cred=0.0; + var nb_item=10; + + for (var i=0;i <nb_item ;i++) { + var doc_amount=g("pamount"+i); + if ( ! doc_amount ) { return;} + var side=g("pdeb"+i); + if ( ! side ) { return;} + var amount=parseFloat(doc_amount.value); + + if ( isNaN(amount) == true) { + amount=0.0; + } + if ( side.checked == false ) { + total_cred+=amount; + } + if ( side.checked == true ) { + total_deb+=amount; + } + } + + + + r_total_cred=Math.round(total_cred*100)/100; + r_total_deb=Math.round(total_deb*100)/100; + g('totalDeb').innerHTML=r_total_deb; + g('totalCred').innerHTML=r_total_cred; + + if ( r_total_deb != r_total_cred ) { + g("totalDiff").style.color="red"; + g("totalDiff").style.fontWeight="bold"; + g("totalDiff").innerHTML="Différence"; + diff=total_deb-total_cred; + diff=Math.round(diff*100)/100; + g("totalDiff").innerHTML=diff; + + } else { + g("totalDiff").innerHTML="0.0"; + } +} + +/** + *@brief remove an operation + *@param p_sessid is the PHPSESSID + *@param p_dossier is the folder + *@param p_oa_group is the group of the analytic operation + */ +function op_remove(p_sessid,p_dossier,p_oa_group) { + var a=confirm("Etes-vous sur de vouloir effacer cette operation ?\n"); + if ( a == false ) return; + var obj={"PHPSESSID":p_sessid,"oa":p_oa_group,"gDossier":p_dossier}; + queryString=encodeJSON(obj); + g(p_oa_group).style.display='none'; + var e=new Ajax.Request("remove_op.php", + {method:'get',parameters:queryString}); + +} + diff --git a/html/js/bq_import.js b/html/js/bq_import.js new file mode 100644 index 000000000..8d55e9587 --- /dev/null +++ b/html/js/bq_import.js @@ -0,0 +1,102 @@ +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 2546 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +/** + *@brief regroup the function for the import of bank csv + */ + +/*! \brief import : update a record (in ajax) + * \param $p_sessid : PHPSESSID + * \param $p_dossier : the dossier id + * \param $p_count : the item number + */ +function import_update(p_sessid,p_dossier,p_count) { + var query_string="PHPSESSID="+p_sessid+"&count="+p_count+"&gDossier="+p_dossier; + var code=$("code"+p_count); + var poste=$("poste"+p_count); + var concerned=$("e_concerned"+p_count); + var url="ajax_import.php"; + query_string+="&code="+code.value; + query_string+="&poste="+poste.value; + query_string+="&concerned="+concerned.value; + query_string+="&action=update"; + + + /* call the script which handle the query */ + var update= new Ajax.Request ( + url, + { + method:'get', + parameters:query_string, + } + ); + var form=$("form_"+p_count); + form.hide(); +} +/*! \brief remove : remove a record (in ajax) + * \param $p_sessid : PHPSESSID + * \param $p_dossier : the dossier id + * \param $p_count : the item number + */ + +function import_remove(p_sessid,p_dossier,p_count) { + var query_string="PHPSESSID="+p_sessid+"&count="+p_count+"&gDossier="+p_dossier; + var code=$("code"+p_count); + var url="ajax_import.php"; + query_string+="&code="+code.value; + query_string+="&action=delete"; + var a = confirm("Etes-vous certain d'effacer cette operation ?"); + if ( a == false ) { return;} + + /* call the script which handle the query */ + var update= new Ajax.Request ( + url, + { + method:'get', + parameters:query_string, + } + ); + var form=$("form_"+p_count); + form.hide(); +} +/*! \brief remove : remove a record (in ajax) + * \param $p_sessid : PHPSESSID + * \param $p_dossier : the dossier id + * \param $p_count : the item number + */ + +function import_not_confirmed(p_sessid,p_dossier,p_count) { + var query_string="PHPSESSID="+p_sessid+"&count="+p_count+"&gDossier="+p_dossier; + var code=$("code"+p_count); + var url="ajax_import.php"; + query_string+="&code="+code.value; + query_string+="&action=not_confirmed"; + + /* call the script which handle the query */ + var update= new Ajax.Request ( + url, + { + method:'get', + parameters:query_string, + } + ); + var form=$("form_"+p_count); + form.hide(); +} \ No newline at end of file diff --git a/html/js/bud_script.js b/html/js/bud_script.js deleted file mode 100644 index e5466f496..000000000 --- a/html/js/bud_script.js +++ /dev/null @@ -1,132 +0,0 @@ -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - -/*! \file - * \brief - * open a windows for searching an account (poste comptable) - */ - -function bud_search_poste(p_sessid,p_dossier,p_ctl) - { - var comment=""; - if ( document.getElementById(p_ctl) ) { - comment=document.getElementById(p_ctl).value; - } - - var win=window.open('bud_search_poste.php?gDossier='+p_dossier+'&p_ctl='+p_ctl+'&PHPSESSID='+p_sessid+"&comment="+comment+"&search",'Cherche','toolbar=no,width=600,height=600,scrollbars=yes,resizable=yes'); - } -function GetIt() { - window.close(); -} - -function SetItChild(p_ctl,p_value,p_label) { - self.opener.SetItParent(p_ctl,p_value,p_label); - window.close(); -} -function SetItParent(p_ctl,p_value,p_label) { - $(p_ctl).value=p_value+' '+p_label; - $(p_ctl+'_hidden').value=p_value; -} -function bud_form_enable(p_ctl) { - $("form_"+p_ctl).enable(); - $('button_save'+p_ctl).show(); - $('button_change'+p_ctl).hide(); - $('button_delete'+p_ctl).show(); - $('button_escape'+p_ctl).show(); -} -function bud_form_disable(p_ctl) { - $("form_"+p_ctl).disable(); - $('button_save'+p_ctl).hide(); - $('button_change'+p_ctl).show(); - $('button_delete'+p_ctl).hide(); - $('button_escape'+p_ctl).hide(); - -} - -function bud_form_save(p_ctl,p_sessid,p_dossier) { - query=$("form_"+p_ctl).serialize(); - query+="&action=save"; - bud_form_disable(p_ctl); - bud_action(query,p_ctl); -} -function bud_form_delete(p_ctl,p_sessid,p_dossier) { - if ( confirm ("Vous etes sur d'effacer") == false) { return;} - query=$("form_"+p_ctl).serialize(); - query+="&action=delete"; - var elt=$("form_"+p_ctl).getElements(); - // alert (elt); - for (i=0;i < elt.length;i++) { - if ( elt[i].name.search(/amount_/)!= -1 ) { - elt[i].value="0"; - } - if ( elt[i].name.search(/account_/) != -1 ) { elt[i].value=" ";} - if ( elt[i].name.search(/bd_id/) != -1 ) { elt[i].value="0";} - } - bud_form_disable(p_ctl); - bud_action(query,p_ctl); -} -function display_error(request) { - alert("L'operation a echoue"); -} - -function display_success(request,json) { - var answer=request.responseText.evalJSON(true); - var form=$('form_'+answer.form_id); - var elt=form.getElements(); - - for (i = 0;i < elt.length;i++) { - if ( elt[i].name.search(/bd_id/) != -1 ) { - - elt[i].value=answer.bd_id; - } - } - - -} -function bud_action(p_query,p_ctl) { - var action=new Ajax.Request ( - "bud_ajax.php", - { - method:'post', - parameters:p_query, - onFailure:display_error, - onSuccess:display_success - } - - ); -} - -function bud_compute_sum(p_ctl) { - var form=$('form_'+p_ctl); - var elt=form.getElements(); - var sum=0; - for (i=0; i<elt.length;i++) { - if ( elt[i].name.search(/amount_/) != -1 ){ - if ( isNaN(elt[i].value)) { - alert(elt[i].value+" n'est pas un nombre"); - elt[i].value=0; - continue; - } - sum+=elt[i].value*1.0; - } - } - $('form_total_'+p_ctl).innerHTML=sum; -} \ No newline at end of file diff --git a/html/js/builder.js b/html/js/builder.js new file mode 100644 index 000000000..f1f42b9ac --- /dev/null +++ b/html/js/builder.js @@ -0,0 +1,136 @@ +// script.aculo.us builder.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +var Builder = { + NODEMAP: { + AREA: 'map', + CAPTION: 'table', + COL: 'table', + COLGROUP: 'table', + LEGEND: 'fieldset', + OPTGROUP: 'select', + OPTION: 'select', + PARAM: 'object', + TBODY: 'table', + TD: 'table', + TFOOT: 'table', + TH: 'table', + THEAD: 'table', + TR: 'table' + }, + // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken, + // due to a Firefox bug + node: function(elementName) { + elementName = elementName.toUpperCase(); + + // try innerHTML approach + var parentTag = this.NODEMAP[elementName] || 'div'; + var parentElement = document.createElement(parentTag); + try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707 + parentElement.innerHTML = "<" + elementName + "></" + elementName + ">"; + } catch(e) {} + var element = parentElement.firstChild || null; + + // see if browser added wrapping tags + if(element && (element.tagName.toUpperCase() != elementName)) + element = element.getElementsByTagName(elementName)[0]; + + // fallback to createElement approach + if(!element) element = document.createElement(elementName); + + // abort if nothing could be created + if(!element) return; + + // attributes (or text) + if(arguments[1]) + if(this._isStringOrNumber(arguments[1]) || + (arguments[1] instanceof Array) || + arguments[1].tagName) { + this._children(element, arguments[1]); + } else { + var attrs = this._attributes(arguments[1]); + if(attrs.length) { + try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707 + parentElement.innerHTML = "<" +elementName + " " + + attrs + "></" + elementName + ">"; + } catch(e) {} + element = parentElement.firstChild || null; + // workaround firefox 1.0.X bug + if(!element) { + element = document.createElement(elementName); + for(attr in arguments[1]) + element[attr == 'class' ? 'className' : attr] = arguments[1][attr]; + } + if(element.tagName.toUpperCase() != elementName) + element = parentElement.getElementsByTagName(elementName)[0]; + } + } + + // text, or array of children + if(arguments[2]) + this._children(element, arguments[2]); + + return $(element); + }, + _text: function(text) { + return document.createTextNode(text); + }, + + ATTR_MAP: { + 'className': 'class', + 'htmlFor': 'for' + }, + + _attributes: function(attributes) { + var attrs = []; + for(attribute in attributes) + attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) + + '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'"') + '"'); + return attrs.join(" "); + }, + _children: function(element, children) { + if(children.tagName) { + element.appendChild(children); + return; + } + if(typeof children=='object') { // array can hold nodes and text + children.flatten().each( function(e) { + if(typeof e=='object') + element.appendChild(e); + else + if(Builder._isStringOrNumber(e)) + element.appendChild(Builder._text(e)); + }); + } else + if(Builder._isStringOrNumber(children)) + element.appendChild(Builder._text(children)); + }, + _isStringOrNumber: function(param) { + return(typeof param=='string' || typeof param=='number'); + }, + build: function(html) { + var element = this.node('div'); + $(element).update(html.strip()); + return element.down(); + }, + dump: function(scope) { + if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope + + var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " + + "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " + + "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+ + "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+ + "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+ + "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/); + + tags.each( function(tag){ + scope[tag] = function() { + return Builder.node.apply(Builder, [tag].concat($A(arguments))); + }; + }); + } +}; \ No newline at end of file diff --git a/html/js/caod_compute.js b/html/js/caod_compute.js deleted file mode 100644 index 58698d64e..000000000 --- a/html/js/caod_compute.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/*!\file - * \brief contains function for analytic module - */ -function caod_checkTotal() { - var ie4=false; - if ( document.all ) { - ie4=true; - }// Ajouter getElementById par document.all[str] - var total_deb=0.0; - var total_cred=0.0; - var nb_item=10; - - for (var i=0;i <nb_item ;i++) { - var doc_amount=document.getElementById("pamount"+i); - if ( ! doc_amount ) { return;} - var side=document.getElementById("pdeb"+i); - if ( ! side ) { return;} - var amount=parseFloat(doc_amount.value); - - if ( isNaN(amount) == true) { - amount=0.0; - } - if ( side.checked == false ) { - total_cred+=amount; - } - if ( side.checked == true ) { - total_deb+=amount; - } - -// alert("amount ="+i+"="+amount+" cred/deb = "+deb+"total d/b"+total_deb+"/"+total_cred); - } - - - - r_total_cred=Math.round(total_cred*100)/100; - r_total_deb=Math.round(total_deb*100)/100; - document.getElementById('totalDeb').innerHTML=r_total_deb; - document.getElementById('totalCred').innerHTML=r_total_cred; - - if ( r_total_deb != r_total_cred ) { - document.getElementById("totalDiff").style.color="red"; - document.getElementById("totalDiff").style.fontWeight="bold"; - document.getElementById("totalDiff").innerHTML="Différence"; - diff=total_deb-total_cred; - diff=Math.round(diff*100)/100; - document.getElementById("totalDiff").innerHTML=diff - - } else { - document.getElementById("totalDiff").innerHTML="0.0"; - } -} - diff --git a/html/js/card.js b/html/js/card.js new file mode 100644 index 000000000..3e990f4fb --- /dev/null +++ b/html/js/card.js @@ -0,0 +1,422 @@ +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*! \file + * \brief javascript for searching a card + */ + +/** + *@brief show the ipopup with the form to search a card + * the properties + * - jrn for the ledger + * - fs for the action + * - price for the price of the card (field to update) + * - tvaid for the tvaid of the card (field to update) + * - inp input text to update with the quickcode + * - label field to update with the name + * - ctl the id to fill with the HTML answer (ending with _content) + */ +function search_card(obj) { + try{ + var gDossier=$('gDossier').value; + var phpsessid=$('phpsessid').value; + var inp=obj.inp; + var label=obj.label; + var typecard=obj.typecard; + var price=obj.price; + var tvaid=obj.tvaid; + var jrn=obj.jrn; + if ( jrn==undefined) { + jrn=$('p_jrn').value; + } + var query=encodeJSON({'gDossier':gDossier,'PHPSESSID':phpsessid, + 'inp':inp,'label':label,'price':price,'tvaid':tvaid, + 'ctl':obj.popup,'op':'fs','jrn':jrn, + 'typecard':typecard + }); + showIPopup(obj.popup); + var action=new Ajax.Request ( 'ajax_card.php', + { + method:'get', + parameters:query, + onFailure:errorFid, + onSuccess:result_card_search + } + ); + }catch(e) { + alert('search_card failed'+e.message); + } +} +/** + *@brief when you submit the form for searching a card + *@param obj form + *@note the same as search_card, except it answer to a FORM and not + * to a click event + */ +function search_get_card(obj) { + var dossier=$('gDossier').value; + var phpsessid=$('phpsessid').value; + + var queryString="?gDossier="+dossier; + queryString+="&PHPSESSID="+phpsessid; + queryString+="&op=fs"; + + if ( obj.elements['inp'] ) { queryString+="&inp="+$F('inp');} + if ( obj.elements['typecard'] ) { queryString+="&typecard="+$F('typecard');} + if ( obj.elements['jrn'] ) { queryString+="&jrn="+$F('jrn');} + if ( obj.elements['label']) { queryString+="&label="+$F('label');} + if ( obj.elements['price']) { queryString+="&price="+$F('price');} + if ( obj.elements['tvaid']) { queryString+="&tvaid="+$F('tvaid');} + if( obj.elements['query']) {queryString+="&query="+$F('query');} + if (obj.ctl ) {queryString+="&ctl="+obj.ctl;} + $('asearch').innerHTML="<image src='image/loading.gif' border='0'>"; + var action=new Ajax.Request ( 'ajax_card.php', + { + method:'get', + parameters:queryString, + onFailure:errorFid, + onSuccess:result_card_search + } + ); +} +/** + *@brief show the answer of ajax request + *@param answer in XML + */ +function result_card_search(req) { + try{ + var answer=req.responseXML; + var a=answer.getElementsByTagName('ctl'); + if ( a.length == 0 ) { var rec=req.responseText;alert ('erreur :'+rec);} + var html=answer.getElementsByTagName('code'); + + var name_ctl=a[0].firstChild.nodeValue; + var nodeXml=html[0]; + var code_html=getNodeText(nodeXml); + code_html=unescape_xml(code_html); + $(name_ctl).innerHTML=code_html; + } + catch (e) { + alert(e.message);} + try{ + code_html.evalScripts();} + catch(e){ + alert("Impossible executer script de la reponse\n"+e.message);} + +} + + + +/*!\brief Set the value of 2 input fields +* +* Set the quick code in the first ctrl and the label of the quickcode in the second one. This function is a variant of SetData for +* some specific need. This function is called if the caller is searchcardCtrl +* +*\param p_ctrl the input with the name of the quick code +*\param p_quickcode the found quick_code +*\param p_ctrlname the name of the input field with the label +*\param p_label the label of the quickcode +*/ +function setCtrl(p_ctrl,p_quickcode,p_ctrlname,p_label){ + var ctrl=g(p_ctrl); + if ( ctrl ) { ctrl.value=p_quickcode; } + var ctrl_name=g(p_ctrlname); + if ( ctrl_name ) { ctrl_name.value=p_label; } +} + + + +/*!\brief clean the row (the label, price and vat) + * \param p_ctl the calling ctrl + */ +function clean_Fid(p_ctl) +{ + nSell=p_ctl+"_price"; + nBuy=p_ctl+"_price"; + nTva_id=p_ctl+"_tva_id"; + if ( $(nSell) ) { $(nSell).value=""; } + if ( $(nBuy) ) { $(nBuy).value="";} + if ( $(nTva_id) ) { $(nTva_id).value="-1"; } + +} +function errorFid(request,json) { + alert('erreur : ajax fiche'); +} +function update_value(text,li) { + var phpsessid=$('phpsessid').value; + if ( ! phpsessid ) { alert ('Il manque HIDDEN PHPSESSID');} + +} +/** + *@brief is called when something change in ICard + *@param the input field + *@see ICard + */ +function fill_data_onchange(ctl) { + ajaxFid(ctl); + +} +/** + *@brief is called when something change in ICard + *@param the input field + *@see ICard + */ +function fill_data(text,li) { + ajaxFid(text); + +} +/** + *@brief is called when something change in ICard + *@param the input field + *@see ICard + */ +function fill_data_fin_onchange(ctl) { + ajaxFid(ctl); +ajax_saldo($('phpsessid'),ctl.id); +} +/** + *@brief is called when something change in ICard + *@param the input field + *@see ICard + */ +function fill_fin_data(text,li) { + ajaxFid(text); +ajax_saldo($('phpsessid'),text.id); +} +/** + *@brief show the ipopup window and display the details of a card, + * to work some attribute must be set + *@param input field (obj) it must have the attribute ipopup + * - ipopup + * + *@see ajax_card.php + */ +function fill_ipopcard(obj) { + if ( ! $(obj).ipopup) { alert('Erreur pas d\' attribut ipopup '+obj.id);return;}; + var content=$(obj).ipopup+'_content'; + $(content).innerHTML='<image src="image/loading.gif" alt="chargement"></image>'; + showIPopup($(obj).ipopup); + var dossier=$('gDossier').value; + var phpsessid=$('phpsessid').value; + var qcode=''; + if ( $(obj).qcode != undefined ) { + qcode=obj.qcode; + } else { + qcode=$(obj).value; + } + // ctl=$(obj).id; + var queryString='?gDossier='+dossier; + queryString+='&PHPSESSID='+phpsessid; + queryString+='&qcode='+qcode; + queryString+='&ctl='+content; + queryString+='&op=dc'; // dc for detail card + + var action=new Ajax.Request ( 'ajax_card.php', + { + method:'get', + parameters:queryString, + onFailure:errorFid, + onSuccess:successFill_ipopcard + } + ); +} +/** + *@brief + * \param request : object request + * \param json : json answer +\code +\endcode +*/ +function successFill_ipopcard(req,json){ + try{ + var answer=req.responseXML; + var a=answer.getElementsByTagName('ctl'); + var html=answer.getElementsByTagName('code'); + + if ( a.length == 0 ) { var rec=req.responseText;alert ('erreur :'+rec);} + var name_ctl=a[0].firstChild.nodeValue; + var code_html=getNodeText(html[0]); + code_html=unescape_xml(code_html); + + $(name_ctl).innerHTML=code_html;} catch (e) {alert(e.message);} + try{code_html.evalScripts();}catch(e){alert("Impossible executer script de la reponse\n"+e.message);} +} +/** + *@brief show the ipopup for selecting a card type, it is a needed step before adding + * a card + *@param input field (obj) it must have the attribute ipopup + * possible attribute : + * - filter is the filter but with a fd_id list, -1 means there is no filter + * - ref if we want to refresh the window after adding a card + * - type type of card (supplier, customer...) + *@see ajax_card.php + */ +function select_card_type(obj) { + if ( ! $(obj).ipopup) { alert('Erreur pas d\' attribut ipopup '+obj.id);return;}; + var content=$(obj).ipopup+'_content'; + $(content).innerHTML='<image src="image/loading.gif" alt="chargement"></image>'; + showIPopup($(obj).ipopup); + var dossier=$('gDossier').value; + var phpsessid=$('phpsessid').value; + var filter=$(obj).filter; + if ( filter==undefined) {filter=-1;} + var queryString='?gDossier='+dossier; + queryString+='&PHPSESSID='+phpsessid; + queryString+='&ctl='+content; + queryString+='&op=st'; // st for selecting type + if ( $(obj).win_refresh!=undefined) { queryString+='&ref';} + queryString+='&fil='+filter; + if ( obj.type_cat) { queryString+='&cat='+obj.type_cat;} + + var action=new Ajax.Request ( 'ajax_card.php', + { + method:'get', + parameters:queryString, + onFailure:errorFid, + onSuccess:successFill_ipopcard + } + ); +} +/** + *@brief Show a blank card + *@param Form object (obj) it must have the attribute ipopup + * possible attribute : + * - filter is the filter but with a fd_id list, -1 means there is no filter + * - ref : reload the window after adding card + *@see ajax_card.php + */ +function dis_blank_card(obj) { + if ( ! $(obj).ipopup) { alert('Erreur pas d\' attribut ipopup '+obj.id);return;}; + // first we have to take the form elt we need + var fd_id=$F('fd_id'); + var ref=""; + if ( obj.elements['ref'] ) { + ref='&ref'; + } + var content=$(obj).ipopup+'_content'; + $(content).innerHTML='<image src="image/loading.gif" alt="chargement"></image>'; + showIPopup($(obj).ipopup); + var dossier=$('gDossier').value; + var phpsessid=$('phpsessid').value; + + var queryString='?gDossier='+dossier; + queryString+='&PHPSESSID='+phpsessid; + queryString+='&ctl='+content; + queryString+='&fd_id='+fd_id; + queryString+=ref; + queryString+='&op=bc'; // bc for blank card + + var action=new Ajax.Request ( 'ajax_card.php', + { + method:'get', + parameters:queryString, + onFailure:errorFid, + onSuccess:successFill_ipopcard + } + ); +} +/** + *@brief save the data contained into the form 'save_card' + *@param input field (obj) it must have the attribute ipopup + * possible attribute : + *@see ajax_card.php + */ +function save_card(obj) { + if ( ! $(obj).ipopup) { alert('Erreur pas d\' attribut ipopup '+obj.id);return;}; + var content=$(obj).ipopup+'_content'; + // Data must be taken here + data=$('save_card').serialize(false); + $(content).innerHTML='<image src="image/loading.gif" alt="chargement"></image>'; + showIPopup($(obj).ipopup); + var dossier=$('gDossier').value; + var phpsessid=$('phpsessid').value; + var queryString='?gDossier='+dossier; + queryString+='&PHPSESSID='+phpsessid; + queryString+='&ctl='+content; + queryString+=data; + queryString+='&op=sc'; // sc for save card + + var action=new Ajax.Request ( 'ajax_card.php', + { + method:'post', + parameters:queryString, + onFailure:errorFid, + onSuccess:successFill_ipopcard + } + ); +} +/** + *@brief add a category of card, + *@param obj with the attribute + * - ipopup the ipopup to show + * - type_cat the category of card we want to add + */ +function add_category(obj){ + // show ipopup + showIPopup(obj.ipopup); + var dossier=$('gDossier').value; + var phpsessid=$('phpsessid').value; + var queryString='?gDossier='+dossier; + queryString+='&PHPSESSID='+phpsessid; + queryString+='&op=ac'; + queryString+='&ctl='+obj.ipopup+'_content'; + if ( obj.type_cat) { queryString+='&cat='+obj.type_cat;} + var action=new Ajax.Request ( 'ajax_card.php', + { + method:'get', + parameters:queryString, + onFailure:errorFid, + onSuccess:successFill_ipopcard + } + ); + +} +/** + * @brief save the form and add a new category of card + * @param obj if the form object + */ +function save_card_category(obj) { + if ( ! $(obj).ipopup) { alert('Erreur pas d\' attribut ipopup '+obj.id);return;}; + var content=$(obj).ipopup+'_content'; + // Data must be taken here + data=$('newcat').serialize(false); + $(content).innerHTML='<image src="image/loading.gif" alt="chargement"></image>'; + showIPopup($(obj).ipopup); + var dossier=$('gDossier').value; + var phpsessid=$('phpsessid').value; + var queryString='?'; + queryString+='&ctl='+content+'&'; + queryString+=data; + queryString+='&op=scc'; // sc for save card + + var action=new Ajax.Request ( 'ajax_card.php', + { + method:'post', + parameters:queryString, + onFailure:errorFid, + onSuccess:successFill_ipopcard + } + ); +} +/** + *@brief Display a form to modify a category + * + */ \ No newline at end of file diff --git a/html/js/compute.js b/html/js/compute.js index f4395e167..487026852 100644 --- a/html/js/compute.js +++ b/html/js/compute.js @@ -68,7 +68,7 @@ function checkTotal() { if ( r_total_deb != r_total_cred ) { document.getElementById("totalDiff").style.color="red"; document.getElementById("totalDiff").style.fontWeight="bold"; - document.getElementById("totalDiff").innerHTML="Différence"; + document.getElementById("totalDiff").innerHTML="Différence"; diff=total_deb-total_cred; diff=Math.round(diff*100)/100; document.getElementById("totalDiff").innerHTML=diff diff --git a/html/js/compute_direct.js b/html/js/compute_direct.js index ca98a6d36..152e490e1 100644 --- a/html/js/compute_direct.js +++ b/html/js/compute_direct.js @@ -62,11 +62,11 @@ function checkTotalDirect() { r_total_deb=Math.round(total_deb*100)/100; document.getElementById('totalDeb').innerHTML=r_total_deb; document.getElementById('totalCred').innerHTML=r_total_cred; - + var diff=0; if ( r_total_deb != r_total_cred ) { document.getElementById("totalDiff").style.color="red"; document.getElementById("totalDiff").style.fontWeight="bold"; - document.getElementById("totalDiff").innerHTML="Différence"; + document.getElementById("totalDiff").innerHTML="Différence"; diff=total_deb-total_cred; diff=Math.round(diff*100)/100; document.getElementById("totalDiff").innerHTML=diff diff --git a/html/js/controls.js b/html/js/controls.js new file mode 100644 index 000000000..7392fb664 --- /dev/null +++ b/html/js/controls.js @@ -0,0 +1,965 @@ +// script.aculo.us controls.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// (c) 2005-2009 Ivan Krstic (http://blogs.law.harvard.edu/ivan) +// (c) 2005-2009 Jon Tirsen (http://www.tirsen.com) +// Contributors: +// Richard Livsey +// Rahul Bhargava +// Rob Wills +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +// Autocompleter.Base handles all the autocompletion functionality +// that's independent of the data source for autocompletion. This +// includes drawing the autocompletion menu, observing keyboard +// and mouse events, and similar. +// +// Specific autocompleters need to provide, at the very least, +// a getUpdatedChoices function that will be invoked every time +// the text inside the monitored textbox changes. This method +// should get the text for which to provide autocompletion by +// invoking this.getToken(), NOT by directly accessing +// this.element.value. This is to allow incremental tokenized +// autocompletion. Specific auto-completion logic (AJAX, etc) +// belongs in getUpdatedChoices. +// +// Tokenized incremental autocompletion is enabled automatically +// when an autocompleter is instantiated with the 'tokens' option +// in the options parameter, e.g.: +// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' }); +// will incrementally autocomplete with a comma as the token. +// Additionally, ',' in the above example can be replaced with +// a token array, e.g. { tokens: [',', '\n'] } which +// enables autocompletion on multiple tokens. This is most +// useful when one of the tokens is \n (a newline), as it +// allows smart autocompletion after linebreaks. + +if(typeof Effect == 'undefined') + throw("controls.js requires including script.aculo.us' effects.js library"); + +var Autocompleter = { }; +Autocompleter.Base = Class.create({ + baseInitialize: function(element, update, options) { + element = $(element); + this.element = element; + this.update = $(update); + this.hasFocus = false; + this.changed = false; + this.active = false; + this.index = 0; + this.entryCount = 0; + this.oldElementValue = this.element.value; + + if(this.setOptions) + this.setOptions(options); + else + this.options = options || { }; + + this.options.paramName = this.options.paramName || this.element.name; + this.options.tokens = this.options.tokens || []; + this.options.frequency = this.options.frequency || 0.4; + this.options.minChars = this.options.minChars || 1; + this.options.onShow = this.options.onShow || + function(element, update){ + if(!update.style.position || update.style.position=='absolute') { + update.style.position = 'absolute'; + Position.clone(element, update, { + setHeight: false, + offsetTop: element.offsetHeight + }); + } + Effect.Appear(update,{duration:0.15}); + }; + this.options.onHide = this.options.onHide || + function(element, update){ new Effect.Fade(update,{duration:0.15}) }; + + if(typeof(this.options.tokens) == 'string') + this.options.tokens = new Array(this.options.tokens); + // Force carriage returns as token delimiters anyway + if (!this.options.tokens.include('\n')) + this.options.tokens.push('\n'); + + this.observer = null; + + this.element.setAttribute('autocomplete','off'); + + Element.hide(this.update); + + Event.observe(this.element, 'blur', this.onBlur.bindAsEventListener(this)); + Event.observe(this.element, 'keydown', this.onKeyPress.bindAsEventListener(this)); + }, + + show: function() { + if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update); + if(!this.iefix && + (Prototype.Browser.IE) && + (Element.getStyle(this.update, 'position')=='absolute')) { + new Insertion.After(this.update, + '<iframe id="' + this.update.id + '_iefix" '+ + 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' + + 'src="javascript:false;" frameborder="0" scrolling="no"></iframe>'); + this.iefix = $(this.update.id+'_iefix'); + } + if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50); + }, + + fixIEOverlapping: function() { + Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)}); + this.iefix.style.zIndex = 1; + this.update.style.zIndex = 2; + Element.show(this.iefix); + }, + + hide: function() { + this.stopIndicator(); + if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update); + if(this.iefix) Element.hide(this.iefix); + }, + + startIndicator: function() { + if(this.options.indicator) Element.show(this.options.indicator); + }, + + stopIndicator: function() { + if(this.options.indicator) Element.hide(this.options.indicator); + }, + + onKeyPress: function(event) { + if(this.active) + switch(event.keyCode) { + case Event.KEY_TAB: + case Event.KEY_RETURN: + this.selectEntry(); + Event.stop(event); + case Event.KEY_ESC: + this.hide(); + this.active = false; + Event.stop(event); + return; + case Event.KEY_LEFT: + case Event.KEY_RIGHT: + return; + case Event.KEY_UP: + this.markPrevious(); + this.render(); + Event.stop(event); + return; + case Event.KEY_DOWN: + this.markNext(); + this.render(); + Event.stop(event); + return; + } + else + if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || + (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return; + + this.changed = true; + this.hasFocus = true; + + if(this.observer) clearTimeout(this.observer); + this.observer = + setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); + }, + + activate: function() { + this.changed = false; + this.hasFocus = true; + this.getUpdatedChoices(); + }, + + onHover: function(event) { + var element = Event.findElement(event, 'LI'); + if(this.index != element.autocompleteIndex) + { + this.index = element.autocompleteIndex; + this.render(); + } + Event.stop(event); + }, + + onClick: function(event) { + var element = Event.findElement(event, 'LI'); + this.index = element.autocompleteIndex; + this.selectEntry(); + this.hide(); + }, + + onBlur: function(event) { + // needed to make click events working + setTimeout(this.hide.bind(this), 250); + this.hasFocus = false; + this.active = false; + }, + + render: function() { + if(this.entryCount > 0) { + for (var i = 0; i < this.entryCount; i++) + this.index==i ? + Element.addClassName(this.getEntry(i),"selected") : + Element.removeClassName(this.getEntry(i),"selected"); + if(this.hasFocus) { + this.show(); + this.active = true; + } + } else { + this.active = false; + this.hide(); + } + }, + + markPrevious: function() { + if(this.index > 0) this.index--; + else this.index = this.entryCount-1; + this.getEntry(this.index).scrollIntoView(true); + }, + + markNext: function() { + if(this.index < this.entryCount-1) this.index++; + else this.index = 0; + this.getEntry(this.index).scrollIntoView(false); + }, + + getEntry: function(index) { + return this.update.firstChild.childNodes[index]; + }, + + getCurrentEntry: function() { + return this.getEntry(this.index); + }, + + selectEntry: function() { + this.active = false; + this.updateElement(this.getCurrentEntry()); + }, + + updateElement: function(selectedElement) { + if (this.options.updateElement) { + this.options.updateElement(selectedElement); + return; + } + var value = ''; + if (this.options.select) { + var nodes = $(selectedElement).select('.' + this.options.select) || []; + if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select); + } else + value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal'); + + var bounds = this.getTokenBounds(); + if (bounds[0] != -1) { + var newValue = this.element.value.substr(0, bounds[0]); + var whitespace = this.element.value.substr(bounds[0]).match(/^\s+/); + if (whitespace) + newValue += whitespace[0]; + this.element.value = newValue + value + this.element.value.substr(bounds[1]); + } else { + this.element.value = value; + } + this.oldElementValue = this.element.value; + this.element.focus(); + + if (this.options.afterUpdateElement) + this.options.afterUpdateElement(this.element, selectedElement); + }, + + updateChoices: function(choices) { + if(!this.changed && this.hasFocus) { + this.update.innerHTML = choices; + Element.cleanWhitespace(this.update); + Element.cleanWhitespace(this.update.down()); + + if(this.update.firstChild && this.update.down().childNodes) { + this.entryCount = + this.update.down().childNodes.length; + for (var i = 0; i < this.entryCount; i++) { + var entry = this.getEntry(i); + entry.autocompleteIndex = i; + this.addObservers(entry); + } + } else { + this.entryCount = 0; + } + + this.stopIndicator(); + this.index = 0; + + if(this.entryCount==1 && this.options.autoSelect) { + this.selectEntry(); + this.hide(); + } else { + this.render(); + } + } + }, + + addObservers: function(element) { + Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this)); + Event.observe(element, "click", this.onClick.bindAsEventListener(this)); + }, + + onObserverEvent: function() { + this.changed = false; + this.tokenBounds = null; + if(this.getToken().length>=this.options.minChars) { + this.getUpdatedChoices(); + } else { + this.active = false; + this.hide(); + } + this.oldElementValue = this.element.value; + }, + + getToken: function() { + var bounds = this.getTokenBounds(); + return this.element.value.substring(bounds[0], bounds[1]).strip(); + }, + + getTokenBounds: function() { + if (null != this.tokenBounds) return this.tokenBounds; + var value = this.element.value; + if (value.strip().empty()) return [-1, 0]; + var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue); + var offset = (diff == this.oldElementValue.length ? 1 : 0); + var prevTokenPos = -1, nextTokenPos = value.length; + var tp; + for (var index = 0, l = this.options.tokens.length; index < l; ++index) { + tp = value.lastIndexOf(this.options.tokens[index], diff + offset - 1); + if (tp > prevTokenPos) prevTokenPos = tp; + tp = value.indexOf(this.options.tokens[index], diff + offset); + if (-1 != tp && tp < nextTokenPos) nextTokenPos = tp; + } + return (this.tokenBounds = [prevTokenPos + 1, nextTokenPos]); + } +}); + +Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos = function(newS, oldS) { + var boundary = Math.min(newS.length, oldS.length); + for (var index = 0; index < boundary; ++index) + if (newS[index] != oldS[index]) + return index; + return boundary; +}; + +Ajax.Autocompleter = Class.create(Autocompleter.Base, { + initialize: function(element, update, url, options) { + this.baseInitialize(element, update, options); + this.options.asynchronous = true; + this.options.onComplete = this.onComplete.bind(this); + this.options.defaultParams = this.options.parameters || null; + this.url = url; + }, + + getUpdatedChoices: function() { + this.startIndicator(); + + var entry = encodeURIComponent(this.options.paramName) + '=' + + encodeURIComponent(this.getToken()); + + this.options.parameters = this.options.callback ? + this.options.callback(this.element, entry) : entry; + + if(this.options.defaultParams) + this.options.parameters += '&' + this.options.defaultParams; + + new Ajax.Request(this.url, this.options); + }, + + onComplete: function(request) { + this.updateChoices(request.responseText); + } +}); + +// The local array autocompleter. Used when you'd prefer to +// inject an array of autocompletion options into the page, rather +// than sending out Ajax queries, which can be quite slow sometimes. +// +// The constructor takes four parameters. The first two are, as usual, +// the id of the monitored textbox, and id of the autocompletion menu. +// The third is the array you want to autocomplete from, and the fourth +// is the options block. +// +// Extra local autocompletion options: +// - choices - How many autocompletion choices to offer +// +// - partialSearch - If false, the autocompleter will match entered +// text only at the beginning of strings in the +// autocomplete array. Defaults to true, which will +// match text at the beginning of any *word* in the +// strings in the autocomplete array. If you want to +// search anywhere in the string, additionally set +// the option fullSearch to true (default: off). +// +// - fullSsearch - Search anywhere in autocomplete array strings. +// +// - partialChars - How many characters to enter before triggering +// a partial match (unlike minChars, which defines +// how many characters are required to do any match +// at all). Defaults to 2. +// +// - ignoreCase - Whether to ignore case when autocompleting. +// Defaults to true. +// +// It's possible to pass in a custom function as the 'selector' +// option, if you prefer to write your own autocompletion logic. +// In that case, the other options above will not apply unless +// you support them. + +Autocompleter.Local = Class.create(Autocompleter.Base, { + initialize: function(element, update, array, options) { + this.baseInitialize(element, update, options); + this.options.array = array; + }, + + getUpdatedChoices: function() { + this.updateChoices(this.options.selector(this)); + }, + + setOptions: function(options) { + this.options = Object.extend({ + choices: 10, + partialSearch: true, + partialChars: 2, + ignoreCase: true, + fullSearch: false, + selector: function(instance) { + var ret = []; // Beginning matches + var partial = []; // Inside matches + var entry = instance.getToken(); + var count = 0; + + for (var i = 0; i < instance.options.array.length && + ret.length < instance.options.choices ; i++) { + + var elem = instance.options.array[i]; + var foundPos = instance.options.ignoreCase ? + elem.toLowerCase().indexOf(entry.toLowerCase()) : + elem.indexOf(entry); + + while (foundPos != -1) { + if (foundPos == 0 && elem.length != entry.length) { + ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + + elem.substr(entry.length) + "</li>"); + break; + } else if (entry.length >= instance.options.partialChars && + instance.options.partialSearch && foundPos != -1) { + if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { + partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" + + elem.substr(foundPos, entry.length) + "</strong>" + elem.substr( + foundPos + entry.length) + "</li>"); + break; + } + } + + foundPos = instance.options.ignoreCase ? + elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : + elem.indexOf(entry, foundPos + 1); + + } + } + if (partial.length) + ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)); + return "<ul>" + ret.join('') + "</ul>"; + } + }, options || { }); + } +}); + +// AJAX in-place editor and collection editor +// Full rewrite by Christophe Porteneuve <tdd@tddsworld.com> (April 2007). + +// Use this if you notice weird scrolling problems on some browsers, +// the DOM might be a bit confused when this gets called so do this +// waits 1 ms (with setTimeout) until it does the activation +Field.scrollFreeActivate = function(field) { + setTimeout(function() { + Field.activate(field); + }, 1); +}; + +Ajax.InPlaceEditor = Class.create({ + initialize: function(element, url, options) { + this.url = url; + this.element = element = $(element); + this.prepareOptions(); + this._controls = { }; + arguments.callee.dealWithDeprecatedOptions(options); // DEPRECATION LAYER!!! + Object.extend(this.options, options || { }); + if (!this.options.formId && this.element.id) { + this.options.formId = this.element.id + '-inplaceeditor'; + if ($(this.options.formId)) + this.options.formId = ''; + } + if (this.options.externalControl) + this.options.externalControl = $(this.options.externalControl); + if (!this.options.externalControl) + this.options.externalControlOnly = false; + this._originalBackground = this.element.getStyle('background-color') || 'transparent'; + this.element.title = this.options.clickToEditText; + this._boundCancelHandler = this.handleFormCancellation.bind(this); + this._boundComplete = (this.options.onComplete || Prototype.emptyFunction).bind(this); + this._boundFailureHandler = this.handleAJAXFailure.bind(this); + this._boundSubmitHandler = this.handleFormSubmission.bind(this); + this._boundWrapperHandler = this.wrapUp.bind(this); + this.registerListeners(); + }, + checkForEscapeOrReturn: function(e) { + if (!this._editing || e.ctrlKey || e.altKey || e.shiftKey) return; + if (Event.KEY_ESC == e.keyCode) + this.handleFormCancellation(e); + else if (Event.KEY_RETURN == e.keyCode) + this.handleFormSubmission(e); + }, + createControl: function(mode, handler, extraClasses) { + var control = this.options[mode + 'Control']; + var text = this.options[mode + 'Text']; + if ('button' == control) { + var btn = document.createElement('input'); + btn.type = 'submit'; + btn.value = text; + btn.className = 'editor_' + mode + '_button'; + if ('cancel' == mode) + btn.onclick = this._boundCancelHandler; + this._form.appendChild(btn); + this._controls[mode] = btn; + } else if ('link' == control) { + var link = document.createElement('a'); + link.href = '#'; + link.appendChild(document.createTextNode(text)); + link.onclick = 'cancel' == mode ? this._boundCancelHandler : this._boundSubmitHandler; + link.className = 'editor_' + mode + '_link'; + if (extraClasses) + link.className += ' ' + extraClasses; + this._form.appendChild(link); + this._controls[mode] = link; + } + }, + createEditField: function() { + var text = (this.options.loadTextURL ? this.options.loadingText : this.getText()); + var fld; + if (1 >= this.options.rows && !/\r|\n/.test(this.getText())) { + fld = document.createElement('input'); + fld.type = 'text'; + var size = this.options.size || this.options.cols || 0; + if (0 < size) fld.size = size; + } else { + fld = document.createElement('textarea'); + fld.rows = (1 >= this.options.rows ? this.options.autoRows : this.options.rows); + fld.cols = this.options.cols || 40; + } + fld.name = this.options.paramName; + fld.value = text; // No HTML breaks conversion anymore + fld.className = 'editor_field'; + if (this.options.submitOnBlur) + fld.onblur = this._boundSubmitHandler; + this._controls.editor = fld; + if (this.options.loadTextURL) + this.loadExternalText(); + this._form.appendChild(this._controls.editor); + }, + createForm: function() { + var ipe = this; + function addText(mode, condition) { + var text = ipe.options['text' + mode + 'Controls']; + if (!text || condition === false) return; + ipe._form.appendChild(document.createTextNode(text)); + }; + this._form = $(document.createElement('form')); + this._form.id = this.options.formId; + this._form.addClassName(this.options.formClassName); + this._form.onsubmit = this._boundSubmitHandler; + this.createEditField(); + if ('textarea' == this._controls.editor.tagName.toLowerCase()) + this._form.appendChild(document.createElement('br')); + if (this.options.onFormCustomization) + this.options.onFormCustomization(this, this._form); + addText('Before', this.options.okControl || this.options.cancelControl); + this.createControl('ok', this._boundSubmitHandler); + addText('Between', this.options.okControl && this.options.cancelControl); + this.createControl('cancel', this._boundCancelHandler, 'editor_cancel'); + addText('After', this.options.okControl || this.options.cancelControl); + }, + destroy: function() { + if (this._oldInnerHTML) + this.element.innerHTML = this._oldInnerHTML; + this.leaveEditMode(); + this.unregisterListeners(); + }, + enterEditMode: function(e) { + if (this._saving || this._editing) return; + this._editing = true; + this.triggerCallback('onEnterEditMode'); + if (this.options.externalControl) + this.options.externalControl.hide(); + this.element.hide(); + this.createForm(); + this.element.parentNode.insertBefore(this._form, this.element); + if (!this.options.loadTextURL) + this.postProcessEditField(); + if (e) Event.stop(e); + }, + enterHover: function(e) { + if (this.options.hoverClassName) + this.element.addClassName(this.options.hoverClassName); + if (this._saving) return; + this.triggerCallback('onEnterHover'); + }, + getText: function() { + return this.element.innerHTML.unescapeHTML(); + }, + handleAJAXFailure: function(transport) { + this.triggerCallback('onFailure', transport); + if (this._oldInnerHTML) { + this.element.innerHTML = this._oldInnerHTML; + this._oldInnerHTML = null; + } + }, + handleFormCancellation: function(e) { + this.wrapUp(); + if (e) Event.stop(e); + }, + handleFormSubmission: function(e) { + var form = this._form; + var value = $F(this._controls.editor); + this.prepareSubmission(); + var params = this.options.callback(form, value) || ''; + if (Object.isString(params)) + params = params.toQueryParams(); + params.editorId = this.element.id; + if (this.options.htmlResponse) { + var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions); + Object.extend(options, { + parameters: params, + onComplete: this._boundWrapperHandler, + onFailure: this._boundFailureHandler + }); + new Ajax.Updater({ success: this.element }, this.url, options); + } else { + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: params, + onComplete: this._boundWrapperHandler, + onFailure: this._boundFailureHandler + }); + new Ajax.Request(this.url, options); + } + if (e) Event.stop(e); + }, + leaveEditMode: function() { + this.element.removeClassName(this.options.savingClassName); + this.removeForm(); + this.leaveHover(); + this.element.style.backgroundColor = this._originalBackground; + this.element.show(); + if (this.options.externalControl) + this.options.externalControl.show(); + this._saving = false; + this._editing = false; + this._oldInnerHTML = null; + this.triggerCallback('onLeaveEditMode'); + }, + leaveHover: function(e) { + if (this.options.hoverClassName) + this.element.removeClassName(this.options.hoverClassName); + if (this._saving) return; + this.triggerCallback('onLeaveHover'); + }, + loadExternalText: function() { + this._form.addClassName(this.options.loadingClassName); + this._controls.editor.disabled = true; + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: 'editorId=' + encodeURIComponent(this.element.id), + onComplete: Prototype.emptyFunction, + onSuccess: function(transport) { + this._form.removeClassName(this.options.loadingClassName); + var text = transport.responseText; + if (this.options.stripLoadedTextTags) + text = text.stripTags(); + this._controls.editor.value = text; + this._controls.editor.disabled = false; + this.postProcessEditField(); + }.bind(this), + onFailure: this._boundFailureHandler + }); + new Ajax.Request(this.options.loadTextURL, options); + }, + postProcessEditField: function() { + var fpc = this.options.fieldPostCreation; + if (fpc) + $(this._controls.editor)['focus' == fpc ? 'focus' : 'activate'](); + }, + prepareOptions: function() { + this.options = Object.clone(Ajax.InPlaceEditor.DefaultOptions); + Object.extend(this.options, Ajax.InPlaceEditor.DefaultCallbacks); + [this._extraDefaultOptions].flatten().compact().each(function(defs) { + Object.extend(this.options, defs); + }.bind(this)); + }, + prepareSubmission: function() { + this._saving = true; + this.removeForm(); + this.leaveHover(); + this.showSaving(); + }, + registerListeners: function() { + this._listeners = { }; + var listener; + $H(Ajax.InPlaceEditor.Listeners).each(function(pair) { + listener = this[pair.value].bind(this); + this._listeners[pair.key] = listener; + if (!this.options.externalControlOnly) + this.element.observe(pair.key, listener); + if (this.options.externalControl) + this.options.externalControl.observe(pair.key, listener); + }.bind(this)); + }, + removeForm: function() { + if (!this._form) return; + this._form.remove(); + this._form = null; + this._controls = { }; + }, + showSaving: function() { + this._oldInnerHTML = this.element.innerHTML; + this.element.innerHTML = this.options.savingText; + this.element.addClassName(this.options.savingClassName); + this.element.style.backgroundColor = this._originalBackground; + this.element.show(); + }, + triggerCallback: function(cbName, arg) { + if ('function' == typeof this.options[cbName]) { + this.options[cbName](this, arg); + } + }, + unregisterListeners: function() { + $H(this._listeners).each(function(pair) { + if (!this.options.externalControlOnly) + this.element.stopObserving(pair.key, pair.value); + if (this.options.externalControl) + this.options.externalControl.stopObserving(pair.key, pair.value); + }.bind(this)); + }, + wrapUp: function(transport) { + this.leaveEditMode(); + // Can't use triggerCallback due to backward compatibility: requires + // binding + direct element + this._boundComplete(transport, this.element); + } +}); + +Object.extend(Ajax.InPlaceEditor.prototype, { + dispose: Ajax.InPlaceEditor.prototype.destroy +}); + +Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, { + initialize: function($super, element, url, options) { + this._extraDefaultOptions = Ajax.InPlaceCollectionEditor.DefaultOptions; + $super(element, url, options); + }, + + createEditField: function() { + var list = document.createElement('select'); + list.name = this.options.paramName; + list.size = 1; + this._controls.editor = list; + this._collection = this.options.collection || []; + if (this.options.loadCollectionURL) + this.loadCollection(); + else + this.checkForExternalText(); + this._form.appendChild(this._controls.editor); + }, + + loadCollection: function() { + this._form.addClassName(this.options.loadingClassName); + this.showLoadingText(this.options.loadingCollectionText); + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: 'editorId=' + encodeURIComponent(this.element.id), + onComplete: Prototype.emptyFunction, + onSuccess: function(transport) { + var js = transport.responseText.strip(); + if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check + throw('Server returned an invalid collection representation.'); + this._collection = eval(js); + this.checkForExternalText(); + }.bind(this), + onFailure: this.onFailure + }); + new Ajax.Request(this.options.loadCollectionURL, options); + }, + + showLoadingText: function(text) { + this._controls.editor.disabled = true; + var tempOption = this._controls.editor.firstChild; + if (!tempOption) { + tempOption = document.createElement('option'); + tempOption.value = ''; + this._controls.editor.appendChild(tempOption); + tempOption.selected = true; + } + tempOption.update((text || '').stripScripts().stripTags()); + }, + + checkForExternalText: function() { + this._text = this.getText(); + if (this.options.loadTextURL) + this.loadExternalText(); + else + this.buildOptionList(); + }, + + loadExternalText: function() { + this.showLoadingText(this.options.loadingText); + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: 'editorId=' + encodeURIComponent(this.element.id), + onComplete: Prototype.emptyFunction, + onSuccess: function(transport) { + this._text = transport.responseText.strip(); + this.buildOptionList(); + }.bind(this), + onFailure: this.onFailure + }); + new Ajax.Request(this.options.loadTextURL, options); + }, + + buildOptionList: function() { + this._form.removeClassName(this.options.loadingClassName); + this._collection = this._collection.map(function(entry) { + return 2 === entry.length ? entry : [entry, entry].flatten(); + }); + var marker = ('value' in this.options) ? this.options.value : this._text; + var textFound = this._collection.any(function(entry) { + return entry[0] == marker; + }.bind(this)); + this._controls.editor.update(''); + var option; + this._collection.each(function(entry, index) { + option = document.createElement('option'); + option.value = entry[0]; + option.selected = textFound ? entry[0] == marker : 0 == index; + option.appendChild(document.createTextNode(entry[1])); + this._controls.editor.appendChild(option); + }.bind(this)); + this._controls.editor.disabled = false; + Field.scrollFreeActivate(this._controls.editor); + } +}); + +//**** DEPRECATION LAYER FOR InPlace[Collection]Editor! **** +//**** This only exists for a while, in order to let **** +//**** users adapt to the new API. Read up on the new **** +//**** API and convert your code to it ASAP! **** + +Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions = function(options) { + if (!options) return; + function fallback(name, expr) { + if (name in options || expr === undefined) return; + options[name] = expr; + }; + fallback('cancelControl', (options.cancelLink ? 'link' : (options.cancelButton ? 'button' : + options.cancelLink == options.cancelButton == false ? false : undefined))); + fallback('okControl', (options.okLink ? 'link' : (options.okButton ? 'button' : + options.okLink == options.okButton == false ? false : undefined))); + fallback('highlightColor', options.highlightcolor); + fallback('highlightEndColor', options.highlightendcolor); +}; + +Object.extend(Ajax.InPlaceEditor, { + DefaultOptions: { + ajaxOptions: { }, + autoRows: 3, // Use when multi-line w/ rows == 1 + cancelControl: 'link', // 'link'|'button'|false + cancelText: 'cancel', + clickToEditText: 'Click to edit', + externalControl: null, // id|elt + externalControlOnly: false, + fieldPostCreation: 'activate', // 'activate'|'focus'|false + formClassName: 'inplaceeditor-form', + formId: null, // id|elt + highlightColor: '#ffff99', + highlightEndColor: '#ffffff', + hoverClassName: '', + htmlResponse: true, + loadingClassName: 'inplaceeditor-loading', + loadingText: 'Loading...', + okControl: 'button', // 'link'|'button'|false + okText: 'ok', + paramName: 'value', + rows: 1, // If 1 and multi-line, uses autoRows + savingClassName: 'inplaceeditor-saving', + savingText: 'Saving...', + size: 0, + stripLoadedTextTags: false, + submitOnBlur: false, + textAfterControls: '', + textBeforeControls: '', + textBetweenControls: '' + }, + DefaultCallbacks: { + callback: function(form) { + return Form.serialize(form); + }, + onComplete: function(transport, element) { + // For backward compatibility, this one is bound to the IPE, and passes + // the element directly. It was too often customized, so we don't break it. + new Effect.Highlight(element, { + startcolor: this.options.highlightColor, keepBackgroundImage: true }); + }, + onEnterEditMode: null, + onEnterHover: function(ipe) { + ipe.element.style.backgroundColor = ipe.options.highlightColor; + if (ipe._effect) + ipe._effect.cancel(); + }, + onFailure: function(transport, ipe) { + alert('Error communication with the server: ' + transport.responseText.stripTags()); + }, + onFormCustomization: null, // Takes the IPE and its generated form, after editor, before controls. + onLeaveEditMode: null, + onLeaveHover: function(ipe) { + ipe._effect = new Effect.Highlight(ipe.element, { + startcolor: ipe.options.highlightColor, endcolor: ipe.options.highlightEndColor, + restorecolor: ipe._originalBackground, keepBackgroundImage: true + }); + } + }, + Listeners: { + click: 'enterEditMode', + keydown: 'checkForEscapeOrReturn', + mouseover: 'enterHover', + mouseout: 'leaveHover' + } +}); + +Ajax.InPlaceCollectionEditor.DefaultOptions = { + loadingCollectionText: 'Loading options...' +}; + +// Delayed observer, like Form.Element.Observer, +// but waits for delay after last key input +// Ideal for live-search fields + +Form.Element.DelayedObserver = Class.create({ + initialize: function(element, delay, callback) { + this.delay = delay || 0.5; + this.element = $(element); + this.callback = callback; + this.timer = null; + this.lastValue = $F(this.element); + Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this)); + }, + delayedListener: function(event) { + if(this.lastValue == $F(this.element)) return; + if(this.timer) clearTimeout(this.timer); + this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000); + this.lastValue = $F(this.element); + }, + onTimerEvent: function() { + this.timer = null; + this.callback(this.element, $F(this.element)); + } +}); \ No newline at end of file diff --git a/html/js/dragdrop.js b/html/js/dragdrop.js new file mode 100644 index 000000000..f23017650 --- /dev/null +++ b/html/js/dragdrop.js @@ -0,0 +1,984 @@ +// script.aculo.us dragdrop.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008 + +// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// (c) 2005-2007 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz) +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +if(Object.isUndefined(Effect)) + throw("dragdrop.js requires including script.aculo.us' effects.js library"); + +var Droppables = { + drops: [], + + remove: function(element) { + this.drops = this.drops.reject(function(d) { return d.element==$(element) }); + }, + + add: function(element) { + element = $(element); + var options = Object.extend({ + greedy: true, + hoverclass: null, + tree: false, + scrollid: null + }, arguments[1] || { }); + + // cache containers + if(options.containment) { + options._containers = []; + var containment = options.containment; + if(Object.isArray(containment)) { + containment.each( function(c) { options._containers.push($(c)) }); + } else { + options._containers.push($(containment)); + } + } + + if(options.accept) options.accept = [options.accept].flatten(); + + Element.makePositioned(element); // fix IE + options.element = element; + + this.drops.push(options); + }, + + findDeepestChild: function(drops) { + deepest = drops[0]; + + for (i = 1; i < drops.length; ++i) + if (Element.isParent(drops[i].element, deepest.element)) + deepest = drops[i]; + + return deepest; + }, + + isContained: function(element, drop) { + var containmentNode; + if(drop.tree) { + containmentNode = element.treeNode; + } else { + containmentNode = element.parentNode; + } + return drop._containers.detect(function(c) { return containmentNode == c }); + }, + + isAffected: function(point, element, drop) { + if( drop.scrollid ){ + Position.includeScrollOffsets = true; + scrolling_element = $(drop.scrollid) + var container_off = Element.cumulativeOffset(scrolling_element); + if( point[1] < container_off[1] || point[1] > Element.getHeight(scrolling_element) + container_off[1]) + {return false;} + else if( point[0] < container_off[0] || point[0] > Element.getWidth(scrolling_element) + container_off[0]) + {return false;} + } + return ( + (drop.element!=element) && + ((!drop._containers) || + this.isContained(element, drop)) && + ((!drop.accept) || + (Element.classNames(element).detect( + function(v) { return drop.accept.include(v) } ) )) && + Position.within(drop.element, point[0], point[1]) ); + }, + + deactivate: function(drop) { + if(drop.hoverclass) + Element.removeClassName(drop.element, drop.hoverclass); + this.last_active = null; + }, + + activate: function(drop) { + if(drop.hoverclass) + Element.addClassName(drop.element, drop.hoverclass); + this.last_active = drop; + }, + + show: function(point, element) { + if(!this.drops.length) return; + var drop, affected = []; + + this.drops.each( function(drop) { + if(Droppables.isAffected(point, element, drop)) + affected.push(drop); + }); + + if(affected.length>0) + drop = Droppables.findDeepestChild(affected); + + if(this.last_active && this.last_active != drop) this.deactivate(this.last_active); + if (drop) { + Position.within(drop.element, point[0], point[1]); + if(drop.onHover) + drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element)); + + if (drop != this.last_active) Droppables.activate(drop); + } + }, + + fire: function(event, element) { + if(!this.last_active) return; + Position.prepare(); + + if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active)) + if (this.last_active.onDrop) { + this.last_active.onDrop(element, this.last_active.element, event); + return true; + } + }, + + reset: function() { + if(this.last_active) + this.deactivate(this.last_active); + } +} + +var Draggables = { + drags: [], + observers: [], + + register: function(draggable) { + if(this.drags.length == 0) { + this.eventMouseUp = this.endDrag.bindAsEventListener(this); + this.eventMouseMove = this.updateDrag.bindAsEventListener(this); + this.eventKeypress = this.keyPress.bindAsEventListener(this); + + Event.observe(document, "mouseup", this.eventMouseUp); + Event.observe(document, "mousemove", this.eventMouseMove); + Event.observe(document, "keypress", this.eventKeypress); + } + this.drags.push(draggable); + }, + + unregister: function(draggable) { + this.drags = this.drags.reject(function(d) { return d==draggable }); + if(this.drags.length == 0) { + Event.stopObserving(document, "mouseup", this.eventMouseUp); + Event.stopObserving(document, "mousemove", this.eventMouseMove); + Event.stopObserving(document, "keypress", this.eventKeypress); + } + }, + + activate: function(draggable) { + if(draggable.options.delay) { + this._timeout = setTimeout(function() { + Draggables._timeout = null; + window.focus(); + Draggables.activeDraggable = draggable; + }.bind(this), draggable.options.delay); + } else { + window.focus(); // allows keypress events if window isn't currently focused, fails for Safari + this.activeDraggable = draggable; + } + }, + + deactivate: function() { + this.activeDraggable = null; + }, + + updateDrag: function(event) { + if(!this.activeDraggable) return; + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + // Mozilla-based browsers fire successive mousemove events with + // the same coordinates, prevent needless redrawing (moz bug?) + if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return; + this._lastPointer = pointer; + + this.activeDraggable.updateDrag(event, pointer); + }, + + endDrag: function(event) { + if(this._timeout) { + clearTimeout(this._timeout); + this._timeout = null; + } + if(!this.activeDraggable) return; + this._lastPointer = null; + this.activeDraggable.endDrag(event); + this.activeDraggable = null; + }, + + keyPress: function(event) { + if(this.activeDraggable) + this.activeDraggable.keyPress(event); + }, + + addObserver: function(observer) { + this.observers.push(observer); + this._cacheObserverCallbacks(); + }, + + removeObserver: function(element) { // element instead of observer fixes mem leaks + this.observers = this.observers.reject( function(o) { return o.element==element }); + this._cacheObserverCallbacks(); + }, + + notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag' + if(this[eventName+'Count'] > 0) + this.observers.each( function(o) { + if(o[eventName]) o[eventName](eventName, draggable, event); + }); + if(draggable.options[eventName]) draggable.options[eventName](draggable, event); + }, + + _cacheObserverCallbacks: function() { + ['onStart','onEnd','onDrag'].each( function(eventName) { + Draggables[eventName+'Count'] = Draggables.observers.select( + function(o) { return o[eventName]; } + ).length; + }); + } +} + +/*--------------------------------------------------------------------------*/ + +var Draggable = Class.create({ + initialize: function(element) { + var defaults = { + handle: false, + reverteffect: function(element, top_offset, left_offset) { + var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; + new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, + queue: {scope:'_draggable', position:'end'} + }); + }, + endeffect: function(element) { + var toOpacity = Object.isNumber(element._opacity) ? element._opacity : 1.0; + new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity, + queue: {scope:'_draggable', position:'end'}, + afterFinish: function(){ + Draggable._dragging[element] = false + } + }); + }, + zindex: 1000, + revert: false, + quiet: false, + scroll: false, + scrollSensitivity: 20, + scrollSpeed: 15, + snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] } + delay: 0 + }; + + if(!arguments[1] || Object.isUndefined(arguments[1].endeffect)) + Object.extend(defaults, { + starteffect: function(element) { + element._opacity = Element.getOpacity(element); + Draggable._dragging[element] = true; + new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7}); + } + }); + + var options = Object.extend(defaults, arguments[1] || { }); + + this.element = $(element); + + if(options.handle && Object.isString(options.handle)) + this.handle = this.element.down('.'+options.handle, 0); + + if(!this.handle) this.handle = $(options.handle); + if(!this.handle) this.handle = this.element; + + if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) { + options.scroll = $(options.scroll); + this._isScrollChild = Element.childOf(this.element, options.scroll); + } + + Element.makePositioned(this.element); // fix IE + + this.options = options; + this.dragging = false; + + this.eventMouseDown = this.initDrag.bindAsEventListener(this); + Event.observe(this.handle, "mousedown", this.eventMouseDown); + + Draggables.register(this); + }, + + destroy: function() { + Event.stopObserving(this.handle, "mousedown", this.eventMouseDown); + Draggables.unregister(this); + }, + + currentDelta: function() { + return([ + parseInt(Element.getStyle(this.element,'left') || '0'), + parseInt(Element.getStyle(this.element,'top') || '0')]); + }, + + initDrag: function(event) { + if(!Object.isUndefined(Draggable._dragging[this.element]) && + Draggable._dragging[this.element]) return; + if(Event.isLeftClick(event)) { + // abort on form elements, fixes a Firefox issue + var src = Event.element(event); + if((tag_name = src.tagName.toUpperCase()) && ( + tag_name=='INPUT' || + tag_name=='SELECT' || + tag_name=='OPTION' || + tag_name=='BUTTON' || + tag_name=='TEXTAREA')) return; + + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + var pos = Position.cumulativeOffset(this.element); + this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); + + Draggables.activate(this); + Event.stop(event); + } + }, + + startDrag: function(event) { + this.dragging = true; + if(!this.delta) + this.delta = this.currentDelta(); + + if(this.options.zindex) { + this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0); + this.element.style.zIndex = this.options.zindex; + } + + if(this.options.ghosting) { + this._clone = this.element.cloneNode(true); + this.element._originallyAbsolute = (this.element.getStyle('position') == 'absolute'); + if (!this.element._originallyAbsolute) + Position.absolutize(this.element); + this.element.parentNode.insertBefore(this._clone, this.element); + } + + if(this.options.scroll) { + if (this.options.scroll == window) { + var where = this._getWindowScroll(this.options.scroll); + this.originalScrollLeft = where.left; + this.originalScrollTop = where.top; + } else { + this.originalScrollLeft = this.options.scroll.scrollLeft; + this.originalScrollTop = this.options.scroll.scrollTop; + } + } + + Draggables.notify('onStart', this, event); + + if(this.options.starteffect) this.options.starteffect(this.element); + }, + + updateDrag: function(event, pointer) { + if(!this.dragging) this.startDrag(event); + + if(!this.options.quiet){ + Position.prepare(); + Droppables.show(pointer, this.element); + } + + Draggables.notify('onDrag', this, event); + + this.draw(pointer); + if(this.options.change) this.options.change(this); + + if(this.options.scroll) { + this.stopScrolling(); + + var p; + if (this.options.scroll == window) { + with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; } + } else { + p = Position.page(this.options.scroll); + p[0] += this.options.scroll.scrollLeft + Position.deltaX; + p[1] += this.options.scroll.scrollTop + Position.deltaY; + p.push(p[0]+this.options.scroll.offsetWidth); + p.push(p[1]+this.options.scroll.offsetHeight); + } + var speed = [0,0]; + if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity); + if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity); + if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity); + if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity); + this.startScrolling(speed); + } + + // fix AppleWebKit rendering + if(Prototype.Browser.WebKit) window.scrollBy(0,0); + + Event.stop(event); + }, + + finishDrag: function(event, success) { + this.dragging = false; + + if(this.options.quiet){ + Position.prepare(); + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + Droppables.show(pointer, this.element); + } + + if(this.options.ghosting) { + if (!this.element._originallyAbsolute) + Position.relativize(this.element); + delete this.element._originallyAbsolute; + Element.remove(this._clone); + this._clone = null; + } + + var dropped = false; + if(success) { + dropped = Droppables.fire(event, this.element); + if (!dropped) dropped = false; + } + if(dropped && this.options.onDropped) this.options.onDropped(this.element); + Draggables.notify('onEnd', this, event); + + var revert = this.options.revert; + if(revert && Object.isFunction(revert)) revert = revert(this.element); + + var d = this.currentDelta(); + if(revert && this.options.reverteffect) { + if (dropped == 0 || revert != 'failure') + this.options.reverteffect(this.element, + d[1]-this.delta[1], d[0]-this.delta[0]); + } else { + this.delta = d; + } + + if(this.options.zindex) + this.element.style.zIndex = this.originalZ; + + if(this.options.endeffect) + this.options.endeffect(this.element); + + Draggables.deactivate(this); + Droppables.reset(); + }, + + keyPress: function(event) { + if(event.keyCode!=Event.KEY_ESC) return; + this.finishDrag(event, false); + Event.stop(event); + }, + + endDrag: function(event) { + if(!this.dragging) return; + this.stopScrolling(); + this.finishDrag(event, true); + Event.stop(event); + }, + + draw: function(point) { + var pos = Position.cumulativeOffset(this.element); + if(this.options.ghosting) { + var r = Position.realOffset(this.element); + pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; + } + + var d = this.currentDelta(); + pos[0] -= d[0]; pos[1] -= d[1]; + + if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) { + pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft; + pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop; + } + + var p = [0,1].map(function(i){ + return (point[i]-pos[i]-this.offset[i]) + }.bind(this)); + + if(this.options.snap) { + if(Object.isFunction(this.options.snap)) { + p = this.options.snap(p[0],p[1],this); + } else { + if(Object.isArray(this.options.snap)) { + p = p.map( function(v, i) { + return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this)) + } else { + p = p.map( function(v) { + return (v/this.options.snap).round()*this.options.snap }.bind(this)) + } + }} + + var style = this.element.style; + if((!this.options.constraint) || (this.options.constraint=='horizontal')) + style.left = p[0] + "px"; + if((!this.options.constraint) || (this.options.constraint=='vertical')) + style.top = p[1] + "px"; + + if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering + }, + + stopScrolling: function() { + if(this.scrollInterval) { + clearInterval(this.scrollInterval); + this.scrollInterval = null; + Draggables._lastScrollPointer = null; + } + }, + + startScrolling: function(speed) { + if(!(speed[0] || speed[1])) return; + this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed]; + this.lastScrolled = new Date(); + this.scrollInterval = setInterval(this.scroll.bind(this), 10); + }, + + scroll: function() { + var current = new Date(); + var delta = current - this.lastScrolled; + this.lastScrolled = current; + if(this.options.scroll == window) { + with (this._getWindowScroll(this.options.scroll)) { + if (this.scrollSpeed[0] || this.scrollSpeed[1]) { + var d = delta / 1000; + this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] ); + } + } + } else { + this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000; + this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000; + } + + Position.prepare(); + Droppables.show(Draggables._lastPointer, this.element); + Draggables.notify('onDrag', this); + if (this._isScrollChild) { + Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer); + Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000; + Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000; + if (Draggables._lastScrollPointer[0] < 0) + Draggables._lastScrollPointer[0] = 0; + if (Draggables._lastScrollPointer[1] < 0) + Draggables._lastScrollPointer[1] = 0; + this.draw(Draggables._lastScrollPointer); + } + + if(this.options.change) this.options.change(this); + }, + + _getWindowScroll: function(w) { + var T, L, W, H; + with (w.document) { + if (w.document.documentElement && documentElement.scrollTop) { + T = documentElement.scrollTop; + L = documentElement.scrollLeft; + } else if (w.document.body) { + T = body.scrollTop; + L = body.scrollLeft; + } + if (w.innerWidth) { + W = w.innerWidth; + H = w.innerHeight; + } else if (w.document.documentElement && documentElement.clientWidth) { + W = documentElement.clientWidth; + H = documentElement.clientHeight; + } else { + W = body.offsetWidth; + H = body.offsetHeight + } + } + return { top: T, left: L, width: W, height: H }; + } +}); + +Draggable._dragging = { }; + +/*--------------------------------------------------------------------------*/ + +var SortableObserver = Class.create({ + initialize: function(element, observer) { + this.element = $(element); + this.observer = observer; + this.lastValue = Sortable.serialize(this.element); + }, + + onStart: function() { + this.lastValue = Sortable.serialize(this.element); + }, + + onEnd: function() { + Sortable.unmark(); + if(this.lastValue != Sortable.serialize(this.element)) + this.observer(this.element) + } +}); + +var Sortable = { + SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/, + + sortables: { }, + + _findRootElement: function(element) { + while (element.tagName.toUpperCase() != "BODY") { + if(element.id && Sortable.sortables[element.id]) return element; + element = element.parentNode; + } + }, + + options: function(element) { + element = Sortable._findRootElement($(element)); + if(!element) return; + return Sortable.sortables[element.id]; + }, + + destroy: function(element){ + var s = Sortable.options(element); + + if(s) { + Draggables.removeObserver(s.element); + s.droppables.each(function(d){ Droppables.remove(d) }); + s.draggables.invoke('destroy'); + + delete Sortable.sortables[s.element.id]; + } + }, + + create: function(element) { + element = $(element); + var options = Object.extend({ + element: element, + tag: 'li', // assumes li children, override with tag: 'tagname' + dropOnEmpty: false, + tree: false, + treeTag: 'ul', + overlap: 'vertical', // one of 'vertical', 'horizontal' + constraint: 'vertical', // one of 'vertical', 'horizontal', false + containment: element, // also takes array of elements (or id's); or false + handle: false, // or a CSS class + only: false, + delay: 0, + hoverclass: null, + ghosting: false, + quiet: false, + scroll: false, + scrollSensitivity: 20, + scrollSpeed: 15, + format: this.SERIALIZE_RULE, + + // these take arrays of elements or ids and can be + // used for better initialization performance + elements: false, + handles: false, + + onChange: Prototype.emptyFunction, + onUpdate: Prototype.emptyFunction + }, arguments[1] || { }); + + // clear any old sortable with same element + this.destroy(element); + + // build options for the draggables + var options_for_draggable = { + revert: true, + quiet: options.quiet, + scroll: options.scroll, + scrollSpeed: options.scrollSpeed, + scrollSensitivity: options.scrollSensitivity, + delay: options.delay, + ghosting: options.ghosting, + constraint: options.constraint, + handle: options.handle }; + + if(options.starteffect) + options_for_draggable.starteffect = options.starteffect; + + if(options.reverteffect) + options_for_draggable.reverteffect = options.reverteffect; + else + if(options.ghosting) options_for_draggable.reverteffect = function(element) { + element.style.top = 0; + element.style.left = 0; + }; + + if(options.endeffect) + options_for_draggable.endeffect = options.endeffect; + + if(options.zindex) + options_for_draggable.zindex = options.zindex; + + // build options for the droppables + var options_for_droppable = { + overlap: options.overlap, + containment: options.containment, + tree: options.tree, + hoverclass: options.hoverclass, + onHover: Sortable.onHover + } + + var options_for_tree = { + onHover: Sortable.onEmptyHover, + overlap: options.overlap, + containment: options.containment, + hoverclass: options.hoverclass + } + + // fix for gecko engine + Element.cleanWhitespace(element); + + options.draggables = []; + options.droppables = []; + + // drop on empty handling + if(options.dropOnEmpty || options.tree) { + Droppables.add(element, options_for_tree); + options.droppables.push(element); + } + + (options.elements || this.findElements(element, options) || []).each( function(e,i) { + var handle = options.handles ? $(options.handles[i]) : + (options.handle ? $(e).select('.' + options.handle)[0] : e); + options.draggables.push( + new Draggable(e, Object.extend(options_for_draggable, { handle: handle }))); + Droppables.add(e, options_for_droppable); + if(options.tree) e.treeNode = element; + options.droppables.push(e); + }); + + if(options.tree) { + (Sortable.findTreeElements(element, options) || []).each( function(e) { + Droppables.add(e, options_for_tree); + e.treeNode = element; + options.droppables.push(e); + }); + } + + // keep reference + this.sortables[element.id] = options; + + // for onupdate + Draggables.addObserver(new SortableObserver(element, options.onUpdate)); + + }, + + // return all suitable-for-sortable elements in a guaranteed order + findElements: function(element, options) { + return Element.findChildren( + element, options.only, options.tree ? true : false, options.tag); + }, + + findTreeElements: function(element, options) { + return Element.findChildren( + element, options.only, options.tree ? true : false, options.treeTag); + }, + + onHover: function(element, dropon, overlap) { + if(Element.isParent(dropon, element)) return; + + if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) { + return; + } else if(overlap>0.5) { + Sortable.mark(dropon, 'before'); + if(dropon.previousSibling != element) { + var oldParentNode = element.parentNode; + element.style.visibility = "hidden"; // fix gecko rendering + dropon.parentNode.insertBefore(element, dropon); + if(dropon.parentNode!=oldParentNode) + Sortable.options(oldParentNode).onChange(element); + Sortable.options(dropon.parentNode).onChange(element); + } + } else { + Sortable.mark(dropon, 'after'); + var nextElement = dropon.nextSibling || null; + if(nextElement != element) { + var oldParentNode = element.parentNode; + element.style.visibility = "hidden"; // fix gecko rendering + dropon.parentNode.insertBefore(element, nextElement); + if(dropon.parentNode!=oldParentNode) + Sortable.options(oldParentNode).onChange(element); + Sortable.options(dropon.parentNode).onChange(element); + } + } + }, + + onEmptyHover: function(element, dropon, overlap) { + var oldParentNode = element.parentNode; + var droponOptions = Sortable.options(dropon); + + if(!Element.isParent(dropon, element)) { + var index; + + var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only}); + var child = null; + + if(children) { + var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap); + + for (index = 0; index < children.length; index += 1) { + if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) { + offset -= Element.offsetSize (children[index], droponOptions.overlap); + } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) { + child = index + 1 < children.length ? children[index + 1] : null; + break; + } else { + child = children[index]; + break; + } + } + } + + dropon.insertBefore(element, child); + + Sortable.options(oldParentNode).onChange(element); + droponOptions.onChange(element); + } + }, + + unmark: function() { + if(Sortable._marker) Sortable._marker.hide(); + }, + + mark: function(dropon, position) { + // mark on ghosting only + var sortable = Sortable.options(dropon.parentNode); + if(sortable && !sortable.ghosting) return; + + if(!Sortable._marker) { + Sortable._marker = + ($('dropmarker') || Element.extend(document.createElement('DIV'))). + hide().addClassName('dropmarker').setStyle({position:'absolute'}); + document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); + } + var offsets = Position.cumulativeOffset(dropon); + Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'}); + + if(position=='after') + if(sortable.overlap == 'horizontal') + Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'}); + else + Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'}); + + Sortable._marker.show(); + }, + + _tree: function(element, options, parent) { + var children = Sortable.findElements(element, options) || []; + + for (var i = 0; i < children.length; ++i) { + var match = children[i].id.match(options.format); + + if (!match) continue; + + var child = { + id: encodeURIComponent(match ? match[1] : null), + element: element, + parent: parent, + children: [], + position: parent.children.length, + container: $(children[i]).down(options.treeTag) + } + + /* Get the element containing the children and recurse over it */ + if (child.container) + this._tree(child.container, options, child) + + parent.children.push (child); + } + + return parent; + }, + + tree: function(element) { + element = $(element); + var sortableOptions = this.options(element); + var options = Object.extend({ + tag: sortableOptions.tag, + treeTag: sortableOptions.treeTag, + only: sortableOptions.only, + name: element.id, + format: sortableOptions.format + }, arguments[1] || { }); + + var root = { + id: null, + parent: null, + children: [], + container: element, + position: 0 + } + + return Sortable._tree(element, options, root); + }, + + /* Construct a [i] index for a particular node */ + _constructIndex: function(node) { + var index = ''; + do { + if (node.id) index = '[' + node.position + ']' + index; + } while ((node = node.parent) != null); + return index; + }, + + sequence: function(element) { + element = $(element); + var options = Object.extend(this.options(element), arguments[1] || { }); + + return $(this.findElements(element, options) || []).map( function(item) { + return item.id.match(options.format) ? item.id.match(options.format)[1] : ''; + }); + }, + + setSequence: function(element, new_sequence) { + element = $(element); + var options = Object.extend(this.options(element), arguments[2] || { }); + + var nodeMap = { }; + this.findElements(element, options).each( function(n) { + if (n.id.match(options.format)) + nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; + n.parentNode.removeChild(n); + }); + + new_sequence.each(function(ident) { + var n = nodeMap[ident]; + if (n) { + n[1].appendChild(n[0]); + delete nodeMap[ident]; + } + }); + }, + + serialize: function(element) { + element = $(element); + var options = Object.extend(Sortable.options(element), arguments[1] || { }); + var name = encodeURIComponent( + (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); + + if (options.tree) { + return Sortable.tree(element, arguments[1]).children.map( function (item) { + return [name + Sortable._constructIndex(item) + "[id]=" + + encodeURIComponent(item.id)].concat(item.children.map(arguments.callee)); + }).flatten().join('&'); + } else { + return Sortable.sequence(element, arguments[1]).map( function(item) { + return name + "[]=" + encodeURIComponent(item); + }).join('&'); + } + } +} + +// Returns true if child is contained within element +Element.isParent = function(child, element) { + if (!child.parentNode || child == element) return false; + if (child.parentNode == element) return true; + return Element.isParent(child.parentNode, element); +} + +Element.findChildren = function(element, only, recursive, tagName) { + if(!element.hasChildNodes()) return null; + tagName = tagName.toUpperCase(); + if(only) only = [only].flatten(); + var elements = []; + $A(element.childNodes).each( function(e) { + if(e.tagName && e.tagName.toUpperCase()==tagName && + (!only || (Element.classNames(e).detect(function(v) { return only.include(v) })))) + elements.push(e); + if(recursive) { + var grandchildren = Element.findChildren(e, only, recursive, tagName); + if(grandchildren) elements.push(grandchildren); + } + }); + + return (elements.length>0 ? elements.flatten() : []); +} + +Element.offsetSize = function (element, type) { + return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')]; +} diff --git a/html/js/effects.js b/html/js/effects.js new file mode 100644 index 000000000..066ee5909 --- /dev/null +++ b/html/js/effects.js @@ -0,0 +1,1123 @@ +// script.aculo.us effects.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// Contributors: +// Justin Palmer (http://encytemedia.com/) +// Mark Pilgrim (http://diveintomark.org/) +// Martin Bialasinki +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +// converts rgb() and #xxx to #xxxxxx format, +// returns self (or first argument) if not convertable +String.prototype.parseColor = function() { + var color = '#'; + if (this.slice(0,4) == 'rgb(') { + var cols = this.slice(4,this.length-1).split(','); + var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3); + } else { + if (this.slice(0,1) == '#') { + if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); + if (this.length==7) color = this.toLowerCase(); + } + } + return (color.length==7 ? color : (arguments[0] || this)); +}; + +/*--------------------------------------------------------------------------*/ + +Element.collectTextNodes = function(element) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); + }).flatten().join(''); +}; + +Element.collectTextNodesIgnoreClass = function(element, className) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? + Element.collectTextNodesIgnoreClass(node, className) : '')); + }).flatten().join(''); +}; + +Element.setContentZoom = function(element, percent) { + element = $(element); + element.setStyle({fontSize: (percent/100) + 'em'}); + if (Prototype.Browser.WebKit) window.scrollBy(0,0); + return element; +}; + +Element.getInlineOpacity = function(element){ + return $(element).style.opacity || ''; +}; + +Element.forceRerendering = function(element) { + try { + element = $(element); + var n = document.createTextNode(' '); + element.appendChild(n); + element.removeChild(n); + } catch(e) { } +}; + +/*--------------------------------------------------------------------------*/ + +var Effect = { + _elementDoesNotExistError: { + name: 'ElementDoesNotExistError', + message: 'The specified DOM element does not exist, but is required for this effect to operate' + }, + Transitions: { + linear: Prototype.K, + sinoidal: function(pos) { + return (-Math.cos(pos*Math.PI)/2) + .5; + }, + reverse: function(pos) { + return 1-pos; + }, + flicker: function(pos) { + var pos = ((-Math.cos(pos*Math.PI)/4) + .75) + Math.random()/4; + return pos > 1 ? 1 : pos; + }, + wobble: function(pos) { + return (-Math.cos(pos*Math.PI*(9*pos))/2) + .5; + }, + pulse: function(pos, pulses) { + return (-Math.cos((pos*((pulses||5)-.5)*2)*Math.PI)/2) + .5; + }, + spring: function(pos) { + return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6)); + }, + none: function(pos) { + return 0; + }, + full: function(pos) { + return 1; + } + }, + DefaultOptions: { + duration: 1.0, // seconds + fps: 100, // 100= assume 66fps max. + sync: false, // true for combining + from: 0.0, + to: 1.0, + delay: 0.0, + queue: 'parallel' + }, + tagifyText: function(element) { + var tagifyStyle = 'position:relative'; + if (Prototype.Browser.IE) tagifyStyle += ';zoom:1'; + + element = $(element); + $A(element.childNodes).each( function(child) { + if (child.nodeType==3) { + child.nodeValue.toArray().each( function(character) { + element.insertBefore( + new Element('span', {style: tagifyStyle}).update( + character == ' ' ? String.fromCharCode(160) : character), + child); + }); + Element.remove(child); + } + }); + }, + multiple: function(element, effect) { + var elements; + if (((typeof element == 'object') || + Object.isFunction(element)) && + (element.length)) + elements = element; + else + elements = $(element).childNodes; + + var options = Object.extend({ + speed: 0.1, + delay: 0.0 + }, arguments[2] || { }); + var masterDelay = options.delay; + + $A(elements).each( function(element, index) { + new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); + }); + }, + PAIRS: { + 'slide': ['SlideDown','SlideUp'], + 'blind': ['BlindDown','BlindUp'], + 'appear': ['Appear','Fade'] + }, + toggle: function(element, effect, options) { + element = $(element); + effect = (effect || 'appear').toLowerCase(); + + return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({ + queue: { position:'end', scope:(element.id || 'global'), limit: 1 } + }, options || {})); + } +}; + +Effect.DefaultOptions.transition = Effect.Transitions.sinoidal; + +/* ------------- core effects ------------- */ + +Effect.ScopedQueue = Class.create(Enumerable, { + initialize: function() { + this.effects = []; + this.interval = null; + }, + _each: function(iterator) { + this.effects._each(iterator); + }, + add: function(effect) { + var timestamp = new Date().getTime(); + + var position = Object.isString(effect.options.queue) ? + effect.options.queue : effect.options.queue.position; + + switch(position) { + case 'front': + // move unstarted effects after this effect + this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { + e.startOn += effect.finishOn; + e.finishOn += effect.finishOn; + }); + break; + case 'with-last': + timestamp = this.effects.pluck('startOn').max() || timestamp; + break; + case 'end': + // start effect after last queued effect has finished + timestamp = this.effects.pluck('finishOn').max() || timestamp; + break; + } + + effect.startOn += timestamp; + effect.finishOn += timestamp; + + if (!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit)) + this.effects.push(effect); + + if (!this.interval) + this.interval = setInterval(this.loop.bind(this), 15); + }, + remove: function(effect) { + this.effects = this.effects.reject(function(e) { return e==effect }); + if (this.effects.length == 0) { + clearInterval(this.interval); + this.interval = null; + } + }, + loop: function() { + var timePos = new Date().getTime(); + for(var i=0, len=this.effects.length;i<len;i++) + this.effects[i] && this.effects[i].loop(timePos); + } +}); + +Effect.Queues = { + instances: $H(), + get: function(queueName) { + if (!Object.isString(queueName)) return queueName; + + return this.instances.get(queueName) || + this.instances.set(queueName, new Effect.ScopedQueue()); + } +}; +Effect.Queue = Effect.Queues.get('global'); + +Effect.Base = Class.create({ + position: null, + start: function(options) { + if (options && options.transition === false) options.transition = Effect.Transitions.linear; + this.options = Object.extend(Object.extend({ },Effect.DefaultOptions), options || { }); + this.currentFrame = 0; + this.state = 'idle'; + this.startOn = this.options.delay*1000; + this.finishOn = this.startOn+(this.options.duration*1000); + this.fromToDelta = this.options.to-this.options.from; + this.totalTime = this.finishOn-this.startOn; + this.totalFrames = this.options.fps*this.options.duration; + + this.render = (function() { + function dispatch(effect, eventName) { + if (effect.options[eventName + 'Internal']) + effect.options[eventName + 'Internal'](effect); + if (effect.options[eventName]) + effect.options[eventName](effect); + } + + return function(pos) { + if (this.state === "idle") { + this.state = "running"; + dispatch(this, 'beforeSetup'); + if (this.setup) this.setup(); + dispatch(this, 'afterSetup'); + } + if (this.state === "running") { + pos = (this.options.transition(pos) * this.fromToDelta) + this.options.from; + this.position = pos; + dispatch(this, 'beforeUpdate'); + if (this.update) this.update(pos); + dispatch(this, 'afterUpdate'); + } + }; + })(); + + this.event('beforeStart'); + if (!this.options.sync) + Effect.Queues.get(Object.isString(this.options.queue) ? + 'global' : this.options.queue.scope).add(this); + }, + loop: function(timePos) { + if (timePos >= this.startOn) { + if (timePos >= this.finishOn) { + this.render(1.0); + this.cancel(); + this.event('beforeFinish'); + if (this.finish) this.finish(); + this.event('afterFinish'); + return; + } + var pos = (timePos - this.startOn) / this.totalTime, + frame = (pos * this.totalFrames).round(); + if (frame > this.currentFrame) { + this.render(pos); + this.currentFrame = frame; + } + } + }, + cancel: function() { + if (!this.options.sync) + Effect.Queues.get(Object.isString(this.options.queue) ? + 'global' : this.options.queue.scope).remove(this); + this.state = 'finished'; + }, + event: function(eventName) { + if (this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); + if (this.options[eventName]) this.options[eventName](this); + }, + inspect: function() { + var data = $H(); + for(property in this) + if (!Object.isFunction(this[property])) data.set(property, this[property]); + return '#<Effect:' + data.inspect() + ',options:' + $H(this.options).inspect() + '>'; + } +}); + +Effect.Parallel = Class.create(Effect.Base, { + initialize: function(effects) { + this.effects = effects || []; + this.start(arguments[1]); + }, + update: function(position) { + this.effects.invoke('render', position); + }, + finish: function(position) { + this.effects.each( function(effect) { + effect.render(1.0); + effect.cancel(); + effect.event('beforeFinish'); + if (effect.finish) effect.finish(position); + effect.event('afterFinish'); + }); + } +}); + +Effect.Tween = Class.create(Effect.Base, { + initialize: function(object, from, to) { + object = Object.isString(object) ? $(object) : object; + var args = $A(arguments), method = args.last(), + options = args.length == 5 ? args[3] : null; + this.method = Object.isFunction(method) ? method.bind(object) : + Object.isFunction(object[method]) ? object[method].bind(object) : + function(value) { object[method] = value }; + this.start(Object.extend({ from: from, to: to }, options || { })); + }, + update: function(position) { + this.method(position); + } +}); + +Effect.Event = Class.create(Effect.Base, { + initialize: function() { + this.start(Object.extend({ duration: 0 }, arguments[0] || { })); + }, + update: Prototype.emptyFunction +}); + +Effect.Opacity = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + // make this work on IE on elements without 'layout' + if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout)) + this.element.setStyle({zoom: 1}); + var options = Object.extend({ + from: this.element.getOpacity() || 0.0, + to: 1.0 + }, arguments[1] || { }); + this.start(options); + }, + update: function(position) { + this.element.setOpacity(position); + } +}); + +Effect.Move = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + x: 0, + y: 0, + mode: 'relative' + }, arguments[1] || { }); + this.start(options); + }, + setup: function() { + this.element.makePositioned(); + this.originalLeft = parseFloat(this.element.getStyle('left') || '0'); + this.originalTop = parseFloat(this.element.getStyle('top') || '0'); + if (this.options.mode == 'absolute') { + this.options.x = this.options.x - this.originalLeft; + this.options.y = this.options.y - this.originalTop; + } + }, + update: function(position) { + this.element.setStyle({ + left: (this.options.x * position + this.originalLeft).round() + 'px', + top: (this.options.y * position + this.originalTop).round() + 'px' + }); + } +}); + +// for backwards compatibility +Effect.MoveBy = function(element, toTop, toLeft) { + return new Effect.Move(element, + Object.extend({ x: toLeft, y: toTop }, arguments[3] || { })); +}; + +Effect.Scale = Class.create(Effect.Base, { + initialize: function(element, percent) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + scaleX: true, + scaleY: true, + scaleContent: true, + scaleFromCenter: false, + scaleMode: 'box', // 'box' or 'contents' or { } with provided values + scaleFrom: 100.0, + scaleTo: percent + }, arguments[2] || { }); + this.start(options); + }, + setup: function() { + this.restoreAfterFinish = this.options.restoreAfterFinish || false; + this.elementPositioning = this.element.getStyle('position'); + + this.originalStyle = { }; + ['top','left','width','height','fontSize'].each( function(k) { + this.originalStyle[k] = this.element.style[k]; + }.bind(this)); + + this.originalTop = this.element.offsetTop; + this.originalLeft = this.element.offsetLeft; + + var fontSize = this.element.getStyle('font-size') || '100%'; + ['em','px','%','pt'].each( function(fontSizeType) { + if (fontSize.indexOf(fontSizeType)>0) { + this.fontSize = parseFloat(fontSize); + this.fontSizeType = fontSizeType; + } + }.bind(this)); + + this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; + + this.dims = null; + if (this.options.scaleMode=='box') + this.dims = [this.element.offsetHeight, this.element.offsetWidth]; + if (/^content/.test(this.options.scaleMode)) + this.dims = [this.element.scrollHeight, this.element.scrollWidth]; + if (!this.dims) + this.dims = [this.options.scaleMode.originalHeight, + this.options.scaleMode.originalWidth]; + }, + update: function(position) { + var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); + if (this.options.scaleContent && this.fontSize) + this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType }); + this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); + }, + finish: function(position) { + if (this.restoreAfterFinish) this.element.setStyle(this.originalStyle); + }, + setDimensions: function(height, width) { + var d = { }; + if (this.options.scaleX) d.width = width.round() + 'px'; + if (this.options.scaleY) d.height = height.round() + 'px'; + if (this.options.scaleFromCenter) { + var topd = (height - this.dims[0])/2; + var leftd = (width - this.dims[1])/2; + if (this.elementPositioning == 'absolute') { + if (this.options.scaleY) d.top = this.originalTop-topd + 'px'; + if (this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; + } else { + if (this.options.scaleY) d.top = -topd + 'px'; + if (this.options.scaleX) d.left = -leftd + 'px'; + } + } + this.element.setStyle(d); + } +}); + +Effect.Highlight = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || { }); + this.start(options); + }, + setup: function() { + // Prevent executing on elements not in the layout flow + if (this.element.getStyle('display')=='none') { this.cancel(); return; } + // Disable background image during the effect + this.oldStyle = { }; + if (!this.options.keepBackgroundImage) { + this.oldStyle.backgroundImage = this.element.getStyle('background-image'); + this.element.setStyle({backgroundImage: 'none'}); + } + if (!this.options.endcolor) + this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff'); + if (!this.options.restorecolor) + this.options.restorecolor = this.element.getStyle('background-color'); + // init color calculations + this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this)); + this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); + }, + update: function(position) { + this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){ + return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this)) }); + }, + finish: function() { + this.element.setStyle(Object.extend(this.oldStyle, { + backgroundColor: this.options.restorecolor + })); + } +}); + +Effect.ScrollTo = function(element) { + var options = arguments[1] || { }, + scrollOffsets = document.viewport.getScrollOffsets(), + elementOffsets = $(element).cumulativeOffset(); + + if (options.offset) elementOffsets[1] += options.offset; + + return new Effect.Tween(null, + scrollOffsets.top, + elementOffsets[1], + options, + function(p){ scrollTo(scrollOffsets.left, p.round()); } + ); +}; + +/* ------------- combination effects ------------- */ + +Effect.Fade = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + var options = Object.extend({ + from: element.getOpacity() || 1.0, + to: 0.0, + afterFinishInternal: function(effect) { + if (effect.options.to!=0) return; + effect.element.hide().setStyle({opacity: oldOpacity}); + } + }, arguments[1] || { }); + return new Effect.Opacity(element,options); +}; + +Effect.Appear = function(element) { + element = $(element); + var options = Object.extend({ + from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0), + to: 1.0, + // force Safari to render floated elements properly + afterFinishInternal: function(effect) { + effect.element.forceRerendering(); + }, + beforeSetup: function(effect) { + effect.element.setOpacity(effect.options.from).show(); + }}, arguments[1] || { }); + return new Effect.Opacity(element,options); +}; + +Effect.Puff = function(element) { + element = $(element); + var oldStyle = { + opacity: element.getInlineOpacity(), + position: element.getStyle('position'), + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height + }; + return new Effect.Parallel( + [ new Effect.Scale(element, 200, + { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], + Object.extend({ duration: 1.0, + beforeSetupInternal: function(effect) { + Position.absolutize(effect.effects[0].element); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().setStyle(oldStyle); } + }, arguments[1] || { }) + ); +}; + +Effect.BlindUp = function(element) { + element = $(element); + element.makeClipping(); + return new Effect.Scale(element, 0, + Object.extend({ scaleContent: false, + scaleX: false, + restoreAfterFinish: true, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }, arguments[1] || { }) + ); +}; + +Effect.BlindDown = function(element) { + element = $(element); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: 0, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping(); + } + }, arguments[1] || { })); +}; + +Effect.SwitchOff = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + return new Effect.Appear(element, Object.extend({ + duration: 0.4, + from: 0, + transition: Effect.Transitions.flicker, + afterFinishInternal: function(effect) { + new Effect.Scale(effect.element, 1, { + duration: 0.3, scaleFromCenter: true, + scaleX: false, scaleContent: false, restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity}); + } + }); + } + }, arguments[1] || { })); +}; + +Effect.DropOut = function(element) { + element = $(element); + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left'), + opacity: element.getInlineOpacity() }; + return new Effect.Parallel( + [ new Effect.Move(element, {x: 0, y: 100, sync: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 }) ], + Object.extend( + { duration: 0.5, + beforeSetup: function(effect) { + effect.effects[0].element.makePositioned(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle); + } + }, arguments[1] || { })); +}; + +Effect.Shake = function(element) { + element = $(element); + var options = Object.extend({ + distance: 20, + duration: 0.5 + }, arguments[1] || {}); + var distance = parseFloat(options.distance); + var split = parseFloat(options.duration) / 10.0; + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left') }; + return new Effect.Move(element, + { x: distance, y: 0, duration: split, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -distance, y: 0, duration: split, afterFinishInternal: function(effect) { + effect.element.undoPositioned().setStyle(oldStyle); + }}); }}); }}); }}); }}); }}); +}; + +Effect.SlideDown = function(element) { + element = $(element).cleanWhitespace(); + // SlideDown need to have the content of the element wrapped in a container element with fixed height! + var oldInnerBottom = element.down().getStyle('bottom'); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: window.opera ? 0 : 1, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if (window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping().undoPositioned(); + effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); } + }, arguments[1] || { }) + ); +}; + +Effect.SlideUp = function(element) { + element = $(element).cleanWhitespace(); + var oldInnerBottom = element.down().getStyle('bottom'); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, window.opera ? 0 : 1, + Object.extend({ scaleContent: false, + scaleX: false, + scaleMode: 'box', + scaleFrom: 100, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if (window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned(); + effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); + } + }, arguments[1] || { }) + ); +}; + +// Bug in opera makes the TD containing this element expand for a instance after finish +Effect.Squish = function(element) { + return new Effect.Scale(element, window.opera ? 1 : 0, { + restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }); +}; + +Effect.Grow = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.full + }, arguments[1] || { }); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var initialMoveX, initialMoveY; + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + initialMoveX = initialMoveY = moveX = moveY = 0; + break; + case 'top-right': + initialMoveX = dims.width; + initialMoveY = moveY = 0; + moveX = -dims.width; + break; + case 'bottom-left': + initialMoveX = moveX = 0; + initialMoveY = dims.height; + moveY = -dims.height; + break; + case 'bottom-right': + initialMoveX = dims.width; + initialMoveY = dims.height; + moveX = -dims.width; + moveY = -dims.height; + break; + case 'center': + initialMoveX = dims.width / 2; + initialMoveY = dims.height / 2; + moveX = -dims.width / 2; + moveY = -dims.height / 2; + break; + } + + return new Effect.Move(element, { + x: initialMoveX, + y: initialMoveY, + duration: 0.01, + beforeSetup: function(effect) { + effect.element.hide().makeClipping().makePositioned(); + }, + afterFinishInternal: function(effect) { + new Effect.Parallel( + [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), + new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), + new Effect.Scale(effect.element, 100, { + scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, + sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) + ], Object.extend({ + beforeSetup: function(effect) { + effect.effects[0].element.setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); + } + }, options) + ); + } + }); +}; + +Effect.Shrink = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.none + }, arguments[1] || { }); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + moveX = moveY = 0; + break; + case 'top-right': + moveX = dims.width; + moveY = 0; + break; + case 'bottom-left': + moveX = 0; + moveY = dims.height; + break; + case 'bottom-right': + moveX = dims.width; + moveY = dims.height; + break; + case 'center': + moveX = dims.width / 2; + moveY = dims.height / 2; + break; + } + + return new Effect.Parallel( + [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), + new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), + new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) + ], Object.extend({ + beforeStartInternal: function(effect) { + effect.effects[0].element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); } + }, options) + ); +}; + +Effect.Pulsate = function(element) { + element = $(element); + var options = arguments[1] || { }, + oldOpacity = element.getInlineOpacity(), + transition = options.transition || Effect.Transitions.linear, + reverser = function(pos){ + return 1 - transition((-Math.cos((pos*(options.pulses||5)*2)*Math.PI)/2) + .5); + }; + + return new Effect.Opacity(element, + Object.extend(Object.extend({ duration: 2.0, from: 0, + afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } + }, options), {transition: reverser})); +}; + +Effect.Fold = function(element) { + element = $(element); + var oldStyle = { + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height }; + element.makeClipping(); + return new Effect.Scale(element, 5, Object.extend({ + scaleContent: false, + scaleX: false, + afterFinishInternal: function(effect) { + new Effect.Scale(element, 1, { + scaleContent: false, + scaleY: false, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().setStyle(oldStyle); + } }); + }}, arguments[1] || { })); +}; + +Effect.Morph = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + style: { } + }, arguments[1] || { }); + + if (!Object.isString(options.style)) this.style = $H(options.style); + else { + if (options.style.include(':')) + this.style = options.style.parseStyle(); + else { + this.element.addClassName(options.style); + this.style = $H(this.element.getStyles()); + this.element.removeClassName(options.style); + var css = this.element.getStyles(); + this.style = this.style.reject(function(style) { + return style.value == css[style.key]; + }); + options.afterFinishInternal = function(effect) { + effect.element.addClassName(effect.options.style); + effect.transforms.each(function(transform) { + effect.element.style[transform.style] = ''; + }); + }; + } + } + this.start(options); + }, + + setup: function(){ + function parseColor(color){ + if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; + color = color.parseColor(); + return $R(0,2).map(function(i){ + return parseInt( color.slice(i*2+1,i*2+3), 16 ); + }); + } + this.transforms = this.style.map(function(pair){ + var property = pair[0], value = pair[1], unit = null; + + if (value.parseColor('#zzzzzz') != '#zzzzzz') { + value = value.parseColor(); + unit = 'color'; + } else if (property == 'opacity') { + value = parseFloat(value); + if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout)) + this.element.setStyle({zoom: 1}); + } else if (Element.CSS_LENGTH.test(value)) { + var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/); + value = parseFloat(components[1]); + unit = (components.length == 3) ? components[2] : null; + } + + var originalValue = this.element.getStyle(property); + return { + style: property.camelize(), + originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), + targetValue: unit=='color' ? parseColor(value) : value, + unit: unit + }; + }.bind(this)).reject(function(transform){ + return ( + (transform.originalValue == transform.targetValue) || + ( + transform.unit != 'color' && + (isNaN(transform.originalValue) || isNaN(transform.targetValue)) + ) + ); + }); + }, + update: function(position) { + var style = { }, transform, i = this.transforms.length; + while(i--) + style[(transform = this.transforms[i]).style] = + transform.unit=='color' ? '#'+ + (Math.round(transform.originalValue[0]+ + (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() + + (Math.round(transform.originalValue[1]+ + (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() + + (Math.round(transform.originalValue[2]+ + (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() : + (transform.originalValue + + (transform.targetValue - transform.originalValue) * position).toFixed(3) + + (transform.unit === null ? '' : transform.unit); + this.element.setStyle(style, true); + } +}); + +Effect.Transform = Class.create({ + initialize: function(tracks){ + this.tracks = []; + this.options = arguments[1] || { }; + this.addTracks(tracks); + }, + addTracks: function(tracks){ + tracks.each(function(track){ + track = $H(track); + var data = track.values().first(); + this.tracks.push($H({ + ids: track.keys().first(), + effect: Effect.Morph, + options: { style: data } + })); + }.bind(this)); + return this; + }, + play: function(){ + return new Effect.Parallel( + this.tracks.map(function(track){ + var ids = track.get('ids'), effect = track.get('effect'), options = track.get('options'); + var elements = [$(ids) || $$(ids)].flatten(); + return elements.map(function(e){ return new effect(e, Object.extend({ sync:true }, options)) }); + }).flatten(), + this.options + ); + } +}); + +Element.CSS_PROPERTIES = $w( + 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' + + 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' + + 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' + + 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' + + 'fontSize fontWeight height left letterSpacing lineHeight ' + + 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+ + 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' + + 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' + + 'right textIndent top width wordSpacing zIndex'); + +Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; + +String.__parseStyleElement = document.createElement('div'); +String.prototype.parseStyle = function(){ + var style, styleRules = $H(); + if (Prototype.Browser.WebKit) + style = new Element('div',{style:this}).style; + else { + String.__parseStyleElement.innerHTML = '<div style="' + this + '"></div>'; + style = String.__parseStyleElement.childNodes[0].style; + } + + Element.CSS_PROPERTIES.each(function(property){ + if (style[property]) styleRules.set(property, style[property]); + }); + + if (Prototype.Browser.IE && this.include('opacity')) + styleRules.set('opacity', this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]); + + return styleRules; +}; + +if (document.defaultView && document.defaultView.getComputedStyle) { + Element.getStyles = function(element) { + var css = document.defaultView.getComputedStyle($(element), null); + return Element.CSS_PROPERTIES.inject({ }, function(styles, property) { + styles[property] = css[property]; + return styles; + }); + }; +} else { + Element.getStyles = function(element) { + element = $(element); + var css = element.currentStyle, styles; + styles = Element.CSS_PROPERTIES.inject({ }, function(results, property) { + results[property] = css[property]; + return results; + }); + if (!styles.opacity) styles.opacity = element.getOpacity(); + return styles; + }; +} + +Effect.Methods = { + morph: function(element, style) { + element = $(element); + new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || { })); + return element; + }, + visualEffect: function(element, effect, options) { + element = $(element); + var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1); + new Effect[klass](element, options); + return element; + }, + highlight: function(element, options) { + element = $(element); + new Effect.Highlight(element, options); + return element; + } +}; + +$w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+ + 'pulsate shake puff squish switchOff dropOut').each( + function(effect) { + Effect.Methods[effect] = function(element, options){ + element = $(element); + Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options); + return element; + }; + } +); + +$w('getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').each( + function(f) { Effect.Methods[f] = Element[f]; } +); + +Element.addMethods(Effect.Methods); \ No newline at end of file diff --git a/html/js/extension.js b/html/js/extension.js new file mode 100644 index 000000000..2158dfa29 --- /dev/null +++ b/html/js/extension.js @@ -0,0 +1,152 @@ +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 2737 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief javascript script for extension + * + */ +/** +*@brief show the popup for extension and call ajax +*@param the id of the extension to show +*/ +function detail_extension(p_code){ + var dossier=$("gDossier").value; + var phpsessid=$("phpsessid").value; + showIPopup("dtext"); + var queryString='?gDossier='+dossier; + queryString+='&PHPSESSID='+phpsessid; + queryString+='&ex_id='+p_code; + queryString+='&action=de'; // de for detail extension + + var action=new Ajax.Request ( 'ajax_extension.php', + { + method:'get', + parameters:queryString, + onFailure:errorExtension, + onSuccess:extDetail + } + ); +} +/** +*@brief show the popup for adding a new extension and call ajax +*/ +function new_extension(){ + var dossier=$("gDossier").value; + var phpsessid=$('phpsessid').value; + showIPopup("dtext"); + var queryString='?gDossier='+dossier; + queryString+='&PHPSESSID='+phpsessid; + queryString+='&action=ne'; // ne for new extension + + var action=new Ajax.Request ( 'ajax_extension.php', + { + method:'get', + parameters:queryString, + onFailure:errorExtension, + onSuccess:extDetail + } + ); +} + +/** +*@brief show the detail of a form +*/ +function extDetail(req){ + try{ + var answer=req.responseXML; + var a=answer.getElementsByTagName('ctl'); + if ( a.length == 0 ) { var rec=req.responseText;alert ('erreur :'+rec);} + var html=answer.getElementsByTagName('code'); + var name_ctl=a[0].firstChild.nodeValue+'_content'; + var code_html=html[0].firstChild.nodeValue; + code_html=unescape_xml(code_html); + $(name_ctl).innerHTML=code_html;} + catch (e) { + alert(e.message);} + try{ + code_html.evalScripts();} + catch(e){ + alert("Impossible executer script de la reponse\n"+e.message);} + +} +/** +*@brief save the extension (add or update) +*/ +function extension_save(p_obj){ + var dossier=$("gDossier").value; + var phpsessid=$('phpsessid').value; + var queryString='?gDossier='+dossier; + queryString+='&PHPSESSID='+phpsessid; + queryString+='&action=se'; // se save extension + // Data must be taken here + var data=p_obj.serialize(false); + queryString+='&'+data; + $(content).innerHTML='<image src="image/loading.gif" alt="chargement"></image>'; + var action=new Ajax.Request ( 'ajax_extension.php', + { + method:'POST', + parameters:queryString, + onFailure:errorExtension, + onSuccess:successSave + } + ); + hideIPopup('dtext'); +} +function errorExtension(){ +alert('Ajax extension failed'); +} +function successSave(req){ + try{ + var answer=req.responseXML; + var html=answer.getElementsByTagName('code'); + var code_html=''; + if ( html[0].firstChild != null ){ + code_html=html[0].firstChild.nodeValue; + code_html=unescape_xml(code_html); + } + } + catch (e) { + alert(e.message);} + try{ + if (code_html.length > 0) {code_html.evalScripts();} + } + catch(e){ + alert("Impossible executer script de la reponse\n"+e.message);} + window.location.reload(); + +} +function extension_remove(ex_id) { + var dossier=$("gDossier").value; + var phpsessid=$('phpsessid').value; + var queryString='?gDossier='+dossier; + queryString+='&PHPSESSID='+phpsessid; + queryString+='&ex_id='+ex_id; + queryString+='&action=re'; // re for remove extension + var action=new Ajax.Request ( 'ajax_extension.php', + { + method:'POST', + parameters:queryString, + onFailure:errorExtension, + onSuccess:successSave + } + ); + +} diff --git a/html/js/forecast.js b/html/js/forecast.js new file mode 100644 index 000000000..3e2d8184e --- /dev/null +++ b/html/js/forecast.js @@ -0,0 +1,25 @@ + +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1649 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief + */ diff --git a/html/js/gestion.js b/html/js/gestion.js new file mode 100644 index 000000000..dd7010c35 --- /dev/null +++ b/html/js/gestion.js @@ -0,0 +1,80 @@ +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 2546 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief javascript scripts for the gestion + * + */ + + + +/** + *@brief remove an attached document of an action + *@param phpsessid + *@param dossier + *@param dt_id id of the document (pk document:d_id) +*/ +function remove_document(p_sessid,p_dossier,p_id) { + queryString="?PHPSESSID="+p_sessid+"&gDossier="+p_dossier+"&a=rm&d_id="+p_id; + var action=new Ajax.Request ( + "show_document.php", + { + method:'get', + parameters:queryString, + onFailure:errorRemoveDoc, + onSuccess:successRemoveDoc + } + + ); + +} +/** + *@brief error if a document if removed + */ + function errorRemoveDoc() { alert('Impossible d\'effacer ce document');} + /** + *@brief success when removing a document + */ + function successRemoveDoc(request,json){ + var answer=request.responseText.evalJSON(true); + var action="ac"+answer.d_id; + $(action).innerHTML=""; + var doc="doc"+answer.d_id; + $(doc).style.color="red"; + $(doc).href="javascript:alert('Document Effacé')"; + $(doc).style.textDecoration="line-through"; + + } + /** + * @brief check the format of the hour + * @param p_ctl is the control where the hour is encoded + */ + function check_hour(p_ctl) { + try { + var h=document.getElementById(p_ctl); + var re = /^\d{1,2}:\d{2}$/; + if ( trim(h.value) !='' && ! h.value.match(re)) + alert("Format de l'heure est HH:MM ") + }catch (erreur){ + alert('fct : check_hour '+erreur); + } + + } diff --git a/html/js/infobulle.js b/html/js/infobulle.js index 9288656a0..6bb783db6 100644 --- a/html/js/infobulle.js +++ b/html/js/infobulle.js @@ -17,6 +17,11 @@ */ /*!\file * \brief create the infobulle, the internalization is not yet implemented + * \code + // Example + echo JS_INFOBULLE; + echo HtmlInput::infobulle(x); + \endcode */ var posX=0,posy=0,offsetX=10,offsetY=10; @@ -32,6 +37,11 @@ content[6]="Indiquez ici le prix hors tva si vous êtes affilié à la tva et qu content[7]="(optionnel) Ces champs servent à contrôler que les montants correspondent à l'extrait"; content[8]="(optionnel) Ce montant correspond au total tva, si vous le laissez à vide, il sera calculé automatiquement en fonction du taux"; content[9]="Tapez le numéro de poste ou une partie du poste ou du libellé puis sur recherche, Si vous avez donné un quickcode, le poste comptable ne sera pas utilisé"; +content[10]="ATTENTION changer le poste comptable d'une fiche modifiera <b>toutes les opérations</b> où cette fiche est utilisée"; +content[11]="ATTENTION si le poste comptable est vide, il sera créé automatiquement"; +content[12]="Document généré uniquement si le mode de paiement est utilisé"; +content[13]="Vous pouvez utiliser le % pour indiquer le poste parent"; + function showBulle(p_ctl) { d=document.getElementById('bulle'); d.innerHTML=content[p_ctl]; diff --git a/html/js/jrn_concerned.js b/html/js/jrn_concerned.js deleted file mode 100644 index 0298c28d8..000000000 --- a/html/js/jrn_concerned.js +++ /dev/null @@ -1,130 +0,0 @@ -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - -/*! \file - * \brief - * open a windows for searching the concerned operation - */ - -/*! \brief this function search into the ledger - * \param p_sessid PHPSESSID - * \param p_ctl ctl name - * \param p_montant amount to search (if 0 get it from the e_other_amount - */ -function SearchJrn(p_sessid,p_dossier,p_ctl,p_montant,p_paid) - { - var url='jrn_search.php?p_ctl='+p_ctl+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier+'&'+p_paid; - - - if ( p_montant == 0 ) { - // compute amount name replace the number - num=p_ctl.replace("e_concerned",""); - - /* Get the amount */ - var ctl_montant_name="e_other"+num+"_amount"; - - if ( document.forms[0]) { - - for ( i=0; i < document.forms[0].length; i++) - { - var e=document.forms[0].elements[i]; - if ( e.name == ctl_montant_name ) { - p_montant=e.value; - break; - } - } - } - if ( p_montant == 0 && document.forms[1]) { - - for ( i=0; i < document.forms[1].length; i++) - { - var e=document.forms[1].elements[i]; - if ( e.name == ctl_montant_name ) { - p_montant=e.value; - break; - } - } - } - - } - - - if ( p_montant == 0 ) { - var win=window.open(url,'Cherche','toolbar=no,width=600,height=600,scrollbars=yes'); - - } else { - var win=window.open(url+'&search&p_montant='+p_montant+'&p_montant_sel=%3D','Cherche','toolbar=no,width=600,height=600,scrollbars=yes'); - } -} - -function updateJrn(p_ctl) { - var form=document.forms[1]; - - for (var e=0;e<form.elements.length;e++) { - var elmt=form.elements[e]; - if ( elmt.type == "checkbox") { - if (elmt.checked==true ) { - var str_name=elmt.name; - var nValue=str_name.replace("jr_concerned",""); - - self.opener.SetIt(nValue,p_ctl); - } - } - } - window.close(); -} - function GetIt(p_ctl,p_value) { - self.opener.SetIt(p_value,p_ctl); - window.close(); - } - -function go_next_concerned() { - var form=document.forms[1]; - - for (var e=0;e<form.elements.length;e++) { - var elmt=form.elements[e]; - if ( elmt.type == "checkbox") { - if (elmt.checked==true ) { - return confirm("Si vous changez de page vous perdez les reconciliations, continuez ?"); - } - } - } -} - /* SetValue( p_ctl,p_value ) - /* p_ctl is the name of the control - /* p_value is the value to set in - */ - function SetIt(p_value,p_ctl) { - - var f=document.getElementsByName(p_ctl); - for (var h=0; h < f.length; h++) { - var old_value=f[h].value; - // if f[h] is not empty add a comma - if (old_value == "") { - f[h].value=p_value; - } else { - f[h].value=old_value+','+p_value; - } - } - - } - - diff --git a/html/js/mintoolkit.js b/html/js/mintoolkit.js deleted file mode 100644 index abb91da0a..000000000 --- a/html/js/mintoolkit.js +++ /dev/null @@ -1,226 +0,0 @@ -function $(element) { - if (arguments.length > 1) { - for (var i = 0, elements = [], length = arguments.length; i < length; i++) - elements.push($(arguments[i])); - return elements; - } - if (Object.isString(element)) - element = document.getElementById(element); - return Element.extend(element); -} -Object.extend = function(destination, source) { - for (var property in source) - destination[property] = source[property]; - return destination; -}; - -Object.extend(Object, { - inspect: function(object) { - try { - if (object === undefined) return 'undefined'; - if (object === null) return 'null'; - return object.inspect ? object.inspect() : object.toString(); - } catch (e) { - if (e instanceof RangeError) return '...'; - throw e; - } - }, - - toJSON: function(object) { - var type = typeof object; - switch (type) { - case 'undefined': - case 'function': - case 'unknown': return; - case 'boolean': return object.toString(); - } - - if (object === null) return 'null'; - if (object.toJSON) return object.toJSON(); - if (Object.isElement(object)) return; - - var results = []; - for (var property in object) { - var value = Object.toJSON(object[property]); - if (value !== undefined) - results.push(property.toJSON() + ': ' + value); - } - - return '{' + results.join(', ') + '}'; - }, - - toQueryString: function(object) { - return $H(object).toQueryString(); - }, - - toHTML: function(object) { - return object && object.toHTML ? object.toHTML() : String.interpret(object); - }, - - keys: function(object) { - var keys = []; - for (var property in object) - keys.push(property); - return keys; - }, - - values: function(object) { - var values = []; - for (var property in object) - values.push(object[property]); - return values; - }, - - clone: function(object) { - return Object.extend({ }, object); - }, - - isElement: function(object) { - return object && object.nodeType == 1; - }, - - isArray: function(object) { - return object && object.constructor === Array; - }, - - isHash: function(object) { - return object instanceof Hash; - }, - - isFunction: function(object) { - return typeof object == "function"; - }, - - isString: function(object) { - return typeof object == "string"; - }, - - isNumber: function(object) { - return typeof object == "number"; - }, - - isUndefined: function(object) { - return typeof object == "undefined"; - } -}); - -Object.extend(Function.prototype, { - argumentNames: function() { - var names = this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip"); - return names.length == 1 && !names[0] ? [] : names; - }, - - bind: function() { - if (arguments.length < 2 && arguments[0] === undefined) return this; - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } - }, - - bindAsEventListener: function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function(event) { - return __method.apply(object, [event || window.event].concat(args)); - } - }, - - curry: function() { - if (!arguments.length) return this; - var __method = this, args = $A(arguments); - return function() { - return __method.apply(this, args.concat($A(arguments))); - } - }, - - delay: function() { - var __method = this, args = $A(arguments), timeout = args.shift() * 1000; - return window.setTimeout(function() { - return __method.apply(__method, args); - }, timeout); - }, - - wrap: function(wrapper) { - var __method = this; - return function() { - return wrapper.apply(this, [__method.bind(this)].concat($A(arguments))); - } - }, - - methodize: function() { - if (this._methodized) return this._methodized; - var __method = this; - return this._methodized = function() { - return __method.apply(null, [this].concat($A(arguments))); - }; - } -}); -var Prototype = { - Version: '1.6.0_rc1', - - Browser: { - IE: !!(window.attachEvent && !window.opera), - Opera: !!window.opera, - WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, - Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, - MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) - }, - - BrowserFeatures: { - XPath: !!document.evaluate, - ElementExtensions: !!window.HTMLElement, - SpecificElementExtensions: - document.createElement('div').__proto__ !== - document.createElement('form').__proto__ - }, - - ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>', - JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, - - emptyFunction: function() { }, - K: function(x) { return x } -}; - -if (Prototype.Browser.MobileSafari) - Prototype.BrowserFeatures.SpecificElementExtensions = false; - -if (Prototype.Browser.WebKit) - Prototype.BrowserFeatures.XPath = false; -Element.extend = (function() { - if (Prototype.BrowserFeatures.SpecificElementExtensions) - return Prototype.K; - - var Methods = { }, ByTag = Element.Methods.ByTag; - - var extend = Object.extend(function(element) { - if (!element || element._extendedByPrototype || - element.nodeType != 1 || element == window) return element; - - var methods = Object.clone(Methods), - tagName = element.tagName, property, value; - - // extend methods for specific tags - if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); - - for (property in methods) { - value = methods[property]; - if (Object.isFunction(value) && !(property in element)) - element[property] = value.methodize(); - } - - element._extendedByPrototype = Prototype.emptyFunction; - return element; - - }, { - refresh: function() { - // extend methods for all tags (Safari doesn't need this) - if (!Prototype.BrowserFeatures.ElementExtensions) { - Object.extend(Methods, Element.Methods); - Object.extend(Methods, Element.Methods.Simulated); - } - } - }); - - extend.refresh(); - return extend; -})(); diff --git a/html/js/modify_op.js b/html/js/modify_op.js deleted file mode 100644 index 4eef1ac4b..000000000 --- a/html/js/modify_op.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - -/*! \file - * \brief - * open a windows for modifying a operation - */ - -/*!\brief - * \param p_value jrn.jr_id - * \param p_sessid PHPSESSID - * \param p_jrn ledger number - * \param p_vue easy or expert view of the operation - */ - -function modifyOperation(p_value,p_sessid,p_dossier,p_jrn,p_vue) - { - - var win=window.open('modify_op.php?action=update&p_jrn='+p_jrn+'&line='+p_value+'&PHPSESSID='+p_sessid+'&p_view='+p_vue+'&gDossier='+p_dossier,'','toolbar=no,width=690,height=410,scrollbars=yes,resizable=yes'); - win.focus(); - } - -/*!\brief - * \param p_value jrn.jr_id - * \param p_sessid PHPSESSID - */ - -function viewOperation(p_value,p_sessid,p_dossier) - { - var win=window.open('modify_op.php?action=view_ca&line='+p_value+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier,'','toolbar=no,width=690,height=410,scrollbars=yes,resizable=yes'); - win.focus(); - } - -function RefreshMe() { -window.location.reload(); -} -function dropLink(p_value,p_value2,p_sessid,p_dossier) { - var win=window.open('modify_op.php?action=delete&line='+p_value+'&line2='+p_value2+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier,'Liaison','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes'); - } diff --git a/html/js/prototype.js b/html/js/prototype.js index 35047ba4a..9fe6e1243 100644 --- a/html/js/prototype.js +++ b/html/js/prototype.js @@ -1,258 +1,4874 @@ +/* Prototype JavaScript framework, version 1.6.1 + * (c) 2005-2009 Sam Stephenson + * + * Prototype is freely distributable under the terms of an MIT-style license. + * For details, see the Prototype web site: http://www.prototypejs.org/ + * + *--------------------------------------------------------------------------*/ -var Prototype={Version:'1.6.0_rc1',Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf('AppleWebKit/')>-1,Gecko:navigator.userAgent.indexOf('Gecko')>-1&&navigator.userAgent.indexOf('KHTML')==-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement('div').__proto__!==document.createElement('form').__proto__},ScriptFragment:'<script[^>]*>([\\S\\s]*?)<\/script>',JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(x){return x}};if(Prototype.Browser.MobileSafari) -Prototype.BrowserFeatures.SpecificElementExtensions=false;if(Prototype.Browser.WebKit) -Prototype.BrowserFeatures.XPath=false;var Class={create:function(){var parent=null,properties=$A(arguments);if(Object.isFunction(properties[0])) -parent=properties.shift();function klass(){this.initialize.apply(this,arguments);} -Object.extend(klass,Class.Methods);klass.superclass=parent;klass.subclasses=[];if(parent){var subclass=function(){};subclass.prototype=parent.prototype;klass.prototype=new subclass;parent.subclasses.push(klass);} -for(var i=0;i<properties.length;i++) -klass.addMethods(properties[i]);if(!klass.prototype.initialize) -klass.prototype.initialize=Prototype.emptyFunction;klass.prototype.constructor=klass;return klass;}};Class.Methods={addMethods:function(source){var ancestor=this.superclass&&this.superclass.prototype;for(var property in source){var value=source[property];if(ancestor&&Object.isFunction(value)&&value.argumentNames().first()=="$super"){var method=value,value=Object.extend((function(m){return function(){return ancestor[m].apply(this,arguments)};})(property).wrap(method),{valueOf:function(){return method},toString:function(){return method.toString()}});} -this.prototype[property]=value;} -return this;}};var Abstract={};Object.extend=function(destination,source){for(var property in source) -destination[property]=source[property];return destination;};Object.extend(Object,{inspect:function(object){try{if(object===undefined)return'undefined';if(object===null)return'null';return object.inspect?object.inspect():object.toString();}catch(e){if(e instanceof RangeError)return'...';throw e;}},toJSON:function(object){var type=typeof object;switch(type){case'undefined':case'function':case'unknown':return;case'boolean':return object.toString();} -if(object===null)return'null';if(object.toJSON)return object.toJSON();if(Object.isElement(object))return;var results=[];for(var property in object){var value=Object.toJSON(object[property]);if(value!==undefined) -results.push(property.toJSON()+': '+value);} -return'{'+results.join(', ')+'}';},toQueryString:function(object){return $H(object).toQueryString();},toHTML:function(object){return object&&object.toHTML?object.toHTML():String.interpret(object);},keys:function(object){var keys=[];for(var property in object) -keys.push(property);return keys;},values:function(object){var values=[];for(var property in object) -values.push(object[property]);return values;},clone:function(object){return Object.extend({},object);},isElement:function(object){return object&&object.nodeType==1;},isArray:function(object){return object&&object.constructor===Array;},isHash:function(object){return object instanceof Hash;},isFunction:function(object){return typeof object=="function";},isString:function(object){return typeof object=="string";},isNumber:function(object){return typeof object=="number";},isUndefined:function(object){return typeof object=="undefined";}});Object.extend(Function.prototype,{argumentNames:function(){var names=this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");return names.length==1&&!names[0]?[]:names;},bind:function(){if(arguments.length<2&&arguments[0]===undefined)return this;var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)));}},bindAsEventListener:function(){var __method=this,args=$A(arguments),object=args.shift();return function(event){return __method.apply(object,[event||window.event].concat(args));}},curry:function(){if(!arguments.length)return this;var __method=this,args=$A(arguments);return function(){return __method.apply(this,args.concat($A(arguments)));}},delay:function(){var __method=this,args=$A(arguments),timeout=args.shift()*1000;return window.setTimeout(function(){return __method.apply(__method,args);},timeout);},wrap:function(wrapper){var __method=this;return function(){return wrapper.apply(this,[__method.bind(this)].concat($A(arguments)));}},methodize:function(){if(this._methodized)return this._methodized;var __method=this;return this._methodized=function(){return __method.apply(null,[this].concat($A(arguments)));};}});Function.prototype.defer=Function.prototype.delay.curry(0.01);Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+'-'+ -(this.getUTCMonth()+1).toPaddedString(2)+'-'+ -this.getUTCDate().toPaddedString(2)+'T'+ -this.getUTCHours().toPaddedString(2)+':'+ -this.getUTCMinutes().toPaddedString(2)+':'+ -this.getUTCSeconds().toPaddedString(2)+'Z"';};var Try={these:function(){var returnValue;for(var i=0,length=arguments.length;i<length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}} -return returnValue;}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(str){return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g,'\\$1');};var PeriodicalExecuter=Class.create({initialize:function(callback,frequency){this.callback=callback;this.frequency=frequency;this.currentlyExecuting=false;this.registerCallback();},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},execute:function(){this.callback(this);},stop:function(){if(!this.timer)return;clearInterval(this.timer);this.timer=null;},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute();}finally{this.currentlyExecuting=false;}}}});Object.extend(String,{interpret:function(value){return value==null?'':String(value);},specialChar:{'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','\\':'\\\\'}});Object.extend(String.prototype,{gsub:function(pattern,replacement){var result='',source=this,match;replacement=arguments.callee.prepareReplacement(replacement);while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length);}else{result+=source,source='';}} -return result;},sub:function(pattern,replacement,count){replacement=this.gsub.prepareReplacement(replacement);count=count===undefined?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});},scan:function(pattern,iterator){this.gsub(pattern,iterator);return String(this);},truncate:function(length,truncation){length=length||30;truncation=truncation===undefined?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this);},strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'');},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'');},extractScripts:function(){var matchAll=new RegExp(Prototype.ScriptFragment,'img');var matchOne=new RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)});},escapeHTML:function(){var self=arguments.callee;self.text.data=this;return self.div.innerHTML;},unescapeHTML:function(){var div=new Element('div');div.innerHTML=this.stripTags();return div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject('',function(memo,node){return memo+node.nodeValue}):div.childNodes[0].nodeValue):'';},toQueryParams:function(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var key=decodeURIComponent(pair.shift());var value=pair.length>1?pair.join('='):pair[0];if(value!=undefined)value=decodeURIComponent(value);if(key in hash){if(!Object.isArray(hash[key]))hash[key]=[hash[key]];hash[key].push(value);} -else hash[key]=value;} -return hash;});},toArray:function(){return this.split('');},succ:function(){return this.slice(0,this.length-1)+ -String.fromCharCode(this.charCodeAt(this.length-1)+1);},times:function(count){return count<1?'':new Array(count+1).join(this);},camelize:function(){var parts=this.split('-'),len=parts.length;if(len==1)return parts[0];var camelized=this.charAt(0)=='-'?parts[0].charAt(0).toUpperCase()+parts[0].substring(1):parts[0];for(var i=1;i<len;i++) -camelized+=parts[i].charAt(0).toUpperCase()+parts[i].substring(1);return camelized;},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase();},underscore:function(){return this.gsub(/::/,'/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();},dasherize:function(){return this.gsub(/_/,'-');},inspect:function(useDoubleQuotes){var escapedString=this.gsub(/[\x00-\x1f\\]/,function(match){var character=String.specialChar[match[0]];return character?character:'\\u00'+match[0].charCodeAt().toPaddedString(2,16);});if(useDoubleQuotes)return'"'+escapedString.replace(/"/g,'\\"')+'"';return"'"+escapedString.replace(/'/g,'\\\'')+"'";},toJSON:function(){return this.inspect(true);},unfilterJSON:function(filter){return this.sub(filter||Prototype.JSONFilter,'#{1}');},isJSON:function(){var str=this.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,'');return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON())return eval('('+json+')');}catch(e){} -throw new SyntaxError('Badly formed JSON string: '+this.inspect());},include:function(pattern){return this.indexOf(pattern)>-1;},startsWith:function(pattern){return this.indexOf(pattern)===0;},endsWith:function(pattern){var d=this.length-pattern.length;return d>=0&&this.lastIndexOf(pattern)===d;},empty:function(){return this=='';},blank:function(){return/^\s*$/.test(this);},interpolate:function(object,pattern){return new Template(this,pattern).evaluate(object);}});if(Prototype.Browser.WebKit||Prototype.Browser.IE)Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');},unescapeHTML:function(){return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');}});String.prototype.gsub.prepareReplacement=function(replacement){if(Object.isFunction(replacement))return replacement;var template=new Template(replacement);return function(match){return template.evaluate(match)};};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement('div'),text:document.createTextNode('')});with(String.prototype.escapeHTML)div.appendChild(text);var Template=Class.create({initialize:function(template,pattern){this.template=template.toString();this.pattern=pattern||Template.Pattern;},evaluate:function(object){if(Object.isFunction(object.toTemplateReplacements)) -object=object.toTemplateReplacements();return this.template.gsub(this.pattern,function(match){if(object==null)return'';var before=match[1]||'';if(before=='\\')return match[2];var ctx=object,expr=match[3];var pattern=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/,match=pattern.exec(expr);if(match==null)return'';while(match!=null){var comp=match[1].startsWith('[')?match[2].gsub('\\\\]',']'):match[1];ctx=ctx[comp];if(null==ctx||''==match[3])break;expr=expr.substring('['==match[3]?match[1].length:match[0].length);match=pattern.exec(expr);} -return before+String.interpret(ctx);}.bind(this));}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(iterator,context){var index=0;iterator=iterator.bind(context);try{this._each(function(value){iterator(value,index++);});}catch(e){if(e!=$break)throw e;} -return this;},eachSlice:function(number,iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var index=-number,slices=[],array=this.toArray();while((index+=number)<array.length) -slices.push(array.slice(index,index+number));return slices.collect(iterator,context);},all:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var result=true;this.each(function(value,index){result=result&&!!iterator(value,index);if(!result)throw $break;});return result;},any:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var result=false;this.each(function(value,index){if(result=!!iterator(value,index)) -throw $break;});return result;},collect:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var results=[];this.each(function(value,index){results.push(iterator(value,index));});return results;},detect:function(iterator,context){iterator=iterator.bind(context);var result;this.each(function(value,index){if(iterator(value,index)){result=value;throw $break;}});return result;},findAll:function(iterator,context){iterator=iterator.bind(context);var results=[];this.each(function(value,index){if(iterator(value,index)) -results.push(value);});return results;},grep:function(filter,iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var results=[];if(Object.isString(filter)) -filter=new RegExp(filter);this.each(function(value,index){if(filter.match(value)) -results.push(iterator(value,index));});return results;},include:function(object){if(Object.isFunction(this.indexOf)) -if(this.indexOf(object)!=-1)return true;var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found;},inGroupsOf:function(number,fillWith){fillWith=fillWith===undefined?null:fillWith;return this.eachSlice(number,function(slice){while(slice.length<number)slice.push(fillWith);return slice;});},inject:function(memo,iterator,context){iterator=iterator.bind(context);this.each(function(value,index){memo=iterator(memo,value,index);});return memo;},invoke:function(method){var args=$A(arguments).slice(1);return this.map(function(value){return value[method].apply(value,args);});},max:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var result;this.each(function(value,index){value=iterator(value,index);if(result==undefined||value>=result) -result=value;});return result;},min:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var result;this.each(function(value,index){value=iterator(value,index);if(result==undefined||value<result) -result=value;});return result;},partition:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var trues=[],falses=[];this.each(function(value,index){(iterator(value,index)?trues:falses).push(value);});return[trues,falses];},pluck:function(property){var results=[];this.each(function(value){results.push(value[property]);});return results;},reject:function(iterator,context){iterator=iterator.bind(context);var results=[];this.each(function(value,index){if(!iterator(value,index)) -results.push(value);});return results;},sortBy:function(iterator,context){iterator=iterator.bind(context);return this.map(function(value,index){return{value:value,criteria:iterator(value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck('value');},toArray:function(){return this.map();},zip:function(){var iterator=Prototype.K,args=$A(arguments);if(Object.isFunction(args.last())) -iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index));});},size:function(){return this.toArray().length;},inspect:function(){return'#<Enumerable:'+this.toArray().inspect()+'>';}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(iterable){if(!iterable)return[];if(iterable.toArray)return iterable.toArray();var length=iterable.length,results=new Array(length);while(length--)results[length]=iterable[length];return results;} -if(Prototype.Browser.WebKit){function $A(iterable){if(!iterable)return[];if(!(Object.isFunction(iterable)&&iterable=='[object NodeList]')&&iterable.toArray)return iterable.toArray();var length=iterable.length,results=new Array(length);while(length--)results[length]=iterable[length];return results;}} -Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse)Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(iterator){for(var i=0,length=this.length;i<length;i++) -iterator(this[i]);},clear:function(){this.length=0;return this;},first:function(){return this[0];},last:function(){return this[this.length-1];},compact:function(){return this.select(function(value){return value!=null;});},flatten:function(){return this.inject([],function(array,value){return array.concat(Object.isArray(value)?value.flatten():[value]);});},without:function(){var values=$A(arguments);return this.select(function(value){return!values.include(value);});},reverse:function(inline){return(inline!==false?this:this.toArray())._reverse();},reduce:function(){return this.length>1?this:this[0];},uniq:function(sorted){return this.inject([],function(array,value,index){if(0==index||(sorted?array.last()!=value:!array.include(value))) -array.push(value);return array;});},intersect:function(array){return this.uniq().findAll(function(item){return array.detect(function(value){return item===value});});},clone:function(){return[].concat(this);},size:function(){return this.length;},inspect:function(){return'['+this.map(Object.inspect).join(', ')+']';},toJSON:function(){var results=[];this.each(function(object){var value=Object.toJSON(object);if(value!==undefined)results.push(value);});return'['+results.join(', ')+']';}});if(Object.isFunction(Array.prototype.forEach)) -Array.prototype._each=Array.prototype.forEach;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(item,i){i||(i=0);var length=this.length;if(i<0)i=length+i;for(;i<length;i++) -if(this[i]===item)return i;return-1;};if(!Array.prototype.lastIndexOf)Array.prototype.lastIndexOf=function(item,i){i=isNaN(i)?this.length:(i<0?this.length+i:i)+1;var n=this.slice(0,i).reverse().indexOf(item);return(n<0)?n:i-n-1;};Array.prototype.toArray=Array.prototype.clone;function $w(string){if(!Object.isString(string))return[];string=string.strip();return string?string.split(/\s+/):[];} -if(Prototype.Browser.Opera){Array.prototype.concat=function(){var array=[];for(var i=0,length=this.length;i<length;i++)array.push(this[i]);for(var i=0,length=arguments.length;i<length;i++){if(Object.isArray(arguments[i])){for(var j=0,arrayLength=arguments[i].length;j<arrayLength;j++) -array.push(arguments[i][j]);}else{array.push(arguments[i]);}} -return array;};} -Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16);},succ:function(){return this+1;},times:function(iterator){$R(0,this,true).each(iterator);return this;},toPaddedString:function(length,radix){var string=this.toString(radix||10);return'0'.times(length-string.length)+string;},toJSON:function(){return isFinite(this)?this.toString():'null';}});$w('abs round ceil floor').each(function(method){Number.prototype[method]=Math[method].methodize();});function $H(object){return new Hash(object);};var Hash=Class.create(Enumerable,(function(){if(function(){var i=0,Test=function(value){this.key=value};Test.prototype.key='foo';for(var property in new Test('bar'))i++;return i>1;}()){function each(iterator){var cache=[];for(var key in this._object){var value=this._object[key];if(cache.include(key))continue;cache.push(key);var pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}}}else{function each(iterator){for(var key in this._object){var value=this._object[key],pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}}} -function toQueryPair(key,value){if(Object.isUndefined(value))return key;return key+'='+encodeURIComponent(String.interpret(value));} -return{initialize:function(object){this._object=Object.isHash(object)?object.toObject():Object.clone(object);},_each:each,set:function(key,value){return this._object[key]=value;},get:function(key){return this._object[key];},unset:function(key){var value=this._object[key];delete this._object[key];return value;},toObject:function(){return Object.clone(this._object);},keys:function(){return this.pluck('key');},values:function(){return this.pluck('value');},index:function(value){var match=this.detect(function(pair){return pair.value===value;});return match&&match.key;},merge:function(object){return this.clone().update(object);},update:function(object){return new Hash(object).inject(this,function(result,pair){result.set(pair.key,pair.value);return result;});},toQueryString:function(){return this.map(function(pair){var key=encodeURIComponent(pair.key),values=pair.value;if(values&&typeof values=='object'){if(Object.isArray(values)) -return values.map(toQueryPair.curry(key)).join('&');} -return toQueryPair(key,values);}).join('&');},inspect:function(){return'#<Hash:{'+this.map(function(pair){return pair.map(Object.inspect).join(': ');}).join(', ')+'}>';},toJSON:function(){return Object.toJSON(this.toObject());},clone:function(){return new Hash(this);}}})());Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;},_each:function(iterator){var value=this.start;while(this.include(value)){iterator(value);value=value.succ();}},include:function(value){if(value<this.start) -return false;if(this.exclusive) -return value<this.end;return value<=this.end;}});var $R=function(start,end,exclusive){return new ObjectRange(start,end,exclusive);};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')})||false;},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(iterator){this.responders._each(iterator);},register:function(responder){if(!this.include(responder)) -this.responders.push(responder);},unregister:function(responder){this.responders=this.responders.without(responder);},dispatch:function(callback,request,transport,json){this.each(function(responder){if(Object.isFunction(responder[callback])){try{responder[callback].apply(responder,[request,transport,json]);}catch(e){}}});}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(options){this.options={method:'post',asynchronous:true,contentType:'application/x-www-form-urlencoded',encoding:'UTF-8',parameters:'',evalJSON:true,evalJS:true};Object.extend(this.options,options||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters)) -this.options.parameters=this.options.parameters.toQueryParams();}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,url,options){$super(options);this.transport=Ajax.getTransport();this.request(url);},request:function(url){this.url=url;this.method=this.options.method;var params=Object.clone(this.options.parameters);if(!['get','post'].include(this.method)){params['_method']=this.method;this.method='post';} -this.parameters=params;if(params=Object.toQueryString(params)){if(this.method=='get') -this.url+=(this.url.include('?')?'&':'?')+params;else if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)) -params+='&_=';} -try{var response=new Ajax.Response(this);if(this.options.onCreate)this.options.onCreate(response);Ajax.Responders.dispatch('onCreate',this,response);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous)this.respondToReadyState.bind(this).defer(1);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=='post'?(this.options.postBody||params):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType) -this.onStateChange();} -catch(e){this.dispatchException(e);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1&&!((readyState==4)&&this._complete)) -this.respondToReadyState(this.transport.readyState);},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prototype.Version,'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.method=='post'){headers['Content-type']=this.options.contentType+ -(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005) -headers['Connection']='close';} -if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(Object.isFunction(extras.push)) -for(var i=0,length=extras.length;i<length;i+=2) -headers[extras[i]]=extras[i+1];else -$H(extras).each(function(pair){headers[pair.key]=pair.value});} -for(var name in headers) -this.transport.setRequestHeader(name,headers[name]);},success:function(){var status=this.getStatus();return!status||(status>=200&&status<300);},getStatus:function(){try{return this.transport.status||0;}catch(e){return 0}},respondToReadyState:function(readyState){var state=Ajax.Request.Events[readyState],response=new Ajax.Response(this);if(state=='Complete'){try{this._complete=true;(this.options['on'+response.status]||this.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFunction)(response,response.headerJSON);}catch(e){this.dispatchException(e);} -var contentType=response.getHeader('Content-type');if(this.options.evalJS=='force'||(this.options.evalJS&&contentType&&contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))) -this.evalResponse();} -try{(this.options['on'+state]||Prototype.emptyFunction)(response,response.headerJSON);Ajax.Responders.dispatch('on'+state,this,response,response.headerJSON);}catch(e){this.dispatchException(e);} -if(state=='Complete'){this.transport.onreadystatechange=Prototype.emptyFunction;}},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){return null}},evalResponse:function(){try{return eval((this.transport.responseText||'').unfilterJSON());}catch(e){this.dispatchException(e);}},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception);}});Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Response=Class.create({initialize:function(request){this.request=request;var transport=this.transport=request.transport,readyState=this.readyState=transport.readyState;if((readyState>2&&!Prototype.Browser.IE)||readyState==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(transport.responseText);this.headerJSON=this._getHeaderJSON();} -if(readyState==4){var xml=transport.responseXML;this.responseXML=xml===undefined?null:xml;this.responseJSON=this._getResponseJSON();}},status:0,statusText:'',getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||'';}catch(e){return''}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders();}catch(e){return null}},getResponseHeader:function(name){return this.transport.getResponseHeader(name);},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders();},_getHeaderJSON:function(){var json=this.getHeader('X-JSON');try{return json?json.evalJSON(this.request.options.sanitizeJSON):null;}catch(e){this.request.dispatchException(e);}},_getResponseJSON:function(){var options=this.request.options;try{if(options.evalJSON=='force'||(options.evalJSON&&(this.getHeader('Content-type')||'').include('application/json'))) -return this.transport.responseText.evalJSON(options.sanitizeJSON);return null;}catch(e){this.request.dispatchException(e);}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,container,url,options){this.container={success:(container.success||container),failure:(container.failure||(container.success?null:container))};options=options||{};var onComplete=options.onComplete;options.onComplete=(function(response,param){this.updateContent(response.responseText);if(Object.isFunction(onComplete))onComplete(response,param);}).bind(this);$super(url,options);},updateContent:function(responseText){var receiver=this.container[this.success()?'success':'failure'],options=this.options;if(!options.evalScripts)responseText=responseText.stripScripts();if(receiver=$(receiver)){if(options.insertion){if(Object.isString(options.insertion)){var insertion={};insertion[options.insertion]=responseText;receiver.insert(insertion);} -else options.insertion(receiver,responseText);} -else receiver.update(responseText);} -if(this.success()){if(this.onComplete)this.onComplete.bind(this).defer();}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,container,url,options){$super(options);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=container;this.url=url;this.start();},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent();},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments);},updateComplete:function(response){if(this.options.decay){this.decay=(response.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=response.responseText;} -this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency);},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options);}});function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++) -elements.push($(arguments[i]));return elements;} -if(Object.isString(element)) -element=document.getElementById(element);return Element.extend(element);} -if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(expression,parentElement){var results=[];var query=document.evaluate(expression,$(parentElement)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,length=query.snapshotLength;i<length;i++) -results.push(Element.extend(query.snapshotItem(i)));return results;};} -if(!window.Node)var Node={};if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12});} -(function(){var element=this.Element;this.Element=function(tagName,attributes){attributes=attributes||{};tagName=tagName.toLowerCase();var cache=Element.cache;if(Prototype.Browser.IE&&attributes.name){tagName='<'+tagName+' name="'+attributes.name+'">';delete attributes.name;return Element.writeAttribute(document.createElement(tagName),attributes);} -if(!cache[tagName])cache[tagName]=Element.extend(document.createElement(tagName));return Element.writeAttribute(cache[tagName].cloneNode(false),attributes);};Object.extend(this.Element,element||{});}).call(window);Element.cache={};Element.Methods={visible:function(element){return $(element).style.display!='none';},toggle:function(element){element=$(element);Element[Element.visible(element)?'hide':'show'](element);return element;},hide:function(element){$(element).style.display='none';return element;},show:function(element){$(element).style.display='';return element;},remove:function(element){element=$(element);element.parentNode.removeChild(element);return element;},update:function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content))return element.update().insert(content);content=Object.toHTML(content);element.innerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element;},replace:function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();else if(!Object.isElement(content)){content=Object.toHTML(content);var range=element.ownerDocument.createRange();range.selectNode(element);content.evalScripts.bind(content).defer();content=range.createContextualFragment(content.stripScripts());} -element.parentNode.replaceChild(content,element);return element;},insert:function(element,insertions){element=$(element);if(Object.isString(insertions)||Object.isNumber(insertions)||Object.isElement(insertions)||(insertions&&(insertions.toElement||insertions.toHTML))) -insertions={bottom:insertions};var content,t,range;for(position in insertions){content=insertions[position];position=position.toLowerCase();t=Element._insertionTranslations[position];if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){t.insert(element,content);continue;} -content=Object.toHTML(content);range=element.ownerDocument.createRange();t.initializeRange(element,range);t.insert(element,range.createContextualFragment(content.stripScripts()));content.evalScripts.bind(content).defer();} -return element;},wrap:function(element,wrapper,attributes){element=$(element);if(Object.isElement(wrapper)) -$(wrapper).writeAttribute(attributes||{});else if(Object.isString(wrapper))wrapper=new Element(wrapper,attributes);else wrapper=new Element('div',wrapper);if(element.parentNode) -element.parentNode.replaceChild(wrapper,element);wrapper.appendChild(element);return wrapper;},inspect:function(element){element=$(element);var result='<'+element.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(pair){var property=pair.first(),attribute=pair.last();var value=(element[property]||'').toString();if(value)result+=' '+attribute+'='+value.inspect(true);});return result+'>';},recursivelyCollect:function(element,property){element=$(element);var elements=[];while(element=element[property]) -if(element.nodeType==1) -elements.push(Element.extend(element));return elements;},ancestors:function(element){return $(element).recursivelyCollect('parentNode');},descendants:function(element){return $A($(element).getElementsByTagName('*')).each(Element.extend);},firstDescendant:function(element){element=$(element).firstChild;while(element&&element.nodeType!=1)element=element.nextSibling;return $(element);},immediateDescendants:function(element){if(!(element=$(element).firstChild))return[];while(element&&element.nodeType!=1)element=element.nextSibling;if(element)return[element].concat($(element).nextSiblings());return[];},previousSiblings:function(element){return $(element).recursivelyCollect('previousSibling');},nextSiblings:function(element){return $(element).recursivelyCollect('nextSibling');},siblings:function(element){element=$(element);return element.previousSiblings().reverse().concat(element.nextSiblings());},match:function(element,selector){if(Object.isString(selector)) -selector=new Selector(selector);return selector.match($(element));},up:function(element,expression,index){element=$(element);if(arguments.length==1)return $(element.parentNode);var ancestors=element.ancestors();return expression?Selector.findElement(ancestors,expression,index):ancestors[index||0];},down:function(element,expression,index){element=$(element);if(arguments.length==1)return element.firstDescendant();var descendants=element.descendants();return expression?Selector.findElement(descendants,expression,index):descendants[index||0];},previous:function(element,expression,index){element=$(element);if(arguments.length==1)return $(Selector.handlers.previousElementSibling(element));var previousSiblings=element.previousSiblings();return expression?Selector.findElement(previousSiblings,expression,index):previousSiblings[index||0];},next:function(element,expression,index){element=$(element);if(arguments.length==1)return $(Selector.handlers.nextElementSibling(element));var nextSiblings=element.nextSiblings();return expression?Selector.findElement(nextSiblings,expression,index):nextSiblings[index||0];},select:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element,args);},adjacent:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element.parentNode,args).without(element);},identify:function(element){element=$(element);var id=element.readAttribute('id'),self=arguments.callee;if(id)return id;do{id='anonymous_element_'+self.counter++}while($(id));element.writeAttribute('id',id);return id;},readAttribute:function(element,name){element=$(element);if(Prototype.Browser.IE){var t=Element._attributeTranslations.read;if(t.values[name])return t.values[name](element,name);if(t.names[name])name=t.names[name];if(name.include(':')){return(!element.attributes||!element.attributes[name])?null:element.attributes[name].value;}} -return element.getAttribute(name);},writeAttribute:function(element,name,value){element=$(element);var attributes={},t=Element._attributeTranslations.write;if(typeof name=='object')attributes=name;else attributes[name]=value===undefined?true:value;for(var attr in attributes){var name=t.names[attr]||attr,value=attributes[attr];if(t.values[attr])name=t.values[attr](element,value);if(value===false||value===null) -element.removeAttribute(name);else if(value===true) -element.setAttribute(name,name);else element.setAttribute(name,value);} -return element;},getHeight:function(element){return $(element).getDimensions().height;},getWidth:function(element){return $(element).getDimensions().width;},classNames:function(element){return new Element.ClassNames(element);},hasClassName:function(element,className){if(!(element=$(element)))return;var elementClassName=element.className;return(elementClassName.length>0&&(elementClassName==className||elementClassName.match(new RegExp("(^|\\s)"+className+"(\\s|$)"))));},addClassName:function(element,className){if(!(element=$(element)))return;if(!element.hasClassName(className)) -element.className+=(element.className?' ':'')+className;return element;},removeClassName:function(element,className){if(!(element=$(element)))return;element.className=element.className.replace(new RegExp("(^|\\s+)"+className+"(\\s+|$)"),' ').strip();return element;},toggleClassName:function(element,className){if(!(element=$(element)))return;return element[element.hasClassName(className)?'removeClassName':'addClassName'](className);},cleanWhitespace:function(element){element=$(element);var node=element.firstChild;while(node){var nextNode=node.nextSibling;if(node.nodeType==3&&!/\S/.test(node.nodeValue)) -element.removeChild(node);node=nextNode;} -return element;},empty:function(element){return $(element).innerHTML.blank();},descendantOf:function(element,ancestor){element=$(element),ancestor=$(ancestor);while(element=element.parentNode) -if(element==ancestor)return true;return false;},scrollTo:function(element){element=$(element);var pos=element.cumulativeOffset();window.scrollTo(pos[0],pos[1]);return element;},getStyle:function(element,style){element=$(element);style=style=='float'?'cssFloat':style.camelize();var value=element.style[style];if(!value){var css=document.defaultView.getComputedStyle(element,null);value=css?css[style]:null;} -if(style=='opacity')return value?parseFloat(value):1.0;return value=='auto'?null:value;},getOpacity:function(element){return $(element).getStyle('opacity');},setStyle:function(element,styles){element=$(element);var elementStyle=element.style,match;if(Object.isString(styles)){element.style.cssText+=';'+styles;return styles.include('opacity')?element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]):element;} -for(var property in styles) -if(property=='opacity')element.setOpacity(styles[property]);else -elementStyle[(property=='float'||property=='cssFloat')?(elementStyle.styleFloat===undefined?'cssFloat':'styleFloat'):property]=styles[property];return element;},setOpacity:function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;return element;},getDimensions:function(element){element=$(element);var display=$(element).getStyle('display');if(display!='none'&&display!=null) -return{width:element.offsetWidth,height:element.offsetHeight};var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;var originalDisplay=els.display;els.visibility='hidden';els.position='absolute';els.display='block';var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display=originalDisplay;els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};},makePositioned:function(element){element=$(element);var pos=Element.getStyle(element,'position');if(pos=='static'||!pos){element._madePositioned=true;element.style.position='relative';if(window.opera){element.style.top=0;element.style.left=0;}} -return element;},undoPositioned:function(element){element=$(element);if(element._madePositioned){element._madePositioned=undefined;element.style.position=element.style.top=element.style.left=element.style.bottom=element.style.right='';} -return element;},makeClipping:function(element){element=$(element);if(element._overflow)return element;element._overflow=Element.getStyle(element,'overflow')||'auto';if(element._overflow!=='hidden') -element.style.overflow='hidden';return element;},undoClipping:function(element){element=$(element);if(!element._overflow)return element;element.style.overflow=element._overflow=='auto'?'':element._overflow;element._overflow=null;return element;},cumulativeOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);return Element._returnOffset(valueL,valueT);},positionedOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;if(element){if(element.tagName=='BODY')break;var p=Element.getStyle(element,'position');if(p=='relative'||p=='absolute')break;}}while(element);return Element._returnOffset(valueL,valueT);},absolutize:function(element){element=$(element);if(element.getStyle('position')=='absolute')return;var offsets=element.positionedOffset();var top=offsets[1];var left=offsets[0];var width=element.clientWidth;var height=element.clientHeight;element._originalLeft=left-parseFloat(element.style.left||0);element._originalTop=top-parseFloat(element.style.top||0);element._originalWidth=element.style.width;element._originalHeight=element.style.height;element.style.position='absolute';element.style.top=top+'px';element.style.left=left+'px';element.style.width=width+'px';element.style.height=height+'px';return element;},relativize:function(element){element=$(element);if(element.getStyle('position')=='relative')return;element.style.position='relative';var top=parseFloat(element.style.top||0)-(element._originalTop||0);var left=parseFloat(element.style.left||0)-(element._originalLeft||0);element.style.top=top+'px';element.style.left=left+'px';element.style.height=element._originalHeight;element.style.width=element._originalWidth;return element;},cumulativeScrollOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.scrollTop||0;valueL+=element.scrollLeft||0;element=element.parentNode;}while(element);return Element._returnOffset(valueL,valueT);},getOffsetParent:function(element){if(element.offsetParent)return $(element.offsetParent);if(element==document.body)return $(element);while((element=element.parentNode)&&element!=document.body) -if(Element.getStyle(element,'position')!='static') -return $(element);return $(document.body);},viewportOffset:function(forElement){var valueT=0,valueL=0;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body&&Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{if(!Prototype.Browser.Opera||element.tagName=='BODY'){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}}while(element=element.parentNode);return Element._returnOffset(valueL,valueT);},clonePosition:function(element,source){var options=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});source=$(source);var p=source.viewportOffset();element=$(element);var delta=[0,0];var parent=null;if(Element.getStyle(element,'position')=='absolute'){parent=element.getOffsetParent();delta=parent.viewportOffset();} -if(parent==document.body){delta[0]-=document.body.offsetLeft;delta[1]-=document.body.offsetTop;} -if(options.setLeft)element.style.left=(p[0]-delta[0]+options.offsetLeft)+'px';if(options.setTop)element.style.top=(p[1]-delta[1]+options.offsetTop)+'px';if(options.setWidth)element.style.width=source.offsetWidth+'px';if(options.setHeight)element.style.height=source.offsetHeight+'px';return element;}};Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:'class',htmlFor:'for'},values:{}}};if(!document.createRange||Prototype.Browser.Opera){Element.Methods.insert=function(element,insertions){element=$(element);if(Object.isString(insertions)||Object.isNumber(insertions)||Object.isElement(insertions)||(insertions&&(insertions.toElement||insertions.toHTML))) -insertions={bottom:insertions};var t=Element._insertionTranslations,content,position,pos,tagName;for(position in insertions){content=insertions[position];position=position.toLowerCase();pos=t[position];if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){pos.insert(element,content);continue;} -content=Object.toHTML(content);tagName=((position=='before'||position=='after')?element.parentNode:element).tagName.toUpperCase();if(t.tags[tagName]){var fragments=Element._getContentFromAnonymousElement(tagName,content.stripScripts());if(position=='top'||position=='after')fragments.reverse();fragments.each(pos.insert.curry(element));} -else element.insertAdjacentHTML(pos.adjacency,content.stripScripts());content.evalScripts.bind(content).defer();} -return element;};} -if(Prototype.Browser.Opera){Element.Methods._getStyle=Element.Methods.getStyle;Element.Methods.getStyle=function(element,style){switch(style){case'left':case'top':case'right':case'bottom':if(Element._getStyle(element,'position')=='static')return null;default:return Element._getStyle(element,style);}};Element.Methods._readAttribute=Element.Methods.readAttribute;Element.Methods.readAttribute=function(element,attribute){if(attribute=='title')return element.title;return Element._readAttribute(element,attribute);};} -else if(Prototype.Browser.IE){$w('positionedOffset getOffsetParent viewportOffset').each(function(method){Element.Methods[method]=Element.Methods[method].wrap(function(proceed,element){element=$(element);var position=element.getStyle('position');if(position!='static')return proceed(element);element.setStyle({position:'relative'});var value=proceed(element);element.setStyle({position:position});return value;});});Element.Methods.getStyle=function(element,style){element=$(element);style=(style=='float'||style=='cssFloat')?'styleFloat':style.camelize();var value=element.style[style];if(!value&&element.currentStyle)value=element.currentStyle[style];if(style=='opacity'){if(value=(element.getStyle('filter')||'').match(/alpha\(opacity=(.*)\)/)) -if(value[1])return parseFloat(value[1])/100;return 1.0;} -if(value=='auto'){if((style=='width'||style=='height')&&(element.getStyle('display')!='none')) -return element['offset'+style.capitalize()]+'px';return null;} -return value;};Element.Methods.setOpacity=function(element,value){function stripAlpha(filter){return filter.replace(/alpha\([^\)]*\)/gi,'');} -element=$(element);if(!element.currentStyle.hasLayout)element.style.zoom=1;var filter=element.getStyle('filter'),style=element.style;if(value==1||value===''){(filter=stripAlpha(filter))?style.filter=filter:style.removeAttribute('filter');return element;}else if(value<0.00001)value=0;style.filter=stripAlpha(filter)+'alpha(opacity='+(value*100)+')';return element;};Element._attributeTranslations={read:{names:{'class':'className','for':'htmlFor'},values:{_getAttr:function(element,attribute){return element.getAttribute(attribute,2);},_getAttrNode:function(element,attribute){var node=element.getAttributeNode(attribute);return node?node.value:"";},_getEv:function(element,attribute){var attribute=element.getAttribute(attribute);return attribute?attribute.toString().slice(23,-2):null;},_flag:function(element,attribute){return $(element).hasAttribute(attribute)?attribute:null;},style:function(element){return element.style.cssText.toLowerCase();},title:function(element){return element.title;}}}};Element._attributeTranslations.write={names:Object.clone(Element._attributeTranslations.read.names),values:{checked:function(element,value){element.checked=!!value;},style:function(element,value){element.style.cssText=value?value:'';}}};Element._attributeTranslations.has={};$w('colSpan rowSpan vAlign dateTime accessKey tabIndex '+'encType maxLength readOnly longDesc').each(function(attr){Element._attributeTranslations.write.names[attr.toLowerCase()]=attr;Element._attributeTranslations.has[attr.toLowerCase()]=attr;});(function(v){Object.extend(v,{href:v._getAttr,src:v._getAttr,type:v._getAttr,action:v._getAttrNode,disabled:v._flag,checked:v._flag,readonly:v._flag,multiple:v._flag,onload:v._getEv,onunload:v._getEv,onclick:v._getEv,ondblclick:v._getEv,onmousedown:v._getEv,onmouseup:v._getEv,onmouseover:v._getEv,onmousemove:v._getEv,onmouseout:v._getEv,onfocus:v._getEv,onblur:v._getEv,onkeypress:v._getEv,onkeydown:v._getEv,onkeyup:v._getEv,onsubmit:v._getEv,onreset:v._getEv,onselect:v._getEv,onchange:v._getEv});})(Element._attributeTranslations.read.values);} -else if(Prototype.Browser.Gecko){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1)?0.999999:(value==='')?'':(value<0.00001)?0:value;return element;};} -else if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;if(value==1) -if(element.tagName=='IMG'&&element.width){element.width++;element.width--;}else try{var n=document.createTextNode(' ');element.appendChild(n);element.removeChild(n);}catch(e){} -return element;};Element.Methods.cumulativeOffset=function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body) -if(Element.getStyle(element,'position')=='absolute')break;element=element.offsetParent;}while(element);return Element._returnOffset(valueL,valueT);};} -if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content))return element.update().insert(content);content=Object.toHTML(content);var tagName=element.tagName.toUpperCase();if(tagName in Element._insertionTranslations.tags){$A(element.childNodes).each(function(node){element.removeChild(node)});Element._getContentFromAnonymousElement(tagName,content.stripScripts()).each(function(node){element.appendChild(node)});} -else element.innerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element;};} -if(document.createElement('div').outerHTML){Element.Methods.replace=function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){element.parentNode.replaceChild(content,element);return element;} -content=Object.toHTML(content);var parent=element.parentNode,tagName=parent.tagName.toUpperCase();if(Element._insertionTranslations.tags[tagName]){var nextSibling=element.next();var fragments=Element._getContentFromAnonymousElement(tagName,content.stripScripts());parent.removeChild(element);if(nextSibling) -fragments.each(function(node){parent.insertBefore(node,nextSibling)});else -fragments.each(function(node){parent.appendChild(node)});} -else element.outerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element;};} -Element._returnOffset=function(l,t){var result=[l,t];result.left=l;result.top=t;return result;};Element._getContentFromAnonymousElement=function(tagName,html){var div=new Element('div'),t=Element._insertionTranslations.tags[tagName];div.innerHTML=t[0]+html+t[1];t[2].times(function(){div=div.firstChild});return $A(div.childNodes);};Element._insertionTranslations={before:{adjacency:'beforeBegin',insert:function(element,node){element.parentNode.insertBefore(node,element);},initializeRange:function(element,range){range.setStartBefore(element);}},top:{adjacency:'afterBegin',insert:function(element,node){element.insertBefore(node,element.firstChild);},initializeRange:function(element,range){range.selectNodeContents(element);range.collapse(true);}},bottom:{adjacency:'beforeEnd',insert:function(element,node){element.appendChild(node);}},after:{adjacency:'afterEnd',insert:function(element,node){element.parentNode.insertBefore(node,element.nextSibling);},initializeRange:function(element,range){range.setStartAfter(element);}},tags:{TABLE:['<table>','</table>',1],TBODY:['<table><tbody>','</tbody></table>',2],TR:['<table><tbody><tr>','</tr></tbody></table>',3],TD:['<table><tbody><tr><td>','</td></tr></tbody></table>',4],SELECT:['<select>','</select>',1]}};(function(){this.bottom.initializeRange=this.top.initializeRange;Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD});}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(element,attribute){attribute=Element._attributeTranslations.has[attribute]||attribute;var node=$(element).getAttributeNode(attribute);return node&&node.specified;}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement('div').__proto__){window.HTMLElement={};window.HTMLElement.prototype=document.createElement('div').__proto__;Prototype.BrowserFeatures.ElementExtensions=true;} -Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions) -return Prototype.K;var Methods={},ByTag=Element.Methods.ByTag;var extend=Object.extend(function(element){if(!element||element._extendedByPrototype||element.nodeType!=1||element==window)return element;var methods=Object.clone(Methods),tagName=element.tagName,property,value;if(ByTag[tagName])Object.extend(methods,ByTag[tagName]);for(property in methods){value=methods[property];if(Object.isFunction(value)&&!(property in element)) -element[property]=value.methodize();} -element._extendedByPrototype=Prototype.emptyFunction;return element;},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(Methods,Element.Methods);Object.extend(Methods,Element.Methods.Simulated);}}});extend.refresh();return extend;})();Element.hasAttribute=function(element,attribute){if(element.hasAttribute)return element.hasAttribute(attribute);return Element.Methods.Simulated.hasAttribute(element,attribute);};Element.addMethods=function(methods){var F=Prototype.BrowserFeatures,T=Element.Methods.ByTag;if(!methods){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{"FORM":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Methods)});} -if(arguments.length==2){var tagName=methods;methods=arguments[1];} -if(!tagName)Object.extend(Element.Methods,methods||{});else{if(Object.isArray(tagName))tagName.each(extend);else extend(tagName);} -function extend(tagName){tagName=tagName.toUpperCase();if(!Element.Methods.ByTag[tagName]) -Element.Methods.ByTag[tagName]={};Object.extend(Element.Methods.ByTag[tagName],methods);} -function copy(methods,destination,onlyIfAbsent){onlyIfAbsent=onlyIfAbsent||false;for(var property in methods){var value=methods[property];if(!Object.isFunction(value))continue;if(!onlyIfAbsent||!(property in destination)) -destination[property]=value.methodize();}} -function findDOMClass(tagName){var klass;var trans={"OPTGROUP":"OptGroup","TEXTAREA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList","DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4":"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A":"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"TableCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"IFrame"};if(trans[tagName])klass='HTML'+trans[tagName]+'Element';if(window[klass])return window[klass];klass='HTML'+tagName+'Element';if(window[klass])return window[klass];klass='HTML'+tagName.capitalize()+'Element';if(window[klass])return window[klass];window[klass]={};window[klass].prototype=document.createElement(tagName).__proto__;return window[klass];} -if(F.ElementExtensions){copy(Element.Methods,HTMLElement.prototype);copy(Element.Methods.Simulated,HTMLElement.prototype,true);} -if(F.SpecificElementExtensions){for(var tag in Element.Methods.ByTag){var klass=findDOMClass(tag);if(Object.isUndefined(klass))continue;copy(T[tag],klass.prototype);}} -Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh)Element.extend.refresh();Element.cache={};};document.viewport={getDimensions:function(){var dimensions={};$w('width height').each(function(d){var D=d.capitalize();dimensions[d]=self['inner'+D]||(document.documentElement['client'+D]||document.body['client'+D]);});return dimensions;},getWidth:function(){return this.getDimensions().width;},getHeight:function(){return this.getDimensions().height;},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);}};var Selector=Class.create({initialize:function(expression){this.expression=expression.strip();this.compileMatcher();},compileMatcher:function(){if(Prototype.BrowserFeatures.XPath&&!(/(\[[\w-]*?:|:checked)/).test(this.expression)) -return this.compileXPathMatcher();var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return;} -this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],'');break;}}} -this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join('\n'));Selector._cache[this.expression]=this.matcher;},compileXPathMatcher:function(){var e=this.expression,ps=Selector.patterns,x=Selector.xpath,le,m;if(Selector._cache[e]){this.xpath=Selector._cache[e];return;} -this.matcher=['.//*'];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){if(m=e.match(ps[i])){this.matcher.push(Object.isFunction(x[i])?x[i](m):new Template(x[i]).evaluate(m));e=e.replace(m[0],'');break;}}} -this.xpath=this.matcher.join('');Selector._cache[this.expression]=this.xpath;},findElements:function(root){root=root||document;if(this.xpath)return document._getElementsByXPath(this.xpath,root);return this.matcher(root);},match:function(element){this.tokens=[];var e=this.expression,ps=Selector.patterns,as=Selector.assertions;var le,p,m;while(e&&le!==e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){if(as[i]){this.tokens.push([i,Object.clone(m)]);e=e.replace(m[0],'');}else{return this.findElements(document).include(element);}}}} -var match=true,name,matches;for(var i=0,token;token=this.tokens[i];i++){name=token[0],matches=token[1];if(!Selector.assertions[name](element,matches)){match=false;break;}} -return match;},toString:function(){return this.expression;},inspect:function(){return"#<Selector:"+this.expression.inspect()+">";}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:'/following-sibling::*',tagName:function(m){if(m[1]=='*')return'';return"[local-name()='"+m[1].toLowerCase()+"' or local-name()='"+m[1].toUpperCase()+"']";},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:"[@#{1}]",attr:function(m){m[3]=m[5]||m[6];return new Template(Selector.xpath.operators[m[2]]).evaluate(m);},pseudo:function(m){var h=Selector.xpath.pseudos[m[1]];if(!h)return'';if(Object.isFunction(h))return h(m);return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);},operators:{'=':"[@#{1}='#{3}']",'!=':"[@#{1}!='#{3}']",'^=':"[starts-with(@#{1}, '#{3}')]",'$=':"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",'*=':"[contains(@#{1}, '#{3}')]",'~=':"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",'|=':"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{'first-child':'[not(preceding-sibling::*)]','last-child':'[not(following-sibling::*)]','only-child':'[not(preceding-sibling::* or following-sibling::*)]','empty':"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",'checked':"[@checked]",'disabled':"[@disabled]",'enabled':"[not(@disabled)]",'not':function(m){var e=m[6],p=Selector.patterns,x=Selector.xpath,le,m,v;var exclusion=[];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in p){if(m=e.match(p[i])){v=Object.isFunction(x[i])?x[i](m):new Template(x[i]).evaluate(m);exclusion.push("("+v.substring(1,v.length-1)+")");e=e.replace(m[0],'');break;}}} -return"[not("+exclusion.join(" and ")+")]";},'nth-child':function(m){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",m);},'nth-last-child':function(m){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",m);},'nth-of-type':function(m){return Selector.xpath.pseudos.nth("position() ",m);},'nth-last-of-type':function(m){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",m);},'first-of-type':function(m){m[6]="1";return Selector.xpath.pseudos['nth-of-type'](m);},'last-of-type':function(m){m[6]="1";return Selector.xpath.pseudos['nth-last-of-type'](m);},'only-of-type':function(m){var p=Selector.xpath.pseudos;return p['first-of-type'](m)+p['last-of-type'](m);},nth:function(fragment,m){var mm,formula=m[6],predicate;if(formula=='even')formula='2n+0';if(formula=='odd')formula='2n+1';if(mm=formula.match(/^(\d+)$/)) -return'['+fragment+"= "+mm[1]+']';if(mm=formula.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(mm[1]=="-")mm[1]=-1;var a=mm[1]?Number(mm[1]):1;var b=mm[2]?Number(mm[2]):0;predicate="[((#{fragment} - #{b}) mod #{a} = 0) and "+"((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(predicate).evaluate({fragment:fragment,a:a,b:b});}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c); c = false;',className:'n = h.className(n, r, "#{1}", c); c = false;',id:'n = h.id(n, r, "#{1}", c); c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}"); c = false;',attr:function(m){m[3]=(m[5]||m[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m);},pseudo:function(m){if(m[6])m[6]=m[6].replace(/"/g,'\\"');return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(element,matches){return matches[1].toUpperCase()==element.tagName.toUpperCase();},className:function(element,matches){return Element.hasClassName(element,matches[1]);},id:function(element,matches){return element.id===matches[1];},attrPresence:function(element,matches){return Element.hasAttribute(element,matches[1]);},attr:function(element,matches){var nodeValue=Element.readAttribute(element,matches[1]);return Selector.operators[matches[2]](nodeValue,matches[3]);}},handlers:{concat:function(a,b){for(var i=0,node;node=b[i];i++) -a.push(node);return a;},mark:function(nodes){for(var i=0,node;node=nodes[i];i++) -node._counted=true;return nodes;},unmark:function(nodes){for(var i=0,node;node=nodes[i];i++) -node._counted=undefined;return nodes;},index:function(parentNode,reverse,ofType){parentNode._counted=true;if(reverse){for(var nodes=parentNode.childNodes,i=nodes.length-1,j=1;i>=0;i--){var node=nodes[i];if(node.nodeType==1&&(!ofType||node._counted))node.nodeIndex=j++;}}else{for(var i=0,j=1,nodes=parentNode.childNodes;node=nodes[i];i++) -if(node.nodeType==1&&(!ofType||node._counted))node.nodeIndex=j++;}},unique:function(nodes){if(nodes.length==0)return nodes;var results=[],n;for(var i=0,l=nodes.length;i<l;i++) -if(!(n=nodes[i])._counted){n._counted=true;results.push(Element.extend(n));} -return Selector.handlers.unmark(results);},descendant:function(nodes){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++) -h.concat(results,node.getElementsByTagName('*'));return results;},child:function(nodes){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++){for(var j=0,children=[],child;child=node.childNodes[j];j++) -if(child.nodeType==1&&child.tagName!='!')results.push(child);} -return results;},adjacent:function(nodes){for(var i=0,results=[],node;node=nodes[i];i++){var next=this.nextElementSibling(node);if(next)results.push(next);} -return results;},laterSibling:function(nodes){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++) -h.concat(results,Element.nextSiblings(node));return results;},nextElementSibling:function(node){while(node=node.nextSibling) -if(node.nodeType==1)return node;return null;},previousElementSibling:function(node){while(node=node.previousSibling) -if(node.nodeType==1)return node;return null;},tagName:function(nodes,root,tagName,combinator){tagName=tagName.toUpperCase();var results=[],h=Selector.handlers;if(nodes){if(combinator){if(combinator=="descendant"){for(var i=0,node;node=nodes[i];i++) -h.concat(results,node.getElementsByTagName(tagName));return results;}else nodes=this[combinator](nodes);if(tagName=="*")return nodes;} -for(var i=0,node;node=nodes[i];i++) -if(node.tagName.toUpperCase()==tagName)results.push(node);return results;}else return root.getElementsByTagName(tagName);},id:function(nodes,root,id,combinator){var targetNode=$(id),h=Selector.handlers;if(!targetNode)return[];if(!nodes&&root==document)return[targetNode];if(nodes){if(combinator){if(combinator=='child'){for(var i=0,node;node=nodes[i];i++) -if(targetNode.parentNode==node)return[targetNode];}else if(combinator=='descendant'){for(var i=0,node;node=nodes[i];i++) -if(Element.descendantOf(targetNode,node))return[targetNode];}else if(combinator=='adjacent'){for(var i=0,node;node=nodes[i];i++) -if(Selector.handlers.previousElementSibling(targetNode)==node) -return[targetNode];}else nodes=h[combinator](nodes);} -for(var i=0,node;node=nodes[i];i++) -if(node==targetNode)return[targetNode];return[];} -return(targetNode&&Element.descendantOf(targetNode,root))?[targetNode]:[];},className:function(nodes,root,className,combinator){if(nodes&&combinator)nodes=this[combinator](nodes);return Selector.handlers.byClassName(nodes,root,className);},byClassName:function(nodes,root,className){if(!nodes)nodes=Selector.handlers.descendant([root]);var needle=' '+className+' ';for(var i=0,results=[],node,nodeClassName;node=nodes[i];i++){nodeClassName=node.className;if(nodeClassName.length==0)continue;if(nodeClassName==className||(' '+nodeClassName+' ').include(needle)) -results.push(node);} -return results;},attrPresence:function(nodes,root,attr){var results=[];for(var i=0,node;node=nodes[i];i++) -if(Element.hasAttribute(node,attr))results.push(node);return results;},attr:function(nodes,root,attr,value,operator){if(!nodes)nodes=root.getElementsByTagName("*");var handler=Selector.operators[operator],results=[];for(var i=0,node;node=nodes[i];i++){var nodeValue=Element.readAttribute(node,attr);if(nodeValue===null)continue;if(handler(nodeValue,value))results.push(node);} -return results;},pseudo:function(nodes,name,value,root,combinator){if(nodes&&combinator)nodes=this[combinator](nodes);if(!nodes)nodes=root.getElementsByTagName("*");return Selector.pseudos[name](nodes,value,root);}},pseudos:{'first-child':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++){if(Selector.handlers.previousElementSibling(node))continue;results.push(node);} -return results;},'last-child':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++){if(Selector.handlers.nextElementSibling(node))continue;results.push(node);} -return results;},'only-child':function(nodes,value,root){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++) -if(!h.previousElementSibling(node)&&!h.nextElementSibling(node)) -results.push(node);return results;},'nth-child':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root);},'nth-last-child':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root,true);},'nth-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root,false,true);},'nth-last-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root,true,true);},'first-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,"1",root,false,true);},'last-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,"1",root,true,true);},'only-of-type':function(nodes,formula,root){var p=Selector.pseudos;return p['last-of-type'](p['first-of-type'](nodes,formula,root),formula,root);},getIndices:function(a,b,total){if(a==0)return b>0?[b]:[];return $R(1,total).inject([],function(memo,i){if(0==(i-b)%a&&(i-b)/a>=0)memo.push(i);return memo;});},nth:function(nodes,formula,root,reverse,ofType){if(nodes.length==0)return[];if(formula=='even')formula='2n+0';if(formula=='odd')formula='2n+1';var h=Selector.handlers,results=[],indexed=[],m;h.mark(nodes);for(var i=0,node;node=nodes[i];i++){if(!node.parentNode._counted){h.index(node.parentNode,reverse,ofType);indexed.push(node.parentNode);}} -if(formula.match(/^\d+$/)){formula=Number(formula);for(var i=0,node;node=nodes[i];i++) -if(node.nodeIndex==formula)results.push(node);}else if(m=formula.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(m[1]=="-")m[1]=-1;var a=m[1]?Number(m[1]):1;var b=m[2]?Number(m[2]):0;var indices=Selector.pseudos.getIndices(a,b,nodes.length);for(var i=0,node,l=indices.length;node=nodes[i];i++){for(var j=0;j<l;j++) -if(node.nodeIndex==indices[j])results.push(node);}} -h.unmark(nodes);h.unmark(indexed);return results;},'empty':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++){if(node.tagName=='!'||(node.firstChild&&!node.innerHTML.match(/^\s*$/)))continue;results.push(node);} -return results;},'not':function(nodes,selector,root){var h=Selector.handlers,selectorType,m;var exclusions=new Selector(selector).findElements(root);h.mark(exclusions);for(var i=0,results=[],node;node=nodes[i];i++) -if(!node._counted)results.push(node);h.unmark(exclusions);return results;},'enabled':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++) -if(!node.disabled)results.push(node);return results;},'disabled':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++) -if(node.disabled)results.push(node);return results;},'checked':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++) -if(node.checked)results.push(node);return results;}},operators:{'=':function(nv,v){return nv==v;},'!=':function(nv,v){return nv!=v;},'^=':function(nv,v){return nv.startsWith(v);},'$=':function(nv,v){return nv.endsWith(v);},'*=':function(nv,v){return nv.include(v);},'~=':function(nv,v){return(' '+nv+' ').include(' '+v+' ');},'|=':function(nv,v){return('-'+nv.toUpperCase()+'-').include('-'+v.toUpperCase()+'-');}},matchElements:function(elements,expression){var matches=new Selector(expression).findElements(),h=Selector.handlers;h.mark(matches);for(var i=0,results=[],element;element=elements[i];i++) -if(element._counted)results.push(element);h.unmark(matches);return results;},findElement:function(elements,expression,index){if(Object.isNumber(expression)){index=expression;expression=false;} -return Selector.matchElements(elements,expression||'*')[index||0];},findChildElements:function(element,expressions){var exprs=expressions.join(','),expressions=[];exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(m){expressions.push(m[1].strip());});var results=[],h=Selector.handlers;for(var i=0,l=expressions.length,selector;i<l;i++){selector=new Selector(expressions[i].strip());h.concat(results,selector.findElements(element));} -return(l>1)?h.unique(results):results;}});function $$(){return Selector.findChildElements(document,$A(arguments));} -var Form={reset:function(form){$(form).reset();return form;},serializeElements:function(elements,options){if(typeof options!='object')options={hash:!!options};else if(options.hash===undefined)options.hash=true;var key,value,submitted=false,submit=options.submit;var data=elements.inject({},function(result,element){if(!element.disabled&&element.name){key=element.name;value=$(element).getValue();if(value!=null&&(element.type!='submit'||(!submitted&&submit!==false&&(!submit||key==submit)&&(submitted=true)))){if(key in result){if(!Object.isArray(result[key]))result[key]=[result[key]];result[key].push(value);} -else result[key]=value;}} -return result;});return options.hash?data:Object.toQueryString(data);}};Form.Methods={serialize:function(form,options){return Form.serializeElements(Form.getElements(form),options);},getElements:function(form){return $A($(form).getElementsByTagName('*')).inject([],function(elements,child){if(Form.Element.Serializers[child.tagName.toLowerCase()]) -elements.push(Element.extend(child));return elements;});},getInputs:function(form,typeName,name){form=$(form);var inputs=form.getElementsByTagName('input');if(!typeName&&!name)return $A(inputs).map(Element.extend);for(var i=0,matchingInputs=[],length=inputs.length;i<length;i++){var input=inputs[i];if((typeName&&input.type!=typeName)||(name&&input.name!=name)) -continue;matchingInputs.push(Element.extend(input));} -return matchingInputs;},disable:function(form){form=$(form);Form.getElements(form).invoke('disable');return form;},enable:function(form){form=$(form);Form.getElements(form).invoke('enable');return form;},findFirstElement:function(form){var elements=$(form).getElements().findAll(function(element){return'hidden'!=element.type&&!element.disabled;});var firstByIndex=elements.findAll(function(element){return element.hasAttribute('tabIndex')&&element.tabIndex>=0;}).sortBy(function(element){return element.tabIndex}).first();return firstByIndex?firstByIndex:elements.find(function(element){return['input','select','textarea'].include(element.tagName.toLowerCase());});},focusFirstElement:function(form){form=$(form);form.findFirstElement().activate();return form;},request:function(form,options){form=$(form),options=Object.clone(options||{});var params=options.parameters,action=form.readAttribute('action')||'';if(action.blank())action=window.location.href;options.parameters=form.serialize(true);if(params){if(Object.isString(params))params=params.toQueryParams();Object.extend(options.parameters,params);} -if(form.hasAttribute('method')&&!options.method) -options.method=form.method;return new Ajax.Request(action,options);}};Form.Element={focus:function(element){$(element).focus();return element;},select:function(element){$(element).select();return element;}};Form.Element.Methods={serialize:function(element){element=$(element);if(!element.disabled&&element.name){var value=element.getValue();if(value!=undefined){var pair={};pair[element.name]=value;return Object.toQueryString(pair);}} -return'';},getValue:function(element){element=$(element);var method=element.tagName.toLowerCase();return Form.Element.Serializers[method](element);},setValue:function(element,value){element=$(element);var method=element.tagName.toLowerCase();Form.Element.Serializers[method](element,value);return element;},clear:function(element){$(element).value='';return element;},present:function(element){return $(element).value!='';},activate:function(element){element=$(element);try{element.focus();if(element.select&&(element.tagName.toLowerCase()!='input'||!['button','reset','submit'].include(element.type))) -element.select();}catch(e){} -return element;},disable:function(element){element=$(element);element.blur();element.disabled=true;return element;},enable:function(element){element=$(element);element.disabled=false;return element;}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(element,value){switch(element.type.toLowerCase()){case'checkbox':case'radio':return Form.Element.Serializers.inputSelector(element,value);default:return Form.Element.Serializers.textarea(element,value);}},inputSelector:function(element,value){if(value===undefined)return element.checked?element.value:null;else element.checked=!!value;},textarea:function(element,value){if(value===undefined)return element.value;else element.value=value;},select:function(element,index){if(index===undefined) -return this[element.type=='select-one'?'selectOne':'selectMany'](element);else{var opt,value,single=!Object.isArray(index);for(var i=0,length=element.length;i<length;i++){opt=element.options[i];value=this.optionValue(opt);if(single){if(value==index){opt.selected=true;return;}} -else opt.selected=index.include(value);}}},selectOne:function(element){var index=element.selectedIndex;return index>=0?this.optionValue(element.options[index]):null;},selectMany:function(element){var values,length=element.length;if(!length)return null;for(var i=0,values=[];i<length;i++){var opt=element.options[i];if(opt.selected)values.push(this.optionValue(opt));} -return values;},optionValue:function(opt){return Element.extend(opt).hasAttribute('value')?opt.value:opt.text;}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,element,frequency,callback){$super(callback,frequency);this.element=$(element);this.lastValue=this.getValue();},execute:function(){var value=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(value)?this.lastValue!=value:String(this.lastValue)!=String(value)){this.callback(this.element,value);this.lastValue=value;}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element);}});Abstract.EventObserver=Class.create({initialize:function(element,callback){this.element=$(element);this.callback=callback;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=='form') -this.registerFormCallbacks();else -this.registerCallback(this.element);},onElementEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value;}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this);},registerCallback:function(element){if(element.type){switch(element.type.toLowerCase()){case'checkbox':case'radio':Event.observe(element,'click',this.onElementEvent.bind(this));break;default:Event.observe(element,'change',this.onElementEvent.bind(this));break;}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element);}});if(!window.Event)var Event={};Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(event){var element;switch(event.type){case'mouseover':element=event.fromElement;break;case'mouseout':element=event.toElement;break;default:return null;} -return Element.extend(element);}});Event.Methods=(function(){if(Prototype.Browser.IE){function isButton(event,code){return event.button==({0:1,1:4,2:2})[code];}}else if(Prototype.Browser.WebKit){function isButton(event,code){switch(code){case 0:return event.which==1&&!event.metaKey;case 1:return event.which==1&&event.metaKey;default:return false;}}}else{function isButton(event,code){return event.which?(event.which===code+1):(event.button===code);}} -return{isLeftClick:function(event){return isButton(event,0)},isMiddleClick:function(event){return isButton(event,1)},isRightClick:function(event){return isButton(event,2)},element:function(event){var node=Event.extend(event).target;return Element.extend(node.nodeType==Node.TEXT_NODE?node.parentNode:node);},findElement:function(event,expression){var element=Event.element(event);return element.match(expression)?element:element.up(expression);},pointer:function(event){return{x:event.pageX||(event.clientX+ -(document.documentElement.scrollLeft||document.body.scrollLeft)),y:event.pageY||(event.clientY+ -(document.documentElement.scrollTop||document.body.scrollTop))};},pointerX:function(event){return Event.pointer(event).x},pointerY:function(event){return Event.pointer(event).y},stop:function(event){Event.extend(event);event.preventDefault();event.stopPropagation();}};})();Event.extend=(function(){var methods=Object.keys(Event.Methods).inject({},function(m,name){m[name]=Event.Methods[name].methodize();return m;});if(Prototype.Browser.IE){Object.extend(methods,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(event){if(!event)return false;if(event._extendedByPrototype)return event;event._extendedByPrototype=Prototype.emptyFunction;var pointer=Event.pointer(event);Object.extend(event,{target:event.srcElement,relatedTarget:Event.relatedTarget(event),pageX:pointer.x,pageY:pointer.y});return Object.extend(event,methods);};}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(Event.prototype,methods);return Prototype.K;}})();Object.extend(Event,(function(){var cache=Event.cache;function getEventID(element){if(element._eventID)return element._eventID;arguments.callee.id=arguments.callee.id||1;return element._eventID=++arguments.callee.id;} -function getDOMEventName(eventName){if(eventName&&eventName.match(/:/))return"dataavailable";return eventName;} -function getCacheForID(id){return cache[id]=cache[id]||{};} -function getWrappersForEventName(id,eventName){var c=getCacheForID(id);return c[eventName]=c[eventName]||[];} -function createWrapper(element,eventName,handler){var id=getEventID(element);var c=getWrappersForEventName(id,eventName);if(c.pluck("handler").include(handler))return false;var wrapper=function(event){if(event.eventName&&event.eventName!=eventName) -return false;Event.extend(event);handler.call(element,event)};wrapper.handler=handler;c.push(wrapper);return wrapper;} -function findWrapper(id,eventName,handler){var c=getWrappersForEventName(id,eventName);return c.find(function(wrapper){return wrapper.handler==handler});} -function destroyWrapper(id,eventName,handler){var c=getCacheForID(id);if(!c[eventName])return false;c[eventName]=c[eventName].without(findWrapper(id,eventName,handler));} -function destroyCache(){for(var id in cache) -for(var eventName in cache[id]) -cache[id][eventName]=null;} -if(window.attachEvent){window.attachEvent("onunload",destroyCache);} -return{observe:function(element,eventName,handler){element=$(element);var name=getDOMEventName(eventName);var wrapper=createWrapper(element,eventName,handler);if(!wrapper)return element;if(element.addEventListener){element.addEventListener(name,wrapper,false);}else{element.attachEvent("on"+name,wrapper);} -return element;},stopObserving:function(element,eventName,handler){element=$(element);var id=getEventID(element),name=getDOMEventName(eventName);if(!handler&&eventName){getWrappersForEventName(id,eventName).each(function(wrapper){element.stopObserving(eventName,wrapper.handler);});return element;}else if(!eventName){Object.keys(getCacheForID(id)).each(function(eventName){element.stopObserving(eventName);});return element;} -var wrapper=findWrapper(id,eventName,handler);if(!wrapper)return element;if(element.removeEventListener){element.removeEventListener(name,wrapper,false);}else{element.detachEvent("on"+name,wrapper);} -destroyWrapper(id,eventName,handler);return element;},fire:function(element,eventName,memo){element=$(element);if(element==document&&document.createEvent&&!element.dispatchEvent) -element=document.documentElement;if(document.createEvent){var event=document.createEvent("HTMLEvents");event.initEvent("dataavailable",true,true);}else{var event=document.createEventObject();event.eventType="ondataavailable";} -event.eventName=eventName;event.memo=memo||{};if(document.createEvent){element.dispatchEvent(event);}else{element.fireEvent(event.eventType,event);} -return event;}};})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize()});(function(){var timer,fired=false;function fireContentLoadedEvent(){if(fired)return;if(timer)window.clearInterval(timer);document.fire("dom:loaded");fired=true;} -if(document.addEventListener){if(Prototype.Browser.WebKit){timer=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)) -fireContentLoadedEvent();},0);Event.observe(window,"load",fireContentLoadedEvent);}else{document.addEventListener("DOMContentLoaded",fireContentLoadedEvent,false);}}else{document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;fireContentLoadedEvent();}};}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(element,content){return Element.insert(element,{before:content});},Top:function(element,content){return Element.insert(element,{top:content});},Bottom:function(element,content){return Element.insert(element,{bottom:content});},After:function(element,content){return Element.insert(element,{after:content});}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;},within:function(element,x,y){if(this.includeScrollOffsets) -return this.withinIncludingScrolloffsets(element,x,y);this.xcomp=x;this.ycomp=y;this.offset=Element.cumulativeOffset(element);return(y>=this.offset[1]&&y<this.offset[1]+element.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+element.offsetWidth);},withinIncludingScrolloffsets:function(element,x,y){var offsetcache=Element.cumulativeScrollOffset(element);this.xcomp=x+offsetcache[0]-this.deltaX;this.ycomp=y+offsetcache[1]-this.deltaY;this.offset=Element.cumulativeOffset(element);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+element.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+element.offsetWidth);},overlap:function(mode,element){if(!mode)return 0;if(mode=='vertical') -return((this.offset[1]+element.offsetHeight)-this.ycomp)/element.offsetHeight;if(mode=='horizontal') -return((this.offset[0]+element.offsetWidth)-this.xcomp)/element.offsetWidth;},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(element){Position.prepare();return Element.absolutize(element);},relativize:function(element){Position.prepare();return Element.relativize(element);},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(source,target,options){options=options||{};return Element.clonePosition(target,source,options);}};if(!document.getElementsByClassName)document.getElementsByClassName=function(instanceMethods){function iter(name){return name.blank()?null:"[contains(concat(' ', @class, ' '), ' "+name+" ')]";} -instanceMethods.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(element,className){className=className.toString().strip();var cond=/\s/.test(className)?$w(className).map(iter).join(''):iter(className);return cond?document._getElementsByXPath('.//*'+cond,element):[];}:function(element,className){className=className.toString().strip();var elements=[],classNames=(/\s/.test(className)?$w(className):null);if(!classNames&&!className)return elements;var nodes=$(element).getElementsByTagName('*');className=' '+className+' ';for(var i=0,child,cn;child=nodes[i];i++){if(child.className&&(cn=' '+child.className+' ')&&(cn.include(className)||(classNames&&classNames.all(function(name){return!name.toString().blank()&&cn.include(' '+name+' ');})))) -elements.push(Element.extend(child));} -return elements;};return function(className,parentElement){return $(parentElement||document.body).getElementsByClassName(className);};}(Element.Methods);Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(element){this.element=$(element);},_each:function(iterator){this.element.className.split(/\s+/).select(function(name){return name.length>0;})._each(iterator);},set:function(className){this.element.className=className;},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' '));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set($A(this).without(classNameToRemove).join(' '));},toString:function(){return $A(this).join(' ');}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods(); \ No newline at end of file +var Prototype = { + Version: '1.6.1', + + Browser: (function(){ + var ua = navigator.userAgent; + var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]'; + return { + IE: !!window.attachEvent && !isOpera, + Opera: isOpera, + WebKit: ua.indexOf('AppleWebKit/') > -1, + Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1, + MobileSafari: /Apple.*Mobile.*Safari/.test(ua) + } + })(), + + BrowserFeatures: { + XPath: !!document.evaluate, + SelectorsAPI: !!document.querySelector, + ElementExtensions: (function() { + var constructor = window.Element || window.HTMLElement; + return !!(constructor && constructor.prototype); + })(), + SpecificElementExtensions: (function() { + if (typeof window.HTMLDivElement !== 'undefined') + return true; + + var div = document.createElement('div'); + var form = document.createElement('form'); + var isSupported = false; + + if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) { + isSupported = true; + } + + div = form = null; + + return isSupported; + })() + }, + + ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>', + JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, + + emptyFunction: function() { }, + K: function(x) { return x } +}; + +if (Prototype.Browser.MobileSafari) + Prototype.BrowserFeatures.SpecificElementExtensions = false; + + +var Abstract = { }; + + +var Try = { + these: function() { + var returnValue; + + for (var i = 0, length = arguments.length; i < length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) { } + } + + return returnValue; + } +}; + +/* Based on Alex Arnell's inheritance implementation. */ + +var Class = (function() { + function subclass() {}; + function create() { + var parent = null, properties = $A(arguments); + if (Object.isFunction(properties[0])) + parent = properties.shift(); + + function klass() { + this.initialize.apply(this, arguments); + } + + Object.extend(klass, Class.Methods); + klass.superclass = parent; + klass.subclasses = []; + + if (parent) { + subclass.prototype = parent.prototype; + klass.prototype = new subclass; + parent.subclasses.push(klass); + } + + for (var i = 0; i < properties.length; i++) + klass.addMethods(properties[i]); + + if (!klass.prototype.initialize) + klass.prototype.initialize = Prototype.emptyFunction; + + klass.prototype.constructor = klass; + return klass; + } + + function addMethods(source) { + var ancestor = this.superclass && this.superclass.prototype; + var properties = Object.keys(source); + + if (!Object.keys({ toString: true }).length) { + if (source.toString != Object.prototype.toString) + properties.push("toString"); + if (source.valueOf != Object.prototype.valueOf) + properties.push("valueOf"); + } + + for (var i = 0, length = properties.length; i < length; i++) { + var property = properties[i], value = source[property]; + if (ancestor && Object.isFunction(value) && + value.argumentNames().first() == "$super") { + var method = value; + value = (function(m) { + return function() { return ancestor[m].apply(this, arguments); }; + })(property).wrap(method); + + value.valueOf = method.valueOf.bind(method); + value.toString = method.toString.bind(method); + } + this.prototype[property] = value; + } + + return this; + } + + return { + create: create, + Methods: { + addMethods: addMethods + } + }; +})(); +(function() { + + var _toString = Object.prototype.toString; + + function extend(destination, source) { + for (var property in source) + destination[property] = source[property]; + return destination; + } + + function inspect(object) { + try { + if (isUndefined(object)) return 'undefined'; + if (object === null) return 'null'; + return object.inspect ? object.inspect() : String(object); + } catch (e) { + if (e instanceof RangeError) return '...'; + throw e; + } + } + + function toJSON(object) { + var type = typeof object; + switch (type) { + case 'undefined': + case 'function': + case 'unknown': return; + case 'boolean': return object.toString(); + } + + if (object === null) return 'null'; + if (object.toJSON) return object.toJSON(); + if (isElement(object)) return; + + var results = []; + for (var property in object) { + var value = toJSON(object[property]); + if (!isUndefined(value)) + results.push(property.toJSON() + ': ' + value); + } + + return '{' + results.join(', ') + '}'; + } + + function toQueryString(object) { + return $H(object).toQueryString(); + } + + function toHTML(object) { + return object && object.toHTML ? object.toHTML() : String.interpret(object); + } + + function keys(object) { + var results = []; + for (var property in object) + results.push(property); + return results; + } + + function values(object) { + var results = []; + for (var property in object) + results.push(object[property]); + return results; + } + + function clone(object) { + return extend({ }, object); + } + + function isElement(object) { + return !!(object && object.nodeType == 1); + } + + function isArray(object) { + return _toString.call(object) == "[object Array]"; + } + + + function isHash(object) { + return object instanceof Hash; + } + + function isFunction(object) { + return typeof object === "function"; + } + + function isString(object) { + return _toString.call(object) == "[object String]"; + } + + function isNumber(object) { + return _toString.call(object) == "[object Number]"; + } + + function isUndefined(object) { + return typeof object === "undefined"; + } + + extend(Object, { + extend: extend, + inspect: inspect, + toJSON: toJSON, + toQueryString: toQueryString, + toHTML: toHTML, + keys: keys, + values: values, + clone: clone, + isElement: isElement, + isArray: isArray, + isHash: isHash, + isFunction: isFunction, + isString: isString, + isNumber: isNumber, + isUndefined: isUndefined + }); +})(); +Object.extend(Function.prototype, (function() { + var slice = Array.prototype.slice; + + function update(array, args) { + var arrayLength = array.length, length = args.length; + while (length--) array[arrayLength + length] = args[length]; + return array; + } + + function merge(array, args) { + array = slice.call(array, 0); + return update(array, args); + } + + function argumentNames() { + var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1] + .replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '') + .replace(/\s+/g, '').split(','); + return names.length == 1 && !names[0] ? [] : names; + } + + function bind(context) { + if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this; + var __method = this, args = slice.call(arguments, 1); + return function() { + var a = merge(args, arguments); + return __method.apply(context, a); + } + } + + function bindAsEventListener(context) { + var __method = this, args = slice.call(arguments, 1); + return function(event) { + var a = update([event || window.event], args); + return __method.apply(context, a); + } + } + + function curry() { + if (!arguments.length) return this; + var __method = this, args = slice.call(arguments, 0); + return function() { + var a = merge(args, arguments); + return __method.apply(this, a); + } + } + + function delay(timeout) { + var __method = this, args = slice.call(arguments, 1); + timeout = timeout * 1000 + return window.setTimeout(function() { + return __method.apply(__method, args); + }, timeout); + } + + function defer() { + var args = update([0.01], arguments); + return this.delay.apply(this, args); + } + + function wrap(wrapper) { + var __method = this; + return function() { + var a = update([__method.bind(this)], arguments); + return wrapper.apply(this, a); + } + } + + function methodize() { + if (this._methodized) return this._methodized; + var __method = this; + return this._methodized = function() { + var a = update([this], arguments); + return __method.apply(null, a); + }; + } + + return { + argumentNames: argumentNames, + bind: bind, + bindAsEventListener: bindAsEventListener, + curry: curry, + delay: delay, + defer: defer, + wrap: wrap, + methodize: methodize + } +})()); + + +Date.prototype.toJSON = function() { + return '"' + this.getUTCFullYear() + '-' + + (this.getUTCMonth() + 1).toPaddedString(2) + '-' + + this.getUTCDate().toPaddedString(2) + 'T' + + this.getUTCHours().toPaddedString(2) + ':' + + this.getUTCMinutes().toPaddedString(2) + ':' + + this.getUTCSeconds().toPaddedString(2) + 'Z"'; +}; + + +RegExp.prototype.match = RegExp.prototype.test; + +RegExp.escape = function(str) { + return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); +}; +var PeriodicalExecuter = Class.create({ + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + execute: function() { + this.callback(this); + }, + + stop: function() { + if (!this.timer) return; + clearInterval(this.timer); + this.timer = null; + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.execute(); + this.currentlyExecuting = false; + } catch(e) { + this.currentlyExecuting = false; + throw e; + } + } + } +}); +Object.extend(String, { + interpret: function(value) { + return value == null ? '' : String(value); + }, + specialChar: { + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '\\': '\\\\' + } +}); + +Object.extend(String.prototype, (function() { + + function prepareReplacement(replacement) { + if (Object.isFunction(replacement)) return replacement; + var template = new Template(replacement); + return function(match) { return template.evaluate(match) }; + } + + function gsub(pattern, replacement) { + var result = '', source = this, match; + replacement = prepareReplacement(replacement); + + if (Object.isString(pattern)) + pattern = RegExp.escape(pattern); + + if (!(pattern.length || pattern.source)) { + replacement = replacement(''); + return replacement + source.split('').join(replacement) + replacement; + } + + while (source.length > 0) { + if (match = source.match(pattern)) { + result += source.slice(0, match.index); + result += String.interpret(replacement(match)); + source = source.slice(match.index + match[0].length); + } else { + result += source, source = ''; + } + } + return result; + } + + function sub(pattern, replacement, count) { + replacement = prepareReplacement(replacement); + count = Object.isUndefined(count) ? 1 : count; + + return this.gsub(pattern, function(match) { + if (--count < 0) return match[0]; + return replacement(match); + }); + } + + function scan(pattern, iterator) { + this.gsub(pattern, iterator); + return String(this); + } + + function truncate(length, truncation) { + length = length || 30; + truncation = Object.isUndefined(truncation) ? '...' : truncation; + return this.length > length ? + this.slice(0, length - truncation.length) + truncation : String(this); + } + + function strip() { + return this.replace(/^\s+/, '').replace(/\s+$/, ''); + } + + function stripTags() { + return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, ''); + } + + function stripScripts() { + return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); + } + + function extractScripts() { + var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); + var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); + return (this.match(matchAll) || []).map(function(scriptTag) { + return (scriptTag.match(matchOne) || ['', ''])[1]; + }); + } + + function evalScripts() { + return this.extractScripts().map(function(script) { return eval(script) }); + } + + function escapeHTML() { + return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); + } + + function unescapeHTML() { + return this.stripTags().replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&'); + } + + + function toQueryParams(separator) { + var match = this.strip().match(/([^?#]*)(#.*)?$/); + if (!match) return { }; + + return match[1].split(separator || '&').inject({ }, function(hash, pair) { + if ((pair = pair.split('='))[0]) { + var key = decodeURIComponent(pair.shift()); + var value = pair.length > 1 ? pair.join('=') : pair[0]; + if (value != undefined) value = decodeURIComponent(value); + + if (key in hash) { + if (!Object.isArray(hash[key])) hash[key] = [hash[key]]; + hash[key].push(value); + } + else hash[key] = value; + } + return hash; + }); + } + + function toArray() { + return this.split(''); + } + + function succ() { + return this.slice(0, this.length - 1) + + String.fromCharCode(this.charCodeAt(this.length - 1) + 1); + } + + function times(count) { + return count < 1 ? '' : new Array(count + 1).join(this); + } + + function camelize() { + var parts = this.split('-'), len = parts.length; + if (len == 1) return parts[0]; + + var camelized = this.charAt(0) == '-' + ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) + : parts[0]; + + for (var i = 1; i < len; i++) + camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); + + return camelized; + } + + function capitalize() { + return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); + } + + function underscore() { + return this.replace(/::/g, '/') + .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') + .replace(/([a-z\d])([A-Z])/g, '$1_$2') + .replace(/-/g, '_') + .toLowerCase(); + } + + function dasherize() { + return this.replace(/_/g, '-'); + } + + function inspect(useDoubleQuotes) { + var escapedString = this.replace(/[\x00-\x1f\\]/g, function(character) { + if (character in String.specialChar) { + return String.specialChar[character]; + } + return '\\u00' + character.charCodeAt().toPaddedString(2, 16); + }); + if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"'; + return "'" + escapedString.replace(/'/g, '\\\'') + "'"; + } + + function toJSON() { + return this.inspect(true); + } + + function unfilterJSON(filter) { + return this.replace(filter || Prototype.JSONFilter, '$1'); + } + + function isJSON() { + var str = this; + if (str.blank()) return false; + str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); + return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); + } + + function evalJSON(sanitize) { + var json = this.unfilterJSON(); + try { + if (!sanitize || json.isJSON()) return eval('(' + json + ')'); + } catch (e) { } + throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); + } + + function include(pattern) { + return this.indexOf(pattern) > -1; + } + + function startsWith(pattern) { + return this.indexOf(pattern) === 0; + } + + function endsWith(pattern) { + var d = this.length - pattern.length; + return d >= 0 && this.lastIndexOf(pattern) === d; + } + + function empty() { + return this == ''; + } + + function blank() { + return /^\s*$/.test(this); + } + + function interpolate(object, pattern) { + return new Template(this, pattern).evaluate(object); + } + + return { + gsub: gsub, + sub: sub, + scan: scan, + truncate: truncate, + strip: String.prototype.trim ? String.prototype.trim : strip, + stripTags: stripTags, + stripScripts: stripScripts, + extractScripts: extractScripts, + evalScripts: evalScripts, + escapeHTML: escapeHTML, + unescapeHTML: unescapeHTML, + toQueryParams: toQueryParams, + parseQuery: toQueryParams, + toArray: toArray, + succ: succ, + times: times, + camelize: camelize, + capitalize: capitalize, + underscore: underscore, + dasherize: dasherize, + inspect: inspect, + toJSON: toJSON, + unfilterJSON: unfilterJSON, + isJSON: isJSON, + evalJSON: evalJSON, + include: include, + startsWith: startsWith, + endsWith: endsWith, + empty: empty, + blank: blank, + interpolate: interpolate + }; +})()); + +var Template = Class.create({ + initialize: function(template, pattern) { + this.template = template.toString(); + this.pattern = pattern || Template.Pattern; + }, + + evaluate: function(object) { + if (object && Object.isFunction(object.toTemplateReplacements)) + object = object.toTemplateReplacements(); + + return this.template.gsub(this.pattern, function(match) { + if (object == null) return (match[1] + ''); + + var before = match[1] || ''; + if (before == '\\') return match[2]; + + var ctx = object, expr = match[3]; + var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/; + match = pattern.exec(expr); + if (match == null) return before; + + while (match != null) { + var comp = match[1].startsWith('[') ? match[2].replace(/\\\\]/g, ']') : match[1]; + ctx = ctx[comp]; + if (null == ctx || '' == match[3]) break; + expr = expr.substring('[' == match[3] ? match[1].length : match[0].length); + match = pattern.exec(expr); + } + + return before + String.interpret(ctx); + }); + } +}); +Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; + +var $break = { }; + +var Enumerable = (function() { + function each(iterator, context) { + var index = 0; + try { + this._each(function(value) { + iterator.call(context, value, index++); + }); + } catch (e) { + if (e != $break) throw e; + } + return this; + } + + function eachSlice(number, iterator, context) { + var index = -number, slices = [], array = this.toArray(); + if (number < 1) return array; + while ((index += number) < array.length) + slices.push(array.slice(index, index+number)); + return slices.collect(iterator, context); + } + + function all(iterator, context) { + iterator = iterator || Prototype.K; + var result = true; + this.each(function(value, index) { + result = result && !!iterator.call(context, value, index); + if (!result) throw $break; + }); + return result; + } + + function any(iterator, context) { + iterator = iterator || Prototype.K; + var result = false; + this.each(function(value, index) { + if (result = !!iterator.call(context, value, index)) + throw $break; + }); + return result; + } + + function collect(iterator, context) { + iterator = iterator || Prototype.K; + var results = []; + this.each(function(value, index) { + results.push(iterator.call(context, value, index)); + }); + return results; + } + + function detect(iterator, context) { + var result; + this.each(function(value, index) { + if (iterator.call(context, value, index)) { + result = value; + throw $break; + } + }); + return result; + } + + function findAll(iterator, context) { + var results = []; + this.each(function(value, index) { + if (iterator.call(context, value, index)) + results.push(value); + }); + return results; + } + + function grep(filter, iterator, context) { + iterator = iterator || Prototype.K; + var results = []; + + if (Object.isString(filter)) + filter = new RegExp(RegExp.escape(filter)); + + this.each(function(value, index) { + if (filter.match(value)) + results.push(iterator.call(context, value, index)); + }); + return results; + } + + function include(object) { + if (Object.isFunction(this.indexOf)) + if (this.indexOf(object) != -1) return true; + + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw $break; + } + }); + return found; + } + + function inGroupsOf(number, fillWith) { + fillWith = Object.isUndefined(fillWith) ? null : fillWith; + return this.eachSlice(number, function(slice) { + while(slice.length < number) slice.push(fillWith); + return slice; + }); + } + + function inject(memo, iterator, context) { + this.each(function(value, index) { + memo = iterator.call(context, memo, value, index); + }); + return memo; + } + + function invoke(method) { + var args = $A(arguments).slice(1); + return this.map(function(value) { + return value[method].apply(value, args); + }); + } + + function max(iterator, context) { + iterator = iterator || Prototype.K; + var result; + this.each(function(value, index) { + value = iterator.call(context, value, index); + if (result == null || value >= result) + result = value; + }); + return result; + } + + function min(iterator, context) { + iterator = iterator || Prototype.K; + var result; + this.each(function(value, index) { + value = iterator.call(context, value, index); + if (result == null || value < result) + result = value; + }); + return result; + } + + function partition(iterator, context) { + iterator = iterator || Prototype.K; + var trues = [], falses = []; + this.each(function(value, index) { + (iterator.call(context, value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + } + + function pluck(property) { + var results = []; + this.each(function(value) { + results.push(value[property]); + }); + return results; + } + + function reject(iterator, context) { + var results = []; + this.each(function(value, index) { + if (!iterator.call(context, value, index)) + results.push(value); + }); + return results; + } + + function sortBy(iterator, context) { + return this.map(function(value, index) { + return { + value: value, + criteria: iterator.call(context, value, index) + }; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + } + + function toArray() { + return this.map(); + } + + function zip() { + var iterator = Prototype.K, args = $A(arguments); + if (Object.isFunction(args.last())) + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + return iterator(collections.pluck(index)); + }); + } + + function size() { + return this.toArray().length; + } + + function inspect() { + return '#<Enumerable:' + this.toArray().inspect() + '>'; + } + + + + + + + + + + return { + each: each, + eachSlice: eachSlice, + all: all, + every: all, + any: any, + some: any, + collect: collect, + map: collect, + detect: detect, + findAll: findAll, + select: findAll, + filter: findAll, + grep: grep, + include: include, + member: include, + inGroupsOf: inGroupsOf, + inject: inject, + invoke: invoke, + max: max, + min: min, + partition: partition, + pluck: pluck, + reject: reject, + sortBy: sortBy, + toArray: toArray, + entries: toArray, + zip: zip, + size: size, + inspect: inspect, + find: detect + }; +})(); +function $A(iterable) { + if (!iterable) return []; + if ('toArray' in Object(iterable)) return iterable.toArray(); + var length = iterable.length || 0, results = new Array(length); + while (length--) results[length] = iterable[length]; + return results; +} + +function $w(string) { + if (!Object.isString(string)) return []; + string = string.strip(); + return string ? string.split(/\s+/) : []; +} + +Array.from = $A; + + +(function() { + var arrayProto = Array.prototype, + slice = arrayProto.slice, + _each = arrayProto.forEach; // use native browser JS 1.6 implementation if available + + function each(iterator) { + for (var i = 0, length = this.length; i < length; i++) + iterator(this[i]); + } + if (!_each) _each = each; + + function clear() { + this.length = 0; + return this; + } + + function first() { + return this[0]; + } + + function last() { + return this[this.length - 1]; + } + + function compact() { + return this.select(function(value) { + return value != null; + }); + } + + function flatten() { + return this.inject([], function(array, value) { + if (Object.isArray(value)) + return array.concat(value.flatten()); + array.push(value); + return array; + }); + } + + function without() { + var values = slice.call(arguments, 0); + return this.select(function(value) { + return !values.include(value); + }); + } + + function reverse(inline) { + return (inline !== false ? this : this.toArray())._reverse(); + } + + function uniq(sorted) { + return this.inject([], function(array, value, index) { + if (0 == index || (sorted ? array.last() != value : !array.include(value))) + array.push(value); + return array; + }); + } + + function intersect(array) { + return this.uniq().findAll(function(item) { + return array.detect(function(value) { return item === value }); + }); + } + + + function clone() { + return slice.call(this, 0); + } + + function size() { + return this.length; + } + + function inspect() { + return '[' + this.map(Object.inspect).join(', ') + ']'; + } + + function toJSON() { + var results = []; + this.each(function(object) { + var value = Object.toJSON(object); + if (!Object.isUndefined(value)) results.push(value); + }); + return '[' + results.join(', ') + ']'; + } + + function indexOf(item, i) { + i || (i = 0); + var length = this.length; + if (i < 0) i = length + i; + for (; i < length; i++) + if (this[i] === item) return i; + return -1; + } + + function lastIndexOf(item, i) { + i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1; + var n = this.slice(0, i).reverse().indexOf(item); + return (n < 0) ? n : i - n - 1; + } + + function concat() { + var array = slice.call(this, 0), item; + for (var i = 0, length = arguments.length; i < length; i++) { + item = arguments[i]; + if (Object.isArray(item) && !('callee' in item)) { + for (var j = 0, arrayLength = item.length; j < arrayLength; j++) + array.push(item[j]); + } else { + array.push(item); + } + } + return array; + } + + Object.extend(arrayProto, Enumerable); + + if (!arrayProto._reverse) + arrayProto._reverse = arrayProto.reverse; + + Object.extend(arrayProto, { + _each: _each, + clear: clear, + first: first, + last: last, + compact: compact, + flatten: flatten, + without: without, + reverse: reverse, + uniq: uniq, + intersect: intersect, + clone: clone, + toArray: clone, + size: size, + inspect: inspect, + toJSON: toJSON + }); + + var CONCAT_ARGUMENTS_BUGGY = (function() { + return [].concat(arguments)[0][0] !== 1; + })(1,2) + + if (CONCAT_ARGUMENTS_BUGGY) arrayProto.concat = concat; + + if (!arrayProto.indexOf) arrayProto.indexOf = indexOf; + if (!arrayProto.lastIndexOf) arrayProto.lastIndexOf = lastIndexOf; +})(); +function $H(object) { + return new Hash(object); +}; + +var Hash = Class.create(Enumerable, (function() { + function initialize(object) { + this._object = Object.isHash(object) ? object.toObject() : Object.clone(object); + } + + function _each(iterator) { + for (var key in this._object) { + var value = this._object[key], pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + } + + function set(key, value) { + return this._object[key] = value; + } + + function get(key) { + if (this._object[key] !== Object.prototype[key]) + return this._object[key]; + } + + function unset(key) { + var value = this._object[key]; + delete this._object[key]; + return value; + } + + function toObject() { + return Object.clone(this._object); + } + + function keys() { + return this.pluck('key'); + } + + function values() { + return this.pluck('value'); + } + + function index(value) { + var match = this.detect(function(pair) { + return pair.value === value; + }); + return match && match.key; + } + + function merge(object) { + return this.clone().update(object); + } + + function update(object) { + return new Hash(object).inject(this, function(result, pair) { + result.set(pair.key, pair.value); + return result; + }); + } + + function toQueryPair(key, value) { + if (Object.isUndefined(value)) return key; + return key + '=' + encodeURIComponent(String.interpret(value)); + } + + function toQueryString() { + return this.inject([], function(results, pair) { + var key = encodeURIComponent(pair.key), values = pair.value; + + if (values && typeof values == 'object') { + if (Object.isArray(values)) + return results.concat(values.map(toQueryPair.curry(key))); + } else results.push(toQueryPair(key, values)); + return results; + }).join('&'); + } + + function inspect() { + return '#<Hash:{' + this.map(function(pair) { + return pair.map(Object.inspect).join(': '); + }).join(', ') + '}>'; + } + + function toJSON() { + return Object.toJSON(this.toObject()); + } + + function clone() { + return new Hash(this); + } + + return { + initialize: initialize, + _each: _each, + set: set, + get: get, + unset: unset, + toObject: toObject, + toTemplateReplacements: toObject, + keys: keys, + values: values, + index: index, + merge: merge, + update: update, + toQueryString: toQueryString, + inspect: inspect, + toJSON: toJSON, + clone: clone + }; +})()); + +Hash.from = $H; +Object.extend(Number.prototype, (function() { + function toColorPart() { + return this.toPaddedString(2, 16); + } + + function succ() { + return this + 1; + } + + function times(iterator, context) { + $R(0, this, true).each(iterator, context); + return this; + } + + function toPaddedString(length, radix) { + var string = this.toString(radix || 10); + return '0'.times(length - string.length) + string; + } + + function toJSON() { + return isFinite(this) ? this.toString() : 'null'; + } + + function abs() { + return Math.abs(this); + } + + function round() { + return Math.round(this); + } + + function ceil() { + return Math.ceil(this); + } + + function floor() { + return Math.floor(this); + } + + return { + toColorPart: toColorPart, + succ: succ, + times: times, + toPaddedString: toPaddedString, + toJSON: toJSON, + abs: abs, + round: round, + ceil: ceil, + floor: floor + }; +})()); + +function $R(start, end, exclusive) { + return new ObjectRange(start, end, exclusive); +} + +var ObjectRange = Class.create(Enumerable, (function() { + function initialize(start, end, exclusive) { + this.start = start; + this.end = end; + this.exclusive = exclusive; + } + + function _each(iterator) { + var value = this.start; + while (this.include(value)) { + iterator(value); + value = value.succ(); + } + } + + function include(value) { + if (value < this.start) + return false; + if (this.exclusive) + return value < this.end; + return value <= this.end; + } + + return { + initialize: initialize, + _each: _each, + include: include + }; +})()); + + + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new XMLHttpRequest()}, + function() {return new ActiveXObject('Msxml2.XMLHTTP')}, + function() {return new ActiveXObject('Microsoft.XMLHTTP')} + ) || false; + }, + + activeRequestCount: 0 +}; + +Ajax.Responders = { + responders: [], + + _each: function(iterator) { + this.responders._each(iterator); + }, + + register: function(responder) { + if (!this.include(responder)) + this.responders.push(responder); + }, + + unregister: function(responder) { + this.responders = this.responders.without(responder); + }, + + dispatch: function(callback, request, transport, json) { + this.each(function(responder) { + if (Object.isFunction(responder[callback])) { + try { + responder[callback].apply(responder, [request, transport, json]); + } catch (e) { } + } + }); + } +}; + +Object.extend(Ajax.Responders, Enumerable); + +Ajax.Responders.register({ + onCreate: function() { Ajax.activeRequestCount++ }, + onComplete: function() { Ajax.activeRequestCount-- } +}); +Ajax.Base = Class.create({ + initialize: function(options) { + this.options = { + method: 'post', + asynchronous: true, + contentType: 'application/x-www-form-urlencoded', + encoding: 'UTF-8', + parameters: '', + evalJSON: true, + evalJS: true + }; + Object.extend(this.options, options || { }); + + this.options.method = this.options.method.toLowerCase(); + + if (Object.isString(this.options.parameters)) + this.options.parameters = this.options.parameters.toQueryParams(); + else if (Object.isHash(this.options.parameters)) + this.options.parameters = this.options.parameters.toObject(); + } +}); +Ajax.Request = Class.create(Ajax.Base, { + _complete: false, + + initialize: function($super, url, options) { + $super(options); + this.transport = Ajax.getTransport(); + this.request(url); + }, + + request: function(url) { + this.url = url; + this.method = this.options.method; + var params = Object.clone(this.options.parameters); + + if (!['get', 'post'].include(this.method)) { + params['_method'] = this.method; + this.method = 'post'; + } + + this.parameters = params; + + if (params = Object.toQueryString(params)) { + if (this.method == 'get') + this.url += (this.url.include('?') ? '&' : '?') + params; + else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) + params += '&_='; + } + + try { + var response = new Ajax.Response(this); + if (this.options.onCreate) this.options.onCreate(response); + Ajax.Responders.dispatch('onCreate', this, response); + + this.transport.open(this.method.toUpperCase(), this.url, + this.options.asynchronous); + + if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1); + + this.transport.onreadystatechange = this.onStateChange.bind(this); + this.setRequestHeaders(); + + this.body = this.method == 'post' ? (this.options.postBody || params) : null; + this.transport.send(this.body); + + /* Force Firefox to handle ready state 4 for synchronous requests */ + if (!this.options.asynchronous && this.transport.overrideMimeType) + this.onStateChange(); + + } + catch (e) { + this.dispatchException(e); + } + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState > 1 && !((readyState == 4) && this._complete)) + this.respondToReadyState(this.transport.readyState); + }, + + setRequestHeaders: function() { + var headers = { + 'X-Requested-With': 'XMLHttpRequest', + 'X-Prototype-Version': Prototype.Version, + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' + }; + + if (this.method == 'post') { + headers['Content-type'] = this.options.contentType + + (this.options.encoding ? '; charset=' + this.options.encoding : ''); + + /* Force "Connection: close" for older Mozilla browsers to work + * around a bug where XMLHttpRequest sends an incorrect + * Content-length header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType && + (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) + headers['Connection'] = 'close'; + } + + if (typeof this.options.requestHeaders == 'object') { + var extras = this.options.requestHeaders; + + if (Object.isFunction(extras.push)) + for (var i = 0, length = extras.length; i < length; i += 2) + headers[extras[i]] = extras[i+1]; + else + $H(extras).each(function(pair) { headers[pair.key] = pair.value }); + } + + for (var name in headers) + this.transport.setRequestHeader(name, headers[name]); + }, + + success: function() { + var status = this.getStatus(); + return !status || (status >= 200 && status < 300); + }, + + getStatus: function() { + try { + return this.transport.status || 0; + } catch (e) { return 0 } + }, + + respondToReadyState: function(readyState) { + var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this); + + if (state == 'Complete') { + try { + this._complete = true; + (this.options['on' + response.status] + || this.options['on' + (this.success() ? 'Success' : 'Failure')] + || Prototype.emptyFunction)(response, response.headerJSON); + } catch (e) { + this.dispatchException(e); + } + + var contentType = response.getHeader('Content-type'); + if (this.options.evalJS == 'force' + || (this.options.evalJS && this.isSameOrigin() && contentType + && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))) + this.evalResponse(); + } + + try { + (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON); + Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON); + } catch (e) { + this.dispatchException(e); + } + + if (state == 'Complete') { + this.transport.onreadystatechange = Prototype.emptyFunction; + } + }, + + isSameOrigin: function() { + var m = this.url.match(/^\s*https?:\/\/[^\/]*/); + return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({ + protocol: location.protocol, + domain: document.domain, + port: location.port ? ':' + location.port : '' + })); + }, + + getHeader: function(name) { + try { + return this.transport.getResponseHeader(name) || null; + } catch (e) { return null; } + }, + + evalResponse: function() { + try { + return eval((this.transport.responseText || '').unfilterJSON()); + } catch (e) { + this.dispatchException(e); + } + }, + + dispatchException: function(exception) { + (this.options.onException || Prototype.emptyFunction)(this, exception); + Ajax.Responders.dispatch('onException', this, exception); + } +}); + +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + + + + + + + + +Ajax.Response = Class.create({ + initialize: function(request){ + this.request = request; + var transport = this.transport = request.transport, + readyState = this.readyState = transport.readyState; + + if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) { + this.status = this.getStatus(); + this.statusText = this.getStatusText(); + this.responseText = String.interpret(transport.responseText); + this.headerJSON = this._getHeaderJSON(); + } + + if(readyState == 4) { + var xml = transport.responseXML; + this.responseXML = Object.isUndefined(xml) ? null : xml; + this.responseJSON = this._getResponseJSON(); + } + }, + + status: 0, + + statusText: '', + + getStatus: Ajax.Request.prototype.getStatus, + + getStatusText: function() { + try { + return this.transport.statusText || ''; + } catch (e) { return '' } + }, + + getHeader: Ajax.Request.prototype.getHeader, + + getAllHeaders: function() { + try { + return this.getAllResponseHeaders(); + } catch (e) { return null } + }, + + getResponseHeader: function(name) { + return this.transport.getResponseHeader(name); + }, + + getAllResponseHeaders: function() { + return this.transport.getAllResponseHeaders(); + }, + + _getHeaderJSON: function() { + var json = this.getHeader('X-JSON'); + if (!json) return null; + json = decodeURIComponent(escape(json)); + try { + return json.evalJSON(this.request.options.sanitizeJSON || + !this.request.isSameOrigin()); + } catch (e) { + this.request.dispatchException(e); + } + }, + + _getResponseJSON: function() { + var options = this.request.options; + if (!options.evalJSON || (options.evalJSON != 'force' && + !(this.getHeader('Content-type') || '').include('application/json')) || + this.responseText.blank()) + return null; + try { + return this.responseText.evalJSON(options.sanitizeJSON || + !this.request.isSameOrigin()); + } catch (e) { + this.request.dispatchException(e); + } + } +}); + +Ajax.Updater = Class.create(Ajax.Request, { + initialize: function($super, container, url, options) { + this.container = { + success: (container.success || container), + failure: (container.failure || (container.success ? null : container)) + }; + + options = Object.clone(options); + var onComplete = options.onComplete; + options.onComplete = (function(response, json) { + this.updateContent(response.responseText); + if (Object.isFunction(onComplete)) onComplete(response, json); + }).bind(this); + + $super(url, options); + }, + + updateContent: function(responseText) { + var receiver = this.container[this.success() ? 'success' : 'failure'], + options = this.options; + + if (!options.evalScripts) responseText = responseText.stripScripts(); + + if (receiver = $(receiver)) { + if (options.insertion) { + if (Object.isString(options.insertion)) { + var insertion = { }; insertion[options.insertion] = responseText; + receiver.insert(insertion); + } + else options.insertion(receiver, responseText); + } + else receiver.update(responseText); + } + } +}); + +Ajax.PeriodicalUpdater = Class.create(Ajax.Base, { + initialize: function($super, container, url, options) { + $super(options); + this.onComplete = this.options.onComplete; + + this.frequency = (this.options.frequency || 2); + this.decay = (this.options.decay || 1); + + this.updater = { }; + this.container = container; + this.url = url; + + this.start(); + }, + + start: function() { + this.options.onComplete = this.updateComplete.bind(this); + this.onTimerEvent(); + }, + + stop: function() { + this.updater.options.onComplete = undefined; + clearTimeout(this.timer); + (this.onComplete || Prototype.emptyFunction).apply(this, arguments); + }, + + updateComplete: function(response) { + if (this.options.decay) { + this.decay = (response.responseText == this.lastText ? + this.decay * this.options.decay : 1); + + this.lastText = response.responseText; + } + this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); + }, + + onTimerEvent: function() { + this.updater = new Ajax.Updater(this.container, this.url, this.options); + } +}); + + + +function $(element) { + if (arguments.length > 1) { + for (var i = 0, elements = [], length = arguments.length; i < length; i++) + elements.push($(arguments[i])); + return elements; + } + if (Object.isString(element)) + element = document.getElementById(element); + return Element.extend(element); +} + +if (Prototype.BrowserFeatures.XPath) { + document._getElementsByXPath = function(expression, parentElement) { + var results = []; + var query = document.evaluate(expression, $(parentElement) || document, + null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); + for (var i = 0, length = query.snapshotLength; i < length; i++) + results.push(Element.extend(query.snapshotItem(i))); + return results; + }; +} + +/*--------------------------------------------------------------------------*/ + +if (!window.Node) var Node = { }; + +if (!Node.ELEMENT_NODE) { + Object.extend(Node, { + ELEMENT_NODE: 1, + ATTRIBUTE_NODE: 2, + TEXT_NODE: 3, + CDATA_SECTION_NODE: 4, + ENTITY_REFERENCE_NODE: 5, + ENTITY_NODE: 6, + PROCESSING_INSTRUCTION_NODE: 7, + COMMENT_NODE: 8, + DOCUMENT_NODE: 9, + DOCUMENT_TYPE_NODE: 10, + DOCUMENT_FRAGMENT_NODE: 11, + NOTATION_NODE: 12 + }); +} + + +(function(global) { + + var SETATTRIBUTE_IGNORES_NAME = (function(){ + var elForm = document.createElement("form"); + var elInput = document.createElement("input"); + var root = document.documentElement; + elInput.setAttribute("name", "test"); + elForm.appendChild(elInput); + root.appendChild(elForm); + var isBuggy = elForm.elements + ? (typeof elForm.elements.test == "undefined") + : null; + root.removeChild(elForm); + elForm = elInput = null; + return isBuggy; + })(); + + var element = global.Element; + global.Element = function(tagName, attributes) { + attributes = attributes || { }; + tagName = tagName.toLowerCase(); + var cache = Element.cache; + if (SETATTRIBUTE_IGNORES_NAME && attributes.name) { + tagName = '<' + tagName + ' name="' + attributes.name + '">'; + delete attributes.name; + return Element.writeAttribute(document.createElement(tagName), attributes); + } + if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName)); + return Element.writeAttribute(cache[tagName].cloneNode(false), attributes); + }; + Object.extend(global.Element, element || { }); + if (element) global.Element.prototype = element.prototype; +})(this); + +Element.cache = { }; +Element.idCounter = 1; + +Element.Methods = { + visible: function(element) { + return $(element).style.display != 'none'; + }, + + toggle: function(element) { + element = $(element); + Element[Element.visible(element) ? 'hide' : 'show'](element); + return element; + }, + + + hide: function(element) { + element = $(element); + element.style.display = 'none'; + return element; + }, + + show: function(element) { + element = $(element); + element.style.display = ''; + return element; + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + return element; + }, + + update: (function(){ + + var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){ + var el = document.createElement("select"), + isBuggy = true; + el.innerHTML = "<option value=\"test\">test</option>"; + if (el.options && el.options[0]) { + isBuggy = el.options[0].nodeName.toUpperCase() !== "OPTION"; + } + el = null; + return isBuggy; + })(); + + var TABLE_ELEMENT_INNERHTML_BUGGY = (function(){ + try { + var el = document.createElement("table"); + if (el && el.tBodies) { + el.innerHTML = "<tbody><tr><td>test</td></tr></tbody>"; + var isBuggy = typeof el.tBodies[0] == "undefined"; + el = null; + return isBuggy; + } + } catch (e) { + return true; + } + })(); + + var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING = (function () { + var s = document.createElement("script"), + isBuggy = false; + try { + s.appendChild(document.createTextNode("")); + isBuggy = !s.firstChild || + s.firstChild && s.firstChild.nodeType !== 3; + } catch (e) { + isBuggy = true; + } + s = null; + return isBuggy; + })(); + + function update(element, content) { + element = $(element); + + if (content && content.toElement) + content = content.toElement(); + + if (Object.isElement(content)) + return element.update().insert(content); + + content = Object.toHTML(content); + + var tagName = element.tagName.toUpperCase(); + + if (tagName === 'SCRIPT' && SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING) { + element.text = content; + return element; + } + + if (SELECT_ELEMENT_INNERHTML_BUGGY || TABLE_ELEMENT_INNERHTML_BUGGY) { + if (tagName in Element._insertionTranslations.tags) { + while (element.firstChild) { + element.removeChild(element.firstChild); + } + Element._getContentFromAnonymousElement(tagName, content.stripScripts()) + .each(function(node) { + element.appendChild(node) + }); + } + else { + element.innerHTML = content.stripScripts(); + } + } + else { + element.innerHTML = content.stripScripts(); + } + + content.evalScripts.bind(content).defer(); + return element; + } + + return update; + })(), + + replace: function(element, content) { + element = $(element); + if (content && content.toElement) content = content.toElement(); + else if (!Object.isElement(content)) { + content = Object.toHTML(content); + var range = element.ownerDocument.createRange(); + range.selectNode(element); + content.evalScripts.bind(content).defer(); + content = range.createContextualFragment(content.stripScripts()); + } + element.parentNode.replaceChild(content, element); + return element; + }, + + insert: function(element, insertions) { + element = $(element); + + if (Object.isString(insertions) || Object.isNumber(insertions) || + Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) + insertions = {bottom:insertions}; + + var content, insert, tagName, childNodes; + + for (var position in insertions) { + content = insertions[position]; + position = position.toLowerCase(); + insert = Element._insertionTranslations[position]; + + if (content && content.toElement) content = content.toElement(); + if (Object.isElement(content)) { + insert(element, content); + continue; + } + + content = Object.toHTML(content); + + tagName = ((position == 'before' || position == 'after') + ? element.parentNode : element).tagName.toUpperCase(); + + childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); + + if (position == 'top' || position == 'after') childNodes.reverse(); + childNodes.each(insert.curry(element)); + + content.evalScripts.bind(content).defer(); + } + + return element; + }, + + wrap: function(element, wrapper, attributes) { + element = $(element); + if (Object.isElement(wrapper)) + $(wrapper).writeAttribute(attributes || { }); + else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes); + else wrapper = new Element('div', wrapper); + if (element.parentNode) + element.parentNode.replaceChild(wrapper, element); + wrapper.appendChild(element); + return wrapper; + }, + + inspect: function(element) { + element = $(element); + var result = '<' + element.tagName.toLowerCase(); + $H({'id': 'id', 'className': 'class'}).each(function(pair) { + var property = pair.first(), attribute = pair.last(); + var value = (element[property] || '').toString(); + if (value) result += ' ' + attribute + '=' + value.inspect(true); + }); + return result + '>'; + }, + + recursivelyCollect: function(element, property) { + element = $(element); + var elements = []; + while (element = element[property]) + if (element.nodeType == 1) + elements.push(Element.extend(element)); + return elements; + }, + + ancestors: function(element) { + return Element.recursivelyCollect(element, 'parentNode'); + }, + + descendants: function(element) { + return Element.select(element, "*"); + }, + + firstDescendant: function(element) { + element = $(element).firstChild; + while (element && element.nodeType != 1) element = element.nextSibling; + return $(element); + }, + + immediateDescendants: function(element) { + if (!(element = $(element).firstChild)) return []; + while (element && element.nodeType != 1) element = element.nextSibling; + if (element) return [element].concat($(element).nextSiblings()); + return []; + }, + + previousSiblings: function(element) { + return Element.recursivelyCollect(element, 'previousSibling'); + }, + + nextSiblings: function(element) { + return Element.recursivelyCollect(element, 'nextSibling'); + }, + + siblings: function(element) { + element = $(element); + return Element.previousSiblings(element).reverse() + .concat(Element.nextSiblings(element)); + }, + + match: function(element, selector) { + if (Object.isString(selector)) + selector = new Selector(selector); + return selector.match($(element)); + }, + + up: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return $(element.parentNode); + var ancestors = Element.ancestors(element); + return Object.isNumber(expression) ? ancestors[expression] : + Selector.findElement(ancestors, expression, index); + }, + + down: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return Element.firstDescendant(element); + return Object.isNumber(expression) ? Element.descendants(element)[expression] : + Element.select(element, expression)[index || 0]; + }, + + previous: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element)); + var previousSiblings = Element.previousSiblings(element); + return Object.isNumber(expression) ? previousSiblings[expression] : + Selector.findElement(previousSiblings, expression, index); + }, + + next: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element)); + var nextSiblings = Element.nextSiblings(element); + return Object.isNumber(expression) ? nextSiblings[expression] : + Selector.findElement(nextSiblings, expression, index); + }, + + + select: function(element) { + var args = Array.prototype.slice.call(arguments, 1); + return Selector.findChildElements(element, args); + }, + + adjacent: function(element) { + var args = Array.prototype.slice.call(arguments, 1); + return Selector.findChildElements(element.parentNode, args).without(element); + }, + + identify: function(element) { + element = $(element); + var id = Element.readAttribute(element, 'id'); + if (id) return id; + do { id = 'anonymous_element_' + Element.idCounter++ } while ($(id)); + Element.writeAttribute(element, 'id', id); + return id; + }, + + readAttribute: function(element, name) { + element = $(element); + if (Prototype.Browser.IE) { + var t = Element._attributeTranslations.read; + if (t.values[name]) return t.values[name](element, name); + if (t.names[name]) name = t.names[name]; + if (name.include(':')) { + return (!element.attributes || !element.attributes[name]) ? null : + element.attributes[name].value; + } + } + return element.getAttribute(name); + }, + + writeAttribute: function(element, name, value) { + element = $(element); + var attributes = { }, t = Element._attributeTranslations.write; + + if (typeof name == 'object') attributes = name; + else attributes[name] = Object.isUndefined(value) ? true : value; + + for (var attr in attributes) { + name = t.names[attr] || attr; + value = attributes[attr]; + if (t.values[attr]) name = t.values[attr](element, value); + if (value === false || value === null) + element.removeAttribute(name); + else if (value === true) + element.setAttribute(name, name); + else element.setAttribute(name, value); + } + return element; + }, + + getHeight: function(element) { + return Element.getDimensions(element).height; + }, + + getWidth: function(element) { + return Element.getDimensions(element).width; + }, + + classNames: function(element) { + return new Element.ClassNames(element); + }, + + hasClassName: function(element, className) { + if (!(element = $(element))) return; + var elementClassName = element.className; + return (elementClassName.length > 0 && (elementClassName == className || + new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName))); + }, + + addClassName: function(element, className) { + if (!(element = $(element))) return; + if (!Element.hasClassName(element, className)) + element.className += (element.className ? ' ' : '') + className; + return element; + }, + + removeClassName: function(element, className) { + if (!(element = $(element))) return; + element.className = element.className.replace( + new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip(); + return element; + }, + + toggleClassName: function(element, className) { + if (!(element = $(element))) return; + return Element[Element.hasClassName(element, className) ? + 'removeClassName' : 'addClassName'](element, className); + }, + + cleanWhitespace: function(element) { + element = $(element); + var node = element.firstChild; + while (node) { + var nextNode = node.nextSibling; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + element.removeChild(node); + node = nextNode; + } + return element; + }, + + empty: function(element) { + return $(element).innerHTML.blank(); + }, + + descendantOf: function(element, ancestor) { + element = $(element), ancestor = $(ancestor); + + if (element.compareDocumentPosition) + return (element.compareDocumentPosition(ancestor) & 8) === 8; + + if (ancestor.contains) + return ancestor.contains(element) && ancestor !== element; + + while (element = element.parentNode) + if (element == ancestor) return true; + + return false; + }, + + scrollTo: function(element) { + element = $(element); + var pos = Element.cumulativeOffset(element); + window.scrollTo(pos[0], pos[1]); + return element; + }, + + getStyle: function(element, style) { + element = $(element); + style = style == 'float' ? 'cssFloat' : style.camelize(); + var value = element.style[style]; + if (!value || value == 'auto') { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css[style] : null; + } + if (style == 'opacity') return value ? parseFloat(value) : 1.0; + return value == 'auto' ? null : value; + }, + + getOpacity: function(element) { + return $(element).getStyle('opacity'); + }, + + setStyle: function(element, styles) { + element = $(element); + var elementStyle = element.style, match; + if (Object.isString(styles)) { + element.style.cssText += ';' + styles; + return styles.include('opacity') ? + element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element; + } + for (var property in styles) + if (property == 'opacity') element.setOpacity(styles[property]); + else + elementStyle[(property == 'float' || property == 'cssFloat') ? + (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') : + property] = styles[property]; + + return element; + }, + + setOpacity: function(element, value) { + element = $(element); + element.style.opacity = (value == 1 || value === '') ? '' : + (value < 0.00001) ? 0 : value; + return element; + }, + + getDimensions: function(element) { + element = $(element); + var display = Element.getStyle(element, 'display'); + if (display != 'none' && display != null) // Safari bug + return {width: element.offsetWidth, height: element.offsetHeight}; + + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + var originalDisplay = els.display; + els.visibility = 'hidden'; + if (originalPosition != 'fixed') // Switching fixed to absolute causes issues in Safari + els.position = 'absolute'; + els.display = 'block'; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = originalDisplay; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; + }, + + makePositioned: function(element) { + element = $(element); + var pos = Element.getStyle(element, 'position'); + if (pos == 'static' || !pos) { + element._madePositioned = true; + element.style.position = 'relative'; + if (Prototype.Browser.Opera) { + element.style.top = 0; + element.style.left = 0; + } + } + return element; + }, + + undoPositioned: function(element) { + element = $(element); + if (element._madePositioned) { + element._madePositioned = undefined; + element.style.position = + element.style.top = + element.style.left = + element.style.bottom = + element.style.right = ''; + } + return element; + }, + + makeClipping: function(element) { + element = $(element); + if (element._overflow) return element; + element._overflow = Element.getStyle(element, 'overflow') || 'auto'; + if (element._overflow !== 'hidden') + element.style.overflow = 'hidden'; + return element; + }, + + undoClipping: function(element) { + element = $(element); + if (!element._overflow) return element; + element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; + element._overflow = null; + return element; + }, + + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return Element._returnOffset(valueL, valueT); + }, + + positionedOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + if (element.tagName.toUpperCase() == 'BODY') break; + var p = Element.getStyle(element, 'position'); + if (p !== 'static') break; + } + } while (element); + return Element._returnOffset(valueL, valueT); + }, + + absolutize: function(element) { + element = $(element); + if (Element.getStyle(element, 'position') == 'absolute') return element; + + var offsets = Element.positionedOffset(element); + var top = offsets[1]; + var left = offsets[0]; + var width = element.clientWidth; + var height = element.clientHeight; + + element._originalLeft = left - parseFloat(element.style.left || 0); + element._originalTop = top - parseFloat(element.style.top || 0); + element._originalWidth = element.style.width; + element._originalHeight = element.style.height; + + element.style.position = 'absolute'; + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.width = width + 'px'; + element.style.height = height + 'px'; + return element; + }, + + relativize: function(element) { + element = $(element); + if (Element.getStyle(element, 'position') == 'relative') return element; + + element.style.position = 'relative'; + var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); + var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); + + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.height = element._originalHeight; + element.style.width = element._originalWidth; + return element; + }, + + cumulativeScrollOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return Element._returnOffset(valueL, valueT); + }, + + getOffsetParent: function(element) { + if (element.offsetParent) return $(element.offsetParent); + if (element == document.body) return $(element); + + while ((element = element.parentNode) && element != document.body) + if (Element.getStyle(element, 'position') != 'static') + return $(element); + + return $(document.body); + }, + + viewportOffset: function(forElement) { + var valueT = 0, valueL = 0; + + var element = forElement; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + + if (element.offsetParent == document.body && + Element.getStyle(element, 'position') == 'absolute') break; + + } while (element = element.offsetParent); + + element = forElement; + do { + if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) { + valueT -= element.scrollTop || 0; + valueL -= element.scrollLeft || 0; + } + } while (element = element.parentNode); + + return Element._returnOffset(valueL, valueT); + }, + + clonePosition: function(element, source) { + var options = Object.extend({ + setLeft: true, + setTop: true, + setWidth: true, + setHeight: true, + offsetTop: 0, + offsetLeft: 0 + }, arguments[2] || { }); + + source = $(source); + var p = Element.viewportOffset(source); + + element = $(element); + var delta = [0, 0]; + var parent = null; + if (Element.getStyle(element, 'position') == 'absolute') { + parent = Element.getOffsetParent(element); + delta = Element.viewportOffset(parent); + } + + if (parent == document.body) { + delta[0] -= document.body.offsetLeft; + delta[1] -= document.body.offsetTop; + } + + if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; + if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; + if (options.setWidth) element.style.width = source.offsetWidth + 'px'; + if (options.setHeight) element.style.height = source.offsetHeight + 'px'; + return element; + } +}; + +Object.extend(Element.Methods, { + getElementsBySelector: Element.Methods.select, + + childElements: Element.Methods.immediateDescendants +}); + +Element._attributeTranslations = { + write: { + names: { + className: 'class', + htmlFor: 'for' + }, + values: { } + } +}; + +if (Prototype.Browser.Opera) { + Element.Methods.getStyle = Element.Methods.getStyle.wrap( + function(proceed, element, style) { + switch (style) { + case 'left': case 'top': case 'right': case 'bottom': + if (proceed(element, 'position') === 'static') return null; + case 'height': case 'width': + if (!Element.visible(element)) return null; + + var dim = parseInt(proceed(element, style), 10); + + if (dim !== element['offset' + style.capitalize()]) + return dim + 'px'; + + var properties; + if (style === 'height') { + properties = ['border-top-width', 'padding-top', + 'padding-bottom', 'border-bottom-width']; + } + else { + properties = ['border-left-width', 'padding-left', + 'padding-right', 'border-right-width']; + } + return properties.inject(dim, function(memo, property) { + var val = proceed(element, property); + return val === null ? memo : memo - parseInt(val, 10); + }) + 'px'; + default: return proceed(element, style); + } + } + ); + + Element.Methods.readAttribute = Element.Methods.readAttribute.wrap( + function(proceed, element, attribute) { + if (attribute === 'title') return element.title; + return proceed(element, attribute); + } + ); +} + +else if (Prototype.Browser.IE) { + Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap( + function(proceed, element) { + element = $(element); + try { element.offsetParent } + catch(e) { return $(document.body) } + var position = element.getStyle('position'); + if (position !== 'static') return proceed(element); + element.setStyle({ position: 'relative' }); + var value = proceed(element); + element.setStyle({ position: position }); + return value; + } + ); + + $w('positionedOffset viewportOffset').each(function(method) { + Element.Methods[method] = Element.Methods[method].wrap( + function(proceed, element) { + element = $(element); + try { element.offsetParent } + catch(e) { return Element._returnOffset(0,0) } + var position = element.getStyle('position'); + if (position !== 'static') return proceed(element); + var offsetParent = element.getOffsetParent(); + if (offsetParent && offsetParent.getStyle('position') === 'fixed') + offsetParent.setStyle({ zoom: 1 }); + element.setStyle({ position: 'relative' }); + var value = proceed(element); + element.setStyle({ position: position }); + return value; + } + ); + }); + + Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap( + function(proceed, element) { + try { element.offsetParent } + catch(e) { return Element._returnOffset(0,0) } + return proceed(element); + } + ); + + Element.Methods.getStyle = function(element, style) { + element = $(element); + style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize(); + var value = element.style[style]; + if (!value && element.currentStyle) value = element.currentStyle[style]; + + if (style == 'opacity') { + if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) + if (value[1]) return parseFloat(value[1]) / 100; + return 1.0; + } + + if (value == 'auto') { + if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none')) + return element['offset' + style.capitalize()] + 'px'; + return null; + } + return value; + }; + + Element.Methods.setOpacity = function(element, value) { + function stripAlpha(filter){ + return filter.replace(/alpha\([^\)]*\)/gi,''); + } + element = $(element); + var currentStyle = element.currentStyle; + if ((currentStyle && !currentStyle.hasLayout) || + (!currentStyle && element.style.zoom == 'normal')) + element.style.zoom = 1; + + var filter = element.getStyle('filter'), style = element.style; + if (value == 1 || value === '') { + (filter = stripAlpha(filter)) ? + style.filter = filter : style.removeAttribute('filter'); + return element; + } else if (value < 0.00001) value = 0; + style.filter = stripAlpha(filter) + + 'alpha(opacity=' + (value * 100) + ')'; + return element; + }; + + Element._attributeTranslations = (function(){ + + var classProp = 'className'; + var forProp = 'for'; + + var el = document.createElement('div'); + + el.setAttribute(classProp, 'x'); + + if (el.className !== 'x') { + el.setAttribute('class', 'x'); + if (el.className === 'x') { + classProp = 'class'; + } + } + el = null; + + el = document.createElement('label'); + el.setAttribute(forProp, 'x'); + if (el.htmlFor !== 'x') { + el.setAttribute('htmlFor', 'x'); + if (el.htmlFor === 'x') { + forProp = 'htmlFor'; + } + } + el = null; + + return { + read: { + names: { + 'class': classProp, + 'className': classProp, + 'for': forProp, + 'htmlFor': forProp + }, + values: { + _getAttr: function(element, attribute) { + return element.getAttribute(attribute); + }, + _getAttr2: function(element, attribute) { + return element.getAttribute(attribute, 2); + }, + _getAttrNode: function(element, attribute) { + var node = element.getAttributeNode(attribute); + return node ? node.value : ""; + }, + _getEv: (function(){ + + var el = document.createElement('div'); + el.onclick = Prototype.emptyFunction; + var value = el.getAttribute('onclick'); + var f; + + if (String(value).indexOf('{') > -1) { + f = function(element, attribute) { + attribute = element.getAttribute(attribute); + if (!attribute) return null; + attribute = attribute.toString(); + attribute = attribute.split('{')[1]; + attribute = attribute.split('}')[0]; + return attribute.strip(); + }; + } + else if (value === '') { + f = function(element, attribute) { + attribute = element.getAttribute(attribute); + if (!attribute) return null; + return attribute.strip(); + }; + } + el = null; + return f; + })(), + _flag: function(element, attribute) { + return $(element).hasAttribute(attribute) ? attribute : null; + }, + style: function(element) { + return element.style.cssText.toLowerCase(); + }, + title: function(element) { + return element.title; + } + } + } + } + })(); + + Element._attributeTranslations.write = { + names: Object.extend({ + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing' + }, Element._attributeTranslations.read.names), + values: { + checked: function(element, value) { + element.checked = !!value; + }, + + style: function(element, value) { + element.style.cssText = value ? value : ''; + } + } + }; + + Element._attributeTranslations.has = {}; + + $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' + + 'encType maxLength readOnly longDesc frameBorder').each(function(attr) { + Element._attributeTranslations.write.names[attr.toLowerCase()] = attr; + Element._attributeTranslations.has[attr.toLowerCase()] = attr; + }); + + (function(v) { + Object.extend(v, { + href: v._getAttr2, + src: v._getAttr2, + type: v._getAttr, + action: v._getAttrNode, + disabled: v._flag, + checked: v._flag, + readonly: v._flag, + multiple: v._flag, + onload: v._getEv, + onunload: v._getEv, + onclick: v._getEv, + ondblclick: v._getEv, + onmousedown: v._getEv, + onmouseup: v._getEv, + onmouseover: v._getEv, + onmousemove: v._getEv, + onmouseout: v._getEv, + onfocus: v._getEv, + onblur: v._getEv, + onkeypress: v._getEv, + onkeydown: v._getEv, + onkeyup: v._getEv, + onsubmit: v._getEv, + onreset: v._getEv, + onselect: v._getEv, + onchange: v._getEv + }); + })(Element._attributeTranslations.read.values); + + if (Prototype.BrowserFeatures.ElementExtensions) { + (function() { + function _descendants(element) { + var nodes = element.getElementsByTagName('*'), results = []; + for (var i = 0, node; node = nodes[i]; i++) + if (node.tagName !== "!") // Filter out comment nodes. + results.push(node); + return results; + } + + Element.Methods.down = function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return element.firstDescendant(); + return Object.isNumber(expression) ? _descendants(element)[expression] : + Element.select(element, expression)[index || 0]; + } + })(); + } + +} + +else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) { + Element.Methods.setOpacity = function(element, value) { + element = $(element); + element.style.opacity = (value == 1) ? 0.999999 : + (value === '') ? '' : (value < 0.00001) ? 0 : value; + return element; + }; +} + +else if (Prototype.Browser.WebKit) { + Element.Methods.setOpacity = function(element, value) { + element = $(element); + element.style.opacity = (value == 1 || value === '') ? '' : + (value < 0.00001) ? 0 : value; + + if (value == 1) + if(element.tagName.toUpperCase() == 'IMG' && element.width) { + element.width++; element.width--; + } else try { + var n = document.createTextNode(' '); + element.appendChild(n); + element.removeChild(n); + } catch (e) { } + + return element; + }; + + Element.Methods.cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == document.body) + if (Element.getStyle(element, 'position') == 'absolute') break; + + element = element.offsetParent; + } while (element); + + return Element._returnOffset(valueL, valueT); + }; +} + +if ('outerHTML' in document.documentElement) { + Element.Methods.replace = function(element, content) { + element = $(element); + + if (content && content.toElement) content = content.toElement(); + if (Object.isElement(content)) { + element.parentNode.replaceChild(content, element); + return element; + } + + content = Object.toHTML(content); + var parent = element.parentNode, tagName = parent.tagName.toUpperCase(); + + if (Element._insertionTranslations.tags[tagName]) { + var nextSibling = element.next(); + var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); + parent.removeChild(element); + if (nextSibling) + fragments.each(function(node) { parent.insertBefore(node, nextSibling) }); + else + fragments.each(function(node) { parent.appendChild(node) }); + } + else element.outerHTML = content.stripScripts(); + + content.evalScripts.bind(content).defer(); + return element; + }; +} + +Element._returnOffset = function(l, t) { + var result = [l, t]; + result.left = l; + result.top = t; + return result; +}; + +Element._getContentFromAnonymousElement = function(tagName, html) { + var div = new Element('div'), t = Element._insertionTranslations.tags[tagName]; + if (t) { + div.innerHTML = t[0] + html + t[1]; + t[2].times(function() { div = div.firstChild }); + } else div.innerHTML = html; + return $A(div.childNodes); +}; + +Element._insertionTranslations = { + before: function(element, node) { + element.parentNode.insertBefore(node, element); + }, + top: function(element, node) { + element.insertBefore(node, element.firstChild); + }, + bottom: function(element, node) { + element.appendChild(node); + }, + after: function(element, node) { + element.parentNode.insertBefore(node, element.nextSibling); + }, + tags: { + TABLE: ['<table>', '</table>', 1], + TBODY: ['<table><tbody>', '</tbody></table>', 2], + TR: ['<table><tbody><tr>', '</tr></tbody></table>', 3], + TD: ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4], + SELECT: ['<select>', '</select>', 1] + } +}; + +(function() { + var tags = Element._insertionTranslations.tags; + Object.extend(tags, { + THEAD: tags.TBODY, + TFOOT: tags.TBODY, + TH: tags.TD + }); +})(); + +Element.Methods.Simulated = { + hasAttribute: function(element, attribute) { + attribute = Element._attributeTranslations.has[attribute] || attribute; + var node = $(element).getAttributeNode(attribute); + return !!(node && node.specified); + } +}; + +Element.Methods.ByTag = { }; + +Object.extend(Element, Element.Methods); + +(function(div) { + + if (!Prototype.BrowserFeatures.ElementExtensions && div['__proto__']) { + window.HTMLElement = { }; + window.HTMLElement.prototype = div['__proto__']; + Prototype.BrowserFeatures.ElementExtensions = true; + } + + div = null; + +})(document.createElement('div')) + +Element.extend = (function() { + + function checkDeficiency(tagName) { + if (typeof window.Element != 'undefined') { + var proto = window.Element.prototype; + if (proto) { + var id = '_' + (Math.random()+'').slice(2); + var el = document.createElement(tagName); + proto[id] = 'x'; + var isBuggy = (el[id] !== 'x'); + delete proto[id]; + el = null; + return isBuggy; + } + } + return false; + } + + function extendElementWith(element, methods) { + for (var property in methods) { + var value = methods[property]; + if (Object.isFunction(value) && !(property in element)) + element[property] = value.methodize(); + } + } + + var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY = checkDeficiency('object'); + + if (Prototype.BrowserFeatures.SpecificElementExtensions) { + if (HTMLOBJECTELEMENT_PROTOTYPE_BUGGY) { + return function(element) { + if (element && typeof element._extendedByPrototype == 'undefined') { + var t = element.tagName; + if (t && (/^(?:object|applet|embed)$/i.test(t))) { + extendElementWith(element, Element.Methods); + extendElementWith(element, Element.Methods.Simulated); + extendElementWith(element, Element.Methods.ByTag[t.toUpperCase()]); + } + } + return element; + } + } + return Prototype.K; + } + + var Methods = { }, ByTag = Element.Methods.ByTag; + + var extend = Object.extend(function(element) { + if (!element || typeof element._extendedByPrototype != 'undefined' || + element.nodeType != 1 || element == window) return element; + + var methods = Object.clone(Methods), + tagName = element.tagName.toUpperCase(); + + if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); + + extendElementWith(element, methods); + + element._extendedByPrototype = Prototype.emptyFunction; + return element; + + }, { + refresh: function() { + if (!Prototype.BrowserFeatures.ElementExtensions) { + Object.extend(Methods, Element.Methods); + Object.extend(Methods, Element.Methods.Simulated); + } + } + }); + + extend.refresh(); + return extend; +})(); + +Element.hasAttribute = function(element, attribute) { + if (element.hasAttribute) return element.hasAttribute(attribute); + return Element.Methods.Simulated.hasAttribute(element, attribute); +}; + +Element.addMethods = function(methods) { + var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag; + + if (!methods) { + Object.extend(Form, Form.Methods); + Object.extend(Form.Element, Form.Element.Methods); + Object.extend(Element.Methods.ByTag, { + "FORM": Object.clone(Form.Methods), + "INPUT": Object.clone(Form.Element.Methods), + "SELECT": Object.clone(Form.Element.Methods), + "TEXTAREA": Object.clone(Form.Element.Methods) + }); + } + + if (arguments.length == 2) { + var tagName = methods; + methods = arguments[1]; + } + + if (!tagName) Object.extend(Element.Methods, methods || { }); + else { + if (Object.isArray(tagName)) tagName.each(extend); + else extend(tagName); + } + + function extend(tagName) { + tagName = tagName.toUpperCase(); + if (!Element.Methods.ByTag[tagName]) + Element.Methods.ByTag[tagName] = { }; + Object.extend(Element.Methods.ByTag[tagName], methods); + } + + function copy(methods, destination, onlyIfAbsent) { + onlyIfAbsent = onlyIfAbsent || false; + for (var property in methods) { + var value = methods[property]; + if (!Object.isFunction(value)) continue; + if (!onlyIfAbsent || !(property in destination)) + destination[property] = value.methodize(); + } + } + + function findDOMClass(tagName) { + var klass; + var trans = { + "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", + "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", + "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", + "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", + "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": + "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": + "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR": + "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": + "FrameSet", "IFRAME": "IFrame" + }; + if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element'; + if (window[klass]) return window[klass]; + klass = 'HTML' + tagName + 'Element'; + if (window[klass]) return window[klass]; + klass = 'HTML' + tagName.capitalize() + 'Element'; + if (window[klass]) return window[klass]; + + var element = document.createElement(tagName); + var proto = element['__proto__'] || element.constructor.prototype; + element = null; + return proto; + } + + var elementPrototype = window.HTMLElement ? HTMLElement.prototype : + Element.prototype; + + if (F.ElementExtensions) { + copy(Element.Methods, elementPrototype); + copy(Element.Methods.Simulated, elementPrototype, true); + } + + if (F.SpecificElementExtensions) { + for (var tag in Element.Methods.ByTag) { + var klass = findDOMClass(tag); + if (Object.isUndefined(klass)) continue; + copy(T[tag], klass.prototype); + } + } + + Object.extend(Element, Element.Methods); + delete Element.ByTag; + + if (Element.extend.refresh) Element.extend.refresh(); + Element.cache = { }; +}; + + +document.viewport = { + + getDimensions: function() { + return { width: this.getWidth(), height: this.getHeight() }; + }, + + getScrollOffsets: function() { + return Element._returnOffset( + window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, + window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop); + } +}; + +(function(viewport) { + var B = Prototype.Browser, doc = document, element, property = {}; + + function getRootElement() { + if (B.WebKit && !doc.evaluate) + return document; + + if (B.Opera && window.parseFloat(window.opera.version()) < 9.5) + return document.body; + + return document.documentElement; + } + + function define(D) { + if (!element) element = getRootElement(); + + property[D] = 'client' + D; + + viewport['get' + D] = function() { return element[property[D]] }; + return viewport['get' + D](); + } + + viewport.getWidth = define.curry('Width'); + + viewport.getHeight = define.curry('Height'); +})(document.viewport); + + +Element.Storage = { + UID: 1 +}; + +Element.addMethods({ + getStorage: function(element) { + if (!(element = $(element))) return; + + var uid; + if (element === window) { + uid = 0; + } else { + if (typeof element._prototypeUID === "undefined") + element._prototypeUID = [Element.Storage.UID++]; + uid = element._prototypeUID[0]; + } + + if (!Element.Storage[uid]) + Element.Storage[uid] = $H(); + + return Element.Storage[uid]; + }, + + store: function(element, key, value) { + if (!(element = $(element))) return; + + if (arguments.length === 2) { + Element.getStorage(element).update(key); + } else { + Element.getStorage(element).set(key, value); + } + + return element; + }, + + retrieve: function(element, key, defaultValue) { + if (!(element = $(element))) return; + var hash = Element.getStorage(element), value = hash.get(key); + + if (Object.isUndefined(value)) { + hash.set(key, defaultValue); + value = defaultValue; + } + + return value; + }, + + clone: function(element, deep) { + if (!(element = $(element))) return; + var clone = element.cloneNode(deep); + clone._prototypeUID = void 0; + if (deep) { + var descendants = Element.select(clone, '*'), + i = descendants.length; + while (i--) { + descendants[i]._prototypeUID = void 0; + } + } + return Element.extend(clone); + } +}); +/* Portions of the Selector class are derived from Jack Slocum's DomQuery, + * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style + * license. Please see http://www.yui-ext.com/ for more information. */ + +var Selector = Class.create({ + initialize: function(expression) { + this.expression = expression.strip(); + + if (this.shouldUseSelectorsAPI()) { + this.mode = 'selectorsAPI'; + } else if (this.shouldUseXPath()) { + this.mode = 'xpath'; + this.compileXPathMatcher(); + } else { + this.mode = "normal"; + this.compileMatcher(); + } + + }, + + shouldUseXPath: (function() { + + var IS_DESCENDANT_SELECTOR_BUGGY = (function(){ + var isBuggy = false; + if (document.evaluate && window.XPathResult) { + var el = document.createElement('div'); + el.innerHTML = '<ul><li></li></ul><div><ul><li></li></ul></div>'; + + var xpath = ".//*[local-name()='ul' or local-name()='UL']" + + "//*[local-name()='li' or local-name()='LI']"; + + var result = document.evaluate(xpath, el, null, + XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); + + isBuggy = (result.snapshotLength !== 2); + el = null; + } + return isBuggy; + })(); + + return function() { + if (!Prototype.BrowserFeatures.XPath) return false; + + var e = this.expression; + + if (Prototype.Browser.WebKit && + (e.include("-of-type") || e.include(":empty"))) + return false; + + if ((/(\[[\w-]*?:|:checked)/).test(e)) + return false; + + if (IS_DESCENDANT_SELECTOR_BUGGY) return false; + + return true; + } + + })(), + + shouldUseSelectorsAPI: function() { + if (!Prototype.BrowserFeatures.SelectorsAPI) return false; + + if (Selector.CASE_INSENSITIVE_CLASS_NAMES) return false; + + if (!Selector._div) Selector._div = new Element('div'); + + try { + Selector._div.querySelector(this.expression); + } catch(e) { + return false; + } + + return true; + }, + + compileMatcher: function() { + var e = this.expression, ps = Selector.patterns, h = Selector.handlers, + c = Selector.criteria, le, p, m, len = ps.length, name; + + if (Selector._cache[e]) { + this.matcher = Selector._cache[e]; + return; + } + + this.matcher = ["this.matcher = function(root) {", + "var r = root, h = Selector.handlers, c = false, n;"]; + + while (e && le != e && (/\S/).test(e)) { + le = e; + for (var i = 0; i<len; i++) { + p = ps[i].re; + name = ps[i].name; + if (m = e.match(p)) { + this.matcher.push(Object.isFunction(c[name]) ? c[name](m) : + new Template(c[name]).evaluate(m)); + e = e.replace(m[0], ''); + break; + } + } + } + + this.matcher.push("return h.unique(n);\n}"); + eval(this.matcher.join('\n')); + Selector._cache[this.expression] = this.matcher; + }, + + compileXPathMatcher: function() { + var e = this.expression, ps = Selector.patterns, + x = Selector.xpath, le, m, len = ps.length, name; + + if (Selector._cache[e]) { + this.xpath = Selector._cache[e]; return; + } + + this.matcher = ['.//*']; + while (e && le != e && (/\S/).test(e)) { + le = e; + for (var i = 0; i<len; i++) { + name = ps[i].name; + if (m = e.match(ps[i].re)) { + this.matcher.push(Object.isFunction(x[name]) ? x[name](m) : + new Template(x[name]).evaluate(m)); + e = e.replace(m[0], ''); + break; + } + } + } + + this.xpath = this.matcher.join(''); + Selector._cache[this.expression] = this.xpath; + }, + + findElements: function(root) { + root = root || document; + var e = this.expression, results; + + switch (this.mode) { + case 'selectorsAPI': + if (root !== document) { + var oldId = root.id, id = $(root).identify(); + id = id.replace(/([\.:])/g, "\\$1"); + e = "#" + id + " " + e; + } + + results = $A(root.querySelectorAll(e)).map(Element.extend); + root.id = oldId; + + return results; + case 'xpath': + return document._getElementsByXPath(this.xpath, root); + default: + return this.matcher(root); + } + }, + + match: function(element) { + this.tokens = []; + + var e = this.expression, ps = Selector.patterns, as = Selector.assertions; + var le, p, m, len = ps.length, name; + + while (e && le !== e && (/\S/).test(e)) { + le = e; + for (var i = 0; i<len; i++) { + p = ps[i].re; + name = ps[i].name; + if (m = e.match(p)) { + if (as[name]) { + this.tokens.push([name, Object.clone(m)]); + e = e.replace(m[0], ''); + } else { + return this.findElements(document).include(element); + } + } + } + } + + var match = true, name, matches; + for (var i = 0, token; token = this.tokens[i]; i++) { + name = token[0], matches = token[1]; + if (!Selector.assertions[name](element, matches)) { + match = false; break; + } + } + + return match; + }, + + toString: function() { + return this.expression; + }, + + inspect: function() { + return "#<Selector:" + this.expression.inspect() + ">"; + } +}); + +if (Prototype.BrowserFeatures.SelectorsAPI && + document.compatMode === 'BackCompat') { + Selector.CASE_INSENSITIVE_CLASS_NAMES = (function(){ + var div = document.createElement('div'), + span = document.createElement('span'); + + div.id = "prototype_test_id"; + span.className = 'Test'; + div.appendChild(span); + var isIgnored = (div.querySelector('#prototype_test_id .test') !== null); + div = span = null; + return isIgnored; + })(); +} + +Object.extend(Selector, { + _cache: { }, + + xpath: { + descendant: "//*", + child: "/*", + adjacent: "/following-sibling::*[1]", + laterSibling: '/following-sibling::*', + tagName: function(m) { + if (m[1] == '*') return ''; + return "[local-name()='" + m[1].toLowerCase() + + "' or local-name()='" + m[1].toUpperCase() + "']"; + }, + className: "[contains(concat(' ', @class, ' '), ' #{1} ')]", + id: "[@id='#{1}']", + attrPresence: function(m) { + m[1] = m[1].toLowerCase(); + return new Template("[@#{1}]").evaluate(m); + }, + attr: function(m) { + m[1] = m[1].toLowerCase(); + m[3] = m[5] || m[6]; + return new Template(Selector.xpath.operators[m[2]]).evaluate(m); + }, + pseudo: function(m) { + var h = Selector.xpath.pseudos[m[1]]; + if (!h) return ''; + if (Object.isFunction(h)) return h(m); + return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m); + }, + operators: { + '=': "[@#{1}='#{3}']", + '!=': "[@#{1}!='#{3}']", + '^=': "[starts-with(@#{1}, '#{3}')]", + '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']", + '*=': "[contains(@#{1}, '#{3}')]", + '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]", + '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]" + }, + pseudos: { + 'first-child': '[not(preceding-sibling::*)]', + 'last-child': '[not(following-sibling::*)]', + 'only-child': '[not(preceding-sibling::* or following-sibling::*)]', + 'empty': "[count(*) = 0 and (count(text()) = 0)]", + 'checked': "[@checked]", + 'disabled': "[(@disabled) and (@type!='hidden')]", + 'enabled': "[not(@disabled) and (@type!='hidden')]", + 'not': function(m) { + var e = m[6], p = Selector.patterns, + x = Selector.xpath, le, v, len = p.length, name; + + var exclusion = []; + while (e && le != e && (/\S/).test(e)) { + le = e; + for (var i = 0; i<len; i++) { + name = p[i].name + if (m = e.match(p[i].re)) { + v = Object.isFunction(x[name]) ? x[name](m) : new Template(x[name]).evaluate(m); + exclusion.push("(" + v.substring(1, v.length - 1) + ")"); + e = e.replace(m[0], ''); + break; + } + } + } + return "[not(" + exclusion.join(" and ") + ")]"; + }, + 'nth-child': function(m) { + return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m); + }, + 'nth-last-child': function(m) { + return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m); + }, + 'nth-of-type': function(m) { + return Selector.xpath.pseudos.nth("position() ", m); + }, + 'nth-last-of-type': function(m) { + return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m); + }, + 'first-of-type': function(m) { + m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m); + }, + 'last-of-type': function(m) { + m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m); + }, + 'only-of-type': function(m) { + var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m); + }, + nth: function(fragment, m) { + var mm, formula = m[6], predicate; + if (formula == 'even') formula = '2n+0'; + if (formula == 'odd') formula = '2n+1'; + if (mm = formula.match(/^(\d+)$/)) // digit only + return '[' + fragment + "= " + mm[1] + ']'; + if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b + if (mm[1] == "-") mm[1] = -1; + var a = mm[1] ? Number(mm[1]) : 1; + var b = mm[2] ? Number(mm[2]) : 0; + predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " + + "((#{fragment} - #{b}) div #{a} >= 0)]"; + return new Template(predicate).evaluate({ + fragment: fragment, a: a, b: b }); + } + } + } + }, + + criteria: { + tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;', + className: 'n = h.className(n, r, "#{1}", c); c = false;', + id: 'n = h.id(n, r, "#{1}", c); c = false;', + attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;', + attr: function(m) { + m[3] = (m[5] || m[6]); + return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m); + }, + pseudo: function(m) { + if (m[6]) m[6] = m[6].replace(/"/g, '\\"'); + return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m); + }, + descendant: 'c = "descendant";', + child: 'c = "child";', + adjacent: 'c = "adjacent";', + laterSibling: 'c = "laterSibling";' + }, + + patterns: [ + { name: 'laterSibling', re: /^\s*~\s*/ }, + { name: 'child', re: /^\s*>\s*/ }, + { name: 'adjacent', re: /^\s*\+\s*/ }, + { name: 'descendant', re: /^\s/ }, + + { name: 'tagName', re: /^\s*(\*|[\w\-]+)(\b|$)?/ }, + { name: 'id', re: /^#([\w\-\*]+)(\b|$)/ }, + { name: 'className', re: /^\.([\w\-\*]+)(\b|$)/ }, + { name: 'pseudo', re: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/ }, + { name: 'attrPresence', re: /^\[((?:[\w-]+:)?[\w-]+)\]/ }, + { name: 'attr', re: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ } + ], + + assertions: { + tagName: function(element, matches) { + return matches[1].toUpperCase() == element.tagName.toUpperCase(); + }, + + className: function(element, matches) { + return Element.hasClassName(element, matches[1]); + }, + + id: function(element, matches) { + return element.id === matches[1]; + }, + + attrPresence: function(element, matches) { + return Element.hasAttribute(element, matches[1]); + }, + + attr: function(element, matches) { + var nodeValue = Element.readAttribute(element, matches[1]); + return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]); + } + }, + + handlers: { + concat: function(a, b) { + for (var i = 0, node; node = b[i]; i++) + a.push(node); + return a; + }, + + mark: function(nodes) { + var _true = Prototype.emptyFunction; + for (var i = 0, node; node = nodes[i]; i++) + node._countedByPrototype = _true; + return nodes; + }, + + unmark: (function(){ + + var PROPERTIES_ATTRIBUTES_MAP = (function(){ + var el = document.createElement('div'), + isBuggy = false, + propName = '_countedByPrototype', + value = 'x' + el[propName] = value; + isBuggy = (el.getAttribute(propName) === value); + el = null; + return isBuggy; + })(); + + return PROPERTIES_ATTRIBUTES_MAP ? + function(nodes) { + for (var i = 0, node; node = nodes[i]; i++) + node.removeAttribute('_countedByPrototype'); + return nodes; + } : + function(nodes) { + for (var i = 0, node; node = nodes[i]; i++) + node._countedByPrototype = void 0; + return nodes; + } + })(), + + index: function(parentNode, reverse, ofType) { + parentNode._countedByPrototype = Prototype.emptyFunction; + if (reverse) { + for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) { + var node = nodes[i]; + if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++; + } + } else { + for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++) + if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++; + } + }, + + unique: function(nodes) { + if (nodes.length == 0) return nodes; + var results = [], n; + for (var i = 0, l = nodes.length; i < l; i++) + if (typeof (n = nodes[i])._countedByPrototype == 'undefined') { + n._countedByPrototype = Prototype.emptyFunction; + results.push(Element.extend(n)); + } + return Selector.handlers.unmark(results); + }, + + descendant: function(nodes) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) + h.concat(results, node.getElementsByTagName('*')); + return results; + }, + + child: function(nodes) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) { + for (var j = 0, child; child = node.childNodes[j]; j++) + if (child.nodeType == 1 && child.tagName != '!') results.push(child); + } + return results; + }, + + adjacent: function(nodes) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + var next = this.nextElementSibling(node); + if (next) results.push(next); + } + return results; + }, + + laterSibling: function(nodes) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) + h.concat(results, Element.nextSiblings(node)); + return results; + }, + + nextElementSibling: function(node) { + while (node = node.nextSibling) + if (node.nodeType == 1) return node; + return null; + }, + + previousElementSibling: function(node) { + while (node = node.previousSibling) + if (node.nodeType == 1) return node; + return null; + }, + + tagName: function(nodes, root, tagName, combinator) { + var uTagName = tagName.toUpperCase(); + var results = [], h = Selector.handlers; + if (nodes) { + if (combinator) { + if (combinator == "descendant") { + for (var i = 0, node; node = nodes[i]; i++) + h.concat(results, node.getElementsByTagName(tagName)); + return results; + } else nodes = this[combinator](nodes); + if (tagName == "*") return nodes; + } + for (var i = 0, node; node = nodes[i]; i++) + if (node.tagName.toUpperCase() === uTagName) results.push(node); + return results; + } else return root.getElementsByTagName(tagName); + }, + + id: function(nodes, root, id, combinator) { + var targetNode = $(id), h = Selector.handlers; + + if (root == document) { + if (!targetNode) return []; + if (!nodes) return [targetNode]; + } else { + if (!root.sourceIndex || root.sourceIndex < 1) { + var nodes = root.getElementsByTagName('*'); + for (var j = 0, node; node = nodes[j]; j++) { + if (node.id === id) return [node]; + } + } + } + + if (nodes) { + if (combinator) { + if (combinator == 'child') { + for (var i = 0, node; node = nodes[i]; i++) + if (targetNode.parentNode == node) return [targetNode]; + } else if (combinator == 'descendant') { + for (var i = 0, node; node = nodes[i]; i++) + if (Element.descendantOf(targetNode, node)) return [targetNode]; + } else if (combinator == 'adjacent') { + for (var i = 0, node; node = nodes[i]; i++) + if (Selector.handlers.previousElementSibling(targetNode) == node) + return [targetNode]; + } else nodes = h[combinator](nodes); + } + for (var i = 0, node; node = nodes[i]; i++) + if (node == targetNode) return [targetNode]; + return []; + } + return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : []; + }, + + className: function(nodes, root, className, combinator) { + if (nodes && combinator) nodes = this[combinator](nodes); + return Selector.handlers.byClassName(nodes, root, className); + }, + + byClassName: function(nodes, root, className) { + if (!nodes) nodes = Selector.handlers.descendant([root]); + var needle = ' ' + className + ' '; + for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) { + nodeClassName = node.className; + if (nodeClassName.length == 0) continue; + if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle)) + results.push(node); + } + return results; + }, + + attrPresence: function(nodes, root, attr, combinator) { + if (!nodes) nodes = root.getElementsByTagName("*"); + if (nodes && combinator) nodes = this[combinator](nodes); + var results = []; + for (var i = 0, node; node = nodes[i]; i++) + if (Element.hasAttribute(node, attr)) results.push(node); + return results; + }, + + attr: function(nodes, root, attr, value, operator, combinator) { + if (!nodes) nodes = root.getElementsByTagName("*"); + if (nodes && combinator) nodes = this[combinator](nodes); + var handler = Selector.operators[operator], results = []; + for (var i = 0, node; node = nodes[i]; i++) { + var nodeValue = Element.readAttribute(node, attr); + if (nodeValue === null) continue; + if (handler(nodeValue, value)) results.push(node); + } + return results; + }, + + pseudo: function(nodes, name, value, root, combinator) { + if (nodes && combinator) nodes = this[combinator](nodes); + if (!nodes) nodes = root.getElementsByTagName("*"); + return Selector.pseudos[name](nodes, value, root); + } + }, + + pseudos: { + 'first-child': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + if (Selector.handlers.previousElementSibling(node)) continue; + results.push(node); + } + return results; + }, + 'last-child': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + if (Selector.handlers.nextElementSibling(node)) continue; + results.push(node); + } + return results; + }, + 'only-child': function(nodes, value, root) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (!h.previousElementSibling(node) && !h.nextElementSibling(node)) + results.push(node); + return results; + }, + 'nth-child': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root); + }, + 'nth-last-child': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root, true); + }, + 'nth-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root, false, true); + }, + 'nth-last-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root, true, true); + }, + 'first-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, "1", root, false, true); + }, + 'last-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, "1", root, true, true); + }, + 'only-of-type': function(nodes, formula, root) { + var p = Selector.pseudos; + return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root); + }, + + getIndices: function(a, b, total) { + if (a == 0) return b > 0 ? [b] : []; + return $R(1, total).inject([], function(memo, i) { + if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i); + return memo; + }); + }, + + nth: function(nodes, formula, root, reverse, ofType) { + if (nodes.length == 0) return []; + if (formula == 'even') formula = '2n+0'; + if (formula == 'odd') formula = '2n+1'; + var h = Selector.handlers, results = [], indexed = [], m; + h.mark(nodes); + for (var i = 0, node; node = nodes[i]; i++) { + if (!node.parentNode._countedByPrototype) { + h.index(node.parentNode, reverse, ofType); + indexed.push(node.parentNode); + } + } + if (formula.match(/^\d+$/)) { // just a number + formula = Number(formula); + for (var i = 0, node; node = nodes[i]; i++) + if (node.nodeIndex == formula) results.push(node); + } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b + if (m[1] == "-") m[1] = -1; + var a = m[1] ? Number(m[1]) : 1; + var b = m[2] ? Number(m[2]) : 0; + var indices = Selector.pseudos.getIndices(a, b, nodes.length); + for (var i = 0, node, l = indices.length; node = nodes[i]; i++) { + for (var j = 0; j < l; j++) + if (node.nodeIndex == indices[j]) results.push(node); + } + } + h.unmark(nodes); + h.unmark(indexed); + return results; + }, + + 'empty': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + if (node.tagName == '!' || node.firstChild) continue; + results.push(node); + } + return results; + }, + + 'not': function(nodes, selector, root) { + var h = Selector.handlers, selectorType, m; + var exclusions = new Selector(selector).findElements(root); + h.mark(exclusions); + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (!node._countedByPrototype) results.push(node); + h.unmark(exclusions); + return results; + }, + + 'enabled': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (!node.disabled && (!node.type || node.type !== 'hidden')) + results.push(node); + return results; + }, + + 'disabled': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (node.disabled) results.push(node); + return results; + }, + + 'checked': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (node.checked) results.push(node); + return results; + } + }, + + operators: { + '=': function(nv, v) { return nv == v; }, + '!=': function(nv, v) { return nv != v; }, + '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); }, + '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); }, + '*=': function(nv, v) { return nv == v || nv && nv.include(v); }, + '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); }, + '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() + + '-').include('-' + (v || "").toUpperCase() + '-'); } + }, + + split: function(expression) { + var expressions = []; + expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { + expressions.push(m[1].strip()); + }); + return expressions; + }, + + matchElements: function(elements, expression) { + var matches = $$(expression), h = Selector.handlers; + h.mark(matches); + for (var i = 0, results = [], element; element = elements[i]; i++) + if (element._countedByPrototype) results.push(element); + h.unmark(matches); + return results; + }, + + findElement: function(elements, expression, index) { + if (Object.isNumber(expression)) { + index = expression; expression = false; + } + return Selector.matchElements(elements, expression || '*')[index || 0]; + }, + + findChildElements: function(element, expressions) { + expressions = Selector.split(expressions.join(',')); + var results = [], h = Selector.handlers; + for (var i = 0, l = expressions.length, selector; i < l; i++) { + selector = new Selector(expressions[i].strip()); + h.concat(results, selector.findElements(element)); + } + return (l > 1) ? h.unique(results) : results; + } +}); + +if (Prototype.Browser.IE) { + Object.extend(Selector.handlers, { + concat: function(a, b) { + for (var i = 0, node; node = b[i]; i++) + if (node.tagName !== "!") a.push(node); + return a; + } + }); +} + +function $$() { + return Selector.findChildElements(document, $A(arguments)); +} + +var Form = { + reset: function(form) { + form = $(form); + form.reset(); + return form; + }, + + serializeElements: function(elements, options) { + if (typeof options != 'object') options = { hash: !!options }; + else if (Object.isUndefined(options.hash)) options.hash = true; + var key, value, submitted = false, submit = options.submit; + + var data = elements.inject({ }, function(result, element) { + if (!element.disabled && element.name) { + key = element.name; value = $(element).getValue(); + if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted && + submit !== false && (!submit || key == submit) && (submitted = true)))) { + if (key in result) { + if (!Object.isArray(result[key])) result[key] = [result[key]]; + result[key].push(value); + } + else result[key] = value; + } + } + return result; + }); + + return options.hash ? data : Object.toQueryString(data); + } +}; + +Form.Methods = { + serialize: function(form, options) { + return Form.serializeElements(Form.getElements(form), options); + }, + + getElements: function(form) { + var elements = $(form).getElementsByTagName('*'), + element, + arr = [ ], + serializers = Form.Element.Serializers; + for (var i = 0; element = elements[i]; i++) { + arr.push(element); + } + return arr.inject([], function(elements, child) { + if (serializers[child.tagName.toLowerCase()]) + elements.push(Element.extend(child)); + return elements; + }) + }, + + getInputs: function(form, typeName, name) { + form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) return $A(inputs).map(Element.extend); + + for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || (name && input.name != name)) + continue; + matchingInputs.push(Element.extend(input)); + } + + return matchingInputs; + }, + + disable: function(form) { + form = $(form); + Form.getElements(form).invoke('disable'); + return form; + }, + + enable: function(form) { + form = $(form); + Form.getElements(form).invoke('enable'); + return form; + }, + + findFirstElement: function(form) { + var elements = $(form).getElements().findAll(function(element) { + return 'hidden' != element.type && !element.disabled; + }); + var firstByIndex = elements.findAll(function(element) { + return element.hasAttribute('tabIndex') && element.tabIndex >= 0; + }).sortBy(function(element) { return element.tabIndex }).first(); + + return firstByIndex ? firstByIndex : elements.find(function(element) { + return /^(?:input|select|textarea)$/i.test(element.tagName); + }); + }, + + focusFirstElement: function(form) { + form = $(form); + form.findFirstElement().activate(); + return form; + }, + + request: function(form, options) { + form = $(form), options = Object.clone(options || { }); + + var params = options.parameters, action = form.readAttribute('action') || ''; + if (action.blank()) action = window.location.href; + options.parameters = form.serialize(true); + + if (params) { + if (Object.isString(params)) params = params.toQueryParams(); + Object.extend(options.parameters, params); + } + + if (form.hasAttribute('method') && !options.method) + options.method = form.method; + + return new Ajax.Request(action, options); + } +}; + +/*--------------------------------------------------------------------------*/ + + +Form.Element = { + focus: function(element) { + $(element).focus(); + return element; + }, + + select: function(element) { + $(element).select(); + return element; + } +}; + +Form.Element.Methods = { + + serialize: function(element) { + element = $(element); + if (!element.disabled && element.name) { + var value = element.getValue(); + if (value != undefined) { + var pair = { }; + pair[element.name] = value; + return Object.toQueryString(pair); + } + } + return ''; + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + return Form.Element.Serializers[method](element); + }, + + setValue: function(element, value) { + element = $(element); + var method = element.tagName.toLowerCase(); + Form.Element.Serializers[method](element, value); + return element; + }, + + clear: function(element) { + $(element).value = ''; + return element; + }, + + present: function(element) { + return $(element).value != ''; + }, + + activate: function(element) { + element = $(element); + try { + element.focus(); + if (element.select && (element.tagName.toLowerCase() != 'input' || + !(/^(?:button|reset|submit)$/i.test(element.type)))) + element.select(); + } catch (e) { } + return element; + }, + + disable: function(element) { + element = $(element); + element.disabled = true; + return element; + }, + + enable: function(element) { + element = $(element); + element.disabled = false; + return element; + } +}; + +/*--------------------------------------------------------------------------*/ + +var Field = Form.Element; + +var $F = Form.Element.Methods.getValue; + +/*--------------------------------------------------------------------------*/ + +Form.Element.Serializers = { + input: function(element, value) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element, value); + default: + return Form.Element.Serializers.textarea(element, value); + } + }, + + inputSelector: function(element, value) { + if (Object.isUndefined(value)) return element.checked ? element.value : null; + else element.checked = !!value; + }, + + textarea: function(element, value) { + if (Object.isUndefined(value)) return element.value; + else element.value = value; + }, + + select: function(element, value) { + if (Object.isUndefined(value)) + return this[element.type == 'select-one' ? + 'selectOne' : 'selectMany'](element); + else { + var opt, currentValue, single = !Object.isArray(value); + for (var i = 0, length = element.length; i < length; i++) { + opt = element.options[i]; + currentValue = this.optionValue(opt); + if (single) { + if (currentValue == value) { + opt.selected = true; + return; + } + } + else opt.selected = value.include(currentValue); + } + } + }, + + selectOne: function(element) { + var index = element.selectedIndex; + return index >= 0 ? this.optionValue(element.options[index]) : null; + }, + + selectMany: function(element) { + var values, length = element.length; + if (!length) return null; + + for (var i = 0, values = []; i < length; i++) { + var opt = element.options[i]; + if (opt.selected) values.push(this.optionValue(opt)); + } + return values; + }, + + optionValue: function(opt) { + return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; + } +}; + +/*--------------------------------------------------------------------------*/ + + +Abstract.TimedObserver = Class.create(PeriodicalExecuter, { + initialize: function($super, element, frequency, callback) { + $super(callback, frequency); + this.element = $(element); + this.lastValue = this.getValue(); + }, + + execute: function() { + var value = this.getValue(); + if (Object.isString(this.lastValue) && Object.isString(value) ? + this.lastValue != value : String(this.lastValue) != String(value)) { + this.callback(this.element, value); + this.lastValue = value; + } + } +}); + +Form.Element.Observer = Class.create(Abstract.TimedObserver, { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(Abstract.TimedObserver, { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = Class.create({ + initialize: function(element, callback) { + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + Form.getElements(this.element).each(this.registerCallback, this); + }, + + registerCallback: function(element) { + if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + Event.observe(element, 'click', this.onElementEvent.bind(this)); + break; + default: + Event.observe(element, 'change', this.onElementEvent.bind(this)); + break; + } + } + } +}); + +Form.Element.EventObserver = Class.create(Abstract.EventObserver, { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(Abstract.EventObserver, { + getValue: function() { + return Form.serialize(this.element); + } +}); +(function() { + + var Event = { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + KEY_HOME: 36, + KEY_END: 35, + KEY_PAGEUP: 33, + KEY_PAGEDOWN: 34, + KEY_INSERT: 45, + + cache: {} + }; + + var docEl = document.documentElement; + var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED = 'onmouseenter' in docEl + && 'onmouseleave' in docEl; + + var _isButton; + if (Prototype.Browser.IE) { + var buttonMap = { 0: 1, 1: 4, 2: 2 }; + _isButton = function(event, code) { + return event.button === buttonMap[code]; + }; + } else if (Prototype.Browser.WebKit) { + _isButton = function(event, code) { + switch (code) { + case 0: return event.which == 1 && !event.metaKey; + case 1: return event.which == 1 && event.metaKey; + default: return false; + } + }; + } else { + _isButton = function(event, code) { + return event.which ? (event.which === code + 1) : (event.button === code); + }; + } + + function isLeftClick(event) { return _isButton(event, 0) } + + function isMiddleClick(event) { return _isButton(event, 1) } + + function isRightClick(event) { return _isButton(event, 2) } + + function element(event) { + event = Event.extend(event); + + var node = event.target, type = event.type, + currentTarget = event.currentTarget; + + if (currentTarget && currentTarget.tagName) { + if (type === 'load' || type === 'error' || + (type === 'click' && currentTarget.tagName.toLowerCase() === 'input' + && currentTarget.type === 'radio')) + node = currentTarget; + } + + if (node.nodeType == Node.TEXT_NODE) + node = node.parentNode; + + return Element.extend(node); + } + + function findElement(event, expression) { + var element = Event.element(event); + if (!expression) return element; + var elements = [element].concat(element.ancestors()); + return Selector.findElement(elements, expression, 0); + } + + function pointer(event) { + return { x: pointerX(event), y: pointerY(event) }; + } + + function pointerX(event) { + var docElement = document.documentElement, + body = document.body || { scrollLeft: 0 }; + + return event.pageX || (event.clientX + + (docElement.scrollLeft || body.scrollLeft) - + (docElement.clientLeft || 0)); + } + + function pointerY(event) { + var docElement = document.documentElement, + body = document.body || { scrollTop: 0 }; + + return event.pageY || (event.clientY + + (docElement.scrollTop || body.scrollTop) - + (docElement.clientTop || 0)); + } + + + function stop(event) { + Event.extend(event); + event.preventDefault(); + event.stopPropagation(); + + event.stopped = true; + } + + Event.Methods = { + isLeftClick: isLeftClick, + isMiddleClick: isMiddleClick, + isRightClick: isRightClick, + + element: element, + findElement: findElement, + + pointer: pointer, + pointerX: pointerX, + pointerY: pointerY, + + stop: stop + }; + + + var methods = Object.keys(Event.Methods).inject({ }, function(m, name) { + m[name] = Event.Methods[name].methodize(); + return m; + }); + + if (Prototype.Browser.IE) { + function _relatedTarget(event) { + var element; + switch (event.type) { + case 'mouseover': element = event.fromElement; break; + case 'mouseout': element = event.toElement; break; + default: return null; + } + return Element.extend(element); + } + + Object.extend(methods, { + stopPropagation: function() { this.cancelBubble = true }, + preventDefault: function() { this.returnValue = false }, + inspect: function() { return '[object Event]' } + }); + + Event.extend = function(event, element) { + if (!event) return false; + if (event._extendedByPrototype) return event; + + event._extendedByPrototype = Prototype.emptyFunction; + var pointer = Event.pointer(event); + + Object.extend(event, { + target: event.srcElement || element, + relatedTarget: _relatedTarget(event), + pageX: pointer.x, + pageY: pointer.y + }); + + return Object.extend(event, methods); + }; + } else { + Event.prototype = window.Event.prototype || document.createEvent('HTMLEvents').__proto__; + Object.extend(Event.prototype, methods); + Event.extend = Prototype.K; + } + + function _createResponder(element, eventName, handler) { + var registry = Element.retrieve(element, 'prototype_event_registry'); + + if (Object.isUndefined(registry)) { + CACHE.push(element); + registry = Element.retrieve(element, 'prototype_event_registry', $H()); + } + + var respondersForEvent = registry.get(eventName); + if (Object.isUndefined(respondersForEvent)) { + respondersForEvent = []; + registry.set(eventName, respondersForEvent); + } + + if (respondersForEvent.pluck('handler').include(handler)) return false; + + var responder; + if (eventName.include(":")) { + responder = function(event) { + if (Object.isUndefined(event.eventName)) + return false; + + if (event.eventName !== eventName) + return false; + + Event.extend(event, element); + handler.call(element, event); + }; + } else { + if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED && + (eventName === "mouseenter" || eventName === "mouseleave")) { + if (eventName === "mouseenter" || eventName === "mouseleave") { + responder = function(event) { + Event.extend(event, element); + + var parent = event.relatedTarget; + while (parent && parent !== element) { + try { parent = parent.parentNode; } + catch(e) { parent = element; } + } + + if (parent === element) return; + + handler.call(element, event); + }; + } + } else { + responder = function(event) { + Event.extend(event, element); + handler.call(element, event); + }; + } + } + + responder.handler = handler; + respondersForEvent.push(responder); + return responder; + } + + function _destroyCache() { + for (var i = 0, length = CACHE.length; i < length; i++) { + Event.stopObserving(CACHE[i]); + CACHE[i] = null; + } + } + + var CACHE = []; + + if (Prototype.Browser.IE) + window.attachEvent('onunload', _destroyCache); + + if (Prototype.Browser.WebKit) + window.addEventListener('unload', Prototype.emptyFunction, false); + + + var _getDOMEventName = Prototype.K; + + if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED) { + _getDOMEventName = function(eventName) { + var translations = { mouseenter: "mouseover", mouseleave: "mouseout" }; + return eventName in translations ? translations[eventName] : eventName; + }; + } + + function observe(element, eventName, handler) { + element = $(element); + + var responder = _createResponder(element, eventName, handler); + + if (!responder) return element; + + if (eventName.include(':')) { + if (element.addEventListener) + element.addEventListener("dataavailable", responder, false); + else { + element.attachEvent("ondataavailable", responder); + element.attachEvent("onfilterchange", responder); + } + } else { + var actualEventName = _getDOMEventName(eventName); + + if (element.addEventListener) + element.addEventListener(actualEventName, responder, false); + else + element.attachEvent("on" + actualEventName, responder); + } + + return element; + } + + function stopObserving(element, eventName, handler) { + element = $(element); + + var registry = Element.retrieve(element, 'prototype_event_registry'); + + if (Object.isUndefined(registry)) return element; + + if (eventName && !handler) { + var responders = registry.get(eventName); + + if (Object.isUndefined(responders)) return element; + + responders.each( function(r) { + Element.stopObserving(element, eventName, r.handler); + }); + return element; + } else if (!eventName) { + registry.each( function(pair) { + var eventName = pair.key, responders = pair.value; + + responders.each( function(r) { + Element.stopObserving(element, eventName, r.handler); + }); + }); + return element; + } + + var responders = registry.get(eventName); + + if (!responders) return; + + var responder = responders.find( function(r) { return r.handler === handler; }); + if (!responder) return element; + + var actualEventName = _getDOMEventName(eventName); + + if (eventName.include(':')) { + if (element.removeEventListener) + element.removeEventListener("dataavailable", responder, false); + else { + element.detachEvent("ondataavailable", responder); + element.detachEvent("onfilterchange", responder); + } + } else { + if (element.removeEventListener) + element.removeEventListener(actualEventName, responder, false); + else + element.detachEvent('on' + actualEventName, responder); + } + + registry.set(eventName, responders.without(responder)); + + return element; + } + + function fire(element, eventName, memo, bubble) { + element = $(element); + + if (Object.isUndefined(bubble)) + bubble = true; + + if (element == document && document.createEvent && !element.dispatchEvent) + element = document.documentElement; + + var event; + if (document.createEvent) { + event = document.createEvent('HTMLEvents'); + event.initEvent('dataavailable', true, true); + } else { + event = document.createEventObject(); + event.eventType = bubble ? 'ondataavailable' : 'onfilterchange'; + } + + event.eventName = eventName; + event.memo = memo || { }; + + if (document.createEvent) + element.dispatchEvent(event); + else + element.fireEvent(event.eventType, event); + + return Event.extend(event); + } + + + Object.extend(Event, Event.Methods); + + Object.extend(Event, { + fire: fire, + observe: observe, + stopObserving: stopObserving + }); + + Element.addMethods({ + fire: fire, + + observe: observe, + + stopObserving: stopObserving + }); + + Object.extend(document, { + fire: fire.methodize(), + + observe: observe.methodize(), + + stopObserving: stopObserving.methodize(), + + loaded: false + }); + + if (window.Event) Object.extend(window.Event, Event); + else window.Event = Event; +})(); + +(function() { + /* Support for the DOMContentLoaded event is based on work by Dan Webb, + Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */ + + var timer; + + function fireContentLoadedEvent() { + if (document.loaded) return; + if (timer) window.clearTimeout(timer); + document.loaded = true; + document.fire('dom:loaded'); + } + + function checkReadyState() { + if (document.readyState === 'complete') { + document.stopObserving('readystatechange', checkReadyState); + fireContentLoadedEvent(); + } + } + + function pollDoScroll() { + try { document.documentElement.doScroll('left'); } + catch(e) { + timer = pollDoScroll.defer(); + return; + } + fireContentLoadedEvent(); + } + + if (document.addEventListener) { + document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false); + } else { + document.observe('readystatechange', checkReadyState); + if (window == top) + timer = pollDoScroll.defer(); + } + + Event.observe(window, 'load', fireContentLoadedEvent); +})(); + +Element.addMethods(); + +/*------------------------------- DEPRECATED -------------------------------*/ + +Hash.toQueryString = Object.toQueryString; + +var Toggle = { display: Element.toggle }; + +Element.Methods.childOf = Element.Methods.descendantOf; + +var Insertion = { + Before: function(element, content) { + return Element.insert(element, {before:content}); + }, + + Top: function(element, content) { + return Element.insert(element, {top:content}); + }, + + Bottom: function(element, content) { + return Element.insert(element, {bottom:content}); + }, + + After: function(element, content) { + return Element.insert(element, {after:content}); + } +}; + +var $continue = new Error('"throw $continue" is deprecated, use "return" instead'); + +var Position = { + includeScrollOffsets: false, + + prepare: function() { + this.deltaX = window.pageXOffset + || document.documentElement.scrollLeft + || document.body.scrollLeft + || 0; + this.deltaY = window.pageYOffset + || document.documentElement.scrollTop + || document.body.scrollTop + || 0; + }, + + within: function(element, x, y) { + if (this.includeScrollOffsets) + return this.withinIncludingScrolloffsets(element, x, y); + this.xcomp = x; + this.ycomp = y; + this.offset = Element.cumulativeOffset(element); + + return (y >= this.offset[1] && + y < this.offset[1] + element.offsetHeight && + x >= this.offset[0] && + x < this.offset[0] + element.offsetWidth); + }, + + withinIncludingScrolloffsets: function(element, x, y) { + var offsetcache = Element.cumulativeScrollOffset(element); + + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; + this.offset = Element.cumulativeOffset(element); + + return (this.ycomp >= this.offset[1] && + this.ycomp < this.offset[1] + element.offsetHeight && + this.xcomp >= this.offset[0] && + this.xcomp < this.offset[0] + element.offsetWidth); + }, + + overlap: function(mode, element) { + if (!mode) return 0; + if (mode == 'vertical') + return ((this.offset[1] + element.offsetHeight) - this.ycomp) / + element.offsetHeight; + if (mode == 'horizontal') + return ((this.offset[0] + element.offsetWidth) - this.xcomp) / + element.offsetWidth; + }, + + + cumulativeOffset: Element.Methods.cumulativeOffset, + + positionedOffset: Element.Methods.positionedOffset, + + absolutize: function(element) { + Position.prepare(); + return Element.absolutize(element); + }, + + relativize: function(element) { + Position.prepare(); + return Element.relativize(element); + }, + + realOffset: Element.Methods.cumulativeScrollOffset, + + offsetParent: Element.Methods.getOffsetParent, + + page: Element.Methods.viewportOffset, + + clone: function(source, target, options) { + options = options || { }; + return Element.clonePosition(target, source, options); + } +}; + +/*--------------------------------------------------------------------------*/ + +if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){ + function iter(name) { + return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]"; + } + + instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ? + function(element, className) { + className = className.toString().strip(); + var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className); + return cond ? document._getElementsByXPath('.//*' + cond, element) : []; + } : function(element, className) { + className = className.toString().strip(); + var elements = [], classNames = (/\s/.test(className) ? $w(className) : null); + if (!classNames && !className) return elements; + + var nodes = $(element).getElementsByTagName('*'); + className = ' ' + className + ' '; + + for (var i = 0, child, cn; child = nodes[i]; i++) { + if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) || + (classNames && classNames.all(function(name) { + return !name.toString().blank() && cn.include(' ' + name + ' '); + })))) + elements.push(Element.extend(child)); + } + return elements; + }; + + return function(className, parentElement) { + return $(parentElement || document.body).getElementsByClassName(className); + }; +}(Element.Methods); + +/*--------------------------------------------------------------------------*/ + +Element.ClassNames = Class.create(); +Element.ClassNames.prototype = { + initialize: function(element) { + this.element = $(element); + }, + + _each: function(iterator) { + this.element.className.split(/\s+/).select(function(name) { + return name.length > 0; + })._each(iterator); + }, + + set: function(className) { + this.element.className = className; + }, + + add: function(classNameToAdd) { + if (this.include(classNameToAdd)) return; + this.set($A(this).concat(classNameToAdd).join(' ')); + }, + + remove: function(classNameToRemove) { + if (!this.include(classNameToRemove)) return; + this.set($A(this).without(classNameToRemove).join(' ')); + }, + + toString: function() { + return $A(this).join(' '); + } +}; + +Object.extend(Element.ClassNames.prototype, Enumerable); + +/*--------------------------------------------------------------------------*/ diff --git a/html/js/scriptaculous.js b/html/js/scriptaculous.js new file mode 100644 index 000000000..c74e6113b --- /dev/null +++ b/html/js/scriptaculous.js @@ -0,0 +1,68 @@ +// script.aculo.us scriptaculous.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +var Scriptaculous = { + Version: '1.8.3', + require: function(libraryName) { + try{ + // inserting via DOM fails in Safari 2.0, so brute force approach + document.write('<script type="text/javascript" src="'+libraryName+'"><\/script>'); + } catch(e) { + // for xhtml+xml served content, fall back to DOM methods + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = libraryName; + document.getElementsByTagName('head')[0].appendChild(script); + } + }, + REQUIRED_PROTOTYPE: '1.6.1', + load: function() { + function convertVersionString(versionString) { + var v = versionString.replace(/_.*|\./g, ''); + v = parseInt(v + '0'.times(4-v.length)); + return versionString.indexOf('_') > -1 ? v-1 : v; + } + + if((typeof Prototype=='undefined') || + (typeof Element == 'undefined') || + (typeof Element.Methods=='undefined') || + (convertVersionString(Prototype.Version) < + convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE))) + throw("script.aculo.us requires the Prototype JavaScript framework >= " + + Scriptaculous.REQUIRED_PROTOTYPE); + + var js = /scriptaculous\.js(\?.*)?$/; + $$('head script[src]').findAll(function(s) { + return s.src.match(js); + }).each(function(s) { + var path = s.src.replace(js, ''), + includes = s.src.match(/\?.*load=([a-z,]*)/); + (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each( + function(include) { Scriptaculous.require(path+include+'.js') }); + }); + } +}; + +Scriptaculous.load(); diff --git a/html/js/scripts.js b/html/js/scripts.js index 71fdaf467..27ff636a7 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -19,28 +19,34 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/* !\file - */ - -/* \brief javascript script, always added to every page +/*!\file + * \brief javascript script, always added to every page * */ -trim = function(p_value) { - return p_value.replace(/^\s+|\s+$/g,""); -}//scripts library. +/*!\brief remove trailing and heading space + * \param the string to modify + * \return string without heading and trailing space + */ +function trim(s) { + return s.replace(/^\s+/, '').replace(/\s+$/, ''); +} -// Set the focus to the specified field, -// and select it if requested by SelectIt +/** + * @brief retrieve an element thanks its ID + * @param ID is a string + * @return the found object of undefined if not found + */ function g(ID) { - if (document.all) { - return document.all[ID]; - } else if (document.getElementById) { + if (document.getElementById) { return document.getElementById(ID); - } else { + } else if (document.all) { + return document.all[ID]; + } else { return undefined; } } +<<<<<<< .working function GetFormField(Field) { var elem = document.forms ? document.forms[0] : false; return elem.elements ? elem.elements[Field] : false; @@ -303,68 +309,32 @@ function import_not_confirmed(p_sessid,p_dossier,p_count) { var form=$("form_"+p_count); form.hide(); } +======= +>>>>>>> .merge-right.r2625 /** - * @brief add a line in the form for the report - * @param p_dossier dossier id to connect - * @param p_sessid session id + *@brief enable the type of periode */ -function rapport_add_row(p_dossier,p_sessid){ - style='style="border: 1px solid blue;"'; - var table=$("rap1"); - var line=table.rows.length; - - var row=table.insertRow(line); - // left cell - var cellPos = row.insertCell(0); - cellPos.innerHTML='<input type="text" '+style+' size="3" id="pos'+line+'" name="pos'+line+'" value="'+line+'">'; - - // right cell - var cellName = row.insertCell(1); - cellName.innerHTML='<input type="text" '+style+' size="50" id="text'+line+'" name="text'+line+'">'; - - // Formula - var cellFormula = row.insertCell(2); - cellFormula.innerHTML='<input type="text" '+style+' size="35" id="form'+line+'" name="form'+line+'">'; - - // Search Button - var cellSearch = row.insertCell(3); - cellSearch.innerHTML='<input type="button" value="Recherche Poste" onclick="SearchPoste(\''+p_sessid+'\','+p_dossier+',\'form'+line+'\',\'\',\'poste\',\'N\')" class="inp"/>'; - +function enable_type_periode() { + if ( g('type_periode').value == 1 ) { + g('from_periode').disabled=true; + g('to_periode').disabled=true; + g('from_date').disabled=false; + g('to_date').disabled=false; + g('p_step').disabled=true; + } else { + g('from_periode').disabled=false; + g('to_periode').disabled=false; + g('from_date').disabled=true; + g('to_date').disabled=true; + g('p_step').disabled=false; + } } /** - * @brief create a file to export a report - * @param p_sessid the Session id - * @param p_dossier the dossier id - */ -function report_export(p_sessid,p_dossier,p_fr_id) { - var queryString="?PHPSESSID="+p_sessid+"&gDossier="+p_dossier+"&f="+p_fr_id; - var action=new Ajax.Request( - "ajax_report.php", - { - method:'get', - parameters:queryString, - onSuccess:report_export_success - } - ); - -} -/** - * @brief callback function for exporting a report - * @param request object request - * @param json json answer - */ -function report_export_success(request,json) { - var answer = request.responseText.evalJSON(true); - var ok=answer.answer; - var link=answer.link; - $('export').hide(); - $('export_link').innerHTML='<a class="mtitle" href="'+link+'"> Cliquez ici pour télécharger le rapport</a>'; -} - -/** - * @brief add a line in the form for the sold ledger + *@brief will reload the window but it is dangerous if we have submitted + * a form */ +<<<<<<< .working function ledger_sold_add_row(){ style='class="input_text"'; var mytable=$("sold_item").tBodies[0]; @@ -388,312 +358,115 @@ function ledger_sold_add_row(){ $("e_quant"+nb.value).value="1"; nb.value++; +======= +function refresh_window() { + window.location.reload(); +>>>>>>> .merge-right.r2625 } -function compute_all_sold() { - var loop=0; - for (loop=0;loop<$("nb_item").value;loop++){ - compute_sold(loop); - } -} /** - * @brief compute the sum of a sold, update the span tvac, htva and tva - * all the needed data are taken from the document (hidden field : phpsessid and gdossier) - * @param the number of the changed ctrl + *@brief we receive a json object as parameter and the function returns the string + * with the format variable=value&var2=val2... */ -function compute_sold(p_ctl_nb) { - var phpsessid=$("phpsessid").value; - var dossier=$("gDossier").value; - - $("e_march"+p_ctl_nb).value=trim($("e_march"+p_ctl_nb).value); - var qcode=$("e_march"+p_ctl_nb).value; - - if ( qcode.length == 0 ) { - clean_sold(p_ctl_nb); - refresh_sold(); - return; - } - var tva_id=-1; - if ($('e_march'+p_ctl_nb+'_tva_id')) tva_id=$('e_march'+p_ctl_nb+'_tva_id').value; - - $('e_march'+p_ctl_nb+'_price').value=trim($('e_march'+p_ctl_nb+'_price').value); - - var price=$('e_march'+p_ctl_nb+'_price').value; - $('e_quant'+p_ctl_nb).value=trim($('e_quant'+p_ctl_nb).value); - var quantity=$('e_quant'+p_ctl_nb).value; - - var querystring='?PHPSESSID='+phpsessid+'&gDossier='+dossier+'&c='+qcode+'&t='+tva_id+'&p='+price+'&q='+quantity+'&n='+p_ctl_nb; - $('sum').hide(); - var action=new Ajax.Request( - "compute.php", - { - method:'get', - parameters:querystring, - onFailure:error_compute_sold, - onSuccess:success_compute_sold - } - ); - } -function refresh_sold () { - var tva=0; var htva=0;var tvac=0; - - for (var i=0;i<$("nb_item").value;i++) { - if ( $('tva_march'+i) ) tva+=$('tva_march'+i).value*1; - if ($('htva_march'+i)) htva+=$('htva_march'+i).value*1; - if ($('tvac_march'+i)) tvac+=$('tvac_march'+i).value*1; - if ($('tva_march'+i+'_show')) $('tva_march'+i+'_show').value=$('tva_march'+i).value; - - } - - if ( $('tva')) $('tva').innerHTML=Math.round(tva*100)/100; - if ( $('htva')) $('htva').innerHTML=Math.round(htva*100)/100; - if ($('tvac')) $('tvac').innerHTML=Math.round(tvac*100)/100; +var encodeJSON=function(obj) { + if (typeof obj != 'object') {alert('encodeParameter obj n\'est pas un objet');} + try{ + var str='';var e=0; + for (i in obj){ + if (e != 0 ) {str+='&';} else {e=1;} + str+=i; + str+='='+encodeURI(obj[i]); + } + return str; + } catch(e){alert('encodeParameter '+e.message);} } +var hide=function(p_param){ + g(p_param).style.display='none'; +} +var show=function(p_param){ + g(p_param).style.display='block'; +} + /** - * @brief update the field htva, tva_id and tvac, callback function for compute_sold + *@brief set the focus on the selected field + *@param Field id of the control + *@param selectIt : the value selected in case of Field is a object select, numeric */ -function success_compute_sold(request,json) { - var answer=request.responseText.evalJSON(true); - var rtva=answer.tva*1; - var rhtva=answer.htva*1; - var rtvac=answer.tvac*1; - var ctl=answer.ctl; - $('sum').show(); - if($('tva_march'+ctl)) $('tva_march'+ctl).value=rtva; - if($('htva_march'+ctl)) $('htva_march'+ctl).value=rhtva; - if ($('tvac_march'+ctl)) $('tvac_march'+ctl).value=rtvac; - refresh_sold(); +function SetFocus(Field,SelectIt) { + var elem = g(Field); + if (elem) { + elem.focus(); + } + return true; } - -/** - * @brief callback error function for compute_sold + /** + * @brief set a DOM id with a value in the parent window (the caller), + @param p_ctl is the name of the control + @param p_value is the value to set in + @param p_add if we don't replace the current value but we add something */ -function error_compute_sold(request,json) { - alert('Ajax does not work'); +function set_inparent(p_ctl,p_value,p_add) { + self.opener.set_value(p_ctl,p_value,p_add); + } + + /** + * @brief set a DOM id with a value, it will consider if it the attribute + value or innerHTML has be used + @param p_ctl is the name of the control + @param p_value is the value to set in + @param p_add if we don't replace the current value but we add something + */ +function set_value(p_ctl,p_value,p_add) { + if ( g(p_ctl)) { + var g_ctrl=g(p_ctl); + if ( p_add != undefined && p_add==1 ) { + if ( g_ctrl.value ) {p_value=g_ctrl.value+','+p_value;} + } + if ( g_ctrl.tagName=='INPUT' ) {g(p_ctl).value=p_value;} + if ( g_ctrl.tagName=='SPAN' ) { g(p_ctl).innerHTML=p_value;} + if ( g_ctrl.tagName=='SELECT' ) { g(p_ctl).value=p_value;} + } } /** -* @brief update the list of available predefined operation when we change the ledger. +*@brief format the number change comma to point +*@param HTML obj */ -function update_predef(p_type,p_direct) { - var jrn=$("p_jrn").value; - var phpsessid=$("phpsessid").value; - var dossier=$("gDossier").value; - var querystring='?PHPSESSID='+phpsessid+'&gDossier='+dossier+'&l='+jrn+'&t='+p_type+'&d='+p_direct; - $("p_jrn_predef").value=jrn; - var action=new Ajax.Request( - "get_predef.php", - { - method:'get', - parameters:querystring, - onFailure:error_get_predef, - onSuccess:success_get_predef - } - ); +function format_number(obj) { + var value=obj.value; + value=value.replace(/,/,'.'); + value=parseFloat(value); + if ( isNaN(value) ) { value=0; } + value=Math.round(value*100)/100; + $(obj).value=value; } /** - * @brief update the field predef - */ -function success_get_predef(request,json) { - var i=0; - var answer=request.responseText.evalJSON(true); - obj=$("pre_def"); - obj.innerHTML=''; - if ( answer.count == 0 ) return; - - for ( i = 0 ; i < answer.count;i++) { - value=answer['value'+i]; - label=answer['label'+i]; - obj.options[obj.options.length]=new Option(label,value); - } - -} -/** - * @brief update the field predef - */ -function error_get_predef(request,json) { - alert ("Erreur mise à jour champs non possible"); - -} -/** -* @brief update the list of available predefined operation when we change the ledger. + *@brief check if the object is hidden or show and perform the opposite, + * show the hidden obj or hide the shown one + *@param name of the object */ -function update_pj() { - var jrn=$("p_jrn").value; - var phpsessid=$("phpsessid").value; - var dossier=$("gDossier").value; - var querystring='?PHPSESSID='+phpsessid+'&gDossier='+dossier+'&l='+jrn; - var action=new Ajax.Request( - "get_pj.php", - { - method:'get', - parameters:querystring, - onFailure:error_get_pj, - onSuccess:success_get_pj - } - ); +function toggleHideShow(p_obj,p_button) { + var stat=g(p_obj).style.display; + var str=g(p_button).value; + if ( stat == 'none' ) { + show(p_obj);str=str.replace(/Afficher/,'Cacher');g(p_button).value=str;} + else {hide(p_obj);str=str.replace(/Cacher/,'Afficher');g(p_button).value=str;} } /** - * @brief update the field predef + *@brief open popup with the search windows + *@param p_sessid,the PHPSESSID + *@param p_dossier the dossier where to search + *@param p_style style of the detail value are E for expert or S for simple */ -function success_get_pj(request,json) { - - var answer=request.responseText.evalJSON(true); - obj=$("e_pj"); - obj.value=''; - if ( answer.count == 0 ) return; - obj.value=answer.pj; - $("e_pj_suggest").value=answer.pj; +function openRecherche(p_sessid,p_dossier,p_style) { + if ( p_style == 'E' ) { p_style="expert";} + var w=window.open("recherche.php?gDossier="+p_dossier+"&PHPSESSID="+p_sessid+'&'+p_style,'','statusbar=no,scrollbars=yes,toolbar=no'); + w.focus(); } +<<<<<<< .working + +<<<<<<< .working /** - * @brief update the field predef - */ -function error_get_pj(request,json) { - alert("Ajax a echoue"); -} - -/** - * @brief add a line in the form for the ledger fin - */ -function ledger_fin_add_row(){ - style='class="input_text"'; - var mytable=$("fin_item").tBodies[0]; - var line=mytable.rows.length; - var row=mytable.insertRow(line); - var phpsessid=$("phpsessid"); - var nb=$("nb_item"); - - var newNode = mytable.rows[1].cloneNode(true); - var tt=newNode.innerHTML; - mytable.appendChild(newNode); - - - new_tt=tt.replace(/e_other0/g,"e_other"+nb.value); - new_tt=new_tt.replace(/e_other0_comment/g,"e_other"+nb.value+'_comment'); - new_tt=new_tt.replace(/e_other0_amount/g,"e_other"+nb.value+'_amount'); - new_tt=new_tt.replace(/e_concerned0/g,"e_concerned"+nb.value); - new_tt=new_tt.replace(/e_other0_label/g,"e_other"+nb.value+'_label'); - newNode.innerHTML=new_tt; - $("e_other"+nb.value+'_label').innerHTML=""; - nb.value++; - -} -/** - * @brief add a line in the form for the purchase ledger - */ -function ledger_purchase_add_row(){ - style='class="input_text"'; - var mytable=$("sold_item").tBodies[0]; - var line=mytable.rows.length; - var row=mytable.insertRow(line); - var phpsessid=$("phpsessid"); - var nb=$("nb_item"); - var newNode = mytable.rows[1].cloneNode(true); - var tt=newNode.innerHTML; - mytable.appendChild(newNode); - new_tt=tt.replace(/march0/g,"march"+nb.value); - new_tt=new_tt.replace(/quant0/g,"quant"+nb.value); - new_tt=new_tt.replace(/sold\(0\)/g,"sold("+nb.value+")"); - newNode.innerHTML=new_tt; - $("e_march"+nb.value+"_label").innerHTML=' '; - $("e_march"+nb.value+"_price").value='0'; - $("e_march"+nb.value).value=""; - $("e_quant"+nb.value).value="1"; - nb.value++; - -} -/** - * @brief compute the sum of a purchase, update the span tvac, htva and tva - * all the needed data are taken from the document (hidden field : phpsessid and gdossier) - * @param the number of the changed ctrl - */ -function compute_purchase(p_ctl_nb) { - var phpsessid=$("phpsessid").value; - var dossier=$("gDossier").value; - var a=-1; - if ( document.getElementById("e_march"+p_ctl_nb+'_tva_amount')) { - a=trim($("e_march"+p_ctl_nb+'_tva_amount').value); - $("e_march"+p_ctl_nb+'_tva_amount').value=a; - } - $("e_march"+p_ctl_nb).value=trim($("e_march"+p_ctl_nb).value); - var qcode=$("e_march"+p_ctl_nb).value; - - if ( qcode.length == 0 ) { clean_purchase(p_ctl_nb);refresh_purchase();return;} - var tva_id=-1; - if ( $('e_march'+p_ctl_nb+'_tva_id') ) { - tva_id=$('e_march'+p_ctl_nb+'_tva_id').value; - } - - $('e_march'+p_ctl_nb+'_price').value=trim($('e_march'+p_ctl_nb+'_price').value); - var price=$('e_march'+p_ctl_nb+'_price').value; - - $('e_quant'+p_ctl_nb).value=trim($('e_quant'+p_ctl_nb).value); - var quantity=$('e_quant'+p_ctl_nb).value; - var querystring='?PHPSESSID='+phpsessid+'&gDossier='+dossier+'&c='+qcode+'&t='+tva_id+'&p='+price+'&q='+quantity+'&n='+p_ctl_nb; - $('sum').hide(); - var action=new Ajax.Request( - "compute.php", - { - method:'get', - parameters:querystring, - onFailure:error_compute_purchase, - onSuccess:success_compute_purchase - } - ); -} -function refresh_purchase() { - var tva=0; var htva=0;var tvac=0; - - for (var i=0;i<$("nb_item").value;i++) { - if( $('tva_march'+i)) tva+=$('tva_march'+i).value*1; - htva+=$('htva_march'+i).value*1; - tvac+=$('tvac_march'+i).value*1; - } - - if ( $('tva') ) $('tva').innerHTML=Math.round(tva*100)/100; - $('htva').innerHTML=Math.round(htva*100)/100; - if ($('tvac')) $('tvac').innerHTML=Math.round(tvac*100)/100; -} -/** - * @brief update the field htva, tva_id and tvac, callback function for compute_sold - * it the field TVA in the answer contains NA it means that VAT is appliable and then do not - * update the VAT field except htva_martc - */ -function success_compute_purchase(request,json) { - - var answer=request.responseText.evalJSON(true); - var ctl=answer.ctl; - var rtva=answer.tva; - var rhtva=answer.htva*1; - var rtvac=answer.tvac*1; - - if ( rtva == 'NA' ) { - var rhtva=answer.htva*1; - $('htva_march'+ctl).value=rhtva; - $('tvac_march'+ctl).value=rtvac; - $('sum').show(); - refresh_purchase(); - - return; - } - rtva=answer.tva*1; - - - - $('sum').show(); - if ( $('e_march'+ctl+'_tva_amount').value=="" || $('e_march'+ctl+'_tva_amount').value==0 ){ - $('tva_march'+ctl).value=rtva; - $('e_march'+ctl+'_tva_amount').value=rtva; - } - else { - $('tva_march'+ctl).value=$('e_march'+ctl+'_tva_amount').value; - } - $('htva_march'+ctl).value=rhtva; - $('tvac_march'+ctl).value=parseFloat($('htva_march'+ctl).value)+parseFloat($('tva_march'+ctl).value); - - refresh_purchase(); -} - -/** +<<<<<<< .working * @brief callback error function for compute_sold */ function error_compute_purchase(request,json) { @@ -780,6 +553,7 @@ function my_clear(p_ctrl) { document.getElementById(p_ctrl).value=""; } } +<<<<<<< .working /** *@brief enable the type of periode */ @@ -796,5 +570,165 @@ function enable_type_periode() { g('to_date').disabled=true; } } +======= +/** + *@brief enable the type of periode + */ +function enable_type_periode() { + if ( g('type_periode').value == 1 ) { + g('from_periode').disabled=true; + g('to_periode').disabled=true; + g('from_date').disabled=false; + g('to_date').disabled=false; + g('p_step').disabled=true; + } else { + g('from_periode').disabled=false; + g('to_periode').disabled=false; + g('from_date').disabled=true; + g('to_date').disabled=true; + g('p_step').disabled=false; + } +} +/** + *@brief remove an attached document of an action + *@param phpsessid + *@param dossier + *@param dt_id id of the document (pk document:d_id) +*/ +function remove_document(p_sessid,p_dossier,p_id) { + queryString="?PHPSESSID="+p_sessid+"&gDossier="+p_dossier+"&a=rm&d_id="+p_id; + var action=new Ajax.Request ( + "show_document.php", + { + method:'get', + parameters:queryString, + onFailure:errorRemoveDoc, + onSuccess:successRemoveDoc + } + + ); +>>>>>>> .merge-right.r2573 + +} +/** + *@brief error if a document if removed + */ + function errorRemoveDoc() { alert('Impossible d\'effacer ce document');} + /** + *@brief success when removing a document + */ + function successRemoveDoc(request,json){ + var answer=request.responseText.evalJSON(true); + var action="ac"+answer.d_id; + $(action).innerHTML=""; + var doc="doc"+answer.d_id; + $(doc).style.color="red"; + $(doc).href="javascript:alert('Document Effacé')"; + $(doc).style.textDecoration="line-through"; + + } + /** + * @brief check the format of the hour + * @param p_ctl is the control where the hour is encoded + */ + function check_hour(p_ctl) { + try { + var h=document.getElementById(p_ctl); + var re = /^\d{1,2}:\d{2}$/; + if ( trim(h.value) !='' && ! h.value.match(re)) + alert("Format de l'heure est HH:MM ") + }catch (erreur){ + alert('fct : check_hour '+erreur); + } + + } +======= +>>>>>>> .merge-right.r2625 +======= +/** + *@brief show the popup +======= + *@brief show the popup. The top property is adapted if you've scrolled the window +>>>>>>> .merge-right.r2857 + *@param name of the object PHP IPopup + */ +function showIPopup(p_name) { + var sx=0; + if ( window.scrollY) { sx=window.scrollY+40;} + else { sx=document.body.scrollTop+40;} + $(p_name+'_border').style.top=sx; + show(p_name+'_fond'); + show(p_name+'_border'); + show(p_name+'_content'); +} +<<<<<<< .working +>>>>>>> .merge-right.r2645 +======= +/** + *@brief hide the popup + *@param name of the object PHP IPopup + */ +function hideIPopup(p_name) { + hide(p_name+'_fond'); + hide(p_name+'_border'); + hide(p_name+'_content'); + $(p_name+'_content').innerHTML='<image src="image/loading.gif" border="0" alt="Chargement...">'; +} +/** + *@brief replace the special characters (><'") by their HTML representation + *@return a string without the offending char. + */ +function unescape_xml(code_html) { + code_html=code_html.replace(/\</,'<'); + code_html=code_html.replace(/\>/,'>'); + code_html=code_html.replace(/\"/,'"'); + code_html=code_html.replace(/\'/,"'"); + code_html=code_html.replace(/\&/,'&'); + return code_html; +} +/** + *@brief Firefox splits the XML into 4K chunk, so to retrieve everything we need + * to get the different parts thanks textContent + *@param xmlNode a node (result of var data = =answer.getElementsByTagName('code')) + *@return all the content of the XML node +*/ +function getNodeText(xmlNode) + { + if(!xmlNode) return ''; + if(typeof(xmlNode.textContent) != "undefined") return xmlNode.textContent; + return xmlNode.firstChild.nodeValue; + } +/** + *@brief change the periode in the calendar of the dashboard + *@param object select + */ +function change_month(obj) { + var queryString="PHPSESSID="+obj.phpsessid+"&gDossier="+obj.gDossier+"&op=cal"+"&per="+obj.value; + var action = new Ajax.Request( + "ajax_misc.php" , { method:'get', parameters:queryString,onFailure:ajax_misc_failure,onSuccess:change_month_success} + ); + +} +function change_month_success(req) { + try{ + var answer=req.responseXML; + var html=answer.getElementsByTagName('code'); + if ( html.length == 0 ) { var rec=req.responseText;alert ('erreur :'+rec);} + var nodeXml=html[0]; + var code_html=getNodeText(nodeXml); + code_html=unescape_xml(code_html); + $("user_cal").innerHTML=code_html; + } + catch (e) { + alert(e.message);} + try{ + code_html.evalScripts();} + catch(e){ + alert("Impossible executer script de la reponse\n"+e.message);} +} + +function ajax_misc_failure() { + alert('Ajax Misc failed'); +}>>>>>>> .merge-right.r2857 diff --git a/html/js/search_card.js b/html/js/search_card.js index 5206ec480..407920635 100644 --- a/html/js/search_card.js +++ b/html/js/search_card.js @@ -20,13 +20,11 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /*! \file - * \brief - * + * \brief javascript for searching a card */ /*!\brief open a windows for showing a card * \param p_sessid must be given * \param the qcode -*\todo is obsolete ?? */ function showfiche(p_sessid,p_qcode) { @@ -40,21 +38,28 @@ function showfiche(p_sessid,p_qcode) *\param p_sessid is the PHPSESSID *\param type must be deb or cred *\param name is the name of the control, it is used for computing the name of the VAT, Price field +*\param no_add to avoid to be able to add a card (for undefined or no) +*\param p_ledger is the ledger id : 0 means no check * \see SetData() */ -function SearchCard(p_sessid,type,name,no_add) +function SearchCard(p_sessid,type,name,p_ledger,no_add) { var search=document.getElementById(name).value; var gDossier=document.getElementById('gDossier').value; + var jrn=0; - if ( document.getElementById("p_jrn") ) { - jrn=document.getElementById("p_jrn").value; - } + if ( p_ledger == undefined ) { + if ( document.getElementById("p_jrn") ) { + jrn=document.getElementById("p_jrn").value; + } + } else + jrn=p_ledger; + var file='fiche_search.php'; -var qadd=''; -if ( no_add != undefined) { qadd="&noadd"} -var -query='?first&search&fic_search='+search+'&p_jrn='+jrn+'&PHPSESSID='+p_sessid +var qadd='&add=yes'; +if ( no_add != undefined && no_add=='no' ) { qadd="&add=no"} + +var query='?first&search&fic_search='+search+'&p_jrn='+jrn+'&PHPSESSID='+p_sessid +'&type='+type+'&name='+name+'&gDossier='+gDossier+qadd; query+="&caller=searchcard"; var a=window.open(file+query,'item','toolbar=no,width=350,height=450,scrollbars=yes,statusbar=no'); @@ -63,16 +68,19 @@ query='?first&search&fic_search='+search+'&p_jrn='+jrn+'&PHPSESSID='+p_sessid } /*!\brief Open a window for adding a card * -* Remark The ledger (jrn_id) must be in the calling form as a hidden field named p_jrn +* Remark The ledger (jrn_id) must be in the calling form as a hidden field named p_jrn or passed as a parameter *\param p_sessid is the PHPSESSID *\param type must be deb or cred *\param name is the name of the control, it is used for computing the name of the VAT, Price field +*\param p_jrn ledger id */ -function NewCard(p_sessid,type,name) +function NewCard(p_sessid,type,name,p_jrn) { + var search=document.getElementById(name).value; var gDossier=document.getElementById('gDossier').value; - var jrn=$("p_jrn").value; + var jrn=0; + if ( p_jrn == undefined ) { jrn=$("p_jrn").value; } else { jrn=p_jrn;} var a=window.open('fiche_new.php?p_jrn='+jrn+'&PHPSESSID='+p_sessid+'&type='+type+'&name='+name+'&gDossier='+gDossier,'item','toolbar=no,width=350,height=450,scrollbars=yes,statusbar=no'); return false; @@ -112,8 +120,13 @@ function SetValue(p_ctl,p_value) // Compute name of label ctl var a=i+'_label'; + + if (document.getElementById(a).tagName=='SPAN') { document.getElementById(a).innerHTML=p_label; document.getElementById(a).style.color='black'; + } else { + SetValue(a,p_label) + } // Compute name of sell ctl var a=i+'_price'; // if the object exist diff --git a/html/js/search_poste.js b/html/js/search_poste.js deleted file mode 100644 index c9a523f8e..000000000 --- a/html/js/search_poste.js +++ /dev/null @@ -1,130 +0,0 @@ -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - -/*! \file - * \brief - * containing the javascript for opening a windows to search an account (poste comptable) - */ -/*!\brief open a window for searching a account - *\param p_sessid PHPSESSID - *\param p_dossier dossier id - *\param p_ctl p_ctl to set - *\param p_jrn the concerned ledger id - *\param p_return update with the pcm_val or pcm_lib (value=label or poste) - *\param p_search take the value of the ctl and make a search - *\param p_ctrl the control (input) to update (default value = none ) - *\note the script will to see if it founds a hidden value in the document.form - * to know if the return must update or replace - *\see poste_search.php - */ -function SearchPoste(p_sessid,p_dossier,p_ctl,p_jrn,p_return,p_search,p_ctrl) - { - var comment=""; - if ( document.getElementById(p_ctl) && p_search=='Y') { - comment=document.getElementById(p_ctl).value; - } - - var -win=window.open('poste_search.php?gDossier='+p_dossier+'&p_jrn='+p_jrn+'&p_ctl=' -+p_ctl+'&PHPSESSID='+p_sessid+"&p_comment="+comment+"&search"+"&ret="+p_return+ -'&ctrl='+p_ctrl, -'Cherche','toolbar=no,width=600,height=600,scrollbars=yes,resizable=yes'); - } -/*!\brief open a window for searching a account - *\param p_sessid PHPSESSID - *\param p_dossier dossier id - *\param p_ctl p_ctl to set - *\param p_jrn the concerned ledger id - *\param p_return update with the pcm_val or pcm_lib (value=label or poste) - *\param p_search take the value of the ctl and make a search -*\param p_ctrl the control to update (default value = none ) - *\see poste_search.php - */ - -function SearchPosteFilter(p_sessid,p_dossier,p_ctl,p_filter,jrn,p_ctrl) - { - var comment=""; - if ( document.getElementById(p_ctl) ) { - comment=document.getElementById(p_ctl).value; - } - - var win=window.open('poste_search.php?gDossier='+p_dossier+'&p_jrn='+jrn+'&p_ctl='+p_ctl+'&PHPSESSID='+p_sessid+'&filter='+p_filter+'&p_comment='+comment+"&search&ret=label"+'&ctrl='+p_ctrl,'Cherche','toolbar=no,width=600,height=600,scrollbars=yes,resizable=yes'); - } -function GetIt() { - window.close(); -} -function SetItChild(p_ctl,p_value,p_label,p_ctrl) { - - self.opener.SetItParent(p_ctl,p_value,p_label,p_ctrl); - window.close(); -} -function SetItParent(p_ctl,p_value,p_label,p_ctrl) { - - var f=document.getElementById(p_ctl); - f.value=p_value; - var f1=document.getElementById(p_ctl+"_label"); - if ( f1) f1.innerHTML=p_label; - if ( document.getElementById(p_ctrl)) document.getElementById(p_ctrl).value=p_label; - -} - -function set_poste_child(p_ctl,p_value) { - - self.opener.set_poste_parent(p_ctl,p_value); - window.close(); -} -function set_poste_parent(p_ctl,p_value) { - - var f=document.getElementById(p_ctl); - f.value+='['+p_value+']'; - -} - -function set_jrn_child(p_ctl,p_value) { - - self.opener.set_jrn_parent(p_ctl,p_value); - window.close(); -} -function set_jrn_parent(p_ctl,p_value) { - var f=document.getElementById(p_ctl); - if ( f ) { - if ( trim(f.value)!="") f.value+=' '; - f.value+=p_value; - } -} -/* SetValue( p_ctl,p_value ) -/* p_ctl is the name of the control -/* p_value is the value to set in -*/ -function SetValue(p_ctl,p_value) -{ - - var f=document.getElementsByName(p_ctl); - for (var h=0; h < f.length; h++) { - f[h].value=p_value; - } - - -} - -function clear(p_ctrl) { - if ( document.getElementById(p_ctrl)) document.getElementById(p_ctrl)=''; -} diff --git a/html/js/slider.js b/html/js/slider.js new file mode 100644 index 000000000..eb8305582 --- /dev/null +++ b/html/js/slider.js @@ -0,0 +1,275 @@ +// script.aculo.us slider.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Marty Haught, Thomas Fuchs +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +if (!Control) var Control = { }; + +// options: +// axis: 'vertical', or 'horizontal' (default) +// +// callbacks: +// onChange(value) +// onSlide(value) +Control.Slider = Class.create({ + initialize: function(handle, track, options) { + var slider = this; + + if (Object.isArray(handle)) { + this.handles = handle.collect( function(e) { return $(e) }); + } else { + this.handles = [$(handle)]; + } + + this.track = $(track); + this.options = options || { }; + + this.axis = this.options.axis || 'horizontal'; + this.increment = this.options.increment || 1; + this.step = parseInt(this.options.step || '1'); + this.range = this.options.range || $R(0,1); + + this.value = 0; // assure backwards compat + this.values = this.handles.map( function() { return 0 }); + this.spans = this.options.spans ? this.options.spans.map(function(s){ return $(s) }) : false; + this.options.startSpan = $(this.options.startSpan || null); + this.options.endSpan = $(this.options.endSpan || null); + + this.restricted = this.options.restricted || false; + + this.maximum = this.options.maximum || this.range.end; + this.minimum = this.options.minimum || this.range.start; + + // Will be used to align the handle onto the track, if necessary + this.alignX = parseInt(this.options.alignX || '0'); + this.alignY = parseInt(this.options.alignY || '0'); + + this.trackLength = this.maximumOffset() - this.minimumOffset(); + + this.handleLength = this.isVertical() ? + (this.handles[0].offsetHeight != 0 ? + this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) : + (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth : + this.handles[0].style.width.replace(/px$/,"")); + + this.active = false; + this.dragging = false; + this.disabled = false; + + if (this.options.disabled) this.setDisabled(); + + // Allowed values array + this.allowedValues = this.options.values ? this.options.values.sortBy(Prototype.K) : false; + if (this.allowedValues) { + this.minimum = this.allowedValues.min(); + this.maximum = this.allowedValues.max(); + } + + this.eventMouseDown = this.startDrag.bindAsEventListener(this); + this.eventMouseUp = this.endDrag.bindAsEventListener(this); + this.eventMouseMove = this.update.bindAsEventListener(this); + + // Initialize handles in reverse (make sure first handle is active) + this.handles.each( function(h,i) { + i = slider.handles.length-1-i; + slider.setValue(parseFloat( + (Object.isArray(slider.options.sliderValue) ? + slider.options.sliderValue[i] : slider.options.sliderValue) || + slider.range.start), i); + h.makePositioned().observe("mousedown", slider.eventMouseDown); + }); + + this.track.observe("mousedown", this.eventMouseDown); + document.observe("mouseup", this.eventMouseUp); + document.observe("mousemove", this.eventMouseMove); + + this.initialized = true; + }, + dispose: function() { + var slider = this; + Event.stopObserving(this.track, "mousedown", this.eventMouseDown); + Event.stopObserving(document, "mouseup", this.eventMouseUp); + Event.stopObserving(document, "mousemove", this.eventMouseMove); + this.handles.each( function(h) { + Event.stopObserving(h, "mousedown", slider.eventMouseDown); + }); + }, + setDisabled: function(){ + this.disabled = true; + }, + setEnabled: function(){ + this.disabled = false; + }, + getNearestValue: function(value){ + if (this.allowedValues){ + if (value >= this.allowedValues.max()) return(this.allowedValues.max()); + if (value <= this.allowedValues.min()) return(this.allowedValues.min()); + + var offset = Math.abs(this.allowedValues[0] - value); + var newValue = this.allowedValues[0]; + this.allowedValues.each( function(v) { + var currentOffset = Math.abs(v - value); + if (currentOffset <= offset){ + newValue = v; + offset = currentOffset; + } + }); + return newValue; + } + if (value > this.range.end) return this.range.end; + if (value < this.range.start) return this.range.start; + return value; + }, + setValue: function(sliderValue, handleIdx){ + if (!this.active) { + this.activeHandleIdx = handleIdx || 0; + this.activeHandle = this.handles[this.activeHandleIdx]; + this.updateStyles(); + } + handleIdx = handleIdx || this.activeHandleIdx || 0; + if (this.initialized && this.restricted) { + if ((handleIdx>0) && (sliderValue<this.values[handleIdx-1])) + sliderValue = this.values[handleIdx-1]; + if ((handleIdx < (this.handles.length-1)) && (sliderValue>this.values[handleIdx+1])) + sliderValue = this.values[handleIdx+1]; + } + sliderValue = this.getNearestValue(sliderValue); + this.values[handleIdx] = sliderValue; + this.value = this.values[0]; // assure backwards compat + + this.handles[handleIdx].style[this.isVertical() ? 'top' : 'left'] = + this.translateToPx(sliderValue); + + this.drawSpans(); + if (!this.dragging || !this.event) this.updateFinished(); + }, + setValueBy: function(delta, handleIdx) { + this.setValue(this.values[handleIdx || this.activeHandleIdx || 0] + delta, + handleIdx || this.activeHandleIdx || 0); + }, + translateToPx: function(value) { + return Math.round( + ((this.trackLength-this.handleLength)/(this.range.end-this.range.start)) * + (value - this.range.start)) + "px"; + }, + translateToValue: function(offset) { + return ((offset/(this.trackLength-this.handleLength) * + (this.range.end-this.range.start)) + this.range.start); + }, + getRange: function(range) { + var v = this.values.sortBy(Prototype.K); + range = range || 0; + return $R(v[range],v[range+1]); + }, + minimumOffset: function(){ + return(this.isVertical() ? this.alignY : this.alignX); + }, + maximumOffset: function(){ + return(this.isVertical() ? + (this.track.offsetHeight != 0 ? this.track.offsetHeight : + this.track.style.height.replace(/px$/,"")) - this.alignY : + (this.track.offsetWidth != 0 ? this.track.offsetWidth : + this.track.style.width.replace(/px$/,"")) - this.alignX); + }, + isVertical: function(){ + return (this.axis == 'vertical'); + }, + drawSpans: function() { + var slider = this; + if (this.spans) + $R(0, this.spans.length-1).each(function(r) { slider.setSpan(slider.spans[r], slider.getRange(r)) }); + if (this.options.startSpan) + this.setSpan(this.options.startSpan, + $R(0, this.values.length>1 ? this.getRange(0).min() : this.value )); + if (this.options.endSpan) + this.setSpan(this.options.endSpan, + $R(this.values.length>1 ? this.getRange(this.spans.length-1).max() : this.value, this.maximum)); + }, + setSpan: function(span, range) { + if (this.isVertical()) { + span.style.top = this.translateToPx(range.start); + span.style.height = this.translateToPx(range.end - range.start + this.range.start); + } else { + span.style.left = this.translateToPx(range.start); + span.style.width = this.translateToPx(range.end - range.start + this.range.start); + } + }, + updateStyles: function() { + this.handles.each( function(h){ Element.removeClassName(h, 'selected') }); + Element.addClassName(this.activeHandle, 'selected'); + }, + startDrag: function(event) { + if (Event.isLeftClick(event)) { + if (!this.disabled){ + this.active = true; + + var handle = Event.element(event); + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + var track = handle; + if (track==this.track) { + var offsets = this.track.cumulativeOffset(); + this.event = event; + this.setValue(this.translateToValue( + (this.isVertical() ? pointer[1]-offsets[1] : pointer[0]-offsets[0])-(this.handleLength/2) + )); + var offsets = this.activeHandle.cumulativeOffset(); + this.offsetX = (pointer[0] - offsets[0]); + this.offsetY = (pointer[1] - offsets[1]); + } else { + // find the handle (prevents issues with Safari) + while((this.handles.indexOf(handle) == -1) && handle.parentNode) + handle = handle.parentNode; + + if (this.handles.indexOf(handle)!=-1) { + this.activeHandle = handle; + this.activeHandleIdx = this.handles.indexOf(this.activeHandle); + this.updateStyles(); + + var offsets = this.activeHandle.cumulativeOffset(); + this.offsetX = (pointer[0] - offsets[0]); + this.offsetY = (pointer[1] - offsets[1]); + } + } + } + Event.stop(event); + } + }, + update: function(event) { + if (this.active) { + if (!this.dragging) this.dragging = true; + this.draw(event); + if (Prototype.Browser.WebKit) window.scrollBy(0,0); + Event.stop(event); + } + }, + draw: function(event) { + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + var offsets = this.track.cumulativeOffset(); + pointer[0] -= this.offsetX + offsets[0]; + pointer[1] -= this.offsetY + offsets[1]; + this.event = event; + this.setValue(this.translateToValue( this.isVertical() ? pointer[1] : pointer[0] )); + if (this.initialized && this.options.onSlide) + this.options.onSlide(this.values.length>1 ? this.values : this.value, this); + }, + endDrag: function(event) { + if (this.active && this.dragging) { + this.finishDrag(event, true); + Event.stop(event); + } + this.active = false; + this.dragging = false; + }, + finishDrag: function(event, success) { + this.active = false; + this.dragging = false; + this.updateFinished(); + }, + updateFinished: function() { + if (this.initialized && this.options.onChange) + this.options.onChange(this.values.length>1 ? this.values : this.value, this); + this.event = null; + } +}); \ No newline at end of file diff --git a/html/js/sound.js b/html/js/sound.js new file mode 100644 index 000000000..a286eb98e --- /dev/null +++ b/html/js/sound.js @@ -0,0 +1,59 @@ +// script.aculo.us sound.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// +// Based on code created by Jules Gravinese (http://www.webveteran.com/) +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +Sound = { + tracks: {}, + _enabled: true, + template: + new Template('<embed style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>'), + enable: function(){ + Sound._enabled = true; + }, + disable: function(){ + Sound._enabled = false; + }, + play: function(url){ + if(!Sound._enabled) return; + var options = Object.extend({ + track: 'global', url: url, replace: false + }, arguments[1] || {}); + + if(options.replace && this.tracks[options.track]) { + $R(0, this.tracks[options.track].id).each(function(id){ + var sound = $('sound_'+options.track+'_'+id); + sound.Stop && sound.Stop(); + sound.remove(); + }); + this.tracks[options.track] = null; + } + + if(!this.tracks[options.track]) + this.tracks[options.track] = { id: 0 }; + else + this.tracks[options.track].id++; + + options.id = this.tracks[options.track].id; + $$('body')[0].insert( + Prototype.Browser.IE ? new Element('bgsound',{ + id: 'sound_'+options.track+'_'+options.id, + src: options.url, loop: 1, autostart: true + }) : Sound.template.evaluate(options)); + } +}; + +if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){ + if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 })) + Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>'); + else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('Windows Media') != -1 })) + Sound.template = new Template('<object id="sound_#{track}_#{id}" type="application/x-mplayer2" data="#{url}"></object>'); + else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('RealPlayer') != -1 })) + Sound.template = new Template('<embed type="audio/x-pn-realaudio-plugin" style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>'); + else + Sound.play = function(){}; +} \ No newline at end of file diff --git a/html/js/todo_list.js b/html/js/todo_list.js index fec381379..13241bb6f 100644 --- a/html/js/todo_list.js +++ b/html/js/todo_list.js @@ -40,16 +40,23 @@ function todo_list_show(p_id) { ); return false; } -function todo_list_show_success(request,json) { - var answer = request.responseText.evalJSON(true); +function todo_list_show_success(req) { + try { + var answer=req.responseXML; + var tl_id=answer.getElementsByTagName('tl_id'); + var tl_title=answer.getElementsByTagName('tl_title'); + var tl_desc=answer.getElementsByTagName('tl_desc'); + var tl_date=answer.getElementsByTagName('tl_date'); + + if ( tl_id.length == 0 ) { var rec=req.responseText;alert ('erreur :'+rec);} - $('p_title').value=answer.tl_title; - - $('p_date').value=answer.tl_date; - $('p_desc').value=decodeURI(answer.tl_desc); - $('tl_id').value=answer.tl_id; - $('add_todo_list').show(); - $('add').hide(); + $('p_title').value=getNodeText(tl_title[0]); + $('p_date').value=getNodeText(tl_date[0]); + $('p_desc').value=getNodeText(tl_desc[0]); + $('tl_id').value=getNodeText(tl_id[0]); + $('add_todo_list').show(); + $('add').hide(); + } catch (e) { alert(e.message);} } function todo_list_show_error(request_json) { alert ('failure'); diff --git a/html/js/unittest.js b/html/js/unittest.js new file mode 100644 index 000000000..33a0c7157 --- /dev/null +++ b/html/js/unittest.js @@ -0,0 +1,568 @@ +// script.aculo.us unittest.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// (c) 2005-2009 Jon Tirsen (http://www.tirsen.com) +// (c) 2005-2009 Michael Schuerig (http://www.schuerig.de/michael/) +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +// experimental, Firefox-only +Event.simulateMouse = function(element, eventName) { + var options = Object.extend({ + pointerX: 0, + pointerY: 0, + buttons: 0, + ctrlKey: false, + altKey: false, + shiftKey: false, + metaKey: false + }, arguments[2] || {}); + var oEvent = document.createEvent("MouseEvents"); + oEvent.initMouseEvent(eventName, true, true, document.defaultView, + options.buttons, options.pointerX, options.pointerY, options.pointerX, options.pointerY, + options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, 0, $(element)); + + if(this.mark) Element.remove(this.mark); + this.mark = document.createElement('div'); + this.mark.appendChild(document.createTextNode(" ")); + document.body.appendChild(this.mark); + this.mark.style.position = 'absolute'; + this.mark.style.top = options.pointerY + "px"; + this.mark.style.left = options.pointerX + "px"; + this.mark.style.width = "5px"; + this.mark.style.height = "5px;"; + this.mark.style.borderTop = "1px solid red;"; + this.mark.style.borderLeft = "1px solid red;"; + + if(this.step) + alert('['+new Date().getTime().toString()+'] '+eventName+'/'+Test.Unit.inspect(options)); + + $(element).dispatchEvent(oEvent); +}; + +// Note: Due to a fix in Firefox 1.0.5/6 that probably fixed "too much", this doesn't work in 1.0.6 or DP2. +// You need to downgrade to 1.0.4 for now to get this working +// See https://bugzilla.mozilla.org/show_bug.cgi?id=289940 for the fix that fixed too much +Event.simulateKey = function(element, eventName) { + var options = Object.extend({ + ctrlKey: false, + altKey: false, + shiftKey: false, + metaKey: false, + keyCode: 0, + charCode: 0 + }, arguments[2] || {}); + + var oEvent = document.createEvent("KeyEvents"); + oEvent.initKeyEvent(eventName, true, true, window, + options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, + options.keyCode, options.charCode ); + $(element).dispatchEvent(oEvent); +}; + +Event.simulateKeys = function(element, command) { + for(var i=0; i<command.length; i++) { + Event.simulateKey(element,'keypress',{charCode:command.charCodeAt(i)}); + } +}; + +var Test = {}; +Test.Unit = {}; + +// security exception workaround +Test.Unit.inspect = Object.inspect; + +Test.Unit.Logger = Class.create(); +Test.Unit.Logger.prototype = { + initialize: function(log) { + this.log = $(log); + if (this.log) { + this._createLogTable(); + } + }, + start: function(testName) { + if (!this.log) return; + this.testName = testName; + this.lastLogLine = document.createElement('tr'); + this.statusCell = document.createElement('td'); + this.nameCell = document.createElement('td'); + this.nameCell.className = "nameCell"; + this.nameCell.appendChild(document.createTextNode(testName)); + this.messageCell = document.createElement('td'); + this.lastLogLine.appendChild(this.statusCell); + this.lastLogLine.appendChild(this.nameCell); + this.lastLogLine.appendChild(this.messageCell); + this.loglines.appendChild(this.lastLogLine); + }, + finish: function(status, summary) { + if (!this.log) return; + this.lastLogLine.className = status; + this.statusCell.innerHTML = status; + this.messageCell.innerHTML = this._toHTML(summary); + this.addLinksToResults(); + }, + message: function(message) { + if (!this.log) return; + this.messageCell.innerHTML = this._toHTML(message); + }, + summary: function(summary) { + if (!this.log) return; + this.logsummary.innerHTML = this._toHTML(summary); + }, + _createLogTable: function() { + this.log.innerHTML = + '<div id="logsummary"></div>' + + '<table id="logtable">' + + '<thead><tr><th>Status</th><th>Test</th><th>Message</th></tr></thead>' + + '<tbody id="loglines"></tbody>' + + '</table>'; + this.logsummary = $('logsummary'); + this.loglines = $('loglines'); + }, + _toHTML: function(txt) { + return txt.escapeHTML().replace(/\n/g,"<br/>"); + }, + addLinksToResults: function(){ + $$("tr.failed .nameCell").each( function(td){ // todo: limit to children of this.log + td.title = "Run only this test"; + Event.observe(td, 'click', function(){ window.location.search = "?tests=" + td.innerHTML;}); + }); + $$("tr.passed .nameCell").each( function(td){ // todo: limit to children of this.log + td.title = "Run all tests"; + Event.observe(td, 'click', function(){ window.location.search = "";}); + }); + } +}; + +Test.Unit.Runner = Class.create(); +Test.Unit.Runner.prototype = { + initialize: function(testcases) { + this.options = Object.extend({ + testLog: 'testlog' + }, arguments[1] || {}); + this.options.resultsURL = this.parseResultsURLQueryParameter(); + this.options.tests = this.parseTestsQueryParameter(); + if (this.options.testLog) { + this.options.testLog = $(this.options.testLog) || null; + } + if(this.options.tests) { + this.tests = []; + for(var i = 0; i < this.options.tests.length; i++) { + if(/^test/.test(this.options.tests[i])) { + this.tests.push(new Test.Unit.Testcase(this.options.tests[i], testcases[this.options.tests[i]], testcases["setup"], testcases["teardown"])); + } + } + } else { + if (this.options.test) { + this.tests = [new Test.Unit.Testcase(this.options.test, testcases[this.options.test], testcases["setup"], testcases["teardown"])]; + } else { + this.tests = []; + for(var testcase in testcases) { + if(/^test/.test(testcase)) { + this.tests.push( + new Test.Unit.Testcase( + this.options.context ? ' -> ' + this.options.titles[testcase] : testcase, + testcases[testcase], testcases["setup"], testcases["teardown"] + )); + } + } + } + } + this.currentTest = 0; + this.logger = new Test.Unit.Logger(this.options.testLog); + setTimeout(this.runTests.bind(this), 1000); + }, + parseResultsURLQueryParameter: function() { + return window.location.search.parseQuery()["resultsURL"]; + }, + parseTestsQueryParameter: function(){ + if (window.location.search.parseQuery()["tests"]){ + return window.location.search.parseQuery()["tests"].split(','); + }; + }, + // Returns: + // "ERROR" if there was an error, + // "FAILURE" if there was a failure, or + // "SUCCESS" if there was neither + getResult: function() { + var hasFailure = false; + for(var i=0;i<this.tests.length;i++) { + if (this.tests[i].errors > 0) { + return "ERROR"; + } + if (this.tests[i].failures > 0) { + hasFailure = true; + } + } + if (hasFailure) { + return "FAILURE"; + } else { + return "SUCCESS"; + } + }, + postResults: function() { + if (this.options.resultsURL) { + new Ajax.Request(this.options.resultsURL, + { method: 'get', parameters: 'result=' + this.getResult(), asynchronous: false }); + } + }, + runTests: function() { + var test = this.tests[this.currentTest]; + if (!test) { + // finished! + this.postResults(); + this.logger.summary(this.summary()); + return; + } + if(!test.isWaiting) { + this.logger.start(test.name); + } + test.run(); + if(test.isWaiting) { + this.logger.message("Waiting for " + test.timeToWait + "ms"); + setTimeout(this.runTests.bind(this), test.timeToWait || 1000); + } else { + this.logger.finish(test.status(), test.summary()); + this.currentTest++; + // tail recursive, hopefully the browser will skip the stackframe + this.runTests(); + } + }, + summary: function() { + var assertions = 0; + var failures = 0; + var errors = 0; + var messages = []; + for(var i=0;i<this.tests.length;i++) { + assertions += this.tests[i].assertions; + failures += this.tests[i].failures; + errors += this.tests[i].errors; + } + return ( + (this.options.context ? this.options.context + ': ': '') + + this.tests.length + " tests, " + + assertions + " assertions, " + + failures + " failures, " + + errors + " errors"); + } +}; + +Test.Unit.Assertions = Class.create(); +Test.Unit.Assertions.prototype = { + initialize: function() { + this.assertions = 0; + this.failures = 0; + this.errors = 0; + this.messages = []; + }, + summary: function() { + return ( + this.assertions + " assertions, " + + this.failures + " failures, " + + this.errors + " errors" + "\n" + + this.messages.join("\n")); + }, + pass: function() { + this.assertions++; + }, + fail: function(message) { + this.failures++; + this.messages.push("Failure: " + message); + }, + info: function(message) { + this.messages.push("Info: " + message); + }, + error: function(error) { + this.errors++; + this.messages.push(error.name + ": "+ error.message + "(" + Test.Unit.inspect(error) +")"); + }, + status: function() { + if (this.failures > 0) return 'failed'; + if (this.errors > 0) return 'error'; + return 'passed'; + }, + assert: function(expression) { + var message = arguments[1] || 'assert: got "' + Test.Unit.inspect(expression) + '"'; + try { expression ? this.pass() : + this.fail(message); } + catch(e) { this.error(e); } + }, + assertEqual: function(expected, actual) { + var message = arguments[2] || "assertEqual"; + try { (expected == actual) ? this.pass() : + this.fail(message + ': expected "' + Test.Unit.inspect(expected) + + '", actual "' + Test.Unit.inspect(actual) + '"'); } + catch(e) { this.error(e); } + }, + assertInspect: function(expected, actual) { + var message = arguments[2] || "assertInspect"; + try { (expected == actual.inspect()) ? this.pass() : + this.fail(message + ': expected "' + Test.Unit.inspect(expected) + + '", actual "' + Test.Unit.inspect(actual) + '"'); } + catch(e) { this.error(e); } + }, + assertEnumEqual: function(expected, actual) { + var message = arguments[2] || "assertEnumEqual"; + try { $A(expected).length == $A(actual).length && + expected.zip(actual).all(function(pair) { return pair[0] == pair[1] }) ? + this.pass() : this.fail(message + ': expected ' + Test.Unit.inspect(expected) + + ', actual ' + Test.Unit.inspect(actual)); } + catch(e) { this.error(e); } + }, + assertNotEqual: function(expected, actual) { + var message = arguments[2] || "assertNotEqual"; + try { (expected != actual) ? this.pass() : + this.fail(message + ': got "' + Test.Unit.inspect(actual) + '"'); } + catch(e) { this.error(e); } + }, + assertIdentical: function(expected, actual) { + var message = arguments[2] || "assertIdentical"; + try { (expected === actual) ? this.pass() : + this.fail(message + ': expected "' + Test.Unit.inspect(expected) + + '", actual "' + Test.Unit.inspect(actual) + '"'); } + catch(e) { this.error(e); } + }, + assertNotIdentical: function(expected, actual) { + var message = arguments[2] || "assertNotIdentical"; + try { !(expected === actual) ? this.pass() : + this.fail(message + ': expected "' + Test.Unit.inspect(expected) + + '", actual "' + Test.Unit.inspect(actual) + '"'); } + catch(e) { this.error(e); } + }, + assertNull: function(obj) { + var message = arguments[1] || 'assertNull'; + try { (obj==null) ? this.pass() : + this.fail(message + ': got "' + Test.Unit.inspect(obj) + '"'); } + catch(e) { this.error(e); } + }, + assertMatch: function(expected, actual) { + var message = arguments[2] || 'assertMatch'; + var regex = new RegExp(expected); + try { (regex.exec(actual)) ? this.pass() : + this.fail(message + ' : regex: "' + Test.Unit.inspect(expected) + ' did not match: ' + Test.Unit.inspect(actual) + '"'); } + catch(e) { this.error(e); } + }, + assertHidden: function(element) { + var message = arguments[1] || 'assertHidden'; + this.assertEqual("none", element.style.display, message); + }, + assertNotNull: function(object) { + var message = arguments[1] || 'assertNotNull'; + this.assert(object != null, message); + }, + assertType: function(expected, actual) { + var message = arguments[2] || 'assertType'; + try { + (actual.constructor == expected) ? this.pass() : + this.fail(message + ': expected "' + Test.Unit.inspect(expected) + + '", actual "' + (actual.constructor) + '"'); } + catch(e) { this.error(e); } + }, + assertNotOfType: function(expected, actual) { + var message = arguments[2] || 'assertNotOfType'; + try { + (actual.constructor != expected) ? this.pass() : + this.fail(message + ': expected "' + Test.Unit.inspect(expected) + + '", actual "' + (actual.constructor) + '"'); } + catch(e) { this.error(e); } + }, + assertInstanceOf: function(expected, actual) { + var message = arguments[2] || 'assertInstanceOf'; + try { + (actual instanceof expected) ? this.pass() : + this.fail(message + ": object was not an instance of the expected type"); } + catch(e) { this.error(e); } + }, + assertNotInstanceOf: function(expected, actual) { + var message = arguments[2] || 'assertNotInstanceOf'; + try { + !(actual instanceof expected) ? this.pass() : + this.fail(message + ": object was an instance of the not expected type"); } + catch(e) { this.error(e); } + }, + assertRespondsTo: function(method, obj) { + var message = arguments[2] || 'assertRespondsTo'; + try { + (obj[method] && typeof obj[method] == 'function') ? this.pass() : + this.fail(message + ": object doesn't respond to [" + method + "]"); } + catch(e) { this.error(e); } + }, + assertReturnsTrue: function(method, obj) { + var message = arguments[2] || 'assertReturnsTrue'; + try { + var m = obj[method]; + if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)]; + m() ? this.pass() : + this.fail(message + ": method returned false"); } + catch(e) { this.error(e); } + }, + assertReturnsFalse: function(method, obj) { + var message = arguments[2] || 'assertReturnsFalse'; + try { + var m = obj[method]; + if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)]; + !m() ? this.pass() : + this.fail(message + ": method returned true"); } + catch(e) { this.error(e); } + }, + assertRaise: function(exceptionName, method) { + var message = arguments[2] || 'assertRaise'; + try { + method(); + this.fail(message + ": exception expected but none was raised"); } + catch(e) { + ((exceptionName == null) || (e.name==exceptionName)) ? this.pass() : this.error(e); + } + }, + assertElementsMatch: function() { + var expressions = $A(arguments), elements = $A(expressions.shift()); + if (elements.length != expressions.length) { + this.fail('assertElementsMatch: size mismatch: ' + elements.length + ' elements, ' + expressions.length + ' expressions'); + return false; + } + elements.zip(expressions).all(function(pair, index) { + var element = $(pair.first()), expression = pair.last(); + if (element.match(expression)) return true; + this.fail('assertElementsMatch: (in index ' + index + ') expected ' + expression.inspect() + ' but got ' + element.inspect()); + }.bind(this)) && this.pass(); + }, + assertElementMatches: function(element, expression) { + this.assertElementsMatch([element], expression); + }, + benchmark: function(operation, iterations) { + var startAt = new Date(); + (iterations || 1).times(operation); + var timeTaken = ((new Date())-startAt); + this.info((arguments[2] || 'Operation') + ' finished ' + + iterations + ' iterations in ' + (timeTaken/1000)+'s' ); + return timeTaken; + }, + _isVisible: function(element) { + element = $(element); + if(!element.parentNode) return true; + this.assertNotNull(element); + if(element.style && Element.getStyle(element, 'display') == 'none') + return false; + + return this._isVisible(element.parentNode); + }, + assertNotVisible: function(element) { + this.assert(!this._isVisible(element), Test.Unit.inspect(element) + " was not hidden and didn't have a hidden parent either. " + ("" || arguments[1])); + }, + assertVisible: function(element) { + this.assert(this._isVisible(element), Test.Unit.inspect(element) + " was not visible. " + ("" || arguments[1])); + }, + benchmark: function(operation, iterations) { + var startAt = new Date(); + (iterations || 1).times(operation); + var timeTaken = ((new Date())-startAt); + this.info((arguments[2] || 'Operation') + ' finished ' + + iterations + ' iterations in ' + (timeTaken/1000)+'s' ); + return timeTaken; + } +}; + +Test.Unit.Testcase = Class.create(); +Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.prototype), { + initialize: function(name, test, setup, teardown) { + Test.Unit.Assertions.prototype.initialize.bind(this)(); + this.name = name; + + if(typeof test == 'string') { + test = test.gsub(/(\.should[^\(]+\()/,'#{0}this,'); + test = test.gsub(/(\.should[^\(]+)\(this,\)/,'#{1}(this)'); + this.test = function() { + eval('with(this){'+test+'}'); + } + } else { + this.test = test || function() {}; + } + + this.setup = setup || function() {}; + this.teardown = teardown || function() {}; + this.isWaiting = false; + this.timeToWait = 1000; + }, + wait: function(time, nextPart) { + this.isWaiting = true; + this.test = nextPart; + this.timeToWait = time; + }, + run: function() { + try { + try { + if (!this.isWaiting) this.setup.bind(this)(); + this.isWaiting = false; + this.test.bind(this)(); + } finally { + if(!this.isWaiting) { + this.teardown.bind(this)(); + } + } + } + catch(e) { this.error(e); } + } +}); + +// *EXPERIMENTAL* BDD-style testing to please non-technical folk +// This draws many ideas from RSpec http://rspec.rubyforge.org/ + +Test.setupBDDExtensionMethods = function(){ + var METHODMAP = { + shouldEqual: 'assertEqual', + shouldNotEqual: 'assertNotEqual', + shouldEqualEnum: 'assertEnumEqual', + shouldBeA: 'assertType', + shouldNotBeA: 'assertNotOfType', + shouldBeAn: 'assertType', + shouldNotBeAn: 'assertNotOfType', + shouldBeNull: 'assertNull', + shouldNotBeNull: 'assertNotNull', + + shouldBe: 'assertReturnsTrue', + shouldNotBe: 'assertReturnsFalse', + shouldRespondTo: 'assertRespondsTo' + }; + var makeAssertion = function(assertion, args, object) { + this[assertion].apply(this,(args || []).concat([object])); + }; + + Test.BDDMethods = {}; + $H(METHODMAP).each(function(pair) { + Test.BDDMethods[pair.key] = function() { + var args = $A(arguments); + var scope = args.shift(); + makeAssertion.apply(scope, [pair.value, args, this]); }; + }); + + [Array.prototype, String.prototype, Number.prototype, Boolean.prototype].each( + function(p){ Object.extend(p, Test.BDDMethods) } + ); +}; + +Test.context = function(name, spec, log){ + Test.setupBDDExtensionMethods(); + + var compiledSpec = {}; + var titles = {}; + for(specName in spec) { + switch(specName){ + case "setup": + case "teardown": + compiledSpec[specName] = spec[specName]; + break; + default: + var testName = 'test'+specName.gsub(/\s+/,'-').camelize(); + var body = spec[specName].toString().split('\n').slice(1); + if(/^\{/.test(body[0])) body = body.slice(1); + body.pop(); + body = body.map(function(statement){ + return statement.strip() + }); + compiledSpec[testName] = body.join('\n'); + titles[testName] = specName; + } + } + new Test.Unit.Runner(compiledSpec, { titles: titles, testLog: log || 'testlog', context: name }); +}; \ No newline at end of file diff --git a/html/lang/en_US/LC_MESSAGES/messages.po b/html/lang/en_US/LC_MESSAGES/messages.po new file mode 100644 index 000000000..b636a6795 --- /dev/null +++ b/html/lang/en_US/LC_MESSAGES/messages.po @@ -0,0 +1,2845 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-01-12 14:14+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: test.php:228 test.php:233 html/test.php:233 html/test.php:193 +#: html/test.php:195 +msgid "Bienvenu sur mon site" +msgstr "Welcome on my website" + +#: test.php:229 test.php:234 html/test.php:234 html/test.php:194 +#: html/test.php:196 +msgid "Essayer de vous y amuser" +msgstr "I hope you will enjoy it" + +#: test.php:233 test.php:238 html/test.php:238 html/test.php:198 +#: html/test.php:200 +msgid "Choississez votre langue" +msgstr "Select your language" + +#: test.php:234 test.php:239 html/test.php:239 include/pref.inc.php:222 +#: html/test.php:199 html/test.php:201 +msgid "Français" +msgstr "French" + +#: test.php:235 test.php:240 html/test.php:240 include/pref.inc.php:223 +#: html/test.php:200 html/test.php:202 +msgid "Anglais" +msgstr "English" + +#: test.php:236 test.php:241 html/test.php:241 include/pref.inc.php:224 +#: html/test.php:201 html/test.php:203 +msgid "Néerlandais" +msgstr "Dutch" + +#: test.php:245 test.php:250 html/test.php:250 html/test.php:210 +#: html/test.php:212 +msgid "Change de langue" +msgstr "Change language" + +#: test.php:258 html/test.php:258 html/test.php:218 html/test.php:220 +msgid "Fin de programme" +msgstr "End of program" + +#: html/commercial.php:66 html/commercial.php:65 +msgid "Vous devez choisir un dossier " +msgstr "You must choose a folder" + +#: html/commercial.php:111 include/user_menu.php:443 include/user_menu.php:442 +#: include/user_menu.php:441 +msgid "Tableau de bord" +msgstr "Dashboard" + +#: html/commercial.php:113 include/class_acc_ledger_sold.php:1083 +#: include/class_acc_ledger_sold.php:555 html/commercial.php:111 +#: include/class_acc_ledger_sold.php:487 +#: include/class_acc_ledger_sold.php:1015 +#: include/class_acc_ledger_sold.php:489 +#: include/class_acc_ledger_sold.php:1030 +#: include/class_acc_ledger_sold.php:490 +#: include/class_acc_ledger_sold.php:1031 +#: include/class_acc_ledger_sold.php:492 +#: include/class_acc_ledger_sold.php:1033 +msgid "Client" +msgstr "Customer" + +#: html/commercial.php:114 include/compta_ach.inc.php:55 +#: include/class_acc_ledger_purchase.php:947 include/compta_ach.inc.php:59 +#: include/class_acc_ledger_purchase.php:1023 html/commercial.php:112 +#: include/class_acc_ledger_purchase.php:847 +#: include/class_acc_ledger_purchase.php:923 +#: include/class_acc_ledger_purchase.php:861 +#: include/class_acc_ledger_purchase.php:937 +#: include/class_acc_ledger_purchase.php:858 +#: include/class_acc_ledger_purchase.php:934 +msgid "Fournisseur" +msgstr "Supplier" + +#: html/commercial.php:115 html/commercial.php:113 +msgid "Administration" +msgstr "Administration" + +#: html/commercial.php:116 include/template/security_list_action.php:98 +#: include/template/security_list_action.php:92 html/commercial.php:114 +#: html/commercial.php:117 include/template/security_list_action.php:91 +#: include/template/security_list_action.php:81 +msgid "Stock" +msgstr "Stock" + +#: html/commercial.php:117 include/user_menu.php:193 include/user_menu.php:471 +#: include/client_card.inc.php:70 include/template/detail-action.php:156 +#: include/template/security_list_action.php:58 +#: include/template/security_list_action.php:52 html/commercial.php:115 +#: include/user_menu.php:339 html/commercial.php:118 +#: include/adm_card.inc.php:70 include/supplier_card.inc.php:70 +#: include/user_menu.php:338 include/template/security_list_action.php:51 +#: include/template/security_list_action.php:59 include/impress.inc.php:34 +msgid "Fiche" +msgstr "Card" + +#: html/commercial.php:118 html/commercial.php:116 html/commercial.php:119 +msgid "Prevision" +msgstr "Expectation" + +#: html/commercial.php:119 html/commercial.php:117 html/commercial.php:120 +msgid "Suivi Courrier" +msgstr "Follow up" + +#: include/ac_common.php:282 include/ac_common.php:272 +msgid "Cette action ne vous est pas autorisée Contactez votre responsable" +msgstr "This action is not allowed, please contact your administrator" + +#: include/class_user.php:45 +msgid "Session expirée<br>Utilisateur déconnecté" +msgstr "Session expired<br>User disconnected" + +#: include/class_user.php:153 include/class_user.php:156 +msgid "Utilisateur ou mot de passe incorrect" +msgstr "User or password incorrect" + +#: include/class_user.php:336 include/class_user.php:339 +msgid "Aucune période trouvéee !!!" +msgstr "No period found" + +#: include/class_user.php:631 include/class_user.php:660 +#: include/class_user.php:664 +msgid "Dossier non accessible" +msgstr "Folder not accessible" + +#: include/pref.inc.php:52 +msgid "Mot de passe est modifiée" +msgstr "Password modified" + +#: include/pref.inc.php:61 +msgid "Changez vos préférences" +msgstr "Change your preferences" + +#: include/pref.inc.php:69 +msgid "Options Générales" +msgstr "General paramater" + +#: include/pref.inc.php:100 +msgid "Thème" +msgstr "Theme" + +#: include/pref.inc.php:155 +msgid "" +"Attention cette période est fermée, vous ne pourrez rien modifier dans le " +"module comptable" +msgstr "" +"Caution this period is closed, you won't be able to modify in the accountant " +"module " + +#: include/pref.inc.php:170 include/class_acc_ledger.php:804 +#: include/template/forecast_result.php:21 +msgid "Période" +msgstr "Period" + +#: include/pref.inc.php:181 +msgid "Taille des pages" +msgstr "Page size" + +#: include/pref.inc.php:190 include/pref.inc.php:192 +msgid "Illimité" +msgstr "Unlimited" + +#: include/pref.inc.php:205 +msgid "Options pour la page d'accueil" +msgstr "Option for the welcome page" + +#: include/pref.inc.php:206 +msgid "Mini-Rapport : " +msgstr "Mini-Report" + +#: include/pref.inc.php:209 +msgid "Aucun mini rapport" +msgstr "No mini-report" + +#: include/pref.inc.php:215 +msgid "Le mini rapport est un rapport qui s'affiche sur votre page d'accueil" +msgstr "The mini-report " + +#: include/pref.inc.php:220 +msgid "Langue" +msgstr "Language" + +#: include/pref.inc.php:221 +msgid "Selectionnez votre langue" +msgstr "Select your language" + +#: include/pref.inc.php:236 include/pref.inc.php:238 +msgid "Valider" +msgstr "Validate" + +#: include/pref.inc.php:244 include/dossier.inc.php:242 +#: include/dossier.inc.php:268 include/dossier.inc.php:286 +#: include/action.inc.php:34 include/pref.inc.php:246 +#: include/action.inc.php:44 +msgid "Retour" +msgstr "Return" + +#: include/user_menu.php:186 +msgid "Grand Livre" +msgstr "Ledger" + +#: include/user_menu.php:186 +msgid "Grand livre : toutes les opérations" +msgstr "Ledger : all entries" + +#: include/user_menu.php:187 +msgid "Vente" +msgstr "Sale" + +#: include/user_menu.php:187 +msgid "Journal de vente / produit" +msgstr "Ledger of sales" + +#: include/user_menu.php:188 include/class_anticipation.php:198 +msgid "Dépense" +msgstr "Purchase" + +#: include/user_menu.php:188 +msgid "Journaux de dépense, d'achat" +msgstr "Ledger of purchase" + +#: include/user_menu.php:189 +msgid "Financier" +msgstr "Financial" + +#: include/user_menu.php:189 +msgid "Journaux financiers: les banques, la caisse" +msgstr "Financial ledger : bank,.." + +#: include/user_menu.php:190 +msgid "Ecriture directe" +msgstr "Direct Writing" + +#: include/user_menu.php:190 +msgid "Ecriture directe dans les journaux" +msgstr "Write directly in a ledger" + +#: include/user_menu.php:192 include/compta_ach.inc.php:54 +#: include/compta_fin.inc.php:54 include/compta_ven.inc.php:53 +#: include/compta_ach.inc.php:58 include/compta_fin.inc.php:58 +#: include/compta_ven.inc.php:57 include/template/security_list_action.php:72 +#: include/template/security_list_action.php:66 html/commercial.php:116 +#: include/template/security_list_action.php:65 +#: include/template/security_list_action.php:73 +msgid "Impression" +msgstr "Print" + +#: include/user_menu.php:193 +msgid "Ajouter, modifier ou effacer des fiches" +msgstr "Add,modifier or remove card" + +#: include/user_menu.php:194 +msgid "Avancé" +msgstr "Advanced" + +#: include/user_menu.php:194 +msgid "Opérations délicates" +msgstr "Advanced operation" + +#: include/user_menu.php:355 include/user_menu.php:223 +msgid "Ecritures definies" +msgstr "Defined entries" + +#: include/user_menu.php:356 include/user_menu.php:224 +msgid "Periode" +msgstr "Period" + +#: include/user_menu.php:356 include/user_menu.php:224 +msgid "Gestion des periodes" +msgstr "Period management" + +#: include/user_menu.php:357 include/user_menu.php:225 +msgid "Centralise" +msgstr "Centralize" + +#: include/user_menu.php:357 include/user_menu.php:225 +msgid "Centralisation" +msgstr "Centralization" + +#: include/user_menu.php:359 include/user_menu.php:227 +msgid "Gestion des stocks" +msgstr "Stock control" + +#: include/user_menu.php:360 include/user_menu.php:228 +#: include/impress.inc.php:35 +msgid "Rapport" +msgstr "Report" + +#: include/user_menu.php:361 include/user_menu.php:229 +msgid "Import Banque" +msgstr "Bank import" + +#: include/user_menu.php:361 include/template/form_ledger_fin.php:6 +#: include/user_menu.php:229 include/class_anticipation.php:198 +msgid "Banque" +msgstr "Bank" + +#: include/user_menu.php:362 include/user_menu.php:230 +msgid "Ecriture ouverture" +msgstr "Opening entries" + +#: include/user_menu.php:363 include/user_menu.php:231 +msgid "Vérification" +msgstr "Check in" + +#: include/user_menu.php:437 include/user_menu.php:305 +msgid "Utilisateurs" +msgstr "Users" + +#: include/user_menu.php:437 include/user_menu.php:305 +msgid "Gestion des utilisateurs" +msgstr "Users managements" + +#: include/user_menu.php:438 include/user_menu.php:306 +msgid "Dossiers" +msgstr "Folders" + +#: include/user_menu.php:438 include/user_menu.php:306 +msgid "Gestion des dossiers" +msgstr "Folders managements" + +#: include/user_menu.php:439 include/user_menu.php:307 +msgid "Modèles" +msgstr "Template" + +#: include/user_menu.php:439 include/user_menu.php:307 +msgid "Gestion des modèles" +msgstr "Template management" + +#: include/user_menu.php:440 include/user_menu.php:308 +msgid "Restaure" +msgstr "Restore" + +#: include/user_menu.php:440 include/user_menu.php:308 +msgid "Restaure une base de données" +msgstr "Restore a folder" + +#: include/user_menu.php:441 include/user_menu.php:575 +#: include/user_menu.php:309 +msgid "Accueil" +msgstr "Homepage" + +#: include/user_menu.php:442 include/user_menu.php:310 +msgid "Sortie" +msgstr "Logout" + +#: include/user_menu.php:466 include/user_menu.php:334 +msgid "Sociétés" +msgstr "Company" + +#: include/user_menu.php:466 include/user_menu.php:334 +msgid "Parametre societe" +msgstr "Company parametes" + +#: include/user_menu.php:467 include/user_menu.php:335 +msgid "Divers" +msgstr "Miscelleanous" + +#: include/user_menu.php:467 include/user_menu.php:335 +msgid "Devise, moyen de paiement" +msgstr "Currency, " + +#: include/user_menu.php:468 include/user_menu.php:336 html/parametre.php:157 +#: html/parametre.php:136 +msgid "Tva" +msgstr "VAT" + +#: include/user_menu.php:468 include/user_menu.php:336 +msgid "Taux & poste pour la TVA" +msgstr "Rate and accounting item for VAT" + +#: include/user_menu.php:469 include/user_menu.php:337 +#: include/user_menu.php:336 include/template/forecast-detail.php:8 +#: html/parametre.php:137 +msgid "Poste Comptable" +msgstr "Accounting item" + +#: include/user_menu.php:469 include/user_menu.php:337 +#: include/user_menu.php:336 html/parametre.php:137 +msgid "Poste comptable constant" +msgstr "Constant accounting item " + +#: include/user_menu.php:470 include/user_menu.php:338 +#: include/user_menu.php:337 include/user_menu.php:336 +msgid "Plan Comptable" +msgstr "Accounting system" + +#: include/user_menu.php:470 include/user_menu.php:338 +#: include/user_menu.php:337 include/user_menu.php:336 +msgid "Modification du plan comptable" +msgstr "Modification of the accounting system" + +#: include/user_menu.php:471 include/user_menu.php:339 +#: include/user_menu.php:338 +msgid "Modifie les classe de base" +msgstr "Modify the fondamental accounting item" + +#: include/user_menu.php:472 include/user_menu.php:340 +#: include/user_menu.php:339 include/template/extension-sec.php:3 +#: include/user_menu.php:338 +msgid "Sécurité" +msgstr "Security" + +#: include/user_menu.php:472 include/user_menu.php:340 +#: include/user_menu.php:339 include/user_menu.php:338 +msgid "securite" +msgstr "security" + +#: include/user_menu.php:473 include/user_menu.php:341 +#: include/user_menu.php:340 include/user_menu.php:339 +msgid "Ecritures définies" +msgstr "Defined entries" + +#: include/user_menu.php:474 include/class_acc_ledger.php:618 +#: include/user_menu.php:342 include/class_acc_ledger.php:617 +#: include/user_menu.php:341 include/user_menu.php:340 +msgid "Document" +msgstr "Document" + +#: include/user_menu.php:474 include/user_menu.php:342 +#: include/user_menu.php:341 include/user_menu.php:340 +msgid "Facture, lettre de rappel, proposition..." +msgstr "Invoice, delivery, mail..." + +#: include/user_menu.php:475 include/user_menu.php:343 +#: include/user_menu.php:342 include/impress.inc.php:32 +#: include/user_menu.php:341 +msgid "Journaux" +msgstr "Ledgers" + +#: include/user_menu.php:475 include/user_menu.php:343 +#: include/user_menu.php:342 include/user_menu.php:341 +msgid "Creation et modification de journaux" +msgstr "Creation and modification of ledger" + +#: include/user_menu.php:494 include/user_menu.php:362 +#: include/user_menu.php:361 include/user_menu.php:254 +#: include/user_menu.php:360 +msgid "Création" +msgstr "Creation" + +#: include/user_menu.php:548 include/user_menu.php:416 +#: include/user_menu.php:415 include/user_menu.php:414 +msgid "Importer CSV" +msgstr "Import CSV" + +#: include/user_menu.php:549 include/user_menu.php:417 +#: include/user_menu.php:416 include/user_menu.php:415 +msgid "Verif CSV" +msgstr "Verif CSV" + +#: include/user_menu.php:550 include/user_menu.php:418 +#: include/user_menu.php:417 include/user_menu.php:416 +msgid "Transfert CSV" +msgstr "CSV Transfert" + +#: include/user_menu.php:576 include/user_menu.php:444 +#: include/user_menu.php:443 include/user_menu.php:442 +msgid "Preference" +msgstr "Preference" + +#: include/user_menu.php:577 include/template/security_list_action.php:81 +#: include/template/security_list_action.php:75 include/user_menu.php:445 +#: include/user_menu.php:444 include/template/security_list_action.php:74 +#: include/template/security_list_action.php:51 include/user_menu.php:443 +msgid "Paramètre" +msgstr "Parameter" + +#: include/user_menu.php:578 include/user_menu.php:446 +#: include/user_menu.php:445 include/user_menu.php:444 +msgid "Autre Dossier" +msgstr "Other folder" + +#: include/user_menu.php:579 html/user_login.php:73 html/user_login.php:74 +#: include/user_menu.php:447 html/user_login.php:82 include/user_menu.php:446 +#: include/user_menu.php:445 +msgid "Deconnexion" +msgstr "Disconnect" + +#: include/user_menu.php:581 include/user_menu.php:449 +#: include/user_menu.php:448 include/user_menu.php:447 +msgid "Compta Générale" +msgstr "Accountancy" + +#: include/user_menu.php:582 include/template/security_list_action.php:91 +#: include/template/security_list_action.php:85 include/user_menu.php:450 +#: include/user_menu.php:449 include/template/security_list_action.php:84 +#: include/template/security_list_action.php:98 include/user_menu.php:448 +msgid "Gestion" +msgstr "Management" + +#: include/user_menu.php:583 include/class_acc_ledger_purchase.php:1043 +#: include/class_acc_ledger_sold.php:572 +#: include/class_acc_ledger_purchase.php:943 +#: include/class_acc_ledger_sold.php:504 include/user_menu.php:451 +#: include/class_acc_ledger_purchase.php:957 +#: include/class_acc_ledger_sold.php:506 include/user_menu.php:450 +#: include/class_acc_ledger_purchase.php:954 +#: include/class_acc_ledger_sold.php:507 include/class_acc_ledger_sold.php:509 +#: include/user_menu.php:449 +msgid "Compt. Analytique" +msgstr "Cost Accounting" + +#: include/user_menu.php:584 include/template/security_list_action.php:52 +msgid "Budget" +msgstr "Budget" + +#: include/ac_common.php:288 include/ac_common.php:278 +msgid " Cette action ne vous est pas autorisée Contactez votre responsable" +msgstr "This action is not authorized contact your administrator" + +#: html/access.php:71 html/access.php:72 html/access.php:73 +msgid "Votre base de données n'est pas à jour" +msgstr "Your database is not updated" + +#: html/access.php:72 html/access.php:73 html/access.php:74 +msgid "cliquez ici pour appliquer le patch" +msgstr "Click here to apply the patch" + +#: html/access.php:102 +msgid "Liste des tâches" +msgstr "Todo list" + +#: html/access.php:109 include/class_acc_ledger.php:498 +#: include/class_acc_ledger.php:1216 include/class_acc_ledger.php:1338 +#: include/template/detail-action.php:15 +#: include/template/form_ledger_detail.php:13 +#: include/template/form_ledger_fin.php:3 +#: include/class_acc_ledger_sold.php:545 +#: include/class_acc_ledger_purchase.php:1013 html/access.php:110 +#: include/class_acc_ledger.php:1142 include/class_acc_ledger.php:1264 +#: include/class_acc_ledger_purchase.php:913 +#: include/class_acc_ledger_sold.php:477 html/access.php:156 +#: include/class_acc_ledger.php:497 include/class_acc_ledger.php:1141 +#: include/class_acc_ledger.php:1263 include/class_acc_ledger_purchase.php:927 +#: include/class_acc_ledger_sold.php:479 include/class_anc_listing.php:73 +#: include/class_acc_ledger_purchase.php:924 +#: include/class_acc_ledger_sold.php:480 include/class_acc_ledger_sold.php:482 +msgid "Date" +msgstr "Date" + +#: html/access.php:110 include/template/detail-action.php:132 +#: html/access.php:111 html/access.php:157 +msgid "Titre" +msgstr "Title" + +#: html/access.php:111 include/dossier.inc.php:235 include/dossier.inc.php:264 +#: include/class_acc_ledger.php:499 include/class_acc_ledger.php:1217 +#: include/class_acc_ledger.php:1341 include/template/detail-action.php:129 +#: include/template/detail-action.php:157 +#: include/template/form_ledger_detail.php:17 +#: include/class_acc_ledger_sold.php:552 +#: include/class_acc_ledger_purchase.php:1020 html/access.php:112 +#: include/class_acc_ledger.php:1143 include/class_acc_ledger.php:1267 +#: include/class_acc_ledger_purchase.php:920 +#: include/class_acc_ledger_sold.php:484 html/access.php:158 +#: include/class_acc_ledger.php:498 include/class_acc_ledger.php:1142 +#: include/class_acc_ledger.php:1266 include/class_acc_ledger_purchase.php:934 +#: include/class_acc_ledger_sold.php:486 include/class_anc_account.php:266 +#: include/class_anc_listing.php:75 include/class_anc_plan.php:125 +#: include/class_acc_ledger_purchase.php:931 +#: include/class_acc_ledger_sold.php:487 include/class_acc_ledger_sold.php:489 +msgid "Description" +msgstr "Description" + +#: html/access.php:115 include/compta_fin.inc.php:161 +#: include/compta_fin.inc.php:165 include/report.inc.php:123 +#: include/report.inc.php:138 html/access.php:116 html/ajax_card.php:271 +#: html/access.php:162 html/ajax_extension.php:117 html/ajax_extension.php:174 +#: html/parametre.php:283 include/payment_middle.inc.php:57 +#: html/ajax_extension.php:111 html/ajax_extension.php:168 +#: html/parametre.php:289 +msgid "Sauve" +msgstr "Save" + +#: html/access.php:116 html/access.php:117 html/access.php:163 +#: include/detail_adm.inc.php:68 include/detail_client.inc.php:68 +#: include/detail_supplier.inc.php:68 include/fiche.inc.php:292 +#: include/fiche.inc.php:380 +msgid "Annuler" +msgstr "Cancel" + +#: html/access.php:120 html/access.php:121 html/access.php:167 +msgid "Ajout" +msgstr "Add" + +#: html/access.php:161 html/access.php:162 html/access.php:100 +msgid "Aucune periode par defaut" +msgstr "There is no default period" + +#: html/access.php:184 html/access.php:185 html/access.php:123 +msgid "Aucun rapport défini" +msgstr "No report defined" + +#: html/access.php:185 html/access.php:186 html/access.php:124 +msgid "Cliquez ici pour mettre à jour vos préférences" +msgstr "Click here to update your preference" + +#: html/user_login.php:77 html/user_login.php:78 html/user_login.php:86 +msgid "Bienvenue" +msgstr "Welcome" + +#: html/user_login.php:77 html/user_login.php:78 html/user_login.php:86 +msgid "dans PhpCompta" +msgstr "in PhpCompta" + +#: html/user_login.php:83 html/user_login.php:84 html/user_login.php:92 +#: include/class_acc_ledger_fin.php:763 include/class_acc_ledger.php:2176 +#: include/fiche.inc.php:74 +msgid "Rechercher" +msgstr "Search" + +#: html/user_login.php:92 html/user_login.php:93 html/user_login.php:101 +msgid "Donnez une partie du nom du dossier à rechercher" +msgstr "Give the a part of the folder name " + +#: include/user_menu.php:526 +msgid "Immobilisé" +msgstr "Fixed asset" + +#: include/user_menu.php:527 include/user_menu.php:395 +#: include/user_menu.php:394 include/user_menu.php:393 +msgid "Actif a un an au plus" +msgstr "Asset of one year max" + +#: include/user_menu.php:528 include/user_menu.php:396 +#: include/user_menu.php:395 include/user_menu.php:394 +msgid "Stock et commande" +msgstr "Stock and Order" + +#: include/user_menu.php:529 include/user_menu.php:397 +#: include/user_menu.php:396 include/user_menu.php:395 +msgid "Compte tiers" +msgstr "" + +#: include/user_menu.php:530 include/user_menu.php:398 +#: include/user_menu.php:397 include/template/extension-detail.php:39 +#: include/user_menu.php:396 +msgid "Actif" +msgstr "Asset" + +#: include/user_menu.php:531 include/user_menu.php:399 +#: include/user_menu.php:398 include/user_menu.php:397 +msgid "Charges" +msgstr "Expenses" + +#: include/user_menu.php:532 include/user_menu.php:400 +#: include/user_menu.php:399 include/user_menu.php:398 +msgid "Produits" +msgstr "Products" + +#: include/user_menu.php:533 include/user_menu.php:534 +#: include/user_menu.php:401 include/user_menu.php:402 +#: include/user_menu.php:400 include/user_menu.php:399 +msgid "Hors Comptabilité" +msgstr "Out of accountancy system" + +#: html/user_login.php:71 html/user_login.php:72 html/user_login.php:80 +msgid "Aide" +msgstr "Help" + +#: html/user_login.php:72 html/user_login.php:73 html/user_login.php:81 +msgid "Préférence" +msgstr "Preference" + +#: include/user_menu.php:526 include/user_menu.php:394 +#: include/user_menu.php:393 include/user_menu.php:392 +msgid " Immobilisé" +msgstr "Fixed Asset" + +#: include/user.inc.php:81 +msgid "Ajout d'utilisateur" +msgstr "Add users" + +#: include/dossier.inc.php:47 +msgid "Le nom du dossier est vide" +msgstr "The name is empty" + +#: include/dossier.inc.php:53 +msgid "Désolé vous devez migrer ce modèle en unicode" +msgstr "Sorry vous have to migrate this template in unicpde" + +#: include/dossier.inc.php:55 +msgid "le modele " +msgstr "the template" + +#: include/dossier.inc.php:55 +msgid " doit être migré en unicode." +msgstr " must be migrated in unicode" + +#: include/dossier.inc.php:56 +msgid "" +"Pour le passer en unicode, faites-en un backup puis restaurez le fichier reçu" +msgstr "To convert it in unicode, do first an backup en restore it" + +#: include/dossier.inc.php:69 +msgid "" +"Desole la creation de ce dossier a echoue,\n" +" la cause la plus probable est" +msgstr "" +"Sorry the folder creation failed,\n" +" it is likely due to " + +#: include/dossier.inc.php:87 +msgid " est une année invalide" +msgstr " is an invalid year" + +#: include/dossier.inc.php:104 +msgid " Base de donnée " +msgstr "Database" + +#: include/dossier.inc.php:105 include/dossier.inc.php:310 +msgid "est accèdée, déconnectez-vous d'abord" +msgstr "is accessed, disconnect first" + +#: include/dossier.inc.php:153 +msgid "Rafraîchir" +msgstr "Refresh" + +#: include/dossier.inc.php:154 +msgid "Ajouter" +msgstr "Add" + +#: include/dossier.inc.php:183 include/dossier.inc.php:285 +#: include/compta_fin.inc.php:162 include/compta_fin.inc.php:166 +#: include/forecast.inc.php:333 include/class_acc_ledger.php:744 +msgid "Effacer" +msgstr "Remove" + +#: include/dossier.inc.php:185 +msgid "Modifier" +msgstr "Modify" + +#: include/dossier.inc.php:188 +msgid "Backup" +msgstr "Backup" + +#: include/dossier.inc.php:215 +msgid "pas de modèle disponible" +msgstr "No template" + +#: include/dossier.inc.php:233 +msgid "Nom du dossier" +msgstr "Folder name" + +#: include/dossier.inc.php:237 +msgid "Modèle" +msgstr "Template" + +#: include/dossier.inc.php:240 +msgid "Creation Dossier" +msgstr "Folder Creation" + +#: include/dossier.inc.php:259 include/class_anc_account.php:255 +#: include/class_anc_listing.php:74 include/class_anc_plan.php:124 +#: include/template/extension-detail.php:8 +#: include/template/extension-sec.php:8 include/template/forecast_cat.php:9 +msgid "Nom" +msgstr "Name" + +#: include/dossier.inc.php:267 include/payment_middle.inc.php:93 +msgid "Modifie" +msgstr "Modify" + +#: include/dossier.inc.php:283 +msgid "Cochez la case si vous êtes sûr de vouloir effacer ce dossier" +msgstr "Check the box if you are sur to remove this folder" + +#: include/dossier.inc.php:293 +msgid "Désolé, vous n'avez pas coché la case" +msgstr "Sorry the box is not checked" + +#: include/dossier.inc.php:309 +msgid "Base de donnée " +msgstr "Database" + +#: include/dossier.inc.php:280 +msgid "Etes vous sûr et certain de vouloir effacer " +msgstr "Are you sure to remove this folder" + +#: include/dossier.inc.php:300 +msgid "inexistant" +msgstr "inexistent" + +#: html/user_login.php:38 html/user_login.php:46 +msgid "Vous utilisez un navigateur dépassé depuis près de 8 ans!" +msgstr "Your browser is outdated for 8 years!" + +#: html/user_login.php:39 html/user_login.php:47 +msgid "" +"Pour une meilleure expérience web, prenez le temps de mettre votre " +"navigateur à jour" +msgstr "For a better web experience, take the time to update your brower" + +#: html/user_login.php:79 html/user_login.php:87 +msgid "Choississez votre dossier" +msgstr "Select your folder" + +#: include/client_card.inc.php:70 include/adm_card.inc.php:70 +#: include/supplier_card.inc.php:70 +msgid "Détail de la fiche" +msgstr "Details of the card" + +#: include/client_card.inc.php:71 include/adm_card.inc.php:71 +#: include/supplier_card.inc.php:71 +msgid "Suivi" +msgstr "Follow up" + +#: include/client_card.inc.php:71 +msgid "Suivi client, devis, bon de commande, courrier" +msgstr "Follow up, mail, invoice, ordering" + +#: include/client_card.inc.php:72 include/template/detail-action.php:51 +#: include/adm_card.inc.php:72 include/supplier_card.inc.php:72 +msgid "Contact" +msgstr "Contact" + +#: include/client_card.inc.php:72 +msgid "Liste de contacts de ce client" +msgstr "Constact list of this customer" + +#: include/client_card.inc.php:73 include/template/form_ledger_fin.php:17 +#: include/adm_card.inc.php:73 include/supplier_card.inc.php:73 +msgid "Opérations" +msgstr "Entries" + +#: include/client_card.inc.php:73 include/adm_card.inc.php:73 +#: include/supplier_card.inc.php:73 +msgid "Toutes les opérations" +msgstr "All entries" + +#: include/client_card.inc.php:74 include/adm_card.inc.php:74 +#: include/supplier_card.inc.php:74 +msgid "Retour liste" +msgstr "Return to list" + +#: include/client_card.inc.php:74 +msgid "Retour à la liste des clients" +msgstr "Return to the customers list" + +#: include/client_card.inc.php:116 include/adm_card.inc.php:116 +#: include/supplier_card.inc.php:116 +msgid "Vous devez aller dans fiche et créer une catégorie pour les contacts" +msgstr "You have to create first a category of card in the card menu" + +#: include/client_card.inc.php:122 include/class_acc_ledger_sold.php:827 +#: include/class_acc_ledger_sold.php:834 +#: include/class_acc_ledger_purchase.php:681 +#: include/class_acc_ledger_purchase.php:688 +#: include/class_acc_ledger_purchase.php:581 +#: include/class_acc_ledger_purchase.php:588 +#: include/class_acc_ledger_sold.php:759 include/class_acc_ledger_sold.php:766 +#: include/client.inc.php:112 include/adm_card.inc.php:122 +#: include/adm.inc.php:118 include/class_acc_ledger_sold.php:761 +#: include/class_acc_ledger_sold.php:768 include/client.inc.php:117 +#: include/supplier_card.inc.php:122 include/supplier.inc.php:117 +#: include/class_acc_ledger_purchase.php:578 +#: include/class_acc_ledger_purchase.php:585 +#: include/class_acc_ledger_sold.php:762 include/class_acc_ledger_sold.php:769 +#: include/class_acc_ledger_sold.php:764 include/class_acc_ledger_sold.php:771 +#: include/class_acc_ledger_fin.php:172 include/class_acc_ledger.php:1240 +msgid "Créer une nouvelle fiche" +msgstr "Add a new card" + +#: include/class_acc_ledger.php:500 include/class_acc_ledger.php:1224 +#: include/class_acc_ledger.php:1383 include/template/form_ledger_fin.php:22 +#: include/class_acc_ledger.php:1150 include/class_acc_ledger.php:1309 +#: include/class_acc_ledger.php:499 include/class_acc_ledger.php:1149 +#: include/class_acc_ledger.php:1308 include/class_anc_account.php:260 +#: include/class_anc_listing.php:76 include/template/forecast-detail.php:11 +msgid "Montant" +msgstr "Amount" + +#: include/class_acc_ledger.php:501 include/class_acc_ledger.php:500 +msgid "PJ" +msgstr "Receipt" + +#: include/class_acc_ledger.php:502 include/class_acc_ledger.php:501 +msgid "Ech" +msgstr "Date limit" + +#: include/class_acc_ledger.php:595 include/class_acc_ledger.php:594 +msgid "Aucun enregistrement trouvé" +msgstr "No record found" + +#: include/class_acc_ledger.php:613 include/class_acc_ledger.php:612 +msgid "Payé" +msgstr "Paid" + +#: include/class_acc_ledger.php:615 include/class_acc_ledger.php:614 +msgid "Op. Concernée" +msgstr "Concerned entry" + +#: include/class_acc_ledger.php:617 include/class_acc_ledger.php:616 +msgid "Action" +msgstr "Action" + +#: include/class_acc_ledger.php:1074 include/class_acc_ledger.php:1000 +#: include/class_acc_ledger.php:999 +msgid "Parametres journaux non trouves" +msgstr "Ledger parameters not found" + +#: include/class_acc_ledger.php:1218 include/class_acc_ledger.php:1144 +#: include/class_acc_ledger.php:1143 +msgid "PJ Num" +msgstr "Receipt #" + +#: include/class_acc_ledger.php:1222 include/class_acc_ledger.php:1148 +#: include/class_acc_ledger.php:1147 +msgid "Quick Code ou" +msgstr "Quick code or" + +#: include/class_acc_ledger.php:1223 include/class_acc_ledger.php:1381 +#: include/class_acc_ledger.php:1149 include/class_acc_ledger.php:1307 +#: include/class_acc_ledger.php:1148 include/class_acc_ledger.php:1306 +#: include/impress.inc.php:33 +msgid "Poste" +msgstr "Account. Item" + +#: include/class_acc_ledger.php:1225 include/class_acc_ledger.php:1384 +#: include/quick_writing.inc.php:112 include/quick_writing.inc.php:116 +#: include/class_acc_ledger.php:1151 include/class_acc_ledger.php:1310 +#: include/class_acc_ledger.php:1150 include/class_acc_ledger.php:1309 +#: include/class_anticipation.php:304 +msgid "Débit" +msgstr "Debit" + +#: include/class_acc_ledger.php:1361 include/class_acc_ledger.php:1287 +#: include/class_acc_ledger.php:1286 +msgid "Pièce" +msgstr "Receipt" + +#: include/class_acc_ledger.php:1382 include/class_acc_ledger.php:1308 +#: include/class_acc_ledger.php:1307 include/payment_middle.inc.php:87 +#: include/template/forecast-detail.php:10 +msgid "Libellé" +msgstr "Label" + +#: include/class_acc_ledger.php:1526 include/class_acc_ledger.php:1452 +#: include/class_acc_ledger.php:1451 +msgid "Pas dans la periode active" +msgstr "Not in the active period" + +#: include/class_acc_ledger.php:1545 include/class_acc_ledger.php:1471 +#: include/class_acc_ledger.php:1470 +msgid "Vous utilisez le mode strict la dernière operation est la date du " +msgstr "You're using the strict mod and the last entry is on" + +#: include/class_acc_ledger.php:1546 include/class_acc_ledger.php:1472 +#: include/class_acc_ledger.php:1471 +msgid "vous ne pouvez pas encoder à une date antérieure" +msgstr "You cannot record to an ealier date" + +#: include/class_acc_ledger.php:1578 include/class_acc_ledger.php:1504 +#: include/class_acc_ledger.php:1503 +msgid "Le poste" +msgstr "The accounting item" + +#: include/class_acc_ledger.php:1578 include/class_acc_ledger.php:1504 +#: include/class_acc_ledger.php:1503 +msgid "n'est pas dans ce journal" +msgstr "doesn't belong to this ledger" + +#: include/class_acc_ledger.php:1580 include/class_acc_ledger.php:1506 +#: include/class_acc_ledger.php:1505 +msgid "Poste invalide" +msgstr "Invalid Accounting item" + +#: include/class_acc_ledger.php:1582 include/class_acc_ledger.php:1508 +#: include/class_acc_ledger.php:1507 +msgid "Poste Inexistant" +msgstr "Inexistant accouting item" + +#: include/class_acc_ledger.php:1592 include/class_acc_ledger.php:1518 +#: include/class_acc_ledger.php:1515 +msgid "Balance incorrecte " +msgstr "wrong balance" + +#: include/class_acc_ledger.php:2254 include/class_acc_ledger.php:2180 +#: include/class_acc_ledger.php:2187 +msgid "Afficher recherche" +msgstr "Display search" + +#: include/compta_ach.inc.php:51 include/compta_ach.inc.php:165 +#: include/compta_ach.inc.php:55 include/compta_ach.inc.php:169 +#: include/compta_ach.inc.php:56 include/compta_ach.inc.php:167 +msgid "Nouvelle dépense" +msgstr "New expense" + +#: include/compta_ach.inc.php:51 include/compta_ach.inc.php:55 +#: include/compta_ach.inc.php:56 +msgid "Nouvel achat ou dépense" +msgstr "New purchase" + +#: include/compta_ach.inc.php:52 include/compta_ach.inc.php:56 +#: include/compta_ach.inc.php:57 +msgid "Liste achat" +msgstr "List purchase" + +#: include/compta_ach.inc.php:52 include/compta_ach.inc.php:56 +#: include/compta_ach.inc.php:57 +msgid "Liste des achats" +msgstr "List of purchase" + +#: include/compta_ach.inc.php:53 include/compta_ach.inc.php:57 +#: include/compta_ach.inc.php:58 +msgid "Liste dépenses non payées" +msgstr "List of unpaid purchase" + +#: include/compta_ach.inc.php:53 include/compta_ven.inc.php:52 +#: include/compta_ach.inc.php:57 include/compta_ven.inc.php:56 +#: include/compta_ach.inc.php:58 include/compta_ven.inc.php:57 +msgid "Liste des ventes non payées" +msgstr "List of unpaid sales" + +#: include/compta_ach.inc.php:55 include/compta_ach.inc.php:59 +msgid "Solde des fournisseurs" +msgstr "Supplier account" + +#: include/compta_ach.inc.php:122 include/compta_ven.inc.php:125 +#: include/compta_ach.inc.php:126 include/compta_ven.inc.php:129 +#: include/compta_ven.inc.php:124 +msgid "Enregistrement" +msgstr "Record" + +#: include/compta_ach.inc.php:123 include/compta_fin.inc.php:114 +#: include/compta_ven.inc.php:126 include/compta_ach.inc.php:127 +#: include/compta_fin.inc.php:118 include/compta_ven.inc.php:130 +#: include/compta_ven.inc.php:125 +msgid "Corriger" +msgstr "Correct" + +#: include/compta_ach.inc.php:158 include/compta_ven.inc.php:167 +#: include/compta_ach.inc.php:162 include/compta_ven.inc.php:171 +#: include/compta_ven.inc.php:166 include/anc_od.inc.php:114 +msgid "Opération sauvée" +msgstr "Entry saved" + +#: include/compta_ach.inc.php:162 include/compta_ven.inc.php:172 +#: include/quick_writing.inc.php:272 include/compta_ach.inc.php:166 +#: include/compta_ven.inc.php:176 include/quick_writing.inc.php:276 +#: include/compta_ven.inc.php:171 +msgid "Attention numéro pièce existante, elle a du être adaptée" +msgstr "Caution, the receipt number already exists and has been changed" + +#: include/compta_ach.inc.php:347 include/compta_ven.inc.php:334 +#: include/compta_ven.inc.php:393 include/compta_ach.inc.php:351 +#: include/compta_ven.inc.php:338 include/compta_ven.inc.php:397 +#: include/class_acc_ledger_purchase.php:657 +#: include/class_acc_ledger_purchase.php:1263 +#: include/class_acc_ledger_sold.php:499 include/class_acc_ledger_sold.php:811 +#: include/class_acc_ledger_purchase.php:1163 +#: include/class_acc_ledger_sold.php:743 include/compta_ven.inc.php:333 +#: include/compta_ven.inc.php:392 include/class_acc_ledger_purchase.php:1177 +#: include/class_acc_ledger_sold.php:745 +#: include/class_acc_ledger_purchase.php:1174 +#: include/class_acc_ledger_sold.php:746 include/class_acc_ledger_sold.php:748 +#: include/compta_ach.inc.php:293 include/compta_ach.inc.php:349 +#: include/compta_ven.inc.php:323 include/compta_ven.inc.php:382 +msgid "Mise à jour paiement" +msgstr "Update payment" + +#: include/compta_fin.inc.php:51 include/compta_fin.inc.php:136 +#: include/compta_fin.inc.php:55 include/compta_fin.inc.php:140 +msgid "Nouvel extrait" +msgstr "new entry" + +#: include/compta_fin.inc.php:51 include/compta_fin.inc.php:55 +msgid "Encodage d'un nouvel extrait" +msgstr "Write an new entry" + +#: include/compta_fin.inc.php:52 include/compta_fin.inc.php:56 +msgid "Liste" +msgstr "List" + +#: include/compta_fin.inc.php:52 include/compta_fin.inc.php:56 +msgid "Liste opération bancaire" +msgstr "List financial entries" + +#: include/compta_fin.inc.php:53 include/compta_fin.inc.php:57 +msgid "Solde" +msgstr "Balance" + +#: include/compta_fin.inc.php:53 include/compta_fin.inc.php:57 +msgid "Solde des comptes" +msgstr "Balance of accounting system" + +#: include/compta_fin.inc.php:113 include/compta_fin.inc.php:117 +msgid "Confirmer" +msgstr "Confirmed" + +#: include/compta_fin.inc.php:135 include/compta_fin.inc.php:139 +msgid "Opération sauvée" +msgstr "Entry saved" + +#: include/compta_fin.inc.php:160 include/compta_fin.inc.php:164 +#: include/class_acc_ledger_sold.php:1094 +#: include/class_acc_ledger_purchase.php:955 +#: include/class_acc_ledger_purchase.php:855 +#: include/class_acc_ledger_sold.php:1026 +#: include/class_acc_ledger_purchase.php:869 +#: include/class_acc_ledger_sold.php:1041 +#: include/class_acc_ledger_purchase.php:866 +#: include/class_acc_ledger_sold.php:1042 +#: include/class_acc_ledger_sold.php:1044 +msgid "Ajout article" +msgstr "Add item" + +#: include/compta_ven.inc.php:50 include/compta_ven.inc.php:201 +#: include/compta_ven.inc.php:54 include/compta_ven.inc.php:205 +#: include/compta_ven.inc.php:200 include/compta_ven.inc.php:55 +#: include/compta_ven.inc.php:190 +msgid "Nouvelle vente" +msgstr "New sale" + +#: include/compta_ven.inc.php:51 include/compta_ven.inc.php:55 +#: include/compta_ven.inc.php:56 +msgid "Liste ventes" +msgstr "List Sales" + +#: include/compta_ven.inc.php:51 include/compta_ven.inc.php:55 +#: include/compta_ven.inc.php:56 +msgid "Liste des ventes" +msgstr "List sales" + +#: include/compta_ven.inc.php:52 include/compta_ven.inc.php:56 +#: include/compta_ven.inc.php:57 +msgid "Liste vente non payées" +msgstr "List unpaid sales" + +#: include/compta_ven.inc.php:54 include/compta_ven.inc.php:58 +msgid "Clients" +msgstr "Customers" + +#: include/compta_ven.inc.php:54 include/compta_ven.inc.php:58 +msgid "Solde des clients" +msgstr "Customer balance" + +#: include/compta_ven.inc.php:122 include/compta_ven.inc.php:126 +#: include/compta_ven.inc.php:121 +msgid "Sauvez cette opération comme modèle ?" +msgstr "Save this entry as template" + +#: include/quick_writing.inc.php:62 include/quick_writing.inc.php:66 +msgid "Encoder une Operation" +msgstr "Write an entry" + +#: include/quick_writing.inc.php:63 include/quick_writing.inc.php:67 +msgid "Encoder une operation dans ce journal" +msgstr "Write an entry in this ledger" + +#: include/quick_writing.inc.php:64 include/quick_writing.inc.php:68 +msgid "Voir Operation" +msgstr "See entries" + +#: include/quick_writing.inc.php:65 include/quick_writing.inc.php:69 +msgid "Voir les operations de ce journal" +msgstr "See entries of this ledger" + +#: include/quick_writing.inc.php:67 include/quick_writing.inc.php:71 +msgid "Autre journal" +msgstr "other ledger" + +#: include/quick_writing.inc.php:68 include/quick_writing.inc.php:72 +msgid "Choisir un autre journal" +msgstr "Choose another ledger" + +#: include/quick_writing.inc.php:93 include/quick_writing.inc.php:97 +msgid "Utilisez une operation " +msgstr "Use an operation" + +#: include/quick_writing.inc.php:108 include/quick_writing.inc.php:112 +msgid "Ajout d'une ligne" +msgstr "Add a row" + +#: include/quick_writing.inc.php:110 include/fiche.inc.php:114 +#: include/quick_writing.inc.php:114 +msgid "Sauvez" +msgstr "Save" + +#: include/quick_writing.inc.php:113 include/quick_writing.inc.php:117 +#: include/class_anticipation.php:305 +msgid "Crédit" +msgstr "Credit" + +#: include/quick_writing.inc.php:114 include/quick_writing.inc.php:118 +msgid "Difference" +msgstr "Difference" + +#: include/quick_writing.inc.php:140 include/quick_writing.inc.php:144 +msgid "Choix du journal" +msgstr "Ledgers" + +#: include/quick_writing.inc.php:146 include/quick_writing.inc.php:150 +msgid "" +"L'acces a ce journal est interdit, \n" +" contactez votre responsable" +msgstr "" +"You are not allowed to access this ledger,\n" +" contact your administrator" + +#: include/quick_writing.inc.php:150 include/quick_writing.inc.php:154 +#: include/template/form_ledger_detail.php:15 +#: include/class_acc_ledger_sold.php:549 +#: include/class_acc_ledger_purchase.php:1017 +#: include/class_acc_ledger_purchase.php:917 +#: include/class_acc_ledger_sold.php:481 include/import_inc.php:139 +#: include/import_inc.php:402 include/class_acc_ledger_purchase.php:931 +#: include/class_acc_ledger_sold.php:483 +#: include/class_acc_ledger_purchase.php:928 +#: include/class_acc_ledger_sold.php:484 include/class_acc_ledger_sold.php:486 +msgid "Journal" +msgstr "Ledger" + +#: include/quick_writing.inc.php:201 include/quick_writing.inc.php:205 +msgid "Vous ne pouvez pas accèder à ce journal, contactez votre responsable" +msgstr "You are not allowed to access this ledger, contact your administrator" + +#: include/quick_writing.inc.php:211 include/quick_writing.inc.php:215 +msgid "Désolé mais cette periode est fermee pour ce journal" +msgstr "Sorry but this period is closed" + +#: include/quick_writing.inc.php:275 include/quick_writing.inc.php:279 +msgid "Autre opération dans ce journal" +msgstr "Other entry in this ledger" + +#: html/ajax_card.php:158 +msgid "Fiche contenant " +msgstr "Card containing" + +#: html/ajax_card.php:160 html/ajax_card.php:164 +#: include/class_acc_ledger_purchase.php:616 html/ajax_card.php:175 +#: include/class_acc_payment.php:250 include/user_menu.php:255 +#: include/user_menu.php:476 html/ajax_card.php:173 include/user_menu.php:475 +#: html/ajax_poste.php:75 html/search_ca.php:48 html/search_ca.php:56 +#: include/class_anc_balance_double.php:280 include/quick_writing.inc.php:177 +msgid "Recherche" +msgstr "Search" + +#: include/class_fiche_def.php:190 +msgid "Vous devez choisir une catgorie" +msgstr "You must use a category" + +#: include/class_fiche_def.php:409 include/class_fiche_def.php:413 +msgid "Label" +msgstr "Label" + +#: include/class_fiche_def.php:418 include/class_fiche_def.php:422 +msgid "Poste Comptable de base" +msgstr "Accounting item of base" + +#: include/class_fiche_def.php:424 include/class_fiche_def.php:428 +msgid "Chaque fiche aura automatiquement son propre poste comptable : " +msgstr "Each card will automatically have his own accounting item" + +#: include/compta_ach.inc.php:45 include/compta_fin.inc.php:47 +#: include/compta_ven.inc.php:43 include/quick_writing.inc.php:54 +#: html/user_advanced.php:57 include/impress_poste.inc.php:51 +#: include/report.inc.php:53 include/import_inc.php:48 html/recherche.php:45 +#: include/action.inc.php:38 include/adm.inc.php:50 include/client.inc.php:49 +#: include/compta_ven.inc.php:45 include/forecast.inc.php:229 +#: include/forecast.inc.php:302 include/supplier.inc.php:49 +#: include/user_action_gl.php:44 +msgid "Recherche de fiche" +msgstr "Search Card" + +#: include/fiche_def.inc.php:63 include/fiche_def.inc.php:64 +msgid "Voulez-vous modifier ?" +msgstr "Do you want to modify" + +#: include/fiche_def.inc.php:65 include/fiche_def.inc.php:66 +msgid "Attention, ne changer pas la signification de ce poste." +msgstr "Warning, do not change the meaning of this accounting item" + +#: include/fiche_def.inc.php:66 include/fiche_def.inc.php:67 +msgid "par exemple ne pas changer Client par fournisseur" +msgstr "For example, do not change customer by supplier" + +#: include/fiche_def.inc.php:67 include/fiche_def.inc.php:68 +msgid "sinon le programme fonctionnera mal, " +msgstr "Otherwise the programm may have misfunctions" + +#: include/fiche.inc.php:106 include/forecast.inc.php:239 +#: include/forecast.inc.php:254 include/forecast.inc.php:274 +#: include/forecast.inc.php:312 +msgid "Sauver" +msgstr "Save" + +#: include/fiche.inc.php:113 +msgid "Ajoutez cet élément" +msgstr "Add this item" + +#: include/fiche.inc.php:115 +msgid "Effacer cette catégorie" +msgstr "Remove this categorie" + +#: include/fiche.inc.php:115 +msgid "Vous confirmez ?" +msgstr "Do you confirm ?" + +#: include/fiche.inc.php:118 +msgid "Enleve les éléments cochés" +msgstr "Remove the checked items" + +#: include/fiche.inc.php:121 +msgid "" +"Attention : il n'y aura pas de demande de confirmation pour enlever les \n" +"attributs sélectionnés. Il ne sera pas possible de revenir en arrière" +msgstr "" + +#: include/fiche.inc.php:215 include/template/security_list_action.php:4 +msgid "Pas d'accès" +msgstr "No access" + +#: include/param_jrn_add.inc.php:61 include/param_jrn_detail.inc.php:77 +msgid "Un paramètre manque" +msgstr "A parameter is missing" + +#: include/param_jrn_add.inc.php:67 +msgid "Un journal de ce nom existe déjà" +msgstr "This name is already used" + +#: include/param_jrn_detail.inc.php:57 +msgid "Journal inexistant" +msgstr "No existent ledger" + +#: include/param_jrn_detail.inc.php:68 +msgid "" +"Impossible d\\'effacer ce journal.\n" +" Il est utilisé\n" +msgstr "" +"It is not possible to remove this ledger.\n" +"It is still in use\n" + +#: include/quick_writing.inc.php:99 +msgid "Utilisez une operation" +msgstr "Use an entry" + +#: include/template/account_result.php:2 include/template/card_result.php:2 +msgid "Résultats" +msgstr "Results" + +#: include/template/account_result.php:21 +msgid "Nombre d'enregistrements" +msgstr "Number of records" + +#: include/template/account_search.php:1 +msgid "Partie du poste comptable ou du libellé" +msgstr "Part of the name or part of the accounting item" + +#: include/template/param_jrn.php:4 +msgid "Nom journal" +msgstr "Name of the ledger" + +#: include/template/param_jrn.php:8 +msgid "Postes utilisables journal (débit/crédit)" +msgstr "Allowed accouting item (debit/credit)" + +#: include/template/param_jrn.php:22 +msgid "Type de journal" +msgstr "Type of ledgers" + +#: include/template/param_jrn.php:28 +msgid "Préfixe code interne" +msgstr "Prefix for internal code" + +#: include/template/param_jrn.php:32 +msgid "Préfixe pièce justificative" +msgstr "" + +#: include/template/param_jrn.php:36 +msgid "Le préfixe des pièces peut être différent pour chaque journal" +msgstr "" + +#: include/template/param_jrn.php:40 +msgid "N° pièce justificative" +msgstr "" + +#: include/template/param_jrn.php:44 +msgid "La numérotation est propre à chaque journal" +msgstr "" + +#: include/template/param_jrn.php:53 +msgid "Fiches Débit" +msgstr "Card at the debit" + +#: include/template/param_jrn.php:54 +msgid "Fiches Crédit" +msgstr "Card at the credit" + +#: include/class_fiche_def.php:190 include/class_fiche_def.php:191 +msgid "Vous devez choisir une categorie" +msgstr "You must select a category" + +#: include/action.common.inc.php:90 +msgid "Action sauvée" +msgstr "Action saved" + +#: include/action.common.inc.php:121 include/action.common.inc.php:206 +#: include/class_acc_ledger_sold.php:1095 +#: include/class_acc_ledger_purchase.php:960 +#: include/class_acc_ledger_purchase.php:860 +#: include/class_acc_ledger_sold.php:1027 include/action.common.inc.php:204 +#: include/class_acc_ledger_purchase.php:874 +#: include/class_acc_ledger_sold.php:1042 +#: include/class_acc_ledger_purchase.php:871 +#: include/class_acc_ledger_sold.php:1043 +#: include/class_acc_ledger_sold.php:1045 +msgid "Enregistrer" +msgstr "Submit" + +#: include/action.common.inc.php:122 include/action.common.inc.php:123 +#: include/action.common.inc.php:151 include/action.common.inc.php:207 +msgid "Génère le document" +msgstr "Generate the document" + +#: include/action.common.inc.php:152 include/action.common.inc.php:150 +msgid "Ajoute une action à celle-ci" +msgstr "Add an action here" + +#: include/action.common.inc.php:153 include/action.common.inc.php:151 +msgid "Efface cette action" +msgstr "Remobe this action" + +#: include/action.common.inc.php:153 include/action.common.inc.php:151 +msgid "Vous confirmez l'effacement" +msgstr "You confirm the removal" + +#: include/action.common.inc.php:172 include/action.common.inc.php:170 +msgid "Action " +msgstr "Action" + +#: include/action.common.inc.php:172 include/action.common.inc.php:170 +msgid " effacée" +msgstr " removed" + +#: include/action.common.inc.php:265 include/action.common.inc.php:266 +#, php-format +msgid "Titre ou référence" +msgstr "Title or reference" + +#: include/action.common.inc.php:272 +msgid "uniquement mes actions:" +msgstr "Only mes action" + +#: include/action.common.inc.php:279 include/action.common.inc.php:276 +msgid "recherche" +msgstr "Search" + +#: include/action.common.inc.php:290 include/action.common.inc.php:289 +msgid "Ajout Action" +msgstr "Add action" + +#: include/class_fiche.php:305 include/class_fiche.php:345 +msgid "Rappel: Poste créé automatiquement à partir de " +msgstr "Warning : accounting item create automatically from " + +#: include/class_fiche.php:312 include/class_fiche.php:352 +msgid "Rappel: Poste par défaut sera " +msgstr "Warning : by default, the accounting item will be " + +#: include/report.inc.php:117 +msgid "Définition" +msgstr "Definition" + +#: include/report.inc.php:125 include/report.inc.php:140 +#: include/report.inc.php:162 +msgid "Les lignes vides seront effacées" +msgstr "The empty rows will be removed" + +#: include/report.inc.php:136 +msgid "Importer ce rapport" +msgstr "Import this report" + +#: include/report.inc.php:153 +msgid "Mise a jour" +msgstr "Update" + +#: include/report.inc.php:154 +msgid "Effacement" +msgstr "Remove" + +#: include/template/category_of_card.php:3 html/parametre.php:138 +msgid "Catégorie de fiche" +msgstr "Card Category" + +#: include/template/category_of_card.php:7 +#: include/template/fiche_def_input.php:7 +msgid "Classe de base" +msgstr "Base accounting item" + +#: include/template/category_of_card.php:8 +#: include/template/fiche_def_input.php:8 +msgid "Cherche" +msgstr "Search" + +#: include/template/category_of_card.php:12 +#: include/template/fiche_def_input.php:12 +#: include/template/category_of_card.php:14 +msgid "Création automatique du poste comptable" +msgstr "Automatic creation of the accounting item" + +#: include/template/category_of_card.php:16 +#: include/template/category_of_card.php:18 +msgid "" +"Si vous utilisez la création automatique de poste, chaque nouvelle fiche de " +"cette catégorie aura son propre poste comptable. Ce poste comptable sera la " +"classe de base augmenté de 1." +msgstr "" +"If you're using the automatic creation of accounting item, the new card of " +"this category will have his own accounting item. This accounting item will " +"be the base increase by 1." + +#: include/template/category_of_card.php:19 +msgid "Si vous n" +msgstr "if you " + +#: include/template/detail-action.php:3 +msgid "Informations générales" +msgstr "General Information" + +#: include/template/detail-action.php:24 +msgid "Heure" +msgstr "Hour" + +#: include/template/detail-action.php:33 +msgid "Reference" +msgstr "Reference" + +#: include/template/detail-action.php:42 +msgid "Destinataire" +msgstr "Recipient" + +#: include/template/detail-action.php:69 +msgid "Concerne" +msgstr "concerning" + +#: include/template/detail-action.php:78 +msgid "Type" +msgstr "Type" + +#: include/template/detail-action.php:88 include/template/dashboard.php:3 +msgid "Calendrier" +msgstr "Calendar" + +#: include/template/detail-action.php:97 +msgid "Etat" +msgstr "State" + +#: include/template/detail-action.php:107 +msgid "Priorité" +msgstr "Priority" + +#: include/template/detail-action.php:117 +msgid "Affecté" +msgstr "Responsible" + +#: include/template/detail-action.php:137 +#: include/template/form_ledger_fin.php:21 +msgid "Commentaire" +msgstr "Comment" + +#: include/template/detail-action.php:145 +msgid "Détail des articles" +msgstr "Item details" + +#: include/template/detail-action.php:158 +msgid "prix unitaire" +msgstr "Price unit" + +#: include/template/detail-action.php:159 +#: include/template/form_ledger_detail.php:29 +#: include/class_acc_ledger_sold.php:566 +#: include/class_acc_ledger_purchase.php:1036 +#: include/class_acc_ledger_purchase.php:1040 +#: include/class_acc_ledger_purchase.php:936 +#: include/class_acc_ledger_purchase.php:940 +#: include/class_acc_ledger_sold.php:498 +#: include/class_acc_ledger_purchase.php:950 +#: include/class_acc_ledger_purchase.php:954 +#: include/class_acc_ledger_sold.php:500 +#: include/class_acc_ledger_purchase.php:947 +#: include/class_acc_ledger_purchase.php:951 +#: include/class_acc_ledger_sold.php:501 include/class_acc_ledger_sold.php:503 +msgid "quantité" +msgstr "quantity" + +#: include/template/detail-action.php:160 +msgid "Code TVA" +msgstr "VAT Code" + +#: include/template/detail-action.php:161 +#: include/class_acc_ledger_sold.php:569 +#: include/class_acc_ledger_purchase.php:1037 +#: include/class_acc_ledger_purchase.php:937 +#: include/class_acc_ledger_sold.php:501 +#: include/class_acc_ledger_purchase.php:951 +#: include/class_acc_ledger_sold.php:503 +#: include/class_acc_ledger_purchase.php:948 +#: include/class_acc_ledger_sold.php:504 include/class_acc_ledger_sold.php:506 +msgid "Montant TVA" +msgstr "Amount VAT " + +#: include/template/detail-action.php:162 +msgid "Montant TVAC" +msgstr "Amount VAT included" + +#: include/template/detail-action.php:188 +msgid "Montrer les détails" +msgstr "Show details" + +#: include/template/detail-action.php:189 +msgid "Cacher les détails" +msgstr "Hide details" + +#: include/template/detail-action.php:195 +#: include/template/form_ledger_detail.php:57 +#: include/class_acc_ledger_purchase.php:954 +#: include/class_acc_ledger_purchase.php:854 +#: include/class_acc_ledger_purchase.php:868 +#: include/template/form_ledger_detail.php:63 +#: include/class_acc_ledger_purchase.php:865 +msgid "Actualiser" +msgstr "Refresh" + +#: include/template/detail-action.php:228 +#: include/template/detail-action.php:229 +#, php-format +msgid "Voulez-vous effacer le document" +msgstr "Would you remove this document" + +#: include/template/detail-action.php:247 +#: include/template/detail-action.php:248 +msgid "Je ne peux pas ajouter de fichier" +msgstr "I can't add this file" + +#: include/template/form_ledger_detail.php:13 +#: include/class_acc_ledger_sold.php:546 +#: include/class_acc_ledger_purchase.php:1014 +#: include/class_acc_ledger_purchase.php:914 +#: include/class_acc_ledger_sold.php:478 +#: include/class_acc_ledger_purchase.php:928 +#: include/class_acc_ledger_sold.php:480 +#: include/class_acc_ledger_purchase.php:925 +#: include/class_acc_ledger_sold.php:481 include/class_acc_ledger_sold.php:483 +msgid "Echeance" +msgstr "Limit date" + +#: include/template/form_ledger_detail.php:18 +msgid "Num Pj" +msgstr "Receipt #" + +#: include/template/form_ledger_detail.php:27 +#: include/class_acc_ledger_sold.php:563 +#: include/class_acc_ledger_purchase.php:1031 +#: include/class_acc_ledger_purchase.php:931 +#: include/class_acc_ledger_sold.php:495 +#: include/class_acc_ledger_purchase.php:945 +#: include/class_acc_ledger_sold.php:497 +#: include/class_acc_ledger_purchase.php:942 +#: include/class_acc_ledger_sold.php:498 include/class_acc_ledger_sold.php:500 +msgid "Dénomination" +msgstr "Name" + +#: include/template/form_ledger_detail.php:28 +msgid "prix/unité htva" +msgstr "price/unit without vat" + +#: include/template/form_ledger_detail.php:32 +#: include/class_acc_ledger_sold.php:565 include/class_acc_ledger_sold.php:497 +#: include/class_acc_ledger_sold.php:499 include/class_acc_ledger_sold.php:500 +#: include/class_acc_ledger_sold.php:502 +msgid "tva" +msgstr "vat" + +#: include/template/form_ledger_detail.php:33 +msgid "tot.tva" +msgstr "tot. vat" + +#: include/template/form_ledger_detail.php:74 +#: include/class_acc_ledger_purchase.php:1138 +#: include/class_acc_ledger_purchase.php:1038 +#: include/class_acc_ledger_purchase.php:1052 +#: include/template/form_ledger_detail.php:30 +#: include/template/form_ledger_detail.php:80 +#: include/class_acc_ledger_purchase.php:1049 +msgid "Total HTVA" +msgstr "Total VAT excluded" + +#: include/template/form_ledger_detail.php:75 +#: include/class_acc_ledger_purchase.php:1145 +#: include/class_acc_ledger_purchase.php:1045 +#: include/class_acc_ledger_purchase.php:1059 +#: include/template/form_ledger_detail.php:81 +#: include/class_acc_ledger_purchase.php:1056 +msgid "Total TVA" +msgstr "Total VAT" + +#: include/template/form_ledger_detail.php:76 +#: include/class_acc_ledger_purchase.php:1148 +#: include/class_acc_ledger_purchase.php:1048 +#: include/class_acc_ledger_purchase.php:1062 +#: include/template/form_ledger_detail.php:82 +#: include/class_acc_ledger_purchase.php:1059 +msgid "Total TVAC" +msgstr "Total VAT included" + +#: include/template/form_ledger_detail.php:78 +#: include/class_acc_ledger_purchase.php:941 +#: include/class_acc_ledger_purchase.php:955 +#: include/template/form_ledger_detail.php:84 +#: include/class_acc_ledger_purchase.php:952 +msgid "Total" +msgstr "Total" + +#: include/template/form_ledger_fin.php:11 +msgid "Extrait de compte" +msgstr "Bank receipt" + +#: include/template/form_ledger_fin.php:12 +msgid "Numéro extrait" +msgstr "Number of Bank receipt" + +#: include/template/form_ledger_fin.php:13 +msgid "Solde début" +msgstr "Start balance" + +#: include/template/form_ledger_fin.php:14 +msgid "Solde Fin" +msgstr "End balance " + +#: include/template/form_ledger_fin.php:23 +msgid "Op. Concernée(s)" +msgstr "Concerned entry" + +#: include/template/ledger_search.php:1 +msgid "Critères de Recherche" +msgstr "Search Criteria" + +#: include/template/ledger_search.php:5 +msgid "Dans le journal" +msgstr "In the ledger" + +#: include/template/ledger_search.php:17 include/template/ledger_search.php:35 +msgid "et" +msgstr "and" + +#: include/template/ledger_search.php:23 +msgid "Et contenant dans la description, pièce justificative ou n° interne" +msgstr "And having in its description, receipt or internal number" + +#: include/template/ledger_search.php:32 +msgid "Et compris entre les montants" +msgstr "And between the amounts" + +#: include/template/ledger_search.php:40 +msgid "Et utilisant la fiche (quick code)" +msgstr "And using the card (quick code)" + +#: include/template/ledger_search.php:48 +msgid "Et utilisant le poste comptable" +msgstr "And using the accounting item" + +#: include/template/ledger_search.php:58 +msgid "Et uniquement non payées" +msgstr "And only not paid" + +#: include/template/ledger_search.php:14 +msgid "Et Compris entre les date" +msgstr "And between the date" + +#: include/template/security_list_action.php:5 html/ajax_extension.php:102 +#: html/ajax_extension.php:159 include/template/extension-sec.php:9 +#: html/ajax_extension.php:96 html/ajax_extension.php:153 +msgid "Accès" +msgstr "Access" + +#: include/template/security_list_action.php:65 +#: include/template/security_list_action.php:59 +#: include/template/security_list_action.php:58 +msgid "Comptabilité Analytique" +msgstr "Cost Accounting" + +#: html/access.php:102 html/access.php:103 html/access.php:149 +msgid "Pense-Bête" +msgstr "Todo List" + +#: include/class_acc_ledger_sold.php:542 include/class_acc_ledger_sold.php:854 +#: include/class_acc_ledger_sold.php:474 include/class_acc_ledger_sold.php:786 +#: include/class_acc_ledger_sold.php:476 include/class_acc_ledger_sold.php:788 +#: include/class_acc_ledger_sold.php:477 include/class_acc_ledger_sold.php:789 +#: include/class_acc_ledger_sold.php:479 include/class_acc_ledger_sold.php:791 +msgid "En-tête facture client" +msgstr "Header invoice customer" + +#: include/class_acc_ledger_sold.php:547 +#: include/class_acc_ledger_purchase.php:1015 +#: include/class_acc_ledger_purchase.php:915 +#: include/class_acc_ledger_sold.php:479 +#: include/class_acc_ledger_purchase.php:929 +#: include/class_acc_ledger_sold.php:481 +#: include/class_acc_ledger_purchase.php:926 +#: include/class_acc_ledger_sold.php:482 include/class_acc_ledger_sold.php:484 +msgid "Période Comptable" +msgstr "Accounting Periode" + +#: include/class_acc_ledger_sold.php:559 include/class_acc_ledger_sold.php:984 +#: include/class_acc_ledger_sold.php:491 include/class_acc_ledger_sold.php:916 +#: include/class_acc_ledger_sold.php:493 include/class_acc_ledger_sold.php:918 +#: include/class_acc_ledger_sold.php:494 include/class_acc_ledger_sold.php:919 +#: include/class_acc_ledger_sold.php:496 include/class_acc_ledger_sold.php:921 +msgid "Détail articles vendus" +msgstr "Detail sold items" + +#: include/class_acc_ledger_sold.php:562 include/class_acc_ledger_sold.php:494 +#: include/class_acc_ledger_sold.php:496 +#: include/template/extension-detail.php:16 +#: include/class_acc_ledger_sold.php:497 include/class_acc_ledger_sold.php:499 +msgid "Code" +msgstr "Code" + +#: include/class_acc_ledger_sold.php:564 +#: include/class_acc_ledger_purchase.php:1032 +#: include/class_acc_ledger_purchase.php:932 +#: include/class_acc_ledger_sold.php:496 +#: include/class_acc_ledger_purchase.php:946 +#: include/class_acc_ledger_sold.php:498 +#: include/class_acc_ledger_purchase.php:943 +#: include/class_acc_ledger_sold.php:499 include/class_acc_ledger_sold.php:501 +msgid "prix" +msgstr "price" + +#: include/class_acc_ledger_sold.php:570 +#: include/class_acc_ledger_purchase.php:1038 +#: include/class_acc_ledger_purchase.php:938 +#: include/class_acc_ledger_sold.php:502 +#: include/class_acc_ledger_purchase.php:952 +#: include/class_acc_ledger_sold.php:504 +#: include/class_acc_ledger_purchase.php:949 +#: include/class_acc_ledger_sold.php:505 include/class_acc_ledger_sold.php:507 +msgid "Montant HTVA" +msgstr "Amount without VAT" + +#: include/class_acc_ledger_sold.php:627 include/class_acc_ledger_sold.php:559 +#: include/class_acc_ledger_sold.php:561 include/class_acc_ledger_sold.php:562 +#: include/class_acc_ledger_sold.php:564 +msgid "Attention Différence" +msgstr "Warning difference" + +#: include/class_acc_ledger_sold.php:654 +#: include/class_acc_ledger_purchase.php:1131 +#: include/class_acc_ledger_purchase.php:1031 +#: include/class_acc_ledger_sold.php:586 +#: include/class_acc_ledger_purchase.php:1045 +#: include/class_acc_ledger_sold.php:588 +#: include/class_acc_ledger_purchase.php:1042 +#: include/class_acc_ledger_sold.php:589 include/class_acc_ledger_sold.php:591 +msgid "verifie CA" +msgstr "Check CA" + +#: include/class_acc_ledger_sold.php:883 +#: include/class_acc_ledger_purchase.php:741 +#: include/class_acc_ledger_purchase.php:641 +#: include/class_acc_ledger_sold.php:815 include/class_acc_ledger_sold.php:817 +#: include/class_acc_ledger_purchase.php:638 +#: include/class_acc_ledger_sold.php:818 include/class_acc_ledger_sold.php:820 +msgid "Aucune période ouverte" +msgstr "No periode opened" + +#: include/class_acc_ledger_sold.php:888 +#: include/class_acc_ledger_purchase.php:748 +#: include/class_acc_ledger_purchase.php:648 +#: include/class_acc_ledger_sold.php:820 include/class_acc_ledger_sold.php:822 +#: include/class_acc_ledger_purchase.php:645 +#: include/class_acc_ledger_sold.php:823 include/class_acc_ledger_sold.php:825 +msgid "Période comptable" +msgstr "Accounting periode" + +#: include/class_acc_ledger_sold.php:898 +#: include/class_acc_ledger_purchase.php:585 +#: include/class_acc_ledger_purchase.php:758 +#: include/class_acc_ledger_purchase.php:658 +#: include/class_acc_ledger_sold.php:830 include/class_acc_ledger_sold.php:832 +#: include/class_acc_ledger_fin.php:731 +#: include/class_acc_ledger_purchase.php:655 +#: include/class_acc_ledger_sold.php:833 include/class_acc_ledger_sold.php:835 +msgid "Pas de journal disponible" +msgstr "No available ledger" + +#: include/class_acc_ledger_sold.php:1096 +#: include/class_acc_ledger_purchase.php:961 +#: include/class_acc_ledger_purchase.php:861 +#: include/class_acc_ledger_sold.php:1028 +#: include/class_acc_ledger_purchase.php:875 +#: include/class_acc_ledger_sold.php:1043 +#: include/class_acc_ledger_purchase.php:872 +#: include/class_acc_ledger_sold.php:1044 +#: include/class_acc_ledger_sold.php:1046 +msgid "Effacer " +msgstr "Remove" + +#: include/class_acc_ledger_sold.php:1104 +#: include/class_acc_ledger_purchase.php:972 +#: include/class_acc_ledger_purchase.php:872 +#: include/class_acc_ledger_sold.php:1036 +#: include/class_acc_ledger_purchase.php:886 +#: include/class_acc_ledger_sold.php:1051 +#: include/class_acc_ledger_purchase.php:883 +#: include/class_acc_ledger_sold.php:1052 +#: include/class_acc_ledger_sold.php:1054 +msgid "Payé par" +msgstr "Paid by" + +#: html/ajax_card.php:120 html/ajax_card.php:124 +msgid "Aucune catégorie de fiche ne correspondant a" +msgstr "No card category is matching" + +#: html/ajax_card.php:158 html/ajax_card.php:162 html/ajax_card.php:173 +#: html/ajax_card.php:171 +msgid "Fiche contenant" +msgstr "Card containing" + +#: include/class_ipopup.php:94 include/class_ipopup.php:96 +#, php-format +msgid "Fermer" +msgstr "close" + +#: include/class_acc_ledger_purchase.php:60 +#: include/class_acc_ledger_sold.php:60 include/class_acc_ledger_fin.php:54 +msgid "Double Encodage" +msgstr "Double entries" + +#: include/class_acc_ledger_purchase.php:64 +msgid "Vous n'avez pas donné de fournisseur" +msgstr "You haven't give any supplier" + +#: include/class_acc_ledger_purchase.php:68 +#: include/class_acc_ledger_sold.php:68 +msgid "Date invalide" +msgstr "Invalid date" + +#: include/class_acc_ledger_purchase.php:80 +#: include/class_acc_ledger_sold.php:79 include/class_acc_ledger_fin.php:72 +#: include/class_acc_ledger_sold.php:80 +msgid "Date et periode ne correspondent pas" +msgstr "Date and period do not match" + +#: include/class_acc_ledger_purchase.php:85 +#: include/class_acc_ledger_sold.php:88 include/class_acc_ledger_fin.php:78 +#: include/class_acc_ledger_sold.php:89 +msgid "Periode fermee" +msgstr "Closed Periode" + +#: include/class_acc_ledger_purchase.php:97 +#: include/class_acc_ledger_fin.php:86 +#: include/class_acc_ledger_purchase.php:94 +msgid "Vous utilisez le mode strict la dernière operation est à la date du " +msgstr "You're using the strict the last accounting entry is on" + +#: include/class_acc_ledger_purchase.php:98 +#: include/class_acc_ledger_purchase.php:95 +msgid " vous ne pouvez pas encoder à une " +msgstr "You cannot enter an accounting entry" + +#: include/class_acc_ledger_purchase.php:108 +#: include/class_acc_ledger_purchase.php:120 +#: include/class_acc_ledger_purchase.php:136 +#: include/class_acc_ledger_purchase.php:138 +#: include/class_acc_ledger_purchase.php:144 +#: include/class_acc_ledger_purchase.php:154 +#: include/class_acc_ledger_sold.php:105 include/class_acc_ledger_sold.php:117 +#: include/class_acc_ledger_sold.php:128 include/class_acc_ledger_sold.php:130 +#: include/class_acc_ledger_sold.php:136 include/class_acc_ledger_sold.php:146 +#: include/class_acc_ledger_purchase.php:105 +#: include/class_acc_ledger_purchase.php:117 +#: include/class_acc_ledger_purchase.php:133 +#: include/class_acc_ledger_purchase.php:135 +#: include/class_acc_ledger_purchase.php:141 +#: include/class_acc_ledger_purchase.php:151 +#: include/class_acc_ledger_sold.php:106 include/class_acc_ledger_sold.php:118 +#: include/class_acc_ledger_sold.php:129 include/class_acc_ledger_sold.php:131 +#: include/class_acc_ledger_sold.php:137 include/class_acc_ledger_sold.php:147 +msgid "La fiche " +msgstr "The card" + +#: include/class_acc_ledger_purchase.php:108 +#: include/class_acc_ledger_purchase.php:144 +#: include/class_acc_ledger_sold.php:105 include/class_acc_ledger_sold.php:136 +#: include/class_acc_ledger_purchase.php:105 +#: include/class_acc_ledger_purchase.php:141 +#: include/class_acc_ledger_sold.php:106 include/class_acc_ledger_sold.php:137 +msgid "n'a pas de poste comptable" +msgstr "has no accounting entry" + +#: include/class_acc_ledger_purchase.php:113 +#: include/class_acc_ledger_purchase.php:148 +#: include/class_acc_ledger_sold.php:110 include/class_acc_ledger_sold.php:140 +#: include/class_acc_ledger_purchase.php:110 +#: include/class_acc_ledger_purchase.php:145 +#: include/class_acc_ledger_sold.php:111 include/class_acc_ledger_sold.php:141 +msgid "Pour la fiche " +msgstr "For the card" + +#: include/class_acc_ledger_purchase.php:113 +#: include/class_acc_ledger_sold.php:110 include/class_acc_ledger_sold.php:140 +#: include/class_acc_ledger_purchase.php:110 +#: include/class_acc_ledger_sold.php:111 include/class_acc_ledger_sold.php:141 +msgid " le poste comptable [" +msgstr " The accounting item [" + +#: include/class_acc_ledger_purchase.php:113 +#: include/class_acc_ledger_purchase.php:148 +#: include/class_acc_ledger_sold.php:140 +#: include/class_acc_ledger_purchase.php:110 +#: include/class_acc_ledger_purchase.php:145 +#: include/class_acc_ledger_sold.php:141 +msgid "n'existe pas" +msgstr "does not exist" + +#: include/class_acc_ledger_purchase.php:120 +#: include/class_acc_ledger_purchase.php:154 +#: include/class_acc_ledger_sold.php:117 include/class_acc_ledger_sold.php:146 +#: include/class_acc_ledger_purchase.php:117 +#: include/class_acc_ledger_purchase.php:151 +#: include/class_acc_ledger_sold.php:118 include/class_acc_ledger_sold.php:147 +msgid "n'est pas accessible à ce journal" +msgstr "is not allowed for this ledger" + +#: include/class_acc_ledger_purchase.php:136 +#: include/class_acc_ledger_purchase.php:133 +msgid "a un montant invalide" +msgstr "has an invalid amount" + +#: include/class_acc_ledger_purchase.php:138 +#: include/class_acc_ledger_purchase.php:135 +msgid "a une quantité invalide" +msgstr "has an invalid quantity" + +#: include/class_acc_ledger_purchase.php:148 +#: include/class_acc_ledger_purchase.php:145 +msgid " le poste comptable" +msgstr " the accounting item" + +#: include/class_acc_ledger_purchase.php:158 +#: include/class_acc_ledger_sold.php:150 +#: include/class_acc_ledger_purchase.php:155 +#: include/class_acc_ledger_sold.php:151 +msgid "Il n'y a aucune marchandise" +msgstr "There is no item" + +#: include/class_acc_ledger_purchase.php:588 +msgid "Tous les journaux d'achat" +msgstr "All the purchase ledgers" + +#: include/class_acc_ledger_purchase.php:708 +#: include/class_acc_ledger_purchase.php:1010 +#: include/class_acc_ledger_purchase.php:608 +#: include/class_acc_ledger_purchase.php:910 +#: include/class_acc_ledger_purchase.php:924 +#: include/class_acc_ledger_purchase.php:605 +#: include/class_acc_ledger_purchase.php:921 +msgid "En-tête facture fournisseur" +msgstr "Header invoice supplier" + +#: include/class_acc_ledger_purchase.php:709 +#: include/class_acc_ledger_purchase.php:609 +#: include/class_acc_ledger_purchase.php:606 +msgid "Détail articles acheté" +msgstr "Details item" + +#: include/class_acc_ledger_purchase.php:817 +#: include/class_acc_ledger_purchase.php:717 +#: include/class_acc_ledger_purchase.php:714 +msgid "Fournisseur " +msgstr "Supplier" + +#: include/class_acc_ledger_purchase.php:1027 +#: include/class_acc_ledger_purchase.php:927 +#: include/class_acc_ledger_purchase.php:941 +#: include/class_acc_ledger_purchase.php:938 +msgid "Détail articles achetés" +msgstr "Detail items" + +#: include/class_acc_ledger_purchase.php:1144 +#: include/class_acc_ledger_purchase.php:1044 +#: include/class_acc_ledger_purchase.php:1058 +#: include/class_acc_ledger_purchase.php:1055 +msgid "TVA à " +msgstr "VAT " + +#: include/class_acc_ledger_purchase.php:1209 +#: include/class_acc_ledger_sold.php:752 +#: include/class_acc_ledger_purchase.php:1109 +#: include/class_acc_ledger_sold.php:684 +#: include/class_acc_ledger_purchase.php:1123 +#: include/class_acc_ledger_sold.php:686 +#: include/class_acc_ledger_purchase.php:1120 +#: include/class_acc_ledger_sold.php:687 include/class_acc_ledger_sold.php:689 +msgid "Ajoutez une pièce justificative " +msgstr "Add a receipt" + +#: include/class_acc_ledger_purchase.php:1218 +#: include/class_acc_ledger_purchase.php:1118 +#: include/class_acc_ledger_purchase.php:1132 +#: include/class_acc_ledger_purchase.php:1129 +msgid "ou générer une note de frais" +msgstr "or generate an expense report" + +#: include/class_acc_ledger_purchase.php:1252 +#: include/class_acc_ledger_sold.php:800 +#: include/class_acc_ledger_purchase.php:1152 +#: include/class_acc_ledger_sold.php:732 +#: include/class_acc_ledger_purchase.php:1166 +#: include/class_acc_ledger_sold.php:734 +#: include/class_acc_ledger_purchase.php:1163 +#: include/class_acc_ledger_sold.php:735 include/class_acc_ledger_sold.php:737 +msgid "Echeance dépassée" +msgstr "Missed deadline" + +#: include/class_acc_ledger_purchase.php:1254 +#: include/class_acc_ledger_sold.php:802 +#: include/class_acc_ledger_purchase.php:1154 +#: include/class_acc_ledger_sold.php:734 +#: include/class_acc_ledger_purchase.php:1168 +#: include/class_acc_ledger_sold.php:736 +#: include/class_acc_ledger_purchase.php:1165 +#: include/class_acc_ledger_sold.php:737 include/class_acc_ledger_sold.php:739 +msgid "Non Payée" +msgstr "Not paid" + +#: include/class_acc_ledger_sold.php:64 +msgid "Vous n'avez pas donné de client" +msgstr "You haven't enter any customer" + +#: include/class_acc_ledger_sold.php:96 include/class_acc_ledger_sold.php:97 +msgid "Vous utilisez le mode strict la dernière operation est date du " +msgstr "You are using the strict mode, the last entry was typed on " + +#: include/class_acc_ledger_sold.php:97 include/class_acc_ledger_fin.php:87 +#: include/class_acc_ledger_sold.php:98 +msgid " vous ne pouvez pas encoder à une date antérieure" +msgstr " You can not enter an entry before the last operation" + +#: include/class_acc_ledger_sold.php:110 include/class_acc_ledger_sold.php:111 +msgid "] n'existe pas" +msgstr "] doesn't exist" + +#: include/class_acc_ledger_sold.php:128 include/class_acc_ledger_sold.php:129 +msgid "a un montant invalide [" +msgstr "has an invalid amount" + +#: include/class_acc_ledger_sold.php:130 include/class_acc_ledger_sold.php:131 +msgid "a une quantité invalide [" +msgstr " has an invalid quantity" + +#: include/class_acc_ledger_sold.php:759 include/class_acc_ledger_sold.php:691 +#: include/class_acc_ledger_sold.php:693 include/class_acc_ledger_sold.php:694 +#: include/class_acc_ledger_sold.php:696 +msgid "ou générer une facture" +msgstr "or generate an invoice" + +#: include/class_acc_ledger_sold.php:770 include/class_acc_ledger_sold.php:702 +#: include/class_acc_ledger_sold.php:704 include/class_acc_ledger_sold.php:705 +#: include/class_acc_ledger_sold.php:707 +msgid "Numero de bon de commande : " +msgstr "Number of ordering" + +#: include/class_acc_ledger_sold.php:771 include/class_acc_ledger_sold.php:703 +#: include/class_acc_ledger_sold.php:705 include/class_acc_ledger_sold.php:706 +#: include/class_acc_ledger_sold.php:708 +msgid "Autre information : " +msgstr "Other info" + +#: include/class_acc_ledger_sold.php:861 include/class_acc_ledger_sold.php:793 +#: include/class_acc_ledger_sold.php:795 include/class_acc_ledger_sold.php:796 +#: include/class_acc_ledger_sold.php:798 +msgid "Echéance" +msgstr "Date Limit" + +#: html/ajax_card.php:131 +msgid "Aucune catégorie de fiche ne correspondant a votre demande" +msgstr "No category matches your request" + +#: html/ajax_card.php:237 +msgid " de clients" +msgstr " of customes" + +#: html/ajax_card.php:241 +msgid " de fournisseurs" +msgstr " of suppliers" + +#: html/ajax_card.php:245 +msgid " d'administration" +msgstr " of administration" + +#: html/ajax_card.php:251 include/client.inc.php:44 include/client.inc.php:123 +#: include/adm.inc.php:45 include/adm.inc.php:129 include/client.inc.php:128 +#: include/supplier.inc.php:44 include/supplier.inc.php:128 +msgid "Ajout d'une catégorie" +msgstr "Add a category" + +#: html/ajax_card.php:293 html/ajax_card.php:295 html/ajax_card.php:298 +msgid "Catégorie sauvée" +msgstr "Category saved" + +#: html/ajax_card.php:295 html/ajax_card.php:298 html/ajax_card.php:301 +msgid "Le nom et la classe base ne peuvent être vide" +msgstr "The name and the accounting base can not be empty" + +#: html/import.php:103 +msgid "Choississez la période à transfèrer" +msgstr "Choose the periode to transfert" + +#: include/class_acc_ledger_purchase.php:98 +#: include/class_acc_ledger_purchase.php:95 +msgid " vous ne pouvez pas encoder à une date antérieure dans ce journal" +msgstr " You cannot add an entry before the last operation of this ledger" + +#: include/class_iperiod.php:106 +msgid "Aucune priode trouve" +msgstr "No periode found" + +#: include/dossier.inc.php:69 +msgid "" +"Desole la creation de ce dossier a echoue,\n" +" la cause la plus probable est deux fois le même nom de dossier" +msgstr "" + +#: include/fiche_def.inc.php:67 +msgid "" +"sinon le programme fonctionnera mal, utiliser uniquement des chiffres pour " +"la classe de base ou rien" +msgstr "" + +#: include/import_inc.php:79 +msgid "Importation terminée" +msgstr "Import done" + +#: include/import_inc.php:115 +msgid "op. concernée" +msgstr "Concerned op" + +#: include/import_inc.php:139 +msgid "poste comptable Destination" +msgstr "Accounting item target" + +#: include/import_inc.php:167 +msgid "Enlever" +msgstr "Remove" + +#: include/import_inc.php:183 +msgid " opérations à complèter" +msgstr " operation to complete" + +#: include/import_inc.php:212 include/import_inc.php:271 +msgid "Vous devez selectionner votre période dans vos préférences" +msgstr "You have to select a period in your preference" + +#: include/import_inc.php:227 +msgid "opérations à transfèrer" +msgstr "Operation to transfert" + +#: include/import_inc.php:245 +msgid "Commencer le transfert" +msgstr "Start the transfert" + +#: include/import_inc.php:323 +msgid "Poste comptable erronné pour l'opération " +msgstr "Wrong accounting item for the operation" + +#: include/import_inc.php:373 +msgid "Tranfert de l'opération " +msgstr "Transfert of the operation" + +#: include/import_inc.php:373 +msgid " effectué" +msgstr "Done" + +#: include/import_inc.php:412 +msgid "Import fiche" +msgstr "Import Card" + +#: include/template/category_of_card.php:3 +msgid "Nom de la catégorie de fiche" +msgstr "Name of the category of card" + +#: include/template/category_of_card.php:21 +msgid "" +"Si vous n'utilisez pas la création automatique, toutes les nouvelles fiches " +"auront par défaut le même poste comptable. Ce poste comptable par défaut est " +"la classe de base." +msgstr "" +"If you don't use the automatic creation, all the new cards will have the " +"same accounting item. This accounting item will be the class base" + +#: include/template/category_of_card.php:24 +msgid " A moins qu'en créant la fiche, vous forcez un autre poste comptable" +msgstr "Except if you give another accounting item when you create the card" + +#: include/template/detail-action.php:213 +msgid "Document à générer" +msgstr "Document to generate" + +#: include/template/detail-action.php:220 +#: include/template/detail-action.php:221 +msgid "Pièces attachées" +msgstr "Attachment" + +#: include/class_iperiod.php:106 +msgid "Aucune periode trouvée" +msgstr "No period found" + +#: html/ajax_card.php:131 +msgid "Aucune catégorie de fiche ne correspondant à votre demande" +msgstr "" + +#: html/ajax_card.php:293 html/ajax_card.php:296 +msgid "Catégorie existe déjà" +msgstr "Category already exists" + +#: html/ajax_extension.php:87 html/ajax_extension.php:144 +#: html/parametre.php:236 html/ajax_extension.php:81 +#: html/ajax_extension.php:138 html/parametre.php:242 +msgid "Oui" +msgstr "yes" + +#: html/ajax_extension.php:88 html/ajax_extension.php:145 +#: html/parametre.php:235 html/ajax_extension.php:82 +#: html/ajax_extension.php:139 html/parametre.php:241 +msgid "Non" +msgstr "No" + +#: html/ajax_extension.php:103 html/ajax_extension.php:160 +#: html/ajax_extension.php:97 html/ajax_extension.php:154 +msgid "Interdit" +msgstr "Forbidden" + +#: html/compta.php:34 +msgid " Vous êtes déconnecté" +msgstr "You are disconnected" + +#: html/extension.php:64 +msgid "Retour au tableau de bord" +msgstr "return to the dashboard" + +#: html/extension.php:78 +msgid "Aucune extension disponible" +msgstr "No available plugin" + +#: html/extension.php:86 html/parametre.php:158 include/user_menu.php:451 +#: include/template/security_list_action.php:110 +#: include/template/security_list_action.php:92 include/user_menu.php:337 +#: include/user_menu.php:450 +msgid "Extension" +msgstr "Plugin" + +#: html/extension.php:86 +msgid "Choix de l'extension" +msgstr "Choice of the plugin" + +#: html/extension.php:100 include/ext_inc.php:11 +msgid "" +"Vous ne pouvez pas utiliser cette extension. Contactez votre responsable" +msgstr "You cannot use this plugin, contact your administrator" + +#: html/extension.php:107 include/ext_inc.php:18 +msgid "Cette extension n'existe pas " +msgstr "This plugin do not exist" + +#: html/parametre.php:156 html/parametre.php:135 +msgid "Moyen de paiement" +msgstr "Payment middle" + +#: html/parametre.php:157 html/parametre.php:136 +msgid "Taux et poste comptable tva" +msgstr "Rate and accounting entry" + +#: html/parametre.php:230 html/parametre.php:236 +msgid "obligatoire" +msgstr "mandatory" + +#: html/parametre.php:231 html/parametre.php:237 +msgid "optionnel" +msgstr "optional" + +#: html/parametre.php:232 html/parametre.php:238 +msgid "non utilisé" +msgstr "not used" + +#: html/parametre.php:265 html/parametre.php:271 +msgid "Nom société" +msgstr "Company name" + +#: html/parametre.php:266 html/parametre.php:272 +msgid "Téléphone" +msgstr "Phone" + +#: html/parametre.php:267 html/parametre.php:273 +msgid "Fax" +msgstr "Fax" + +#: html/parametre.php:268 html/parametre.php:274 +msgid "Rue " +msgstr "Street" + +#: html/parametre.php:269 html/parametre.php:275 +msgid "Numéro" +msgstr "Number" + +#: html/parametre.php:270 html/parametre.php:276 +msgid "Code Postal" +msgstr "ZIP Code" + +#: html/parametre.php:271 html/parametre.php:277 +msgid "Commune" +msgstr "Department" + +#: html/parametre.php:272 html/parametre.php:278 +msgid "Pays" +msgstr "Country" + +#: html/parametre.php:273 html/parametre.php:279 +msgid "Numéro de Tva" +msgstr "VAT Number" + +#: html/parametre.php:275 html/parametre.php:281 +msgid "Utilisation de la compta. analytique" +msgstr "Use of the analytic accountancy" + +#: html/parametre.php:277 html/parametre.php:283 +msgid "Utilisation du mode strict " +msgstr "Use of the strict mode" + +#: html/parametre.php:279 html/parametre.php:285 +msgid "Assujetti à la tva" +msgstr "" + +#: html/parametre.php:280 html/parametre.php:286 +msgid "Suggérer le numéro de pièce justificative" +msgstr "Suggest the receipt number" + +#: html/parametre.php:281 html/parametre.php:287 +msgid "Afficher la période comptable pour éviter les erreurs de date" +msgstr "Display the accounting periode to avoid date errors" + +#: include/action.common.inc.php:235 +msgid "Recherche avancée" +msgstr "Advanced search" + +#: include/action.common.inc.php:274 +msgid "affecté à d'autre:" +msgstr "Concerned other" + +#: include/action.common.inc.php:293 include/action.common.inc.php:305 +msgid "Afficher Recherche" +msgstr "Display search" + +#: include/action.common.inc.php:293 include/action.common.inc.php:305 +msgid "Cache Recherche" +msgstr "Hide search" + +#: include/adm_card.inc.php:71 +msgid "Suivi adm, devis, bon de commande, courrier" +msgstr "Follow up administration,mail, " + +#: include/adm_card.inc.php:72 +msgid "Liste de contacts de cette administration" +msgstr "List of contact" + +#: include/adm_card.inc.php:74 +msgid "Retour à la liste des administration" +msgstr "return to administration" + +#: include/anc_imp.inc.php:36 +msgid "Listing" +msgstr "Listing" + +#: include/anc_imp.inc.php:36 +msgid "Listing des opérations" +msgstr "Listing of operation" + +#: include/anc_imp.inc.php:37 +msgid "Balance simple" +msgstr "Simple balance" + +#: include/anc_imp.inc.php:37 +msgid "Balance simple d'un plan analytique" +msgstr "Balance a simple analytical" + +#: include/anc_imp.inc.php:38 +msgid "Balance croisée" +msgstr "Cross balance " + +#: include/anc_imp.inc.php:38 +msgid "Balance croisée de 2 plans analytiques" +msgstr "Crossed balance" + +#: include/anc_od.inc.php:39 +msgid "Aucun plan analytique défini" +msgstr "No analytical defined" + +#: include/anc_od.inc.php:52 include/class_anticipation.php:193 +msgid "Nouveau" +msgstr "New" + +#: include/anc_od.inc.php:55 +msgid "Liste opérations" +msgstr "Operation list" + +#: include/class_action.php:372 include/class_action.php:376 +msgid "Génére le document" +msgstr "Generate the document" + +#: include/class_anc_account.php:271 +msgid "Plan Analytique" +msgstr "Analytical" + +#: include/class_anc_account.php:276 +msgid "Groupe" +msgstr "Group" + +#: include/class_anc_group_operation.php:71 +msgid "Operation non equilibrée" +msgstr "Unbalanced operation" + +#: include/class_anc_listing.php:70 +msgid "aucune donnée" +msgstr "no data" + +#: include/class_anc_listing.php:77 +msgid "D/C" +msgstr "D/C" + +#: include/class_anc_print.php:89 +msgid "Aucun plan défini" +msgstr "No plan defined" + +#: include/class_anc_print.php:114 +msgid "Les dates sont en format DD.MM.YYYY" +msgstr "The date format are DD.MM.YYYY" + +#: include/class_anc_print.php:136 +msgid "Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche" +msgstr "Select the plan before clicking on search" + +#: include/class_anticipation.php:161 +msgid "Modification" +msgstr "Modification" + +#: include/class_anticipation.php:198 +msgid "Ventes" +msgstr "Sales" + +#: include/class_anticipation.php:240 +msgid "Elements" +msgstr "Items" + +#: include/class_calendar.php:87 +msgid "Lundi" +msgstr "Monday" + +#: include/class_calendar.php:87 +msgid "Mardi" +msgstr "Tuesday" + +#: include/class_calendar.php:87 +msgid "Mercredi" +msgstr "Wednesday" + +#: include/class_calendar.php:87 +msgid "Jeudi" +msgstr "Thursday" + +#: include/class_calendar.php:87 +msgid "Vendredi" +msgstr "Friday" + +#: include/class_calendar.php:87 +msgid "Samedi" +msgstr "Saterday" + +#: include/class_calendar.php:87 +msgid "Dimanche" +msgstr "Sunday" + +#: include/class_fiche.php:304 +msgid "Cette categorie de card n'existe pas" +msgstr "This category do not exist" + +#: include/class_forecast.php:66 +msgid "Le nom ne peut pas être vide" +msgstr "the name cannot be empty" + +#: include/extension.inc.php:52 include/template/extension-detail.php:4 +#: include/extension.inc.php:51 +msgid "Détail extension" +msgstr "Plugin detail" + +#: include/extension.inc.php:60 include/extension.inc.php:59 +msgid "Nouvelle extension" +msgstr "New plugin" + +#: include/forecast.inc.php:197 +msgid "Ajout prévision" +msgstr "Add forecast" + +#: include/forecast.inc.php:197 +msgid "Ajout d'une prévision" +msgstr "Add a forecast" + +#: include/forecast.inc.php:330 +msgid "Modifier nom ou catégories" +msgstr "Modify name or categories" + +#: include/forecast.inc.php:331 +msgid "Modifier éléments" +msgstr "Modify items" + +#: include/forecast.inc.php:333 +msgid "Vous confirmez l\\' effacement ?" +msgstr "Do you confirm the removal ?" + +#: include/payment_middle.inc.php:58 +msgid "Retour sans sauvez" +msgstr "Return without saving" + +#: include/payment_middle.inc.php:87 +msgid "Type de fiche" +msgstr "Type of card" + +#: include/payment_middle.inc.php:88 +msgid "enregistré dans le journal" +msgstr "recorded in the ledger" + +#: include/payment_middle.inc.php:89 +msgid " Avec la fiche" +msgstr " With the card" + +#: include/supplier_card.inc.php:71 +msgid "Suivi Fournisseur, devis, bon de commande, courrier" +msgstr "Orderinf, follow-up, mail" + +#: include/supplier_card.inc.php:72 +msgid "Liste de contacts de ce fournisseur" +msgstr "Contact list of this supplier" + +#: include/supplier_card.inc.php:74 +msgid "Retour à la liste des fournisseurs" +msgstr "return to suppliers" + +#: include/template/dashboard.php:10 +msgid "Dernières opérations" +msgstr "Last entries" + +#: include/template/dashboard.php:40 +msgid "Dernières actions" +msgstr "Last actions" + +#: include/template/extension-detail.php:23 +msgid "description" +msgstr "description" + +#: include/template/extension-detail.php:31 +msgid "chemin et nom de fichier" +msgstr "Path and name of the file" + +#: include/template/extension.php:18 +msgid "Activé" +msgstr "Activated" + +#: include/template/extension.php:18 +msgid "Désactivé" +msgstr "Deactivated" + +#: include/template/extension.php:23 +msgid "Effacer extension" +msgstr "Remove plugin" + +#: include/template/extension.php:24 +msgid "Confirmez effacement de l'extension ??" +msgstr "Do you confirm the removal of this plugin ?" + +#: include/template/extension-sec.php:6 +msgid "login" +msgstr "login" + +#: include/template/extension-sec.php:7 +msgid "Prénom" +msgstr "First Name" + +#: include/template/forecast_cat.php:5 +msgid "Catégories" +msgstr "Categories" + +#: include/template/forecast_cat.php:8 +msgid "Ordre" +msgstr "Order" + +#: include/template/forecast-detail.php:7 +msgid "Catégorie" +msgstr "Category" + +#: include/template/forecast-detail.php:9 +msgid "QuickCode" +msgstr "QuickCode" + +#: include/template/forecast-detail.php:12 +msgid "Débit ou Crédit" +msgstr "Debit or credit" + +#: include/template/forecast_result.php:27 +msgid "Totaux" +msgstr "Total" + +#: include/template/forecast_result.php:32 +msgid "Estimé" +msgstr "Estimated" + +#: include/template/forecast_result.php:67 +msgid "Réel" +msgstr "Real" + +#: include/template/forecast_result.php:81 +#: include/template/forecast_result.php:125 +msgid "Différence" +msgstr "Difference" + +#: include/template/forecast_result.php:93 +msgid "Diff. cumul." +msgstr "Cumulated diff" + +#: include/template/forecast_result.php:119 +msgid "Total Catégorie estimé" +msgstr "Total Cat. Estimated" + +#: include/template/forecast_result.php:122 +msgid "Total Catégorie réel" +msgstr "Total Cat. real" + +#: include/template/form_ledger_detail.php:34 +msgid "tvac" +msgstr "VAT included" + +#: include/template/security_list_action.php:104 +#: include/template/security_list_action.php:87 +msgid "Prévision" +msgstr "Forecast" + +#: include/class_acc_ledger_fin.php:58 +msgid "Vous n'avez pas donné de banque" +msgstr "You didn't give any bank" + +#: include/class_acc_ledger_fin.php:734 +msgid "Tous les journaux financiers" +msgstr "All the financial ledgers" + +#: include/detail_adm.inc.php:67 include/detail_client.inc.php:67 +#: include/detail_supplier.inc.php:67 +msgid "Sauver les modifications" +msgstr "Save modification" + +#: include/detail_client.inc.php:50 include/detail_supplier.inc.php:50 +msgid "Information sauvée" +msgstr "Data saved" + +#: include/detail_client.inc.php:69 include/detail_supplier.inc.php:69 +msgid "Effacer cette fiche" +msgstr "Remove this card" + +#: include/forecast.inc.php:333 +msgid "Vous confirmez l\\' effacement" +msgstr "Do you confirm the removal " + +#: html/ajax_card.php:107 html/ajax_card.php:158 html/ajax_card.php:278 +#: html/ajax_card.php:309 +msgid "Action interdite" +msgstr "Forbidden action" + +#: html/ajax_card.php:125 +msgid "Aucune catégorie de fiche ne correspondant à" +msgstr "No category is matching" + +#: html/parametre.php:138 +msgid "Modifie les classe de base, les attribut,..." +msgstr "Modify the account base, attributes...." + +#: include/class_acc_ledger_purchase.php:474 +#: include/class_acc_ledger_sold.php:355 +msgid "Document généré" +msgstr "Generated document" + +#: include/class_acc_ledger_purchase.php:475 +msgid "Note de frais" +msgstr "Note of free" + +#: include/class_document.php:258 +msgid "Ne peut pas sauver " +msgstr "Cannot save" + +#: include/impress.inc.php:36 +msgid "Balance des comptes" +msgstr "Balance" + +#: include/impress.inc.php:37 +msgid "Bilan" +msgstr "Bilan" + +#: include/impress.inc.php:38 +msgid "Liste Clients Assujettis" +msgstr "List Customer" + +#: include/impress_poste.inc.php:114 +msgid "Depuis" +msgstr "From" + +#: include/impress_poste.inc.php:115 +msgid "Jusque " +msgstr "Until" + +#: html/ajax_card.php:261 include/class_acc_report.php:142 +msgid "Recherche poste" +msgstr "Search account" + +#: include/class_anc_balance_double.php:288 +msgid "" +"Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche" +msgstr "" +"Select the plan you are interested before clicking on Search" diff --git a/html/lang/nl_NL/LC_MESSAGES/messages.po b/html/lang/nl_NL/LC_MESSAGES/messages.po new file mode 100644 index 000000000..f506d3b96 --- /dev/null +++ b/html/lang/nl_NL/LC_MESSAGES/messages.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-11-10 15:17+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: test.php:228 +msgid "Bienvenu sur mon site" +msgstr "Welkom op my website" + +#: test.php:229 +msgid "Essayer de vous y amuser" +msgstr "Probeer het" + +#: test.php:233 +msgid "Choississez votre langue" +msgstr "kies uw taal" + +#: test.php:234 +msgid "Français" +msgstr "Frans" + +#: test.php:235 +msgid "Anglais" +msgstr "Engels" + +#: test.php:236 +msgid "Néerlandais" +msgstr "Nederlands" + +#: test.php:245 +msgid "Change de langue" +msgstr "Verander het taal" diff --git a/html/line_update.php b/html/line_update.php index f76adac27..b26d69259 100644 --- a/html/line_update.php +++ b/html/line_update.php @@ -24,16 +24,15 @@ include_once ("ac_common.php"); require_once('class_dossier.php'); $gDossier=dossier::id(); -include_once ("postgres.php"); -include_once("check_priv.php"); +require_once('class_database.php'); require_once ('class_acc_account.php'); /* Admin. Dossier */ -$rep=DbConnect(); +$rep=new Database(); include_once ("class_user.php"); $User=new User($rep); $User->Check(); html_page_start($User->theme,"onLoad='window.focus();'"); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $User->can_request(PARPCMN); @@ -41,7 +40,7 @@ include ("user_menu.php"); /* Modif d'une ligne */ if ( isset ($_POST["update"] ) ) { - echo JS_UPDATE_PCMN; + echo JS_ACCOUNTING_ITEM; $p_val=trim($_POST["p_val"]); $p_lib=trim($_POST["p_lib"]); @@ -56,7 +55,7 @@ if ( isset ($_POST["update"] ) ) { // Check if the data are correct try { $acc->check() ; - }catch (AcException $e) { + }catch (Exception $e) { $message="Valeurs invalides, pas de changement \n ". $e->getMessage(); echo '<script> alert(\''.$message.'\'); @@ -80,8 +79,8 @@ if ( isset ($_POST["update"] ) ) { } } /* Parent existe */ - $Ret=ExecSqlParam($cn,"select pcm_val from tmp_pcmn where pcm_val=$1",array($p_parent)); - if ( ($p_parent != 0 && pg_NumRows($Ret) == 0) || $p_parent==$old_line ) { + $Ret=$cn->exec_sql("select pcm_val from tmp_pcmn where pcm_val=$1",array($p_parent)); + if ( ($p_parent != 0 && Database::num_row($Ret) == 0) || $p_parent==$old_line ) { echo '<SCRIPT> alert(" Ne peut pas modifier; aucun poste parent"); </SCRIPT>'; } else { $acc->update($old_line); diff --git a/html/listing_client.php b/html/listing_client.php index d991e46fe..e5aa63cec 100644 --- a/html/listing_client.php +++ b/html/listing_client.php @@ -19,7 +19,7 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr require_once("ac_common.php"); -require_once("postgres.php"); +require_once('class_database.php'); /*! \file * \brief Electronic declaration for VAT BELGIUM --> experimental */ @@ -30,7 +30,7 @@ include ('class_user.php'); require_once('class_dossier.php'); $gDossier=dossier::id(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $User=new User($cn); $User->Check(); diff --git a/html/login.php b/html/login.php index 6360c9a3b..dc32f6091 100644 --- a/html/login.php +++ b/html/login.php @@ -23,7 +23,7 @@ include_once ("ac_common.php"); */ /* $Revision$ */ -include_once ("postgres.php"); +require_once('class_database.php'); include_once("debug.php"); @@ -36,7 +36,7 @@ if ( isset ($_POST["p_user"] ) ) { // Verif if User and Pass match DB // if no, then redirect to the login page - $rep=DbConnect(); + $rep=new Database(); include_once ("class_user.php"); $User=new User($rep); $User->Check(); @@ -45,7 +45,7 @@ if ( isset ($_POST["p_user"] ) ) { } else { - $rep=DbConnect(); + $rep=new Database(); include_once ("class_user.php"); $User=new User($rep); $User->Check(); diff --git a/html/logout.php b/html/logout.php index c83ec0c26..1732dbd30 100644 --- a/html/logout.php +++ b/html/logout.php @@ -21,7 +21,7 @@ * \brief Logout */ require_once ("ac_common.php"); -require_once ("postgres.php"); +require_once('class_database.php'); html_page_start("classic"); diff --git a/html/modify_op.php b/html/modify_op.php index 38227ae76..6a87f6a31 100644 --- a/html/modify_op.php +++ b/html/modify_op.php @@ -24,21 +24,19 @@ * */ include_once ("ac_common.php"); -include_once ("poste.php"); -include_once("preference.php"); include_once("central_inc.php"); -include_once("check_priv.php"); include_once("user_common.php"); -include_once ("postgres.php"); +require_once('class_database.php'); include_once("jrn.php"); -include_once("class_widget.php"); require_once ("constant.php"); require_once('class_acc_reconciliation.php'); require_once('class_acc_operation.php'); - +echo js_include('scripts.js'); +echo js_include('prototype.js'); +echo js_include('anc_script.js'); /* Admin. Dossier */ $gDossier=dossier::id(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include_once ("class_user.php"); $User=new User($cn); @@ -47,11 +45,11 @@ $User->check_dossier(dossier::id()); html_page_start($User->theme,"onLoad='window.focus();'"); require_once('class_dossier.php'); -// $p_jrn=(isset($_REQUEST['p_jrn']))?$_REQUEST['p_jrn']:0; + $acc=new Acc_Operation($cn); if (isset($_REQUEST['line'])) $acc->jr_id=$_REQUEST ['line']; -else +else $acc->jr_id=$_REQUEST ['jr_id']; $p_jrn=$acc->get_ledger(); @@ -59,8 +57,6 @@ $p_jrn=$acc->get_ledger(); if ( isset ( $_GET['action'] ) ) { $action=$_GET['action']; } -//$_SESSION["p_jrn"]=$p_jrn; - $p_view=(isset($_REQUEST['p_view']))?$_REQUEST['p_view']:"error"; if ( isset ( $_REQUEST['action'] ) ) { @@ -72,7 +68,7 @@ if ( ! isset ( $action )) { } // Javascript -echo JS_VIEW_JRN_MODIFY; +echo JS_LEDGER; ?> <script language="javascript"> function show_div (p_div) { @@ -100,24 +96,18 @@ if ( $action == 'update' ) { NoAccess(); exit -1; - + } // p_id is jrn.jr_id $p_id=$_GET["line"]; echo_debug('modify_op.php',__LINE__," action = update p_id = $p_id"); - echo JS_CONCERNED_OP; - - - - - $view='<h2 class="error">Erreur vue inconnue</h2>'; // show the detailled operation - if ( $p_view == 'S' ) + if ( $p_view == 'S' ) $view='<div id="simple">'; - else + else $view='<div id="simple" style="display:none">'; $view.='<h2 class="info">Vue simple</h2>'; @@ -132,15 +122,15 @@ if ( $action == 'update' ) { $view.="<br>"; $view.="<br>"; if ( $User->check_jrn($p_jrn) == 'W') - $view.=($p_view == 'S')?'<input type="SUBMIT" name="update_record" value="Enregistre">':""; + $view.=($p_view == 'S')?HtmlInput::submit('update_record','Enregistre'):''; $view.="      "; $view.='<input type="button" value="Fermer" onClick="window.close(); self.opener.RefreshMe();">'; $view.='</FORM>'; $view.='</div>'; - if ( $p_view == 'S' ) + if ( $p_view == 'S' ) $view.='<div id="expert" style="display:none">'; - else + else $view.='<div id="expert" style="display:block">'; $view.='<h2 class="info">Vue expert</h2>'; @@ -155,7 +145,7 @@ if ( $action == 'update' ) { $view.="<br>"; $view.="<br>"; if ( $User->check_jrn($p_jrn) == 'W') - $view.=($p_view == 'E') ?'<input type="SUBMIT" name="update_record" value="Enregistre">':""; + $view.=($p_view == 'E') ?HtmlInput::submit('update_record','Enregistre'):''; $view.="      "; $view.='<input type="button" value="Fermer" onClick="window.close(); self.opener.RefreshMe();">'; $view.='</div>'; @@ -163,7 +153,7 @@ if ( $action == 'update' ) { echo $view; - } + } //--------------------------------------------------------------------- // action = vue ca //--------------------------------------------------------------------- @@ -179,9 +169,9 @@ if ( $action=="view_ca") { $view.='<input type="button" onclick="hide_div(\'simple\');show_div(\'expert\');" value="Vue Expert">'; $view.='<input type="button" value="Fermer" onClick="window.close(); ">'; $view.='</div>'; - - + + $view.='<div id="expert" style="display:none">'; $view.='<h2 class="info">Vue expert</h2>'; @@ -205,39 +195,39 @@ if ( isset($_POST['update_record']) ) { $acc->jr_id=$_POST['jr_id']; $l=$acc->get_ledger(); if ( $User->check_jrn($l) != 'W' ) { - echo ' <script> window.close();</script>'; - NoAccess(); - exit -1; - } + echo ' <script> window.close();</script>'; + NoAccess(); + exit -1; + } try { // NO UPDATE except rapt & comment && upload pj && PJ Number - StartSql($cn); + $cn->start(); $acc=new Acc_Operation($cn); $acc->jr_id=$_POST['jr_id']; /* set the pj */ - $acc->pj=$_POST['pj']; $acc->set_pj(); + $acc->pj=$_POST['pj']; $acc->set_pj(); $acc->operation_update_comment($_POST['comment']); /* insert now the grouping */ + if ( trim($_POST['rapt']) != "" ) { - if ( strpos($_POST['rapt'],',') !== 0 ) + $rec=new Acc_Reconciliation ($cn); + $rec->set_jr_id($_POST['jr_id']); + + if ( strpos($_POST['rapt'],',') != 0 ) { $aRapt=split(',',$_POST['rapt']); /* reconcialition */ - $rec=new Acc_Reconciliation ($cn); - $rec->set_jr_id($_POST['jr_id']); foreach ($aRapt as $rRapt) { - - - if ( isNumber($rRapt) == 1 ) + if ( isNumber($rRapt) == 1 ) { // Add a "concerned operation to bound these op.together // $rec->insert($rRapt); } } - } else - if ( isNumber($_POST['rapt']) == 1 ) + } else + if ( isNumber($_POST['rapt']) == 1 ) { $rec->insert($_POST['rapt']); } @@ -245,27 +235,27 @@ if ( isset($_POST['update_record']) ) { if ( isset ($_FILES)) { echo_debug("modify_op.php",__LINE__, "start upload doc."); - save_upload_document($cn,$_POST['jr_grpt_id']); + $cn->save_upload_document($_POST['jr_grpt_id']); } - if ( isset ($_POST['is_paid'] )) - $Res=ExecSqlParam($cn,"update jrn set jr_rapt='paid' where jr_id=$1",array($_POST['jr_id'])); - + if ( isset ($_POST['is_paid'] )) + $Res=$cn->exec_sql("update jrn set jr_rapt='paid' where jr_id=$1",array($_POST['jr_id'])); + if ( isset ($_POST['to_remove'] )) { /*! \note we don't remove the document file if another * operation needs it. */ - $ret=ExecSqlParam($cn,"select jr_pj from jrn where jr_id=$1",array($_POST['jr_id'])); - if (pg_num_rows($ret) != 0) { - $r=pg_fetch_array($ret,0); + $ret=$cn->exec_sql("select jr_pj from jrn where jr_id=$1",array($_POST['jr_id'])); + if (Database::num_row($ret) != 0) { + $r=Database::fetch_array($ret,0); $old_oid=$r['jr_pj']; if (strlen($old_oid) != 0) { // check if this pj is used somewhere else - $c=CountSql($cn,"select * from jrn where jr_pj=".$old_oid); + $c=$cn->count_sql("select * from jrn where jr_pj=".$old_oid); if ( $c == 1 ) - pg_lo_unlink($cn,$old_oid); + $cn->lo_unlink($old_oid); } - ExecSqlParam($cn,"update jrn set jr_pj=null, jr_pj_name=null, ". + $cn->exec_sql("update jrn set jr_pj=null, jr_pj_name=null, ". "jr_pj_type=null where jr_id=$1",array($_POST['jr_id'])); } @@ -282,10 +272,10 @@ if ( isset($_POST['update_record']) ) { // if ( $own->MY_ANALYTIC == "ob") { $tab=0; $row=1; while (1) { - if ( !isset ($_POST['nb_t'.$tab])) + if ( !isset ($_POST['nb_t'.$tab])) break; $tot_tab=0; - + for ($i_row=0;$i_row <= MAX_COMPTE;$i_row++) { if ( ! isset($_POST['val'.$tab.'l'.$i_row])) continue; @@ -294,7 +284,7 @@ if ( isset($_POST['update_record']) ) { if ( $tot_tab != $_POST['amount_t'.$tab]) { echo '<script>alert ("Erreur montant dans Comptabilite analytique\n Operation annulee")</script>'; - get_redirect($_SERVER['HTTP_REFERER']); + redirect($_SERVER['HTTP_REFERER']); return; } $tot_tab=0; @@ -307,12 +297,12 @@ if ( isset($_POST['update_record']) ) { $sql="select j_id,j_poste,to_char(j_date,'DD.MM.YYYY') as j_date,j_debit ". "from jrn join jrnx on (j_grpt=jr_grpt_id) ". "where jr_id=$1"; - $res=ExecSqlParam($cn,$sql,array($_POST['jr_id'])); + $res=$cn->exec_sql($sql,array($_POST['jr_id'])); - $array_jid=pg_fetch_all($res); + $array_jid=Database::fetch_all($res); // if j_poste match 6 or 7 we insert them $count=0; - $group=NextSequence($cn,"s_oa_group"); + $group=$cn->get_next_seq("s_oa_group"); foreach( $array_jid as $row_ca) { echo_debug(__FILE__.':'.__LINE__,"array is ",$row_ca); @@ -329,19 +319,19 @@ if ( isset($_POST['update_record']) ) { $count++; } //if ereg }//foreach - }// if ( $own->MY_ANALYTIC != "nu" ) + }// if ( $own->MY_ANALYTIC != "nu" ) } catch (Exception $e) { echo '<span class="error">'. 'Erreur dans l\'enregistrement '. __FILE__.':'.__LINE__.' '. $e->getMessage(); echo_debug(__FILE__,__LINE__,$e->getMessage()); - Rollback($cn); + $cn->rollback(); exit(); } - Commit($cn); - echo ' <script> + $cn->commit(); + echo ' <script> window.close(); self.opener.RefreshMe(); </script>'; @@ -351,7 +341,7 @@ if ( $action == 'delete' ) { $rec=new Acc_Reconciliation ($cn); $rec->set_jr_id($_GET ['line']); $rec->remove($_GET['line2']); - echo ' <script> + echo ' <script> window.close(); self.opener.RefreshMe(); </script>'; diff --git a/html/parametre.php b/html/parametre.php index a1486f2e8..3fe705c79 100644 --- a/html/parametre.php +++ b/html/parametre.php @@ -24,21 +24,34 @@ */ include_once ("ac_common.php"); -include_once ("postgres.php"); -require_once("class_widget.php"); +require_once('class_database.php'); +require_once("class_iselect.php"); +require_once("class_itext.php"); require_once('class_dossier.php'); +require_once('class_iposte.php'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('scripts.js'); +echo js_include('acc_ledger.js'); +echo js_include('card.js'); +echo js_include('accounting_item.js'); +echo js_include('ajax_fiche.js'); +echo js_include('dragdrop.js'); + $gDossier=dossier::id(); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include_once ("class_user.php"); $User=new User($cn); $User->Check(); $User->check_dossier($gDossier); html_page_start($_SESSION['g_theme']); -include_once("preference.php"); + include_once("user_menu.php"); echo '<div class="u_tmenu">'; @@ -46,11 +59,10 @@ echo menu_tool('parametre.php'); echo '<div style="float:left;background-color:#879ED4;width:100%;">'; -include_once ("check_priv.php"); $authorized =0; foreach ( array(PARCA,PARPER,PARFIC,PARDOC,PARJRN,PARTVA, - PARMP, PARPOS,PARCOORD,PARSEC) + PARMP, PARPOS,PARCOORD,PARSEC,EXTENSION) as $a) { if ( $User->check_action($a) == 1 ) { @@ -67,6 +79,9 @@ if ( isset($_REQUEST["p_action"]) ) { $p_action=$_REQUEST["p_action"]; } switch ($p_action) { + case 'ext': + $default=3; + break; case 'jrn': $default=10; break; @@ -79,12 +94,6 @@ switch ($p_action) { case 'divers': $default=2; break; - case 'tva': - $default=3; - break; - case 'poste': - $default=4; - break; case 'fiche': $default=5; break; @@ -115,109 +124,85 @@ if ( isset ($_POST['action']) ) { $action=$_POST['action']; } echo_debug("parametre",__LINE__,$_POST); -//----------------------------------------------------- -// TVA RATE -//----------------------------------------------------- -if ( $p_action == "tva" ) -{ - echo '</div>'; - $User->can_request(PARTVA,1); - require_once("tva.inc.php"); - // -} -//----------------------------------------------------- -// Account -//----------------------------------------------------- -if ( $p_action == "poste" ) -{ - $User->can_request(PARPOS,1); - require_once('poste.inc.php'); -} //----------------------------------------------------- -// fiche +// divers //----------------------------------------------------- -if ( $p_action == "fiche" ) -{ - $User->can_request(PARFIC,1); - require_once('fiche_def.inc.php'); - return; -} - if ( $p_action == 'divers') { $s=dossier::get().'&PHPSESSID='.$_REQUEST['PHPSESSID']; - $array = array (/*array('parametre.php?p_action=divers&sa=devise&'.$s, - 'Devise','Devise',1),*/ - array('parametre.php?p_action=divers&sa=mp&'.$s, - 'Moyen de paiement','Moyen de paiement',2) + $array = array ( + array('parametre.php?p_action=divers&sa=mp&'.$s,_('Moyen de paiement'),_('Moyen de paiement'),2), + array('parametre.php?p_action=divers&sa=tva&'.$s,_('Tva'),_('Taux et poste comptable tva'),4), + array('parametre.php?p_action=divers&sa=poste&'.$s,_('Poste Comptable'),_('Poste comptable constant'),7), + array('parametre.php?p_action=divers&sa=fiche&'.$s,_('Catégorie de fiche'),_('Modifie les classe de base, les attribut,...'),5) ); $sa=(isset($_REQUEST['sa']))?$_REQUEST['sa']:''; $sb=(isset($_REQUEST['sb']))?$_REQUEST['sb']:''; $def=0; switch ($sa) { - case 'devise': - $def=1; - break; - case 'mp': + case 'mp': $def=2; break; + case 'tva': + $def=4; + break; + case 'poste': + $def=7; + break; + case 'fiche': + $def=5; + break; } echo '<div class="lmenu">'; echo ShowItem($array,'H','mtitle','mtitle',$def); echo '</div>'; - - if ( $sa=='devise') { - echo '<DIV CLASS="u_redcontent">'; - //----------------------------------------------------- - // Currency - //----------------------------------------------------- - if ( $sb == "c" ) { - $p_mid=$_GET['p_mid']; - $p_rate=$_GET['p_rate']; - $p_code=$_GET['p_code']; - - echo '<TR> <FORM ACTION="parametre.php" METHOD="POST">'; - echo dossier::hidden(); - echo '<INPUT TYPE="HIDDEN" VALUE="'.$p_mid.'" NAME="p_id">'; - echo '<TD> <INPUT TYPE="text" NAME="p_devise" VALUE="'.$p_code.'"></TD>'; - echo '<TD> <INPUT TYPE="text" NAME="p_rate" VALUE="'.$p_rate.'"></TD>'; - echo '<TD> <INPUT TYPE="SUBMIT" NAME="action" Value="Change"</TD>'; - echo '</FORM></TR>'; - } - if ( $sb == "ch") { - $p_devise=$_GET['p_code']; - $p_id=$_GET['p_id']; - $p_rate=$_GET['p_rate']; - $Res=ExecSql($cn,"update parm_money set pm_code='$p_devise',pm_rate=$p_rate where pm_id=$p_id"); - ShowDevise($cn); - - } - if ( $sb == "a") { - $p_devise=$_POST['p_devise']; - $p_rate=$_POST['p_rate']; - $Res=ExecSql($cn,"insert into parm_money ( pm_code,pm_rate) values ('$p_devise',$p_rate) "); - ShowDevise($cn); - - } - - if ( $sb == "d") { - $p_id=$_GET['p_mid']; - $Res=ExecSql($cn,"delete from parm_money where pm_id=$p_id"); - ShowDevise($cn); - } - - - if ( $p_action=="divers") { - ShowDevise($cn); - } - } + if ( $sa=='mp') { $User->can_request(PARMP,1); require_once('payment_middle.inc.php'); exit; } -} + + //----------------------------------------------------- + // TVA RATE + //----------------------------------------------------- + if ( $sa == "tva" ) + { + echo '</div>'; + $User->can_request(PARTVA,1); + require_once("tva.inc.php"); + // + } + //----------------------------------------------------- + // Accounting item + //----------------------------------------------------- + if ( $sa == "poste" ) + { + $User->can_request(PARPOS,1); + require_once('poste.inc.php'); + + } + //----------------------------------------------------- + // fiche + //----------------------------------------------------- + if ( $sa == "fiche" ) + { + $User->can_request(PARFIC,1); + require_once('fiche_def.inc.php'); + return; + } + + } +//----------------------------------------------------- +// Extension +//----------------------------------------------------- + +if ( $p_action=='ext') { + $User->can_request(EXTENSION,1); + require_once('extension.inc.php'); + exit; + } //----------------------------------------------------- // Coord societe //----------------------------------------------------- @@ -225,7 +210,6 @@ if ( $p_action=='company') { $User->can_request(PARCOORD,1); echo '<div class="content">'; require_once("class_own.php"); - require_once("class_widget.php"); if ( isset ($_POST['record_company'] )) { $m=new Own($cn); extract($_POST); @@ -238,6 +222,7 @@ if ( $p_action=='company') { $m->MY_TEL=$p_tel; $m->MY_FAX=$p_fax; $m->MY_PAYS=$p_pays; + $m->MY_CHECK_PERIODE=$p_check_periode; if ( $User->check_action(PARCA)!=0)$m->MY_ANALYTIC=$p_compta; if ( $User->check_action(PARSTR)!=0) $m->MY_STRICT=$p_strict; if ( $User->check_action(PARTVA)!=0)$m->MY_TVA_USE=$p_tva_use; @@ -248,57 +233,60 @@ if ( $p_action=='company') { $my=new Own($cn); ///// Compta analytic $array=array ( - array("value"=>"ob",'label'=>"obligatoire"), - array("value"=>"op",'label'=>"optionnel"), - array("value"=>"nu",'label'=>"non utilisé") + array("value"=>"ob",'label'=>_("obligatoire")), + array("value"=>"op",'label'=>_("optionnel")), + array("value"=>"nu",'label'=>_("non utilisé")) ); $strict_array=array( - array('value'=>'N','label'=>'Non'), - array('value'=>'Y','label'=>'Oui') + array('value'=>'N','label'=>_('Non')), + array('value'=>'Y','label'=>_('Oui')) ); - $compta=new widget("select"); + $compta=new ISelect(); $compta->table=1; $compta->selected=$my->MY_ANALYTIC; - $strict=new widget("select"); + $strict=new ISelect(); $strict->table=1; $strict->selected=$my->MY_STRICT; - $tva_use=new widget("select"); + $tva_use=new ISelect(); $tva_use->table=1; $tva_use->selected=$my->MY_TVA_USE; - $pj_suggest=new widget("select"); + $pj_suggest=new ISelect(); $pj_suggest->table=1; $pj_suggest->selected=$my->MY_PJ_SUGGEST; + $check_periode=new ISelect(); + $check_periode->table=1; + $check_periode->selected=$my->MY_CHECK_PERIODE; + // other parameters - $all=new widget("text"); + $all=new IText(); $all->table=1; echo '<form method="post" action="?p_action=company">'; echo dossier::hidden(); - echo "<table class=\"result\">"; - echo "<tr>".$all->IOValue("p_name",$my->MY_NAME,"Nom société")."</tr>"; - echo "<tr>".$all->IOValue("p_tel",$my->MY_TEL,"Téléphone")."</tr>"; - echo "<tr>".$all->IOValue("p_fax",$my->MY_FAX,"Fax")."</tr>"; - echo "<tr>".$all->IOValue("p_street",$my->MY_STREET,"Rue ")."</tr>"; - echo "<tr>".$all->IOValue("p_no",$my->MY_NUMBER,"Numéro")."</tr>"; - echo "<tr>".$all->IOValue("p_cp",$my->MY_CP,"Code Postal")."</tr>"; - echo "<tr>".$all->IOValue("p_Commune",$my->MY_COMMUNE,"Commune")."</tr>"; - echo "<tr>".$all->IOValue("p_pays",$my->MY_PAYS,"Pays")."</tr>"; - echo "<tr>".$all->IOValue("p_tva",$my->MY_TVA,"Numéro de Tva")."</tr>"; + echo "<table class=\"result\" style=\"width:70%\">"; + echo "<tr>".td(_('Nom société')).$all->input("p_name",$my->MY_NAME)."</tr>"; + echo "<tr>".td(_("Téléphone")).$all->input("p_tel",$my->MY_TEL)."</tr>"; + echo "<tr>".td(_("Fax")).$all->input("p_fax",$my->MY_FAX)."</tr>"; + echo "<tr>".td(_("Rue ")).$all->input("p_street",$my->MY_STREET)."</tr>"; + echo "<tr>".td(_("Numéro")).$all->input("p_no",$my->MY_NUMBER)."</tr>"; + echo "<tr>".td(_("Code Postal")).$all->input("p_cp",$my->MY_CP)."</tr>"; + echo "<tr>".td(_("Commune")).$all->input("p_Commune",$my->MY_COMMUNE)."</tr>"; + echo "<tr>".td(_("Pays")).$all->input("p_pays",$my->MY_PAYS)."</tr>"; + echo "<tr>".td(_("Numéro de Tva")).$all->input("p_tva",$my->MY_TVA)."</tr>"; if ( $User->check_action(PARCA)==0) $compta->setReadonly(true); - echo "<tr>".$compta->IOValue("p_compta",$array,"Utilisation de la compta. analytique")."</tr>"; + echo "<tr>".td(_("Utilisation de la compta. analytique")).$compta->input("p_compta",$array)."</tr>"; if ( $User->check_action(PARSTR)==0) $strict->setReadonly(true); - echo "<tr>".$strict->IOValue("p_strict",$strict_array,"Utilisation du mode strict ")."</tr>"; + echo "<tr>".td(_("Utilisation du mode strict ")).$strict->input("p_strict",$strict_array)."</tr>"; if ( $User->check_action(PARTVA)==0) $tva_use->setReadonly(true); - echo "<tr>".$tva_use->IOValue("p_tva_use",$strict_array,"Assujetti à la tva")."</tr>"; - echo "<tr>".$pj_suggest->IOValue("p_pj",$strict_array,"Suggérer le numéro de pièce justificative")."</tr>"; - + echo "<tr>".td(_("Assujetti à la tva")).$tva_use->input("p_tva_use",$strict_array)."</tr>"; + echo "<tr>".td(_("Suggérer le numéro de pièce justificative")).$pj_suggest->input("p_pj",$strict_array)."</tr>"; + echo '<tr>'.td(_('Afficher la période comptable pour éviter les erreurs de date')).$check_periode->input('p_check_periode',$strict_array).'</tr>'; echo "</table>"; - $submit=new widget("submit"); - echo widget::submit("record_company","Enregistre"); + echo HtmlInput::submit("record_company",_("Sauve")); echo "</form>"; echo '</div>'; exit(); diff --git a/html/poste_csv.php b/html/poste_csv.php index dd6895d0b..95f14fc5c 100644 --- a/html/poste_csv.php +++ b/html/poste_csv.php @@ -22,7 +22,7 @@ * \brief Send the poste list in csv */ include_once("ac_common.php"); -include_once ("postgres.php"); +require_once('class_database.php'); include ('class_user.php'); require_once("class_acc_account_ledger.php"); require_once ('class_acc_operation.php'); @@ -33,7 +33,7 @@ require_once('class_dossier.php'); $gDossier=dossier::id(); /* Admin. Dossier */ -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $User=new User($cn); @@ -43,11 +43,11 @@ $User->can_request(IMPPOSTE,0); if ( isset ( $_REQUEST['poste_fille']) ) { //choisit de voir tous les postes - $a_poste=get_array($cn,"select pcm_val from tmp_pcmn where pcm_val::text like '".$_REQUEST["poste_id"]."%'"); + $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like '".$_REQUEST["poste_id"]."%'"); } else { - $a_poste=get_array($cn,"select pcm_val from tmp_pcmn where pcm_val = '".$_REQUEST['poste_id']."'"); + $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val = '".$_REQUEST['poste_id']."'"); } if ( ! isset ($_REQUEST['oper_detail'])) { @@ -58,7 +58,7 @@ if ( ! isset ($_REQUEST['oper_detail'])) { { $Poste=new Acc_Account_Ledger($cn,$pos['pcm_val']); $Poste->get_name(); - list($array,$tot_deb,$tot_cred)=$Poste->get_row( $_REQUEST['from_periode'], + list($array,$tot_deb,$tot_cred)=$Poste->get_row_date( $_REQUEST['from_periode'], $_REQUEST['to_periode'] ); if ( count($Poste->row ) == 0 ) @@ -76,7 +76,7 @@ if ( ! isset ($_REQUEST['oper_detail'])) { foreach ( $Poste->row as $op ) { echo '"'.$pos['pcm_val'].'";'. '"'.$op['jr_internal'].'"'.";". - '"'.$op['j_date'].'"'.";". + '"'.$op['j_date_fmt'].'"'.";". '"'.$op['description']." ".$op['jr_pj_number'].'"'.";". sprintf("%8.4f",$op['deb_montant']).";". sprintf("%8.4f",$op['cred_montant']); @@ -101,7 +101,7 @@ if ( ! isset ($_REQUEST['oper_detail'])) { { $Poste=new Acc_Account_Ledger($cn,$pos['pcm_val']); $Poste->get_name(); - list($array,$tot_deb,$tot_cred)=$Poste->get_row( $_REQUEST['from_periode'], + list($array,$tot_deb,$tot_cred)=$Poste->get_row_date( $_REQUEST['from_periode'], $_REQUEST['to_periode'] ); if ( count($Poste->row ) == 0 ) diff --git a/html/poste_pdf.php b/html/poste_pdf.php index f897100ec..3fa014fa2 100644 --- a/html/poste_pdf.php +++ b/html/poste_pdf.php @@ -25,10 +25,9 @@ */ include_once("class_acc_account_ledger.php"); include_once("ac_common.php"); -include_once("postgres.php"); +require_once('class_database.php'); include_once("class.ezpdf.php"); include_once("impress_inc.php"); -require_once("poste.php"); require_once ('header_print.php'); require_once('class_dossier.php'); require_once('class_user.php'); @@ -36,7 +35,7 @@ require_once('class_user.php'); $gDossier=dossier::id(); /* Security */ -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $User=new User($cn); $User->Check(); $User->check_dossier($gDossier); @@ -45,9 +44,9 @@ $User->can_request(IMPPOSTE,0); extract($_POST); if ( isset ( $poste_fille) ){ //choisit de voir tous les postes - $a_poste=get_array($cn,"select pcm_val from tmp_pcmn where pcm_val::text like '$poste_id%'"); + $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like '$poste_id%'"); } else - $a_poste=get_array($cn,"select pcm_val from tmp_pcmn where pcm_val::text = '$poste_id'"); + $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text = '$poste_id'"); $ret=""; @@ -64,7 +63,7 @@ foreach ($a_poste as $poste) { echo_debug("poste_pdf",__LINE__,$poste); $Poste=new Acc_Account_Ledger($cn,$poste['pcm_val']); - list($array,$tot_deb,$tot_cred)=$Poste->get_row($from_periode,$to_periode); + list($array,$tot_deb,$tot_cred)=$Poste->get_row_date($from_periode,$to_periode); // don't print empty account if ( count($array) == 0 ) { continue; @@ -74,7 +73,7 @@ foreach ($a_poste as $poste) // $pdf->ezText($Libelle,30); $pdf->ezTable($array, array ('jr_internal'=>'Operation', - 'j_date' => 'Date', + 'j_date_fmt' => 'Date', 'jrn_name'=>'Journal', 'description'=>'Description', 'deb_montant'=> 'Montant', diff --git a/html/poste_search.php b/html/poste_search.php index 1d95a5c75..4f69eab05 100644 --- a/html/poste_search.php +++ b/html/poste_search.php @@ -26,16 +26,14 @@ include_once ("ac_common.php"); require_once('class_acc_ledger.php'); html_min_page_start($_SESSION['g_theme'],'onLoad="window.focus();"'); -include_once ("postgres.php"); +require_once('class_database.php'); include_once("jrn.php"); /* Admin. Dossier */ -$rep=DbConnect(); +$rep=new Database(); include_once ("class_user.php"); $User=new User($rep); $User->Check(); -echo JS_SEARCH_POSTE; - require_once('class_dossier.php'); $gDossier=dossier::id(); @@ -44,14 +42,14 @@ $c_class=""; extract ($_GET); $condition=""; -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); if ( isset($_GET['search']) ) { $c1=0; $condition=""; if ( strlen(trim($p_comment)) != 0 ) { - $condition=" where (upper(pcm_lib) like upper('%".pg_escape_string($p_comment)."%') or ". - " pcm_val::text like '%".pg_escape_string($p_comment)."%') "; + $condition=" where (upper(pcm_lib) like upper('%".Database::escape_string($p_comment)."%') or ". + " pcm_val::text like '%".Database::escape_string($p_comment)."%') "; } } @@ -125,25 +123,25 @@ echo_debug('poste_search.php',__LINE__,"condition = $condition"); echo '<FORM ACTION="poste_search.php'.$url.'" METHOD="GET">'; echo dossier::hidden(); -echo widget::hidden('ctrl',$_GET['ctrl']); +echo HtmlInput::hidden('ctrl',$_GET['ctrl']); if ( isset($p_ctl) ) { echo '<INPUT TYPE="hidden" name="p_ctl" value="'.$p_ctl.'">'; } -if (isset ($ret)) echo widget::hidden('ret',$ret); +if (isset ($ret)) echo HtmlInput::hidden('ret',$ret); echo 'Libellé ou poste comptable '; echo ' contient '; if ( ! isset ($p_comment) ) $p_comment=""; echo ' <INPUT TYPE="text" name="p_comment" VALUE="'.$p_comment.'"></TD></TR>'; -echo '<INPUT TYPE="submit" name="search" value="cherche">'; +echo HtmlInput::submit('search','cherche'); echo '</FORM>'; echo '<p class="notice">Nombre de lignes affichées est limité</p>'; // if request search if ( isset($_GET['search']) || isset($_GET['filter']) ) { - $Res=ExecSql($cn,"select pcm_val,html_quote(pcm_lib) as pcm_lib from tmp_pcmn $condition order by pcm_val::text ". + $Res=$cn->exec_sql("select pcm_val,html_quote(pcm_lib) as pcm_lib from tmp_pcmn $condition order by pcm_val::text ". " limit 100"); - $MaxLine=pg_NumRows($Res); + $MaxLine=Database::num_row($Res); if ( $MaxLine==0) { html_page_stop(); return; @@ -153,15 +151,15 @@ if ( isset($_GET['search']) || isset($_GET['filter']) ) { $ahref=""; $end_ahref=""; for ( $i=0; $i < $MaxLine; $i++) { - $l_line=pg_fetch_array($Res,$i); + $l_line=Database::fetch_array($Res,$i); $even=($i%2 == 0)?"odd":"even"; echo "<TR class=\"$even\">"; // if p_ctl is set we need to be able to return the value if (isset($ret) && $ret == 'label' ){ $slabel=FormatString($l_line['pcm_lib']); - $ahref='<A href="#" class="mtitle" onClick="SetItChild(\''.$p_ctl.'\',\''.$l_line['pcm_val'].'\',\''. - $slabel.'\',\''.$ctrl.'\')">'; - + $set_pcmval='set_inparent(\''.$p_ctl.'\',\''.$l_line['pcm_val'].'\')'; + $set_label='set_inparent(\''.$ctrl.'\',\''.$slabel.'\')'; + $ahref='<A href="#" class="mtitle" onClick="'.$set_pcmval.';'.$set_label.'; window.close();">'; $end_ahref='</A>'; } else if (isset($ret) && $ret == 'poste' ){ diff --git a/html/print_balance.php b/html/print_balance.php index 62e2045c1..ac6f45c88 100644 --- a/html/print_balance.php +++ b/html/print_balance.php @@ -33,17 +33,15 @@ // $Revision$ include_once("ac_common.php"); -include_once("postgres.php"); +require_once('class_database.php'); include_once("class.ezpdf.php"); -include_once("poste.php"); include_once("class_acc_balance.php"); -include_once("preference.php"); require_once ('header_print.php'); require_once('class_dossier.php'); $gDossier=dossier::id(); -$cn=DbConnect($gDossier); -$rep=DbConnect(); +$cn=new Database($gDossier); +$rep=new Database(); include ('class_user.php'); $User=new User($rep); $User->Check(); @@ -81,8 +79,9 @@ if ( sizeof($array) == 0 ) { exit(); } -$a=get_periode($cn,$from_periode); -$b=get_periode($cn,$to_periode); +$pPeriode=new Periode($cn); +$a=$pPeriode->get_date_limit($from_periode); +$b=$pPeriode->get_date_limit($to_periode); $per_text=utf8_decode(" période du ").$a['p_start']." au ".$b['p_end']; $pdf=new Cezpdf('a4'); $pdf->selectFont('./addon/fonts/Helvetica.afm'); diff --git a/html/priv_user.php b/html/priv_user.php index 20c06811f..89a4648d4 100644 --- a/html/priv_user.php +++ b/html/priv_user.php @@ -21,12 +21,12 @@ * \brief Users Security */ include_once("ac_common.php"); -include_once("postgres.php"); +require_once('class_database.php'); include_once("debug.php"); include_once("user_menu.php"); html_page_start($_SESSION['g_theme']); -$rep=DbConnect(); +$rep=new Database(); include_once ("class_user.php"); $User=new User($rep); $User->Check(); @@ -37,25 +37,18 @@ if ($User->admin != 1) { return; } -if (! isset ($_GET['UID']) && ! isset($_POST['UID']) ) { - //Message d'erreur si UID non positionné - echo_debug('priv_user.php',__LINE__,"UID NOT DEFINED"); - html_page_stop(); - return; +if (! isset ($_REQUEST['UID']) ) { + html_page_stop(); + exit(); } -$uid=( isset ($_GET['UID']))? $_GET['UID']: $_POST['UID']; +$uid=$_REQUEST['UID']; $UserChange=new User($rep,$uid); -echo_debug('priv_user.php',__LINE__,"UID IS DEFINED"); - $r_UID=$UserChange->id; if ( $r_UID == false ) { - echo_debug('priv_user.php',__LINE__,"UID NOT VALID"); // Message d'erreur html_page_stop(); - return; } -echo_debug('priv_user.php',__LINE__,"UID IS VALID"); echo '<H2 class="info"> Administration Globale</H2>'; echo "<div>".MenuAdmin()."</div>"; @@ -74,9 +67,9 @@ echo '<h2>Gestion Utilisateurs</h2>'; <?php /* Parse the changes */ if ( isset ( $_GET['reset_passwd']) ){ - $cn=DbConnect(); + $cn=new Database(); $l_pass=md5('phpcompta'); - $Res=ExecSql($cn, "update ac_users set use_pass='$l_pass' where use_id=$uid"); + $Res=$cn->exec_sql( "update ac_users set use_pass='$l_pass' where use_id=$uid"); echo '<H2 class="info"> Password remis à phpcompta</H2>'; } /* Save the changes */ @@ -84,48 +77,44 @@ if ( isset ($_POST['SAVE']) ){ $uid = $_POST['UID']; // Update User - $cn=DbConnect(); - $last_name=pg_escape_string($_POST['fname']); - $first_name=pg_escape_string($_POST['lname']); + $cn=new Database(); + $last_name=$_POST['fname']; + $first_name=$_POST['lname']; + $UserChange=new User($cn,$uid); + if ( $UserChange->load()==-1) { + alert("Cet utilisateur n'existe pas");} + else { + $UserChange->first_name=$first_name; + $UserChange->last_name=$last_name; + $UserChange->active=$_POST['Actif']; + $UserChange->admin=$_POST['Admin']; + $UserChange->save(); + + // Update Priv on Folder + foreach ($_POST as $name=>$elem) + { + echo_debug('priv_user.php',__LINE__,"_POST $name $elem"); + if ( substr_count($name,'PRIV')!=0 ) + { + echo_debug('priv_user.php',__LINE__,"Found a priv"); + $db_id=substr($name,4); + $cn=new Database(); + $UserChange->set_folder_access($db_id,$elem); + + } - $Sql="update ac_users set use_first_name='".$first_name."', use_name='".$last_name."' - ,use_active=".$_POST['Actif'].",use_admin=".$_POST['Admin']." where - use_id=".$uid; - $Res=ExecSql($cn,$Sql); - // Update Priv on Folder - foreach ($_POST as $name=>$elem) - { - echo_debug('priv_user.php',__LINE__,"_POST $name $elem"); - if ( substr_count($name,'PRIV')!=0 ) - { - echo_debug('priv_user.php',__LINE__,"Found a priv"); - $db_id=substr($name,4); - $cn=DbConnect(); - if ( ExisteJnt($db_id,$uid) != 1 ) - { - $Res=ExecSql($cn,"insert into jnt_use_dos(dos_id,use_id) values(".$db_id.",".$uid.")"); - } - - $jnt=GetJnt($db_id,$uid); - if (ExistePriv($jnt) > 0) - { - $Res=ExecSql($cn,"update priv_user set priv_priv='".$elem."' where priv_jnt=".$jnt); - } else { - $Res=ExecSql($cn,"insert into priv_user(priv_jnt,priv_priv) values (".$jnt.",'".$elem."')"); - } - - } - - } + } + } } else { if ( isset ($_POST["DELETE"]) ) { - $cn=DbConnect(); - $Res=ExecSql($cn,"delete from priv_user where priv_jnt in ( select jnt_id from jnt_use_dos where use_id=".$uid.")"); - $Res=ExecSql($cn,"delete from jnt_use_dos where use_id=".$uid); - $Res=ExecSql($cn,"delete from ac_users where use_id=".$uid); + $cn=new Database(); + $Res=$cn->exec_sql("delete from priv_user where priv_jnt in ( select jnt_id from jnt_use_dos where use_id=$1",array($uid)); + $Res=$cn->exec_sql("delete from jnt_use_dos where use_id=$1",array($uid)); + $Res=$cn->exec_sql("delete from ac_users where use_id=$1",array($uid)); - echo "<center><H2 class=\"info\"> User ".$_POST['fname']." ".$_POST['lname']." (". - $_POST['login'].") is deleted </H2></CENTER>"; + echo "<center><H2 class=\"info\"> User ".h($_POST['fname'])." ".h($_POST['lname'])." (". + h($_POST['login']).") est effacé</H2></CENTER>"; +require_once("class_iselect.php"); require_once("user.inc.php"); return; } @@ -195,32 +184,34 @@ $array=array( array('value'=>'R','label'=>'Utilisateur normal'), array('value'=>'L','label'=>'Administrateur local(Tous les droits)') ); +$repo=new Dossier(0); -$Dossier=ShowDossier('all',1,0); +$Dossier=$repo->show_dossier('all',1,0); if ( empty ( $Dossier )) { - echo '* Aucun Dossier *'; + echo hb('* Aucun Dossier *'); echo '</div>'; exit(); } -$mod_user=new User(DbConnect(),$uid); + +$mod_user=new User(new Database(),$uid); foreach ( $Dossier as $rDossier) { - $priv=$mod_user->get_privilege($rDossier['dos_id']); + $priv=$mod_user->get_folder_access($rDossier['dos_id']); printf("<TR><TD> Dossier : %s </TD>",h($rDossier['dos_name'])); - $select=new widget('select'); + $select=new ISelect(); $select->table=1; $select->name=sprintf('PRIV%s',$rDossier['dos_id']); $select->value=$array; $select->selected=$priv; - echo $select->IOValue(); + echo $select->input(); echo "</TD></TR>"; } ?> </TABLE> -<?php echo widget::button_href('Reinitialiser le mot de passe', +<?php echo HtmlInput::button_anchor('Reinitialiser le mot de passe', sprintf('priv_user.php?reset_passwd&UID=%s',$uid)); ?> diff --git a/html/quick_code_csv.php b/html/quick_code_csv.php index 475676dff..ff657dcb3 100644 --- a/html/quick_code_csv.php +++ b/html/quick_code_csv.php @@ -22,7 +22,7 @@ * \brief Send the poste list in csv */ include_once("ac_common.php"); -include_once ("postgres.php"); +require_once('class_database.php'); include ('class_user.php'); require_once("class_fiche.php"); header('Content-type: application/csv'); @@ -31,7 +31,7 @@ require_once('class_dossier.php'); $gDossier=dossier::id(); /* Admin. Dossier */ -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $User=new User($cn); @@ -39,7 +39,7 @@ $User->Check(); $Fiche=new fiche($cn,$_REQUEST['f_id']); $Fiche->getName(); -list($array,$tot_deb,$tot_cred)=$Fiche->get_row( +list($array,$tot_deb,$tot_cred)=$Fiche->get_row_date( $_POST['from_periode'], $_POST['to_periode'] ); @@ -61,7 +61,7 @@ printf("\n"); foreach ( $Fiche->row as $op ) { echo '"'.$op['j_qcode'].'";'. '"'.$op['jr_internal'].'"'.";". - '"'.$op['j_date'].'"'.";". + '"'.$op['j_date_fmt'].'"'.";". '"'.$op['description'].'"'.";". sprintf("%8.4f",$op['deb_montant']).";". sprintf("%8.4f",$op['cred_montant']); diff --git a/html/quick_code_pdf.php b/html/quick_code_pdf.php index 07d661475..c220293b7 100644 --- a/html/quick_code_pdf.php +++ b/html/quick_code_pdf.php @@ -25,7 +25,7 @@ */ include_once("class_acc_account_ledger.php"); include_once("ac_common.php"); -include_once("postgres.php"); +require_once('class_database.php'); include_once("class.ezpdf.php"); include_once("impress_inc.php"); require_once("class_fiche.php"); @@ -33,7 +33,7 @@ require_once ('header_print.php'); require_once('class_dossier.php'); $gDossier=dossier::id(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); foreach ($_POST as $key=>$element) { ${"$key"}=$element; } @@ -47,17 +47,17 @@ echo_debug("quick_code_pdf",__LINE__,$f_id); $Fiche=new fiche($cn,$f_id); -list($array,$tot_deb,$tot_cred)=$Fiche->get_row($from_periode,$to_periode); +list($array,$tot_deb,$tot_cred)=$Fiche->get_row_date($from_periode,$to_periode); // don't print empty account if ( count($array) == 0 ) { continue; } -$Libelle=sprintf("(%s) %s ",$Fiche->id,$Fiche->getName()); +$Libelle=utf8_decode(sprintf("(%s) %s ",$Fiche->id,$Fiche->getName())); header_pdf($cn,$pdf); // $pdf->ezText($Libelle,30); $pdf->ezTable($array, array ('jr_internal'=>'Operation', - 'j_date' => 'Date', + 'j_date_fmt' => 'Date', 'jrn_name'=>'Journal', 'description'=>'Description', 'deb_montant'=> 'Montant', diff --git a/html/recherche.php b/html/recherche.php index 6dd4703e9..fc831bc29 100644 --- a/html/recherche.php +++ b/html/recherche.php @@ -18,25 +18,39 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -require_once('class_dossier.php'); -include_once("ac_common.php"); -require_once("user_menu.php"); -include_once ("constant.php"); -include_once("jrn.php"); -include_once("user_common.php"); -include_once("class_widget.php"); /*! \file * \brief Search module */ - +require_once('class_dossier.php'); +include_once("ac_common.php"); +include_once ("constant.php"); +require_once('class_acc_ledger.php'); +require_once('class_ipopup.php'); html_page_start($_SESSION['g_theme']); + + + +echo js_include('prototype.js'); +echo js_include('acc_ledger.js'); +echo js_include('card.js'); +echo js_include('scripts.js'); +echo JS_INFOBULLE; +echo js_include('accounting_item.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); + +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; + $gDossier=dossier::id(); -include_once ("postgres.php"); -include_once ("check_priv.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include_once ('class_user.php'); $User=new User($cn); $User->Check(); @@ -45,10 +59,18 @@ $User->Check(); $sessid=$_REQUEST['PHPSESSID']; // display a search box -$search_box=u_ShowMenuRecherche($cn,0,$sessid,$_GET); -echo '<DIV class="lextmenu">'; // class="recherche_form">'; + +$ledger=new Acc_Ledger($cn,0); +$search_box=$ledger->search_form('ALL',1); +echo '<div class="content">'; +echo IPoste::ipopup('ipop_account'); +echo $search_card->input(); + +echo '<form method="GET">'; echo $search_box; -echo "</div>"; +echo HtmlInput::submit("viewsearch","Recherche"); +echo '</form>'; + //----------------------------------------------------- // Display search result //----------------------------------------------------- @@ -58,24 +80,22 @@ if ( isset ($_GET['viewsearch'])) { $step=$_SESSION['g_pagesize']; $page=(isset($_GET['offset']))?$_GET['page']:1; $offset=(isset($_GET['offset']))?$_GET['offset']:0; - if (count ($_GET) == 0) + if (count ($_GET) == 0) $array=null; else $array=$_GET; + $array['p_action']='ALL'; + list($sql,$where)=$ledger->build_search_sql($array); + // Count nb of line + $max_line=$cn->count_sql($sql); - list($max_line,$a)=ListJrn($cn,0,"",$array,$offset,2); - + list($count,$a)=$ledger->list_operation($sql,$offset,0); $bar=jrn_navigation_bar($offset,$max_line,$step,$page); - - echo '<div class="u_redcontent">'; - - echo $bar; echo $a; echo $bar; - echo '</div>'; + } -echo '</DIV>'; - +echo '</div>'; ?> diff --git a/html/remove_op.php b/html/remove_op.php index 2217dcf94..091896038 100644 --- a/html/remove_op.php +++ b/html/remove_op.php @@ -27,13 +27,18 @@ * */ -require_once ("postgres.php"); +require_once('class_database.php'); require_once ("debug.php"); require_once ("class_user.php"); require_once('class_dossier.php'); +require_once ('class_user.php'); $gDossier=dossier::id(); -/*!\todo Add the security here */ -$cn=DbConnect($gDossier); -ExecSqlParam($cn,"delete from operation_analytique where oa_group=$1",array($_GET['oa'])); + +$cn=new Database($gDossier); +$User=new User($cn); +$User->Check(); + + +$cn->exec_sql("delete from operation_analytique where oa_group=$1",array($_GET['oa'])); echo_debug(__FILE__,__LINE__,$_GET); ?> diff --git a/html/richtext.js b/html/richtext.js deleted file mode 100644 index a2d9d6316..000000000 --- a/html/richtext.js +++ /dev/null @@ -1,608 +0,0 @@ -// 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('<style type="text/css">@import "' + includesPath + 'rte.css";</style>'); - - //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('<div class="rteDiv">'); - if (buttons == true) { - document.writeln('<table class="rteBack" cellpadding=2 cellspacing=0 id="Buttons1_' + rte + '" width="' + tablewidth + '">'); - document.writeln(' <tr>'); - document.writeln(' <td>'); - document.writeln(' <select id="formatblock_' + rte + '" onchange="selectFont(\'' + rte + '\', this.id);">'); - document.writeln(' <option value="">[Style]</option>'); - document.writeln(' <option value="<p>">Paragraph <p></option>'); - document.writeln(' <option value="<h1>">Heading 1 <h1></option>'); - document.writeln(' <option value="<h2>">Heading 2 <h2></option>'); - document.writeln(' <option value="<h3>">Heading 3 <h3></option>'); - document.writeln(' <option value="<h4>">Heading 4 <h4></option>'); - document.writeln(' <option value="<h5>">Heading 5 <h5></option>'); - document.writeln(' <option value="<h6>">Heading 6 <h6></option>'); - document.writeln(' <option value="<address>">Address <ADDR></option>'); - document.writeln(' <option value="<pre>">Formatted <pre></option>'); - document.writeln(' </select>'); - document.writeln(' </td>'); - document.writeln(' <td>'); - document.writeln(' <select id="fontname_' + rte + '" onchange="selectFont(\'' + rte + '\', this.id)">'); - document.writeln(' <option value="Font" selected>[Font]</option>'); - document.writeln(' <option value="Arial, Helvetica, sans-serif">Arial</option>'); - document.writeln(' <option value="Courier New, Courier, mono">Courier New</option>'); - document.writeln(' <option value="Times New Roman, Times, serif">Times New Roman</option>'); - document.writeln(' <option value="Verdana, Arial, Helvetica, sans-serif">Verdana</option>'); - document.writeln(' </select>'); - document.writeln(' </td>'); - document.writeln(' <td>'); - document.writeln(' <select unselectable="on" id="fontsize_' + rte + '" onchange="selectFont(\'' + rte + '\', this.id);">'); - document.writeln(' <option value="Size">[Size]</option>'); - document.writeln(' <option value="1">1</option>'); - document.writeln(' <option value="2">2</option>'); - document.writeln(' <option value="3">3</option>'); - document.writeln(' <option value="4">4</option>'); - document.writeln(' <option value="5">5</option>'); - document.writeln(' <option value="6">6</option>'); - document.writeln(' <option value="7">7</option>'); - document.writeln(' </select>'); - document.writeln(' </td>'); - document.writeln(' <td width="100%">'); - document.writeln(' </td>'); - document.writeln(' </tr>'); - document.writeln('</table>'); - document.writeln('<table class="rteBack" cellpadding="0" cellspacing="0" id="Buttons2_' + rte + '" width="' + tablewidth + '">'); - document.writeln(' <tr>'); - document.writeln(' <td><img id="bold" class="rteImage" src="' + imagesPath + 'bold.gif" width="25" height="24" alt="Bold" title="Bold" onClick="rteCommand(\'' + rte + '\', \'bold\', \'\')"></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'italic.gif" width="25" height="24" alt="Italic" title="Italic" onClick="rteCommand(\'' + rte + '\', \'italic\', \'\')"></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'underline.gif" width="25" height="24" alt="Underline" title="Underline" onClick="rteCommand(\'' + rte + '\', \'underline\', \'\')"></td>'); - document.writeln(' <td><img class="rteVertSep" src="' + imagesPath + 'blackdot.gif" width="1" height="20" border="0" alt=""></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'left_just.gif" width="25" height="24" alt="Align Left" title="Align Left" onClick="rteCommand(\'' + rte + '\', \'justifyleft\', \'\')"></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'centre.gif" width="25" height="24" alt="Center" title="Center" onClick="rteCommand(\'' + rte + '\', \'justifycenter\', \'\')"></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'right_just.gif" width="25" height="24" alt="Align Right" title="Align Right" onClick="rteCommand(\'' + rte + '\', \'justifyright\', \'\')"></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'justifyfull.gif" width="25" height="24" alt="Justify Full" title="Justify Full" onclick="rteCommand(\'' + rte + '\', \'justifyfull\', \'\')"></td>'); - document.writeln(' <td><img class="rteVertSep" src="' + imagesPath + 'blackdot.gif" width="1" height="20" border="0" alt=""></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'hr.gif" width="25" height="24" alt="Horizontal Rule" title="Horizontal Rule" onClick="rteCommand(\'' + rte + '\', \'inserthorizontalrule\', \'\')"></td>'); - document.writeln(' <td><img class="rteVertSep" src="' + imagesPath + 'blackdot.gif" width="1" height="20" border="0" alt=""></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'numbered_list.gif" width="25" height="24" alt="Ordered List" title="Ordered List" onClick="rteCommand(\'' + rte + '\', \'insertorderedlist\', \'\')"></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'list.gif" width="25" height="24" alt="Unordered List" title="Unordered List" onClick="rteCommand(\'' + rte + '\', \'insertunorderedlist\', \'\')"></td>'); - document.writeln(' <td><img class="rteVertSep" src="' + imagesPath + 'blackdot.gif" width="1" height="20" border="0" alt=""></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'outdent.gif" width="25" height="24" alt="Outdent" title="Outdent" onClick="rteCommand(\'' + rte + '\', \'outdent\', \'\')"></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'indent.gif" width="25" height="24" alt="Indent" title="Indent" onClick="rteCommand(\'' + rte + '\', \'indent\', \'\')"></td>'); - document.writeln(' <td><div id="forecolor_' + rte + '"><img class="rteImage" src="' + imagesPath + 'textcolor.gif" width="25" height="24" alt="Text Color" title="Text Color" onClick="dlgColorPalette(\'' + rte + '\', \'forecolor\', \'\')"></div></td>'); - document.writeln(' <td><div id="hilitecolor_' + rte + '"><img class="rteImage" src="' + imagesPath + 'bgcolor.gif" width="25" height="24" alt="Background Color" title="Background Color" onClick="dlgColorPalette(\'' + rte + '\', \'hilitecolor\', \'\')"></div></td>'); - document.writeln(' <td><img class="rteVertSep" src="' + imagesPath + 'blackdot.gif" width="1" height="20" border="0" alt=""></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'hyperlink.gif" width="25" height="24" alt="Insert Link" title="Insert Link" onClick="insertLink(\'' + rte + '\')"></td>'); - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'image.gif" width="25" height="24" alt="Add Image" title="Add Image" onClick="addImage(\'' + rte + '\')"></td>'); - document.writeln(' <td><div id="table_' + rte + '"><img class="rteImage" src="' + imagesPath + 'insert_table.gif" width="25" height="24" alt="Insert Table" title="Insert Table" onClick="dlgInsertTable(\'' + rte + '\', \'table\', \'\')"></div></td>'); - if (isIE) { - document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'spellcheck.gif" width="25" height="24" alt="Spell Check" title="Spell Check" onClick="checkspell()"></td>'); - } - // document.writeln(' <td><img class="rteVertSep" src="' + imagesPath + 'blackdot.gif" width="1" height="20" border="0" alt=""></td>'); - // document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'cut.gif" width="25" height="24" alt="Cut" title="Cut" onClick="rteCommand(\'' + rte + '\', \'cut\')"></td>'); - // document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'copy.gif" width="25" height="24" alt="Copy" title="Copy" onClick="rteCommand(\'' + rte + '\', \'copy\')"></td>'); - // document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'paste.gif" width="25" height="24" alt="Paste" title="Paste" onClick="rteCommand(\'' + rte + '\', \'paste\')"></td>'); - // document.writeln(' <td><img class="rteVertSep" src="' + imagesPath + 'blackdot.gif" width="1" height="20" border="0" alt=""></td>'); - // document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'undo.gif" width="25" height="24" alt="Undo" title="Undo" onClick="rteCommand(\'' + rte + '\', \'undo\')"></td>'); - // document.writeln(' <td><img class="rteImage" src="' + imagesPath + 'redo.gif" width="25" height="24" alt="Redo" title="Redo" onClick="rteCommand(\'' + rte + '\', \'redo\')"></td>'); - document.writeln(' <td width="100%"></td>'); - document.writeln(' </tr>'); - document.writeln('</table>'); - } - document.writeln('<iframe id="' + rte + '" name="' + rte + '" width="' + width + 'px" height="' + height + 'px" src="' + includesPath + 'blank.htm"></iframe>'); - if (!readOnly) document.writeln('<br /><input type="checkbox" id="chkSrc' + rte + '" disabled onclick="toggleHTMLSrc(\'' + rte + '\');" /> View Source'); - document.writeln('<iframe width="154" height="104" id="cp' + rte + '" src="' + includesPath + 'palette.htm" marginwidth="0" marginheight="0" scrolling="no" style="visibility:hidden; position: absolute;"></iframe>'); - document.writeln('<input type="hidden" id="hdn' + rte + '" name="' + rte + '" value="">'); - document.writeln('</div>'); - - document.getElementById('hdn' + rte).value = html; - enableDesignMode(rte, html, readOnly); - } else { - if (!readOnly) { - document.writeln('<textarea name="' + rte + '" id="' + rte + '" style="width: ' + width + 'px; height: ' + height + 'px;">' + html + '</textarea>'); - } else { - document.writeln('<textarea name="' + rte + '" id="' + rte + '" style="width: ' + width + 'px; height: ' + height + 'px;" readonly>' + html + '</textarea>'); - } - } -} - -function enableDesignMode(rte, html, readOnly) { - var frameHtml = "<html id=\"" + rte + "\">\n"; - frameHtml += "<head>\n"; - //to reference your stylesheet, set href property below to your stylesheet path and uncomment - if (cssFile.length > 0) { - frameHtml += "<link media=\"all\" type=\"text/css\" href=\"" + cssFile + "\" rel=\"stylesheet\">\n"; - } else { - frameHtml += "<style>\n"; - frameHtml += "body {\n"; - frameHtml += " background: #FFFFFF;\n"; - frameHtml += " margin: 0px;\n"; - frameHtml += " padding: 0px;\n"; - frameHtml += "}\n"; - frameHtml += "</style>\n"; - } - frameHtml += "</head>\n"; - frameHtml += "<body>\n"; - frameHtml += html + "\n"; - frameHtml += "</body>\n"; - frameHtml += "</html>"; - - 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("<hr") == -1 - && oHdnMessage.value.toLowerCase().search("<img") == -1) oHdnMessage.value = ""; - //fix for gecko - if (escape(oHdnMessage.value) == "%3Cbr%3E%0D%0A%0D%0A%0D%0A") oHdnMessage.value = ""; - } -} - -function rteCommand(rte, command, option) { - //function to perform command - var oRTE; - if (document.all) { - oRTE = frames[rte]; - } else { - oRTE = document.getElementById(rte).contentWindow; - } - - try { - oRTE.focus(); - oRTE.document.execCommand(command, false, option); - oRTE.focus(); - } catch (e) { -// alert(e); -// setTimeout("rteCommand('" + rte + "', '" + command + "', '" + option + "');", 10); - } -} - -function toggleHTMLSrc(rte) { - //contributed by Bob Hutzel (thanks Bob!) - var oRTE; - if (document.all) { - oRTE = frames[rte].document; - } else { - oRTE = document.getElementById(rte).contentWindow.document; - } - - if (document.getElementById("chkSrc" + rte).checked) { - showHideElement("Buttons1_" + rte, "hide"); - showHideElement("Buttons2_" + rte, "hide"); - if (document.all) { - oRTE.body.innerText = oRTE.body.innerHTML; - } else { - var htmlSrc = oRTE.createTextNode(oRTE.body.innerHTML); - oRTE.body.innerHTML = ""; - oRTE.body.appendChild(htmlSrc); - } - } else { - showHideElement("Buttons1_" + rte, "show"); - showHideElement("Buttons2_" + rte, "show"); - if (document.all) { - //fix for IE - var output = escape(oRTE.body.innerText); - output = output.replace("%3CP%3E%0D%0A%3CHR%3E", "%3CHR%3E"); - output = output.replace("%3CHR%3E%0D%0A%3C/P%3E", "%3CHR%3E"); - - oRTE.body.innerHTML = unescape(output); - } else { - var htmlSrc = oRTE.body.ownerDocument.createRange(); - htmlSrc.selectNodeContents(oRTE.body); - oRTE.body.innerHTML = htmlSrc.toString(); - } - } -} - -function dlgColorPalette(rte, command) { - //function to display or hide color palettes - setRange(rte); - - //get dialog position - var oDialog = document.getElementById('cp' + rte); - var buttonElement = document.getElementById(command + '_' + rte); - var iLeftPos = getOffsetLeft(buttonElement); - var iTopPos = getOffsetTop(buttonElement) + (buttonElement.offsetHeight + 4); - oDialog.style.left = (iLeftPos) + "px"; - oDialog.style.top = (iTopPos) + "px"; - - if ((command == parent.command) && (rte == currentRTE)) { - //if current command dialog is currently open, close it - if (oDialog.style.visibility == "hidden") { - showHideElement(oDialog, 'show'); - } else { - showHideElement(oDialog, 'hide'); - } - } else { - //if opening a new dialog, close all others - var vRTEs = allRTEs.split(";"); - for (var i = 0; i < vRTEs.length; i++) { - showHideElement('cp' + vRTEs[i], 'hide'); - } - showHideElement(oDialog, 'show'); - } - - //save current values - parent.command = command; - currentRTE = rte; -} - -function dlgInsertTable(rte, command) { - //function to open/close insert table dialog - //save current values - setRange(rte); - parent.command = command; - currentRTE = rte; - var windowOptions = 'history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=360,height=200'; - window.open(includesPath + 'insert_table.htm', 'InsertTable', windowOptions); -} - -function insertLink(rte) { - //function to insert link - var szURL = prompt("Enter a URL:", ""); - try { - //ignore error for blank urls - rteCommand(rte, "Unlink", null); - rteCommand(rte, "CreateLink", szURL); - } catch (e) { - //do nothing - } -} - -function setColor(color) { - //function to set color - var rte = currentRTE; - var parentCommand = parent.command; - - if (document.all) { - //retrieve selected range - var sel = frames[rte].document.selection; - if (parentCommand == "hilitecolor") parentCommand = "backcolor"; - if (sel != null) { - var newRng = sel.createRange(); - newRng = rng; - newRng.select(); - } - } - - rteCommand(rte, parentCommand, color); - showHideElement('cp' + rte, "hide"); -} - -function addImage(rte) { - //function to add image - imagePath = prompt('Enter Image URL:', 'http://'); - if ((imagePath != null) && (imagePath != "")) { - rteCommand(rte, 'InsertImage', imagePath); - } -} - -// 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 getOffsetTop(elm) { - var mOffsetTop = elm.offsetTop; - var mOffsetParent = elm.offsetParent; - var parents_up = 2; //the positioning div is 2 elements up the tree - - while(parents_up > 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/search_ca.php b/html/search_ca.php index d21a66360..fb5120e30 100644 --- a/html/search_ca.php +++ b/html/search_ca.php @@ -20,16 +20,18 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * * \brief show a screen to search a ca account * */ - + // parameter are gDossier,PHPSESSID , c1 : the control id to update, // c2 the control id which contains the pa_id -require_once ('postgres.php'); -require_once ('class_widget.php'); +require_once("class_itext.php"); +require_once("class_ihidden.php"); +require_once("class_ibutton.php"); +require_once ('class_database.php'); require_once ("ac_common.php"); require_once ('class_dossier.php'); require_once ('class_anc_account.php'); @@ -39,23 +41,23 @@ require_once ('class_anc_plan.php'); */ html_page_start(); - +print_r($_REQUEST); //------------- FORM ---------------------------------- echo '<FORM METHOD="GET">'; -$texte=new widget("text"); -echo '<span> Recherche :'; -echo $texte->IOValue('label'); +$texte=new IText(); +echo '<span>'._('Recherche').':'; +echo $texte->input('label'); echo '</span>'; echo dossier::hidden(); -$hid=new widget("hidden"); -echo $hid->IOValue("c1",$_REQUEST['c1']); -echo $hid->IOValue("c2",$_REQUEST['c2']); -echo $hid->IOValue("go"); -echo widget::submit("go","Recherche"); +$hid=new IHidden(); +echo $hid->input("c1",$_REQUEST['c1']); +echo $hid->input("c2",$_REQUEST['c2']); +echo $hid->input("go"); +echo HtmlInput::submit("go",_("Recherche")); echo '</form>'; //------------- FORM ---------------------------------- if ( isset($_REQUEST['go'])) { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $plan=new Anc_Plan($cn,$_REQUEST['c2']); $plan->pa_id=$_REQUEST['c2']; if ( $plan->exist()==false) @@ -63,27 +65,27 @@ if ( isset($_REQUEST['go'])) { $sql="select po_name , po_description from poste_analytique ". "where pa_id=".$_REQUEST['c2']." and ". - " upper (po_name) like upper('%".pg_escape_string($_REQUEST['label'])."%') order by po_name"; - $res=ExecSql($cn,$sql); - $array=pg_fetch_all($res); + " upper (po_name) like upper('%".Database::escape_string($_REQUEST['label'])."%') order by po_name"; + $res=$cn->exec_sql($sql); + $array=Database::fetch_all($res); if (empty($array) == true) { echo "Désolé aucun poste trouvé"; return; } - $button=new widget("button"); + $button=new IButton(); $button->name="Choix"; $button->label="Choix"; echo '<table>'; - foreach ($array as $line) + foreach ($array as $line) { - $button->javascript=sprintf("ca_set_child('%s','%s')", + $button->javascript=sprintf("set_inparent('%s','%s');window.close();", $_REQUEST['c1'], $line['po_name']); echo '<tr>'. '<td>'. - $button->IOValue(). + $button->input(). '</td>'. '<td>'. $line['po_name']. diff --git a/html/sec_pdf.php b/html/sec_pdf.php index fd47f282d..a866e625b 100755 --- a/html/sec_pdf.php +++ b/html/sec_pdf.php @@ -27,16 +27,15 @@ require_once('class_dossier.php'); $gDossier=dossier::id(); include_once("ac_common.php"); -include_once("postgres.php"); +require_once('class_database.php'); include_once("class.ezpdf.php"); -require_once("check_priv.php"); echo_debug('sec_pdf.php',__LINE__,"imp pdf securité"); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); //----------------------------------------------------- // Security // Check User -$rep=DbConnect(); +$rep=new Database(); include_once ("class_user.php"); $User=new User($rep); $User->Check(); @@ -71,10 +70,10 @@ if ( $SecUser->admin==1) $pdf->ezText('Administrateur',12,array('justification'=>'center')); //----------------------------------------------------- // Journal -$Res=ExecSql($cn,"select jrn_def_id,jrn_def_name from jrn_def "); +$Res=$cn->exec_sql("select jrn_def_id,jrn_def_name from jrn_def "); $SecUser->db=$cn; -for ($e=0;$e < pg_NumRows($Res);$e++) { - $row=pg_fetch_array($Res,$e); +for ($e=0;$e < Database::num_row($Res);$e++) { + $row=Database::fetch_array($Res,$e); $a_jrn[$e]['jrn_name']=utf8_decode($row['jrn_def_name']); $priv=$SecUser->check_jrn($row['jrn_def_id']); switch($priv) { @@ -100,15 +99,15 @@ $pdf->ezTable($a_jrn, //----------------------------------------------------- // Action -$Res=ExecSql($cn, +$Res=$cn->exec_sql( "select ac_id, ac_description from action order by ac_description "); -$Max=pg_NumRows($Res); +$Max=Database::num_row($Res); for ( $i =0 ; $i < $Max; $i++ ) { - $l_line=pg_fetch_array($Res,$i); + $l_line=Database::fetch_array($Res,$i); $action['lib']=utf8_decode($l_line['ac_description']); - $right=check_action($gDossier,$SecUser->login,$l_line['ac_id']); + $right=$SecUser->check_action($l_line['ac_id']); switch ($right) { case 0: $action['priv']=utf8_decode("Pas d'accès"); diff --git a/html/show_document.php b/html/show_document.php index 90eb2f3a9..8764a36ae 100644 --- a/html/show_document.php +++ b/html/show_document.php @@ -23,19 +23,30 @@ * \brief retrieve a document */ -include_once ("postgres.php"); +require_once('class_database.php'); require_once("ac_common.php"); require_once( "class_document.php"); require_once('class_dossier.php'); $gDossier=dossier::id(); -$cn=DbConnect($gDossier); - +$cn=new Database($gDossier); +$action=(isset($_REQUEST['a']))?$_REQUEST['a']:'sh'; require_once ('class_user.php'); -$User=new User(DbConnect()); -/*!\todo Add security here - */ +$User=new User(new Database()); $User->Check(); -// retrieve the document -$doc=new Document($cn,$_REQUEST['d_id']); -$doc->Send(); +$User->check_dossier($gDossier); +$User->can_request(GECOUR); +/* Show the document */ +if ( $action == 'sh') { + // retrieve the document + $doc=new Document($cn,$_REQUEST['d_id']); + $doc->Send(); +} +/* remove the document */ +if ( $action == 'rm' ) { + $doc=new Document($cn,$_REQUEST['d_id']); + $doc->remove(); + $json=sprintf('{"d_id":"%s"}',$_REQUEST['d_id']); + header("Content-type: text/html; charset: utf8",true); + print $json; +} \ No newline at end of file diff --git a/html/show_document_modele.php b/html/show_document_modele.php index 7917cc307..a681da250 100644 --- a/html/show_document_modele.php +++ b/html/show_document_modele.php @@ -23,33 +23,33 @@ * \brief send the document template */ -include_once ("postgres.php"); +require_once('class_database.php'); require_once("ac_common.php"); require_once('class_dossier.php'); $gDossier=dossier::id(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); require_once ('class_user.php'); -$User=new User(DbConnect()); +$User=new User(new Database()); /*!\todo Add security here */ $User->Check(); // retrieve the document -$r=ExecSql($cn,"select md_id,md_lob,md_filename,md_mimetype +$r=$cn->exec_sql("select md_id,md_lob,md_filename,md_mimetype from document_modele where md_id=".$_REQUEST['md_id']); -if ( pg_num_rows($r) == 0 ) { +if ( Database::num_row($r) == 0 ) { echo_error("Invalid Document"); exit; } -$row=pg_fetch_array($r,0); +$row=Database::fetch_array($r,0); -StartSql($cn); +$cn->start(); $tmp=tempnam($_ENV['TMP'],'document_'); -pg_lo_export($cn,$row['md_lob'],$tmp); +$cn->lo_export($row['md_lob'],$tmp); ini_set('zlib.output_compression','Off'); header("Pragma: public"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); @@ -66,4 +66,4 @@ fclose($file); unlink ($tmp); -Commit($cn); +$cn->commit(); diff --git a/html/show_fiche.php b/html/show_fiche.php index 5db4f3813..7de9e4017 100644 --- a/html/show_fiche.php +++ b/html/show_fiche.php @@ -29,14 +29,13 @@ */ require_once ('class_user.php'); require_once ('class_fiche.php'); -require_once ('postgres.php'); +require_once ('class_database.php'); require_once ('debug.php'); require_once ('ac_common.php'); -require_once('class_widget.php'); require_once('class_dossier.php'); $gDossier=dossier::id(); -$User=new User(DbConnect()); +$User=new User(new Database()); $User->Check(); html_page_start($_SESSION['g_theme'],"onLoad='window.focus();'"); @@ -46,7 +45,7 @@ if ( ! isset ($_REQUEST['q'])) { exit(); } // connect to the database -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); // Create a object fiche diff --git a/html/show_pj.php b/html/show_pj.php index af755e8aa..8e0c36201 100644 --- a/html/show_pj.php +++ b/html/show_pj.php @@ -31,24 +31,26 @@ if ( !isset ($_GET['jrn'] ) || echo_error("Missing parameters"); } -include_once ("postgres.php"); +require_once('class_database.php'); $jr_grpt_id=$_GET['jr_grpt_id']; -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include_once ('class_user.php'); $User=new User($cn); $User->Check(); +$User->check_dossier($gDossier); + // 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 ) { +$r=$cn->exec_sql("select jr_def_id from jrn where jr_grpt_id=$jr_grpt_id"); +if ( Database::num_row($r) == 0 ) { echo_error("Invalid operation id jr_grpt_id=$jr_grpt_id"); exit; } -$a=pg_fetch_array($r,0); +$a=Database::fetch_array($r,0); $jrn=$a['jr_def_id']; if ($User->check_jrn($jrn) == 'X' ){ @@ -57,13 +59,14 @@ if ($User->check_jrn($jrn) == 'X' ){ 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 ) +$cn->start(); +$ret=$cn->exec_sql("select jr_pj,jr_pj_name,jr_pj_type from jrn where jr_grpt_id=$jr_grpt_id"); +if ( Database::num_row ($ret) == 0 ) return; -$row=pg_fetch_array($ret,0); +$row=Database::fetch_array($ret,0); $tmp=tempnam($_ENV['TMP'],'document_'); -pg_lo_export($cn,$row['jr_pj'],$tmp); +$cn->lo_export($row['jr_pj'],$tmp); + ini_set('zlib.output_compression','Off'); header("Pragma: public"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); @@ -80,4 +83,4 @@ fclose($file); unlink ($tmp); -Commit($cn); +$cn->commit(); diff --git a/html/show_tva.php b/html/show_tva.php index 2f801fb84..aed984ee2 100644 --- a/html/show_tva.php +++ b/html/show_tva.php @@ -23,9 +23,9 @@ */ include_once ("ac_common.php"); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$rep=DbConnect(); +$rep=new Database(); include_once ("class_user.php"); $User=new User($rep); $User->Check(); @@ -43,12 +43,12 @@ function GetIt(ctl,tva_id) { <?php $condition=""; -$cn=DbConnect($gDossier); -$Res=ExecSql($cn,"select * from tva_rate order by tva_rate desc"); -$Max=pg_NumRows($Res); +$cn=new Database($gDossier); +$Res=$cn->exec_sql("select * from tva_rate order by tva_rate desc"); +$Max=Database::num_row($Res); echo "<TABLE BORDER=\"1\">"; for ($i=0;$i<$Max;$i++) { - $row=pg_fetch_array($Res,$i); + $row=Database::fetch_array($Res,$i); $set=sprintf( '<INPUT TYPE="BUTTON" Value="select" onClick="GetIt(\'%s\',\'%s\');">', $_GET['ctl'],$row['tva_id']); printf("<tr><TD BGCOLOR=\LIGHTGREEN\" >%s %d</TD><TD>%s</TD><TD>%s</TD></TR>", diff --git a/html/style-color.css b/html/style-color.css index a6980f47d..43eb68ba7 100644 --- a/html/style-color.css +++ b/html/style-color.css @@ -2,8 +2,8 @@ BODY { background-color:#EDF3FF; - font-size:10px; - font-family:sans-serif; + font-size:12px; + font-family:arial,sans-serif; } .notice { color:red; @@ -12,23 +12,21 @@ BODY { } table.result { - font-size:10px; + font-size:12px; color:blue; border:blue solid 1px; - width:80%; + width:100%; } table.result th { font-size:11px; font-weight:bold; - font-family:sans-serif; border-bottom:1px solid blue; padding-left:10px; padding-right:10px; } h2 { - font-family:sans-serif; font-size:14px; color:grey; } @@ -128,14 +126,13 @@ div.lmenu { float:left; clear:left; left:20px; - font-size:9px; + font-size:12px; background-color:grey; } div.lextmenu { position: float; float:left; - font-family:sans-serif; - font-size:9px; + font-size:12px; background-color:blue; } div.searchmenu { @@ -148,8 +145,7 @@ background-color:green; div.recherche_form{ width:700px; - font-size:9px; - font-family:sans-serif; + font-size:12px; border-style:outset; border-width:1px; @@ -160,22 +156,20 @@ div.u_redcontent{ width:75%; padding-top:7px; padding-left:8px; - font-size:9px; - font-family:sans-serif; + font-size:12px; background-color:lightgreen; } div.content{ position: float; float:left; - font-size:9px; - font-family:sans-serif; - width:100%; + font-size:12px; + width:100%; background-color:lightgreen; + clear:both; } div.no span{ position:static; - font-size:9px; - font-family:sans-serif; + font-size:12px; font-weight:bold; font-color:red; @@ -210,14 +204,14 @@ td.mtitle { text-align:center; width:95px; height :30px; - font-size:10px; + font-size:12px; background-color:#DDE6FF; } span.mtitle { color:gray; background-color:blue; - font-size:10px; + font-size:12px; border-style:groove } span.odd { @@ -236,11 +230,11 @@ span.error { tr.odd { background-color:#DDE6FF; - font-size:10px; + font-size:12px; border-size:0px; } tr { - font-size:10px; + font-size:12px; } tr.odd:hover td @@ -259,11 +253,11 @@ tr.even:hover td td.odd{ background-color:#DDE6FF ; border-size:0px; - font-size:10px; + font-size:12px; } td.even{ border:0px; - font-size:10px; + font-size:12px; } td.cell{ height:32px; @@ -273,7 +267,7 @@ td.selectedcell{ border-style:inset; border-color:blue; border-width:1pt ; - font-size:10px; + font-size:12px; background:#5D90CD ; color:white; text-align:center; @@ -281,7 +275,7 @@ td.selectedcell{ } a.mtitle { - font-size:10px; + font-size:12px; text-decoration:none; display:inline; color:blue; @@ -298,11 +292,11 @@ a.cell { display:block; color:blue; background-color:white; - font-size:9px; + font-size:12px; } a.cell:hover { - font-size:9px; + font-size:12px; color:white; background-color:#5D90CD; text-decoration:none; @@ -332,8 +326,7 @@ a.one:hover { a.detail { - font-size:9px; - font-family:sans-serif; + font-size:12px; text-decoration: none; display: block; color: blue; @@ -341,8 +334,7 @@ a.detail a.detail:hover { - font-size:9px; - font-family:sans-serif; + font-size:12px; color: white; background-color: rgb(93, 144, 205); text-decoration: none; @@ -354,8 +346,7 @@ li.menuv,ol.menuv { padding:1em 1em; } div.u_redcontent a { - font-size:9px; - font-family:sans-serif; + font-size:12px; text-decoration: none; display: block; color: darkblue; @@ -364,8 +355,7 @@ width:90%; } div.u_redcontent a:hover { - font-size:9px; - font-family:sans-serif; + font-size:12px; color: red; background-color: rgb(93, 144, 205); text-decoration: none; @@ -373,8 +363,7 @@ div.u_redcontent a:hover { } div.content a { - font-size:9px; - font-family:sans-serif; + font-size:12px; text-decoration: none; display: block; color: darkblue; @@ -382,8 +371,7 @@ div.content a { } div.content a:hover { - font-size:9px; - font-family:sans-serif; + font-size:12px; color: red; background-color: rgb(93, 144, 205); text-decoration: none; @@ -392,7 +380,7 @@ div.content a:hover { } div.u_redcontent a.mtitle { - font-size:10px; + font-size:12px; text-decoration:none; display:inline; color:blue; @@ -407,7 +395,7 @@ div.u_redcontent a.mtitle:hover { } div.content a.mtitle { - font-size:10px; + font-size:12px; text-decoration:none; display:inline; color:blue; @@ -422,7 +410,6 @@ div.content a.mtitle:hover { } div.u_redcontent input.text { - font-family:sans-serif; font-weight:normal; border-color:336699; border-style:solid; @@ -431,7 +418,6 @@ div.u_redcontent input.text { color:blue; } div.content input.text { - font-family:sans-serif; font-weight:normal; border-color:336699; border-style:solid; @@ -476,5 +462,223 @@ div.infobulle { z-index:10; width:25em; } +td.msubtitle { + text-align:center; + height:20px; + font-size:12px; + background-color:#DDE6FF; +} +td.msubtitle:hover,td.msubtitle:hover a +{ + background-color:#a9d6e4; + color:white; +} +span.action { + height:3em; + +} +td.num { + text-align:right; +} +tr.priority1 { + background-color:red; + } +span.action a.action { + border:2px outset ; + padding-left: 3px; + padding-right:3px; + text-decoration:none; + font-size:14px; + + display:inline; + color:black; + background-color:lightgrey; +} + +span.action a.action:hover { + text-decoration:none; + display:inline; + background-color:lightblue; + color:black; +} +div.popup_back{ + position:absolute; + top:0px; + left:0px; + opacity:0.6; + filter:alpha(opacity=60); + width:100%; + height:100%; + z-index:1; + /*background-color:lightgrey;*/ + + display:none; +} + +div.popup_border_title { + position:absolute; + top:20%; + left:10%; + width:60%; + height:80%; + /*background:lightgrey;*/ + z-index:10; + /*border:dotted 1px black;*/ + border: 3px groove black; + background-color:#879ED4; + font-size: 110% ; + font-family: arial,sans-serif; + font-style: italic; + font-weight: bolder; + text-align:center; + border-bottom: 2px solid #201e87; + color: white; + display:none; + /*opacity:1; + filter:alpha(opacity=100);*/ + + } +div.popup_border_notitle { + position:absolute; + top:20%; + left:20%; + width:60%; + height:80% ; + /*background:lightgrey;*/ + z-index:10; + /*border:dotted 1px black;*/ + border: 3px outset #201e87; + background-color:lightblue; + font-family: arial,sans-serif; + font-style: italic; + font-weight: bolder; + text-align:center; + display:none; + color: white; + /*opacity:0.7; + filter:alpha(opacity=70); + */ + } + +div.popup_content { + position:absolute; + top:10%; + bottom:0; + left:0; + right:0; + width:100%; + height:90%; + overflow: auto; + background-color:lightblue; + font-size:12px ; + font-family: arial,sans-serif; + font-style: normal; + font-weight: normal; + color: black; + text-align: left; + display:none; + z-index:10; + /*opacity:1; + filter:alpha(opacity=100);*/ +} +div.autocomplete { + position:relative; + width:30em; + background-color:white; + border:1px solid #888; + margin:0; + padding:0; + text-align:left; + font-size:12px; + +} +div.autocomplete em { + color:blue; + font-weight:bold; +} +div.autocomplete ul { + list-style-type:none; + margin:0; + padding:0; +} +div.autocomplete ul li.selected { background-color: lightblue;} + +div.autocomplete ul li { + list-style-type:none; + display:block; + margin:0; + padding:0px; + /*height:32px;*/ + cursor:pointer; +} + +ul.select_table { + /*padding:5px;*/ + overflow:hidden; + } +ul.select_table a{ + width:100%; + display:block; + background-color:inherit; + color: black; + text-decoration:none; + } +ul.select_table a:hover{ + background-color:white; + color:black; + /*text-decoration:underline;*/ + } +ul.select_table li { + display:table-row; + list-style-type: none; + } +ul.select_table li span { + display:table-cell; + width:25em; + margin: 0px; + padding: 0px; +} + +div.pc_calendar{ + border:1px groove grey; + float:left; + + } +div.pc_calendar table { + text-align:center; + +} +div.pc_calendar tr{ + height:40; + + +} +div.pc_calendar td{ + width:10em; +} + +div.pc_calendar td.weekend { + background-color:#cce0e6; + +} +div.pc_calendar td.workday{ + background-color:inherit; + + +} +div.pc_calendar span.day{ + font-weight: bold; + display:block; + +} +div.pc_calendar span.event{ + font-weight: bolder; + +} +span.todo { + text-align: left; + background-color:yellow; + +} /* </style> */ diff --git a/html/style-light.css b/html/style-light.css index da2d613c9..f4e8de981 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -2,35 +2,29 @@ BODY { background-color:#EDF3FF; - font-size:10px; - font-family:sans-serif; + font-size:12px; + font-family:arial,sans-serif; } .notice { color:red; - /*font-weight:bold;*/ font-style: italic; - - -} + } table.result { - font-size:10px; color:blue; border:blue solid 1px; - width:80%; - - } + width:100%; +} table.result th { - font-size:11px; font-weight:bold; - font-family:sans-serif; + font-family:arial,sans-serif; border-bottom:1px solid blue; padding-left:10px; padding-right:10px; } h2 { - font-family:sans-serif; + font-family:arial,sans-serif; font-size:14px; color:grey; } @@ -143,7 +137,7 @@ div.lmenu { div.lextmenu { position: float; float:left; - font-family:sans-serif; + font-family:arial,sans-serif; font-size:9px; } @@ -158,7 +152,7 @@ div.searchmenu { div.recherche_form{ width:700px; font-size:9px; - font-family:sans-serif; + font-family:arial,sans-serif; border-style:outset; border-width:1px; @@ -169,23 +163,31 @@ div.u_redcontent{ padding-top:7px; padding-left:8px; font-size:9px; - font-family:sans-serif; + font-family:arial,sans-serif; width:75%; } div.content{ + position: float; + float:left; + padding-top:7px; + width:100%; + font-family:arial,sans-serif; + clear:both; + + +} +div.content30{ position: float; float:left; padding-top:7px; - width:100%; - font-size:9px; - font-family:sans-serif; + width:35%; + font-family:arial,sans-serif; } div.no span{ position:static; - font-size:9px; - font-family:sans-serif; + font-family:arial,sans-serif; font-weight:bold; font-color:red; @@ -200,6 +202,10 @@ table.document th{ background-color:lightgrey; color:darkblue; } +table.result th{ + background-color:lightgrey; + color:darkblue; +} span.error { color:black; background-color:red; @@ -224,6 +230,12 @@ td.mtitle { font-size:10px; background-color:#DDE6FF; } +td.msubtitle { + text-align:center; + height:20px; + font-size:10px; + background-color:#DDE6FF; +} span.mtitle { color:gray; background-color:blue; @@ -297,10 +309,13 @@ tr.even:hover td background-color: #a9d6e4; color:white; } -a.mtitle:hover +td.mtitle:hover,td.mtitle:hover a +{ + background-color:#a9d6e4; + color:white; +} +td.msubtitle:hover,td.msubtitle:hover a { - text-decoration:none; - display:inline; background-color:#a9d6e4; color:white; } @@ -344,7 +359,7 @@ a.one:hover { a.detail { font-size:9px; - font-family:sans-serif; + font-family:arial,sans-serif; text-decoration: none; display: block; color: blue; @@ -353,7 +368,7 @@ a.detail a.detail:hover { font-size:9px; - font-family:sans-serif; + font-family:arial,sans-serif; color: white; background-color: rgb(93, 144, 205); text-decoration: none; @@ -365,8 +380,7 @@ li.menuv,ol.menuv { padding:1em 1em; } div.u_redcontent a { - font-size:9px; - font-family:sans-serif; + font-family:arial,sans-serif; text-decoration: none; display: block; color: blue; @@ -374,8 +388,7 @@ div.u_redcontent a { } div.u_redcontent a:hover { - font-size:9px; - font-family:sans-serif; + font-family:arial,sans-serif; color: white; background-color: rgb(93, 144, 205); text-decoration: none; @@ -383,28 +396,30 @@ div.u_redcontent a:hover { } div.content a { - font-size:9px; - font-family:sans-serif; + font-family:arial,sans-serif; text-decoration: none; display: block; color: blue; - +padding: 1px ; + } + div.content a:hover { - font-size:9px; - font-family:sans-serif; + font-family:arial,sans-serif; color: white; background-color: rgb(93, 144, 205); text-decoration: none; display: block; } + div.u_redcontent a.mtitle { - font-size:10px; text-decoration:none; display:inline; - color:blue; + + + color:black; } @@ -421,6 +436,8 @@ div.content a.mtitle { text-decoration:none; display:inline; color:blue; + + } @@ -429,11 +446,11 @@ div.content a.mtitle:hover { display:inline; background-color:darkblue; color:white; - + } div.u_redcontent input.text { - font-family:sans-serif; + font-family:arial,sans-serif; font-weight:normal; border-color:336699; border-style:solid; @@ -442,7 +459,7 @@ div.u_redcontent input.text { color:blue; } div.content input.text { - font-family:sans-serif; + font-family:arial,sans-serif; font-weight:normal; border-color:336699; border-style:solid; @@ -459,7 +476,7 @@ div.u_redcontent input:focus { div.content input:focus { background-color:orange; } -div.u_redcontent textarea:focus{ +div.u_redcontent textarea:focus { background-color: orange; } .document { @@ -479,6 +496,7 @@ a.document:hover { } .input_text { border:groove 1px blue; + margin:1px; } legend { font-weight: bold; @@ -492,7 +510,12 @@ fieldset fieldset legend { } select { border: 1px solid blue; +margin:2px; + } + + + .infobulle { position:absolute; border:1px solid black; @@ -501,6 +524,214 @@ border: 1px solid blue; visibility:hidden; z-index:2; width:25em; + } +span.action { + height:3em; + +} +td.num { + text-align:right; +} +tr.priority1 { + background-color:red; + } +span.action a.action { + border:2px outset ; + padding-left: 3px; + padding-right:3px; + text-decoration:none; + font-size:14px; + + display:inline; + color:black; + background-color:lightgrey; +} + +span.action a.action:hover { + text-decoration:none; + display:inline; + background-color:lightblue; + color:black; +} +div.popup_back{ + position:absolute; + top:0px; + left:0px; + opacity:0.6; + filter:alpha(opacity=60); + width:100%; + height:100%; + z-index:1; + /*background-color:lightgrey;*/ + + display:none; +} + +div.popup_border_title { + position:absolute; + top:20%; + left:10%; + width:60%; + height:80%; + /*background:lightgrey;*/ + z-index:10; + /*border:dotted 1px black;*/ + border: 3px groove black; + background-color:#879ED4; + font-size: 110% ; + font-family: arial,sans-serif; + font-style: italic; + font-weight: bolder; + text-align:center; + border-bottom: 2px solid #201e87; + color: white; + display:none; + /*opacity:1; + filter:alpha(opacity=100);*/ + + } +div.popup_border_notitle { + position:absolute; + top:20%; + left:20%; + width:60%; + height:80% ; + /*background:lightgrey;*/ + z-index:10; + /*border:dotted 1px black;*/ + border: 3px outset #201e87; + background-color:lightblue; + font-family: arial,sans-serif; + font-style: italic; + font-weight: bolder; + text-align:center; + display:none; + color: white; + /*opacity:0.7; + filter:alpha(opacity=70); + */ + } + +div.popup_content { + position:absolute; + top:10%; + bottom:0; + left:0; + right:0; + width:100%; + height:90%; + overflow: auto; + background-color:lightblue; + font-size:10px ; + font-family: arial,sans-serif; + font-style: normal; + font-weight: normal; + color: black; + text-align: left; + display:none; + z-index:10; + /*opacity:1; + filter:alpha(opacity=100);*/ +} +div.autocomplete { + position:relative; + width:30em; + background-color:white; + border:1px solid #888; + margin:0; + padding:0; + text-align:left; + font-size:12px; + +} +div.autocomplete em { + color:blue; + font-weight:bold; +} +div.autocomplete ul { + list-style-type:none; + margin:0; + padding:0; +} +div.autocomplete ul li.selected { background-color: lightblue;} + +div.autocomplete ul li { + list-style-type:none; + display:block; + margin:0; + padding:0px; + /*height:32px;*/ + cursor:pointer; +} + +ul.select_table { + /*padding:5px;*/ + overflow:hidden; + } +ul.select_table a{ + width:100%; + display:block; + background-color:inherit; + color: black; + text-decoration:none; + } +ul.select_table a:hover{ + background-color:white; + color:black; + /*text-decoration:underline;*/ + } +ul.select_table li { + display:table-row; + list-style-type: none; + } +ul.select_table li span { + display:table-cell; + width:25em; + margin: 0px; + padding: 0px; +} + +div.pc_calendar{ + border:1px groove grey; + float:left; + + } +div.pc_calendar table { + text-align:center; + +} +div.pc_calendar tr{ + height:40; + + +} +div.pc_calendar td{ + width:10em; +} + +div.pc_calendar td.weekend { + background-color:#cce0e6; + +} +div.pc_calendar td.workday{ + background-color:inherit; + + +} +div.pc_calendar span.day{ + font-weight: bold; + display:block; + +} +div.pc_calendar span.event{ + font-weight: bolder; + +} +span.todo { + text-align: left; + background-color:yellow; + +} /* </style> */ diff --git a/html/style.css b/html/style.css index 1262c4086..6736ad4ba 100644 --- a/html/style.css +++ b/html/style.css @@ -1,7 +1,7 @@ /* <style type="text/css"> */ BODY { - background-color:#EDF3FF; + background-color:#C2D4D7; font-size:0.7em; font-family:Arial, Helvetica, sans-serif; } @@ -12,23 +12,34 @@ BODY { } table.result { - font-size:10px; + font-size:12px; color:blue; border:blue solid 1px; - width:80%; + width:100%; } table.result th { font-size:11px; font-weight:bold; - font-family:sans-serif; border-bottom:1px solid blue; padding-left:10px; padding-right:10px; + background-color: silver; + +} +td.msubtitle { + text-align:center; + height:20px; + font-size:12px; + background-color:#DDE6FF; +} +td.msubtitle:hover,td.msubtitle:hover a +{ + background-color:#a9d6e4; + color:white; } h2 { - font-family:sans-serif; font-size:1.5em; color:grey; } @@ -132,7 +143,6 @@ background-repeat: repeat-y; div.lextmenu { position: float; float:left; -font-family:sans-serif; font-size:9px; background-color:#c2d4d7; } @@ -149,7 +159,6 @@ div.searchmenu { div.recherche_form{ width:700px; font-size:9px; -font-family:sans-serif; border-style:outset; border-width:1px; } @@ -161,7 +170,6 @@ padding-top:7px; padding-left:8px; width:80%; font-size:9px; -font-family:sans-serif; background-color:#c2d4d7; } @@ -170,13 +178,12 @@ div.content{ float:left; font-size:12px; width:100%; - font-family:sans-serif; background-color:#c2d4d7; +clear:both; } div.no span{ position:static; font-size:9px; -font-family:sans-serif; font-weight:bold; font-color:red; } @@ -210,7 +217,7 @@ border-color:#CC0000; text-align:center; width:120px; height :30px; -font-size:10px; +font-size:1em; background-color:#DDE6FF; border: 5px; } @@ -223,7 +230,7 @@ color:#FFFFFF; span.mtitle { color:gray; background-color:blue; -font-size:10px; +font-size:12px; border-style:groove } span.odd { @@ -237,11 +244,11 @@ span.even { tr.odd { background-color:#DDE6FF; -font-size:10px; +font-size:12px; border-size:0px; } tr { -font-size:10px; +font-size:12px; } tr.odd:hover td { @@ -260,11 +267,11 @@ tr.even:hover td td.odd{ background-color:#DDE6FF ; border-size:0px; -font-size:10px; +font-size:12px; } td.even{ border:0px; -font-size:10px; +font-size:12px; } td.cell{ height:32px; @@ -274,7 +281,7 @@ td.selectedcell{ border-style:none; border-color:#36559b; border-width:1pt ; -font-size:1.3em; +font-size:1em; background:#36559b ; color:white; text-align:center; @@ -337,7 +344,6 @@ color:#FFFFFF; a.detail { font-size:9px; - font-family:sans-serif; text-decoration: none; display: block; color: blue; @@ -346,7 +352,6 @@ a.detail a.detail:hover { font-size:9px; - font-family:sans-serif; color: white; background-color: rgb(93, 144, 205); text-decoration: none; @@ -359,7 +364,6 @@ li.menuv,ol.menuv { } div.u_redcontent a { font-size:9px; - font-family:sans-serif; text-decoration: none; display: block; color: darkblue; @@ -369,7 +373,6 @@ width:90%; div.u_redcontent a:hover { font-size:9px; - font-family:sans-serif; color: red; background-color: rgb(93, 144, 205); text-decoration: none; @@ -377,8 +380,7 @@ div.u_redcontent a:hover { } div.content a { - font-size:9px; - font-family:sans-serif; + font-size:12px; text-decoration: none; display: block; color: darkblue; @@ -386,8 +388,7 @@ div.content a { } div.content a:hover { - font-size:9px; - font-family:sans-serif; + font-size:12px; color: red; background-color: rgb(93, 144, 205); text-decoration: none; @@ -396,7 +397,7 @@ div.content a:hover { } div.u_redcontent a.mtitle { - font-size:18px; + font-size:9px; text-decoration:none; display:inline; color:blue; @@ -410,7 +411,7 @@ div.u_redcontent a.mtitle:hover { } div.content a.mtitle { - font-size:10px; + font-size:12px; text-decoration:none; display:inline; color:blue; @@ -425,7 +426,6 @@ div.content a.mtitle:hover { } div.u_redcontent input.text { - font-family:sans-serif; font-weight:normal; border-color:336699; border-style:solid; @@ -434,7 +434,6 @@ div.u_redcontent input.text { color:blue; } div.content input.text { - font-family:sans-serif; font-weight:normal; border-color:336699; border-style:solid; @@ -481,7 +480,7 @@ font-size: 130% ; } a.dossier { - font-size:10px; + font-size:12px; text-decoration:none; display:block; color: #202267; @@ -512,4 +511,211 @@ div.infobulle { width:25em; } +span.action { + height:3em; + +} +td.num { + text-align:right; +} +tr.priority1 { + background-color:red; + } +span.action a.action { + border:2px outset ; + padding-left: 3px; + padding-right:3px; + text-decoration:none; + font-size:14px; + + display:inline; + color:black; + background-color:lightgrey; +} + +span.action a.action:hover { + text-decoration:none; + display:inline; + background-color:lightblue; + color:black; +} +div.popup_back{ + position:absolute; + top:0px; + left:0px; + opacity:0.6; + filter:alpha(opacity=60); + width:100%; + height:100%; + z-index:1; + /*background-color:lightgrey;*/ + + display:none; +} + +div.popup_border_title { + position:absolute; + top:20%; + left:10%; + width:60%; + height:80%; + /*background:lightgrey;*/ + z-index:10; + /*border:dotted 1px black;*/ + border: 3px groove black; + background-color:#879ED4; + font-size: 110% ; + font-family: arial,sans-serif; + font-style: italic; + font-weight: bolder; + text-align:center; + border-bottom: 2px solid #201e87; + color: white; + display:none; + /*opacity:1; + filter:alpha(opacity=100);*/ + + } +div.popup_border_notitle { + position:absolute; + top:20%; + left:20%; + width:60%; + height:80% ; + /*background:lightgrey;*/ + z-index:10; + /*border:dotted 1px black;*/ + border: 3px outset #201e87; + background-color:lightblue; + font-family: arial,sans-serif; + font-style: italic; + font-weight: bolder; + text-align:center; + display:none; + color: white; + /*opacity:0.7; + filter:alpha(opacity=70); + */ + } + +div.popup_content { + position:absolute; + top:10%; + bottom:0; + left:0; + right:0; + width:100%; + height:90%; + overflow: auto; + background-color:lightblue; + font-size:12px ; + font-family: arial,sans-serif; + font-style: normal; + font-weight: normal; + color: black; + text-align: left; + display:none; + z-index:10; + /*opacity:1; + filter:alpha(opacity=100);*/ +} +div.autocomplete { + position:relative; + width:30em; + background-color:white; + border:1px solid #888; + margin:0; + padding:0; + text-align:left; + font-size:12px; + +} +div.autocomplete em { + color:blue; + font-weight:bold; +} +div.autocomplete ul { + list-style-type:none; + margin:0; + padding:0; +} +div.autocomplete ul li.selected { background-color: lightblue;} + +div.autocomplete ul li { + list-style-type:none; + display:block; + margin:0; + padding:0px; + /*height:32px;*/ + cursor:pointer; +} + +ul.select_table { + /*padding:5px;*/ + overflow:hidden; + } +ul.select_table a{ + width:100%; + display:block; + background-color:inherit; + color: black; + text-decoration:none; + } +ul.select_table a:hover{ + background-color:white; + color:black; + /*text-decoration:underline;*/ + } +ul.select_table li { + display:table-row; + list-style-type: none; + } +ul.select_table li span { + display:table-cell; + width:25em; + margin: 0px; + padding: 0px; +} + +div.pc_calendar{ + border:1px groove grey; + float:left; + + } +div.pc_calendar table { + text-align:center; + +} +div.pc_calendar tr{ + height:40; + + +} +div.pc_calendar td{ + width:10em; +} + +div.pc_calendar td.weekend { + background-color:#cce0e6; + +} +div.pc_calendar td.workday{ + background-color:inherit; + + +} +div.pc_calendar span.day{ + font-weight: bold; + display:block; + +} +div.pc_calendar span.event{ + font-weight: bolder; + +} +span.todo { + text-align: left; + background-color:yellow; + +} /* </style> */ diff --git a/html/test.php b/html/test.php index 127ecbe64..adede11c0 100644 --- a/html/test.php +++ b/html/test.php @@ -1,17 +1,4 @@ - -<style type="text/css"> -<!-- -h2 { - color:green; - font-size:20px; -} -.error { - color:red; - font-size:20px; -} ---> -</style> -<?php +s<?php /* * This file is part of PhpCompta. * @@ -38,16 +25,20 @@ h2 { * if the $_REQUEST[test_select] is not set, so set it . */ include_once("ac_common.php"); -include_once("postgres.php"); +require_once('class_database.php'); require_once ('class_dossier.php'); +require_once('class_html_input.php'); + if ( ! file_exists('authorized_debug') ) { echo "Pour pouvoir utiliser ce fichier vous devez creer un fichier nomme authorized_debug dans le repertoire html du server"; exit(); } +html_page_start(); // Test the connection echo __FILE__.":".__LINE__; +print_r($_REQUEST); if ( ! isset($_REQUEST['gDossier'])) { echo "Vous avez oublie de specifier le gDossier ;)"; echo "L'url aurait du etre test.php?gDossier=xx"; @@ -56,14 +47,6 @@ if ( ! isset($_REQUEST['gDossier'])) { $array=array( array(1,'Plan Analytic'), array(2,'Poste Analytic'), - array(3,'Budget Card'), - array(4,'Budget Hypo'), - array(5,'Budget Detail Periode'), - array(6,'Budget Data'), - array(7,'Budget Synthese compte'), - array(8,'Budget Synthese group'), - array(9,'Budget Synthese ANC'), - array(10,'Budget Synthese Hypo'), array(11,'Periode'), array(12,'verif.inc.php'), array(13,'Rapport(class_acc_report'), @@ -72,16 +55,30 @@ $array=array( array(16,'widget'), array(17,'Ledger info(class_acc_ledger_info'), array(18,'Toddo list(class_todo'), - array(19,'Payment (class_acc_payment') + array(19,'Payment (class_acc_payment'), + array(20,'Form Acc_Ledger_Sold'), + array(21,'Javascript') , + array(22,'DIV IPopup'), + array(23,'Détection Navigateur') , + array(24,'Search Card'), + array(25,'Search Ledger'), + array(26,'Gettext'), + array(27,'Card (class_fiche)'), + array(28,'Extension') ); $r='<form method="get">'; $r.='<select name="test_select" >'; foreach ($array as $value) { - $r.='<option value="'.$value[0].'">'.$value[1]; + $sel=""; + if ( isset($_REQUEST['test_select']) && $_REQUEST['test_select']==$value[0]) + $sel=' selected '; + $r.='<option value="'.$value[0].'" '.$sel.'>'.$value[1]; } $r.='</select>'; +$r.= Dossier::hidden(); $r.='<input type="submit" value="Testons">'; -r.='</form>'; +$r.=HtmlInput::hidden('PHPSESSID',$_REQUEST['PHPSESSID']); +$r.='</form>'; echo $r; @@ -93,44 +90,12 @@ $act=$_REQUEST['test_select']; switch ($act) { case 1: require_once('class_anc_plan.php'); - Anc_Plan::testme(); + Anc_Plan::test_me(); break; case 2: require_once("class_anc_account.php"); - Anc_Account::testme(); - break; -case 3: - require_once ('class_bud_card.php'); - Bud_Card::testme(); - break; -case 4: - require_once('class_bud_hypo.php'); - Bud_Hypo::testme(); - break; -case 5: - require_once ('class_bud_detail_periode.php'); - Bud_Detail_Periode::test_me(); - break; -case 6: - require_once ('class_bud_data.php'); - Bud_Data::test_me(); - break; -case 7: - require_once ('class_bud_synthese_acc.php'); - Bud_Synthese_Acc::test_me(); - break; -case 8: - require_once ('class_bud_synthese_group.php'); - Bud_Synthese_Group::test_me(); - break; -case 9: - require_once ('class_bud_synthese_anc.php'); - Bud_Synthese_Anc::test_me(); - break; -case 10: - require_once ('class_bud_synthese_hypo.php'); - Bud_Synthese_Hypo::test_me(); + Anc_Account::test_me(); break; case 11: require_once ('class_periode.php'); @@ -138,9 +103,9 @@ case 11: break; case 13: require_once('class_acc_report.php'); - Rapport::test_me(); + Acc_Report::test_me(); require_once('class_acc_report_row.php'); - Rapport_Row::test_me(); + Acc_Report_Row::test_me(); break; case 14: require_once('class_acc_tva.php'); @@ -151,8 +116,10 @@ case 15: Acc_Compute::test_me(); break; case 16: - require_once('class_widget.php'); - echo widget::button_href("On y va",'login.php'); + echo HtmlInput::button_anchor("On y va",'login.php'); + require_once('constant.php'); + require_once('class_icard.php'); + ICard::test_me(); break; case 17: require_once('class_acc_ledger_info.php'); @@ -160,13 +127,12 @@ case 17: break; case 18: require_once('class_todo_list.php'); - require_once('class_widget.php'); require_once ('constant.php'); echo JS_PROTOTYPE; Todo_List::test_me(); echo '<script src="js/todo_list.js"></script>'; echo '<form method="get">'; - echo widget::hidden('phpsessid',$_REQUEST['PHPSESSID']); + echo HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); echo dossier::hidden(); echo 'title : <input type="text" id="p_title"><br>'; echo 'desc : <input type="text" id="p_desc"><br>'; @@ -178,4 +144,166 @@ case 19: require_once('class_acc_payment.php'); Acc_Payment::test_me(); break; -} \ No newline at end of file +case 20: + require_once('class_acc_ledger_sold.php'); + Acc_Ledger_Sold::test_me(); + break; +case 21: + test_javascript(); + break; +case 22: + require_once('class_ipopup.php'); + IPopup::test_me(); + break; +case 23: + $browser= $_SERVER['HTTP_USER_AGENT']; + echo $browser; + if ( strpos ($browser,'MSIE 6.0') != 0 ) { + echo "Vous ne pouvez pas utiliser Internet Explorer 6"; + } + break; +case 24: + require_once('class_icard.php'); + require_once ('constant.php'); + echo JS_PROTOTYPE; + echo JS_AJAX_FICHE; + echo JS_CARD; + ICard::test_me(); + break; +case 25: + require_once('class_acc_ledger.php'); + echo JS_PROTOTYPE; + + Acc_Ledger::test_me('search'); + break; + case 26: + /* gettext */ + $dir=""; + if ( isset($_REQUEST['l'])) { + $dir=setlocale(LC_MESSAGES,$_REQUEST['l']); + }else { + $dir=setlocale(LC_MESSAGES,"fr_FR.utf8"); + } + print_r("dir =[$dir]"); + if ( $dir == "") { + echo '<h2 class="error">Désolé mais ce domaine n\'est pas supporté</h2>'; + } + echo '<br>'; + bindtextdomain('messages','./lang'); + textdomain('messages'); + bind_textdomain_codeset('messages','UTF8'); + echo _('Bienvenu sur mon site'); + echo _('Essayer de vous y amuser'); + echo '<form method="GET">'; + echo dossier::hidden(); + echo HtmlInput::hidden('test_select',$act); + echo _('Choississez votre langue'); + $aLang=array(array(_('Français'),'fr_FR.utf8'), + array(_('Anglais'),'en_US.utf8'), + array(_('Néerlandais'),'nl_NL.utf8'), + ); + echo '<select name="l" id="l">'; + for ($i =0;$i < count($aLang);$i++) { + printf('<option value="%s">%s</option>', + $aLang[$i][1],$aLang[$i][0]); + + } + echo '</select>'; + echo '<input type="submit" value="'._('Change de langue').'">'; + echo '</form>'; + echo "Div 5/10 = "; + echo 5/10; + echo '<br>'; + $test_num=10000/3; + echo 'Div num '.$test_num; + echo '<br>'; + echo _('Fin de programme'); + break; +case 27: + require_once('class_fiche.php'); + Fiche::test_me(); + break; +case 28: + require_once('class_extension.php'); + Extension::test_me(); + break; + +} + + +function test_javascript(){ +echo <<<JS +<script language="Javascript" src="js/scripts.js"></script> +<script language="javascript"> + function ajax_post() { + a=new Ajax(); + a.createAjax('test.php','a=1&b=2'); + a.postPage(); + a.onSuccess(show); +} + function ajax_get() { + a=new Ajax(); + a.createAjax('test.php','a=1&b=2'); + a.getPage(); + a.onSuccess(show); +} + function ajax_get_obj() { + a=new Ajax(); + var param={"reponse":"oui","valeur":"pas des masses","gDossier":"13"}; + str_param=encodeJSON(param); + a.createAjax('test.php',str_param); + a.getPage(); + a.onSuccess(show); +} + function ajax_post_obj() { + var a=new Ajax(); + var param={"reponse":"oui","valeur":"pas des masses","gDossier":"13"}; + str_param=encodeJSON(param); + a.createAjax('test.php',str_param); + a.postPage(); +} +function show(p) { + alert('return ok'); +} + +</script> +<h1> Ajax get - post </h1> +<div> + <input type="button" onclick="ajax_post()" value="Ajax POST"> + <input type="button" onclick="ajax_get()" value="Ajax GET"> +</div> +<h1> encodeParameter</h1> +<div> +<p> +obj = { "a":"1000","b":"seconde valeur"} +</p> +<p> + <input type="button" onclick='x=120;obj = { "a":"1000","b":"seconde valeur","c":x} ;a=encodeJSON(obj);alert(a);' value="encodeParameter"> + <input type="button" onclick="ajax_get_obj()" value="Ajax GET + object"> + <input type="button" onclick="ajax_post_obj()" value="Ajax POST + object"> +</p> +</div> + +<h1>set_value</h1> +<div> +<p id="p_id">p_id</p> +<span id="p_span">p_span</span> +<textarea id="p_txtarea"> +p_txtarea +</textarea> + <input type="text" value="toto" id="p_input_text"> +<input type="button" onclick="set_all()" value="set_all()"> + +<script> + function set_all() { + set_value('p_id',"Ceci est un paragraphe"); + set_value('p_span',"Ceci est un SPAN"); + set_value('p_txtarea',"Ceci est un très grand textarea vraiemnt"); + set_value('p_input_text','normalement nous sommes dans l\'input'); +} + + +</script> +</div> +JS; +} diff --git a/html/todo_list.php b/html/todo_list.php index ce51b2c44..fe9d481e6 100644 --- a/html/todo_list.php +++ b/html/todo_list.php @@ -36,21 +36,22 @@ */ require_once ('class_dossier.php'); require_once ('class_todo_list.php'); -require_once ('postgres.php'); +require_once ('class_database.php'); /*!\todo needs security for the users */ if (isset($_REQUEST['show'])) { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $todo=new Todo_list($cn); $todo->set_parameter('id',$_REQUEST['id']); $todo->load(); - header("Content-type: text/html; charset: utf8",true); - echo $todo->toJSON(); + header('Content-type: text/xml; charset=UTF-8'); + header ('<?xml version="1.0" encoding="UTF-8"?>'); + echo $todo->toXML(); exit(); } /*!\todo needs security for the users */ if (isset($_REQUEST['del'])) { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $todo=new Todo_list($cn); $todo->set_parameter('id',$_REQUEST['id']); $todo->delete(); diff --git a/html/user_advanced.php b/html/user_advanced.php index 6019d93e1..410c25e43 100644 --- a/html/user_advanced.php +++ b/html/user_advanced.php @@ -18,30 +18,46 @@ */ // Auteur Dany De Bontridder ddebontridder@yahoo.fr include_once ("ac_common.php"); -require_once("check_priv.php"); require_once('class_dossier.php'); -require_once ('class_widget.php'); require_once ('class_pre_operation.php'); /* $Revision$ */ /*! \file - * \brief Obsolete + * \brief call the different advanced parameters as report creation, periode, + * ... */ $gDossier=dossier::id(); html_page_start($_SESSION['g_theme']); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$rep=DbConnect(); +$rep=new Database(); include_once ("class_user.php"); $User=new User($rep); $User->Check(); $User->check_dossier(dossier::id()); -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $User->db=$cn; -include_once ("postgres.php"); +require_once('class_database.php'); +require_once('class_ipopup.php'); echo_debug('user_advanced.php',__LINE__,"user is ".$_SESSION['g_user']); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo js_include('acc_ledger.js'); +echo js_include('ajax_fiche.js'); +echo JS_CARD; +echo ICard::ipopup('ipopcard'); +echo IPoste::ipopup('ipop_account'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); + // We don't check permissions here in fact, permission are tested in the diff --git a/html/user_compta.php b/html/user_compta.php index ba8f9424f..bc5cfc5ed 100644 --- a/html/user_compta.php +++ b/html/user_compta.php @@ -18,18 +18,17 @@ */ // Auteur Dany De Bontridder ddebontridder@yahoo.fr require_once('class_dossier.php'); -require_once ('class_widget.php'); include_once ("ac_common.php"); /* $Revision$ */ include_once ("class_user.php"); -include_once ("postgres.php"); +require_once('class_database.php'); /*! \file * \brief main page of the accountancy module */ -$User=new User(DbConnect()); +$User=new User(new Database()); $User->check_dossier(dossier::id()); -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $User->cn=$cn; $User->Check(); @@ -41,7 +40,7 @@ echo_debug('user_compta.php',__LINE__,"user is ".$_SESSION['g_user']); // Get The priv on the selected folder if ( $User->admin == 0 && $User->is_local_admin(dossier::id()) == 0 ) { - $r=$User->get_privilege($gDossier); + $r=$User->get_folder_access($gDossier); if ($r == 'X' ){ /* Cannot Access */ NoAccess(1); diff --git a/html/user_login.php b/html/user_login.php index 0be1d6994..11c95018a 100644 --- a/html/user_login.php +++ b/html/user_login.php @@ -23,18 +23,28 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ include_once ("ac_common.php"); -include_once("postgres.php"); -$rep=DbConnect(); +require_once('class_database.php'); +require_once('class_itext.php'); +$rep=new Database(); include_once ("class_user.php"); $User=new User($rep); $User->Check(); +echo <<<EOF +<script language="JavaScript"> + + window.moveTo(0,0); +window.resizeTo(screen.width,screen.height); + +</script> +EOF; /* Check Browser version if < IE6 then unsupported */ $browser=$_SERVER['HTTP_USER_AGENT']; if ( strpos($browser,'MSIE 6')!=false || strpos($browser,'MSIE 5')!=false ) { - + $nav=_('Vous utilisez un navigateur dépassé depuis près de 8 ans!'); + $nav2=_("Pour une meilleure expérience web, prenez le temps de mettre votre navigateur à jour"); echo <<<EOF <!--[if lt IE 7]> <div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'> @@ -42,8 +52,8 @@ echo <<<EOF <div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'> <div style='width: 75px; float: left;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/></div> <div style='width: 275px; float: left; font-family: Arial, sans-serif;'> - <div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>Vous utilisez un navigateur dépassé depuis près de 8 ans!</div> - <div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>Pour une meilleure expérience web, prenez le temps de mettre votre navigateur à jour.</div> + <div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>$nav</div> + <div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>$nav2.</div> </div> <div style='width: 75px; float: left;'><a href='http://fr.www.mozilla.com/fr/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div> <div style='width: 73px; float: left;'><a href='http://www.apple.com/fr/safari/download/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div> @@ -56,7 +66,7 @@ exit(); } -html_min_page_start($_SESSION['g_theme']); +html_page_start($_SESSION['g_theme']); include_once("user_menu.php"); $priv=($User->admin==1)?"Administrateur":"Utilisateur"; @@ -67,26 +77,30 @@ $result.='<TR>'; if ( $User->Admin() == 1 ) { $result.="<TD class=\"cell\" ><A class=\"cell\" HREF=\"admin_repo.php\"> Administration </A></TD>"; } -$result.='<TD class="cell" ><A class="cell" HREF="manuel-fr.pdf" > Aide </a></TD>'; -$result.='<TD class="cell"><A class="cell" HREF="user_pref.php">Préférence</a></TD>'; -$result.='<TD class="cell" ><A class="cell" HREF="logout.php" >Deconnexion</a></TD>'; +$result.='<TD class="cell" ><A class="cell" HREF="manuel-fr.pdf" >'._('Aide').' </a></TD>'; +$result.='<TD class="cell"><A class="cell" HREF="user_pref.php">'._('Préférence').'</a></TD>'; +$result.='<TD class="cell" ><A class="cell" HREF="logout.php" >'._('Deconnexion').'</a></TD>'; $result.="</TR>"; $result.="</table>"; -echo '<h2 class="info">Bienvenue '.$User->first_name.' '.$User->name." dans PhpCompta </h2>"; -echo '<br>Choississez votre dossier'; +echo '<h2 class="info">'._('Bienvenue').$User->first_name.' '.$User->name.' '._("dans PhpCompta")."</h2>"; +echo '<br>'._('Choississez votre dossier'); echo '<span style="position:absolute;right:10px;top:30px">'.$result.'</span>'; echo '</div>'; ?> <form method="get" action="?"> -<input type="submit" value="Rechercher"> +<input type="submit" value="<?php echo _('Rechercher');?>"> <?php -$w=new widget("text"); +$w=new IText(); $p_nom=isset($_GET ['p_nom'])?$_GET['p_nom']:""; -echo $w->IOValue('p_nom',$p_nom); +echo $w->input('p_nom',$p_nom); ?> -<span class="notice">Donnez une partie du nom du dossier à rechercher</span> +<span class="notice"> +<?php + echo _('Donnez une partie du nom du dossier à rechercher'); +?> +</span> </form> <?php $filtre=""; diff --git a/html/user_pref.php b/html/user_pref.php index 0f65938a5..e09454f20 100644 --- a/html/user_pref.php +++ b/html/user_pref.php @@ -24,13 +24,12 @@ */ include_once ("ac_common.php"); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$Rep=DbConnect(); +$Rep=new Database(); include_once ("class_user.php"); require_once('class_dossier.php'); -require_once ('class_widget.php'); -$cn=DbConnect(); +$cn=new Database(); /* if the dossier is not set then we have to connect to the * account_repository database @@ -38,11 +37,11 @@ $cn=DbConnect(); if ( isset ($_REQUEST['gDossier'])) { - $cn=DbConnect($_REQUEST['gDossier']); + $cn=new Database($_REQUEST['gDossier']); } else { - $cn=DbConnect(); + $cn=new Database(); } @@ -56,6 +55,11 @@ if ( isset ( $_POST['style_user']) ) $_SESSION['g_theme']=$_POST['style_user']; } +// Update the language +if ( isset($_POST ['lang'])) { + $User->update_global_pref('LANG',$_POST['lang']); + $_SESSION['g_lang']=$_POST['lang']; + } html_page_start($_SESSION['g_theme']); diff --git a/include/ac_common.php b/include/ac_common.php index 81e1f8ca9..169174f2a 100644 --- a/include/ac_common.php +++ b/include/ac_common.php @@ -1,5 +1,4 @@ <?php - /* * This file is part of PhpCompta. * @@ -25,14 +24,25 @@ include_once("debug.php"); include_once("constant.php"); -require_once('preference.php'); -require_once ("postgres.php"); +require_once('class_database.php'); +require_once('class_periode.php'); + /*!\brief to protect again bad characters which can lead to a cross scripting attack the string to be diplayed must be protected */ function h($p_string) { return htmlspecialchars($p_string);} function hi($p_string) { return '<i>'.htmlspecialchars($p_string).'</i>';} function hb($p_string) { return '<b>'.htmlspecialchars($p_string).'</b>';} +function th($p_string) { return '<th>'.htmlspecialchars($p_string).'</th>';} + +/*!\brief surrond the string with td +*\param string +*\param class to use +* \return string surrounded by td +*/ +function td($p_string,$p_class=''){ return '<td class="'.$p_class.'" >'.$p_string.'</td>';} +/*!\brief escape correctly php string to javascript */ +function j($p_string) { $a=preg_replace("/\r?\n/", "\\n", addslashes($p_string)); return $a;} /*! * \brief log error into the /tmp/phpcompta_error.log it doesn't work on windows * @@ -44,14 +54,13 @@ function hb($p_string) { return '<b>'.htmlspecialchars($p_string).'</b>';} * */ function echo_error ($p_log, $p_line="", $p_message="") { - $fdebug=fopen($_ENV['TMP'].DIRECTORY_SEPARATOR."phpcompta_error.log","a+"); - if ( $fdebug == false) { - echo "ERREUR :".$p_log." ".$p_line." ".$p_message; - } else { - fwrite($fdebug,date("Ymd H:i:s").$p_log." ".$p_line." ".$p_message."\n"); - fclose($fdebug); - echo_debug($p_log,$p_line,$p_message); - } + echo "ERREUR :".$p_log." ".$p_line." ".$p_message; + $fdebug=fopen($_ENV['TMP'].DIRECTORY_SEPARATOR."phpcompta_error.log","a+"); + if ($fdebug != null ) { + fwrite($fdebug,date("Ymd H:i:s").$p_log." ".$p_line." ".$p_message."\n"); + fclose($fdebug); + echo_debug($p_log,$p_line,$p_message); + } } /*! @@ -70,7 +79,7 @@ function cmpDate ($p_date,$p_date_oth) { $l_date=isDate($p_date); $l2_date=isDate($p_date_oth); if ($l_date == null || $l2_date == null ) { - throw new Exception ("erreur date"); + throw new Exception ("erreur date [$p_date] [$p_date_oth]"); } $l_adate=explode(".",$l_date); $l2_adate=explode(".",$l2_date); @@ -132,15 +141,6 @@ function isDate ( $p_date) { }// !ereg return $p_date; } -/*! - * \brief call cmpDate & add quotes - * - * \return the date or the quoted string null - */ -function formatDate($p_date) { - if ( isDate($p_date)== null) return "null"; - return "'".$p_date."'"; -} /*! * \brief Default page header for each page * @@ -153,14 +153,14 @@ function formatDate($p_date) { function html_page_start($p_theme="",$p_script="",$p_script2="") { - $cn=DbConnect(); + $cn=new Database(); if ( $p_theme != "") { - $Res=ExecSql($cn,"select the_filestyle from theme + $Res=$cn->exec_sql("select the_filestyle from theme where the_name='".$p_theme."'"); - if (pg_NumRows($Res)==0) + if (Database::num_row($Res)==0) $style="style.css"; else { - $s=pg_fetch_array($Res,0); + $s=Database::fetch_array($Res,0); $style=$s['the_filestyle']; } }else { @@ -169,7 +169,6 @@ function html_page_start($p_theme="",$p_script="",$p_script2="") echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN">'; echo "<HTML>"; - if ( $p_script2 != "" ) $p_script2='<script src="'.$p_script2.'" type="text/javascript"></script>'; @@ -188,6 +187,11 @@ function html_page_start($p_theme="",$p_script="",$p_script2="") '; echo "<BODY $p_script>"; + // language + if ( isset($_SESSION['g_lang'])){ + set_language(); + } + /* If we are on the user_login page */ if ( basename($_SERVER['PHP_SELF']) == 'user_login.php') { return; @@ -206,14 +210,14 @@ function html_page_start($p_theme="",$p_script="",$p_script2="") function html_min_page_start($p_theme="",$p_script="",$p_script2="") { - $cn=DbConnect(); + $cn=new Database(); if ( $p_theme != "") { - $Res=ExecSql($cn,"select the_filestyle from theme + $Res=$cn->exec_sql("select the_filestyle from theme where the_name='".$p_theme."'"); - if (pg_NumRows($Res)==0) + if (Database::num_row($Res)==0) $style="style.css"; else { - $s=pg_fetch_array($Res,0); + $s=Database::fetch_array($Res,0); $style=$s['the_filestyle']; } }else { @@ -253,16 +257,6 @@ function html_page_stop() echo "</BODY>"; echo "</HTML>"; } -/*! - * \brief Button logout - * - - * \return nothing - */ - -function html_button_logout() { - echo "<A class=\"mtitle\" HREF=logout.php> Logout </A>"; -} /*! * \brief Echo no access and stop * @@ -275,13 +269,13 @@ function NoAccess($js=1) if ( $js == 1 ) { echo "<script>"; - echo "alert ('Cette action ne vous est pas autorisée Contactez votre responsable');"; + echo "alert ('"._('Cette action ne vous est pas autorisée Contactez votre responsable')."');"; echo "</script>"; } else { echo '<div class="u_redcontent">'; - echo '<h2 class="error"> Cette action ne vous est pas autorisée Contactez votre responsable</h2>'; + echo '<h2 class="error">'._(' Cette action ne vous est pas autorisée Contactez votre responsable').'</h2>'; echo '</div>'; } exit -1; @@ -294,10 +288,6 @@ function NoAccess($js=1) */ function FormatString($p_string) { - if ( !isset ($p_string) ) { - echo_error("ac_common.php FormatString p_string empty"); - return null; - } $p_string=trim($p_string); if (strlen($p_string) == 0 ) return null; $p_string=str_replace("\'","'",$p_string); @@ -380,39 +370,6 @@ function echo_warning($p_string) echo '<H2 class="info">'.$p_string."</H2>"; } /*! - ************************************************** - * \brief make a array with the sql - * - * \param $p_cn dbatabase connection - * \param $p_sql related sql - * \param $p_null if the array start with a null value - * - * \return: a double array [value,label] - */ -function make_array($p_cn,$p_sql,$p_null=0) { - echo_debug('ac_common',__LINE__,$p_sql); - $a=ExecSql($p_cn,$p_sql); - $max=pg_NumRows($a); - if ( $max==0) return null; - for ($i=0;$i<$max;$i++) { - $row=pg_fetch_row($a); - $r[$i]['value']=$row[0]; - $r[$i]['label']=$row[1]; - } - // add a blank item ? - if ( $p_null == 1 ) { - for ($i=$max;$i!=0;$i--) { - $r[$i]['value']= $r[$i-1]['value']; - $r[$i]['label']= $r[$i-1]['label']; - } - $r[0]['value']=-1; - $r[0]['label']=" "; - } // if ( $p_null == 1 ) - - return $r; -} -/*! - ************************************************** * \brief Show the periode which found thanks its id * * @@ -426,13 +383,12 @@ function getPeriodeName($p_cn,$p_id,$pos='p_start') { if ( $pos != 'p_start' and $pos != 'p_end') echo_error('ac_common.php'."-".__LINE__.' UNDEFINED PERIODE'); - $ret=execSql($p_cn,"select to_char($pos,'Mon YYYY') as t from parm_periode where p_id=$p_id"); - if (pg_NumRows($ret) == 0) return null; - $a=pg_fetch_array($ret,0); - return $a['t']; + $ret=$p_cn->get_value("select to_char($pos,'Mon YYYY') as t from parm_periode where p_id=$p_id"); + return $ret; } + + /*! - ************************************************** * \brief Return the period corresponding to the * date * @@ -443,35 +399,11 @@ function getPeriodeName($p_cn,$p_id,$pos='p_start') { * parm_periode.p_id */ function getPeriodeFromMonth($p_cn,$p_date) { - $R=ExecSql($p_cn,"select p_id from parm_periode where + $R=$p_cn->get_value("select p_id from parm_periode where to_char(p_start,'DD.MM.YYYY') = '01.$p_date'"); - if ( pg_NumRows($R) == 0 ) + if ( $R == "" ) return -1; - $a=pg_fetch_array($R,0); - - return $a['p_id']; -} -/*! - ************************************************** - * \brief Return the period corresponding to the - * date - * - * - * \param p_cn database connection - * \param p_date the date 'DD.MM.YYYY' - * \return parm_periode.p_id - * - */ -function getPeriodeFromDate($p_cn,$p_date) { - $R=ExecSql($p_cn,"select p_id from parm_periode where - p_start <= to_date('$p_date','DD.MM.YYYY') - and p_end >= to_date('$p_date','DD.MM.YYYY') - "); - if ( pg_NumRows($R) == 0 ) - return -1; - $a=pg_fetch_array($R,0); - - return $a['p_id']; + return $R; } /*!\brief Decode the html for the widegt richtext and remove newline *\param $p_html string to decode @@ -505,17 +437,17 @@ function sql_filter_per($p_cn,$p_from,$p_to,$p_form='p_id',$p_field='jr_tech_per if ( $p_form == 'p_id' ) { // retrieve the date - $a_start=get_periode($p_cn,$p_from); - $a_end=get_periode($p_cn,$p_to); - if ( $a_start == null or $a_end == null ) - { - echo_debug(__FILE__,__LINE__,'Attention periode '. - ' non trouvee periode p_from='.$p_from. - 'p_to_periode = '.$p_to); - } + $pPeriode=new Periode($p_cn); + $a_start=$pPeriode->get_date_limit($p_from); + $a_end=$pPeriode->get_date_limit($p_to); + if ( $a_start == null || $a_end == null ) + throw new Exception(__FILE__.__LINE__.'Attention periode '. + ' non trouvee periode p_from='.$p_from. + 'p_to_periode = '.$p_to); + - $p_from=($a_start==null)?'01.01.1900':$a_start['p_start']; - $p_to=($a_end==null)?'01.01.2100':$a_end['p_end']; + $p_from=$a_start['p_start']; + $p_to=$a_end['p_end']; } if ( $p_from == $p_to ) $periode=" $p_field = (select p_id from parm_periode ". @@ -530,11 +462,34 @@ function sql_filter_per($p_cn,$p_from,$p_to,$p_form='p_id',$p_field='jr_tech_per /*!\brief alert in javascript *\param $p_msg is the message + *\param $buffer if false, echo directly and execute the javascript, if $buffer is true, the alert javascript + * is in the return string + *\return string with alert javascript if $buffer is true */ -function alert($p_msg) +function alert($p_msg,$buffer=false) { - echo '<script language="javascript">'; - echo 'alert(\''.FormatString($p_msg).'\')'; - echo '</script>'; + $r= '<script language="javascript">'; + $r.= 'alert(\''.j($p_msg).'\')'; + $r.= '</script>'; + + if ($buffer) return $r; + echo $r; + +} +/** + *@brief set the lang thanks the _SESSION['g_lang'] var. + */ + +function set_language() { + $dir=""; + $dir=setlocale(LC_MESSAGES,$_SESSION['g_lang']); + + if ( $dir == "") { + $dir=setlocale(LC_MESSAGES,"fr_FR.utf8"); + echo '<span class="notice">'.$_SESSION['g_lang'].'domaine non supporté</h2>'; + } + bindtextdomain('messages','./lang'); + textdomain('messages'); + bind_textdomain_codeset('messages','UTF8'); } ?> diff --git a/include/action.common.inc.php b/include/action.common.inc.php new file mode 100644 index 000000000..e25ea6ea6 --- /dev/null +++ b/include/action.common.inc.php @@ -0,0 +1,360 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file is common to suivi client, suivi fournisseur, suivi + * administration. + * The needed variables are + * - $cn for the database connection + * - $p_action the $_REQUEST['p_action'] + * - $sub_action sa from suivi courrier but sc from Suivi client, fournisseur... + * + */ +echo js_include('gestion.js'); + +$supl_hidden=''; +if( isset($_REQUEST['sc'])) + $supl_hidden.=HtmlInput::hidden('sc',$_REQUEST['sc']); +if( isset($_REQUEST['f_id'])) + $supl_hidden.=HtmlInput::hidden('f_id',$_REQUEST['f_id']); +if( isset($_REQUEST['sb'])) + $supl_hidden.=HtmlInput::hidden('sb',$_REQUEST['sb']); + +/*--------------------------------------------------------------------------- */ +/* We ask to generate the document */ +/*--------------------------------------------------------------------------- */ +if ( isset($_POST['generate'])){ + $act=new Action($cn); + $act->fromArray($_POST); + if ($act->ag_id == 0 ) { + $act->save(); + $ag_id=$act->ag_id; + } else { + $act->Update(); + } + $act->generate_document($_POST['doc_mod']); + $sub_action='detail'; +} +/* for delete */ +if ( isset($_POST['delete'] )) $sub_action='delete'; +if ( $sub_action == "" ) $sub_action="list"; + +// if correction is asked go to directly to add_action +if (isset($_POST['corr'] )) +{ + $ag_comment=urldecode($_POST['ag_comment']); + $sub_action="add_action"; +} +// if this page is called from another menu (customer, supplier,...) +// a button back is added + + +//---------------------------------------------------------------------- +// Update the detail +// Add a new action related to this one or update +//---------------------------------------------------------------------- +if ( $sub_action=="update" ) +{ + // Update the modification + if ( isset($_POST['save'])) + { + $act2=new Action($cn); + $act2->fromArray($_POST ); + + if ( $act2->Update() == false ) { + $sub_action="detail"; + } + else + { + ShowActionList($cn,$base); + $url="?$base&sa=detail&ag_id=".$act2->ag_id.'&'.dossier::get(); + echo '<p><a class="mtitle" href="'.$url.'">'.hb(_('Action sauvée').' : '.$act2->ag_ref).'</a></p>'; + } + } + //---------------------------------------------------------------------- + // Add a related action + //---------------------------------------------------------------------- + if ( isset ($_POST['add_action_here']) ) + { + $act=new Action($cn); + + + //---------------------------------------- + // puis comme ajout normal (copier / coller ) + $act->fromArray($_POST); + $act->ag_id=0; + $act->d_id=0; + $act->ag_ref_ag_id=$_POST['ag_id']; + + echo '<div class="content">'; + + echo JS_LEDGER; + // Add hidden tag + echo '<form enctype="multipart/form-data" action="commercial.php" method="post"">'; + + echo dossier::hidden(); + $act->ag_comment=""; + if (isset($_REQUEST['qcode_dest'])) $act->qcode_dest=$_REQUEST['qcode_dest']; + echo $act->Display('NEW',false,$base,$retour); + + echo '<input type="hidden" name="p_action" value="'.$p_action.'">'; + echo '<input type="hidden" name="sa" value="save_action_st2">'; + echo '<input type="submit" name="save_action_st2" value="'._('Enregistrer').'">'; + echo '<input type="submit" name="generate" value="'._('Génère le document').'"></p>'; + echo $supl_hidden; + echo '</form>'; + echo '</div>'; + + } + + +} +//-------------------------------------------------------------------------------- +// Show the detail of an action +// permit the update +if ( $sub_action=='detail' ) +{ + echo '<div class="content">'; + $act=new Action($cn); + $act->ag_id=$ag_id; + echo $act->get(); + $act->ag_comment=Decode($act->ag_comment); + echo '<form enctype="multipart/form-data" action="commercial.php" method="post" >'; + echo $supl_hidden; + echo HtmlInput::hidden('p_action',$_REQUEST['p_action']); + echo dossier::hidden(); + echo JS_LEDGER; + echo $act->Display('UPD',false,$base,$retour); + echo '<input type="hidden" name="p_action" value="'.$p_action.'">'; + echo '<input type="hidden" name="sa" value="update">'; + echo HtmlInput::submit("save","Sauve"); + echo HtmlInput::submit("add_action_here",_("Ajoute une action à celle-ci")); + echo HtmlInput::submit("delete",_("Efface cette action")," onclick=\"return confirm("._('Vous confirmez l\'effacement').")\" )"); + echo '</form>'; + echo '</div>'; + +} +//------------------------------------------------------------------------------- +// Delete an action +if ( $sub_action == 'delete' ) +{ + // confirmed + $cn->start(); + $act=new Action($cn); + $act->ag_id=$_REQUEST['ag_id']; + $act->get(); + $act->remove(); + $sub_action="list"; + $cn->commit(); + ShowActionList($cn,$base); + if ( isset( $act->ag_ref) ) + echo hb(_('Action ').$act->ag_ref._(' effacée')); + exit(); +} + +//-------------------------------------------------------------------------------- +// Show a list of the action +if ( $sub_action == "list" ) { + ShowActionList($cn,$base); +} +//-------------------------------------------------------------------------------- +// Add an action +if ( $sub_action == "add_action" ) +{ + echo_debug('action',__LINE__,var_export($_POST,true)); + $act=new Action($cn); + $act->fromArray($_POST ); + $act->ag_id=0; + $act->d_id=0; + echo '<div class="content">'; + echo JS_LEDGER; + // Add hidden tag + echo '<form method="post" action="commercial.php" name="form_add" id="form_add" enctype="multipart/form-data" >'; + echo $supl_hidden; + echo dossier::hidden(); + + + $act->ag_comment=(isset($_POST['ag_comment']))?Decode($_POST['ag_comment']):""; + echo_debug("action.inc",__LINE__,"call display"); + if (isset($_REQUEST['qcode'])) $act->qcode_dest=$_REQUEST['qcode']; + echo $act->Display('NEW',false,$base,$retour); + + echo '<input type="hidden" name="p_action" value="'.$p_action.'">'; + echo '<input type="hidden" name="sa" value="save_action_st2">'; + echo '<input type="hidden" name="save_action_st2" value="save_action_st2">'; + echo '<input type="submit" name="save_action_st2" value="'._('Enregistrer').'">'; + echo '</form>'; + + echo '</div>'; +} +//-------------------------------------------------------------------------------- +// Save Action +// Stage 2 : Save the action + Files and generate eventually a document +//-------------------------------------------------------------------------------- +if ( $sub_action == "save_action_st2" ) +{ + $act=new Action($cn); + $act->fromArray($_POST); + $act->d_id=0; + $act->ag_ref_ag_id=(isset($_POST['ag_ref_ag_id']))?$_POST['ag_ref_ag_id']:0; + $act->md_id=(isset($_POST['gen_doc']))?$_POST['gen_doc']:0; + + // insert into action_gestion + echo $act->save(); + ShowActionList($cn,$base); + $url="?$base&sa=detail&ag_id=".$act->ag_id.'&'.dossier::get(); + echo '<p><a class="mtitle" href="'.$url.'">'.hb('Action Sauvée : '.$act->ag_ref).'</a></p>'; +} +//--------------------------------------------------------------------- +function ShowActionList($cn,$p_base) +{ + // show the search menu + ?> +<div id="search_action" style="width:50%;text-align:right;clear:both;display:block;"> +<fieldset> +<legend> + <?=_('Recherche avancée')?> +</legend> +<form method="get" action="commercial.php"> +<?php + echo dossier::hidden(); + $a=(isset($_GET['query']))?$_GET['query']:""; + $qcode=(isset($_GET['qcode']))?$_GET['qcode']:""; + + $supl_hidden=''; + if( isset($_REQUEST['sc'])) + $supl_hidden.=HtmlInput::hidden('sc',$_REQUEST['sc']); + if( isset($_REQUEST['f_id'])) { + $supl_hidden.=HtmlInput::hidden('f_id',$_REQUEST['f_id']); + $f=new Fiche($cn,$_REQUEST['f_id']); + $supl_hidden.=HtmlInput::hidden('qcode_dest',$f->get_quick_code()); + } + if( isset($_REQUEST['sb'])) + $supl_hidden.=HtmlInput::hidden('sb',$_REQUEST['sb']); + + echo JS_LEDGER; + $w=new ICard(); + $w->name='qcode'; + $w->value=$qcode; + $w->extra="all"; + $w->typecard='all'; + $w->jrn=0; + $w->table=0; + $list=$cn->make_list("select fd_id from fiche_def where frd_id in (4,8,9,14,15,16,25)"); + $w->extra=$list; + echo HtmlInput::phpsessid(); + echo _('Fiche').' :'.$w->search().$w->input().'<br/>'; + printf (_('Titre ou référence').': <input type="text" name="query" value="%s">', + $a); + echo '<br/>'; + $see_all=new ICheckBox('see_all'); + $see_all->selected= (isset($_REQUEST['see_all']))?true:false; + echo _('les actions fermées aussi:').$see_all->input().'<br/>'; + $my_action=new ICheckBox('all_action'); + $my_action->selected= (isset($_REQUEST['all_action']))?true:false; + echo _('affecté à d\'autre:').$my_action->input().'<br/>'; +?> +<input type="submit" name="submit_query" value="<?=_('recherche')?>"> +<input type="hidden" name="sa" value="list"> +<input type="hidden" name="p_action" value="<?=$_REQUEST['p_action']?>"> +<?=$supl_hidden?> +</form> + +</fieldset> +</div> + +<div class="content" > +<span style="float:left"> +<form method="get" action="commercial.php"> + <?php echo dossier::hidden(); ?> +<input type="submit" name="submit_query" value="<?=_("Ajout Action")?>"> +<input type="hidden" name="p_action" value="<?=$_REQUEST['p_action']?>"> +<input type="hidden" name="sa" value="add_action"> +<?=$supl_hidden?> + <input id="bt_search" type="button" onclick="toggleShow(this,'<?=_('Afficher Recherche')?>','<?=_('Cache Recherche')?>','search_action')" value=""> + +<script language="JavaScript"> +<?php + /* if criteria then show the search otherwise hide it */ + if ( (isset($_GET['qcode']) && trim($_GET['qcode']) != '') || + (isset($_GET['query']) && trim($_GET['query']) != '') || + isset ($_GET['all_action']) || + isset ($_GET['see_all'])) { + /* nothing */ + } else { +?> + toggleShow($('bt_search'),'<?=_('Afficher Recherche')?>','<?=_('Cache Recherche')?>','search_action') +<?php + } +?> + function toggleShow(p_but,p_msg_show,p_msg_hide,p_div) { + try {var detail=g(p_div); + if (detail.style.display=='block' ) { $(p_but).value=p_msg_show;detail.style.display='none';} + else { $(p_but).value=p_msg_hide;detail.style.display='block';} } + catch (error) {alert(error);} + } + +</script> + + +</form> +</span> + +<?php + // show the action in + $act=new Action($cn); + /*! \brief + * \note The field 'recherche' is about a part of the title or a ref. number + */ + $query=""; + + if ( isset($_REQUEST['query']) ) + { + // if a query is request build the sql stmt + $query="and (ag_title ~* '".FormatString($_REQUEST['query'])."' ". + "or ag_ref ='".trim(FormatString($_REQUEST['query'])). + "' or ag_comment ~* '".trim(FormatString($_REQUEST['query']))."'". + ")"; + } + + $str=""; + if ( isset($_GET['qcode'] )) + { + + // verify that qcode is not empty + if ( strlen(trim($_REQUEST['qcode'] )) != 0 ) + { + + $fiche=new Fiche($cn); + $fiche->get_by_qcode($_REQUEST['qcode']); + // if quick code not found then nothing + if ( $fiche->id == 0 ) + $str=' and false '; + else + $str=" and (f_id_dest= ".$fiche->id." ) "; + } + } + if ( ! isset($_REQUEST['see_all'])) $query .= ' and ag_state in (2,3) '; + if ( ! isset($_REQUEST['all_action'])) $query .= " and (ag_owner='".$_SESSION['g_user']."' or ag_dest='".$_SESSION['g_user']."')"; + $r=$act->myList($p_base,ACTION,$query.$str); + echo $r; + } diff --git a/include/action.inc.php b/include/action.inc.php index 20685917e..396f2d3ec 100644 --- a/include/action.inc.php +++ b/include/action.inc.php @@ -1,4 +1,3 @@ - <?php /* * This file is part of PhpCompta. @@ -20,16 +19,38 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /*! \file - * \brief Page who manage the different action (meeting, letter) + * \brief Page who manage the different actions (meeting, letter) */ -$User->can_request(GECOUR); +require_once('class_ipopup.php'); +$User->can_request(GECOUR); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('infobulle.js'); +echo js_include('acc_ledger.js'); +echo js_include('ajax_fiche.js'); +echo js_include('dragdrop.js'); + +echo JS_CARD; +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); +echo ICard::ipopup('ipopcard'); + + +$retour=HtmlInput::button_anchor(_('Retour'),'?p_action=suivi_courrier&my_action&'.dossier::get()); //----------------------------------------------------- // Action //----------------------------------------------------- -require_once("class_widget.php"); +require_once("class_icard.php"); +require_once("class_ispan.php"); +require_once("class_ifile.php"); +require_once("class_itext.php"); require_once("class_action.php"); - +require_once('class_iaction.php'); /*!\brief Show the list of action, this code should be common * to several webpage. But for the moment we keep like that * because it is used only by this file. @@ -37,98 +58,6 @@ require_once("class_action.php"); * \param $retour button for going back * \param $h_url calling url */ -function ShowActionList($cn,$retour,$h_url) -{ - // show the search menu - ?> -<div> -<span style="position:float;float:left"> -<form method="get" action="commercial.php"> -<?php - echo dossier::hidden(); - $a=(isset($_GET['query']))?$_GET['query']:""; - $qcode=(isset($_GET['qcode']))?$_GET['qcode']:""; - echo JS_SEARCH_CARD; - $w=new widget('js_search_only'); - $w->name='qcode'; - $w->value=$qcode; - $w->label='Quick Code1'; - $w->extra='4,9,14,16,8'; - $w->table=0; - echo '<span>'; - echo $w->IOValue(); - printf ('Titre ou référence: <input type="text" name="query" value="%s"></span>', - $a); - - - $sp= new widget("span"); - echo $sp->IOValue("qcode_label","",$qcode); - - -?> - -<input type="submit" name="submit_query" value="recherche"> -<input type="hidden" name="sa" value="list"> -<input type="hidden" name="p_action" value="suivi_courrier"> -</form> -</span> - -<span style="float:right"> -<form method="get" action="commercial.php"> - <?php echo dossier::hidden(); ?> -<input type="submit" name="submit_query" value="Ajout Action"> -<input type="hidden" name="p_action" value="suivi_courrier"> -<input type="hidden" name="sa" value="add_action"> -<!-- <input type="hidden" name="qcode_dest" value=<?php echo '"'.$qcode_dest.'"';?> --> - <?php // if called from another menu, url is set - echo $h_url; - echo $retour; ?> -</form> -</span> -</div> -<div class="content"> - -<?php - // show the action in - $act=new action($cn); - /*! \brief - * \note The field 'recherche' is about a part of the title or a ref. number - */ - $query=""; - - if ( isset($_REQUEST['query']) ) - { - $com=urlencode($_REQUEST['query']); - // if a query is request build the sql stmt - $query="and (ag_title ~* '".FormatString($_REQUEST['query'])."' ". - "or ag_ref ='".trim(FormatString($_REQUEST['query'])). - "' or ag_comment ~* '$com'". - ")"; - } - - $str=""; - if ( isset($_GET['qcode'] )) - { - - // verify that qcode is not empty - if ( strlen(trim($_REQUEST['qcode'] )) != 0 ) - { - - $fiche=new Fiche($cn); - $fiche->get_by_qcode($_REQUEST['qcode']); - // if quick code not found then nothing - if ( $fiche->id == 0 ) - $str=' and false '; - else - $str=" and (f_id_exp= ".$fiche->id." or ". - "f_id_dest=".$fiche->id.")"; - - } - } - - $r=$act->myList(ACTION,$query.$str); - echo $r; - } // We need a sub action (3rd level) // show a list of already taken action @@ -136,287 +65,14 @@ function ShowActionList($cn,$retour,$h_url) // permit also a search // show detail $sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:""; +/* if ag_id is set then we give it otherwise we have problem + * with the generation of document + */ +$ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0; +$p_action=$_REQUEST['p_action']; +$base='p_action='.$p_action; -if ( $sub_action == "" ) $sub_action="list"; - -// if correction is asked go to directly to add_action -if (isset($_POST['corr'] )) -{ - $ag_comment=urldecode($_POST['ag_comment']); - $sub_action="add_action"; -} -// if this page is called from another menu (customer, supplier,...) -// a button back is added -$retour=""; -$h_url=""; - -if ( isset ($_REQUEST['url'])) -{ - $retour=widget::button_href('Retour',urldecode($_REQUEST['url'])); - $h_url=sprintf('<input type="hidden" name="url" value="%s">',urldecode($_REQUEST['url'])); -} -//---------------------------------------------------------------------- -// Update the detail -// Add a new action related to this one or update -//---------------------------------------------------------------------- -if ( $sub_action=="update" ) -{ - // Update the modification - if ( isset($_POST['save'])) - { - $act=new action($cn); - $act=new action($cn); - - $act->ag_id=$_POST['ag_id']; - $act->ag_comment=$_POST['ag_comment']; - $act->ag_timestamp=$_POST['ag_timestamp']; - $act->d_state=$_POST['d_state']; - $act->dt_id=(isset($_POST['dt_id']))?$_POST['dt_id']:0; - $act->qcode_exp=$_POST['qcode_exp']; - $act->qcode_dest=$_POST['qcode_dest']; - $act->ag_title=$_POST['ag_title']; - $act->d_id=(isset($_POST['d_id']))?$_POST['d_id']:0; - $act->ag_ref_ag_id=(isset($_POST['ag_ref_ag_id']))?$_POST['ag_ref_ag_id']:0; - - if ( $act->Update() == false ) { - $sub_action="detail"; - } - else - { - ShowActionList($cn,$retour,$h_url); - } - } - //---------------------------------------------------------------------- - // Add a related action - //---------------------------------------------------------------------- -if ( isset ($_POST['add_action_here']) ) -{ - $act=new action($cn); - $act->ag_ref_ag_id=$_POST['ag_id']; - - //---------------------------------------- - // puis comme ajout normal (copier / coller ) - echo $retour; - $act->ag_id=0; - $act->qcode_dest=(isset($_POST['qcode_dest']))?$_REQUEST['qcode_dest']:""; - $act->qcode_exp=(isset($_POST['qcode_exp']))?$_REQUEST['qcode_exp']:""; - $act->f_id_dest=(isset($_POST['f_id_dest']))?$_POST['f_id_dest']:0; - $act->f_id_exp=(isset($_POST['f_id_exp']))?$_POST['f_id_exp']:0; - - $act->ag_ref_ag_id=$_POST['ag_id']; - $act->ag_timestamp=(isset($_POST['ag_timestamp']))?$_POST['ag_timestamp']:""; - $act->qcode_dest=isset($_POST['qcode_dest'])?$_REQUEST['qcode_dest']:""; - $act->qcode_exp=isset($_POST['qcode_exp'])?$_REQUEST['qcode_exp']:""; - $act->d_id=0; - $act->dt_id=isset($_POST['dt_id'])?$_REQUEST['dt_id']:""; - $act->d_state=(isset($_POST['d_state']))?$_POST['d_state']:""; - $act->ag_ref=""; - $act->ag_title=(isset($_POST['ag_title']))?$_POST['ag_title']:""; - echo '<div class="content">'; - echo JS_SEARCH_CARD; - // Add hidden tag - echo '<form name="RTEDemo" action="commercial.php?p_action=suivi_courrier" method="post" onsubmit="return submitForm();">'; - - // $act->ag_comment=(isset($_POST['ag_comment']))?Decode($_POST['ag_comment']):""; - echo dossier::hidden(); - $act->ag_comment=""; - echo_debug("action.inc",__LINE__,"call display"); - echo $act->Display('NEW',false); - - echo '<input type="hidden" name="p_action" value="suivi_courrier">'; - echo '<input type="hidden" name="sa" value="save_action_st2">'; - - echo $h_url; - echo '<input type="submit" name="save_action_st2" value="Enregistrer"></p>'. - '</form>'. - '</div>'; - - } - - -} -//-------------------------------------------------------------------------------- -// Show the detail of an action -// permit the update -if ( $sub_action=='detail' ) -{ - echo '<div class="content">'; - echo '<div style="float:right">'; - echo '<A class="mtitle" HREF="commercial.php?p_action=suivi_courrier&'.$str_dossier.'"><input type="button" value="Retour"></A>'; - echo '</div>'; - $act=new action($cn); - $act->ag_id=$_REQUEST['ag_id']; - echo $act->get(); - $act->ag_comment=Decode($act->ag_comment); - echo '<form name="RTEDemo" action="commercial.php?p_action=suivi_courrier" enctype="multipart/form-data" method="post" onsubmit="return submitForm();" >'; - echo dossier::hidden(); - echo JS_SEARCH_CARD; - echo $act->display('UPD',false); - echo '<input type="hidden" name="p_action" value="suivi_courrier">'; - echo '<input type="hidden" name="sa" value="update">'; - $upload=new widget("file"); - $upload->name="file_upload"; - $upload->value=""; - echo "Enregistrer le fichier ".$upload->IOValue(); - echo widget::submit("save","Sauve"); - echo widget::submit("add_action_here","Ajoute une action à celle-ci"); - echo '</form>'; - echo '<form action="commercial.php" method="post" >'; - echo dossier::hidden(); - - echo widget::submit("delete","Efface cette action"); - echo '<input type="hidden" name="p_action" value="suivi_courrier">'; - echo '<input type="hidden" name="sa" value="delete">'; - echo '<input type="hidden" name="ag_id" value="'.$act->ag_id.'">'; - echo '</form>'; - - echo $retour; - - echo '</div>'; -} -//------------------------------------------------------------------------------- -// Delete an action -if ( $sub_action == 'delete' ) -{ - // first the confirmation - if ( ! isset ($_POST['confirm_delete'])) - { - echo '<div class="u_redcontent">'; - echo '<A class="mtitle" HREF="commercial.php?p_action=suivi_courrier&'.$str_dossier.'"><input type="button" value="Retour"></A>'; - $act=new action($cn); - $act->ag_id=$_REQUEST['ag_id']; - echo $act->get(); - $act->ag_comment=Decode($act->ag_comment); - - echo JS_SEARCH_CARD; - echo $act->display('READ',false); - // display the form - echo '<form action="commercial.php?p_action=suivi_courrier" method="post" >'; - echo dossier::hidden(); - - echo '<input type="hidden" name="p_action" value="suivi_courrier">'; - echo '<input type="hidden" name="sa" value="delete">'; - echo '<input type="hidden" name="ag_id" value="'.$act->ag_id.'">'; - $upload=new widget("text"); - echo widget::submit("confirm_delete","Confirmer l'effacement"); - - echo '</form>'; - - - - echo '</div>'; - - } - else - { - // confirmed - $act=new action($cn); - $act->ag_id=$_REQUEST['ag_id']; - $act->remove(); - $sub_action="list"; - } -} - -//-------------------------------------------------------------------------------- -// Show a list of the action -if ( $sub_action == "list" ) - ShowActionList($cn,$retour,$h_url); - -//-------------------------------------------------------------------------------- -// Add an action -if ( $sub_action == "add_action" ) -{ - echo '<div style="float:right">'; - echo '<A class="one" HREF="commercial.php?p_action=suivi_courrier&'.$str_dossier.'"><input type="button" value="Retour"></A>'; - echo '</div>'; - echo_debug('action',__LINE__,var_export($_POST,true)); - echo $retour; - $act=new action($cn); - $act->ag_id=0; - $act->ag_ref_ag_id=(isset($_POST['ag_ref_ag_id']))?$_POST['ag_ref_ag_id']:"0"; - $act->ag_timestamp=(isset($_POST['ag_timestamp']))?$_POST['ag_timestamp']:""; - $act->qcode_dest=(isset($_POST['qcode_dest']))?$_REQUEST['qcode_dest']:""; - $act->qcode_exp=(isset($_POST['qcode_exp']))?$_REQUEST['qcode_exp']:""; - $act->f_id_dest=(isset($_POST['f_id_dest']))?$_POST['f_id_dest']:0; - $act->f_id_exp=(isset($_POST['f_id_exp']))?$_POST['f_id_exp']:0; - $act->d_id=0; - $act->dt_id=isset($_POST['dt_id'])?$_REQUEST['dt_id']:""; - $act->d_state=(isset($_POST['d_state']))?$_POST['d_state']:""; - $act->ag_ref=""; - $act->ag_title=(isset($_POST['ag_title']))?$_POST['ag_title']:""; - echo '<div class="u_redcontent">'; - echo JS_SEARCH_CARD; - // Add hidden tag - echo '<form name="RTEDemo" action="commercial.php?p_action=suivi_courrier" method="post" onsubmit="return submitForm();">'; - echo dossier::hidden(); - - - $act->ag_comment=(isset($_POST['ag_comment']))?Decode($_POST['ag_comment']):""; - echo_debug("action.inc",__LINE__,"call display"); - echo $act->Display('NEW',false); - - echo '<input type="hidden" name="p_action" value="suivi_courrier">'; - echo '<input type="hidden" name="sa" value="save_action_st2">'; - - echo $h_url; - echo '<input type="submit" name="save_action_st2" value="Enregistrer"></p>'. - '</form>'. - '</div>'; - -} -//-------------------------------------------------------------------------------- -// 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_comment=$_POST['ag_comment']; - $act->ag_timestamp=$_POST['ag_timestamp']; - $act->d_state=$_POST['d_state']; - $act->dt_id=$_POST['dt_id']; - $act->qcode_dest=$_POST['qcode_dest']; - $act->qcode_exp=$_POST['qcode_exp']; - $act->f_id_dest=$_POST['f_id_dest']; - $act->f_id_exp=$_POST['f_id_exp']; - - $act->ag_title=$_POST['ag_title']; - $act->d_id=0; - $act->ag_ref_ag_id=(isset($_POST['ag_ref_ag_id']))?$_POST['ag_ref_ag_id']:0; - $act->md_id=(isset($_POST['gen_doc']))?$_POST['gen_doc']:0; - - $act->gen=isset($_POST['p_gen'])?'on':'off'; - // insert into action_gestion - echo $act->SaveStage2(); - echo '<A class="one" HREF="commercial.php?p_action=suivi_courrier&'.$str_dossier.'"><INPUT TYPE="BUTTON" VALUE="Retour Liste"></A>'; -} - -//-------------------------------------------------------------------------------- -// 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']; - $act->ag_ref_ag_idid=$_POST['ag_ref_ag_id']; - $act->ag_comment=$_POST['ag_comment']; - $act->ag_timestamp=$_POST['ag_timestamp']; - $act->d_state=$_POST['d_state']; - $act->dt_id=$_POST['dt_id']; - $act->qcode_dest=$_POST['qcode_dest']; - $act->qcode_exp=$_POST['qcode_exp']; - - $act->ag_title=$_POST['ag_title']; - $d_id=(isset($_POST['d_id']))?$_POST['d_id']:0; - $act->ag_ref_ag_id=(isset($_POST['ag_ref_ag_id']))?$_POST['ag_ref_ag_id']:0; - echo $act->SaveStage3($d_id); - ShowActionList($cn,$retour,$h_url); - -} -//--------------------------------------------------------------------- - +require_once('action.common.inc.php'); echo "</div>"; + ?> diff --git a/include/adm.inc.php b/include/adm.inc.php new file mode 100644 index 000000000..251fe2430 --- /dev/null +++ b/include/adm.inc.php @@ -0,0 +1,170 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 2729 $ */ +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + /*!\brief include from adm.inc.php and concerned only the customer card and + * the customer category + */ +require_once("class_iselect.php"); +require_once("class_ihidden.php"); +require_once("class_customer.php"); +require_once("class_ibutton.php"); +require_once('class_iaction.php'); +require_once('class_fiche_def.php'); +require_once('class_iaction.php'); +require_once('class_fiche_def.php'); +require_once('class_ipopup.php'); +require_once('class_admin.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo JS_CARD; +echo JS_AJAX_FICHE; +echo HtmlInput::phpsessid(); +echo ICard::ipopup('ipop_newcard'); +$ip_cat=new IPopup('ipop_cat'); +$ip_cat->title=_('Ajout d\'une catégorie'); +$ip_cat->value=''; +echo $ip_cat->input(); +echo IPoste::ipopup('ipop_account'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); +echo ICard::ipopup('ipopcard'); + +$low_action=(isset($_REQUEST['sb']))?$_REQUEST['sb']:"list"; +/*! \file + * \brief Called from the module "Gestion" to manage the customer + */ +$User->can_request(GECUST); +$href=basename($_SERVER['PHP_SELF']); + +// by default open liste +if ( $low_action == "" ) + $low_action="list"; + + +//----------------------------------------------------- +// Remove a card +//----------------------------------------------------- +if ( isset($_POST['delete'] ) ) +{ + if ( $User->check_action(FICADD) == 0 ) { + alert('Vous ne pouvez pas enlever de fiche'); + return; + } + + $f_id=$_REQUEST['f_id']; + + $fiche=new Customer($cn,$f_id); + $fiche->remove(); + $low_action="list"; + +} + +//----------------------------------------------------- +// list of customer +//----------------------------------------------------- +if ( $low_action == "list" ) +{ + +?> +<div class="content"> +<span style="position:float;float:left"> +<form method="get" action="<?php echo $href; ?>"> +<?php + echo dossier::hidden(); + $a=(isset($_GET['query']))?$_GET['query']:""; + printf ('Recherche <input type="text" name="query" value="%s">', + $a); +?> +<input type="submit" name="submit_query" value="recherche"> +<input type="hidden" name="p_action" value="adm"> +</form> +</span> +<?php + $adm=new Admin($cn); + $search=(isset($_GET['query']))?$_GET['query']:""; + + echo '<div class="content">'; + echo $adm->Summary($search,'adm'); + + + echo '<br>'; + echo '<br>'; + echo '<br>'; + /* Add button */ + $f_add_button=new IButton('add_card'); + $f_add_button->label=_('Créer une nouvelle fiche'); + $f_add_button->set_attribute('ipopup','ipop_newcard'); + $f_add_button->set_attribute('win_refresh','yes'); + + $f_add_button->set_attribute('type_cat',FICHE_TYPE_ADM_TAX); + $f_add_button->javascript=" select_card_type(this);"; + echo $f_add_button->input(); + + $f_cat_button=new IButton('add_cat'); + $f_cat_button->set_attribute('ipopup','ipop_cat'); + $f_cat_button->set_attribute('type_cat',FICHE_TYPE_ADM_TAX); + $f_cat_button->label=_('Ajout d\'une catégorie'); + $f_cat_button->javascript='add_category(this)'; + echo $f_cat_button->input(); + echo '</div>'; + echo '</div>'; + + +} +/*---------------------------------------------------------------------- + * Detail for a card, Suivi, Contact, Operation,... * + * cc stands for customer card + *----------------------------------------------------------------------*/ +if ( $low_action == 'detail') { + /* Menu */ + require_once('adm_card.inc.php'); + exit(); +} + +if ( $low_action=="insert" ) +{ + /* security : check if user can add card */ + if ( $User->check_action(FICADD) == 0 ) { + alert('Vous ne pouvez pas ajouter de fiche'); + return; + } + + $customer=new Customer($cn); + $customer->Save($_REQUEST['fd_id']); + echo '<div class="content">'; + echo "<table>"; + echo $customer->Display(true); + echo "</table>"; + $retour=new IAction(); + $retour->label="Retour"; + $retour->value="?p_action=adm&".dossier::get(); + echo $retour->input(); + echo '</div>'; + +} + +html_page_stop(); +?> diff --git a/include/adm_card.inc.php b/include/adm_card.inc.php new file mode 100644 index 000000000..879bebe26 --- /dev/null +++ b/include/adm_card.inc.php @@ -0,0 +1,130 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file will handle all the actions for a specific customer ( + * contact,operation,invoice and financial) + * include from client.inc.php and concerned only the customer card and + * the customer category + */ +require_once('class_contact.php'); +require_once('class_ipopup.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo js_include('card.js'); + +echo ICard::ipopup('ipopcard'); + + /* $sub_action = sb = detail */ + /* $cn database conx */ +$return=new IAction(); +$return->name='retour'; +$return->label='Retour'; +$return->value='?p_action=adm&'.$str_dossier; +$root="?p_action=adm&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier; +$ss_action=( isset ($_REQUEST['sc'] ))? $_REQUEST['sc']: ''; +switch ($ss_action) { +case 'dc': + $def=1; + break; +case 'sv': /* all the actions (mail,meeting...) */ + $def=2; + break; +case 'cn': + $def=3; + break; +case 'op': + $def=4; + break; +default: + $def=1; + $ss_action='dc'; +} +$f=new fiche($cn,$_REQUEST['f_id']); +echo '<span style="padding:2px"><h2 class="info2" style="display:inline">'.$f->get_quick_code()." ".$f->strAttribut(ATTR_DEF_NAME).'</span></h2>'; +echo '<div class="u_subtmenu">'; +echo ShowItem(array( + array($root."&sc=dc",_('Fiche'),_('Détail de la fiche'),1), + array($root.'&sc=sv',_('Suivi'),_('Suivi adm, devis, bon de commande, courrier'),2), + array($root.'&sc=cn',_('Contact'),_('Liste de contacts de cette administration'),3), + array($root.'&sc=op',_('Opérations'),_('Toutes les opérations'),4), + array('?p_action=adm&'.dossier::get(),_('Retour liste'),_('Retour à la liste des administration'),5) + ), + 'H',"mtitle","mtitle",$def,' width="100%"'); +echo '</div>'; + +//--------------------------------------------------------------------------- +// Show Detail of a card and category +//--------------------------------------------------------------------------- +if ( $ss_action == 'dc' ) +{ + require_once('detail_adm.inc.php'); +} +//--------------------------------------------------------------------------- +// Follow up : mail, bons de commande, livraison, rendez-vous... +//--------------------------------------------------------------------------- +if ( $ss_action == 'sv' ) { + require_once('suivi_adm.inc.php'); +} +/*---------------------------------------------------------------------- + * Operation all the operation of this customer + * + * ----------------------------------------------------------------------*/ +if ( $ss_action == 'op') { + require_once('operation_adm.inc.php'); +} +/*---------------------------------------------------------------------- + * All the contact + * + *----------------------------------------------------------------------*/ +if ( $ss_action == 'cn') { + echo '<div class="content">'; + echo dossier::hidden(); + echo HtmlInput::phpsessid(); + $f=new fiche($cn,$_REQUEST['f_id']); + $contact=new Contact($cn); + $contact->company=$f->get_quick_code(); + echo $contact->summary(""); + + $sql=' select fd_id from fiche_def where frd_id='.FICHE_TYPE_CONTACT; + $filter=$cn->make_list($sql); + if ( empty ($filter)) { + echo '<span class="notice">'; + echo _("Vous devez aller dans fiche et créer une catégorie pour les contacts"); + echo '</span>'; + exit(); + } + /* Add button */ + $f_add_button=new IButton('add_card'); + $f_add_button->label=_('Créer une nouvelle fiche'); + $f_add_button->set_attribute('ipopup','ipopcard'); + + $f_add_button->set_attribute('filter',$filter); + $f_add_button->javascript=" select_card_type(this);"; + + echo $f_add_button->input(); + echo '</div>'; +} diff --git a/include/anc_group.inc.php b/include/anc_group.inc.php index f6b740d7e..9a7652007 100644 --- a/include/anc_group.inc.php +++ b/include/anc_group.inc.php @@ -24,8 +24,9 @@ *\brief manage the group * */ +require_once("class_itext.php"); +require_once("class_iselect.php"); require_once ('class_anc_group.php'); -require_once ('class_widget.php'); $r=new Anc_Group($cn); @@ -63,20 +64,21 @@ foreach ($array as $idx=>$m) { echo '<td> Effacer <input type="Checkbox" name="ck[]" value="'.$m->ga_id.'">'.'</td>'; echo '</tr>'; } -$w=new widget("text"); -$val_pa_id=make_array($cn,"select pa_id,pa_name from plan_analytique"); -$wPa_id=new widget ("select"); +$w=new IText("ga_id"); +$wDesc=new IText("ga_description"); +$val_pa_id=$cn->make_array("select pa_id,pa_name from plan_analytique"); +$wPa_id=new ISelect("pa_id"); $wPa_id->value=$val_pa_id; -echo "<td>".$w->IOValue("ga_id")."</td>"; -echo "<td>".$wPa_id->IOValue("pa_id")."</td>"; -echo "<td>".$w->IOValue("ga_description"). -widget::submit('add','Ajouter'). +echo "<td>".$w->input()."</td>"; +echo "<td>".$wPa_id->input("pa_id")."</td>"; +echo "<td>".$wDesc->input("ga_description"). +HtmlInput::submit('add','Ajouter'). "</td>";; echo '</table>'; echo "<hr>"; -echo widget::submit('remove','Effacer'); +echo HtmlInput::submit('remove','Effacer'); echo '</div>'; diff --git a/include/anc_imp.inc.php b/include/anc_imp.inc.php index fc7a13940..9c858136b 100644 --- a/include/anc_imp.inc.php +++ b/include/anc_imp.inc.php @@ -20,30 +20,30 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * * * \brief this file is included for printing the analytic - * accountancy. + * accountancy. * */ +require_once("class_ihidden.php"); require_once('class_anc_operation.php'); require_once('class_anc_plan.php'); require_once('ac_common.php'); -require_once('class_widget.php'); //-- the menu -$menu=array(array("?p_action=ca_imp&sub=listing&$str_dossier","Listing","Listing des opérations","listing"), - array("?p_action=ca_imp&sub=bs&$str_dossier","Balance simple","Balance simple d'un plan analytique","bs"), - array("?p_action=ca_imp&sub=bc2&$str_dossier","Balance croisé","Balance croisé de 2 plans analytiques","bc2") +$menu=array(array("?p_action=ca_imp&sub=listing&$str_dossier",_("Listing"),_("Listing des opérations"),"listing"), + array("?p_action=ca_imp&sub=bs&$str_dossier",_("Balance simple"),_("Balance simple d'un plan analytique"),"bs"), + array("?p_action=ca_imp&sub=bc2&$str_dossier",_("Balance croisée"),_("Balance croisée de 2 plans analytiques"),"bc2") ); $sub=(isset($_GET['sub']))?$_GET['sub']:'no'; echo '<div class="content">'; echo ShowItem($menu,"H","mtitle","mtitle",$sub); echo '</div>'; -$hidden=new widget("hidden"); -$str_hidden=$hidden->IOValue("p_action","ca_imp"); -$str_hidden.=$hidden->IOValue("sub",$sub); +$hidden=new IHidden(); +$str_hidden=$hidden->input("p_action","ca_imp"); +$str_hidden.=$hidden->input("sub",$sub); // select following the sub action //------------------------------------------------------------------------------ @@ -59,7 +59,7 @@ if ( $sub=='listing') { echo '<div class="u_redcontent">'; //-------------------------------- - // export Buttons + // export Buttons //--------------------------------- echo $list->show_button($str_hidden); echo $list->display_html(); @@ -68,7 +68,7 @@ if ( $sub=='listing') { } //------------------------------------------------------------------------------ -// Simple balance +// Simple balance if ($sub == 'bs') { require_once ('class_anc_balance_simple.php'); $bs=new Anc_Balance_Simple($cn); diff --git a/include/anc_od.inc.php b/include/anc_od.inc.php index ee7bbe649..8e6756549 100644 --- a/include/anc_od.inc.php +++ b/include/anc_od.inc.php @@ -20,14 +20,15 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * * * \brief Misc Operation for analytic accountancy * */ +require_once("class_ihidden.php"); +require_once("class_iselect.php"); require_once("class_anc_account.php"); -require_once ("class_widget.php"); require_once ("class_anc_operation.php"); require_once ("class_anc_plan.php"); require_once ("class_anc_group_operation.php"); @@ -35,7 +36,7 @@ require_once ("class_anc_group_operation.php"); $pa=new Anc_Plan($cn); $m=$pa->get_list(); -if ( ! $m ) { echo '<h2 class="info"> Aucun plan analytique défini</h2>';exit();} +if ( ! $m ) { echo '<h2 class="info">'._('Aucun plan analytique défini').'</h2>';exit();} @@ -48,10 +49,10 @@ echo ' <table> <tr> <td class="mtitle" > - <A class="mtitle" HREF="?p_action=ca_od&new&'.$str_dossier.'"> Nouveau </A> + <A class="mtitle" HREF="?p_action=ca_od&new&'.$str_dossier.'"> '._('Nouveau').' </A> </td> <td class="mtitle" > - <A class="mtitle" HREF="?p_action=ca_od&see&'.$str_dossier.'"> Liste opérations </A + <A class="mtitle" HREF="?p_action=ca_od&see&'.$str_dossier.'">'._('Liste opérations').' </A </td> </tr> </table> @@ -60,7 +61,7 @@ echo ' '; //---------------------------------------------------------------------- -// the pa_id is set +// the pa_id is set // //---------------------------------------------------------------------- if ( isset($_GET['see'])) { @@ -77,28 +78,28 @@ echo ' '; echo dossier::hidden(); - $hid=new widget("hidden"); - + $hid=new IHidden(); + $hid->name="p_action"; $hid->value="ca_od"; - echo $hid->IOValue(); - + echo $hid->input(); + $hid->name="see"; $hid->value=""; - echo $hid->IOValue(); + echo $hid->input(); - $w=new widget("select"); + $w=new ISelect(); $w->name="p_periode"; // filter on the current year $filter_year=" where p_exercice='".$User->get_exercice()."'"; - - $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); + + $periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); $User=new User($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); $w->value=$periode_start; $w->selected=$current; - echo $w->IOValue(); - echo 'Période '.widget::submit('gl_submit','Valider').'</form>'; + echo $w->input(); + echo 'Période '.HtmlInput::submit('gl_submit','Valider').'</form>'; echo '<div class="u_redcontent">'; echo $a->html_table($current); @@ -110,7 +111,7 @@ if ( isset($_POST['save'])) { // and exit //----------------------------- echo '<div class="u_redcontent">'. - 'Opération sauvée'; + _('Opération sauvée'); $a=new Anc_Group_Operation($cn); $a->get_from_array($_POST); @@ -126,14 +127,14 @@ if ( isset($_GET['new'])) { //------------------------------------------ $a=new Anc_Group_Operation($cn); echo JS_CAOD_COMPUTE; - $wSubmit=new widget('hidden',"p_action","ca_od"); + $wSubmit=new IHidden("p_action","ca_od"); $wSubmit->table=0; echo '<div class="u_redcontent">'; echo '<form method="post">'; echo dossier::hidden(); - echo $wSubmit->IOValue(); + echo $wSubmit->input(); echo $a->form(); - echo widget::submit("save","Sauver"); + echo HtmlInput::submit("save","Sauver"); echo '</form>'; echo '<div class="info"> Débit = <span id="totalDeb"></span> diff --git a/include/anc_pa.inc.php b/include/anc_pa.inc.php index 56a8e11e4..05db57368 100644 --- a/include/anc_pa.inc.php +++ b/include/anc_pa.inc.php @@ -20,7 +20,7 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * * \brief Plan Analytique * @@ -30,7 +30,7 @@ require_once("class_anc_account.php"); $ret=""; //--------------------------------------------------------------------------- -// action +// action // Compute the u_redcontent div //--------------------------------------------------------------------------- if ( isset($_REQUEST['sa'])) @@ -40,7 +40,6 @@ if ( isset($_REQUEST['sa'])) // show the form for adding a pa if ( $sa == "add_pa") { - $wAction=new widget("hidden","","p_action","ca_pa"); $new=new Anc_Plan($cn); if ( $new->isAppend() == true) { @@ -49,11 +48,9 @@ if ( isset($_REQUEST['sa'])) $ret.= '<form method="post">'; $ret.=dossier::hidden(); $ret.= $new->form(); - $wSa=new widget("HIDDEN","","sa","pa_write"); - $wSa->value="pa_write"; - $ret.= $wSa->IOValue(); - $ret.= $wAction->IOValue(); - $ret.=widget::submit("submit","Enregistre"); + $ret.= HtmlInput::hidden("sa","pa_write"); + $ret.=HtmlInput::hidden("p_action","ca_pa"); ; + $ret.=HtmlInput::submit("submit","Enregistre"); $ret.= '</form>'; $ret.= '</div>'; } @@ -65,7 +62,7 @@ if ( isset($_REQUEST['sa'])) "</h2></div>"; } } - // Add + // Add if ( $sa == "pa_write") { $new=new Anc_Plan($cn); @@ -75,9 +72,9 @@ if ( isset($_REQUEST['sa'])) { $ret.= '<h2 class="info">'. "Maximum de plan analytique est atteint". - "</h2>"; + "</h2>"; } - else + else { $new=new Anc_Plan($cn); $new->name=$_POST['pa_name']; @@ -89,20 +86,20 @@ if ( isset($_REQUEST['sa'])) if ( $sa == "pa_detail" ) { $new=new Anc_Plan($cn,$_GET['pa_id']); - $wAction=new widget("hidden","","p_action","ca_pa"); - $wSa=new widget("HIDDEN","","sa","pa_update"); + $wAction=HtmlInput::hidden("p_action","ca_pa"); + $wSa=HtmlInput::hidden("sa","pa_update"); $new->get(); - + $ret.= '<div class="u_redcontent">'; $ret.= '<h2 class="info">Mise à jour</h2>'; $ret.= '<form method="post">'; $ret.=dossier::hidden(); $ret.= $new->form(); - $ret.= $wSa->IOValue(); - $ret.= $wAction->IOValue(); - $ret.=widget::submit("submit","Enregistre"); + $ret.= $wSa; + $ret.= $wAction; + $ret.=HtmlInput::submit("submit","Enregistre"); $ret.=sprintf('<A class="mtitle" HREF="%s">'. '<input type="button" value="Efface"></A>', "?p_action=ca_pa&pa_id=".$_GET['pa_id']."&sa=pa_delete&$str_dossier"); @@ -127,13 +124,13 @@ if ( isset($_REQUEST['sa'])) { $po=new Anc_Account($cn); $po->pa_id=$_REQUEST['pa_id']; - $wSa=new widget("hidden","sa","sa","po_write"); + $wSa=HtmlInput::hidden("sa","po_write"); $ret.='<div class="u_redcontent">'; $ret.='<form method="post">'; $ret.=dossier::hidden(); $ret.=$po->form(); - $ret.=$wSa->IOValue(); - $ret.=widget::submit("add","Ajout"); + $ret.=$wSa; + $ret.=HtmlInput::submit("add","Ajout"); $ret.="</form>"; $ret.="</div>"; } @@ -158,7 +155,6 @@ if ( isset($_REQUEST['sa'])) */ if ( $sa=="po_detail") { - $wHidden=new widget('hidden','','sa','po_update'); $po=new Anc_Account($cn,$_GET['po_id']); $po->get_by_id(); $ret.='<div class="u_redcontent">'; @@ -166,8 +162,8 @@ if ( isset($_REQUEST['sa'])) $ret.=dossier::hidden(); $ret.=$po->form(); - $ret.=$wHidden->IOValue(); - $ret.='<input type="submit" value="Correction">'; + $ret.=HtmlInput::hidden('sa','po_update'); + $ret.=HtmlInput::submit('Correction','Correction'); $ret.=sprintf('<A class="mtitle" HREF="?p_action=ca_pa&sa=po_delete&po_id=%s&pa_id=%s&'.$str_dossier.'">'. '<input type="button" value="Efface" onClick="return confirm(\' Voulez-vous vraiment effacer ce poste\');"></A>', $po->id, @@ -208,7 +204,7 @@ if ( isset($_REQUEST['sa'])) $ret.="<th> Plan A </td>"; $ret.="</tr>"; $class=""; - foreach ($array as $obj) + foreach ($array as $obj) { $count++; if ( $count %2 == 0 ) @@ -231,7 +227,7 @@ if ( isset($_REQUEST['sa'])) } $ret.="</table>"; - $ret.=widget::button_href('Ajout',"?p_action=ca_pa&sa=po_add&pa_id=".$_GET['pa_id']."&".$str_dossier); + $ret.=HtmlInput::button_anchor('Ajout',"?p_action=ca_pa&sa=po_add&pa_id=".$_GET['pa_id']."&".$str_dossier); $ret.='</div>'; } @@ -257,7 +253,7 @@ if ( empty($list) ) echo '<a class="mtitle" href="?p_action=ca_pa&sa=add_pa&'.$str_dossier.'">Ajout d\'un plan comptable</a>'; echo '</TD></TR>'; echo '</TABLE>'; - + echo '</div>'; if ( ! isset ( $_REQUEST['sa'])) echo '<div class="u_redcontent">'. diff --git a/include/argenta_be.inc.php b/include/argenta_be.inc.php index 9c16431d6..a2ff3c4a4 100644 --- a/include/argenta_be.inc.php +++ b/include/argenta_be.inc.php @@ -28,6 +28,7 @@ // Bank Argenta //----------------------------------------------------- $line=0; +$p_cn->set_encoding('latin1'); while (($data = fgetcsv($handle, 2000,"!")) !== FALSE) { $num = count($data); @@ -67,7 +68,7 @@ while (($data = fgetcsv($handle, 2000,"!")) !== FALSE) { //---------------------------------------------------- $code=FormatString($code); $num_compte=FormatString($num_compte); - if ( CountSql($p_cn,utf8_encode("select * from import_tmp where code='$code' and num_compte='$num_compte' limit 2")) != 0 ) + if ( $p_cn->count_sql(utf8_encode("select * from import_tmp where code='$code' and num_compte='$num_compte' limit 2")) != 0 ) { /* Skip it it already encoded */ echo "Doublon éliminé ".$detail; @@ -104,7 +105,7 @@ echo "<br>"; 'n')"; try { - ExecSql($p_cn,$Sql,'latin1'); + $p_cn->exec_sql($Sql); } @@ -121,5 +122,5 @@ echo "<br>"; } // file is read fclose($handle); -commit($p_cn); +$p_cn->commit(); ?> diff --git a/include/balance.inc.php b/include/balance.inc.php index 94ff786e6..fb70b6b91 100644 --- a/include/balance.inc.php +++ b/include/balance.inc.php @@ -1,4 +1,3 @@ - <?php /* * This file is part of PHPCOMPTA. @@ -27,36 +26,52 @@ */ include_once ("ac_common.php"); -include_once("preference.php"); -include_once ("class_widget.php"); include_once("class_acc_balance.php"); +require_once("class_iselect.php"); +require_once("class_ispan.php"); +require_once("class_icheckbox.php"); +require_once("class_ihidden.php"); require_once('class_acc_ledger.php'); +require_once('class_periode.php'); $User->can_request(IMPBAL); - +echo JS_LEDGER; +echo JS_PROTOTYPE; +require_once('class_ipopup.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo js_include('card.js'); +echo js_include('acc_ledger.js'); +echo IPoste::ipopup('ipop_account'); echo '<div class="content">'; // Show the form for period echo '<FORM action="?p_action=impress&type=bal" method="post">'; echo dossier::hidden(); -$w=new widget("select"); -$w->table=1; // filter on the current year -$filter_year=" where p_exercice='".$User->get_exercice()."'"; +$from=(isset($_POST["from_periode"]))?$_POST['from_periode']:""; +$input_from=new IPeriod("from_periode",$from); +$input_from->show_end_date=false; +$input_from->type=ALL; +$input_from->cn=$cn; +$input_from->filter_year; +$input_from->user=$User; +echo 'Depuis :'.$input_from->input(); +// filter on the current year +$to=(isset($_POST["to_periode"]))?$_POST['to_periode']:""; +$input_to=new IPeriod("to_periode",$to); +$input_to->show_start_date=false; +$input_to->filter_year; +$input_to->type=ALL; +$input_to->cn=$cn; +$input_to->user=$User; +echo ' jusque :'.$input_to->input(); -$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); -$w->label="Depuis"; -if ( isset ($_POST['from_periode']) ) - $w->selected=$_POST['from_periode']; - -echo $w->IOValue('from_periode',$periode_start); -$w->label=" jusqu'à "; -$periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); -if ( isset ($_POST['to_periode']) ) - $w->selected=$_POST['to_periode']; - -echo $w->IOValue('to_periode',$periode_end); //------------------------------------------------- $l=new Acc_Ledger($cn,0); $journal=$l->select_ledger('ALL',3); @@ -73,33 +88,37 @@ $journal->name="p_jrn"; if ( isset($_POST['p_jrn'])) $journal->selected=$_POST['p_jrn']; else $journal->selected=-1; -echo JS_SEARCH_POSTE; -echo "Journal = ".$journal->IOValue(); -$from_poste=new widget("js_search_poste"); +echo HtmlInput::phpsessid(); +echo "Journal = ".$journal->input(); +$from_poste=new IPoste(); $from_poste->name="from_poste"; -$from_poste->extra2=null; -$from_poste->value=(isset($_POST['from_poste']))?$_POST['from_poste']:""; -$from_span=new widget("span","from_poste_label","from_poste_label"); +$from_poste->set_attribute('ipopup','ipop_account'); +$from_poste->set_attribute('label','from_poste_label'); +$from_poste->set_attribute('account','from_poste'); -$to_poste=new widget("js_search_poste"); +$from_poste->value=(isset($_POST['from_poste']))?$_POST['from_poste']:""; +$from_span=new ISpan("from_poste_label",""); + +$to_poste=new IPoste(); $to_poste->name="to_poste"; -$to_poste->extra2=null; +$to_poste->set_attribute('ipopup','ipop_account'); +$to_poste->set_attribute('label','to_poste_label'); +$to_poste->set_attribute('account','to_poste'); + $to_poste->value=(isset($_POST['to_poste']))?$_POST['to_poste']:""; -$to_span=new widget("span","to_poste_label","to_poste_label"); -$c=new widget("checkbox"); +$to_span=new ISpan("to_poste_label",""); +$c=new ICheckBox(); $c->label="centralisé"; -echo $c->IOValue('central'); +echo $c->input('central'); echo "<div>"; -echo "Plage de postes :".$from_poste->IOValue(); -echo $from_span->IOValue(); -echo " jusque :".$to_poste->IOValue(); -echo $to_span->IOValue(); +echo "Plage de postes :".$from_poste->input(); +echo $from_span->input(); +echo " jusque :".$to_poste->input(); +echo $to_span->input(); echo "</div>"; -//$a=FormPeriodeMult($cn); -//echo $a; -echo '<input type="submit" name="view" value="Visualisation">'; +echo HtmlInput::submit("view","Visualisation"); echo '</form>'; echo '<hr>'; //----------------------------------------------------- @@ -107,30 +126,30 @@ echo '<hr>'; //----------------------------------------------------- // Show the export button if ( isset ($_POST['view'] ) ) { - $submit=new widget(); - $hid=new widget("hidden"); + + $hid=new IHidden(); echo "<table>"; echo '<TR>'; echo '<TD><form method="POST" ACTION="print_balance.php">'. dossier::hidden(). - widget::submit('bt_pdf',"Export PDF"). - $hid->IOValue("p_action","impress"). - $hid->IOValue("from_periode",$_POST['from_periode']). - $hid->IOValue("to_periode",$_POST['to_periode']). - $hid->IOValue("p_jrn",$_POST['p_jrn']). - $hid->IOValue("from_poste",$_POST['from_poste']). - $hid->IOValue("to_poste",$_POST['to_poste']); + HtmlInput::submit('bt_pdf',"Export PDF"). + $hid->input("p_action","impress"). + $hid->input("from_periode",$_POST['from_periode']). + $hid->input("to_periode",$_POST['to_periode']). + $hid->input("p_jrn",$_POST['p_jrn']). + $hid->input("from_poste",$_POST['from_poste']). + $hid->input("to_poste",$_POST['to_poste']); echo "</form></TD>"; echo '<TD><form method="POST" ACTION="bal_csv.php">'. - widget::submit('bt_csv',"Export CSV"). + HtmlInput::submit('bt_csv',"Export CSV"). dossier::hidden(). - $hid->IOValue("p_action","impress"). - $hid->IOValue("from_periode",$_POST['from_periode']). - $hid->IOValue("to_periode",$_POST['to_periode']). - $hid->IOValue("p_jrn",$_POST['p_jrn']). - $hid->IOValue("from_poste",$_POST['from_poste']). - $hid->IOValue("to_poste",$_POST['to_poste']); + $hid->input("p_action","impress"). + $hid->input("from_periode",$_POST['from_periode']). + $hid->input("to_periode",$_POST['to_periode']). + $hid->input("p_jrn",$_POST['p_jrn']). + $hid->input("from_poste",$_POST['from_poste']). + $hid->input("to_poste",$_POST['to_poste']); echo "</form></TD>"; @@ -160,8 +179,9 @@ if ( isset($_POST['view'] ) ) { $row=$bal->get_row($_POST['from_periode'], $_POST['to_periode']); - $a=get_periode($cn,$_POST['from_periode']); - $b=get_periode($cn,$_POST['to_periode']); + $periode=new Periode($cn); + $a=$periode->get_date_limit($_POST['from_periode']); + $b=$periode->get_date_limit($_POST['to_periode']); echo "<h2 class=\"info\"> période du ".$a['p_start']." au ".$b['p_end']."</h2>"; echo '<table width="100%">'; @@ -181,12 +201,12 @@ if ( isset($_POST['view'] ) ) { $tr="odd"; echo '<TR class="'.$tr.'">'; - echo '<TD>'.$r['poste'].'</TD>'; - echo '<TD>'.$r['label'].'</TD>'; - echo '<TD>'.$r['sum_deb'].'</TD>'; - echo '<TD>'.$r['sum_cred'].'</TD>'; - echo '<TD>'.$r['solde_deb'].'</TD>'; - echo '<TD>'.$r['solde_cred'].'</TD>'; + echo td($r['poste']); + echo td(h($r['label'])); + echo td($r['sum_deb']); + echo td($r['sum_cred']); + echo td($r['solde_deb']); + echo td($r['solde_cred']); echo '</TR>'; } echo '</table>'; diff --git a/include/bud_card.inc.php b/include/bud_card.inc.php index 5ecb470da..cf7326b70 100644 --- a/include/bud_card.inc.php +++ b/include/bud_card.inc.php @@ -23,19 +23,19 @@ /*! \file * \brief Manage the card for the budget module */ +require_once("class_iselect.php"); require_once ('class_bud_card.php'); -require_once ('class_widget.php'); echo '<form method="get">'; -$wHypo=new widget("select","","bh_id"); -$wHypo->value=make_array($cn,"select bh_id,html_quote(bh_name) from bud_hypothese"); +$wHypo=new ISelect("","bh_id"); +$wHypo->value=$cn->make_array("select bh_id,html_quote(bh_name) from bud_hypothese"); $wHypo->selected=(isset($_REQUEST['bh_id']))?$_REQUEST['bh_id']:""; $wHypo->javascript='onChange="this.form.submit();"'; -echo "Hypothèse ".$wHypo->IOValue(); -echo widget::submit('recherche','recherche'); +echo "Hypothèse ".$wHypo->input(); +echo HtmlInput::submit('recherche','recherche'); echo dossier::hidden(); -echo widget::hidden("p_action","fiche"); +echo HtmlInput::hidden("p_action","fiche"); echo '</form>'; echo '<hr>'; if ( ! isset($_REQUEST['bh_id'])) { @@ -81,7 +81,7 @@ if (! empty ($list)) { } echo ShowItem($row,'V','mtitle','mtitle',$bc_id); } -echo widget::button_href('Ajout','?'.$str_dossier.'&sa=add&p_action=fiche&bh_id='.$_REQUEST['bh_id']); +echo HtmlInput::button_href('Ajout','?'.$str_dossier.'&sa=add&p_action=fiche&bh_id='.$_REQUEST['bh_id']); echo '</div>'; @@ -96,8 +96,8 @@ if ( $sa == "add" ) { $obj->bh_id=$_REQUEST['bh_id']; echo '<form method="post">'; echo $obj->form(); - echo widget::submit('add','Ajout'); - echo widget::hidden("p_action","fiche"); + echo HtmlInput::submit('add','Ajout'); + echo HtmlInput::hidden("p_action","fiche"); echo dossier::hidden(); echo '</form>'; echo '</div>'; @@ -115,8 +115,8 @@ if ( $sa == "detail" ) { echo dossier::hidden(); echo $obj->form(); - echo widget::submit('remove','Effacer','onClick="return confirm(\'Vous confirmez cet effacement ?\')"'); - echo widget::submit('update','Mise à jour'); + echo HtmlInput::submit('remove','Effacer','onClick="return confirm(\'Vous confirmez cet effacement ?\')"'); + echo HtmlInput::submit('update','Mise à jour'); echo '</div>'; } diff --git a/include/bud_detail.inc.php b/include/bud_detail.inc.php index a4b063777..b085a4cb1 100644 --- a/include/bud_detail.inc.php +++ b/include/bud_detail.inc.php @@ -26,7 +26,8 @@ /*! * \brief Manage the detail for each hypo by analytic account */ -require_once ('class_widget.php'); +require_once("class_iselect.php"); +require_once("class_itext.php"); require_once ('class_bud_hypo.php'); require_once ('class_anc_account.php'); @@ -36,23 +37,23 @@ echo '<div class="content">'; /* 1st possibility is not defined */ if ( ! isset ($_REQUEST['bh_id'])) { - $wHypo=new widget("select","","bh_id"); - $wHypo->value=make_array($cn,"select bh_id,bh_name from bud_hypothese",0); + $wHypo=new ISelect("","bh_id"); + $wHypo->value=$cn->make_array("select bh_id,bh_name from bud_hypothese",0); $wHypo->selected=(isset($_REQUEST['bh_id']))?$_REQUEST['bh_id']:""; $wHypo->javascript='onChange="this.form.submit();"'; echo '<form method="get">'; echo dossier::hidden(); - echo "Hypothèse ".$wHypo->IOValue(); - echo widget::submit('recherche','recherche'); - echo widget::hidden('p_action','detail'); + echo "Hypothèse ".$wHypo->input(); + echo HtmlInput::submit('recherche','recherche'); + echo HtmlInput::hidden('p_action','detail'); echo '</form>'; echo '<hr>'; exit; } -$button_other=widget::button_href('Autre detail','?gDossier='.dossier::id(). +$button_other=HtmlInput::button_href('Autre detail','?gDossier='.dossier::id(). '&p_action=detail'); /* 2nd Step BH_ID is defined @@ -60,8 +61,8 @@ $button_other=widget::button_href('Autre detail','?gDossier='.dossier::id(). * plan, a analytic account must be choosen otherwise go directly to * the detail */ -$wPost_Analytic=new widget("select","","po_id"); -$wPost_Analytic->value=make_array($cn,"select po_id,po_name from poste_analytique join ". +$wPost_Analytic=new ISelect("","po_id"); +$wPost_Analytic->value=$cn->make_array("select po_id,po_name from poste_analytique join ". " bud_hypothese as a using (pa_id) ". " where a.bh_id=".$_REQUEST['bh_id']); @@ -75,17 +76,17 @@ $Hyp=new Bud_Hypo($cn,$_REQUEST['bh_id']); $Hyp->load(); if ( ! empty ($wPost_Analytic->value) && $po_id==-2 ) { - $wHypo=new widget("text","","bh_id",$Hyp->bh_name); + $wHypo=new IText("","bh_id",$Hyp->bh_name); $wHypo->readonly=true; $wPost_Analytic->javascript='onChange="this.form.submit();"'; echo '<form method="get">'; - echo "Hypothèse ".$wHypo->IOValue(); - echo widget::hidden('bh_id',$_REQUEST['bh_id']); - echo widget::hidden('p_action','detail'); + echo "Hypothèse ".$wHypo->input(); + echo HtmlInput::hidden('bh_id',$_REQUEST['bh_id']); + echo HtmlInput::hidden('p_action','detail'); echo dossier::hidden(); - echo "Poste Analytique ".$wPost_Analytic->IOValue(); - echo widget::submit('recherche','recherche'); + echo "Poste Analytique ".$wPost_Analytic->input(); + echo HtmlInput::submit('recherche','recherche'); echo '</form>'; echo $button_other; @@ -96,15 +97,15 @@ if ( ! empty ($wPost_Analytic->value) && $po_id==-2 ) { /* 3rd Step * po_id is set now we can add/update/delete details */ -$wHypo=new widget("text","","bh_id",$Hyp->bh_name); +$wHypo=new IText("","bh_id",$Hyp->bh_name); $wHypo->readonly=true; -echo "Hypothèse ".$wHypo->IOValue(); +echo "Hypothèse ".$wHypo->input(); if ( $po_id !== -1 ) { $oPo_id=new Anc_Account($cn,$po_id); $oPo_id->get_by_id(); - $wPo_id=new widget("text","","po_id",$oPo_id->name); + $wPo_id=new IText("","po_id",$oPo_id->name); $wPo_id->readonly=true; - echo "Poste Analytique ".$wPo_id->IOValue(); + echo "Poste Analytique ".$wPo_id->input(); } echo $button_other; @@ -112,7 +113,7 @@ if ( isset ($_GET['po_id'] ) ) $str_po_id="&po_id=".$_REQUEST['po_id']; else $str_po_id=""; -echo widget::button_href("Recharger","?".dossier::get()."&bh_id=".$_GET['bh_id']."&p_action=detail".$str_po_id); +echo HtmlInput::button_href("Recharger","?".dossier::get()."&bh_id=".$_GET['bh_id']."&p_action=detail".$str_po_id); echo '<hr>'; //---------------------------------------------------------------------- diff --git a/include/bud_hypo.inc.php b/include/bud_hypo.inc.php index 670c3e0fa..ef6b1d5d4 100644 --- a/include/bud_hypo.inc.php +++ b/include/bud_hypo.inc.php @@ -24,7 +24,6 @@ * \brief Manage the hypothese for the budget module */ require_once ('class_bud_hypo.php'); -require_once ('class_widget.php'); if ( isset($_POST['remove'])){ @@ -64,7 +63,7 @@ if (! empty ($list)) { } echo ShowItem($row,'V','mtitle','mtitle',$bh_id); } -echo widget::button_href('Ajout','?'.$str_dossier.'&sa=add&p_action=hypo'); +echo HtmlInput::button_href('Ajout','?'.$str_dossier.'&sa=add&p_action=hypo'); echo '</div>'; @@ -78,7 +77,7 @@ if ( $sa == "add" ) { $obj=new Bud_Hypo($cn); echo '<form method="post">'; echo $obj->form(); - echo widget::submit('add','Ajout'); + echo HtmlInput::submit('add','Ajout'); echo '</form>'; echo '</div>'; } @@ -93,8 +92,8 @@ if ( $sa == "detail" ) { echo '<div class="u_redcontent">'; echo '<form method="post">'; echo $obj->form(1); - echo widget::submit('remove','Effacer','onClick="return confirm(\'Vous confirmez cet effacement ?\')"'); - echo widget::submit('update','Mise à jour'); + echo HtmlInput::submit('remove','Effacer','onClick="return confirm(\'Vous confirmez cet effacement ?\')"'); + echo HtmlInput::submit('update','Mise à jour'); echo '</div>'; } diff --git a/include/bud_sacc.inc.php b/include/bud_sacc.inc.php index c8eea93d5..63de479c8 100644 --- a/include/bud_sacc.inc.php +++ b/include/bud_sacc.inc.php @@ -33,9 +33,9 @@ $obj->from_array($_GET); // if ( ! isset ($_GET['detail']) && ! isset ($_GET['display'])) { echo '<form METHOD="GET">'; echo $obj->select_hypo(); - echo widget::submit('detail','Accepter'); - echo widget::hidden('do','acc'); - echo widget::hidden('p_action','synthese'); + echo HtmlInput::submit('detail','Accepter'); + echo HtmlInput::hidden('do','acc'); + echo HtmlInput::hidden('p_action','synthese'); echo '</form>'; // } @@ -45,10 +45,10 @@ if ( isset( $_GET['bh_id'])) { $obj->bh_id=$_GET['bh_id']; echo $obj->form(); - echo widget::submit('display','Afficher'); - echo widget::hidden('do','acc'); - echo widget::hidden('p_action','synthese'); - echo widget::hidden('bh_id',$obj->bh_id); + echo HtmlInput::submit('display','Afficher'); + echo HtmlInput::hidden('do','acc'); + echo HtmlInput::hidden('p_action','synthese'); + echo HtmlInput::hidden('bh_id',$obj->bh_id); echo '</form>'; @@ -60,11 +60,11 @@ if ( isset($_GET['display'])) { echo $obj->display_html($res); echo '<form method="GET" action="bud_csv.php">'; echo $obj->hidden(); - echo widget::hidden('do','acc'); - echo widget::hidden('p_action','synthese'); - echo widget::hidden('bh_id',$obj->bh_id); + echo HtmlInput::hidden('do','acc'); + echo HtmlInput::hidden('p_action','synthese'); + echo HtmlInput::hidden('bh_id',$obj->bh_id); echo dossier::hidden(); - echo widget::submit('display','Export CSV'); + echo HtmlInput::submit('display','Export CSV'); echo '</form>'; } diff --git a/include/bud_sga.inc.php b/include/bud_sga.inc.php index be5e37585..4e0e63aad 100644 --- a/include/bud_sga.inc.php +++ b/include/bud_sga.inc.php @@ -35,9 +35,9 @@ $bh_id=(isset($_REQUEST['bh_id']))?$_REQUEST['bh_id']:''; echo '<form METHOD="GET">'; $obj->from_array($_GET); echo $obj->form(); -echo widget::submit('display','Afficher'); -echo widget::hidden('do','ga'); -echo widget::hidden('p_action','synthese'); +echo HtmlInput::submit('display','Afficher'); +echo HtmlInput::hidden('do','ga'); +echo HtmlInput::hidden('p_action','synthese'); echo '</form>'; if ( isset($_GET['display'])) { @@ -48,11 +48,11 @@ if ( isset($_GET['display'])) { echo $obj->summary_html($res); echo '<form method="GET" action="bud_csv.php">'; echo $obj->hidden(); - echo widget::hidden('do','ga'); - echo widget::hidden('p_action','synthese'); - echo widget::hidden('bh_id',$obj->bh_id); + echo HtmlInput::hidden('do','ga'); + echo HtmlInput::hidden('p_action','synthese'); + echo HtmlInput::hidden('bh_id',$obj->bh_id); echo dossier::hidden(); - echo widget::submit('display','Export CSV'); + echo HtmlInput::submit('display','Export CSV'); echo '</form>'; } diff --git a/include/bud_spo.inc.php b/include/bud_spo.inc.php index 0aa4d34f7..4caa09985 100644 --- a/include/bud_spo.inc.php +++ b/include/bud_spo.inc.php @@ -32,9 +32,9 @@ $bh_id=(isset($_REQUEST['bh_id']))?$_REQUEST['bh_id']:''; // if ( ! isset ($_GET['detail']) && ! isset ($_GET['display'])) { echo '<form METHOD="GET">'; echo $obj->select_hypo(); - echo widget::submit('detail','Accepter'); - echo widget::hidden('do','po'); - echo widget::hidden('p_action','synthese'); + echo HtmlInput::submit('detail','Accepter'); + echo HtmlInput::hidden('do','po'); + echo HtmlInput::hidden('p_action','synthese'); echo '</form>'; // } @@ -45,10 +45,10 @@ if ( isset( $_GET['bh_id'])) { $obj->bh_id=$_GET['bh_id']; echo $obj->form(); - echo widget::submit('display','Afficher'); - echo widget::hidden('do','po'); - echo widget::hidden('p_action','synthese'); - echo widget::hidden('bh_id',$obj->bh_id); + echo HtmlInput::submit('display','Afficher'); + echo HtmlInput::hidden('do','po'); + echo HtmlInput::hidden('p_action','synthese'); + echo HtmlInput::hidden('bh_id',$obj->bh_id); echo '</form>'; @@ -60,11 +60,11 @@ if ( isset($_GET['display'])) { echo $obj->display_html($res); echo '<form method="GET" action="bud_csv.php">'; echo $obj->hidden(); - echo widget::hidden('do','po'); - echo widget::hidden('p_action','synthese'); - echo widget::hidden('bh_id',$obj->bh_id); + echo HtmlInput::hidden('do','po'); + echo HtmlInput::hidden('p_action','synthese'); + echo HtmlInput::hidden('bh_id',$obj->bh_id); echo dossier::hidden(); - echo widget::submit('display','Export CSV'); + echo HtmlInput::submit('display','Export CSV'); echo '</form>'; } diff --git a/include/bud_svglobal.inc.php b/include/bud_svglobal.inc.php index 3adbad742..13cc2c606 100644 --- a/include/bud_svglobal.inc.php +++ b/include/bud_svglobal.inc.php @@ -33,9 +33,9 @@ $obj->from_array($_GET); // if ( ! isset ($_GET['detail']) && ! isset ($_GET['display'])) { echo '<form METHOD="GET">'; echo $obj->select_hypo(); - echo widget::submit('detail','Accepter'); - echo widget::hidden('do','vglobal'); - echo widget::hidden('p_action','synthese'); + echo HtmlInput::submit('detail','Accepter'); + echo HtmlInput::hidden('do','vglobal'); + echo HtmlInput::hidden('p_action','synthese'); echo '</form>'; // } @@ -45,10 +45,10 @@ if ( isset( $_GET['bh_id'])) { $obj->bh_id=$_GET['bh_id']; echo $obj->form(); - echo widget::submit('display','Afficher'); - echo widget::hidden('do','vglobal'); - echo widget::hidden('p_action','synthese'); - echo widget::hidden('bh_id',$obj->bh_id); + echo HtmlInput::submit('display','Afficher'); + echo HtmlInput::hidden('do','vglobal'); + echo HtmlInput::hidden('p_action','synthese'); + echo HtmlInput::hidden('bh_id',$obj->bh_id); echo '</form>'; @@ -60,11 +60,11 @@ if ( isset($_GET['display'])) { echo $obj->display_html($res); echo '<form method="GET" action="bud_csv.php">'; echo $obj->hidden(); - echo widget::hidden('do','vglobal'); - echo widget::hidden('p_action','synthese'); - echo widget::hidden('bh_id',$obj->bh_id); + echo HtmlInput::hidden('do','vglobal'); + echo HtmlInput::hidden('p_action','synthese'); + echo HtmlInput::hidden('bh_id',$obj->bh_id); echo dossier::hidden(); - echo widget::submit('display','Export CSV'); + echo HtmlInput::submit('display','Export CSV'); echo '</form>'; } diff --git a/include/bud_synthese.inc.php b/include/bud_synthese.inc.php deleted file mode 100644 index 140c683d5..000000000 --- a/include/bud_synthese.inc.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - -/*!\file - * \brief Manage the hypothese for the budget module - */ -$do=(isset($_REQUEST['do']))?$_REQUEST['do']:'xx'; -$def=-1; -echo '<div class="u_subtmenu">'; -switch($do) { - case 'po': - $def=1; - break; - case 'ga': - $def=2; - break; - case 'vglobal': - $def=3; - break; - case 'acc': - $def=4; - break; - - - } - -echo ShowItem(array( - array('?p_action=synthese&do=po&'.$str_dossier,'Détail Poste Analytique',"Donne le detail par poste analytique ",1), - array('?p_action=synthese&do=ga&'.$str_dossier,' Groupes & Totaux ',"Totaux dans une hypothese par groupe analytique s'il y en a ",2), - array('?p_action=synthese&do=vglobal&'.$str_dossier,'Vue Globale',"Detail d'une hypothese",3), - array('?p_action=synthese&do=acc&'.$str_dossier,'Detail CE',"Donne le détail par poste comptable",4) - ), - 'H',"mtitle","mtitle",$def,' width="100%"'); - - - // -echo '</div>'; - -if ( $do=='po') { - if ($obj->size_analytic() == 0 ) { - echo '<h2 class="info">Desole pas d\'hypothese definie avec un plan analytique</h2>'; - exit(); - - } - require_once ('bud_spo.inc.php'); -} - -if ( $do=='ga') { - /* if ($obj->size_analytic() == 0 ) { - echo '<h2 class="info">Desole pas d\'hypothese definie avec un plan analytique</h2>'; - exit(); - - }*/ - - require_once ('bud_sga.inc.php'); -} -if ( $do=='vglobal') - require_once ('bud_svglobal.inc.php'); - -if ( $do == 'acc') - require_once ('bud_sacc.inc.php'); diff --git a/include/cbc_be.inc.php b/include/cbc_be.inc.php index e7160b862..8594e1b3c 100644 --- a/include/cbc_be.inc.php +++ b/include/cbc_be.inc.php @@ -26,7 +26,8 @@ // Bank CBC //----------------------------------------------------- $row=1; -StartSql($p_cn); +$p_cn->start(); +$p_cn->set_encoding('latin1'); while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { $num = count($data); echo_debug('cbc_be',__LINE__,$num); @@ -82,12 +83,12 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { 'n')"; try { - ExecSql($p_cn,$Sql,'latin1') ; + $p_cn->exec_sql($Sql) ; } catch(Exception $e) { echo_debug(__FILE__.":".__LINE__." Erreur : ".$e->getCode." msg ".$e->getMessage); - Rollback($p_cn); + $p_cn->rollback(); break; } } // for ($c=0;$c<$num;$c++) diff --git a/include/central.inc.php b/include/central.inc.php index 7f4ac9ff8..93fce402b 100644 --- a/include/central.inc.php +++ b/include/central.inc.php @@ -23,23 +23,21 @@ * \brief concerns the centralisation of the operations */ include_once ("ac_common.php"); -require_once ('class_widget.php'); +require_once('class_iperiod.php'); + html_page_start($_SESSION['g_theme']); require_once('class_dossier.php'); $gDossier=dossier::id(); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$rep=DbConnect(dossier::id()); +$rep=new Database(dossier::id()); include_once ("class_user.php"); $User=new User($rep); $User->Check(); -require_once ("check_priv.php"); -include_once("preference.php"); - -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include_once("central_inc.php"); @@ -62,14 +60,28 @@ if ( $_POST["periode"] != "" ) { } } }// if ( isset ($_POST["central"] )) - -$ret=FormPeriode($cn,0,NOTCENTRALIZED); +$period=new IPeriod("period"); +$period->user=$User; +$period->cn=$cn; +$period->value=0; +$period->type=NOTCENTRALIZED; +try { +$ret=$period->input(); +} catch (Exception $e) { + if ( $e->getCode() != 0 ) { + echo $e->getMessage(); + exit; + } else { + echo $e->getTrace(); + exit; + } +} if ( $ret != null) { echo '<FORM METHOD="POST">'; - echo widget::hidden('p_action','central'); + echo HtmlInput::hidden('p_action','central'); echo dossier::hidden(); echo $ret; - echo '<INPUT TYPE="SUBMIT" name="central" VALUE="Centralise">'; + echo HtmlInput::submit('central','Centralise'); echo '</FORM>'; } else { echo '<H2 class="info"> Aucune période à centraliser</H2>'; diff --git a/include/central_inc.php b/include/central_inc.php index e1e084beb..919bf30ff 100644 --- a/include/central_inc.php +++ b/include/central_inc.php @@ -63,18 +63,18 @@ $sql="insert into centralized( c_j_id, order by j_date,j_grpt,j_debit desc "; try { - $Res=StartSql($p_cn); - $Res=ExecSql($p_cn,$sql); - $Res=ExecSql($p_cn,"update jrnx set j_centralized='t' where j_tech_per=".$p_periode); + $Res=$p_cn->start(); + $Res=$p_cn->exec_sql($sql); + $Res=$p_cn->exec_sql("update jrnx set j_centralized='t' where j_tech_per=".$p_periode); // Set correctly the number of operation id (jr_opid) for each journal // get the existing jrn_def_id //-- - $Res = ExecSql($p_cn,"select jrn_def_id from jrn_def"); - $MaxJrn=pg_NumRows($Res); + $Res = $p_cn->exec_sql("select jrn_def_id from jrn_def"); + $MaxJrn=Database::num_row($Res); // for each jrn_def_id for ( $i=0; $i < $MaxJrn;$i++) { - $row=pg_fetch_array($Res,$i); + $row=Database::fetch_array($Res,$i); // get the op related to that jrn_def_id $sql=sprintf("select jr_id from jrn where @@ -85,24 +85,24 @@ $sql="insert into centralized( c_j_id, $row['jrn_def_id'] ); - $Res2=ExecSql($p_cn,$sql); - $MaxLine=pg_NumRows($Res2); + $Res2=$p_cn->exec_sql($sql); + $MaxLine=Database::num_row($Res2); $jrn_def_id=$row['jrn_def_id']; /* if seq doesn't exist create it */ - if ( exist_sequence($p_cn,'s_jrn_'.$jrn_def_id) == false ) { - create_sequence($p_cn,'s_jrn_'.$jrn_def_id); + if ( $p_cn->exist_sequence('s_jrn_'.$jrn_def_id) == false ) { + $p_cn->create_sequence('s_jrn_'.$jrn_def_id); } for ($e=0;$e < $MaxLine;$e++) { // each line is updated with a sequence - $line=pg_fetch_array($Res2,$e); + $line=Database::fetch_array($Res2,$e); $jr_id=$line['jr_id']; $sql=sprintf ("update jrn set jr_opid = (select nextval('s_jrn_%d')) where jr_id =%d", $jrn_def_id, $jr_id); - $Ret=ExecSql($p_cn,$sql); + $Ret=$p_cn->exec_sql($sql); } } @@ -116,31 +116,31 @@ $sql="insert into centralized( c_j_id, $p_periode ); - $Res2=ExecSql($p_cn,$sql); - $MaxLine=pg_NumRows($Res2); + $Res2=$p_cn->exec_sql($sql); + $MaxLine=Database::num_row($Res2); for ($e=0;$e < $MaxLine;$e++) { // each line is updated with a sequence - $line=pg_fetch_array($Res2,$e); + $line=Database::fetch_array($Res2,$e); $jr_id=$line['jr_id']; $sql=sprintf ("update jrn set jr_c_opid = (select nextval('s_central')) where jr_id =%d", $jr_id); - $Ret=ExecSql($p_cn,$sql); + $Ret=$p_cn->exec_sql($sql); } // Set the order of the jrn - $Res=ExecSql($p_cn,"select c_id from centralized + $Res=$p_cn->exec_sql("select c_id from centralized inner join jrn on c_grp = jr_grpt_id order by jr_c_opid, c_debit desc"); - for ( $e=0;$e < pg_NumRows($Res);$e++) { - $row=pg_fetch_array($Res,$e); + for ( $e=0;$e < Database::num_row($Res);$e++) { + $row=Database::fetch_array($Res,$e); $sql=sprintf ("update centralized set c_order = (select nextval('s_central_order')) where c_id = %d",$row['c_id']); - $Res2=ExecSql($p_cn,$sql); + $Res2=$p_cn->exec_sql($sql); } - ExecSql($p_cn,"update parm_periode set p_central=true where p_id=$p_periode"); + $p_cn->exec_sql("update parm_periode set p_central=true where p_id=$p_periode"); } catch(Exception $e) { @@ -152,20 +152,8 @@ $sql="insert into centralized( c_j_id, - Commit($p_cn); - EndSql($p_cn); + $p_cn->commit(); return NOERROR; } -/*! - ************************************************** - * \brief test if e jrn_jr.id is centralize or not - * \param $p_cn database connx - * \param $p_jrn_id jrn.jr_id - * \return: 0 if not centralized otherwise > 0 - */ -function isCentralize($p_cn,$p_jrn_id) { - $Res=ExecSql($p_cn,"select c_id from centralized where c_j_id=$p_jrn_id"); - return pg_NumRows($Res); -} ?> diff --git a/include/check_priv.php b/include/check_priv.php deleted file mode 100644 index 8abb2c7d2..000000000 --- a/include/check_priv.php +++ /dev/null @@ -1,207 +0,0 @@ -<?php - -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/* $Revision$ */ -/*! \file - * \brief Tools for checking the security - * \todo some of those tools are redundant with the class user and should be cleaned - */ - -include_once("postgres.php"); -/*! - * \brief Vérifie les acces d'un utilisateur - * sur un journal - * - * \param $p_dossier le dossier - * \param $p_user le login user - * \param $p_jrn le journal - - * \return - * - 0 pas d'acces - * - 1 Lecture - * - 2 écriture - * - */ - -function CheckJrn($p_dossier,$p_user,$p_jrn,$p_detail=False) -{ - if ( CheckIsAdmin( $p_user) == 1 ) return 2; - $cn=DbConnect($p_dossier); - // Special - // p_jrn = 0 ==> grand livre access if there is no uj_prix=X - // or detail - if ( $p_jrn == 0 ) { - if ( $p_detail == false) { - // $n_jrn=CountSql($cn,"select jrn_def_id from jrn_def"); - $n_for=CountSql($cn,"select jrn_def_id,uj_priv - from jrn_def left join user_sec_jrn on uj_jrn_id=jrn_def_id - where uj_login='$p_user' and uj_priv='X'"); - if ( $n_for == 0 ) - return 2; - else - return 0; - } else { - // For a detail, at least one jrn must be accessible - $n_for=CountSql($cn, " select jrn_def_id,uj_priv - from jrn_def left join user_sec_jrn on uj_jrn_id=jrn_def_id - where uj_login='$p_user' and uj_priv !='X'"); - if ( $n_for == 0 ) - return 0; - else - return 2; - } - - - } - - // droit spécifique - $Res2=ExecSql($cn,"select jrn_def_id,uj_priv - from jrn_def left join user_sec_jrn on uj_jrn_id=jrn_def_id - where uj_login='$p_user' and jrn_def_id=$p_jrn"); - - $PrivJrn=pg_NumRows($Res2); - $cn=DbConnect(); - // droit par défaut - $Res=ExecSql($cn," select * - from ac_users left join jnt_use_dos using (use_id) - left join priv_user on (priv_jnt=jnt_id) - where use_login='$p_user' and - dos_id=$p_dossier"); - - $DefRight=pg_NumRows($Res); - echo_debug ("PrivJrn = $PrivJrn DefRight $DefRight"); - // Si les droits par défaut == 0, alors user n'a pas accès au dossier - if ( $DefRight == 0 ) return 0; - $Def=pg_fetch_array($Res,0); - - // Si les droits par défaut == NO, alors user n'a pas accès au dossier - if ( $Def['priv_priv'] == "NO" || $Def['priv_priv']=='X') return 0; - - if ( $Def['priv_priv'] == "L") { - return 2; - } - if ( $Def['priv_priv'] == "R") { - // Si droit pas défaut == Lire - if ( $PrivJrn == 0 ) { - // Pas de droit spécifique sur jrn => droit par défaut = Lire - return 1; - } - $Priv=pg_fetch_array($Res2,0); - - if ( $Priv['uj_priv'] == "X" ) return 0; - if ( $Priv['uj_priv'] == "R" ) return 1; - if ( $Priv['uj_priv'] == "W" ) return 2; - echo_debug ("Droit Journal $Priv[uj_priv]"); - echo '<H2 class="error"> Undefined right '.$Priv['uj_priv'].' </H2>'; - - return 0; - } - - - echo '<H2 class="error"> Undefined default right default</H2>'; - return 0; - -} -/*! - * \brief Check if an user is allowed to do an action, - * this function is only used by the user_sec.php, - * otherwise you have to use User->check_action - * or $User->can_request - * - * \param p_dossier dossier id - * \param p_login user's login - * \param p_action_id - * - * \return - * - 0 no priv - * - 1 priv granted - * - */ -function check_action ( $p_dossier,$p_login,$p_action_id) -{ - if ( CheckIsAdmin ($p_login) ) return 1; - // if( is_local_admin($p_login,$p_dossier)) return 1; - - - $cn=DbConnect($p_dossier); - - /* check if user is a local admin */ - $a="select * from user_sec_act where ua_login='$p_login' and ua_act_id=$p_action_id"; - $Res=ExecSql($cn,$a); - $Count=pg_NumRows($Res); - if ( $Count == 0 ) return 0; - if ( $Count == 1 ) return 1; - 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>"; -} - -/*! - * \brief Check if an user is an administrator - * - * - * \param $p_user user login - * - * \return - * - 0 if no - * - 1 if yes - * - */ -function CheckIsAdmin($p_user) -{ - if ( $p_user == 'phpcompta') return 1; - $sql="select use_id from ac_users where use_login='$p_user' - and use_active=1 and use_admin=1 "; - $cn=DbConnect(); - - $isAdmin=CountSql($cn,$sql); - - - return $isAdmin; - -} -/*! - ************************************************** - * \brief Check if an user has acces to a folder - * - * - * \param p_user - * \param p_dossier concerned folder - * - * \return - * 1 if yes - * 0 if no - */ -function CheckDossier($p_user,$p_dossier) -{ - if ( CheckIsAdmin ($p_user) ) return 1; - $cn=DbConnect(); - $sql="select dos_id from ac_users - natural join jnt_use_dos - natural join ac_dossier - join priv_user on ( priv_jnt=jnt_id) - where use_active=1 - and use_login='$p_user' - and dos_id='$p_dossier' - and priv_priv != 'NO'"; - return CountSql($cn,$sql); - -} - -?> diff --git a/include/class_acc_account.php b/include/class_acc_account.php index cb61e1db6..3c959e66d 100644 --- a/include/class_acc_account.php +++ b/include/class_acc_account.php @@ -24,10 +24,9 @@ /*! * \brief Manage the account from the table tmp_pcmn */ -require_once ('postgres.php'); +require_once("class_iselect.php"); +require_once ('class_database.php'); require_once ('class_dossier.php'); -require_once ('class_widget.php'); -require_once('class_acexception.php'); class Acc_Account { var $db; /*!< $db database connection */ @@ -79,16 +78,16 @@ class Acc_Account { * \return string with the pcm_lib */ function get_lib() { - $ret=ExecSqlParam($this->db, + $ret=$this->db->exec_sql( "select pcm_lib from tmp_pcmn where - pcm_val=$1",array($this->pcm_value)); - if ( pg_NumRows($ret) != 0) { - $r=pg_fetch_array($ret); - $this->name=$r['pcm_lib']; + pcm_val=$1",array($this->pcm_val)); + if ( Database::num_row($ret) != 0) { + $r=Database::fetch_array($ret); + $this->pcm_lib=$r['pcm_lib']; } else { - $this->name="Poste inconnu"; + $this->pcm_lib="Poste inconnu"; } - return $this->name; + return $this->pcm_lib; } /*!\brief Check that the value are valid *\return true if all value are valid otherwise false @@ -104,12 +103,12 @@ class Acc_Account { // otherwise we check only the value if ( strcmp ($p_member,'pcm_val') == 0 ) { if (is_numeric($p_value) ==0 ) - throw new AcException('Poste comptable incorrect '.$p_value); + throw new Exception('Poste comptable incorrect '.$p_value); else return true; } else if ( strcmp ($p_member,'pcm_val_parent') == 0 ) { if ( is_numeric($p_value) == 0 || ($this->count($p_value) == 0 && $p_value !=0)) - throw new AcException('Poste comptable parent incorrect '.$p_value); + throw new Exception('Poste comptable parent incorrect '.$p_value); else return true; } else if ( strcmp ($p_member,'pcm_lib') == 0 ) { @@ -119,9 +118,9 @@ class Acc_Account { if ( strcmp ($k['value'],$p_value) == 0 ) return true; } - throw new AcException('type de compte incorrect '.$p_value); + throw new Exception('type de compte incorrect '.$p_value); } - throw new AcException ('Donnee member inconnue '.$p_member); + throw new Exception ('Donnee member inconnue '.$p_member); } } @@ -131,9 +130,9 @@ class Acc_Account { */ function load() { - $ret=ExecSql($this->db,"select pcm_lib,pcm_val_parent,pcm_type from + $ret=$this->db->exec_sql("select pcm_lib,pcm_val_parent,pcm_type from tmp_pcmn where pcm_val=".$this->pcm_val); - $r=pg_fetch_all($ret); + $r=Database::fetch_all($ret); if ( ! $r ) return false; $this->pcm_lib=$r[0]['pcm_lib']; @@ -143,7 +142,7 @@ class Acc_Account { } function form($p_table=true){ - $wType=new widget("select"); + $wType=new ISelect(); $wType->name='p_type'; $wType->value=self::$type; @@ -160,7 +159,7 @@ class Acc_Account { </TD> <TD>'; - $ret.=$wType->IOValue().'</TD>'; + $ret.=$wType->input().'</TD>'; return $ret; } else { @@ -173,7 +172,7 @@ class Acc_Account { $ret.='</tr><tr>'; $wType->selected=$this->pcm_type; $ret.="<td> Type de poste </td>"; - $ret.= '<td>'.$wType->IOValue().'</td>'; + $ret.= '<td>'.$wType->input().'</td>'; $ret.="</TR> </TABLE>"; $ret.=dossier::hidden(); @@ -182,18 +181,18 @@ class Acc_Account { } function count($p_value) { $sql="select count(*) from tmp_pcmn where pcm_val=$1"; - return getDbValue($this->db,$sql,array($p_value)); + return $this->db->get_value($sql,array($p_value)); } /*!\brief for developper only during test */ static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); } function update($p_old) { $this->pcm_lib=substr($this->pcm_lib,0,150); $this->check(); $sql="update tmp_pcmn set pcm_val=$1, pcm_lib=$2,pcm_val_parent=$3,pcm_type=$4 where pcm_val=$5"; - $Ret=ExecSqlParam($this->db,$sql,array($this->pcm_val, + $Ret=$this->db->exec_sql($sql,array($this->pcm_val, $this->pcm_lib, $this->pcm_val_parent, $this->pcm_type, diff --git a/include/class_acc_account_ledger.php b/include/class_acc_account_ledger.php index 7dc151fc2..08568405b 100644 --- a/include/class_acc_account_ledger.php +++ b/include/class_acc_account_ledger.php @@ -1,4 +1,4 @@ -<?php +<?php /* * This file is part of PhpCompta. * @@ -19,12 +19,13 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /*! \file - * \brief Manage the account + * \brief Manage the account */ /*! * \brief Manage the account from the table jrn, jrnx or tmp_pcmn */ -require_once ('postgres.php'); +require_once("class_ihidden.php"); +require_once ('class_database.php'); require_once ('class_dossier.php'); class Acc_Account_Ledger { @@ -39,37 +40,19 @@ class Acc_Account_Ledger { $this->db=$p_cn; $this->id=$p_id; } - - /*! - * \brief Get data for poste - * - * \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 get_row($p_from,$p_to) - { - $periode=sql_filter_per($this->db,$p_from,$p_to,'p_id','jr_tech_per'); - - - $Res=ExecSql($this->db,"select distinct jr_id,j_date,to_char(j_date,'DD.MM.YYYY') as j_date,". - "case when j_debit='t' then j_montant else 0 end as deb_montant,". - "case when j_debit='f' then j_montant else 0 end as cred_montant,". - " jr_comment as description,jrn_def_name as jrn_name,". - "j_debit, jr_internal,jr_pj_number ". - " from jrnx left join jrn_def on jrn_def_id=j_jrn_def ". - " left join jrn on jr_grpt_id=j_grpt". - " where j_poste=".$this->id." and ".$periode. - " order by j_date::date"); + /** + *@brief get the row thanks the resource + *@return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal) + * (tot_deb,tot_credit) + */ + private function get_row_sql($Res) { $array=array(); $tot_cred=0.0; $tot_deb=0.0; - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); if ( $Max == 0 ) return null; for ($i=0;$i<$Max;$i++) { - $array[]=pg_fetch_array($Res,$i); + $array[]=Database::fetch_array($Res,$i); if ($array[$i]['j_debit']=='t') { $tot_deb+=$array[$i]['deb_montant'] ; } else { @@ -80,17 +63,68 @@ class Acc_Account_Ledger { $this->tot_deb=$tot_deb; $this->tot_cred=$tot_cred; return array($array,$tot_deb,$tot_cred); -} + + } + /*! + * \brief Get data for accounting entry between 2 periode + * + * \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 get_row($p_from,$p_to) + { + $periode=sql_filter_per($this->db,$p_from,$p_to,'p_id','jr_tech_per'); + + $Res=$this->db->exec_sql("select distinct jr_id,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_date,". + "case when j_debit='t' then j_montant else 0 end as deb_montant,". + "case when j_debit='f' then j_montant else 0 end as cred_montant,". + " jr_comment as description,jrn_def_name as jrn_name,". + "j_debit, jr_internal,jr_pj_number ". + " from jrnx left join jrn_def on jrn_def_id=j_jrn_def ". + " left join jrn on jr_grpt_id=j_grpt". + " where j_poste=".$this->id." and ".$periode. + " order by j_date"); + return $this->get_row_sql($Res); + } + /*! + * \brief Get data for accounting entry between 2 date + * + * \param $p_from date from + * \param $p_to end date + * \return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal) + * (tot_deb,tot_credit + * + */ + function get_row_date($p_from,$p_to) + { + $Res=$this->db->exec_sql("select distinct jr_id,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_date,". + "case when j_debit='t' then j_montant else 0 end as deb_montant,". + "case when j_debit='f' then j_montant else 0 end as cred_montant,". + " jr_comment as description,jrn_def_name as jrn_name,". + "j_debit, jr_internal,jr_pj_number ". + " from jrnx left join jrn_def on jrn_def_id=j_jrn_def ". + " left join jrn on jr_grpt_id=j_grpt". + " where j_poste=$1 and ". + " ( to_date($2,'DD.MM.YYYY') <= j_date and ". + " to_date($3,'DD.MM.YYYY') >= j_date )". + " order by j_date",array($this->id,$p_from,$p_to)); + return $this->get_row_sql($Res); + } + + /*!\brief Return the name of a account * it doesn't change any data member * \return string with the pcm_lib */ function get_name() { - $ret=ExecSqlParam($this->db, + $ret=$this->db->exec_sql( "select pcm_lib from tmp_pcmn where pcm_val=$1",array($this->id)); - if ( pg_NumRows($ret) != 0) { - $r=pg_fetch_array($ret); + if ( Database::num_row($ret) != 0) { + $r=Database::fetch_array($ret); $this->name=$r['pcm_lib']; } else { $this->name="Poste inconnu"; @@ -102,27 +136,27 @@ class Acc_Account_Ledger { */ function do_exist() { $sql="select pcm_val from tmp_pcmn where pcm_val= $1"; - $ret=ExecSqlParam($this->db,$sql,array($this->id)); - return pg_NumRows($ret) ; + $ret=$this->db->exec_sql($sql,array($this->id)); + return Database::num_row($ret) ; } /*!\brief Get all the value for this object from the database - * the data member are set + * the data member are set * \return false if this account doesn't exist otherwise true */ function load() { - $ret=ExecSqlParam($this->db,"select pcm_lib,pcm_val_parent from + $ret=$this->db->exec_sql("select pcm_lib,pcm_val_parent from tmp_pcmn where pcm_val=$1",array($this->id)); - $r=pg_fetch_all($ret); - + $r=Database::fetch_all($ret); + if ( ! $r ) return false; $this->label=$r[0]['pcm_lib']; $this->parent=$r[0]['pcm_val_parent']; return true; - + } /*!\brief Get all the value for this object from the database - * the data member are set + * the data member are set * \return false if this account doesn't exist otherwise true */ function get() @@ -130,83 +164,83 @@ class Acc_Account_Ledger { echo "OBSOLETE Acc_Account_Ledger->get(), a remplacer par Acc_Account_Ledger->load()"; return $this->load(); } - - /*! + + /*! * \brief give the balance of an account - * + * * \return * balance of the account * - */ + */ function get_solde($p_cond=" true ") { - $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, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx join tmp_pcmn on j_poste=pcm_val - where + $Res=$this->db->exec_sql("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, + case when j_debit='f' then j_montant else 0 end as cred + from jrnx join tmp_pcmn on j_poste=pcm_val + where j_poste::text like ('$this->id'::text) and $p_cond ) as m "); - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); if ($Max==0) return 0; - $r=pg_fetch_array($Res,0); - + $r=Database::fetch_array($Res,0); + return abs($r['sum_deb']-$r['sum_cred']); } - /*! + /*! * \brief give the balance of an account * \return * balance of the account * - */ + */ function get_solde_detail($p_cond="") { if ( $p_cond != "") $p_cond=" and ".$p_cond; - $sql="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, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx join tmp_pcmn on j_poste=pcm_val - where + $sql="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, + case when j_debit='f' then j_montant else 0 end as cred + from jrnx + where j_poste::text like ('$this->id'::text) $p_cond ) as m "; - $Res=ExecSql($this->db,$sql); - $Max=pg_NumRows($Res); + $Res=$this->db->exec_sql($sql); + $Max=Database::num_row($Res); if ($Max==0) { return array('debit'=>0, 'credit'=>0, 'solde'=>0) ; } - $r=pg_fetch_array($Res,0); + $r=Database::fetch_array($Res,0); // if p_start is < p_end the query returns null to avoid any problem // we set it to 0 - if ($r['sum_deb']=='') + if ($r['sum_deb']=='') $r['sum_deb']=0.0; - if ($r['sum_cred']=='') + if ($r['sum_cred']=='') $r['sum_cred']=0.0; return array('debit'=>$r['sum_deb'], 'credit'=>$r['sum_cred'], 'solde'=>abs($r['sum_deb']-$r['sum_cred'])); } -/*! +/*! * \brief isTva tell is a poste is used for VAT * \param none - * + * * * \return 1 is Yes otherwise 0 */ - function isTVA() + function isTVA() { // Load TVA array - $a_TVA=get_array($this->db,'select tva_poste + $a_TVA=$this->db->get_array('select tva_poste from tva_rate'); - foreach ( $a_TVA as $line_tva) - { - if ( $line_tva['tva_poste'] == '' ) + foreach ( $a_TVA as $line_tva) + { + if ( $line_tva['tva_poste'] == '' ) continue; list($tva_deb,$tva_cred)=split(',',$line_tva['tva_poste']); if ( $this->id == $tva_deb || @@ -218,7 +252,7 @@ function get_solde_detail($p_cond="") { return 0; } -/*! +/*! * \brief HtmlTable, display a HTML of a poste for the asked period * \param none * @@ -226,18 +260,18 @@ function get_solde_detail($p_cond="") { */ - function HtmlTable() - { + function HtmlTable() + { $this->get_name(); - list($array,$tot_deb,$tot_cred)=$this->get_row( $_REQUEST['from_periode'], + list($array,$tot_deb,$tot_cred)=$this->get_row_date( $_REQUEST['from_periode'], $_REQUEST['to_periode'] ); - if ( count($this->row ) == 0 ) + if ( count($this->row ) == 0 ) return; - + $rep=""; - + echo '<h2 class="info">'.$this->id." ".$this->name.'</h2>'; echo "<TABLE class=\"result\" width=\"100%\">"; echo "<TR>". @@ -247,8 +281,8 @@ function get_solde_detail($p_cond="") { "<TH> Débit </TH>". "<TH> Crédit </TH>". "</TR>"; - - foreach ( $this->row as $op ) { + + foreach ( $this->row as $op ) { echo "<TR>". "<TD>".$op['jr_internal']."</TD>". "<TD>".$op['j_date']."</TD>". @@ -256,7 +290,7 @@ function get_solde_detail($p_cond="") { "<TD>".$op['deb_montant']."</TD>". "<TD>".$op['cred_montant']."</TD>". "</TR>"; - + } $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; $diff=round(abs($tot_deb-$tot_cred),2); @@ -269,69 +303,68 @@ function get_solde_detail($p_cond="") { "</TR>"; echo "</table>"; - + return; } - /*! + /*! * \brief Display HTML Table Header (button) * * \return none */ static function HtmlTableHeader() { - $submit=new widget(); - $hid=new widget("hidden"); + $hid=new IHidden(); echo '<div class="noprint">'; echo "<table >"; echo '<TR>'; - + echo '<TD><form method="GET" ACTION="">'. dossier::hidden(). - widget::submit('bt_other',"Autre poste"). - $hid->IOValue("type","poste").$hid->IOValue('p_action','impress')."</form></TD>"; - + HtmlInput::submit('bt_other',"Autre poste"). + $hid->input("type","poste").$hid->input('p_action','impress')."</form></TD>"; + echo '<TD><form method="POST" ACTION="poste_pdf.php">'. dossier::hidden(). - widget::submit('bt_pdf',"Export PDF"). - $hid->IOValue("type","poste"). - $hid->IOValue('p_action','impress'). - $hid->IOValue("poste_id",$_REQUEST['poste_id']). - $hid->IOValue("from_periode",$_REQUEST['from_periode']). - $hid->IOValue("to_periode",$_REQUEST['to_periode']); + HtmlInput::submit('bt_pdf',"Export PDF"). + $hid->input("type","poste"). + $hid->input('p_action','impress'). + $hid->input("poste_id",$_REQUEST['poste_id']). + $hid->input("from_periode",$_REQUEST['from_periode']). + $hid->input("to_periode",$_REQUEST['to_periode']); if (isset($_REQUEST['poste_fille'])) - echo $hid->IOValue('poste_fille','on'); + echo $hid->input('poste_fille','on'); if (isset($_REQUEST['oper_detail'])) - echo $hid->IOValue('oper_detail','on'); + echo $hid->input('oper_detail','on'); echo "</form></TD>"; - + echo '<TD><form method="POST" ACTION="poste_csv.php">'. dossier::hidden(). - widget::submit('bt_csv',"Export CSV"). - $hid->IOValue("type","poste"). - $hid->IOValue('p_action','impress'). - $hid->IOValue("poste_id",$_REQUEST['poste_id']). - $hid->IOValue("from_periode",$_REQUEST['from_periode']). - $hid->IOValue("to_periode",$_REQUEST['to_periode']); + HtmlInput::submit('bt_csv',"Export CSV"). + $hid->input("type","poste"). + $hid->input('p_action','impress'). + $hid->input("poste_id",$_REQUEST['poste_id']). + $hid->input("from_periode",$_REQUEST['from_periode']). + $hid->input("to_periode",$_REQUEST['to_periode']); if (isset($_REQUEST['poste_fille'])) - echo $hid->IOValue('poste_fille','on'); + echo $hid->input('poste_fille','on'); if (isset($_REQUEST['oper_detail'])) - echo $hid->IOValue('oper_detail','on'); - + echo $hid->input('oper_detail','on'); + echo "</form></TD>"; echo "</table>"; echo '</div>'; - + } -/*! +/*! * \brief verify that the poste belong to a ledger * * \return 0 ok, -1 no */ function belong_ledger($p_jrn) { - $filter=getDbValue($this->db,"select jrn_def_class_cred from jrn_def where jrn_def_id=$p_jrn"); - if ( trim ($filter) == '') + $filter=$this->db->get_value("select jrn_def_class_cred from jrn_def where jrn_def_id=$p_jrn"); + if ( trim ($filter) == '') return 0; $valid_cred=split(" ",$filter); @@ -353,14 +386,56 @@ function get_solde_detail($p_cond="") { } }//foreach $sql.=$SqlFilter.' and pcm_val='.$this->id; - $max=getDbValue($this->db,$sql); - if ($max > 0 ) + $max=$this->db->get_value($sql); + if ($max > 0 ) return 0; else return -1; + } + /*!\brief With the id of the ledger, get the col jrn_def_class_deb + *\param $p_jrn jrn_id + *\return array of value, or an empty array if nothing is found + *\note + *\see + */ + function get_account_ledger($p_jrn) { + $l=new Acc_Ledger($this->db,$p_jrn); + $row=$l->get_propertie(); + if ( strlen(trim($row['jrn_def_class_deb'])) == 0 ) return array(); + $valid_account=split(" ",$row['jrn_def_class_deb']); + return $valid_account; + } + /*!\brief build a sql statement thanks a array found with get_account_ledger + * + *\param $p_jrn jrn_id + *\return an emty string if nothing is found or a valid SQL statement like +\code +pcm_val like ... or pcm_val like ... +\endcode + *\note + *\see get_account_ledger + */ + function build_sql_account($p_jrn) { + $array=$this->get_account_ledger($p_jrn); + if ( empty($array) ) return ""; + $sql=""; + foreach ( $array as $item_cred) { + if ( strlen (trim($item_cred))>0 ) { + if ( strstr($item_cred,"*") == true ) { + $item_cred=strtr($item_cred,"*","%"); + $sql_tmp=" pcm_val::text like '$item_cred' or"; + } else { + $sql_tmp=" pcm_val::text = '$item_cred' or"; + } + $sql.=$sql_tmp; + } + }//foreach + /* remove the last or */ + $sql=substr($sql,0,strlen($sql)-2); + return $sql; } static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $a=new Acc_Account_Ledger($cn,550); echo ' Journal 4 '.$a->belong_ledger(4); diff --git a/include/class_acc_balance.php b/include/class_acc_balance.php index c76003b0e..3a71ceb1a 100644 --- a/include/class_acc_balance.php +++ b/include/class_acc_balance.php @@ -18,13 +18,13 @@ */ /* $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 */ +require_once('class_acc_account.php'); class Acc_Balance { var $db; /*! < database connection */ @@ -61,18 +61,19 @@ class Acc_Balance { // filter on requested periode $per_sql=sql_filter_per($this->db,$p_from_periode,$p_to_periode,'p_id','j_tech_per'); + // if centralized $cent=""; $and=""; $jrn=""; $from_poste="";$to_poste=""; if ( $this->central=='Y' ) { $cent="j_centralized = true";$and=" and "; } - if ($this->jrn!= -1){ $jrn=" $and j_jrn_def=".$this->jrn;$and=" and ";} - if ( strlen(trim($this->from_poste)) != 0 ) { - $from_poste=" $and j_poste::text >= '".$this->from_poste."'"; $and=" and "; - } - if ( strlen(trim($this->to_poste)) != 0 ) { - $to_poste=" $and j_poste::text <= '".$this->to_poste."'"; $and=" and "; - } + if ($this->jrn!= -1){ $jrn=" $and j_jrn_def=".$this->jrn;$and=" and ";} + if ( strlen(trim($this->from_poste)) != 0 && $this->from_poste!=-1 ) { + $from_poste=" $and j_poste::text >= '".$this->from_poste."'"; $and=" and "; + } + if ( strlen(trim($this->to_poste)) != 0 && $this->to_poste!=-1 ) { + $to_poste=" $and j_poste::text <= '".$this->to_poste."'"; $and=" and "; + } // build query $sql="select j_poste,sum(deb) as sum_deb, sum(cred) as sum_cred from @@ -85,19 +86,22 @@ class Acc_Balance { $cent $jrn $from_poste $to_poste $and $per_sql ) as m group by j_poste order by j_poste::text"; - - $Res=ExecSql($this->db,$sql); + $cn=clone $this->db; + $Res=$this->db->exec_sql($sql); $tot_cred= 0.0; $tot_deb= 0.0; $tot_deb_saldo=0.0; $tot_cred_saldo=0.0; - $M=pg_NumRows($Res); + $M=$this->db->size(); + // Load the array for ($i=0; $i <$M;$i++) { - $r=pg_fetch_array($Res,$i); + $r=$this->db->fetch($i); + $poste=new Acc_Account($cn,$r['j_poste']); + $a['poste']=$r['j_poste']; - $a['label']=substr(GetPosteLibelle($this->db,$r['j_poste'],1),0,40); + $a['label']=substr($poste->get_lib(),0,40); $a['sum_deb']=round($r['sum_deb'],2); $a['sum_cred']=round($r['sum_cred'],2); $a['solde_deb']=round(( $a['sum_deb'] >= $a['sum_cred'] )? $a['sum_deb']- $a['sum_cred']:0,2); @@ -113,7 +117,7 @@ class Acc_Balance { // Add the saldo $i+=1; $a['poste']=""; - $a['label']="<b> Totaux </b>"; + $a['label']="Totaux "; $a['sum_deb']=$tot_deb; $a['sum_cred']=$tot_cred; $a['solde_deb']=$tot_deb_saldo; diff --git a/include/class_acc_bilan.php b/include/class_acc_bilan.php index 678055c1c..45e9557a2 100644 --- a/include/class_acc_bilan.php +++ b/include/class_acc_bilan.php @@ -24,8 +24,8 @@ * \brief this class handle the different bilan, from the table bilan * */ -require_once ('postgres.php'); -require_once ('class_widget.php'); +require_once("class_iselect.php"); +require_once ('class_database.php'); require_once ('class_dossier.php'); require_once ('impress_inc.php'); require_once ('header_print.php'); @@ -58,28 +58,28 @@ class Acc_Bilan { $r.='<TR>'; // filter on the current year - $w=new widget("select"); + $w=new ISelect(); $w->table=1; - $periode_start=make_array($this->db,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $p_filter_year order by p_start,p_end"); + $periode_start=$this->db->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $p_filter_year order by p_start,p_end"); - $periode_end=make_array($this->db,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $p_filter_year order by p_start,p_end"); + $periode_end=$this->db->make_array("select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $p_filter_year order by p_start,p_end"); $w->label="Depuis"; $w->value=$this->from; $w->selected=$this->from; - $r.= $w->IOValue('from_periode',$periode_start); + $r.= $w->input('from_periode',$periode_start); $w->label=" jusque "; $w->value=$this->to; $w->selected=$this->to; - $r.= $w->IOValue('to_periode',$periode_end); + $r.= $w->input('to_periode',$periode_end); $r.= "</TR>"; $r.="<tr>"; - $mod=new widget('select'); + $mod=new ISelect(); $mod->table=1; - $mod->value=make_array($this->db,"select b_id, b_name from bilan order by b_name"); + $mod->value=$this->db->make_array("select b_id, b_name from bilan order by b_name"); $mod->label="Choix du bilan"; - $r.=$mod->IOValue('b_id'); + $r.=$mod->input('b_id'); $r.="</tr>"; $r.= '</TABLE>'; return $r; @@ -91,16 +91,16 @@ class Acc_Bilan { */ private function warning($p_message,$p_type,$p_deb) { $sql="select pcm_val,pcm_lib from tmp_pcmn where pcm_type='$p_type'"; - $res=ExecSql($this->db,$sql); - if ( pg_NumRows($res) ==0 ) + $res=$this->db->exec_sql($sql); + if ( Database::num_row($res) ==0 ) return; $count=0; - $nRow=pg_NumRows($res); + $nRow=Database::num_row($res); $ret=""; $obj=new Acc_Account_Ledger($this->db,0); for ($i=0;$i<$nRow;$i++) { - $line=pg_fetch_array($res); + $line=Database::fetch_array($res); /* set the periode filter */ $sql=sql_filter_per($this->db,$this->from,$this->to,'p_id','j_tech_per'); $obj->id=$line['pcm_val']; @@ -151,7 +151,7 @@ class Acc_Bilan { $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". " where j_debit='t' and (pcm_type='ACT' or pcm_type='ACTINV')"; $sql.="and $sql_periode"; - $debit_actif=getDbValue($this->db,$sql); + $debit_actif=$this->db->get_value($sql); /* Credit Actif */ $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". @@ -159,7 +159,7 @@ class Acc_Bilan { $sql.="and $sql_periode"; - $credit_actif=getDbValue($this->db,$sql); + $credit_actif=$this->db->get_value($sql); $total_actif=abs($debit_actif-$credit_actif); echo 'Total actif '.$total_actif; echo '<br>'; @@ -168,13 +168,13 @@ class Acc_Bilan { " where j_debit='t' and (pcm_type='PAS' or pcm_type='PASINV') "; $sql.="and $sql_periode"; - $debit_passif=getDbValue($this->db,$sql); + $debit_passif=$this->db->get_value($sql); /* Credit Actif */ $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". " where j_debit='f' and (pcm_type='PAS' or pcm_type='PASINV') "; $sql.="and $sql_periode"; - $credit_passif=getDbValue($this->db,$sql); + $credit_passif=$this->db->get_value($sql); $total_passif=abs($debit_passif-$credit_passif); echo 'Total passif '.$total_passif; echo '<br>'; @@ -182,13 +182,13 @@ class Acc_Bilan { $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". " where j_debit='t' and (pcm_type='CHA' or pcm_type='CHAINV')"; $sql.="and $sql_periode"; - $debit_charge=getDbValue($this->db,$sql); + $debit_charge=$this->db->get_value($sql); /* Credit charge */ $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". " where j_debit='f' and (pcm_type='CHA' or pcm_type='CHAINV')"; $sql.="and $sql_periode"; - $credit_charge=getDbValue($this->db,$sql); + $credit_charge=$this->db->get_value($sql); $total_charge=abs($debit_charge-$credit_charge); echo 'Total charge '.$total_charge; echo '<br>'; @@ -197,13 +197,13 @@ class Acc_Bilan { $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". " where j_debit='t' and (pcm_type='PRO' or pcm_type='PROINV')"; $sql.="and $sql_periode"; - $debit_pro=getDbValue($this->db,$sql); + $debit_pro=$this->db->get_value($sql); /* Credit prod */ $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". " where j_debit='f' and (pcm_type='PRO' or pcm_type='PROINV')"; $sql.="and $sql_periode"; - $credit_pro=getDbValue($this->db,$sql); + $credit_pro=$this->db->get_value($sql); $total_pro=abs($debit_pro-$credit_pro); echo 'Total produit '.$total_pro; echo '<br>'; @@ -235,11 +235,11 @@ class Acc_Bilan { $sql="select b_name,b_file_template,b_file_form,lower(b_type) as b_type from bilan where". " b_id = ".$this->id; - $res=ExecSql($this->db,$sql); + $res=$this->db->exec_sql($sql); - if ( pg_NumRows($res)==0) + if ( Database::num_row($res)==0) throw new Exception ('Aucun enregistrement trouve'); - $array=pg_fetch_array($res,0); + $array=Database::fetch_array($res,0); foreach ($array as $name=>$value) $this->$name=$value; @@ -380,11 +380,9 @@ class Acc_Bilan { if( ! isset($this->$f2_value)) { $a = "!!".$f2_value."!!"; if( substr($f2_value, 0, 1) == "N" ) { - $ret = get_array($this->db, "SELECT pcm_lib AS acct_name FROM tmp_pcmn WHERE pcm_val::text LIKE ". + $ret = $this->db->get_array("SELECT pcm_lib AS acct_name FROM tmp_pcmn WHERE pcm_val::text LIKE ". " substr($1, 2)||'%' ORDER BY pcm_val ASC LIMIT 1",array($f2_value)); if($ret[0]['acct_name']) { - // htmlentities() is not the best function to deal with XML - // $a = htmlentities($ret[0]['acct_name'], ENT_QUOTES, "UTF-8", false); $a = $ret[0]['acct_name']; $a=str_replace('<','<',$a); $a=str_replace('>','>',$a); @@ -457,7 +455,7 @@ class Acc_Bilan { if( ! isset($this->$f2_value)) { $a = "!!".$f2_value."!!"; if( substr($f2_value, 0, 1) == "N" ) { - $ret = get_array($this->db, "SELECT pcm_lib AS acct_name FROM tmp_pcmn WHERE ". + $ret = $this->db->get_array("SELECT pcm_lib AS acct_name FROM tmp_pcmn WHERE ". " pcm_val::text LIKE substr($1, 2)||'%' ORDER BY pcm_val ASC LIMIT 1", array($f2_value)); if($ret[0]['acct_name']) { @@ -623,7 +621,7 @@ class Acc_Bilan { if ( isset($_GET['result'])) { ob_start(); - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $a=new Acc_Bilan($cn); $a->get_request_get(); @@ -641,7 +639,7 @@ class Acc_Bilan { $a->send($r); } else { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $a=new Acc_Bilan($cn); $a->get_request_get(); diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 0314368d2..24756954e 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -1,4 +1,4 @@ -<?php +<?php /* * This file is part of PhpCompta. * @@ -18,9 +18,16 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +require_once("class_iselect.php"); +require_once("class_icard.php"); +require_once("class_ispan.php"); +require_once("class_ihidden.php"); +require_once("class_idate.php"); +require_once("class_itext.php"); +require_once("class_icheckbox.php"); +require_once('class_iperiod.php'); require_once('class_fiche.php'); require_once('class_user.php'); -require_once ('class_widget.php'); require_once ('class_dossier.php'); require_once ('class_own.php'); require_once ('class_anc_operation.php'); @@ -28,12 +35,12 @@ require_once ('class_acc_operation.php'); require_once ('class_acc_account_ledger.php'); require_once ('class_pre_op_advanced.php'); require_once ('jrn.php'); -require_once ('class_acexception.php'); require_once ('class_acc_reconciliation.php'); require_once ('class_periode.php'); require_once ('class_gestion_purchase.php'); require_once ('class_acc_account.php'); require_once('ac_common.php'); +require_once('class_inum.php'); /*!\file * \brief Class for jrn, class acc_ledger for manipulating the ledger */ @@ -58,15 +65,22 @@ class Acc_Ledger { $this->nb=10; } function get_last_pj() { - if ( exist_sequence($this->db,"s_jrn_pj".$this->id) ) - return getDbValue($this->db,"select last_value from s_jrn_pj".$this->id); + if ( $this->db->exist_sequence("s_jrn_pj".$this->id) ) { + $ret= $this->db->get_array("select last_value,is_called from s_jrn_pj".$this->id); + $last=$ret[0]['last_value']; + /*! + *\note With PSQL sequence , the last_value column is 1 when before AND after the first call, to make the difference between them + * I have to check whether the sequence has been already called or not */ + if ($ret[0]['is_called']=='f' ) $last--; + return $last; + } else - create_sequence($this->db,"s_jrn_pj".$this->id); + $this->db->create_sequence("s_jrn_pj".$this->id); return 0; } - /*! - * \brief Return the type of a ledger (ACH,VEN,ODS or FIN) or GL - * + /*! + * \brief Return the type of a ledger (ACH,VEN,ODS or FIN) or GL + * */ function get_type() { if ( $this->id==0 ) { @@ -75,39 +89,39 @@ class Acc_Ledger { return "GL"; } - $Res=ExecSql($this->db,"select jrn_def_type from ". + $Res=$this->db->exec_sql("select jrn_def_type from ". " jrn_def where jrn_def_id=". $this->id); - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); if ($Max==0) return null; - $ret=pg_fetch_array($Res,0); + $ret=Database::fetch_array($Res,0); $this->type=$ret['jrn_def_type']; return $ret['jrn_def_type']; } - /*! - * \brief Return the name of a ledger - * + /*! + * \brief Return the name of a ledger + * */ function get_name() { if ( $this->id==0 ) { $this->name=" Grand Livre "; return $this->name; } - - $Res=ExecSql($this->db,"select jrn_def_name from ". + + $Res=$this->db->exec_sql("select jrn_def_name from ". " jrn_def where jrn_def_id=". $this->id); - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); if ($Max==0) return null; - $ret=pg_fetch_array($Res,0); + $ret=Database::fetch_array($Res,0); $this->name=$ret['jrn_def_name']; return $ret['jrn_def_name']; } - - + + /*! \function get_row - * \brief Get The data - * + * \brief Get The data + * * * \param p_from from periode * \param p_to to periode @@ -116,13 +130,13 @@ class Acc_Ledger { * \param p_offset number of lines * \return Array with the asked data * - */ + */ function get_row($p_from,$p_to,$cent='off',$p_limit=-1,$p_offset=-1) { echo_debug('class_acc_ledger.php',__LINE__,"get_row ( $p_from,$p_to,$cent,$p_limit,$p_offset)"); - + $periode=sql_filter_per($this->db,$p_from,$p_to,'p_id','jr_tech_per'); - + $cond_limite=($p_limit!=-1)?" limit ".$p_limit." offset ".$p_offset:""; // retrieve the type $this->get_type(); @@ -132,7 +146,7 @@ class Acc_Ledger { if ( $cent=='off' ) { echo_debug('class_acc_ledger.php',__LINE__,"journaux non centralise"); // Journaux non centralises - $Res=ExecSql($this->db,"select j_id,j_id as int_j_id,to_char(j_date,'DD.MM.YYYY') as j_date, + $Res=$this->db->exec_sql("select j_id,j_id as int_j_id,to_char(j_date,'DD.MM.YYYY') as j_date, jr_internal, case j_debit when 't' then j_montant::text else ' ' end as deb_montant, case j_debit when 'f' then j_montant::text else ' ' end as cred_montant, @@ -140,7 +154,7 @@ class Acc_Ledger { "coalesce(j_text,pcm_lib) as description,j_grpt as grp, jr_comment||' ('||jr_internal||')'||case when jr_pj_number is not null and jr_pj_number !='' then jr_pj_number else '' end as jr_comment, j_qcode, - jr_rapt as oc, j_tech_per as periode + jr_rapt as oc, j_tech_per as periode from jrnx left join jrn on ". "jr_grpt_id=j_grpt ". " left join tmp_pcmn on pcm_val=j_poste ". @@ -165,16 +179,16 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ c_grp as grp, c_comment as comment, c_rapt as oc, - c_periode as periode - from - - centralized left join jrnx on j_id=c_j_id - left join tmp_pcmn on pcm_val=c_poste + c_periode as periode + from + + centralized left join jrnx on j_id=c_j_id + left join tmp_pcmn on pcm_val=c_poste left join jrn on jr_grpt_id=c_grp where ". " c_jrn_def=".$this->id." and ". $periode." order by c_order "; - $Res=ExecSql($this->db,$Sql.$cond_limite); + $Res=$this->db->exec_sql($Sql.$cond_limite); } } else { @@ -182,7 +196,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ if ( $cent == 'off') { echo_debug('class_acc_ledger.php',__LINE__,"Grand livre non centralise"); // Non centralise - $Res=ExecSql($this->db,"select j_id,j_id as int_j_id,to_char(j_date,'DD.MM.YYYY') as j_date, + $Res=$this->db->exec_sql("select j_id,j_id as int_j_id,to_char(j_date,'DD.MM.YYYY') as j_date, jr_internal, case j_debit when 't' then j_montant::text else ' ' end as deb_montant, case j_debit when 'f' then j_montant::text else ' ' end as cred_montant, @@ -222,18 +236,18 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ " join jrnx on (j_id=c_j_id)". " where ". $periode." order by c_order "; - $Res=ExecSql($this->db,$Sql.$cond_limite); + $Res=$this->db->exec_sql($Sql.$cond_limite); } // Grand Livre } $array=array(); - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); if ($Max==0) return null; $case=""; $tot_deb=0; $tot_cred=0; - $row=pg_fetch_all($Res); + $row=Database::fetch_all($Res); for ($i=0;$i<$Max;$i++) { $fiche=new fiche($this->db); $line=$row[$i]; @@ -247,9 +261,9 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ echo_debug('class_acc_ledger.php',__LINE__," get_row : mont_cred ".$mont_cred); /* Check first if there is a quickcode */ - if ( strlen(trim($line['j_qcode'])) != 0 ) + if ( strlen(trim($line['j_qcode'])) != 0 ) { - if ( $fiche->get_by_qcode($line['j_qcode'],false) == 0 ) + if ( $fiche->get_by_qcode($line['j_qcode'],false) == 0 ) { $line['description']=$fiche->strAttribut(ATTR_DEF_NAME); } @@ -265,7 +279,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ echo_debug(__FILE__,__LINE__,$row[$e]); if ( $row[$e]['grp'] != $case ) continue; if ( strlen(trim($row[$e]['j_qcode'])) == 0 ) continue; - + $f=new fiche($this->db); $f->get_by_qcode($row[$e]['j_qcode'],false); echo_debug(__FILE__,__LINE__,$f); @@ -289,7 +303,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $array[]=array ( 'int_j_id' => $line['int_j_id'], - 'j_id'=>'', + 'j_id'=>'', 'j_date' => '', 'internal'=>'', 'deb_montant'=>$mont_deb, @@ -322,47 +336,47 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $a=array($array,$tot_deb,$tot_cred); return $a; } - /*! \brief Get simplified row from ledger - * - * \param from periode - * \param to periode - * \param centralized (on or off) - * \param p_limit starting line + /*! \brief Get simplified row from ledger + * + * \param from periode + * \param to periode + * \param centralized (on or off) + * \param p_limit starting line * \param p_offset number of lines * \param trunc if data must be truncated (pdf export) * - * \return an Array with the asked data + * \return an Array with the asked data */ - function get_rowSimple($p_from,$p_to,$cent='off',$trunc=0,$p_limit=-1,$p_offset=-1) + function get_rowSimple($p_from,$p_to,$cent='off',$trunc=0,$p_limit=-1,$p_offset=-1) { // Grand-livre : id= 0 //--- $jrn=($this->id == 0 )?"":"and jrn_def_id = ".$this->id; // Non Centralise si cent=off //-- - if ($cent=='off') + if ($cent=='off') {// Non centralise $periode=sql_filter_per($this->db,$p_from,$p_to,'p_id','jr_tech_per'); $cond_limite=($p_limit!=-1)?" limit ".$p_limit." offset ".$p_offset:""; //--- - $sql=" + $sql=" SELECT jrn.jr_id as jr_id , - jrn.jr_id as num , - jrn.jr_def_id as jr_def_id, - jrn.jr_montant as montant, + jrn.jr_id as num , + jrn.jr_def_id as jr_def_id, + jrn.jr_montant as montant, substr(jrn.jr_comment,1,30)|| case when jr_pj_number is not null and jr_pj_number !='' then 'pj:'||coalesce(jr_pj_number,'-') else '' end as comment, - to_char(jrn.jr_date,'DD-MM-YYYY') as date, + to_char(jrn.jr_date,'DD-MM-YYYY') as date, jr_internal, - jrn.jr_grpt_id as grpt_id, + jrn.jr_grpt_id as grpt_id, jrn.jr_pj_name as pj, jrn_def_type, jrn.jr_tech_per FROM jrn join jrn_def on (jrn_def_id=jr_def_id) WHERE $periode $jrn order by jr_date $cond_limite"; - } - else + } + else { $periode=sql_filter_per($this->db,$p_from,$p_to,'p_id','jr_tech_per'); @@ -374,55 +388,55 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $sql=" SELECT jrn.jr_id as jr_id , - $id , - jrn.jr_def_id as jr_def_id, - jrn.jr_montant as montant, + $id , + jrn.jr_def_id as jr_def_id, + jrn.jr_montant as montant, substr(jrn.jr_comment,1,30)|| case when jr_pj_number is not null and jr_pj_number !='' then 'pj:'||coalesce(jr_pj_number,'-') else '' end as comment, - to_char(jrn.jr_date,'DD-MM-YYYY') as date, + to_char(jrn.jr_date,'DD-MM-YYYY') as date, jr_internal, - jrn.jr_grpt_id as grpt_id, + jrn.jr_grpt_id as grpt_id, jrn.jr_pj_name as pj, jrn_def_type, - jrn.jr_tech_per - FROM jrn join jrn_def on (jrn_def_id=jr_def_id) - where - $periode $jrn and + jrn.jr_tech_per + FROM jrn join jrn_def on (jrn_def_id=jr_def_id) + where + $periode $jrn and jr_opid is not null order by num $cond_limite"; }// end else $cent=='off' //load all data into an array //--- - $Res=ExecSql($this->db,$sql); - $Max=pg_NumRows($Res); - if ( $Max == 0 ) + $Res=$this->db->exec_sql($sql); + $Max=Database::num_row($Res); + if ( $Max == 0 ) { return null; - } + } $type=$this->get_type(); // for type ACH and Ven we take more info - if ( $type == 'ACH' || $type == 'VEN') + if ( $type == 'ACH' || $type == 'VEN') { - $a_ParmCode=get_array($this->db,'select p_code,p_value from parm_code'); - $a_TVA=get_array($this->db,'select tva_id,tva_label,tva_poste + $a_ParmCode=$this->db->get_array('select p_code,p_value from parm_code'); + $a_TVA=$this->db->get_array('select tva_id,tva_label,tva_poste from tva_rate where tva_rate != 0 order by tva_id'); - for ( $i=0;$i<$Max;$i++) + for ( $i=0;$i<$Max;$i++) { - $array[$i]=pg_fetch_array($Res); + $array[$i]=Database::fetch_array($Res,$i); $p=$this->get_detail($array[$i],$type,$trunc,$a_TVA,$a_ParmCode); if ( $array[$i]['dep_priv'] != 0.0) { $array[$i]['comment'].="(priv. ".$array[$i]['dep_priv'].")"; - } + } } - + } - else + else { - $array=pg_fetch_all($Res); - + $array=Database::fetch_all($Res); + } - return $array; + return $array; }// end function get_rowSimple /*!\brief guess what the next pj should be @@ -430,85 +444,349 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ function guess_pj() { $prop=$this->get_propertie(); $pj_pref=$prop["jrn_def_pj_pref"]; - $pj_seq=$this->get_last_pj(); + $pj_seq=$this->get_last_pj()+1; return $pj_pref.$pj_seq; } - /*!\brief Show all the operation, propose a form to select the - *ledger and the periode - *\return none - *\note echo directly, there is no return with the html code + + /*!\brief Show all the operation + *\param $sql is the sql stmt, normally created by build_search_sql + *\param $offset the offset + *\param $p_paid if we want to see info about payment +\code +// Example +// Build the sql + list($sql,$where)=$Ledger->build_search_sql($_GET); +// Count nb of line + $max_line=$cn->count_sql($sql); + + $step=$_SESSION['g_pagesize']; + $page=(isset($_GET['offset']))?$_GET['page']:1; + $offset=(isset($_GET['offset']))?$_GET['offset']:0; +// create the nav. bar + $bar=jrn_navigation_bar($offset,$max_line,$step,$page); +// show a part + list($count,$html)= $Ledger->list_operation($sql,$offset,0); + echo $html; +// show nav bar + echo $bar; + +\endcode + *\see build_search_sql + *\see display_search_form + *\see search_form + + *\return HTML string */ - public function show_ledger() { + public function list_operation($sql,$offset,$p_paid=0) { + $user=new User($this->db); + $gDossier=dossier::id(); + $amount_paid=0.0; + $amount_unpaid=0.0; + include_once("central_inc.php"); + $limit=($_SESSION['g_pagesize']!=-1)?" LIMIT ".$_SESSION['g_pagesize']:""; + $offset=($_SESSION['g_pagesize']!=-1)?" OFFSET ".Database::escape_string($offset):""; + $order=" order by jr_date_order asc,jr_internal asc"; + // Sort + $url=CleanUrl(); + $str_dossier=dossier::get(); + $image_asc='<IMAGE SRC="image/down.gif" border="0" >'; + $image_desc='<IMAGE SRC="image/up.gif" border="0">'; + $image_sel_desc='<IMAGE SRC="image/select1.gif">'; + $image_sel_asc='<IMAGE SRC="image/select2.gif">'; - $w=new widget("select"); - $User=new User($this->db); - // filter on the current year - $filter_year=" where p_exercice='".$User->get_exercice()."'"; - - $periode_start=make_array($this->db,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); - $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); - $w->selected=$current; - - echo 'Période '.$w->IOValue("p_periode",$periode_start); + $sort_date="<th> <A class=\"mtitle\" HREF=\"?$url&o=da\">$image_asc</A>"._('Date')."<A class=\"mtitle\" HREF=\"?$url&o=dd\">$image_desc</A></th>"; + $sort_description="<th> <A class=\"mtitle\" HREF=\"?$url&o=ca\">$image_asc</A>"._('Description')."<A class=\"mtitle\" HREF=\"?$url&o=cd\">$image_desc</A></th>"; + $sort_amount="<th> <A class=\"mtitle\" HREF=\"?$url&o=ma\">$image_asc</A>"._('Montant')." <A class=\"mtitle\" HREF=\"?$url&o=md\">$image_desc</A></th>"; + $sort_pj="<th> <A class=\"mtitle\" HREF=\"?$url&o=pja\">$image_asc</A>"._('PJ')."<A class=\"mtitle\" HREF=\"?$url&o=pjd\">$image_desc</A></th>"; + $sort_echeance="<th> <A class=\"mtitle\" HREF=\"?$url&o=ea\">$image_asc</A>"._('Ech')." <A class=\"mtitle\" HREF=\"?$url&o=ed\">$image_desc</A> </th>"; - $qcode=(isset($_GET['qcode']))?$_GET['qcode']:""; - - $all=$this->get_all_fiche_def(); - echo JS_SEARCH_CARD; - echo JS_PROTOTYPE; - echo JS_AJAX_FICHE; - $w=new widget('js_search_only'); - $w->name='qcode'; - $w->value=$qcode; - $w->label=''; - $w->extra='filter'; - $w->extra2='QuickCode'; - $w->table=0; - $sp= new widget("span"); - echo $sp->IOValue("qcode_label","",$qcode); - echo $w->IOValue(); - - echo widget::submit('gl_submit','Recherche'); - // Show list of sell - // Date - date of payment - Customer - amount - if ( $current == -1) { - $cond=" jr_tech_per in (select p_id from parm_periode where p_exercice='".$User->get_exercice()."')"; - } else { - $cond=" jr_tech_per=".$current; - } - - $sql=SQL_LIST_ALL_INVOICE."where ".$cond." and jr_def_id=".$this->id ; - $step=$_SESSION['g_pagesize']; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - $filter_ledger=" jr_def_id=".$this->id; - $l=""; - // check if qcode contains something - if ( $qcode != "" ) + $own=new Own($this->db); + // if an order is asked + if ( isset ($_GET['o']) ) { - $qcode=Formatstring($qcode); - // add a condition to filter on the quick code - $l=" and jr_grpt_id in (select j_grpt from jrnx where j_qcode=upper('$qcode')) "; - $sql="where $cond $l and $filter_ledger "; + switch ($_GET['o']) + { + case 'pja': + // pj asc + $sort_pj="<th>$image_sel_asc PJ <A class=\"mtitle\" HREF=\"?$url&o=pjd\">$image_desc</A></th>"; + $order=" order by jr_pj_number asc "; + break; + case 'pjd': + $sort_pj="<th> <A class=\"mtitle\" HREF=\"?$url&o=pja\">$image_asc</A> PJ $image_sel_desc</th>"; + // pj desc + $order=" order by jr_pj_number desc "; + break; + + case 'da': + // date asc + $sort_date="<th>$image_sel_asc Date <A class=\"mtitle\" HREF=\"?$url&o=dd\">$image_desc</A></th>"; + $order=" order by jr_date_order asc "; + break; + case 'dd': + $sort_date="<th> <A class=\"mtitle\" HREF=\"?$url&o=da\">$image_asc</A> Date $image_sel_desc</th>"; + // date desc + $order=" order by jr_date_order desc "; + break; + case 'ma': + // montant asc + $sort_amount="<th> $image_sel_asc Montant <A class=\"mtitle\" HREF=\"?$url&o=md\">$image_desc</A></th>"; + $order=" order by jr_montant asc "; + break; + case 'md': + // montant desc + $sort_amount="<th> <A class=\"mtitle\" HREF=\"?$url&o=ma\">$image_asc</A>Montant $image_sel_desc</th>"; + $order=" order by jr_montant desc "; + break; + case 'ca': + // jr_comment asc + $sort_description="<th> $image_sel_asc Description <A class=\"mtitle\" HREF=\"?$url&o=cd\">$image_desc</A></th>"; + $order=" order by jr_comment asc "; + break; + case 'cd': + // jr_comment desc + $sort_description="<th> <A class=\"mtitle\" HREF=\"?$url&o=ca\">$image_asc</A>Description $image_sel_desc</th>"; + $order=" order by jr_comment desc "; + break; + case 'ea': + // jr_comment asc + $sort_echeance="<th> $image_sel_asc Ech. <A class=\"mtitle\" HREF=\"?$url&o=ed\">$image_desc</A></th>"; + $order=" order by jr_ech asc "; + break; + case 'ed': + // jr_comment desc + $sort_echeance="<th> <A class=\"mtitle\" HREF=\"?$url&o=ea\">$image_asc</A> Ech. $image_sel_desc</th>"; + $order=" order by jr_ech desc "; + break; + + } + } else { + // date asc + $sort_date="<th>$image_sel_asc Date <A class=\"mtitle\" HREF=\"?$url&o=dd\">$image_desc</A></th>"; + $order=" order by jr_date_order asc "; + } + // set a filter for the FIN + $a_parm_code=$this->db->get_array("select p_value from parm_code where p_code in ('BANQUE','COMPTE_COURANT','CAISSE')"); + $sql_fin="("; + $or=""; + foreach ($a_parm_code as $code) { + $sql_fin.="$or j_poste::text like '".$code['p_value']."%'"; + $or=" or "; + } + $sql_fin.=")"; + + // Count + $count=$this->db->count_sql($sql); + // Add the limit + $sql.=$order.$limit.$offset; + + // Execute SQL stmt + $Res=$this->db->exec_sql($sql); + + //starting from here we can refactor, so that instead of returning the generated HTML, + //this function returns a tree structure. + + $r=""; + + $r.=JS_LEDGER; + + $Max=Database::num_row($Res); + + if ($Max==0) return array(0,_("Aucun enregistrement trouvé")); + + $r.='<table class="result">'; + $l_sessid=$_REQUEST['PHPSESSID']; + + $r.="<tr >"; + $r.="<th>Internal</th>"; + if ( $this->type=='') { + $r.=th('Journal'); + } + $r.=$sort_date; + $r.=$sort_echeance; + $r.=$sort_pj; + $r.=$sort_description; + $r.=$sort_amount; + // if $p_paid is not equal to 0 then we have a paid column + if ( $p_paid != 0 ) + { + $r.="<th> "._('Payé')."</th>"; + } + $r.="<th>"._('Op. Concernée')."</th>"; + if ($own->MY_STRICT=='N' && $user->check_action(GEOP)==1) + $r.='<th>'._('Action').'</th>'; + $r.="<th>"._('Document')."</th>"; + $r.="</tr>"; + // Total Amount + $tot=0.0; + $gDossier=dossier::id(); + for ($i=0; $i < $Max;$i++) { + + + $row=Database::fetch_array($Res,$i); + + if ( $i % 2 == 0 ) $tr='<TR class="odd">'; + else $tr='<TR class="even">'; + $r.=$tr; + //internal code + // button modify + $r.="<TD>"; + // If url contains + // + + $href=basename($_SERVER['PHP_SELF']); + echo_debug(__FILE__,__LINE__,"href = $href"); + switch ($href) + { + // user_jrn.php + case 'compta.php': + $vue="S"; //Expert View + break; + case 'commercial.php': + $vue="S"; //Simple View + break; + case 'recherche.php': + $vue=(isset($_GET['expert']))?'E':'S'; + break; + default: + echo_error('user_form_ach.php',__LINE__,'Erreur invalid request uri'); + exit (-1); + } + //DEBUG + // $r.=$l_sessid; + $r.=sprintf('<A class="detail" HREF="javascript:modifyOperation(\'%s\',\'%s\',\'%s\',\'%s\',\'%s\')" >%s</A>', + $row['jr_id'], $l_sessid,$gDossier, $row['jrn_def_id'],$vue, $row['jr_internal']); + $r.="</TD>"; + if ( $this->type=='') $r.=td($row['jrn_def_name']); + // date + $r.="<TD>"; + $r.=$row['jr_date']; + $r.="</TD>"; + // echeance + $r.="<TD>"; + $r.=$row['jr_ech']; + $r.="</TD>"; + + // pj + $r.="<TD>"; + $r.=$row['jr_pj_number']; + $r.="</TD>"; + + // comment + $r.="<TD>"; + $tmp_jr_comment=h($row['jr_comment']); + $r.=$tmp_jr_comment; + $r.="</TD>"; + + // Amount + // If the ledger is financial : + // the credit must be negative and written in red + $positive=0; + + // Check ledger type : + if ( $row['jrn_def_type'] == 'FIN' ) + { + $positive = $this->db->count_sql("select * from jrn inner join jrnx on jr_grpt_id=j_grpt ". + " where jr_id=".$row['jr_id']." and $sql_fin ". + " and j_debit='f'"); + } + $r.="<TD align=\"right\">"; + + $tot=($positive != 0)?$tot-$row['jr_montant']:$tot+$row['jr_montant']; + //STAN $positive always == 0 + $r.=( $positive != 0 )?"<font color=\"red\"> - ".sprintf("%8.2f",$row['jr_montant'])."</font>":sprintf("%8.2f",$row['jr_montant']); + $r.="</TD>"; + + + // Show the paid column if p_paid is not null + if ( $p_paid !=0 ) + { + $w=new ICheckBox(); + $w->name="rd_paid".$row['jr_id']; + $w->selected=($row['jr_rapt']=='paid')?true:false; + // if p_paid == 2 then readonly + $w->readonly=( $p_paid == 2)?true:false; + $h=new IHidden(); + $h->name="set_jr_id".$row['jr_id']; + $r.='<TD>'.$w->input().$h->input().'</TD>'; + if ( $row['jr_rapt']=='paid') + $amount_paid+=$row['jr_montant']; + else + $amount_unpaid+=$row['jr_montant']; } - list($max_line,$list)=ListJrn($this->db,$this->id,$sql,null,$offset,0); - $bar=jrn_navigation_bar($offset,$max_line,$step,$page); - - echo "<hr>$bar"; - echo dossier::hidden(); - $hid=new widget("hidden"); - - echo $list; + // Rapprochement + $rec=new Acc_Reconciliation($this->db); + $rec->set_jr_id($row['jr_id']); + $a=$rec->get(); + $r.="<TD>"; + if ( $a != null ) { - echo "$bar <hr>"; - - echo '</div>'; - - + foreach ($a as $key => $element) + { + $operation=new Acc_Operation($this->db); + $operation->jr_id=$element; + $l_amount=$this->db->get_value("select jr_montant from jrn ". + " where jr_id=$element"); + $r.= "<A class=\"detail\" HREF=\"javascript:modifyOperation('".$element."','".$l_sessid."',".$gDossier.")\" > ".$operation->get_internal()." [ $l_amount € ]</A>"; + }//for + }// if ( $a != null ) { + $r.="</TD>"; + + if ( $row['jr_valid'] == 'f' ) { + $r.="<TD> Opération annulée</TD>"; + } else if ( $own->MY_STRICT=='N' ) { + // all operations can be removed either by setting to 0 the amount + // or by writing the opposite operation if the period is closed + $r.="<TD>"; + // cancel operation + if ( $user->check_action(GEOP)==1) + $r.=sprintf('<input TYPE="BUTTON" VALUE="%s" onClick="cancelOperation(\'%s\',\'%s\',%d,\'%s\')">', + _("Effacer"),$row['jr_grpt_id'],$l_sessid,$gDossier,$row['jrn_def_id']); + $r.="</TD>"; + } // else + //document + if ( $row['jr_pj_name'] != "") + { + $image='<IMG SRC="image/insert_table.gif" title="'.$row['jr_pj_name'].'" border="0">'; + $r.="<TD>".sprintf('<A class="detail" HREF="show_pj.php?jrn=%s&jr_grpt_id=%s&%s&PHPSESSID=%s">%s</A>', + $row['jrn_def_id'], + $row['jr_grpt_id'], + $str_dossier, + $_REQUEST['PHPSESSID'], + $image) + ."</TD>"; + } + else + $r.="<TD></TD>"; + + // end row + $r.="</tr>"; + + } + $amount_paid=round($amount_paid,4); + $amount_unpaid=round($amount_unpaid,4); + $tot=round($tot,4); + $r.="<TR>"; + $r.='<TD COLSPAN="5">Total</TD>'; + $r.='<TD ALIGN="RIGHT">'.$tot."</TD>"; + $r.="</tr>"; + if ( $p_paid != 0 ) { + $r.="<TR>"; + $r.='<TD COLSPAN="5">Payé</TD>'; + $r.='<TD ALIGN="RIGHT">'.$amount_paid."</TD>"; + $r.="</tr>"; + $r.="<TR>"; + $r.='<TD COLSPAN="5">Non payé</TD>'; + $r.='<TD ALIGN="RIGHT">'.$amount_unpaid."</TD>"; + $r.="</tr>"; + } + $r.="</table>"; + + return array ($count,$r); } - /*! - * \brief get_detail gives the detail of row + + /*! + * \brief get_detail gives the detail of row * this array must contains at least the field * <ul> * <li> montant</li> @@ -516,36 +794,36 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ * </ul> * the following field will be added * <ul> - * <li> HTVA + * <li> HTVA * <li> TVAC * <li> TVA array with * <ul> * <li> field 0 idx * <li> array containing tva_id,tva_label and tva_amount * </ul> - * </ul> + * </ul> * - * \param p_array the structure is set in get_rowSimple, this array is - * modified, + * \param p_array the structure is set in get_rowSimple, this array is + * modified, * \param $trunc if the data must be truncated, usefull for pdf export * \param p_jrn_type is the type of the ledger (ACH or VEN) * \param $a_TVA TVA Array (default null) * \param $a_ParmCode Array (default null) - * \return p_array + * \return p_array */ function get_detail(&$p_array,$p_jrn_type,$trunc=0,$a_TVA=null,$a_ParmCode=null) { echo_debug(__FILE__.':'.__LINE__.'- get_detail','$p_array',$p_array); - if ( $a_TVA == null ) + if ( $a_TVA == null ) { //Load TVA array - $a_TVA=get_array($this->db,'select tva_id,tva_label,tva_poste + $a_TVA=$this->db->get_array('select tva_id,tva_label,tva_poste from tva_rate where tva_rate != 0 order by tva_id'); } if ( $a_ParmCode == null ) { //Load Parm_code - $a_ParmCode=get_array($this->db,'select p_code,p_value from parm_code'); + $a_ParmCode=$this->db->get_array('select p_code,p_value from parm_code'); } // init $p_array['client']=""; @@ -558,8 +836,8 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ // Retrieve data from jrnx $sql="select j_id,j_poste,j_montant, j_debit,j_qcode from jrnx where ". " j_grpt=".$p_array['grpt_id']; - $Res2=ExecSql($this->db,$sql); - $data_jrnx=pg_fetch_all($Res2); + $Res2=$this->db->exec_sql($sql); + $data_jrnx=Database::fetch_all($Res2); $c=0; // Parse data from jrnx and fill diff. field @@ -578,7 +856,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $fiche_def_id=$fiche->get_fiche_def_ref_id(); // Customer or supplier if ( $fiche_def_id == FICHE_TYPE_CLIENT || - $fiche_def_id == FICHE_TYPE_FOURNISSEUR ) + $fiche_def_id == FICHE_TYPE_FOURNISSEUR ) { echo_debug('class_acc_ledger',__LINE__,$code['j_qcode'].'est F ou C'); $p_array['TVAC']=$code['j_montant']; @@ -589,54 +867,54 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ { $p_array['reversed']=true; $p_array['TVAC']*=-1; - + } if ( $fiche_def_id == FICHE_TYPE_FOURNISSEUR && $code['j_debit']=='t') { $p_array['reversed']=true; $p_array['TVAC']*=-1; } - - + + } else { // if we use the ledger ven / ach for others card than supplier and customer if ( $fiche_def_id != FICHE_TYPE_VENTE && - $fiche_def_id != FICHE_TYPE_ACH_MAR && + $fiche_def_id != FICHE_TYPE_ACH_MAR && $fiche_def_id != FICHE_TYPE_ACH_SER ) { echo_debug('class_acc_ledger',__LINE__,$code['j_qcode']."n 'est PAS F ou C"); $p_array['TVAC']=$code['j_montant']; - + $p_array['client']= ($trunc==0)?$fiche->getName():substr($fiche->getName(),0,20); $p_array['reversed']=false; if ($p_jrn_type == 'ACH' && $code['j_debit']=='t') { $p_array['reversed']=true; $p_array['TVAC']*=-1; - + } if ($p_jrn_type == 'VEN' && $code['j_debit']=='f') { $p_array['reversed']=true; $p_array['TVAC']*=-1; } - - - - + + + + } } } echo_debug('class_acc_ledger',__LINE__,$a_TVA); - // if TVA, load amount, tva id and rate in array - foreach ( $a_TVA as $line_tva) - { + // if TVA, load amount, tva id and rate in array + foreach ( $a_TVA as $line_tva) + { echo_debug('class_acc_ledger',__LINE__,'ICI'); echo_debug('class_acc_ledger',__LINE__,'Montant TVA = '.$p_array['AMOUNT_TVA']); list($tva_deb,$tva_cred)=split(',',$line_tva['tva_poste']); if ( $code['j_poste'] == $tva_deb || $code['j_poste'] == $tva_cred ) { - + // For the reversed operation if ( $p_jrn_type == 'ACH' && $code['j_debit'] == 'f') { @@ -646,17 +924,17 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ { $code['j_montant']=-1*$code['j_montant']; } - + $p_array['AMOUNT_TVA']+=$code['j_montant']; - + $p_array['TVA'][$c]=array($idx_tva,array($line_tva['tva_id'],$line_tva['tva_label'],$code['j_montant'])); echo_debug('class_acc_ledger',__LINE__,'Montant TVA = '.$p_array['AMOUNT_TVA']); $c++; - + $idx_tva++; } } - + // isDNA // If operation is reversed then amount are negatif /* if ND */ @@ -675,7 +953,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $r=""; $a_tva_amount=array(); // inline TVA (used for the PDF) - foreach ($p_array['TVA'] as $linetva) + foreach ($p_array['TVA'] as $linetva) { foreach ($a_TVA as $tva) { @@ -689,18 +967,13 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ foreach ($a_TVA as $line_tva) { $a=$line_tva['tva_id']; - if ( isset($a_tva_amount[$a])) + if ( isset($a_tva_amount[$a])) { - $tmp=sprintf("% 10.2f",$a_tva_amount[$a]); - // $r.=str_repeat("_",10-strlen($tmp)).$tmp." "; - // $r.=str_repeat(" ",10-strlen($tmp)).$tmp." "; + $tmp=sprintf("% 10.2f",$a_tva_amount[$a]); $r.="$tmp"; } else $r.=sprintf("% 10.2f",0); - // $r.=str_repeat(" ",6)."0.00 "; - // $r.=str_repeat("_",6)."0.00 "; - //$r.=" 0.00"; } $p_array['TVA_INLINE']=$r; @@ -709,30 +982,24 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ /*! * \brief Get the properties of a journal * - * parm : - * - p_dossier the folder id - * - p_jrn the jrn id - * gen : - * - none - * return: - * - an array containing properties + * \return an array containing properties * */ function get_propertie() - { + { if ( $this->id == 0 ) return; - $Res=ExecSqlParam($this->db,"select jrn_Def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_def_type, + $Res=$this->db->exec_sql("select jrn_Def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_def_type, jrn_deb_max_line,jrn_cred_max_line,jrn_def_ech,jrn_def_ech_lib,jrn_def_code, jrn_def_fiche_deb,jrn_def_fiche_deb,jrn_def_pj_pref from jrn_Def where jrn_def_id=$1",array($this->id)); - $Count=pg_NumRows($Res); + $Count=Database::num_row($Res); if ( $Count == 0 ) { - echo '<DIV="redcontent"><H2 class="error"> Parametres journaux non trouves</H2> </DIV>'; + echo '<DIV="redcontent"><H2 class="error">'._('Parametres journaux non trouves').'</H2> </DIV>'; return null; } - return pg_fetch_array($Res,0); + return Database::fetch_array($Res,0); } /*! \function GetDefLine @@ -741,12 +1008,12 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ * * \return an integer */ - function GetDefLine() + function GetDefLine() { $sql_cred='jrn_deb_max_line'; $sql="select jrn_deb_max_line as value from jrn_def where jrn_def_id=$1"; - $r=ExecSqlParam($this->db,$sql,array($this->id)); - $Res=pg_fetch_all($r); + $r=$this->db->exec_sql($sql,array($this->id)); + $Res=Database::fetch_all($r); echo_debug('class_acc_ledger',__LINE__,$Res); if ( sizeof($Res) == 0 ) return 1; return $Res[0]['value']; @@ -757,15 +1024,15 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ * \param $p_cent 1 for a centralized period otherwise 0 */ function get_solde($p_from,$p_to,$p_cent) { - $ledger=""; + $ledger=""; if ( $this->id != 0 && $p_cent=='off') { $ledger=" and j_jrn_def = ".$this->id; } - + if ( $this->id != 0 && $p_cent=='on') { $ledger=" and c_jrn_def = ".$this->id; } - + // we ask for a specific ledger if ( $p_cent == 'off') { $periode=sql_filter_per($this->db,$p_from,$p_to,'p_id','j_tech_per'); @@ -776,12 +1043,12 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $sql='select c_montant as montant,c_debit as deb from centralized where ' .$periode.$ledger; } - $ret=ExecSql($this->db,$sql); - $array=pg_fetch_all($ret); + $ret=$this->db->exec_sql($sql); + $array=Database::fetch_all($ret); $deb=0.0; $cred=0.0; foreach ($array as $line) { - + if ( $line['deb']=='t' ) $deb+=$line['montant']; else @@ -790,13 +1057,13 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $response=array($deb,$cred); return $response; } - /*! + /*! * \brief Show a select list of the ledger you can access in * writing, the security is taken in care but show the readable AND * writable ledger. * \param $p_type = ALL or the type of the ledger (ACH,VEN,FIN,ODS) * \param $p_access =3 for READ and WRITE, 2 for write and 1 for readonly - * \return object widget select + * \return object HtmlInput select */ function select_ledger($p_type="ALL",$p_access=3) { $user=new User($this->db); @@ -812,19 +1079,19 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $idx++; } - $select=new widget("select"); + $select=new ISelect(); $select->name='p_jrn'; $select->value=$ret; $select->selected=$this->id; return $select; } - /*! + /*! * \brief retrieve the jrn_def_fiche and return them into a array * index deb, cred * \param * \param * \param - * + * * * \return return an array ('deb'=> ,'cred'=>) */ @@ -833,40 +1100,36 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ " from jrn_def where ". " jrn_def_id = $1 "; - $r=ExecSqlParam($this->db,$sql,array($this->id)); + $r=$this->db->exec_sql($sql,array($this->id)); - $res=pg_fetch_all($r); + $res=Database::fetch_all($r); if ( empty($res) ) return null; return $res[0]; } - /*! + /*! * \brief retrieve the jrn_def_class_deb and return it * * - * \return return an string + * \return return an string */ function get_class_def() { $sql="select jrn_def_class_deb ". " from jrn_def where ". " jrn_def_id = $1"; - $r=ExecSqlParam($this->db,$sql,array($this->id)); + $r=$this->db->exec_sql($sql,array($this->id)); - $res=pg_fetch_all($r); + $res=Database::fetch_all($r); if ( empty($res) ) return null; return $res[0]; } - /*! + /*! * \brief show the result of the array * \param $p_array array from the form - * \param - * \param - * - * * \return string */ function show_summary($p_array) { @@ -875,31 +1138,32 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ extract($p_array); $ret=""; $ret.="<table>"; - $ret.="<tr><td>Date : </td><td>$date</td></tr>"; - $ret.="<tr><td>Description </td><td>".h($desc)."</td></tr>"; - $ret.="<tr><td>PJ Num </td><td>".h($e_pj)."</td></tr>"; + $ret.="<tr><td>"._('Date')." : </td><td>$date</td></tr>"; + $ret.="<tr><td>"._('Description')." </td><td>".h($desc)."</td></tr>"; + $ret.="<tr><td>"._('PJ Num')." </td><td>".h($e_pj)."</td></tr>"; $ret.='</table>'; $ret.="<table>"; $ret.="<tr>"; - $ret.="<th> Quick Code ou "; - $ret.="Poste </th>"; - $ret.="<th> Montant </th>"; - $ret.="<th> Débit</th>"; + $ret.="<th>"._('Quick Code ou'); + $ret.=_("Poste")." </th>"; + $ret.="<th> "._("Montant")." </th>"; + $ret.="<th>"._("Débit")."</th>"; $ret.="</tr>"; $own=new own($this->db); - $hidden=new widget('hidden'); - $ret.=$hidden->IOValue('date',$date); - $ret.=$hidden->IOValue('desc',$desc); - $ret.=widget::hidden('e_pj',$e_pj); - $ret.=widget::hidden('e_pj_suggest',$e_pj_suggest); + $ret.=HtmlInput::hidden('date',$date); + $ret.=HtmlInput::hidden('desc',$desc); + $ret.=HtmlInput::hidden('e_pj',$e_pj); + $ret.=HtmlInput::hidden('e_pj_suggest',$e_pj_suggest); + $mt=microtime(true); + $ret.=HtmlInput::hidden('mt',$mt); // For predefined operation - $ret.=$hidden->IOValue('e_comm',$desc); - $ret.=$hidden->IOValue('jrn_type',$this->get_type()); - $ret.=$hidden->IOValue('p_jrn',$this->id); - $ret.=$hidden->IOValue('nb_item',$nb_item); + $ret.=HtmlInput::hidden('e_comm',$desc); + $ret.=HtmlInput::hidden('jrn_type',$this->get_type()); + $ret.=HtmlInput::hidden('p_jrn',$this->id); + $ret.=HtmlInput::hidden('nb_item',$nb_item); if ( $this->with_concerned==true) { - $ret.=$hidden->IOValue('jrn_concerned',$jrn_concerned); + $ret.=HtmlInput::hidden('jrn_concerned',$jrn_concerned); } $ret.=dossier::hidden(); $count=0; @@ -911,7 +1175,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $strPoste=$oqc->strAttribut(ATTR_DEF_ACCOUNT); $ret.="<td>". ${'qc_'.$i}.' - '. - $oqc->strAttribut(ATTR_DEF_NAME).$hidden->IOValue('qc_'.$i,${'qc_'.$i}). + $oqc->strAttribut(ATTR_DEF_NAME).HtmlInput::hidden('qc_'.$i,${'qc_'.$i}). '</td>'; } @@ -919,19 +1183,19 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $oposte=new Acc_Account_Ledger($this->db,${'poste'.$i}); $strPoste=$oposte->id; $ret.="<td>".h(${"poste".$i}." - ". - $oposte->get_name()).$hidden->IOValue('poste'.$i,${'poste'.$i}). + $oposte->get_name()).HtmlInput::hidden('poste'.$i,${'poste'.$i}). '</td>'; } - if ( trim(${'qc_'.$i})=="" && trim(${'poste'.$i}) == "") + if ( trim(${'qc_'.$i})=="" && trim(${'poste'.$i}) == "") continue; - $ret.="<td>".h(${"ld".$i}).$hidden->IOValue('ld'.$i,${'ld'.$i})."</td>"; - $ret.="<td>".${"amount".$i}.$hidden->IOValue('amount'.$i,${'amount'.$i})."</td>"; + $ret.="<td>".h(${"ld".$i}).HtmlInput::hidden('ld'.$i,${'ld'.$i})."</td>"; + $ret.="<td>".${"amount".$i}.HtmlInput::hidden('amount'.$i,${'amount'.$i})."</td>"; $ret.="<td>"; $ret.=(isset(${"ck$i"}))?"D":"C"; - $ret.=(isset(${"ck$i"}))?$hidden->IOValue('ck'.$i,${'ck'.$i}):""; + $ret.=(isset(${"ck$i"}))?HtmlInput::hidden('ck'.$i,${'ck'.$i}):""; $ret.="</td>"; - // CA + // CA if ( $own->MY_ANALYTIC!='nu') // use of AA { @@ -944,7 +1208,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $ret.='</td>'; $count++; } - + } @@ -955,7 +1219,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ return $ret; } - /*! + /*! * \brief Show the form to encode your operation * \param $p_array if you correct or use a predef operation * \param $p_readonly 1 for readonly 0 for writable @@ -966,22 +1230,26 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ { if ( $p_readonly == 1 ) return $this->show_summary($p_array); - + if ( $p_array != null ) extract($p_array); $ret=""; + /* Add button */ + $f_add_button=new IButton('add_card'); + $f_add_button->label=_('Créer une nouvelle fiche'); + $f_add_button->set_attribute('ipopup','ipop_newcard'); + $f_add_button->set_attribute('filter',$this->get_all_fiche_def ()); + // $f_add_button->set_attribute('jrn',$this->id); + $f_add_button->javascript=" select_card_type(this);"; + $ret.=$f_add_button->input(); + + // Load the javascript - $ret.=JS_SEARCH_CARD; - $ret.=JS_SEARCH_POSTE; - $ret.=JS_AJAX_FICHE; - $ret.=JS_PROTOTYPE; - $ret.=JS_INFOBULLE; - // + // $ret.="<table>"; $ret.= '<tr><td>'; - $wDate=new widget('js_date','Date','date'); - $wDate->table=1; + $wDate=new IDate('date'); $wDate->readonly=$p_readonly; $date=(isset($date)&&trim($date)!='')?$date:''; if (trim($date)=='') { @@ -992,20 +1260,19 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ } $wDate->value=$date; - $ret.=$wDate->IOValue(); + $ret.=_("Date").' : '.$wDate->input(); $ret.= '</td></tr>'; - $ret.= '<tr><td>'; - $wDescription=new widget('text',"Description",'desc'); + $ret.= '<tr><td>'._('Description'); + $wDescription=new IText('desc'); $wDescription->readonly=$p_readonly; - $wDescription->table=1; + $wDescription->size=100; $wDescription->value=(isset($desc))?$desc:''; - $ret.=$wDescription->IOValue(); + $ret.=$wDescription->input(); $ret.= '</td>'; - $wPJ=new widget('text',"PJ Num: ",'e_pj'); + $wPJ=new IText('e_pj'); $wPJ->readonly=false; - $wPJ->table=1; $wPJ->size=10; /* suggest PJ ? */ @@ -1013,48 +1280,59 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $own=new Own($this->db); if ( $own->MY_PJ_SUGGEST=='Y') { $default_pj=$this->guess_pj(); - } + } $wPJ->value=(isset($e_pj))?$e_pj:$default_pj; - $ret.=$wPJ->IOValue(); - $ret.=widget::hidden('e_pj_suggest',$default_pj); + $ret.='<td> '._('Pièce').' : '.$wPJ->input(); + $ret.=HtmlInput::hidden('e_pj_suggest',$default_pj); $ret.= '</td></tr>'; $ret.= '</table>'; $nb_row=(isset($nb_item) )?$nb_item:$this->nb; - $ret.=widget::hidden('nb_item',$nb_row); + $ret.=HtmlInput::hidden('nb_item',$nb_row); $ret.=dossier::hidden(); - $hidden=new widget('hidden'); - $ret.=$hidden->IOValue('p_jrn',$this->id); - $ret.=$hidden->IOValue('jrn_type',$this->get_type()); - $info= widget::infobulle(0); - $info_poste=widget::infobulle(9); + + $ret.=HtmlInput::hidden('p_jrn',$this->id); + $ret.=dossier::hidden(); + $ret.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); + + $ret.=HtmlInput::hidden('jrn_type',$this->get_type()); + $info= HtmlInput::infobulle(0); + $info_poste=HtmlInput::infobulle(9); $ret.='<table id="quick_item" style="width:100%">'; $ret.='<tr>'. '<th >Quickcode'.$info.'</th>'. - '<th >Poste'.$info_poste.'</th>'. - '<th >Libellé</th>'. - '<th> Montant</th>'. - '<th>Débit</th>'. + '<th >'._('Poste').$info_poste.'</th>'. + '<th >'._('Libellé').'</th>'. + '<th>'._('Montant').'</th>'. + '<th>'._('Débit').'</th>'. '</tr>'; $l_sessid=$_REQUEST['PHPSESSID']; for ($i = 0 ;$i<$nb_row;$i++){ // Quick Code - $quick_code=new widget('js_search_card_control'); - $quick_code->name='qc_'.$i; - $quick_code->ctrl="ld".$i; - $quick_code->value=(isset(${'qc_'.$i}))?${'qc_'.$i}:""; - $quick_code->javascript=sprintf('onBlur="ajaxFid(\'%s\',\'filter\',\'%s\',\'%s\',\'%s\'); if ( this.value!=\'\' ) my_clear(\'poste'.$i.'\'); "', - $quick_code->name, - $l_sessid, - "searchcardControl", - $quick_code->ctrl - ); - $quick_code->readonly=$p_readonly; - $quick_code->extra2='QuickCode?'; + $quick_code=new ICard('qc_'.$i); + $quick_code->set_dblclick("fill_ipopcard(this);"); + $quick_code->set_attribute('ipopup','ipopcard'); + + // name of the field to update with the name of the card + $quick_code->set_attribute('label',"ld".$i); + $quick_code->set_attribute('jrn',$this->id); + + // name of the field to update with the name of the card + $quick_code->set_attribute('typecard','filter'); $quick_code->extra='filter'; + // Add the callback function to filter the card on the jrn + $quick_code->set_callback('filter_card'); + $quick_code->set_function('fill_data'); + $quick_code->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', + $quick_code->name); + + $quick_code->jrn=$this->id; + $quick_code->value=(isset(${'qc_'.$i}))?${'qc_'.$i}:""; + $quick_code->readonly=$p_readonly; + $label=''; if ( $quick_code->value != '' ) { $Fiche=new fiche($this->db); @@ -1063,64 +1341,66 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ } - // Account - $poste=new widget('js_search_poste'); + // Account + $poste=new IPoste(); $poste->name='poste'.$i; + $poste->set_attribute('jrn',$this->id); + $poste->set_attribute('ipopup','ipop_account'); + $poste->set_attribute('label','ld'.$i); + $poste->set_attribute('account','poste'.$i); + $poste->value=(isset(${'poste'.$i}))?${"poste".$i}:''; $poste->readonly=$p_readonly; - $poste->extra=$this->id; - $poste->extra2=$this->get_class_def(); - $poste->ctrl="ld".$i; if ( $poste->value != '' ) { $Poste=new Acc_Account($this->db); - $Poste->pcm_value=$poste->value; + $Poste->set_parameter('value',$poste->value); $label=$Poste->get_lib(); } // Description of the line - $line_desc=new widget('text'); + $line_desc=new IText(); $line_desc->name='ld'.$i; $line_desc->size=30; $line_desc->value=(isset(${"ld".$i}))?${"ld".$i}:$label; // Amount - $amount=new widget('text'); + $amount=new INum(); $amount->size=10; $amount->name='amount'.$i; $amount->value=(isset(${'amount'.$i}))?${"amount".$i}:''; $amount->readonly=$p_readonly; - $amount->javascript=' onChange="checkTotalDirect()"'; + $amount->javascript=' onChange="format_number(this);checkTotalDirect()"'; // D/C - $deb=new widget('checkbox'); + $deb=new ICheckBox(); $deb->name='ck'.$i; $deb->selected=(isset(${'ck'.$i}))?true:false; $deb->readonly=$p_readonly; $deb->javascript=' onChange="checkTotalDirect()"'; $ret.='<tr>'; - $ret.='<td>'.$quick_code->IOValue().'</td>'; - $ret.='<td>'.$poste->IOValue(). - '<script> document.getElementById(\'poste'.$i.'\').onblur=function(){ if (trim(this.value) !=\'\') my_clear(\'qc_'.$i.'\');}</script>'. + $ret.='<td>'.$quick_code->search().$quick_code->input().'</td>'; + $ret.='<td>'.$poste->input(). + '<script> document.getElementById(\'poste'.$i.'\').onblur=function(){ if (trim(this.value) !=\'\') {document.getElementById(\'qc_'.$i.'\').value="";}}</script>'. '</td>'; - $ret.='<td>'.$line_desc->IOValue().'</td>'; - $ret.='<td>'.$amount->IOValue().'</td>'; - $ret.='<td>'.$deb->IOValue().'</td>'; + $ret.='<td>'.$line_desc->input().'</td>'; + $ret.='<td>'.$amount->input().'</td>'; + $ret.='<td>'.$deb->input().'</td>'; $ret.='</tr>'; // If readonly == 1 then show CA - } + } $ret.='</table>'; if ( isset ($this->with_concerned) && $this->with_concerned==true) { $oRapt=new Acc_Reconciliation($this->db); $w=$oRapt->widget(); $w->name='jrn_concerned'; $w->value=(isset($jrn_concerned))?$jrn_concerned:""; - $ret.="Réconciliation/rapprochements : ".$w->IOValue(); + $ret.="Réconciliation/rapprochements : ".$w->input(); } return $ret; } - /*!\brief + /*!\brief * check if the current ledger is closed *\return 1 for yes, otherwise 0 *\see Periode::is_closed @@ -1134,38 +1414,52 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ return $ret; } - /*! + /*! * \brief verify that the operation can be saved * \param $p_array array of data same layout that the $_POST from show_form - * * - * \return the return value are 0 ok,1 incorrect balance, 2 date + * + * \throw the getcode value is 1 incorrect balance, 2 date * invalid, 3 invalid amount, 4 the card is not in the range of * permitted card, 5 not in the user's period, 6 closed period - * + * */ function verify($p_array) { extract ($p_array); $user=new User($this->db); $tot_cred=0;$tot_deb=0; + /* check for a double reload */ + if ( isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1',array($mt)) != 0 ) + throw new Exception ('Double Encodage',5); + // Check the periode and the date - if ( isDate($date) == null ) { - throw new AcException('Date invalide', 2); + if ( isDate($date) == null ) { + throw new Exception('Date invalide', 2); } - list ($l_date_start,$l_date_end)=get_periode($this->db,$user->get_periode()); - - // Date dans la periode active - if ( cmpDate($date,$l_date_start)<0 || - cmpDate($date,$l_date_end)>0 ) - { - throw new AcException('Pas dans la periode active',5); - } - // Periode ferme - if ( $this->is_closed($user->get_periode())==1 ) + $periode=new Periode($this->db); + /* find the periode if we have enabled the check_periode*/ + if ($this->check_periode()==false) { + $periode->find_periode($date); + } else { + $periode->p_id=$user->get_periode(); + list ($l_date_start,$l_date_end)=$periode->get_date_limit(); + // Date dans la periode active + if ( cmpDate($date,$l_date_start)<0 || + cmpDate($date,$l_date_end)>0 ) + { + throw new Exception(_('Pas dans la periode active'),5); + } + + } + + + + // Periode ferme + if ( $this->is_closed($periode->p_id)==1 ) { echo_debug(__FILE__.':'.__LINE__.'- verify',' the periode is closed '); - throw new AcException('Periode fermee',6); + throw new Exception('Periode fermee',6); } /* check if we are using the strict mode */ if( $this->check_strict() == true) { @@ -1173,12 +1467,12 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ operation */ $last_date=$this->get_last_date(); if ( $last_date !=null && cmpDate($date,$last_date) < 0 ) - throw new AcException('Vous utilisez le mode strict la dernière operation est la date du ' - .$last_date.' vous ne pouvez pas encoder à une date antérieure',15); + throw new Exception(_('Vous utilisez le mode strict la dernière operation est la date du ') + .$last_date.' '._('vous ne pouvez pas encoder à une date antérieure'),15); } - for ($i=0;$i<$nb_item;$i++) + for ($i=0;$i<$nb_item;$i++) { $err=0; @@ -1195,10 +1489,10 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $f=new fiche($this->db); $f->quick_code=${'qc_'.$i}; if ( $f->belong_ledger($p_jrn) < 0 ) - throw new AcException("La fiche quick_code = ". + throw new Exception("La fiche quick_code = ". $f->quick_code." n\'est pas dans ce journal",4); if ( strlen(trim(${'qc_'.$i}))!=0 && isNumber(${'amount'.$i} ) == 0 ) - throw new AcException('Montant invalide',3); + throw new Exception('Montant invalide',3); } @@ -1206,11 +1500,11 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ if ( isset (${'poste'.$i}) && strlen (trim(${'poste'.$i})) != 0 ) { $p=new Acc_Account_Ledger($this->db,${'poste'.$i}); if ( $p->belong_ledger ($p_jrn) < 0 ) - throw new AcException("Le poste ".$p->id." n\'est pas dans ce journal",5); + throw new Exception(_("Le poste")." ".$p->id." "._("n'est pas dans ce journal"),5); if ( strlen(trim(${'poste'.$i}))!=0 && isNumber(${'amount'.$i} ) == 0 ) - throw new AcException('Poste invalide',3); + throw new Exception(_('Poste invalide'),3); if ( $p->do_exist() == 0 ) - throw new AcException('Poste Inexistant',4); + throw new Exception(_('Poste Inexistant'),4); } @@ -1218,11 +1512,9 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $tot_deb=round($tot_deb,4); $tot_cred=round($tot_cred,4); if ( $tot_deb != $tot_cred ) { - /* print_r('$tot_deb'.$tot_deb); - print_r('$tot_cred'.$tot_cred); */ - throw new AcException("Balance incorrecte debit = $tot_deb credit=$tot_cred ",1); + throw new Exception(_("Balance incorrecte ")." debit = $tot_deb credit=$tot_cred ",1); } - + } /*! * \brief compute the internal code of the saved operation and set the $this->jr_internal to @@ -1237,7 +1529,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ function compute_internal_code($p_grpt) { if ( $this->id==0) return; - $num = NextSequence($this->db,'s_internal'); + $num = $this->db->get_next_seq('s_internal'); $atype=$this->get_propertie(); $type=$atype['jrn_def_code']; $internal_code=sprintf("%d%s-%s",dossier::id(),$type,$num); @@ -1246,10 +1538,10 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ return $internal_code; } - /*! + /*! * \brief save the operation into the jrnx,jrn, , * CA and pre_def - * \param $p_array + * \param $p_array * * \return array with [0] = false if failed otherwise true, [1] error * code @@ -1258,19 +1550,25 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ extract ($p_array); try { $this->verify($p_array); - - StartSql($this->db) ; - - $seq=NextSequence($this->db,'s_grpt'); + + $this->db->start() ; + + $seq=$this->db->get_next_seq('s_grpt'); $internal=$this->compute_internal_code($seq); - - $group=NextSequence($this->db,"s_oa_group"); + + $group=$this->db->get_next_seq("s_oa_group"); $own=new own($this->db); $tot_amount=0; $tot_deb=0; $tot_cred=0; + $oPeriode=new Periode($this->db); + $check_periode=$this->check_periode(); + if ( $check_periode == false) { + $oPeriode->find_periode($date); + } + $count=0; - for ($i=0;$i<$nb_item;$i++) + for ($i=0;$i<$nb_item;$i++) { if ( ! isset (${'qc_'.$i}) && ! isset(${'poste'.$i})) continue; @@ -1287,6 +1585,8 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $poste=${'poste'.$i}; } $acc_op->date=$date; + // compute the periode is do not check it + if ($check_periode == false ) $acc_op->periode=$oPeriode->p_id; $acc_op->desc=$desc; $acc_op->amount=round(${'amount'.$i},2); $acc_op->grpt=$seq; @@ -1303,9 +1603,9 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ if ( $own->MY_ANALYTIC != "nu" ) { if ( ereg("^[6,7]+",$poste)) { - + // for each item, insert into operation_analytique */ - $op=new Anc_Operation($this->db); + $op=new Anc_Operation($this->db); $op->oa_group=$group; $op->j_id=$j_id; $op->oa_date=$date; @@ -1318,15 +1618,17 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ }// loop for each item $acc_end=new Acc_Operation($this->db); $acc_end->amount=$tot_deb; + if ($check_periode == false ) $acc_end->periode=$oPeriode->p_id; $acc_end->date=$date; $acc_end->desc=$desc; $acc_end->grpt=$seq; $acc_end->jrn=$this->id; + $acc_end->mt=$mt; $jr_id= $acc_end->insert_jrn(); if ($jr_id == false ) - throw new Exception('Balance incorrecte'); + throw new Exception('Balance incorrecte'); $acc_end->pj=$e_pj; - + /* if e_suggest != e_pj then do not increment sequence */ if ( strcmp($e_pj,$e_pj_suggest) == 0 && strlen(trim($e_pj)) !=0) { $this->inc_seq_pj(); @@ -1334,10 +1636,10 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $this->pj=$acc_end->set_pj(); - ExecSql($this->db,"update jrn set jr_internal='".$internal."' where ". + $this->db->exec_sql("update jrn set jr_internal='".$internal."' where ". " jr_grpt_id = ".$seq); - // Save now the predef op + // Save now the predef op //------------------------ if ( isset($save_opd)) { $opd=new Pre_Op_Advanced($this->db); @@ -1352,27 +1654,27 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $orap->insert($jrn_concerned); } - + } - catch (AcException $a) { + catch (Exception $a) { throw $a; - } + } catch (Exception $e) { - Rollback($this->db); + $this->db->rollback(); echo 'OPERATION ANNULEE '; echo '<hr>'; echo __FILE__.__LINE__.$e->getMessage(); exit(); } - Commit($this->db); + $this->db->commit(); return true; } - /*! - * \brief get all the data from request and build the object + /*! + * \brief get all the data from request and build the object */ - function get_request() + function get_request() { $this->id=$_REQUEST['p_jrn']; @@ -1384,15 +1686,13 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ * \param p_type ledger type * * \return the number - * - * \todo this function show be a part of the acc_ledger_type class - * as soon as this class is created + * * */ static function next_number($p_cn,$p_type) { - - $Ret=CountSql($p_cn,"select * from jrn_def where jrn_def_type='".$p_type."'"); + + $Ret=$p_cn->count_sql("select * from jrn_def where jrn_def_type='".$p_type."'"); return $Ret+1; } /*!\brief get the first ledger @@ -1407,41 +1707,41 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ /*!\brief Update the paiment in the list of operation - *\param $p_array is normally $_GET + *\param $p_array is normally $_GET */ function update_paid($p_array) { // reset all the paid flag because the checkbox is post only // when checked - foreach ($p_array as $name=>$paid) + foreach ($p_array as $name=>$paid) { list($ad) = sscanf($name,"set_jr_id%d"); if ( $ad == null ) continue; $sql="update jrn set jr_rapt='' where jr_id=$ad"; - $Res=ExecSql($this->db,$sql); + $Res=$this->db->exec_sql($sql); } // set a paid flag for the checked box - foreach ($p_array as $name=>$paid) + foreach ($p_array as $name=>$paid) { list ($id) = sscanf ($name,"rd_paid%d"); if ( $id == null ) continue; $paid=($paid=='on')?'paid':''; $sql="update jrn set jr_rapt='$paid' where jr_id=$id"; - $Res=ExecSql($this->db,$sql); + $Res=$this->db->exec_sql($sql); } } function update_internal_code($p_internal) { if ( ! isset($this->grpt_id) ) exit( 'ERREUR '.__FILE__.":".__LINE__); - $Res=ExecSql($this->db,"update jrn set jr_internal='".$p_internal."' where ". + $Res=$this->db->exec_sql("update jrn set jr_internal='".$p_internal."' where ". " jr_grpt_id = ".$this->grpt_id); } /*!\brief retrieve all the card for this type of ledger, make them *into a string separated by comma - *\param none + *\param none *\return all the card or null is nothing is found */ function get_all_fiche_def() { @@ -1449,9 +1749,9 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ " from jrn_def where ". " jrn_def_type = $1 "; - $r=ExecSqlParam($this->db,$sql,array($this->type)); + $r=$this->db->exec_sql($sql,array($this->type)); - $res=pg_fetch_all($r); + $res=Database::fetch_all($r); if ( empty($res) ) return null; $card=""; $comma=''; @@ -1472,14 +1772,14 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ /*!\brief get the saldo of an exercice, used for the opening of a folder *\param $p_exercice is the exercice we want *\return an array - * index = + * index = * - solde (debit > 0 ; credit < 0) * - j_poste * - j_qcode */ function get_saldo_exercice($p_exercice) { $sql="select sum(a.montant) as solde, j_poste, j_qcode - from + from (select j_id, case when j_debit='t' then j_montant else j_montant * (-1) end as montant from jrnx) as a @@ -1491,7 +1791,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ and j_poste::text not like '6%' group by j_poste,j_qcode having (sum(a.montant) != 0 )"; - $res=get_array($this->db,$sql,array($p_exercice)); + $res=$this->db->get_array($sql,array($p_exercice)); return $res; } /*! @@ -1504,14 +1804,25 @@ function check_strict() { if ( $own->MY_STRICT=='N') return false; exit("Valeur invalid ".__FILE__.':'.__LINE__); } +/*! + *\brief Check if a Dossier is using the check on the periode, if true than the user has to enter the date + * and the periode, it is a security check + * \return true if we are using the double encoding (date+periode) + */ +function check_periode() { + $own=new Own($this->db); + if ( $own->MY_CHECK_PERIODE=='Y') return true; + if ( $own->MY_CHECK_PERIODE=='N') return false; + exit("Valeur invalid ".__FILE__.':'.__LINE__); +} /*!\brief get the date of the last operation */ function get_last_date() { - if ( $this->id==0) throw AcException (__FILE__.":".__LINE__."Journal incorrect "); + if ( $this->id==0) throw new Exception (__FILE__.":".__LINE__."Journal incorrect "); $sql="select to_char(max(jr_date),'DD.MM.YYYY') from jrn where jr_def_id=$1"; - $date=getDbValue($this->db,$sql,array($this->id)); + $date=$this->db->get_value($sql,array($this->id)); return $date; } /*!\brief retrieve the jr_id thanks the internal code, do not change @@ -1521,12 +1832,12 @@ function get_last_date() */ function get_id($p_internal) { $sql='select jr_id from jrn where jr_internal=$1'; - $value=getDbValue($this->db,$sql,array($p_internal)); + $value=$this->db->get_value($sql,array($p_internal)); if ($value=='') $value=0; return $value; } /*!\brief create the invoice and saved it as attachment to the - *operation, + *operation, *\param $internal is the internal code *\param $p_array is normally the $_POST *\return a string @@ -1542,9 +1853,9 @@ function get_last_date() $doc->MoveDocumentPj($internal); // Update the comment with invoice number $sql="update jrn set jr_comment=' document ".$doc->d_number."' where jr_internal='$internal'"; - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); return '<h2 class="info">'.$str_file.'</h2>'; - + } /*!\brief check if the payment method is valid *\param $e_mp is the value and $e_mp_qcode is the quickcode @@ -1557,23 +1868,338 @@ function get_last_date() $empl=new fiche($this->db); $empl->get_by_qcode($e_mp_qcode); if ( $empl->empty_attribute(ATTR_DEF_ACCOUNT)== true) { - throw new AcException('Celui qui paie n\' a pas de poste comptable',20); + throw new Exception('Celui qui paie n\' a pas de poste comptable',20); } $poste=new Acc_Account_Ledger($this->db,$empl->strAttribut(ATTR_DEF_ACCOUNT)); if ( $poste->load() == false ){ - throw new AcException('Pour la fiche'.$empl->quick_code.' le poste comptable ['.$poste->id.'n\'existe pas',9); + throw new Exception('Pour la fiche'.$empl->quick_code.' le poste comptable ['.$poste->id.'n\'existe pas',9); } } } - /*! + + + /*!\brief increment the sequence for the pj */ + function inc_seq_pj() { + $sql="select nextval('s_jrn_pj".$this->id."')"; + $this->db->exec_sql($sql); + } + /*!\brief return a HTML string with the form for the search + *\param $p_type if the type of ledger possible values=ALL,VEN,ACH,ODS,FIN + *\param $all_type_ledger + * values : + * - 1 means all the ledger of this type + * - 0 No have the "Tous les journaux" availables + *\return a HTML String without the tag FORM or DIV + *\see build_search_sql + *\see display_search_form + *\see list_operation + */ + function search_form($p_type,$all_type_ledger=1) { + $user=new User($this->db); + $r=''; + /* security : filter ledger on user */ + $filter_ledger=$user->get_ledger_sql($p_type,3); + + $f_ledger=new ISelect('p_jrn'); + $aLedger=$this->db->make_array('select jrn_def_id,jrn_def_name from jrn_def where '.$filter_ledger); + if ( $all_type_ledger==1) + $aLedger[]=array('value'=>-1,'label'=>'Tous les journaux'); + + /* if not p_jrn then all */ + if( ! isset($_REQUEST['p_jrn'])) { + /* By default all ledger of this type */ + $this->id=-1; + } else { + $this->id=$_REQUEST['p_jrn']; + } + $f_ledger->selected=$this->id; + $f_ledger->value=$aLedger; + + /* widget for date_start */ + $f_date_start=new IDate('date_start'); + /* all periode or only the selected one */ + if ( isset($_REQUEST['date_start'])) { + $f_date_start->value=$_REQUEST['date_start']; + } else { + $period=$user->get_periode(); + $per=new Periode($this->db,$period); + list($date_start,$date_end)=$per->get_date_limit(); + $f_date_start->value=$date_start; + } + + /* widget for date_end */ + $f_date_end=new IDate('date_end'); + /* all date or only the selected one */ + if ( isset($_REQUEST['date_end'])) { + $f_date_end->value=$_REQUEST['date_end']; + } else { + $f_date_end->value=$date_end; + } + + /* widget for desc */ + $f_descript=new IText('desc'); + $f_descript->size=40; + if ( isset($_REQUEST['desc'])) { + $f_descript->value=$_REQUEST['desc']; + } + + /* widget for amount */ + $f_amount_min=new INum('amount_min'); + $f_amount_min->value=(isset($_REQUEST['amount_min']))?$_REQUEST['amount_min']:0; + $f_amount_max=new INum('amount_max'); + $f_amount_max->value=(isset($_REQUEST['amount_max']))?$_REQUEST['amount_max']:0; + + /* input quick code */ + $f_qcode=new ICard('qcode'); + $f_qcode->extra='filter'; + $f_qcode->set_attribute('typecard','all'); + $f_qcode->set_callback('filter_card'); + $f_txt_qcode=new IText('qcode'); + $f_txt_qcode->value=(isset($_REQUEST['qcode']))?$_REQUEST['qcode']:''; + + /* input poste comptable */ + $f_accounting=new IPoste('accounting'); + $f_accounting->value=(isset($_REQUEST['accounting']))?$_REQUEST['accounting']:''; + if ( $this->id=-1) $jrn=0;else $jrn=$this->id; + $f_accounting->set_attribute('jrn',$jrn); + $f_accounting->set_attribute('ipopup','ipop_account'); + $f_accounting->set_attribute('label','ld'); + $f_accounting->set_attribute('account','accounting'); + $info=HtmlInput::infobulle(13); + + $f_paid=new ICheckbox('unpaid'); + $f_paid->selected=(isset($_REQUEST['unpaid']))?true:false; + + $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); + $r.=dossier::hidden(); + $r.=HtmlInput::hidden('ledger_type',$this->type); + ob_start(); + require_once('template/ledger_search.php'); + $r.=ob_get_contents(); + ob_clean(); + return $r; + + } + /*!\brief this function will create a sql stmt to use to create the list for + * the ledger, + *\param $p_array is usually the $_GET, + *\param $p_order the order of the row + *\param $p_where is the sql condition if not null then the $p_array will not be used + *\note the p_action will be used to filter the ledger but gl means ALL + * struct array $p_array +\verbatim +( + [phpsessid] => 016710a766b3c7b137ce6ee5bfbacc00 + [gDossier] => 13 + [p_jrn] => -1 + [date_start] => + [date_end] => + [amount_min] => 0 + [amount_max] => 0 + [desc] => + [search] => Rechercher + [p_action] => ven + [sa] => l + [PHPSESSID] => 016710a766b3c7b137ce6ee5bfbacc00 +) +\endverbatim + *\return an array with a valid sql statement, an the where clause => array[sql] array[where] + *\see list_operation + *\see display_search_form + *\see search_form + */ + public function build_search_sql($p_array,$p_order="",$p_where="") { + $sql="select jr_id , + jr_montant, + substr(jr_comment,1,60) as jr_comment, + to_char(jr_ech,'DD.MM.YYYY') as jr_ech, + to_char(jr_date,'DD.MM.YYYY') as jr_date, + jr_date as jr_date_order, + jr_grpt_id, + jr_rapt, + jr_internal, + jrn_def_id, + jrn_def_name, + jrn_def_ech, + jrn_def_type, + jr_valid, + jr_tech_per, + jr_pj_name, + p_closed, + jr_pj_number + from + jrn + join jrn_def on jrn_def_id=jr_def_id + join parm_periode on p_id=jr_tech_per"; + + if ( $p_array != null ) + extract($p_array); + + /* if no variable are set then give them a default + * value */ + if ( $p_array == null || empty($p_array) || ! isset($amount_min) ) { + $amount_min=0; + $amount_max=0; + + if ( ! isset ($date_start)) { + $user=new User($this->db); + $period=$user->get_periode(); + $per=new Periode($this->db); + list($date_start,$date_end)=$per->get_date_limit(); + } + $desc=''; + $p_jrn=(isset($p_jrn))?$p_jrn:-1; + $qcode=(isset($qcode))?$qcode:""; + $accounting=(isset($accounting))?$accounting:""; + + } + + /* if p_jrn : 0 if means all ledgers, if -1 means all ledger of this + * type otherwise only one ledger*/ + $fil_ledger=''; + $fil_amount=''; + $fil_date=''; + $fil_desc=''; + $fil_sec=''; + $fil_qcode=''; + $fil_account=''; + $fil_paid=''; + + $and=''; + if ( $p_jrn == -1 ) { + $user=new User($this->db); + /* Specific action allow to see all the ledgers in once */ + if ( $p_action == 'gl') $p_action='ALL'; + /* actions from commercial.php */ + if ( $p_action == 'client') $p_action='ALL'; + if ( $p_action == 'fournisseur') $p_action='ALL'; + if ( $p_action == 'adm') $p_action='ALL'; + + + $fil_ledger=$user->get_ledger_sql($p_action,2); + $and=' and '; + } else if ( $p_jrn != 0 ){ + $fil_ledger = ' jrn_def_id = '.$p_jrn; + $and=' and '; + } + + /* format the number */ + $amount_min=toNumber($amount_min); + $amount_max=toNumber($amount_max); + if ( $amount_min > 0 && isNumber($amount_min) ) { + $fil_amount=$and.' jr_montant >=' .$amount_min; $and=' and '; + } + if ( $amount_max > 0 && isNumber($amount_max) ) { + $fil_amount.=$and.' jr_montant <=' .$amount_max; $and=' and '; + } + /* -------------------------------------------------------------------------- * + * if both amount are the same then we need to search into the detail + * and we reset the fil_amount + * -------------------------------------------------------------------------- */ + if ( isNumber($amount_min) && + isNumber($amount_max) && + $amount_min > 0 && + bccomp($amount_min, $amount_max,2)==0 ) + { + $fil_amount= $and. 'jr_grpt_id in ( select distinct j_grpt from jrnx where j_montant = '.$amount_min.')'; + $and=" and "; + } + // date + if ( isDate($date_start) != null ) + { + $fil_date=$and." jr_date >= to_date('".$date_start."','DD.MM.YYYY')"; + $and=" and "; + } + if ( isDate($date_end) != null ) { + $fil_date.=$and." jr_date <= to_date('".$date_end."','DD.MM.YYYY')"; + $and=" and "; + } + // comment + $desc=FormatString($desc); + if ( $desc != null ) + { + $fil_desc=$and." ( upper(jr_comment) like upper('%".$desc."%') or upper(jr_pj_number) like upper('%".$desc."%') ". + " or upper(jr_internal) like upper('%".$desc."%') )"; + $and=" and "; + } + // Poste + if ( $accounting != null ) { + $fil_account=$and." jr_grpt_id in (select j_grpt + from jrnx where j_poste::text like '$accounting%' ) "; + $and=" and "; + } + // Quick Code + if ( $qcode != null ) + { + $fil_qcode=$and." jr_grpt_id in ( select j_grpt from + jrnx where trim(j_qcode) = upper(trim('$qcode')))"; + $and=" and "; + } + + // Only the unpaid + if ( isset($unpaid) ) { + $fil_paid=$and.SQL_LIST_UNPAID_INVOICE; + $and =" and "; + } + + $User=new User(new Database()); + $User->Check(); + $User->check_dossier(dossier::id()); + + if ( $User->admin == 0 && $User->is_local_admin()==0 ) + { + $fil_sec=$and." jr_def_id in ( select uj_jrn_id ". + " from user_sec_jrn where ". + " uj_login='".$_SESSION['g_user']."'". + " and uj_priv in ('R','W'))"; + } + $where=$fil_ledger.$fil_amount.$fil_date.$fil_desc.$fil_sec.$fil_amount.$fil_qcode.$fil_paid.$fil_account; + $sql.=" where ".$where; + return array($sql,$where); + } + /*!\brief return a html string with the search_form + *\return a HTML string with the FORM + *\see build_search_sql + *\see search_form + *\see list_operation + */ + function display_search_form() { + $r=''; + $type=$this->type; + + if ( $type=="" || $this->id==0) $type='ALL'; + if ( isset($_GET['amount_min']) ) { $display='block';} else {$display='none';} + $r.='<div id="search_form" style="display:'.$display.'">'; + $r.='<FORM METHOD="GET">'; + $r.=$this->search_form($type); + $r.=HtmlInput::submit('search',_('Rechercher')); + $r.=HtmlInput::hidden('p_action',$_REQUEST['p_action']); + + /* when called from commercial.php some hidden values are needed */ + if (isset($_REQUEST['sa'])) $r.= HtmlInput::hidden("sa",$_REQUEST['sa']); + if (isset($_REQUEST['sb'])) $r.= HtmlInput::hidden("sb",$_REQUEST['sb']); + if (isset($_REQUEST['sc'])) $r.= HtmlInput::hidden("sc",$_REQUEST['sc']); + if (isset($_REQUEST['f_id'])) $r.=HtmlInput::hidden("f_id",$_REQUEST['f_id']); + + $r.='</FORM>'; + $button=new IButton('tfs'); + $button->label=_("Afficher recherche"); + $button->javascript="toggleHideShow('search_form','tfs');"; + $r.='</div>'; + $r.=$button->input(); + + return $r; + } + /*! * \brief this function is intended to test this class */ - static function test_me() + static function test_me($pCase='') { + if ( $pCase=='') { echo Acc_Reconciliation::$javascript; html_page_start(); - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $_SESSION['g_user']='phpcompta'; $_SESSION['g_pass']='phpcompta'; @@ -1582,17 +2208,17 @@ function get_last_date() $a->with_concerned=true; // Vide echo '<FORM method="post">'; - echo $a->select_ledger()->IOValue(); - echo widget::submit('go','Test it'); + echo $a->select_ledger()->input(); + echo HtmlInput::submit('go','Test it'); echo '</form>'; if ( isset($_POST['go'])) { echo "Ok "; echo '<form method="post">'; echo $a->show_form(); - echo widget::submit('post_id','Try me'); + echo HtmlInput::submit('post_id','Try me'); echo '</form>'; // Show the predef operation - // Don't forget the p_jrn + // Don't forget the p_jrn echo '<form>'; echo dossier::hidden(); echo '<input type="hidden" value="'.$id.'" name="p_jrn">'; @@ -1600,20 +2226,19 @@ function get_last_date() $op->p_jrn=$id; $op->od_direct='t'; if ($op->count() != 0 ) { - print_r("Count != 0"); - echo widget::submit('use_opd','Utilisez une op.prédéfinie'); + echo HtmlInput::submit('use_opd','Utilisez une op.prédéfinie'); echo $op->show_button(); } echo '</form>'; exit(); } - + if ( isset($_POST['post_id' ])) { echo '<form method="post">'; echo $a->show_form($_POST,1); - echo widget::button('add','Ajout d\'une ligne','onClick="quick_writing_add_row()"'); - echo widget::submit('save_it',"Sauver"); + echo HtmlInput::button('add','Ajout d\'une ligne','onClick="quick_writing_add_row()"'); + echo HtmlInput::submit('save_it',"Sauver"); echo '</form>'; exit(); } @@ -1623,14 +2248,14 @@ function get_last_date() $array['save_opd']=1; try { $a->save($array); - } catch (AcException $e) { - echo '<script>alert (\''.$e->getMessage()."'); </script>"; + } catch (Exception $e) { + alert($e->getMessage()); echo '<form method="post">'; echo $a->show_form($_POST); - echo widget::submit('post_id','Try me'); + echo HtmlInput::submit('post_id','Try me'); echo '</form>'; - + } exit(); } @@ -1646,17 +2271,48 @@ function get_last_date() echo '<FORM method="post">'; echo $a->show_form($p_post); - echo widget::submit('post_id','Use predefined operation'); + echo HtmlInput::submit('post_id','Use predefined operation'); echo '</form>'; exit(); } - + }// if case = '' + if ( $pCase == 'search') { + html_page_start(); + $cn=new Database(dossier::id()); + $ledger=new Acc_Ledger($cn,0); + $_SESSION['g_user']='phpcompta'; + $_SESSION['g_pass']='phpcompta'; + echo $ledger->search_form('ALL'); + } } - - /*!\brief increment the sequence for the pj */ - function inc_seq_pj() { - $sql="select nextval('s_jrn_pj".$this->id."')"; - ExecSql($this->db,$sql); + /*!\brief return the last p_limit operation into an array + *\param $p_limit is the max of operation to return + *\return $p_array of Action object + */ + function get_last($p_limit) { + $user=new User($this->db); + $filter_ledger=$user->get_ledger_sql('ALL',3); + $filter_ledger=str_replace('jrn_def_id','jr_def_id',$filter_ledger); + $sql="select jr_date,to_char(jr_date,'DD.MM.YYYY') as jr_date_fmt,jr_montant, jr_comment,jr_internal from jrn ". + " where $filter_ledger ". + " order by jr_date desc limit $p_limit"; + $array=$this->db->get_array($sql); + return $array; + } + /** + *@brief retreive the jr_grpt_id from a ledger + *@param $p_what the column to seek + * possible values are + * - internal + *@param $p_value the value of the col. + */ + function search_group($p_what,$p_value) { + switch($p_what) { + case 'internal': + return $this->db->get_value('select jr_grpt_id from jrn where jr_internal=$1', + array($p_value)); + + } } } diff --git a/include/class_acc_ledger_fin.php b/include/class_acc_ledger_fin.php index 6465ea481..8064a9b76 100644 --- a/include/class_acc_ledger_fin.php +++ b/include/class_acc_ledger_fin.php @@ -24,49 +24,67 @@ * \brief the class Acc_Ledger_Fin inherits from Acc_Ledger, this * object permit to manage the financial ledger */ +require_once("class_idate.php"); +require_once("class_icard.php"); +require_once("class_ispan.php"); +require_once("class_itext.php"); +require_once("class_iconcerned.php"); +require_once("class_ifile.php"); +require_once("class_ihidden.php"); +require_once("class_iselect.php"); require_once('class_acc_ledger.php'); -require_once('poste.php'); require_once('ac_common.php'); require_once('class_acc_reconciliation.php'); class Acc_Ledger_Fin extends Acc_Ledger { + function __construct ($p_cn,$p_init) { + parent::__construct($p_cn,$p_init); + $this->type='FIN'; + } + /*!\brief verify that the data are correct before inserting or confirming *\param an array (usually $_POST) *\return String - *\note return an AcException if an error occurs + *\throw Exception on error occurs */ public function verify($p_array) { extract ($p_array); + /* check for a double reload */ + if ( isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1',array($mt)) != 0 ) + throw new Exception (_('Double Encodage'),5); + /* check if there is a customer */ if ( strlen(trim($e_bank_account)) == 0 ) - throw new AcException('Vous n\'avez pas donné de banque',11); + throw new Exception(_('Vous n\'avez pas donné de banque'),11); /* check if the date is valid */ if ( isDate($e_date) == null ) { - throw new AcException('Date invalide', 2); + throw new Exception('Date invalide', 2); } - + $oPeriode=new Periode($this->db); + if ($this->check_periode()==false) { + $periode=$oPeriode->find_periode($e_date); + } else { + $oPeriode->p_id=$periode; + list ($min,$max)=$oPeriode->get_date_limit(); + if ( cmpDate($e_date,$min) < 0 || + cmpDate($e_date,$max) > 0) + throw new Exception(_('Date et periode ne correspondent pas'),6); + } + /* check if the periode is closed */ if ( $this->is_closed($periode)==1 ) { - throw new AcException('Periode fermee',6); + throw new Exception(_('Periode fermee'),6); } - - /* check that the datum is in the choosen periode */ - $per=new Periode($this->db); - list ($min,$max)=$per->get_date_limit($periode); - if ( cmpDate($e_date,$min) < 0 || - cmpDate($e_date,$max) > 0) - throw new AcException('Date et periode ne correspondent pas',6); - /* check if we are using the strict mode */ if( $this->check_strict() == true) { /* if we use the strict mode, we get the date of the last operation */ $last_date=$this->get_last_date(); if ( $last_date != null && cmpDate($e_date,$last_date) < 0 ) - throw new AcException('Vous utilisez le mode strict la dernière operation est à la date du ' - .$last_date.' vous ne pouvez pas encoder à une date antérieure',15); + throw new Exception(_('Vous utilisez le mode strict la dernière operation est à la date du ') + .$last_date._(' vous ne pouvez pas encoder à une date antérieure'),15); } @@ -75,19 +93,19 @@ class Acc_Ledger_Fin extends Acc_Ledger { $fiche=new fiche($this->db); $fiche->get_by_qcode($e_bank_account); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) - throw new AcException('La fiche '.$e_bank_account.'n\'a pas de poste comptable',8); + throw new Exception('La fiche '.$e_bank_account.'n\'a pas de poste comptable',8); /* The account exists */ $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); if ( $poste->load() == false ){ - throw new AcException('Pour la fiche '.$e_bank_account.' le poste comptable ['.$poste->id.'] n\'existe pas',9); + throw new Exception('Pour la fiche '.$e_bank_account.' le poste comptable ['.$poste->id.'] n\'existe pas',9); } /* Check if the card belong to the ledger */ $fiche=new fiche ($this->db); $fiche->get_by_qcode($e_bank_account); if ( $fiche->belong_ledger($p_jrn,'deb') !=1 ) - throw new AcException('La fiche '.$e_bank_account.'n\'est pas accessible à ce journal',10); + throw new Exception('La fiche '.$e_bank_account.'n\'est pas accessible à ce journal',10); $nb=0; $tot_amount=0; @@ -98,7 +116,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { if ( strlen(trim(${'e_other'.$i}))== 0) continue; /* check if amount are numeric and */ if ( isNumber(${'e_other'.$i.'_amount'}) == 0 ) - throw new AcException('La fiche '.${'e_other'.$i}.'a un montant invalide ['.${'e_other'.$i}.']',6); + throw new Exception('La fiche '.${'e_other'.$i}.'a un montant invalide ['.${'e_other'.$i}.']',6); /* compute the total */ $tot_amount+=round(${'e_other'.$i.'_amount'},2); @@ -107,21 +125,21 @@ class Acc_Ledger_Fin extends Acc_Ledger { $fiche=new fiche($this->db); $fiche->get_by_qcode(${'e_other'.$i}); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) - throw new AcException('La fiche '.${'e_other'.$i}.'n\'a pas de poste comptable',8); + throw new Exception('La fiche '.${'e_other'.$i}.'n\'a pas de poste comptable',8); /* The account exists */ $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); if ( $poste->load() == false ){ - throw new AcException('Pour la fiche '.${'e_other'.$i}.' le poste comptable ['.$poste->id.'n\'existe pas',9); + throw new Exception('Pour la fiche '.${'e_other'.$i}.' le poste comptable ['.$poste->id.'n\'existe pas',9); } /* Check if the card belong to the ledger */ $fiche=new fiche ($this->db); $fiche->get_by_qcode(${'e_other'.$i}); if ( $fiche->belong_ledger($p_jrn,'cred') !=1 ) - throw new AcException('La fiche '.${'e_other'.$i}.'n\'est pas accessible à ce journal',10); + throw new Exception('La fiche '.${'e_other'.$i}.'n\'est pas accessible à ce journal',10); $nb++; } if ( $nb == 0 ) - throw new AcException('Il n\'y a aucune opération',12); + throw new Exception('Il n\'y a aucune opération',12); /* Check if the last_saldo and first_saldo are correct */ if ( strlen(trim($last_sold)) != 0 && isNumber($last_sold) && @@ -132,7 +150,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { $diff=round($diff,2)-round($tot_amount,2); if ( $first_sold != 0 && $last_sold !=0) { if ( $diff != 0 ) - throw new AcException('Le montant de l\'extrait est incorrect'. + throw new Exception('Le montant de l\'extrait est incorrect'. $tot_amount.' extrait '.$diff,13); } } @@ -145,12 +163,18 @@ class Acc_Ledger_Fin extends Acc_Ledger { *\return string with html code *\note the form tag are not set here */ - function display_form($p_array=null) { + function input($p_array=null) { if ( $p_array != null) extract ($p_array); $pview_only=false; $user = new User($this->db); - + $f_add_button=new IButton('add_card'); + $f_add_button->label=_('Créer une nouvelle fiche'); + $f_add_button->set_attribute('ipopup','ipop_newcard'); + $f_add_button->set_attribute('filter',$this->get_all_fiche_def ()); + $f_add_button->javascript=" select_card_type(this);"; + $str_add_button=$f_add_button->input(); + // The first day of the periode $pPeriode=new Periode($this->db); list ($l_date_start,$l_date_end)=$pPeriode->get_date_limit($user->get_periode()); @@ -160,45 +184,44 @@ class Acc_Ledger_Fin extends Acc_Ledger { $r=""; - $r.=JS_INFOBULLE; - $r.=JS_SEARCH_CARD; - $r.=JS_AJAX_FICHE; - $r.=JS_CONCERNED_OP; - $r.=dossier::hidden(); - $r.=widget::hidden('phpsessid',$_REQUEST['PHPSESSID']); - - - //$r.=widget::hidden('p_jrn',$this->id); - $r.='<fieldset><legend>Banque, caisse </legend>'; - $r.='<TABLE width="100%">'; + $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); + $f_legend='Banque, caisse'; // Date //-- - $Date=new widget("js_date"); - $Date->SetReadOnly($pview_only); - $Date->table=1; - $Date->tabindex=1; - $r.="<tr>"; - $r.=$Date->IOValue("e_date",$op_date,"Date"); - // Periode - //-- - $l_user_per=(isset($periode))?$periode:$user->get_periode(); - $l_form_per=FormPeriode($this->db,$l_user_per,OPEN); + $Date=new IDate("e_date",$op_date); + $Date->setReadOnly($pview_only); + $f_date=$Date->input(); + $f_period=''; + if ($this->check_periode() == true) { + // Periode + //-- + $l_user_per=(isset($periode))?$periode:$user->get_periode(); + $period=new IPeriod(); + $period->cn=$this->db; + $period->type=OPEN; + $period->value=$l_user_per; + $period->user=$user; + $period->name='periode'; + try { + $l_form_per=$period->input(); + } catch (Exception $e) { + if ($e->getCode() == 1 ) { + echo "Aucune période ouverte"; + exit(); + } + } + $label=HtmlInput::infobulle(3); + $f_period="Période comptable $label".$l_form_per; + } - $r.="<td class=\"input_text\">"; - $label=widget::infobulle(3); - $r.="Période comptable $label</td><td>".$l_form_per; - $r.="</td>"; - $r.="</tr>"; // Ledger (p_jrn) //-- - $wLedger=$this->select_ledger('FIN',2); + $wLedger=$this->select_ledger('FIN',3); if ($wLedger == null) exit ('Pas de journal disponible'); - $wLedger->table=1; - $wLedger->label=" Journal ".widget::infobulle(2) ; - $r.='<tr>'; - $r.=$wLedger->IOValue(); - $r.='</tr>'; + + $label=" Journal ".HtmlInput::infobulle(2) ; + $f_jrn=$label.$wLedger->input(); //retrieve bank name $e_bank_account=( isset ($e_bank_account) )?$e_bank_account:""; @@ -214,82 +237,53 @@ class Acc_Ledger_Fin extends Acc_Ledger { $fBank->strAttribut(ATTR_DEF_CITY).' '; } + $f_bank=$e_bank_account.$e_bank_account_label; - $W1=new widget("js_search_only"); - $W1->readonly=$pview_only; - $W1->label="Banque ".widget::infobulle(0); - $W1->name="e_bank_account"; - $W1->value=$e_bank_account; - $W1->extra='deb'; // credits - $W1->extra2="Recherche"; - $W1->table=0; - $W1->javascript= sprintf('onBlur="ajaxFid(\'%s\',\'%s\',\'%s\',\'%s\',\'%s\');ajax_saldo(\'%s\',\'%s\')"', - $W1->name, - $W1->extra, //deb or cred - $_REQUEST['PHPSESSID'], - 'js_search_only', - 'none', - $_REQUEST['PHPSESSID'], - $W1->name - ); - $r.="<TR><td colspan=\"4\">".$W1->IOValue(); - $Span=new widget ("span"); - $Span->SetReadOnly($pview_only); - $r.=$Span->IOValue("e_bank_account_label",$e_bank_account_label)."</TD>"; + $ibank=new ICard(); + $ibank->readonly=$pview_only; + $ibank->label="Banque ".HtmlInput::infobulle(0); + $ibank->name="e_bank_account"; + $ibank->value=$e_bank_account; + $ibank->extra='deb'; // credits + $ibank->typecard='deb'; + $ibank->set_dblclick("fill_ipopcard(this);"); + $ibank->set_attribute('ipopup','ipopcard'); - $r.="</TABLE>"; - - $r.='</fieldset>'; + // name of the field to update with the name of the card + $ibank->set_attribute('label','e_bank_account'); + // Add the callback function to filter the card on the jrn + $ibank->set_callback('filter_card'); + $ibank->set_function('fill_fin_data'); + $ibank->javascript=sprintf(' onchange="fill_fin_data_onchange(\'%s\');" ', + $ibank->name); - - - - $r.='<fieldset><legend>Opérations financières</legend>'; + $f_legend_detail='Opérations financières'; //-------------------------------------------------- // Saldo begin end //------------------------------------------------- - $r.='<fieldset><legend>Extrait de compte</legend>'; - $r.='<table>'; - $r.='<tr>'; // Extrait //-- - $wExt=new widget('TEXT'); - $label=widget::infobulle(5); + $wExt=new IText("ext_no",$ext_no); + $label=HtmlInput::infobulle(5); $wExt->label='Numéro d\'extrait '.$label; - $wExt->table=1; - $r.=$wExt->IOValue("ext_no",$ext_no); - $label=widget::infobulle(7); - $r.='<td class="input_text">Solde début extrait'.$label.' </td>'; - $wFirst=new widget('text'); - $wFist->table=0; - $first_sold=(isset($first_sold))?$first_sold:""; + $f_extrait=$wExt->input(); + $label=HtmlInput::infobulle(7); + + $first_sold=(isset($first_sold))?$first_sold:""; + $wFirst=new INum('first_sold',$first_sold); - /* $wFirst->javascript=sprintf(' onfocus="ajax_saldo(\'%s\',\'%s\');"', - $_REQUEST['PHPSESSID'], - $W1->name); - */ - $r.='<td>'.$wFirst->IOValue('first_sold',$first_sold).'</td>'; - $wLast=new widget('text'); - $wLast->table=1; $last_sold= isset($last_sold)?$last_sold:""; - $r.='<td class="input_text">Solde fin extrait'.$label.' </td>'; - $r.='<td>'.$wLast->IOValue('last_sold',$last_sold).'</td>'; - $r.='</table>'; - $r.='</fieldset>'; + $wLast=new INum('last_sold',$last_sold); + + $max=(isset($nb_item))?$nb_item:MAX_ARTICLE; - $r.= widget::hidden('nb_item',$max); + $r.= HtmlInput::hidden('nb_item',$max); //-------------------------------------------------- // financial operation //------------------------------------------------- - $r.='<TABLE id="fin_item">'; - $r.="<TR>"; - $r.="<th colspan=\"2\">code".widget::infobulle(0)."</TH>"; - $r.="<th>Commentaire</TH>"; - $r.="<th>Montant</TH>"; - $r.='<th colspan="2"> Op. Concernée(s)</th>'; - $r.="</TR>"; + $array=array(); // Parse each " tiers" for ($i=0; $i < $max; $i++) { $tiers=(isset(${"e_other".$i}))?${"e_other".$i}:""; @@ -308,44 +302,57 @@ class Acc_Ledger_Fin extends Acc_Ledger { } ${"e_other$i"."_amount"}=(isset (${"e_other$i"."_amount"}))?${"e_other$i"."_amount"}:0; - $W1=new widget("js_search_only"); + $W1=new ICard(); $W1->label=""; $W1->name="e_other".$i; $W1->value=$tiers; $W1->extra='cred'; // credits - $W1->extra2='Recherche'; + $W1->typecard='cred'; + $W1->set_dblclick("fill_ipopcard(this);"); + $W1->set_attribute('ipopup','ipopcard'); + + // name of the field to update with the name of the card + $W1->set_attribute('label','e_other'.$i.'_comment'); + // name of the field to update with the name of the card + $W1->set_attribute('typecard','filter'); + // Add the callback function to filter the card on the jrn + $W1->set_callback('filter_card'); + $W1->set_function('fill_data'); + $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', + $W1->name); $W1->readonly=$pview_only; - $r.="<TR><td>".$W1->IOValue()."</TD>"; + $array[$i]['qcode']=$W1->input(); + $array[$i]['search']=$W1->search(); + // label - $other=new widget("span"); - $r.='<TD style="width:25%;border-bottom:1px dotted grey;">'; - $r.=$other->IOValue("e_other$i"."_label", $tiers_label); + $other=new ISpan("e_other$i"."_label", $tiers_label); + $array[$i]['span']=$other->input(); // Comment - $wComment=new widget("text"); - $wComment->table=1; + $wComment=new IText("e_other$i"."_comment",$tiers_comment); + $wComment->size=35; - $wComment->SetReadOnly($pview_only); - $r.=$wComment->IOValue("e_other$i"."_comment",$tiers_comment); + $wComment->setReadOnly($pview_only); + $array[$i]['comment']=$wComment->input(); // amount - $wAmount=new widget("text"); - $wAmount->table=1; + $wAmount=new INum("e_other$i"."_amount",$tiers_amount); + $wAmount->size=7; - $wAmount->SetReadOnly($pview_only); - $r.=$wAmount->IOValue("e_other$i"."_amount",$tiers_amount); + $wAmount->setReadOnly($pview_only); + $array[$i]['amount']=$wAmount->input(); // concerned ${"e_concerned".$i}=(isset(${"e_concerned".$i}))?${"e_concerned".$i}:""; - $wConcerned=new widget("js_concerned"); - $wConcerned->SetReadOnly($pview_only); + $wConcerned=new IConcerned("e_concerned".$i,${"e_concerned".$i}); + $wConcerned->setReadOnly($pview_only); $wConcerned->extra=0; - $wConcerned->table=1; + $wConcerned->extra2='paid'; - $r.=$wConcerned->IOValue("e_concerned".$i,${"e_concerned".$i}); - $r.='</TR>'; + $array[$i]['concerned']=$wConcerned->input(); } - $r.="</TABLE>"; - - $r.='</fieldset>'; + ob_start(); + require_once('template/form_ledger_fin.php'); + $r.=ob_get_contents(); + ob_clean(); return $r; @@ -361,9 +368,14 @@ class Acc_Ledger_Fin extends Acc_Ledger { $r=""; bcscale(2); extract ($p_array); - $pPeriode=new Periode($this->db); - $pPeriode->id=$periode; - list ($l_date_start,$l_date_end)=$pPeriode->get_date_limit($periode); + $pPeriode=new Periode($this->db); + if ($this->check_periode() == true) { + $pPeriode->p_id=$periode; + } else { + $pPeriode->find_periode($e_date); + } + + list ($l_date_start,$l_date_end)=$pPeriode->get_date_limit(); $exercice=$pPeriode->get_exercice(); $r.=''; $r.='<fieldset><legend>Banque, caisse </legend>'; @@ -400,10 +412,10 @@ class Acc_Ledger_Fin extends Acc_Ledger { $fBank->strAttribut(ATTR_DEF_CP).' '. $fBank->strAttribut(ATTR_DEF_CITY).' '; - $filter_year=" and j_tech_per in (select p_id from parm_periode where p_exercice='".$exercice."')"; + $filter_year=" j_tech_per in (select p_id from parm_periode where p_exercice='".$exercice."')"; - - $solde=get_solde($this->db,$fBank->strAttribut(ATTR_DEF_ACCOUNT),$filter_year); + $acc_account=new Acc_Account_Ledger($this->db,$fBank->strAttribut(ATTR_DEF_ACCOUNT)); + $solde=$acc_account->get_solde($filter_year); $new_solde=$solde; $r.="<TR><td colspan=\"4\"> Banque "; @@ -462,7 +474,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { $r.="<TR><td>".${'e_other'.$i}."</TD>"; // label - $other=new widget("span"); + $other=new ISpan(); $r.='<TD style="width:25%;border-bottom:1px dotted grey;">'; $r.=$fTiers->strAttribut(ATTR_DEF_NAME); $r.='</td>'; @@ -483,33 +495,36 @@ class Acc_Ledger_Fin extends Acc_Ledger { $new_solde+=$tot_amount; $r.='<br>Nouveau solde = '.$new_solde; // check for upload piece - $file=new widget("file"); - $file->table=0; + $file=new IFile(); + $r.="<br>Ajoutez une pièce justificative "; - $r.=$file->IOValue("pj",""); + $r.=$file->input("pj",""); $r.='</fieldset>'; //-------------------------------------------------- // Hidden variables //-------------------------------------------------- $r.=dossier::hidden(); - $r.=widget::hidden('phpsessid',$_REQUEST['PHPSESSID']); - $r.=widget::hidden('p_jrn',$this->id); - $r.=widget::hidden('nb_item',$nb_item); - $r.=widget::hidden('last_sold',$last_sold); - $r.=widget::hidden('first_sold',$first_sold); - $r.=widget::hidden('e_bank_account',$e_bank_account); - $r.=widget::hidden('ext_no',$ext_no); - $r.=widget::hidden('e_date',$e_date); - $r.=widget::hidden('periode',$periode); + $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); + $r.=HtmlInput::hidden('p_jrn',$this->id); + $r.=HtmlInput::hidden('nb_item',$nb_item); + $r.=HtmlInput::hidden('last_sold',$last_sold); + $r.=HtmlInput::hidden('first_sold',$first_sold); + $r.=HtmlInput::hidden('e_bank_account',$e_bank_account); + $r.=HtmlInput::hidden('ext_no',$ext_no); + $r.=HtmlInput::hidden('e_date',$e_date); + $mt=microtime(true); + $r.=HtmlInput::hidden('mt',$mt); + + if (isset($periode)) $r.=HtmlInput::hidden('periode',$periode); $r.=dossier::hidden(); - $r.=widget::hidden('sa','n'); + $r.=HtmlInput::hidden('sa','n'); for ($i=0; $i < $nb_item; $i++) { $tiers=(isset(${"e_other".$i}))?${"e_other".$i}:""; - $r.=widget::hidden('e_other'.$i,$tiers); - $r.=widget::hidden('e_other'.$i.'_comment',${'e_other'.$i.'_comment'}); - $r.=widget::hidden('e_other'.$i.'_amount',${'e_other'.$i.'_amount'}); - $r.=widget::hidden('e_concerned'.$i,${'e_concerned'.$i}); + $r.=HtmlInput::hidden('e_other'.$i,$tiers); + $r.=HtmlInput::hidden('e_other'.$i.'_comment',${'e_other'.$i.'_comment'}); + $r.=HtmlInput::hidden('e_other'.$i.'_amount',${'e_other'.$i.'_amount'}); + $r.=HtmlInput::hidden('e_concerned'.$i,${'e_concerned'.$i}); } return $r; @@ -530,16 +545,21 @@ class Acc_Ledger_Fin extends Acc_Ledger { $fBank->get_by_qcode($e_bank_account); // Get the saldo $pPeriode=new Periode($this->db); - $pPeriode->id=$periode; + if ( $this->check_periode() == true ) { + $pPeriode->p_id=$periode; + } else { + $pPeriode->find_periode($e_date); + } $exercice=$pPeriode->get_exercice(); - $filter_year=" and j_tech_per in (select p_id from parm_periode where p_exercice='".$exercice."')"; - $solde=get_solde($this->db,$fBank->strAttribut(ATTR_DEF_ACCOUNT),$filter_year); + $filter_year=" j_tech_per in (select p_id from parm_periode where p_exercice='".$exercice."')"; + $acc_account=new Acc_Account_Ledger($this->db,$fBank->strAttribut(ATTR_DEF_ACCOUNT)); + $solde=$acc_account->get_solde($filter_year); $new_solde=$solde; try { - StartSql($this->db); + $this->db->start(); $amount=0.0; // Credit = goods for ( $i = 0; $i < $nb_item;$i++) { @@ -555,7 +575,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { $amount+=${"e_other$i"."_amount"}; // Record a line for the bank // Compute the j_grpt - $seq=NextSequence($this->db,'s_grpt'); + $seq=$this->db->get_next_seq('s_grpt'); $acc_operation=new Acc_Operation($this->db); $acc_operation->date=$e_date; @@ -564,7 +584,16 @@ class Acc_Ledger_Fin extends Acc_Ledger { $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; $acc_operation->type='d'; - $acc_operation->periode=$periode; + + if ( isset($periode)) + $tperiode=$periode; + else + { + $per=new Periode($this->db); + $tperiode=$per->find_periode($e_date); + + } + $acc_operation->periode=$tperiode; $acc_operation->qcode=${"e_other".$i}; $acc_operation->insert_jrnx(); @@ -575,7 +604,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; $acc_operation->type='d'; - $acc_operation->periode=$periode; + $acc_operation->periode=$tperiode; $acc_operation->qcode=$e_bank_account; $acc_operation->insert_jrnx(); @@ -595,7 +624,8 @@ class Acc_Ledger_Fin extends Acc_Ledger { $acc_operation->date=$e_date; $acc_operation->desc=$comment; $acc_operation->grpt=$seq; - $acc_operation->periode=$periode; + $acc_operation->periode=$tperiode; + $acc_operation->mt=$mt; $jr_id=$acc_operation->insert_jrn(); $internal=$this->compute_internal_code($seq); @@ -636,12 +666,12 @@ class Acc_Ledger_Fin extends Acc_Ledger { // first record we upload the files and // keep variable to update other row of jrn if ( isset ($_FILES)) - $oid=save_upload_document($this->db,$seq); + $oid=$this->db->save_upload_document($seq); } else { if ( $oid != 0 ) { - ExecSql($this->db,"update jrn set jr_pj=".$oid.", jr_pj_name='".$_FILES['pj']['name']."', ". + $this->db->exec_sql("update jrn set jr_pj=".$oid.", jr_pj_name='".$_FILES['pj']['name']."', ". "jr_pj_type='".$_FILES['pj']['type']."' where jr_grpt_id=$seq"); } } @@ -654,11 +684,11 @@ class Acc_Ledger_Fin extends Acc_Ledger { 'Erreur dans l\'enregistrement '. __FILE__.':'.__LINE__.' '. $e->getMessage(); - Rollback($this->db); + $this->db->rollback(); exit(); } - Commit($this->db); + $this->db->commit(); $r=""; $r.="<br>Ancien solde ".$solde; $new_solde+=$amount; @@ -670,41 +700,55 @@ class Acc_Ledger_Fin extends Acc_Ledger { */ function show_ledger() { echo dossier::hidden(); - $hid=new widget("hidden"); + $hid=new IHidden(); $hid->name="p_action"; $hid->value="bank"; - echo $hid->IOValue(); + echo $hid->input(); $hid->name="sa"; $hid->value="l"; - echo $hid->IOValue(); + echo $hid->input(); $User=new User($this->db); - $w=new widget("select"); + $w=new ISelect(); // filter on the current year $filter_year=" where p_exercice='".$User->get_exercice()."'"; - $periode_start=make_array($this->db,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); + $periode_start=$this->db->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); // User is already set User=new User($this->db); - $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); + $current=(isset($_GET['p_periode']))?$_GET['p_periode']:-1; $w->selected=$current; - echo JS_SEARCH_CARD; + echo JS_LEDGER; echo JS_PROTOTYPE; echo JS_AJAX_FICHE; echo '<form>'; - echo 'Période '.$w->IOValue("p_periode",$periode_start); + echo 'Période '.$w->input("p_periode",$periode_start); $wLedger=$this->select_ledger('fin',3); - if ($wLedger == null) exit ('Pas de journal disponible'); - echo 'Journal '.$wLedger->IOValue(); - $w=new widget('js_search_only'); + if ($wLedger == null) exit (_('Pas de journal disponible')); + if ( count($wLedger->value) > 1) { + $aValue=$wLedger->value; + $wLedger->value[0]=array('value'=>-1,'label'=>_('Tous les journaux financiers')); + $idx=1; + foreach ($aValue as $a) { + $wLedger->value[$idx]=$a; + $idx++; + } + } + + + + echo 'Journal '.$wLedger->input(); + $w=new ICard(); + $w->noadd='no'; + $w->jrn=$this->id; $qcode=(isset($_GET['qcode']))?$_GET['qcode']:""; echo dossier::hidden(); - echo widget::hidden('p_action','bank'); - echo widget::hidden('sa','l'); + echo HtmlInput::hidden('p_action','bank'); + echo HtmlInput::hidden('sa','l'); $w->name='qcode'; $w->value=$qcode; $w->label=''; @@ -712,11 +756,11 @@ class Acc_Ledger_Fin extends Acc_Ledger { $all=$this->get_all_fiche_def(); $w->extra=$all; $w->extra2='QuickCode'; - $sp= new widget("span"); - echo $sp->IOValue("qcode_label","",$qcode); - echo $w->IOValue(); + $sp=new ISpan(); + echo $sp->input("qcode_label","",$qcode); + echo $w->input(); - echo widget::submit('gl_submit','Rechercher'); + echo HtmlInput::submit('gl_submit',_('Rechercher')); echo '</form>'; // Show list of sell @@ -731,8 +775,10 @@ class Acc_Ledger_Fin extends Acc_Ledger { $User->get_exercice().")"; } /* security */ - $available_ledger=" and jr_def_id= ".$this->id." and ".$User->get_ledger_sql(); - + if( $this->id != -1) + $available_ledger=" and jr_def_id= ".$this->id." and ".$User->get_ledger_sql(); + else + $available_ledger=" and ".$User->get_ledger_sql(); // Show list of sell // Date - date of payment - Customer - amount $sql=SQL_LIST_ALL_INVOICE.$filter_per." and jr_def_type='FIN'". @@ -740,17 +786,17 @@ class Acc_Ledger_Fin extends Acc_Ledger { $step=$_SESSION['g_pagesize']; $page=(isset($_GET['offset']))?$_GET['page']:1; $offset=(isset($_GET['offset']))?$_GET['offset']:0; - + $l=""; // check if qcode contains something if ( $qcode != "" ) { // add a condition to filter on the quick code - $l=" and jr_grpt_id in (select j_grpt from jrnx where j_qcode='$qcode') "; + $l=" and jr_grpt_id in (select j_grpt from jrnx where j_qcode=upper('$qcode')) "; } - list($max_line,$list)=ListJrn($this->db,0,"where jrn_def_type='FIN' $filter_per $l $available_ledger " + list($max_line,$list)=ListJrn($this->db,"where jrn_def_type='FIN' $filter_per $l $available_ledger " ,null,$offset,0); $bar=jrn_navigation_bar($offset,$max_line,$step,$page); diff --git a/include/class_acc_ledger_info.php b/include/class_acc_ledger_info.php index 9afe1b7bb..e34d6fb41 100644 --- a/include/class_acc_ledger_info.php +++ b/include/class_acc_ledger_info.php @@ -1,26 +1,26 @@ <?php -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ + /* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + /* $Revision$ */ -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr require_once ('class_dossier.php'); -require_once ('postgres.php'); +require_once ('class_database.php'); require_once('ac_common.php'); /*!\file @@ -33,133 +33,130 @@ require_once('ac_common.php'); * this class maps the table jrn_info */ class Acc_Ledger_Info { - var $cn; /*!< connection */ - var $ji_id; /*!< primary key */ - var $id_type; /*!< type id */ - var $jr_id; /*!< primary key of the table jrn */ - var $ji_value; /*!< value for this */ - function __construct($p_cn,$p_ji_id=0) { - $this->cn=$p_cn; - $this->ji_id=$p_ji_id; - } - function insert() { - if ( ! isset ($this->jr_id) || - ! isset ($this->ji_value) || - ! isset ($this->id_type ) ) - { - echo 'Appel incorrecte '.__FILE__.__LINE__; - var_dump($this); - exit(); - } - try { - $sql=ExecSqlParam( - $this->cn, - 'insert into jrn_info(jr_id,id_type,ji_value) values ($1,$2,$3)'. - ' returning ji_id ', - array ($this->jr_id,$this->id_type,$this->ji_value) - ); - $this->ji_id=pg_fetch_result($sql,0,0); - } catch (Exception $e) { - echo "Echec sauvegarde info additionnelles"; - throw $e; - } - } - function update() { - if ( ! isset ($this->jr_id) || - ! isset ($this->ji_value) || - ! isset ($this->jr_id ) ) - { - echo 'Appel incorrecte '.__FILE__.__LINE__; - var_dump($this); - exit(); - } - try { - $sql=ExecSqlParam( - $this->cn, - 'update jrn_info set jr_id=$1 ,id_type=$2,ji_value=$3 where ji_id=$4)'. - array ($this->jr_id,$this->id_type,$this->ji_value,$this->ji_id) - ); - } catch (Exception $e) { - Rollback($this->cn); - echo "Echec sauvegarde info additionnelles"; - throw $e; - } - } - function load() { - $sql="select jr_id,id_type,ji_value from jrn_info where ji_id=".$this->ji_id; - $r=ExecSql($this->cn,$sql); - if (pg_NumRows ($r) > 0 ) { - $this->from_array(pg_fetch_array($r,0)); - return 0; - }else { - return 1; - } + var $cn; /*!< connection */ + var $ji_id; /*!< primary key */ + var $id_type; /*!< type id */ + var $jr_id; /*!< primary key of the table jrn */ + var $ji_value; /*!< value for this */ + function __construct($p_cn,$p_ji_id=0) { + $this->cn=$p_cn; + $this->ji_id=$p_ji_id; + } + function insert() { + if ( ! isset ($this->jr_id) || + ! isset ($this->ji_value) || + ! isset ($this->id_type ) ) + { + echo 'Appel incorrecte '.__FILE__.__LINE__; + var_dump($this); + exit(); + } + try { + $sql=$this->cn->exec_sql('insert into jrn_info(jr_id,id_type,ji_value) values ($1,$2,$3)'. + ' returning ji_id ', + array ($this->jr_id,$this->id_type,$this->ji_value) + ); + $this->ji_id=Database::fetch_result($sql,0,0); + } catch (Exception $e) { + echo "Echec sauvegarde info additionnelles"; + throw $e; + } + } + function update() { + if ( ! isset ($this->jr_id) || + ! isset ($this->ji_value) || + ! isset ($this->jr_id ) ) + { + echo 'Appel incorrecte '.__FILE__.__LINE__; + var_dump($this); + exit(); + } + try { + $sql=$this->exec_sql('update jrn_info set jr_id=$1 ,id_type=$2,ji_value=$3 where ji_id=$4)'. + array ($this->jr_id,$this->id_type,$this->ji_value,$this->ji_id) + ); + } catch (Exception $e) { + $this->cn->rollback(); + echo "Echec sauvegarde info additionnelles"; + throw $e; + } + } + function load() { + $sql="select jr_id,id_type,ji_value from jrn_info where ji_id=".$this->ji_id; + $r=$this->cn->exec_sql($sql); + if (Database::num_row ($r) > 0 ) { + $this->from_array(Database::fetch_array($r,0)); + return 0; + }else { + return 1; + } - } - function from_array($p_array) { - foreach ($p_array as $col=>$value) { - $this->$col=$value; - } - } - function set_id($p_ji_id) { - $this->$ji_id=$p_ji_id; - } - function set_jrn_id($p_id) { - $this->jr_id=$p_id; - } - function set_type($p_id) { - $this->id_type=$p_id; - } - function set_value($p_id) { - $this->ji_value=$p_id; - } - /*!\brief load all the jrn_info thanks the jr_id - * \return an array of object - */ - function load_all() { - if ( ! isset ($this->jr_id) ) { echo "jr_id is not set ".__FILE__.__LINE__;exit();} + } + function from_array($p_array) { + foreach ($p_array as $col=>$value) { + $this->$col=$value; + } + } + function set_id($p_ji_id) { + $this->$ji_id=$p_ji_id; + } + function set_jrn_id($p_id) { + $this->jr_id=$p_id; + } + function set_type($p_id) { + $this->id_type=$p_id; + } + function set_value($p_id) { + $this->ji_value=$p_id; + } + /*!\brief load all the jrn_info thanks the jr_id + * \return an array of object + */ + function load_all() { + if ( ! isset ($this->jr_id) ) { echo "jr_id is not set ".__FILE__.__LINE__;exit();} - $sql="select ji_id from jrn_info where jr_id=".$this->jr_id; - $r=ExecSql($this->cn,$sql); - if (pg_NumRows($r) == 0 ) - return array(); - $array=pg_fetch_all($r); - $ret=array(); - foreach ($array as $row) { - $o=new Acc_Ledger_Info($this->cn,$row['ji_id']); - $o->load(); - $ret[]=clone $o; - } - return $ret; - } - function count() { - $sql="select ji_id from jrn_info where jr_id=".$this->jr_id; - return CountSql($this->cn,$sql); - } - function search_id_internal($p_internal) { - $sql="select jr_id from jrn where jr_internal='$p_internal'"; - $r=ExecSql($this->cn,$sql); - if (pg_NumRows($r) > 0 ) { - $this->jr_id=pg_fetch_result($r,0,0); - return $this->jr_id; - } else { - $this->jr_id=-1; - return $this->jr_id; - } - } - static function test_me() { - echo "Dossier = ".Dossier::id(); - $cn=DbConnect(Dossier::id()); - $a=new Acc_Ledger_Info($cn); - $a->jr_id=3; - $a->id_type='BON_COMMANDE'; - $a->ji_value='BON'; - var_dump($a); - $a->insert(); + $sql="select ji_id from jrn_info where jr_id=".$this->jr_id; + $r=$this->cn->exec_sql($sql); + if (Database::num_row($r) == 0 ) + return array(); + $array=Database::fetch_all($r); + $ret=array(); + foreach ($array as $row) { + $o=new Acc_Ledger_Info($this->cn,$row['ji_id']); + $o->load(); + $ret[]=clone $o; + } + return $ret; - $a->set_jrn_id(7); - $a->set_type('OTHER'); - $a->set_value('Autre test'); - $a->insert(); - } + } + function count() { + $sql="select ji_id from jrn_info where jr_id=".$this->jr_id; + return $this->cn->count_sql($sql); + } + function search_id_internal($p_internal) { + $sql="select jr_id from jrn where jr_internal='$p_internal'"; + $r=$this->cn->exec_sql($sql); + if (Database::num_row($r) > 0 ) { + $this->jr_id=Database::fetch_result($r,0,0); + return $this->jr_id; + } else { + $this->jr_id=-1; + return $this->jr_id; + } + } + static function test_me() { + echo "Dossier = ".Dossier::id(); + $cn=new Database(Dossier::id()); + $a=new Acc_Ledger_Info($cn); + $a->jr_id=3; + $a->id_type='BON_COMMANDE'; + $a->ji_value='BON'; + var_dump($a); + $a->insert(); + + $a->set_jrn_id(7); + $a->set_type('OTHER'); + $a->set_value('Autre test'); + $a->insert(); + } } diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index b2212d447..7dfba7c29 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -23,6 +23,14 @@ /*!\file * \brief class for the purchase, herits from acc_ledger */ +require_once("class_iselect.php"); +require_once("class_icard.php"); +require_once("class_ispan.php"); +require_once("class_ihidden.php"); +require_once("class_iperiod.php"); +require_once("class_idate.php"); +require_once("class_itext.php"); +require_once("class_ifile.php"); require_once('class_acc_ledger.php'); require_once('class_acc_compute.php'); require_once('class_anc_operation.php'); @@ -30,73 +38,83 @@ require_once('user_common.php'); require_once('class_acc_parm_code.php'); require_once('class_acc_payment.php'); require_once('ac_common.php'); -/*!\brief Handle the ledger of purchase, +/*!\brief Handle the ledger of purchase, * * */ -class Acc_Ledger_Purchase extends Acc_Ledger { +class Acc_Ledger_Purchase extends Acc_Ledger { function __construct ($p_cn,$p_init) { + $this->type='ACH'; parent::__construct($p_cn,$p_init); } /*!\brief verify that the data are correct before inserting or confirming *\param an array (usually $_POST) *\return String - *\note return an AcException if an error occurs + *\throw Exception if an error occurs */ public function verify($p_array) { extract ($p_array); + + /* check for a double reload */ + if ( isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1',array($mt)) != 0 ) + throw new Exception (_('Double Encodage'),5); + /* check if there is a customer */ - if ( strlen(trim($e_client)) == 0 ) - throw new AcException('Vous n\'avez pas donné de fournisseur',11); + if ( strlen(trim($e_client)) == 0 ) + throw new Exception(_('Vous n\'avez pas donné de fournisseur'),11); /* check if the date is valid */ if ( isDate($e_date) == null ) { - throw new AcException('Date invalide', 2); + throw new Exception(_('Date invalide'), 2); + } + $oPeriode=new Periode($this->db); + if ( $this->check_periode() == false) { + $tperiode=$oPeriode->find_periode($e_date); + }else { + $tperiode=$period; + $oPeriode->p_id=$tperiode; + /* check that the datum is in the choosen periode */ + list ($min,$max)=$oPeriode->get_date_limit($tperiode); + if ( cmpDate($e_date,$min) < 0 || + cmpDate($e_date,$max) > 0) + throw new Exception(_('Date et periode ne correspondent pas'),6); } - /* check if the periode is closed */ - if ( $this->is_closed($periode)==1 ) + if ( $this->is_closed($tperiode)==1 ) { - throw new AcException('Periode fermee',6); + throw new Exception(_('Periode fermee'),6); } - /* check that the datum is in the choosen periode */ - $per=new Periode($this->db); - list ($min,$max)=$per->get_date_limit($periode); - if ( cmpDate($e_date,$min) < 0 || - cmpDate($e_date,$max) > 0) - throw new AcException('Date et periode ne correspondent pas',6); - - /* check if we are using the strict mode */ if( $this->check_strict() == true) { /* if we use the strict mode, we get the date of the last operation */ $last_date=$this->get_last_date(); if ( $last_date != null && cmpDate($e_date,$last_date) < 0 ) - throw new AcException('Vous utilisez le mode strict la dernière operation est à la date du ' - .$last_date.' vous ne pouvez pas encoder à une '. - ' date antérieure dans ce journal',13); + throw new Exception(_('Vous utilisez le mode strict la dernière operation est à la date du ') + .$last_date._(' vous ne pouvez pas encoder à une '. + ' date antérieure dans ce journal'),13); } /* check the account */ $fiche=new fiche($this->db); $fiche->get_by_qcode($e_client); + if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) - throw new AcException('La fiche '.$e_client.'n\'a pas de poste comptable',8); + throw new Exception(_('La fiche ').$e_client._('n\'a pas de poste comptable'),8); /* The account exists */ $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); if ( $poste->load() == false ){ - throw new AcException('Pour la fiche '.$e_client.' le poste comptable ['.$poste->id.'] n\'existe pas',9); + throw new Exception(_('Pour la fiche ').$e_client._(' le poste comptable [').$poste->id.'] '._('n\'existe pas'),9); } /* Check if the card belong to the ledger */ $fiche=new fiche ($this->db); $fiche->get_by_qcode($e_client,'cred'); if ( $fiche->belong_ledger($p_jrn) !=1 ) - throw new AcException('La fiche '.$e_client.'n\'est pas accessible à ce journal',10); + throw new Exception(_('La fiche ').$e_client._('n\'est pas accessible à ce journal'),10); $nb=0; //------------------------------------------------------ @@ -104,7 +122,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { //------------------------------------------------------ if ($e_mp != 0 ) $this->check_payment($e_mp,${"e_mp_qcode_".$e_mp}); - + //---------------------------------------- // foreach item //---------------------------------------- @@ -112,58 +130,66 @@ class Acc_Ledger_Purchase extends Acc_Ledger { if ( strlen(trim(${'e_march'.$i}))== 0) continue; /* check if amount are numeric and */ if ( isNumber(${'e_march'.$i.'_price'}) == 0 ) - throw new AcException('La fiche '.${'e_march'.$i}.'a un montant invalide ['.${'e_march'.$i}.']',6); + throw new Exception(_('La fiche ').${'e_march'.$i}._('a un montant invalide').' ['.${'e_march'.$i}.']',6); if ( isNumber(${'e_quant'.$i}) == 0 ) - throw new AcException('La fiche '.${'e_march'.$i}.'a une quantité invalide ['.${'e_quant'.$i}.']',7); + throw new Exception(_('La fiche ').${'e_march'.$i}._('a une quantité invalide').' ['.${'e_quant'.$i}.']',7); /* check if all card has a ATTR_DEF_ACCOUNT*/ $fiche=new fiche($this->db); $fiche->get_by_qcode(${'e_march'.$i}); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) - throw new AcException('La fiche '.${'e_march'.$i}.'n\'a pas de poste comptable',8); + throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'a pas de poste comptable'),8); /* The account exists */ $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); if ( $poste->load() == false ){ - throw new AcException('Pour la fiche '.${'e_march'.$i}.' le poste comptable ['.$poste->id.'n\'existe pas',9); + throw new Exception(_('Pour la fiche ').${'e_march'.$i}._(' le poste comptable').' ['.$poste->id._('n\'existe pas'),9); } /* Check if the card belong to the ledger */ $fiche=new fiche ($this->db); $fiche->get_by_qcode(${'e_march'.$i}); if ( $fiche->belong_ledger($p_jrn,'deb') !=1 ) - throw new AcException('La fiche '.${'e_march'.$i}.'n\'est pas accessible à ce journal',10); + throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'est pas accessible à ce journal'),10); $nb++; } if ( $nb == 0 ) - throw new AcException('Il n\'y a aucune marchandise',12); + throw new Exception(_('Il n\'y a aucune marchandise'),12); } - public function save() { + public function save($p_array) { echo "<h2> Acc_Ledger_Purchase::save Not implemented</h2>"; } /*!\brief insert into the database, it calls first the verify function *\param $p_array is usually $_POST or a predefined operation *\return string - *\note throw an AcException + *\note throw an Exception */ public function insert($p_array) { extract ($p_array); - $this->verify($p_array) ; + $this->verify($p_array) ; $own=new own($this->db); - $group=NextSequence($this->db,"s_oa_group"); /* for analytic */ - $seq=NextSequence($this->db,'s_grpt'); + $group=$this->db->get_next_seq("s_oa_group"); /* for analytic */ + $seq=$this->db->get_next_seq('s_grpt'); $this->id=$p_jrn; $internal=$this->compute_internal_code($seq); $cust=new fiche($this->db); $cust->get_by_qcode($e_client); $poste=$cust->strAttribut(ATTR_DEF_ACCOUNT); + $oPeriode=new Periode($this->db); + $check_periode=$this->check_periode(); + + if ( $check_periode == true ) + $tperiode=$period; + else + $tperiode=$oPeriode->find_periode($e_date); + bcscale(4); try { $tot_amount=0; $tot_tva=0; $tot_debit=0; - StartSql($this->db); + $this->db->start(); $tot_nd=0; $tot_perso=0; $tot_tva_nd=0; @@ -174,11 +200,11 @@ class Acc_Ledger_Purchase extends Acc_Ledger { if ( strlen(trim(${'e_march'.$i})) == 0 ) continue; if ( ${'e_march'.$i.'_price'} == 0 ) continue; if ( ${'e_quant'.$i} == 0 ) continue; - + /* First we save all the items without vat */ $fiche=new fiche($this->db); $fiche->get_by_qcode(${"e_march".$i}); - + /* tva */ if ($own->MY_TVA_USE=='Y') { $idx_tva=${'e_march'.$i.'_tva_id'}; @@ -197,11 +223,11 @@ class Acc_Ledger_Purchase extends Acc_Ledger { if ( strlen(trim(${'e_march'.$i.'_tva_amount'})) ==0) { $acc_amount->compute_vat(); echo_debug( 'vat is computed = '.$acc_amount->amount_vat); - + } else { $acc_amount->amount_vat= ${'e_march'.$i.'_tva_amount'}; echo_debug( 'vat is given = '.$acc_amount->amount_vat); - + } $tot_tva+=$acc_amount->amount_vat; } @@ -211,17 +237,17 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; $acc_operation->type='d'; - $acc_operation->periode=$periode; + $acc_operation->periode=$tperiode; $acc_operation->qcode=""; - - + + if ( ! $fiche->empty_attribute(ATTR_DEF_DEPENSE_NON_DEDUCTIBLE)) { $acc_amount->amount_nd_rate=$fiche->strAttribut(ATTR_DEF_DEPENSE_NON_DEDUCTIBLE); $acc_amount->compute_nd(); $tot_nd+=$acc_amount->amount_nd; - + } if ( ! $fiche->empty_attribute(ATTR_DEF_DEP_PRIV)) { @@ -257,7 +283,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { if ( $own->MY_TVA_USE=='Y') { $tva_item=$acc_amount->amount_vat; - + if (isset($tva[$idx_tva] ) ) $tva[$idx_tva]+=$tva_item; else @@ -269,20 +295,20 @@ class Acc_Ledger_Purchase extends Acc_Ledger { * material) */ $nNeg=(${"e_quant".$i}<0)?-1:1; - - // always save quantity but in withStock we can find + + // always save quantity but in withStock we can find // what card need a stock management - + InsertStockGoods($this->db,$j_id,${'e_march'.$i},$nNeg*${'e_quant'.$i},'d') ; if ( $own->MY_ANALYTIC != "nu" ) { // for each item, insert into operation_analytique */ - $op=new Anc_Operation($this->db); + $op=new Anc_Operation($this->db); $op->oa_group=$group; $op->j_id=$j_id; $op->oa_date=$e_date; - $op->oa_debit=($amount < 0 )?'t':'f'; + $op->oa_debit=($amount < 0 )?'t':'f'; echo_debug(__FILE__.':'.__LINE__,"Description is $e_comm"); $op->oa_description=FormatString($e_comm); $op->save_form_plan($_POST,$i); @@ -290,22 +316,22 @@ class Acc_Ledger_Purchase extends Acc_Ledger { // insert into quant_purchase //----- if ( $own->MY_TVA_USE=='Y') { - $r=ExecSql($this->db,"select insert_quant_purchase ". - "('".$internal."'". - ",".$j_id. - ",'".${"e_march".$i}."'". - ",".${"e_quant".$i}.",". - round($amount,2). - ",".$acc_amount->amount_vat. - ",".$oTva->get_parameter('id'). - ",".$acc_amount->amount_nd. - ",".$acc_amount->nd_vat. - ",".$acc_amount->nd_ded_vat. - ",".$acc_amount->amount_perso. - ",'".$e_client."')"); - + $r=$this->db->exec_sql("select insert_quant_purchase ". + "('".$internal."'". /* 1 */ + ",".$j_id. /* 2 */ + ",'".${"e_march".$i}."'". /* 3 */ + ",".${"e_quant".$i}.",". /* 4 */ + round($amount,2). /* 5 */ + ",".$acc_amount->amount_vat. /* 6 */ + ",".$oTva->get_parameter('id'). /* 7 */ + ",".$acc_amount->amount_nd. /* 8 */ + ",".$acc_amount->nd_vat. /* 9 */ + ",".$acc_amount->nd_ded_vat. /* 10 */ + ",".$acc_amount->amount_perso. /* 11 */ + ",'".$e_client."')"); /* 12 */ + } else { - $r=ExecSql($this->db,"select insert_quant_purchase ". + $r=$this->db->exec_sql("select insert_quant_purchase ". "('".$internal."'". ",".$j_id. ",'".${"e_march".$i}."'". @@ -318,7 +344,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { ",".$acc_amount->nd_ded_vat. ",".$acc_amount->amount_perso. ",'".$e_client."')"); - + } @@ -332,11 +358,11 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; $acc_operation->type='c'; - $acc_operation->periode=$periode; + $acc_operation->periode=$tperiode; $acc_operation->qcode=${"e_client"}; if ( $cust_amount < 0 ) $tot_debit=bcadd($tot_debit,abs($cust_amount)); $acc_operation->insert_jrnx(); - /* + /* * Save all the no deductible */ if ( $tot_nd != 0) { @@ -349,7 +375,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { if ( $tot_nd > 0 ) $tot_debit=bcadd($tot_debit,$tot_nd); $j_id=$acc_operation->insert_jrnx(); - } + } if ( $tot_perso != 0) { /* save op. */ $acc_operation->type='d'; @@ -359,8 +385,8 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $acc_operation->qcode=''; if ( $tot_perso > 0 ) $tot_debit=bcadd($tot_debit,$tot_perso); $j_id=$acc_operation->insert_jrnx(); - - } + + } if ( $tot_tva_nd != 0) { /* save op. */ $acc_operation->type='d'; @@ -370,8 +396,8 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $acc_operation->poste=$dna->p_value; if ( $tot_tva_nd > 0 ) $tot_debit=bcadd($tot_debit,$tot_tva_nd); $j_id=$acc_operation->insert_jrnx(); - - } + + } if ( $tot_tva_ndded != 0) { /* save op. */ $dna=new Acc_Parm_Code($this->db,'TVA_DED_IMPOT'); @@ -383,11 +409,11 @@ class Acc_Ledger_Purchase extends Acc_Ledger { if ( $tot_tva_ndded > 0 ) $tot_debit=bcadd($tot_debit,$tot_tva_ndded); $j_id=$acc_operation->insert_jrnx(); - - } + + } if ( $own->MY_TVA_USE=='Y') { - /* save all vat + /* save all vat * $i contains the tva_id and value contains the vat amount */ foreach ($tva as $i => $value) { @@ -396,7 +422,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $oTva->load(); $poste_vat=$oTva->get_side('d'); - + $cust_amount=bcadd($tot_amount,$tot_tva); $acc_operation=new Acc_Operation($this->db); $acc_operation->date=$e_date; @@ -405,10 +431,10 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; $acc_operation->type='d'; - $acc_operation->periode=$periode; + $acc_operation->periode=$tperiode; if ( $value > 0 ) $tot_debit=bcadd($tot_debit,$value); $acc_operation->insert_jrnx(); - + } } /* insert into jrn */ @@ -419,12 +445,13 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $acc_operation->desc=$e_comm; $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; - $acc_operation->periode=$periode; + $acc_operation->periode=$tperiode; $acc_operation->pj=$e_pj; + $acc_operation->mt=$mt; $acc_operation->insert_jrn(); $this->pj=$acc_operation->set_pj(); - // Set Internal code + // Set Internal code $this->grpt_id=$seq; $this->update_internal_code($internal); @@ -436,17 +463,20 @@ class Acc_Ledger_Purchase extends Acc_Ledger { /* Save the attachment */ if ( isset ($_FILES)) { if ( sizeof($_FILES) != 0 ) - save_upload_document($this->db,$seq); + $this->db->save_upload_document($seq); } - /* Generate an document and save it into the database */ + $str_file=""; + /* Generate an document and save it into the database (Note de frais only) + */ if ( isset($_POST['gen_invoice']) && $e_mp != 0) { + $this->create_document($internal,$p_array); $p_array['e_client']=${'e_mp_qcode_'.$e_mp}; - echo $this->create_document($internal,$p_array); - echo '<br>'; + $this->doc= _('Document généré'); + $this->doc.='<A style="display:inline" HREF="show_pj.php?'.dossier::get().'&jr_grpt_id='.$seq.'&jrn='.$this->id.'">'._('Note de frais').'</A>'; } //---------------------------------------- - // Save the payer + // Save the payer //---------------------------------------- if ( $e_mp != 0 ) { /* mp */ @@ -454,7 +484,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $mp->load(); /* fiche */ - if ($mp->get_parameter('qcode') == '') + if ($mp->get_parameter('qcode') == '') $fqcode=${'e_mp_qcode_'.$e_mp}; else $fqcode=$mp->get_parameter('qcode'); @@ -463,7 +493,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $acfiche->get_by_qcode($fqcode); /* jrnx */ - $acseq=NextSequence($this->db,'s_grpt'); + $acseq=$this->db->get_next_seq('s_grpt'); $acjrn=new Acc_Ledger($this->db,$mp->get_parameter('ledger')); $acinternal=$acjrn->compute_internal_code($acseq); @@ -476,7 +506,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $acc_pay->desc=$e_comm; $acc_pay->grpt=$acseq; $acc_pay->jrn=$mp->get_parameter('ledger'); - $acc_pay->periode=$periode; + $acc_pay->periode=$tperiode; $acc_pay->type='c'; $acc_pay->insert_jrnx(); @@ -489,20 +519,21 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $acc_pay->desc=$e_comm; $acc_pay->grpt=$acseq; $acc_pay->jrn=$mp->get_parameter('ledger'); - $acc_pay->periode=$periode; + $acc_pay->periode=$tperiode; $acc_pay->type='d'; $acc_pay->insert_jrnx(); - + /* insert into jrn */ + $acc_pay->mt=$mt; $acc_pay->insert_jrn(); $acjrn->grpt_id=$acseq; $acjrn->update_internal_code($acinternal); - + $r1=$this->get_id($internal); $r2=$this->get_id($acinternal); /* set the flag paid */ - $Res=ExecSqlParam($this->db,"update jrn set jr_rapt='paid' where jr_id=$1",array($r1)); + $Res=$this->db->exec_sql("update jrn set jr_rapt='paid' where jr_id=$1",array($r1)); /* Reconcialiation */ $rec=new Acc_Reconciliation($this->db); @@ -515,11 +546,11 @@ class Acc_Ledger_Purchase extends Acc_Ledger { echo '<span class="error">'. 'Erreur dans l\'enregistrement '. __FILE__.':'.__LINE__.' '. - $e->getMessage(); - Rollback($this->db); + $e->getMessage().$e->getTrace(); + $this->db->rollback(); exit(); } - Commit($this->db); + $this->db->commit(); return $internal; } @@ -531,99 +562,39 @@ class Acc_Ledger_Purchase extends Acc_Ledger { echo "<h2> Acc_Ledger_Purchase::load Not implemented</h2>"; } - /*!\brief Show all the operation, propose a form to select the - *ledger and the periode - *\return none - *\note echo directly, there is no return with the html code - */ - public function show_ledger() { - $w=new widget("select"); - $User=new User($this->db); - // filter on the current year - $filter_year=" where p_exercice='".$User->get_exercice()."'"; - - $periode_start=make_array($this->db,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); - $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); - $w->selected=$current; - - echo 'Période '.$w->IOValue("p_periode",$periode_start); - $wLedger=$this->select_ledger('ACH',3); - if ($wLedger == null) exit ('Pas de journal disponible'); - echo 'Journal '.$wLedger->IOValue(); - $qcode=(isset($_GET['qcode']))?$_GET['qcode']:""; - $this->type='ACH'; - $all=$this->get_all_fiche_def(); - echo JS_SEARCH_CARD; - echo JS_PROTOTYPE; - echo JS_AJAX_FICHE; - $w=new widget('js_search_only'); - $w->name='qcode'; - $w->value=$qcode; - $w->label=''; - $w->extra='filter'; - $w->extra2='QuickCode'; - $w->table=0; - $sp= new widget("span"); - echo $sp->IOValue("qcode_label","",$qcode); - echo $w->IOValue(); - echo widget::submit('gl_submit','Recherche'); - // Show list of sell - // Date - date of payment - Customer - amount - if ( $current == -1) { - $cond=" and jr_tech_per in (select p_id from parm_periode where p_exercice='".$User->get_exercice()."')"; - } else { - $cond=" and jr_tech_per=".$current; - } - - $sql=SQL_LIST_ALL_INVOICE.$cond." and jr_def_id=".$this->id ; - $step=$_SESSION['g_pagesize']; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - /* security */ - $available_ledger=$User->get_ledger_sql(); - - $l=""; - // check if qcode contains something - if ( $qcode != "" ) - { - $qcode=Formatstring($qcode); - // add a condition to filter on the quick code - $l=" and jr_grpt_id in (select j_grpt from jrnx where j_qcode=upper('$qcode')) "; - $sql="where jrn_def_type='ACH' $cond $l and $available_ledger "; - } - - list($max_line,$list)=ListJrn($this->db,$this->id,$sql,null,$offset,1); - $bar=jrn_navigation_bar($offset,$max_line,$step,$page); - - echo "<hr>$bar"; - echo '<form method="POST">'; - echo dossier::hidden(); - $hid=new widget("hidden"); - - echo $list; - if ( $max_line !=0 ) - echo widget::submit('paid','Mise à jour paiement'); - echo '</FORM>'; - echo "$bar <hr>"; - - echo '</div>'; - - - } public function delete() { echo "<h2> Acc_Ledger_Purchase::delete Not implemented</h2>"; } /*!\brief display the form for entering data for invoice *\param $p_array is null or you can put the predef operation or the $_POST - *\return string + *\return HTML string */ - public function display_form($p_array=null) { + public function input($p_array=null) { if ( $p_array != null ) extract($p_array); $user = new User($this->db); $own=new Own($this->db); - // The first day of the periode + $flag_tva=$own->MY_TVA_USE; + /* Add button */ + $f_add_button=new IButton('add_card'); + $f_add_button->label=_('Créer une nouvelle fiche'); + $f_add_button->set_attribute('ipopup','ipop_newcard'); + $f_add_button->set_attribute('filter',$this->get_all_fiche_def ()); + // $f_add_button->set_attribute('jrn',$this->id); + $f_add_button->javascript=" select_card_type(this);"; + + $f_add_button2=new IButton('add_card2'); + $f_add_button2->label=_('Créer une nouvelle fiche'); + $f_add_button2->set_attribute('ipopup','ipop_newcard'); + $f_add_button2->set_attribute('filter',$this->get_all_fiche_def ()); + // $f_add_button2->set_attribute('jrn',$this->id); + $f_add_button2->javascript=" select_card_type(this);"; + + $str_add_button=$f_add_button->input(); + $str_add_button2=$f_add_button2->input(); + + // The first day of the periode $oPeriode=new Periode($this->db); list ($l_date_start,$l_date_end)=$oPeriode->get_date_limit($user->get_periode()); @@ -632,48 +603,50 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $e_comm=(isset($e_comm))?$e_comm:""; $r=""; - $r.="<FORM NAME=\"form_detail\" METHOD=\"POST\">"; - $r.=JS_INFOBULLE; - $r.=JS_SEARCH_CARD; - //!\todo do we need JS_TVA ??? Remove if no - $r.=JS_SHOW_TVA; - $r.=JS_TVA; - $r.=JS_AJAX_FICHE; - - $r.=dossier::hidden(); - $r.=widget::hidden('phpsessid',$_REQUEST['PHPSESSID']); - $r.="<fieldset>"; - $r.="<legend>En-tête facture fournisseur </legend>"; - - $r.='<TABLE width="100%">'; + $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); + $f_legend=_("En-tête facture fournisseur"); + $f_legend_detail=_("Détail articles acheté"); + // Date //-- - $Date=new widget("js_date"); - $Date->SetReadOnly(false); + $Date=new IDate(); + $Date->setReadOnly(false); $Date->table=1; $Date->tabindex=1; - $r.="<tr>"; - $r.=$Date->IOValue("e_date",$op_date,"Date"); + $f_date=$Date->input("e_date",$op_date); // Payment limit //-- - $Echeance=new widget("js_date"); - $Echeance->SetReadOnly(false); - $Echeance->table=1; + $Echeance=new IDate(); + $Echeance->setReadOnly(false); $Echeance->tabindex=2; - $label=widget::infobulle(4); - $r.=$Echeance->IOValue("e_ech",$e_ech,"Echeance ".$label); + $label=HtmlInput::infobulle(4); + $f_echeance=$Echeance->input('e_ech',$e_ech,'Echéance'.$label); + $f_periode=""; + if ($this->check_periode() == true) { + // Periode + //-- + $l_user_per=$user->get_periode(); + $def=(isset($periode))?$periode:$l_user_per; - // Periode - //-- - $l_user_per=$user->get_periode(); - $def=(isset($periode))?$periode:$l_user_per; - $l_form_per=FormPeriode($this->db,$def,OPEN); - $r.="<td class=\"input_text\">"; - $label=widget::infobulle(3); - $r.="Période comptable $label</td><td>".$l_form_per; - $r.="</td>"; - $r.="</tr><tr>"; + $period=new IPeriod("period"); + $period->user=$user; + $period->cn=$this->db; + $period->value=$def; + $period->type=OPEN; + try { + $l_form_per=$period->input(); + } catch (Exception $e) { + if ($e->getCode() == 1 ) { + echo _("Aucune période ouverte"); + exit(); + } + } + + $r.="<td>"; + $label=HtmlInput::infobulle(3); + $f_periode=_("Période comptable")." $label ".$l_form_per; + } // Ledger (p_jrn) //-- /* if we suggest the next pj, then we need a javascript */ @@ -682,41 +655,40 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $add_js="update_pj();"; } $wLedger=$this->select_ledger('ACH',2); - if ($wLedger == null) exit ('Pas de journal disponible'); - $wLedger->table=1; + if ($wLedger == null) exit (_('Pas de journal disponible')); $wLedger->javascript="onChange='update_predef(\"ach\",\"f\");$add_js'"; - $wLedger->label=" Journal ".widget::infobulle(2) ; + $label=" Journal ".HtmlInput::infobulle(2) ; + + $f_jrn=$wLedger->input(); - $r.=$wLedger->IOValue(); // Comment //-- - $Commentaire=new widget("text"); + $Commentaire=new IText(); $Commentaire->table=0; - $Commentaire->SetReadOnly(false); + $Commentaire->setReadOnly(false); $Commentaire->size=60; $Commentaire->tabindex=3; - $label=" Description ".widget::infobulle(1) ; - $r.="<tr>"; - $r.='<td class="input_text">'.$label.'</td>'. - '<td colspan="3">'.$Commentaire->IOValue("e_comm",$e_comm)."</td>"; + $label=HtmlInput::infobulle(1) ; + $f_desc=$label.$Commentaire->input("e_comm",h($e_comm)); + // PJ //-- /* suggest PJ ? */ $default_pj=''; if ( $own->MY_PJ_SUGGEST=='Y') { $default_pj=$this->guess_pj(); - } + } + $pj=new IText(); $pj->value=(isset($e_pj))?$e_pj:$default_pj; - $pj=new widget('text'); + $pj->table=0; $pj->name="e_pj"; $pj->size=10; $pj->readonly=false; $pj->value=$default_pj; + $f_pj=$pj->input().HtmlInput::hidden('e_pj_suggest',$default_pj); - $r.=widget::hidden('e_pj_suggest',$default_pj); - $r.='<td class="input_text">Num.PJ</td><td>'.$pj->IOValue().'</td>'; // Display the customer //-- $fiche='cred'; @@ -725,8 +697,8 @@ class Acc_Ledger_Purchase extends Acc_Ledger { //-- $e_client=( isset ($e_client) )?$e_client:""; $e_client_label=" ";//str_pad("",100,"."); - - + + // retrieve e_client_label //-- @@ -740,52 +712,39 @@ class Acc_Ledger_Purchase extends Acc_Ledger { } - - $W1=new widget("js_search_only"); - $W1->label="Fournisseur ".widget::infobulle(0) ; + + $W1=new ICard(); + $W1->label=_("Fournisseur ").HtmlInput::infobulle(0) ; $W1->name="e_client"; $W1->tabindex=3; $W1->value=$e_client; $W1->table=0; - $W1->extra=$fiche; // list of card - $W1->extra2="Recherche"; - $r.='<TR><td colspan="5" >'.$W1->IOValue(); - $client_label=new widget("span"); + $W1->set_dblclick("fill_ipopcard(this);"); + $W1->set_attribute('ipopup','ipopcard'); + + // name of the field to update with the name of the card + $W1->set_attribute('label','e_client_label'); + // name of the field to update with the name of the card + $W1->set_attribute('typecard','cred'); + $W1->extra='cred'; + // Add the callback function to filter the card on the jrn + $W1->set_callback('filter_card'); + $W1->set_function('fill_data'); + $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', + $W1->name); + $f_client_qcode=$W1->input(); + $client_label=new ISpan(); $client_label->table=0; - $r.=$client_label->IOValue("e_client_label",$e_client_label)."</TD></TR>"; - - $r.="</TABLE>"; - + $f_client=$client_label->input("e_client_label",$e_client_label); + $f_client_bt=$W1->search(); + + // Record the current number of article - $Hid=new widget('hidden'); + $Hid=new IHidden(); $p_article= ( isset ($p_article))?$p_article:MAX_ARTICLE; - $r.=$Hid->IOValue("nb_item",$p_article); + $r.=$Hid->input("nb_item",$p_article); $e_comment=(isset($e_comment))?$e_comment:""; - /*!\todo for the PJ we suggest the PJ Number, the pj number must also be settable in the ledger - setting and editable in the details popup window */ - $r.="</fieldset>"; - - // Start the div for item to sell - $r.="<DIV>"; - $r.='<fieldset><legend>Détail articles achetés</legend>'; - $r.='<TABLE ID="sold_item">'; - $r.='<TR>'; - $r.="<th></th>"; - $label=widget::infobulle(0) ; - $r.="<th>Code $label</th>"; - $r.="<th>Dénomination</th>"; - $label=widget::infobulle(6) ; - $r.="<th>$label prix / unité htva </th>"; - /* use vat */ - if ( $own->MY_TVA_USE=='Y') { - $r.="<th>tva</th>"; - $label=widget::infobulle(8) ; - $r.="<th> $label Total tva</th>"; - } - $r.="<th>quantité</th>"; - - $r.='</TR>'; // For each article //-- for ($i=0;$i< MAX_ARTICLE;$i++) { @@ -798,8 +757,8 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $march_tva_id=(isset(${"e_march$i"."_tva_id"}))?${"e_march$i"."_tva_id"}:""; $march_tva_amount=(isset(${"e_march$i"."_tva_amount"}))?${"e_march$i"."_tva_amount"}:""; } - - + + $march_label=" "; // retrieve the tva label and name @@ -814,132 +773,121 @@ class Acc_Ledger_Purchase extends Acc_Ledger { } // Show input //-- - $W1=new widget("js_search_only"); + $W1=new ICard(); $W1->label=""; $W1->name="e_march".$i; $W1->value=$march; $W1->table=1; - $W1->extra2="Recherche"; - $W1->extra='deb'; // debits - $W1->javascript=sprintf('onBlur="ajaxFid(\'%s\',\'%s\',\'%s\');compute_purchase(%d)"', - $W1->name, - $W1->extra, //deb or cred - $_REQUEST['PHPSESSID'], - $i - ); + $W1->set_dblclick("fill_ipopcard(this);"); + $W1->set_attribute('ipopup','ipopcard'); + $W1->set_attribute('typecard','deb'); + $W1->extra='deb'; // debits + // name of the field to update with the name of the card + $W1->set_attribute('label','e_march'.$i.'_label'); + // name of the field with the price + $W1->set_attribute('purchase','e_march'.$i.'_price'); + // name of the field with the TVA_ID + $W1->set_attribute('tvaid','e_march'.$i.'_tva_id'); + // Add the callback function to filter the card on the jrn + $W1->set_callback('filter_card'); + $W1->set_function('fill_data'); + $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', + $W1->name); $W1->readonly=false; - $r.="<TR>".$W1->IOValue(); + $array[$i]['quick_code']=$W1->input(); + $array[$i]['bt']=$W1->search(); + + $array[$i]['hidden']=''; // For computing we need some hidden field for holding the value if ( $own->MY_TVA_USE=='Y') { - $r.=widget::hidden('tva_march'.$i,0); + $array[$i]['hidden'].=HtmlInput::hidden('tva_march'.$i,0); } - $r.=widget::hidden('tvac_march'.$i,0); - $r.=widget::hidden('htva_march'.$i,0); - $r.="</TD>"; - $Span=new widget ("span"); - $Span->SetReadOnly(false); + + if ( $own->MY_TVA_USE=='Y') + $tvac=new INum('tvac_march'.$i); + else + $tvac=new IHidden('tvac_march'.$i); + + $tvac->readOnly=1; + $tvac->value=0; + $array[$i]['tvac']=$tvac->input(); + + $htva=new INum('htva_march'.$i); + $htva->readOnly=1; + + $htva->value=0; + $array[$i]['htva']=$htva->input(); + + $Span=new ISpan(); + $Span->setReadOnly(false); // card's name, price //-- - $r.='<TD style="width:55%;border-bottom:1px dotted grey;">'.$Span->IOValue("e_march".$i."_label",$march_label)."</TD>"; + $array[$i]['denom']=$Span->input("e_march".$i."_label",$march_label); // price - $Price=new widget("text"); - $Price->SetReadOnly(false); - $Price->table=1; + $Price=new INum(); + $Price->setReadOnly(false); $Price->size=9; - $Price->javascript="onBlur='clean_tva($i);compute_purchase($i)'"; - $r.=$Price->IOValue("e_march".$i."_price",$march_price); + $Price->javascript="onBlur='format_number(this);clean_tva($i);compute_ledger($i)'"; + $array[$i]['pu']=$Price->input("e_march".$i."_price",$march_price); if ( $own->MY_TVA_USE=='Y') { + // vat label //-- - $select_tva=make_array($this->db,"select tva_id,tva_label from tva_rate order by tva_rate desc",0); - $Tva=new widget("select"); - $Tva->javascript="onChange=\"clean_tva($i);compute_purchase($i);\""; - $Tva->table=1; + $select_tva=$this->db->make_array("select tva_id,tva_label from tva_rate order by tva_rate desc",0); + $Tva=new ISelect(); + $Tva->javascript="onChange=\"clean_tva($i);compute_ledger($i);\""; $Tva->selected=$march_tva_id; - $r.=$Tva->IOValue("e_march$i"."_tva_id",$select_tva); + $array[$i]['tva']=$Tva->input("e_march$i"."_tva_id",$select_tva); // Tva_amount - + // price - $Tva_amount=new widget("text"); - $Tva_amount->SetReadOnly(false); - $Tva_amount->table=1; + $Tva_amount=new INum(); + $Tva_amount->setReadOnly(false); $Tva_amount->size=9; - $Tva_amount->javascript="onBlur='compute_purchase($i)'"; - $r.=$Tva_amount->IOValue("e_march".$i."_tva_amount",$march_tva_amount); - } + $Tva_amount->javascript="onBlur='format_number(this);compute_ledger($i)'"; + $array[$i]['amount_tva']=$Tva_amount->input("e_march".$i."_tva_amount",$march_tva_amount); + } // quantity //-- $quant=(isset(${"e_quant$i"}))?${"e_quant$i"}:"1"; - $Quantity=new widget("text"); - $Quantity->SetReadOnly(false); - $Quantity->table=1; + $Quantity=new INum(); + $Quantity->setReadOnly(false); $Quantity->size=9; - $Quantity->javascript="onChange=compute_purchase($i)"; - $r.=$Quantity->IOValue("e_quant".$i,$quant); + $Quantity->javascript="onChange=format_number(this);clean_tva($i);compute_ledger($i)"; + $array[$i]['quantity']=$Quantity->input("e_quant".$i,$quant); - $r.="</tr>"; } + $f_type=_('Fournisseur'); - - - $r.="</TABLE>"; - $r.='<div style="position:float;float:right;text-align:right;padding-right:5px;font-size:1.2em;font-weight:bold;color:blue">'; - $r.=widget::button('act','Actualiser','onClick="compute_all_purchase();"'); - $r.="</div>"; + ob_start(); + require_once('template/form_ledger_detail.php'); + $r.=ob_get_contents(); + ob_clean(); - $r.='<div style="position:float;float:right;text-align:left;font-size:1.2em;font-weight:bold;color:blue" id="sum">'; - if ( $own->MY_TVA_USE=='Y') { - $r.='<br><span id="htva">0.0</span>'; - $r.='<br><span id="tva">0.0</span>'; - $r.='<br><span id="tvac">0.0</span>'; - } else { - $r.='<br><span id="htva">0.0</span>'; - } - $r.="</div>"; + // Set correctly the REQUEST param for jrn_type + $r.= HtmlInput::hidden('jrn_type','ACH'); + $r.= HtmlInput::button('add_item',_('Ajout article'), ' onClick="ledger_add_row()"'); + - - $r.='<div style="position:float;float:right;text-align:right;padding-right:5px;font-size:1.2em;font-weight:bold;color:blue">'; - if ( $own->MY_TVA_USE=='Y') { - $r.='<br>Total HTVA'; - $r.='<br>Total TVA'; - $r.='<br>Total TVAC'; - } else - $r.='<br>Total'; - - $r.="</div>"; - $r.=widget::button('add_item','Ajout article', ' onClick="ledger_sold_add_row()"'); - - $r.="</fieldset>"; - //---------------------------------------------------------------------- - /* Paid By */ - $r.='<fieldset>'; - $r.='<legend> Payé par </legend>'; - $mp=new Acc_Payment($this->db); - $mp->set_parameter('type','ACH'); - $r.=$mp->select(); - $r.='</fieldset>'; - - - - // Set correctly the REQUEST param for jrn_type - $r.=widget::hidden('jrn_type','ACH'); - - $r.=widget::submit("view_invoice","Enregistrer"); - $r.=widget::reset('Effacer '); - $r.='</form>'; - $r.="</DIV>"; - /* if we suggest the pj n# the run the script */ if ( $own->MY_PJ_SUGGEST=='Y') { $r.='<script> update_pj();</script>'; - } - - - $r.=JS_CALC_LINE; + } return $r; } + function input_paid() { + $r=''; + $r.='<fieldset>'; + $r.='<legend> '._('Payé par').' </legend>'; + $mp=new Acc_Payment($this->db); + $mp->set_parameter('type','ACH'); + $r.=$mp->select(); + $r.='</fieldset>'; + return $r; + } + /*!\brief show the summary of the operation and propose to save it *\param array contains normally $_POST. It proposes also to save * the Analytic accountancy @@ -947,8 +895,8 @@ class Acc_Ledger_Purchase extends Acc_Ledger { */ function confirm($p_array) { extract ($p_array); - $this->verify($p_array) ; - + $this->verify($p_array) ; + // to show a select list for the analytic // if analytic is op (optionnel) there is a blank line $own = new Own($this->db); @@ -962,43 +910,48 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $client->strAttribut(ATTR_DEF_CP).' '. $client->strAttribut(ATTR_DEF_CITY)); $lPeriode=new Periode($this->db); - $date_limit=$lPeriode->get_date_limit($periode); + if ($this->check_periode() == true) { + $lPeriode->p_id=$period; + } else { + $lPeriode->find_periode($e_date); + } + $date_limit=$lPeriode->get_date_limit(); $r=""; $r.="<fieldset>"; - $r.="<legend>En-tête facture fournisseur </legend>"; + $r.="<legend>"._('En-tête facture fournisseur')." </legend>"; $r.='<TABLE width="100%">'; $r.='<tr>'; - $r.='<td> Date '.$e_date.'</td>'; - $r.='<td>Echeance '.$e_ech.'</td>'; - $r.='<td> Période Comptable '.$date_limit['p_start'].'-'.$date_limit['p_end'].'</td>'; + $r.='<td> '._('Date').' '.$e_date.'</td>'; + $r.='<td>'._('Echeance').' '.$e_ech.'</td>'; + $r.='<td> '._('Période Comptable').' '.$date_limit['p_start'].'-'.$date_limit['p_end'].'</td>'; $r.='<tr>'; - $r.='<td> Journal '.h($this->get_name()).'</td>'; + $r.='<td> '._('Journal').' '.h($this->get_name()).'</td>'; $r.='</tr>'; $r.='<tr>'; - $r.='<td colspan="2"> Description '.h($e_comm).'</td><td> Pj :'.h($e_pj).'</td>'; + $r.='<td colspan="2"> '._('Description').' '.h($e_comm).'</td><td> Pj :'.h($e_pj).'</td>'; $r.='</tr>'; $r.='<tr>'; - $r.='<td colspan="3"> Fournisseur '.h($e_client.':'.$client_name).'</td>'; + $r.='<td colspan="3"> '._('Fournisseur').' '.h($e_client.':'.$client_name).'</td>'; $r.='</tr>'; $r.='</table>'; $r.='</fieldset>'; - $r.='<fieldset><legend>Détail articles achetés</legend>'; + $r.='<fieldset><legend>'._('Détail articles achetés').'</legend>'; $r.='<table width="100%" border="0">'; $r.='<TR>'; $r.="<th>Code</th>"; - $r.="<th>Dénomination</th>"; - $r.="<th>prix</th>"; + $r.="<th>"._('Dénomination')."</th>"; + $r.="<th>"._('prix')."</th>"; /* vat use */ if ( $own->MY_TVA_USE=='Y') { $r.="<th>tva</th>"; - $r.="<th>quantité</th>"; - $r.='<th> Montant TVA</th>'; - $r.='<th>Montant HTVA</th>'; + $r.="<th>"._('quantité')."</th>"; + $r.='<th> '._('Montant TVA').'</th>'; + $r.='<th>'._('Montant HTVA').'</th>'; } else { - $r.="<th>quantité</th>"; - $r.='<th> Total</th>'; + $r.="<th>"._('quantité')."</th>"; + $r.='<th> '._('Total')."</th>"; } - $r.=($own->MY_ANALYTIC!='nu')?'<th>Compt. Analytique</th>':''; + $r.=($own->MY_ANALYTIC!='nu')?'<th>'._('Compt. Analytique').'</th>':''; $r.='</tr>'; $tot_amount=0.0; $tot_tva=0.0; @@ -1012,7 +965,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $fiche=new fiche($this->db); $fiche->get_by_qcode(${"e_march".$i}); $fiche_name=h($fiche->getName()); - + if ( $own->MY_TVA_USE=='Y') { $idx_tva=${"e_march".$i."_tva_id"}; $oTva=new Acc_Tva($this->db); @@ -1025,14 +978,14 @@ class Acc_Ledger_Purchase extends Acc_Ledger { //----- if tva_amount is not given we compute the vat ---- if ( strlen (trim (${'e_march'.$i.'_tva_amount'})) == 0) { $op=new Acc_Compute(); - + $op->set_parameter("amount",$amount); $op->set_parameter('amount_vat_rate',$oTva->get_parameter('rate')); $op->compute_vat(); $tva_item=$op->get_parameter('amount_vat'); - } else + } else $tva_item=round(${'e_march'.$i.'_tva_amount'},2); - + if (isset($tva[$idx_tva] ) ) $tva[$idx_tva]+=$tva_item; else @@ -1063,7 +1016,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $r.='</td>'; } $r.='<td align="right">'; - $r.=$amount; + $r.=round($amount,2); $r.='</td>'; // encode the pa @@ -1077,33 +1030,33 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $r.=$anc_op->display_form_plan($p_array,$null,$p_mode,$i,$amount); $r.='</td>'; } - + $r.='</tr>'; - + } $r.='</table>'; if ( $own->MY_ANALYTIC!='nu') // use of AA - $r.='<input type="button" value="verifie CA" onClick="verify_ca(\'ok\');">'; + $r.='<input type="button" value="'._('verifie CA').'" onClick="verify_ca(\'ok\');">'; $r.='</fieldset>'; $r.='<fieldset> <legend>Totaux</legend>'; $tot=round(bcadd($tot_amount,$tot_tva),2); $r.='<div style="position:float;float:left;text-align:right;padding-left:5%;padding-right:5%;color:blue;font-size:1.2em;font-weight:bold">'; - $r.='<br>Total HTVA'; + $r.='<br>'._('Total HTVA'); if ($own->MY_TVA_USE=='Y') { foreach ($tva as $i=>$value) { $oTva->set_parameter('id',$i); $oTva->load(); - $r.='<br> TVA à '.$oTva->get_parameter('label'); - $r.='<br>Total TVA'; + $r.='<br> '._('TVA à ').$oTva->get_parameter('label'); + $r.='<br>'._('Total TVA'); } - - $r.='<br>Total TVAC'; + + $r.='<br>'._('Total TVAC'); } $r.="</div>"; @@ -1124,58 +1077,62 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $r.='</fieldset>'; /* Add hidden */ - $r.=widget::hidden('e_client',$e_client); - $r.=widget::hidden('nb_item',$nb_item); - $r.=widget::hidden('p_jrn',$p_jrn); - $r.=widget::hidden('periode',$periode); - $r.=widget::hidden('e_comm',$e_comm); - $r.=widget::hidden('e_date',$e_date); - $r.=widget::hidden('e_ech',$e_ech); - $r.=widget::hidden('jrn_type',$jrn_type); - $r.=widget::hidden('e_pj',$e_pj); - $r.=widget::hidden('e_pj_suggest',$e_pj_suggest); + $r.=HtmlInput::hidden('e_client',$e_client); + $r.=HtmlInput::hidden('nb_item',$nb_item); + $r.=HtmlInput::hidden('p_jrn',$p_jrn); + if ( isset($period)) + $r.=HtmlInput::hidden('period',$period); + $r.=HtmlInput::hidden('e_comm',$e_comm); + $r.=HtmlInput::hidden('e_date',$e_date); + $r.=HtmlInput::hidden('e_ech',$e_ech); + $r.=HtmlInput::hidden('jrn_type',$jrn_type); + $r.=HtmlInput::hidden('e_pj',$e_pj); + $r.=HtmlInput::hidden('e_pj_suggest',$e_pj_suggest); + $mt=microtime(true); + $r.=HtmlInput::hidden('mt',$mt); $e_mp=(isset($e_mp))?$e_mp:0; - $r.=widget::hidden('e_mp',$e_mp); + $r.=HtmlInput::hidden('e_mp',$e_mp); /* Paid by */ /* if the paymethod is not 0 and if a quick code is given */ if ( $e_mp!=0 && strlen (trim (${'e_mp_qcode_'.$e_mp})) != 0 ) { - $r.=widget::hidden('e_mp_qcode_'.$e_mp,${'e_mp_qcode_'.$e_mp}); + $r.=HtmlInput::hidden('e_mp_qcode_'.$e_mp,${'e_mp_qcode_'.$e_mp}); /* needed for generating a invoice */ - $r.=widget::hidden('qcode_dest',${'e_mp_qcode_'.$e_mp}); + $r.=HtmlInput::hidden('qcode_dest',${'e_mp_qcode_'.$e_mp}); $r.="Payé par ".${'e_mp_qcode_'.$e_mp}; $r.='<br>'; } for ($i=0;$i < $nb_item;$i++) { - $r.=widget::hidden("e_march".$i,${"e_march".$i}); - $r.=widget::hidden("e_march".$i."_price",${"e_march".$i."_price"}); - if ( $own->MY_TVA_USE=='Y' ) { - $r.=widget::hidden("e_march".$i."_tva_id",${"e_march".$i."_tva_id"}); - $r.=widget::hidden('e_march'.$i.'_tva_amount', ${'e_march'.$i.'_tva_amount'}); - } - $r.=widget::hidden("e_quant".$i,${"e_quant".$i}); - + $r.=HtmlInput::hidden("e_march".$i,${"e_march".$i}); + $r.=HtmlInput::hidden("e_march".$i."_price",${"e_march".$i."_price"}); + if ( $own->MY_TVA_USE=='Y' ) { + $r.=HtmlInput::hidden("e_march".$i."_tva_id",${"e_march".$i."_tva_id"}); + $r.=HtmlInput::hidden('e_march'.$i.'_tva_amount', ${'e_march'.$i.'_tva_amount'}); + } + $r.=HtmlInput::hidden("e_quant".$i,${"e_quant".$i}); + } // check for upload piece - $file=new widget("file"); + $file=new IFile(); $file->table=0; - $r.="Ajoutez une pièce justificative "; - $r.=$file->IOValue("pj",""); + $r.=_("Ajoutez une pièce justificative "); + $r.=$file->input("pj",""); + $r.=HtmlInput::warnbulle(12); /* Propose to generate a note of fee */ - if ( CountSql($this->db, - "select md_id,md_name from document_modele where md_type=10") > 0 ) + if ( $this->db->count_sql("select md_id,md_name from document_modele where md_type=10") > 0 && + $e_mp != 0) { - - $r.='ou générer une note de frais <input type="checkbox" name="gen_invoice" UNCHECKED>'; + + $r.=_('ou générer une note de frais').' <input type="checkbox" name="gen_invoice" UNCHECKED>'; // We propose to generate the invoice and some template - $doc_gen=new widget("select"); + $doc_gen=new ISelect(); $doc_gen->name="gen_doc"; - $doc_gen->value=make_array($this->db, + $doc_gen->value=$this->db->make_array( "select md_id,md_name from document_modele where md_type=10"); - $r.=$doc_gen->IOValue().'<br>'; + $r.=$doc_gen->input().'<br>'; } return $r; @@ -1187,45 +1144,41 @@ class Acc_Ledger_Purchase extends Acc_Ledger { function show_unpaid() { // Show list of unpaid sell // Date - date of payment - Customer - amount - // Nav. bar + // Nav. bar $step=$_SESSION['g_pagesize']; $page=(isset($_GET['offset']))?$_GET['page']:1; $offset=(isset($_GET['offset']))?$_GET['offset']:0; - - + + $sql=SQL_LIST_UNPAID_INVOICE_DATE_LIMIT." and jr_def_id=".$this->id ; - list($max_line,$list)=ListJrn($this->db,$this->id,$sql,null,$offset,1); + list($max_line,$list)=ListJrn($this->db,$sql,null,$offset,1); $sql=SQL_LIST_UNPAID_INVOICE." and jr_def_id=".$this->id ; - list($max_line2,$list2)=ListJrn($this->db,$this->id,$sql,null,$offset,1); + list($max_line2,$list2)=ListJrn($this->db,$sql,null,$offset,1); // Get the max line $m=($max_line2>$max_line)?$max_line2:$max_line; $bar2=jrn_navigation_bar($offset,$m,$step,$page); echo $bar2; - echo '<h2 class="info"> Echeance dépassée </h2>'; + echo '<h2 class="info"> '._('Echeance dépassée').' </h2>'; echo $list; - echo '<h2 class="info"> Non Payée </h2>'; + echo '<h2 class="info"> '._('Non Payée').' </h2>'; echo $list2; echo $bar2; // Add hidden parameter - $hid=new widget("hidden"); + $hid=new IHidden(); echo '<hr>'; if ( $m != 0 ) - echo widget::submit('paid','Mise à jour paiement'); + echo HtmlInput::submit('paid',_('Mise à jour paiement')); } - /*!\brief Test function - */ - static function test_me() { - } - + } - + diff --git a/include/class_acc_ledger_sold.php b/include/class_acc_ledger_sold.php index e65793794..4e66dd4de 100644 --- a/include/class_acc_ledger_sold.php +++ b/include/class_acc_ledger_sold.php @@ -23,6 +23,14 @@ /*!\file * \brief class for the sold, herits from acc_ledger */ +require_once("class_iselect.php"); +require_once('class_itva_select.php'); +require_once("class_icard.php"); +require_once("class_ispan.php"); +require_once("class_ihidden.php"); +require_once("class_idate.php"); +require_once("class_itext.php"); +require_once("class_ifile.php"); require_once('class_acc_ledger.php'); require_once('class_acc_compute.php'); require_once('class_anc_operation.php'); @@ -31,34 +39,54 @@ require_once('class_acc_payment.php'); require_once('ac_common.php'); require_once('class_own.php'); -/*!\brief Handle the ledger of sold, +/*!\brief Handle the ledger of sold, * * */ -class Acc_Ledger_Sold extends Acc_Ledger { +class Acc_Ledger_Sold extends Acc_Ledger { function __construct ($p_cn,$p_init) { parent::__construct($p_cn,$p_init); + $this->type='VEN'; } /*!\brief verify that the data are correct before inserting or confirming *\param an array (usually $_POST) *\return String - *\note return an AcException if an error occurs + *\throw Exception if an error occurs */ public function verify($p_array) { extract ($p_array); + /* check for a double reload */ + if ( isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1',array($mt)) != 0 ) + throw new Exception (_('Double Encodage'),5); + /* check if there is a customer */ - if ( strlen(trim($e_client)) == 0 ) - throw new AcException('Vous n\'avez pas donné de client',11); + if ( strlen(trim($e_client)) == 0 ) + throw new Exception(_('Vous n\'avez pas donné de client'),11); /* check if the date is valid */ if ( isDate($e_date) == null ) { - throw new AcException('Date invalide', 2); + throw new Exception(_('Date invalide'), 2); + } + + $oPeriode=new Periode($this->db); + if ( $this->check_periode() == true) { + $tperiode=$period; + /* check that the datum is in the choosen periode */ + $oPeriode->p_id=$period; + list ($min,$max)=$oPeriode->get_date_limit(); + + if ( cmpDate($e_date,$min) < 0 || + cmpDate($e_date,$max) > 0) + throw new Exception(_('Date et periode ne correspondent pas'),6); + } else { + $per=new Periode($this->db); + $tperiode=$per->find_periode($e_date); } /* check if the periode is closed */ - if ( $this->is_closed($periode)==1 ) + if ( $this->is_closed($tperiode)==1 ) { - throw new AcException('Periode fermee',6); + throw new Exception(_('Periode fermee'),6); } /* check if we are using the strict mode */ if( $this->check_strict() == true) { @@ -66,33 +94,28 @@ class Acc_Ledger_Sold extends Acc_Ledger { operation */ $last_date=$this->get_last_date(); if ( $last_date != null && cmpDate($e_date,$last_date) < 0 ) - throw new AcException('Vous utilisez le mode strict la dernière operation est date du ' - .$last_date.' vous ne pouvez pas encoder à une date antérieure',13); + throw new Exception(_('Vous utilisez le mode strict la dernière operation est date du ') + .$last_date._(' vous ne pouvez pas encoder à une date antérieure'),13); } - /* check that the datum is in the choosen periode */ - $per=new Periode($this->db); - list ($min,$max)=$per->get_date_limit($periode); - if ( cmpDate($e_date,$min) < 0 || - cmpDate($e_date,$max) > 0) - throw new AcException('Date et periode ne correspondent pas',6); + $fiche=new fiche($this->db); $fiche->get_by_qcode($e_client); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) - throw new AcException('La fiche '.$e_client.'n\'a pas de poste comptable',8); + throw new Exception(_('La fiche ').$e_client._('n\'a pas de poste comptable'),8); /* The account exists */ $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); if ( $poste->load() == false ){ - throw new AcException('Pour la fiche '.$e_client.' le poste comptable ['.$poste->id.'] n\'existe pas',9); + throw new Exception(_('Pour la fiche ').$e_client._(' le poste comptable [').$poste->id._('] n\'existe pas'),9); } /* Check if the card belong to the ledger */ $fiche=new fiche ($this->db); $fiche->get_by_qcode($e_client,'deb'); if ( $fiche->belong_ledger($p_jrn) !=1 ) - throw new AcException('La fiche '.$e_client.'n\'est pas accessible à ce journal',10); + throw new Exception(_('La fiche ').$e_client._('n\'est pas accessible à ce journal'),10); $nb=0; @@ -103,29 +126,29 @@ class Acc_Ledger_Sold extends Acc_Ledger { if ( strlen(trim(${'e_march'.$i}))== 0) continue; /* check if amount are numeric and */ if ( isNumber(${'e_march'.$i.'_price'}) == 0 ) - throw new AcException('La fiche '.${'e_march'.$i}.'a un montant invalide ['.${'e_march'.$i}.']',6); + throw new Exception(_('La fiche ').${'e_march'.$i}._('a un montant invalide [').${'e_march'.$i}.']',6); if ( isNumber(${'e_quant'.$i}) == 0 ) - throw new AcException('La fiche '.${'e_march'.$i}.'a une quantité invalide ['.${'e_quant'.$i}.']',7); + throw new Exception(_('La fiche ').${'e_march'.$i}._('a une quantité invalide [').${'e_quant'.$i}.']',7); /* check if all card has a ATTR_DEF_ACCOUNT*/ $fiche=new fiche($this->db); $fiche->get_by_qcode(${'e_march'.$i}); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) - throw new AcException('La fiche '.${'e_march'.$i}.'n\'a pas de poste comptable',8); + throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'a pas de poste comptable'),8); /* The account exists */ $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); if ( $poste->load() == false ){ - throw new AcException('Pour la fiche '.${'e_march'.$i}.' le poste comptable ['.$poste->id.'n\'existe pas',9); + throw new Exception(_('Pour la fiche ').${'e_march'.$i}._(' le poste comptable [').$poste->id._('n\'existe pas'),9); } /* Check if the card belong to the ledger */ $fiche=new fiche ($this->db); $fiche->get_by_qcode(${'e_march'.$i}); if ( $fiche->belong_ledger($p_jrn,'cred') !=1 ) - throw new AcException('La fiche '.${'e_march'.$i}.'n\'est pas accessible à ce journal',10); + throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'est pas accessible à ce journal'),10); $nb++; } if ( $nb == 0 ) - throw new AcException('Il n\'y a aucune marchandise',12); + throw new Exception(_('Il n\'y a aucune marchandise'),12); //------------------------------------------------------ // The "Paid By" check //------------------------------------------------------ @@ -133,25 +156,33 @@ class Acc_Ledger_Sold extends Acc_Ledger { } - public function save() { + public function save($p_array) { echo "<h2> Acc_Ledger_Sold::save Not implemented</h2>"; } /*!\brief insert into the database, it calls first the verify function *\param $p_array is usually $_POST or a predefined operation *\return string - *\note throw an AcException + *\note throw an Exception */ public function insert($p_array) { extract ($p_array); - $this->verify($p_array) ; + $this->verify($p_array) ; $own=new own($this->db); - $group=NextSequence($this->db,"s_oa_group"); /* for analytic */ - $seq=NextSequence($this->db,'s_grpt'); + $group=$this->db->get_next_seq("s_oa_group"); /* for analytic */ + $seq=$this->db->get_next_seq('s_grpt'); $this->id=$p_jrn; $internal=$this->compute_internal_code($seq); - + + $oPeriode=new Periode($this->db); + $check_periode=$this->check_periode(); + + if ( $check_periode == true ) + $tperiode=$period; + else + $tperiode=$oPeriode->find_periode($e_date); + $cust=new fiche($this->db); $cust->get_by_qcode($e_client); $poste=$cust->strAttribut(ATTR_DEF_ACCOUNT); @@ -160,7 +191,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { $tot_amount=0; $tot_tva=0; $tot_debit=0; - StartSql($this->db); + $this->db->start(); /* Save all the items without vat */ for ($i=0;$i< $nb_item;$i++) { if ( strlen(trim(${'e_march'.$i})) == 0 ) continue; @@ -179,24 +210,17 @@ class Acc_Ledger_Sold extends Acc_Ledger { $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; $acc_operation->type='c'; - $acc_operation->periode=$periode; + $acc_operation->periode=$tperiode; $acc_operation->qcode=${"e_march".$i}; if ( $amount < 0 ) $tot_debit=bcadd($tot_debit,abs($amount)); $j_id=$acc_operation->insert_jrnx(); - - if ($own->MY_TVA_USE == 'Y' ) { + + if ($own->MY_TVA_USE == 'Y' ) { /* Compute sum vat */ $oTva=new Acc_Tva($this->db); $idx_tva=${'e_march'.$i.'_tva_id'}; - $oTva->set_parameter('id',$idx_tva); - $oTva->load(); - $op_tva=new Acc_Compute(); - $op_tva->set_parameter("amount",$amount); - $op_tva->set_parameter('amount_vat_rate',$oTva->get_parameter('rate')); - $op_tva->compute_vat(); - $tva_item=$op_tva->get_parameter('amount_vat'); - + $tva_item=${'e_march'.$i.'_tva_amount'}; if (isset($tva[$idx_tva] ) ) $tva[$idx_tva]+=$tva_item; @@ -210,42 +234,49 @@ class Acc_Ledger_Sold extends Acc_Ledger { * material) */ $nNeg=(${"e_quant".$i}<0)?-1:1; - - // always save quantity but in withStock we can find + + // always save quantity but in withStock we can find // what card need a stock management - InsertStockGoods($this->db,$j_id,${'e_march'.$i},$nNeg*${'e_quant'.$i},'c') ; if ( $own->MY_ANALYTIC != "nu" ) { // for each item, insert into operation_analytique */ - $op=new Anc_Operation($this->db); + $op=new Anc_Operation($this->db); $op->oa_group=$group; $op->j_id=$j_id; $op->oa_date=$e_date; - $op->oa_debit=($amount < 0 )?'t':'f'; + $op->oa_debit=($amount < 0 )?'t':'f'; echo_debug(__FILE__.':'.__LINE__,"Description is $e_comm"); $op->oa_description=FormatString($e_comm); $op->save_form_plan($_POST,$i); } if ( $own->MY_TVA_USE=='Y') { - /* save into quant_sold */ - $r=ExecSql($this->db,"select insert_quant_sold ". - "('".$internal."',".$j_id.",'".${'e_march'.$i} - ."',".${'e_quant'.$i}.",".$amount. - ",".$tva_item. - ",".$idx_tva.",'".$e_client."')"); - - } else { - $r=ExecSql($this->db,"select insert_quant_sold ". - "('".$internal."',".$j_id.",'".${'e_march'.$i} - ."',".${'e_quant'.$i}.",".$amount. - ",0". - ",null,'".$e_client."')"); - + /* save into quant_sold */ + $r=$this->db->exec_sql("select insert_quant_sold ($1,$2,$3,$4,$5,$6,$7,$8)", + array($internal, /* 1 */ + $j_id, /* 2 */ + ${'e_march'.$i} , /* 3 */ + ${'e_quant'.$i}, /* 4 */ + $amount, /* 5 */ + $tva_item, /* 6 */ + $idx_tva, /* 7 */ + $e_client)); /* 8 */ + + } else { + $r=$this->db->exec_sql("select insert_quant_sold ($1,$2,$3,$4,$5,$6,$7,$8) ", + array($internal, /* 1 */ + $j_id, /* 2 */ + ${'e_march'.$i}, /* 3 */ + ${'e_quant'.$i}, /* 4 */ + $amount, // 5 + 0, + 0, + $e_client)); + } // if ( $own->MY_TVA_USE=='Y') { }// end loop : save all items - + /* save total customer */ $cust_amount=bcadd($tot_amount,$tot_tva); $acc_operation=new Acc_Operation($this->db); @@ -255,15 +286,15 @@ class Acc_Ledger_Sold extends Acc_Ledger { $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; $acc_operation->type='d'; - $acc_operation->periode=$periode; + $acc_operation->periode=$tperiode; $acc_operation->qcode=${"e_client"}; if ( $cust_amount > 0 ) $tot_debit=bcadd($tot_debit,$cust_amount); $acc_operation->insert_jrnx(); - - /* save all vat + + /** save all vat * $i contains the tva_id and value contains the vat amount - * if if ($own->MY_TVA_USE == 'Y' ) + * if if ($own->MY_TVA_USE == 'Y' ) */ if ($own->MY_TVA_USE == 'Y' ) { foreach ($tva as $i => $value) { @@ -272,7 +303,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { $oTva->load(); $poste_vat=$oTva->get_side('c'); - + $cust_amount=bcadd($tot_amount,$tot_tva); $acc_operation=new Acc_Operation($this->db); $acc_operation->date=$e_date; @@ -281,11 +312,11 @@ class Acc_Ledger_Sold extends Acc_Ledger { $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; $acc_operation->type='c'; - $acc_operation->periode=$periode; + $acc_operation->periode=$tperiode; if ($value < 0 ) $tot_debit=bcadd($tot_debit,abs($value)); $acc_operation->insert_jrnx(); - + } } // if ($own->MY_TVA_USE=='Y') /* insert into jrn */ @@ -296,9 +327,12 @@ class Acc_Ledger_Sold extends Acc_Ledger { $acc_operation->desc=$e_comm; $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; - $acc_operation->periode=$periode; + $acc_operation->periode=$tperiode; $acc_operation->pj=$e_pj; + $acc_operation->mt=$mt; + $acc_operation->insert_jrn(); + $this->pj=$acc_operation->set_pj(); /* if e_suggest != e_pj then do not increment sequence */ @@ -307,21 +341,23 @@ class Acc_Ledger_Sold extends Acc_Ledger { $this->inc_seq_pj(); } - ExecSql($this->db,"update jrn set jr_internal='".$internal."' where ". + $this->db->exec_sql("update jrn set jr_internal='".$internal."' where ". " jr_grpt_id = ".$seq); - /* Save the attachment */ + /* Save the attachment or generate doc*/ if ( isset ($_FILES)) { - if ( sizeof($_FILES) != 0 ) - save_upload_document($this->db,$seq); - } else - /* Generate an invoice and save it into the database */ - if ( isset($_POST['gen_invoice'])) { - echo $this->create_document($internal,$p_array); - echo '<br>'; + if ( strlen(trim($_FILES['pj']['name'])) != 0 ) + $this->db->save_upload_document($seq); + else + /* Generate an invoice and save it into the database */ + if ( isset($_POST['gen_invoice'])) { + $this->create_document($internal,$p_array); + $this->doc= _('Document généré'); + $this->doc.='<A STYLE="display:inline;" HREF="show_pj.php?'.dossier::get().'&jr_grpt_id='.$seq.'&jrn='.$this->id.'">Facture</A>'; + } } //---------------------------------------- - // Save the payer + // Save the payer //---------------------------------------- if ( $e_mp != 0 ) { /* mp */ @@ -334,7 +370,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { $acfiche->get_by_qcode($fqcode); /* jrnx */ - $acseq=NextSequence($this->db,'s_grpt'); + $acseq=$this->db->get_next_seq('s_grpt'); $acjrn=new Acc_Ledger($this->db,$mp->get_parameter('ledger')); $acinternal=$acjrn->compute_internal_code($acseq); @@ -347,7 +383,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { $acc_pay->desc=$e_comm; $acc_pay->grpt=$acseq; $acc_pay->jrn=$mp->get_parameter('ledger'); - $acc_pay->periode=$periode; + $acc_pay->periode=$tperiode; $acc_pay->type='d'; $acc_pay->insert_jrnx(); @@ -360,26 +396,26 @@ class Acc_Ledger_Sold extends Acc_Ledger { $acc_pay->desc=$e_comm; $acc_pay->grpt=$acseq; $acc_pay->jrn=$mp->get_parameter('ledger'); - $acc_pay->periode=$periode; + $acc_pay->periode=$tperiode; $acc_pay->type='c'; $acc_pay->insert_jrnx(); - + /* insert into jrn */ $acc_pay->insert_jrn(); $acjrn->grpt_id=$acseq; $acjrn->update_internal_code($acinternal); - + $r1=$this->get_id($internal); $r2=$this->get_id($acinternal); /* set the flag paid */ - $Res=ExecSqlParam($this->db,"update jrn set jr_rapt='paid' where jr_id=$1",array($r1)); + $Res=$this->db->exec_sql("update jrn set jr_rapt='paid' where jr_id=$1",array($r1)); /* Reconcialiation */ $rec=new Acc_Reconciliation($this->db); $rec->set_jr_id($r1); $rec->insert($r2); } - + } catch (Exception $e) { @@ -387,10 +423,13 @@ class Acc_Ledger_Sold extends Acc_Ledger { 'Erreur dans l\'enregistrement '. __FILE__.':'.__LINE__.' '. $e->getMessage(); - Rollback($this->db); + echo $e->getTrace(); + + $this->db->rollback(); exit(); } - Commit($this->db); + $this->db->commit(); + return $internal; } @@ -402,402 +441,11 @@ class Acc_Ledger_Sold extends Acc_Ledger { echo "<h2> Acc_Ledger_Sold::load Not implemented</h2>"; } - /*!\brief Show all the operation, propose a form to select the - *ledger and the periode - *\return none - *\note echo directly, there is no return with the html code - */ - public function show_ledger() { - $w=new widget("select"); - $User=new User($this->db); - // filter on the current year - $filter_year=" where p_exercice='".$User->get_exercice()."'"; - - $periode_start=make_array($this->db,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); - $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); - $w->selected=$current; - - echo 'Période '.$w->IOValue("p_periode",$periode_start); - $wLedger=$this->select_ledger('VEN',3); - if ( $wLedger == null ) - exit('Pas de journal disponible'); - echo 'Journal '.$wLedger->IOValue(); - echo JS_SEARCH_CARD; - echo JS_PROTOTYPE; - echo JS_AJAX_FICHE; - $qcode=(isset($_GET['qcode']))?$_GET['qcode']:""; - $this->type='VEN'; - $all=$this->get_all_fiche_def(); - - $w=new widget('js_search_only'); - $w->name='qcode'; - $w->value=$qcode; - $w->label=''; - $w->extra='filter'; - $w->extra2='QuickCode'; - $w->table=0; - $sp= new widget("span"); - echo $w->IOValue(); - - echo $sp->IOValue("qcode_label","",$qcode); - - echo widget::submit('gl_submit','Valider'); - // Show list of sell - // Date - date of payment - Customer - amount - if ( $current == -1) { - $cond=" and jr_tech_per in (select p_id from parm_periode where p_exercice='".$User->get_exercice()."')"; - } else { - $cond=" and jr_tech_per=".$current; - } - - $sql=SQL_LIST_ALL_INVOICE.$cond." and jr_def_id=".$this->id ; - $step=$_SESSION['g_pagesize']; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - - /* security */ - $available_ledger=$User->get_ledger_sql(); - - $l=""; - // check if qcode contains something - if ( $qcode != "" ) - { - $qcode=Formatstring($qcode); - // add a condition to filter on the quick code - $l=" and jr_grpt_id in (select j_grpt from jrnx where j_qcode=upper('$qcode')) "; - $sql="where jrn_def_type='VEN' $cond $l and $available_ledger "; - } - - - list($max_line,$list)=ListJrn($this->db,$this->id,$sql,null,$offset,1); - $bar=jrn_navigation_bar($offset,$max_line,$step,$page); - - echo "<hr>$bar"; - echo '<form method="POST">'; - echo dossier::hidden(); - $hid=new widget("hidden"); - - echo $list; - if ( $max_line !=0 ) - echo widget::submit('paid','Mise à jour paiement'); - echo '</FORM>'; - echo "$bar <hr>"; - - echo '</div>'; - - - } public function delete() { echo "<h2> Acc_Ledger_Sold::delete Not implemented</h2>"; } - /*!\brief display the form for entering data for invoice - *\param $p_array is null or you can put the predef operation or the $_POST - *\return string - */ - public function display_form($p_array=null) { - if ( $p_array != null ) extract($p_array); - $user = new User($this->db); - $own=new Own($this->db); - // The first day of the periode - $oPeriode=new Periode($this->db); - list ($l_date_start,$l_date_end)=$oPeriode->get_date_limit($user->get_periode()); - - $op_date=( ! isset($e_date) ) ?$l_date_start:$e_date; - $e_ech=(isset($e_ech))?$e_ech:""; - $e_comm=(isset($e_comm))?$e_comm:""; - - $r=""; - - $r.=JS_INFOBULLE; - $r.=JS_SEARCH_CARD; - //!\todo check if JS_SHOW_TVA is really needed here otherwise remove it (same for class_acc_ledger_purchase) - $r.=JS_SHOW_TVA; - $r.=JS_TVA; - $r.=JS_AJAX_FICHE; - - - $r.=dossier::hidden(); - $r.=widget::hidden('phpsessid',$_REQUEST['PHPSESSID']); - $r.="<fieldset>"; - $r.="<legend>En-tête facture client </legend>"; - - $r.='<TABLE width="100%">'; - // Date - //-- - $Date=new widget("js_date"); - $Date->SetReadOnly(false); - $Date->table=1; - $Date->tabindex=1; - $r.="<tr>"; - $r.=$Date->IOValue("e_date",$op_date,"Date"); - // Payment limit - //-- - $Echeance=new widget("js_date"); - $Echeance->SetReadOnly(false); - $Echeance->table=1; - $Echeance->tabindex=2; - $label=widget::infobulle(4); - $r.=$Echeance->IOValue("e_ech",$e_ech,"Echeance ".$label); - - // Periode - //-- - $l_user_per=$user->get_periode(); - $def=(isset($periode))?$periode:$l_user_per; - $l_form_per=FormPeriode($this->db,$def,OPEN); - $r.="<td class=\"input_text\">"; - $label=widget::infobulle(3); - $r.="Période comptable $label $def</td><td>".$l_form_per; - $r.="</td>"; - $r.="</tr><tr>"; - // Ledger (p_jrn) - //-- - $wLedger=$this->select_ledger('VEN',2); - /* if we suggest the next pj, then we need a javascript */ - $add_js=""; - if ( $own->MY_PJ_SUGGEST=='Y') { - $add_js="update_pj();"; - } - - if ( $wLedger == null ) - exit('Pas de journal disponible'); - $wLedger->table=1; - $wLedger->javascript="onChange='update_predef(\"ven\",\"f\");$add_js'"; - $wLedger->label=" Journal ".widget::infobulle(2) ; - - $r.=$wLedger->IOValue(); - // Comment - //-- - $Commentaire=new widget("text"); - $Commentaire->table=0; - $Commentaire->SetReadOnly(false); - $Commentaire->size=60; - $Commentaire->tabindex=3; - $label=" Description ".widget::infobulle(1) ; - $r.="<tr>"; - $r.='<td class="input_text">'.$label.'</td>'. - '<td colspan="3">'.$Commentaire->IOValue("e_comm",h($e_comm))."</td>"; - // PJ - //-- - /* suggest PJ ? */ - $default_pj=''; - if ( $own->MY_PJ_SUGGEST=='Y') { - $default_pj=$this->guess_pj(); - } - - $pj=new widget('text'); - - - $pj->table=0; - $pj->name="e_pj"; - $pj->size=10; - $pj->value=(isset($e_pj))?$e_pj:$default_pj; - - $r.='<td class="input_text">Num.PJ</td><td>'.$pj->IOValue().widget::hidden('e_pj_suggest',$default_pj).'</td>'; - $r.="</tr>"; - - // Display the customer - //-- - $fiche='deb'; - echo_debug('user_form_ven.php',__LINE__,"Client Nombre d'enregistrement ".sizeof($fiche)); - // Save old value and set a new one - //-- - $e_client=( isset ($e_client) )?$e_client:""; - $e_client_label=" ";//str_pad("",100,"."); - - - // retrieve e_client_label - //-- - - if ( strlen(trim($e_client)) != 0) { - $fClient=new fiche($this->db); - $fClient->get_by_qcode($e_client); - $e_client_label=$fClient->strAttribut(ATTR_DEF_NAME).' '. - ' Adresse : '.$fClient->strAttribut(ATTR_DEF_ADRESS).' '. - $fClient->strAttribut(ATTR_DEF_CP).' '. - $fClient->strAttribut(ATTR_DEF_CITY).' '; - - - } - - $W1=new widget("js_search_only"); - $W1->label="Client ".widget::infobulle(0) ; - $W1->name="e_client"; - $W1->tabindex=3; - $W1->value=$e_client; - $W1->table=0; - $W1->extra=$fiche; // list of card - $W1->extra2="Recherche"; - $r.='<TR><td colspan="5" >'.$W1->IOValue(); - $client_label=new widget("span"); - $client_label->table=0; - $r.=$client_label->IOValue("e_client_label",$e_client_label)."</TD></TR>"; - - $r.="</TABLE>"; - - // Record the current number of article - $Hid=new widget('hidden'); - $p_article= ( isset ($p_article))?$p_article:MAX_ARTICLE; - $r.=$Hid->IOValue("nb_item",$p_article); - $e_comment=(isset($e_comment))?$e_comment:""; - $r.="</fieldset>"; - - // Start the div for item to sell - $r.="<DIV>"; - $r.='<fieldset><legend>Détail articles vendus</legend>'; - $r.='<TABLE ID="sold_item">'; - $r.='<TR>'; - $r.="<th></th>"; - $label=widget::infobulle(0) ; - $r.="<th>Code $label</th>"; - $r.="<th>Dénomination</th>"; - $label=widget::infobulle(6) ; - $r.="<th>$label prix / unité htva </th>"; - if ( $own->MY_TVA_USE=='Y') { - $r.="<th>tva</th>"; - $r.="<th>montant total tva</th>"; - } - - $r.="<th>quantité</th>"; - - $r.='</TR>'; - - $own=new Own($this->db); - // For each article - //-- - for ($i=0;$i< MAX_ARTICLE;$i++) { - // Code id, price & vat code - //-- - $march=(isset(${"e_march$i"}))?${"e_march$i"}:""; - $march_price=(isset(${"e_march".$i."_price"}))?${"e_march".$i."_price"}:""; - if ( $own->MY_TVA_USE=='Y') - $march_tva_id=(isset(${"e_march$i"."_tva_id"}))?${"e_march$i"."_tva_id"}:""; - - - $march_label=" "; - // retrieve the tva label and name - //-- - if ( strlen(trim($march))!=0 ) { - $fMarch=new fiche($this->db); - $fMarch->get_by_qcode($march); - $march_label=$fMarch->strAttribut(ATTR_DEF_NAME); - if ( $own->MY_TVA_USE=='Y') { - if ( ! (isset(${"e_march$i"."_tva_id"}))) - $march_tva_id=$fMarch->strAttribut(ATTR_DEF_TVA); - } - } - // Show input - //-- - $W1=new widget("js_search_only"); - $W1->label=""; - $W1->name="e_march".$i; - $W1->value=$march; - $W1->table=1; - $W1->extra2="Recherche"; - $W1->extra='cred'; // credits - $W1->javascript=sprintf('onBlur="ajaxFid(\'%s\',\'%s\',\'%s\');compute_sold(%d)"', - $W1->name, - $W1->extra, //deb or cred - $_REQUEST['PHPSESSID'], - $i - ); - $W1->readonly=false; - $r.="<TR>".$W1->IOValue(); - // For computing we need some hidden field for holding the value - if ( $own->MY_TVA_USE=='Y') $r.=widget::hidden('tva_march'.$i,0); - $r.=widget::hidden('htva_march'.$i,0); - $r.=widget::hidden('tvac_march'.$i,0); - $r.="</TD>"; - $Span=new widget ("span"); - $Span->SetReadOnly(false); - // card's name, price - //-- - $r.='<TD style="width:55%;border-bottom:1px dotted grey;">'.$Span->IOValue("e_march".$i."_label",$march_label)."</TD>"; - // price - $Price=new widget("text"); - $Price->SetReadOnly(false); - $Price->table=1; - $Price->size=9; - $Price->javascript="onBlur='compute_sold($i)'"; - $r.=$Price->IOValue("e_march".$i."_price",$march_price); - // if tva is not needed then no tva field - if ( $own->MY_TVA_USE == 'Y' ) { - // vat label - //-- - $select_tva=make_array($this->db,"select tva_id,tva_label from tva_rate order by tva_rate desc",0); - $Tva=new widget("select"); - $Tva->javascript="onChange=compute_sold($i)"; - $Tva->table=1; - $Tva->selected=$march_tva_id; - $r.=$Tva->IOValue("e_march$i"."_tva_id",$select_tva); - // vat amount (disable) - //-- - $wTva_amount=new widget("text"); - $wTva_amount->table=1; - $wTva_amount->readonly=true; - $wTva_amount->size=6; - $r.=$wTva_amount->IOValue("tva_march$i"."_show"); - } - // quantity - //-- - $quant=(isset(${"e_quant$i"}))?${"e_quant$i"}:"1"; - $Quantity=new widget("text"); - $Quantity->SetReadOnly(false); - $Quantity->table=1; - $Quantity->size=9; - $Quantity->javascript="onChange=compute_sold($i)"; - $r.=$Quantity->IOValue("e_quant".$i,$quant); - - $r.="</tr>"; - } - - - - $r.="</TABLE>"; - $r.='<div style="position:float;float:right;text-align:right;padding-right:5px;font-size:1.2em;font-weight:bold;color:blue">'; - $r.=widget::button('act','Actualiser','onClick="compute_all_sold();"'); - $r.="</div>"; - - $r.='<div style="position:float;float:right;text-align:left;font-size:1.2em;font-weight:bold;color:blue" id="sum">'; - $r.='<br><span id="htva">0.0</span>'; - if ( $own->MY_TVA_USE=='Y' ) { - $r.='<br><span id="tva">0.0</span>'; - $r.='<br><span id="tvac">0.0</span>'; - } - $r.="</div>"; - - - - $r.='<div style="position:float;float:right;text-align:right;padding-right:5px;font-size:1.2em;font-weight:bold;color:blue">'; - if ( $own->MY_TVA_USE=='Y') { - $r.='<br>Total HTVA'; - $r.='<br>Total TVA'; - $r.='<br>Total TVAC'; - } - $r.='<br>Total'; - $r.="</div>"; - - $r.="</fieldset>"; - // Set correctly the REQUEST param for jrn_type - $r.=widget::hidden('jrn_type','VEN'); - - //---------------------------------------------------------------------- - /* Paid By */ - $r.='<fieldset>'; - $r.='<legend> Payé par </legend>'; - $mp=new Acc_Payment($this->db); - $mp->set_parameter('type','VEN'); - $r.=$mp->select(); - $r.='</fieldset>'; - - $r.=widget::button('add_item','Ajout article', ' onClick="ledger_sold_add_row()"'); - $r.=widget::submit("view_invoice","Enregistrer"); - $r.=widget::reset('Effacer '); - - $r.="</DIV>"; - return $r; - } /*!\brief show the summary of the operation and propose to save it *\param array contains normally $_POST. It proposes also to save * the Analytic accountancy @@ -805,7 +453,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { */ function confirm($p_array) { extract ($p_array); - $this->verify($p_array) ; + $this->verify($p_array) ; // to show a select list for the analytic & VAT USE // if analytic is op (optionnel) there is a blank line @@ -820,40 +468,45 @@ class Acc_Ledger_Sold extends Acc_Ledger { $client->strAttribut(ATTR_DEF_CP).' '. $client->strAttribut(ATTR_DEF_CITY); $lPeriode=new Periode($this->db); - $date_limit=$lPeriode->get_date_limit($periode); + if ($this->check_periode() == true) { + $lPeriode->p_id=$period; + } else { + $lPeriode->find_periode($e_date); + } + $date_limit=$lPeriode->get_date_limit(); $r=""; $r.="<fieldset>"; - $r.="<legend>En-tête facture client </legend>"; + $r.="<legend>"._('En-tête facture client')." </legend>"; $r.='<TABLE width="100%">'; $r.='<tr>'; - $r.='<td> Date '.$e_date.'</td>'; - $r.='<td>Echeance '.$e_ech.'</td>'; - $r.='<td> Période Comptable '.$date_limit['p_start'].'-'.$date_limit['p_end'].'</td>'; + $r.='<td> '._('Date').' '.$e_date.'</td>'; + $r.='<td>'._('Echeance').' '.$e_ech.'</td>'; + $r.='<td> '._('Période Comptable').' '.$date_limit['p_start'].'-'.$date_limit['p_end'].'</td>'; $r.='<tr>'; - $r.='<td> Journal '.h($this->get_name()).'</td>'; + $r.='<td> '._('Journal').' '.h($this->get_name()).'</td>'; $r.='</tr>'; $r.='<tr>'; - $r.='<td colspan="3"> Description '.h($e_comm).'</td><td>PJ Num: '.h($e_pj).'</td>'; + $r.='<td colspan="3"> '._('Description').' '.h($e_comm).'</td><td>PJ Num: '.h($e_pj).'</td>'; $r.='</tr>'; $r.='<tr>'; - $r.='<td colspan="3"> Client '.h($e_client.':'.$client_name).'</td>'; + $r.='<td colspan="3"> '._('Client').' '.h($e_client.':'.$client_name).'</td>'; $r.='</tr>'; $r.='</table>'; $r.='</fieldset>'; - $r.='<fieldset><legend>Détail articles vendus</legend>'; + $r.='<fieldset><legend>'._('Détail articles vendus').'</legend>'; $r.='<table width="100%" border="0">'; $r.='<TR>'; - $r.="<th>Code</th>"; - $r.="<th>Dénomination</th>"; - $r.="<th>prix</th>"; - $r.="<th>tva</th>"; - $r.="<th>quantité</th>"; + $r.="<th>"._('Code')."</th>"; + $r.="<th>"._('Dénomination')."</th>"; + $r.="<th>"._('prix')."</th>"; + $r.="<th>"._('tva')."</th>"; + $r.="<th>"._('quantité')."</th>"; if ( $own->MY_TVA_USE=='Y') { - $r.='<th> Montant TVA</th>'; - $r.='<th>Montant HTVA</th>'; + $r.='<th> '._('Montant TVA').'</th>'; + $r.='<th>'._('Montant HTVA').'</th>'; } - $r.=($own->MY_ANALYTIC!='nu')?'<th>Compt. Analytique</th>':''; + $r.=($own->MY_ANALYTIC!='nu')?'<th>'._('Compt. Analytique').'</th>':''; $r.='</tr>'; $tot_amount=0.0; $tot_tva=0.0; @@ -867,7 +520,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { if ( $own->MY_TVA_USE=='Y') { $oTva=new Acc_Tva($this->db); $idx_tva=${"e_march".$i."_tva_id"}; - + $oTva->set_parameter('id',$idx_tva); $oTva->load(); } @@ -877,7 +530,8 @@ class Acc_Ledger_Sold extends Acc_Ledger { if ( $own->MY_TVA_USE=='Y') { $op->set_parameter('amount_vat_rate',$oTva->get_parameter('rate')); $op->compute_vat(); - $tva_item=$op->get_parameter('amount_vat'); + $tva_computed=$op->get_parameter('amount_vat'); + $tva_item=${"e_march".$i."_tva_amount"}; if (isset($tva[$idx_tva] ) ) $tva[$idx_tva]+=$tva_item; else @@ -885,13 +539,13 @@ class Acc_Ledger_Sold extends Acc_Ledger { $tot_tva=round(bcadd($tva_item,$tot_tva),2); } $tot_amount=round(bcadd($tot_amount,$amount),2); - + $r.='<tr>'; $r.='<td>'; $r.=${"e_march".$i}; $r.='</td>'; $r.='<TD style="width:60%;border-bottom:1px dotted grey;">'; - $r.=h($fiche_name); + $r.=$fiche_name; $r.='</td>'; $r.='<td align="right">'; $r.=${"e_march".$i."_price"}; @@ -905,6 +559,9 @@ class Acc_Ledger_Sold extends Acc_Ledger { $r.='</td>'; $r.='<td align="right">'; $r.=$tva_item; + /* warning if tva_computed and given are not the + same */ + if ( bcsub($tva_item,$tva_computed) != 0) { echo _("Attention Différence");} $r.='</td>'; } $r.='<td align="right">'; @@ -922,16 +579,16 @@ class Acc_Ledger_Sold extends Acc_Ledger { $r.=$anc_op->display_form_plan($p_array,$null,$p_mode,$i,$amount); $r.='</td>'; } - + $r.='</tr>'; - + } $r.='</table>'; if ( $own->MY_ANALYTIC!='nu') // use of AA - $r.='<input type="button" value="verifie CA" onClick="verify_ca(\'ok\');">'; + $r.='<input type="button" value="'._('verifie CA').'" onClick="verify_ca(\'ok\');">'; $r.='</fieldset>'; $r.=$this->extra_info(); @@ -946,7 +603,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { foreach ($tva as $i=>$value) { $oTva->set_parameter('id',$i); $oTva->load(); - + $r.='<br> TVA à '.$oTva->get_parameter('label'); } $r.='<br>Total TVA'; @@ -974,37 +631,44 @@ class Acc_Ledger_Sold extends Acc_Ledger { $r.="</div>"; /* Add hidden */ - $r.=widget::hidden('e_client',$e_client); - $r.=widget::hidden('nb_item',$nb_item); - $r.=widget::hidden('p_jrn',$p_jrn); - $r.=widget::hidden('periode',$periode); + $r.=HtmlInput::hidden('e_client',$e_client); + $r.=HtmlInput::hidden('nb_item',$nb_item); + $r.=HtmlInput::hidden('p_jrn',$p_jrn); + $mt=microtime(true); + $r.=HtmlInput::hidden('mt',$mt); + + if ( isset($period)) + $r.=HtmlInput::hidden('period',$period); /*\todo comment les types hidden gérent ils des contenus avec des quotes, double quote ou < > ??? */ - $r.=widget::hidden('e_comm',$e_comm); - $r.=widget::hidden('e_date',$e_date); - $r.=widget::hidden('e_ech',$e_ech); - $r.=widget::hidden('e_pj',$e_pj); - $r.=widget::hidden('e_pj_suggest',$e_pj_suggest); + $r.=HtmlInput::hidden('e_comm',$e_comm); + $r.=HtmlInput::hidden('e_date',$e_date); + $r.=HtmlInput::hidden('e_ech',$e_ech); + $r.=HtmlInput::hidden('e_pj',$e_pj); + $r.=HtmlInput::hidden('e_pj_suggest',$e_pj_suggest); $e_mp=(isset($e_mp))?$e_mp:0; - $r.=widget::hidden('e_mp',$e_mp); + $r.=HtmlInput::hidden('e_mp',$e_mp); /* Paid by */ /* if the paymethod is not 0 and if a quick code is given */ if ( $e_mp!=0 && strlen (trim (${'e_mp_qcode_'.$e_mp})) != 0 ) { - $r.=widget::hidden('e_mp_qcode_'.$e_mp,${'e_mp_qcode_'.$e_mp}); + $r.=HtmlInput::hidden('e_mp_qcode_'.$e_mp,${'e_mp_qcode_'.$e_mp}); /* needed for generating a invoice */ - $r.=widget::hidden('qcode_dest',${'e_mp_qcode_'.$e_mp}); + $r.=HtmlInput::hidden('qcode_dest',${'e_mp_qcode_'.$e_mp}); $r.="Payé par ".${'e_mp_qcode_'.$e_mp}; $r.='<br>'; } - $r.=widget::hidden('jrn_type',$jrn_type); + $r.=HtmlInput::hidden('jrn_type',$jrn_type); for ($i=0;$i < $nb_item;$i++) { - $r.=widget::hidden("e_march".$i,${"e_march".$i}); - $r.=widget::hidden("e_march".$i."_price",${"e_march".$i."_price"}); - if ( $own->MY_TVA_USE=='Y') $r.=widget::hidden("e_march".$i."_tva_id",${"e_march".$i."_tva_id"}); - $r.=widget::hidden("e_quant".$i,${"e_quant".$i}); + $r.=HtmlInput::hidden("e_march".$i,${"e_march".$i}); + $r.=HtmlInput::hidden("e_march".$i."_price",${"e_march".$i."_price"}); + if ( $own->MY_TVA_USE=='Y') { + $r.=HtmlInput::hidden("e_march".$i."_tva_id",${"e_march".$i."_tva_id"}); + $r.=HtmlInput::hidden("e_march".$i."_tva_amount",${"e_march".$i."_tva_amount"}); + } + $r.=HtmlInput::hidden("e_quant".$i,${"e_quant".$i}); } return $r; @@ -1012,7 +676,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { /*!\brief the function extra info allows to * - add a attachment * - generate an invoice - * - insert extra info + * - insert extra info *\return string */ public function extra_info() { @@ -1020,33 +684,32 @@ class Acc_Ledger_Sold extends Acc_Ledger { $r.='<div style="position:float;float:left;width:50%;text-align:right;line-height:3em;">'; $r.='<fieldset> <legend> Facturation</legend>'; // check for upload piece - $file=new widget("file"); + $file=new IFile(); $file->table=0; - $r.="Ajoutez une pièce justificative "; - $r.=$file->IOValue("pj",""); + $r.=_("Ajoutez une pièce justificative "); + $r.=$file->input("pj",""); - if ( CountSql($this->db, - "select md_id,md_name from document_modele where md_type=4") > 0 ) + if ( $this->db->count_sql("select md_id,md_name from document_modele where md_type=4") > 0 ) { - - $r.='ou générer une facture <input type="checkbox" name="gen_invoice" CHECKED>'; + + $r.=_('ou générer une facture').' <input type="checkbox" name="gen_invoice" CHECKED>'; // We propose to generate the invoice and some template - $doc_gen=new widget("select"); + $doc_gen=new ISelect(); $doc_gen->name="gen_doc"; - $doc_gen->value=make_array($this->db, + $doc_gen->value=$this->db->make_array( "select md_id,md_name ". " from document_modele where md_type=4"); - $r.=$doc_gen->IOValue().'<br>'; + $r.=$doc_gen->input().'<br>'; } $r.='<br>'; - $obj=new widget('TEXT'); - $r.='Numero de bon de commande : '.$obj->IOValue('bon_comm').'<br>'; - $r.='Autre information : '.$obj->IOValue('other_info').'<br>'; + $obj=new IText(); + $r.=_('Numero de bon de commande : ').$obj->input('bon_comm').'<br>'; + $r.=_('Autre information : ').$obj->input('other_info').'<br>'; $r.="</fieldset>"; $r.='</div>'; - return $r; + return $r; } @@ -1055,45 +718,356 @@ class Acc_Ledger_Sold extends Acc_Ledger { function show_unpaid() { // Show list of unpaid sell // Date - date of payment - Customer - amount - // Nav. bar + // Nav. bar $step=$_SESSION['g_pagesize']; $page=(isset($_GET['offset']))?$_GET['page']:1; $offset=(isset($_GET['offset']))?$_GET['offset']:0; - - + + $sql=SQL_LIST_UNPAID_INVOICE_DATE_LIMIT." and jr_def_id=".$this->id ; - list($max_line,$list)=ListJrn($this->db,$this->id,$sql,null,$offset,1); + list($max_line,$list)=ListJrn($this->db,$sql,null,$offset,1); $sql=SQL_LIST_UNPAID_INVOICE." and jr_def_id=".$this->id ; - list($max_line2,$list2)=ListJrn($this->db,$this->id,$sql,null,$offset,1); + list($max_line2,$list2)=ListJrn($this->db,$sql,null,$offset,1); // Get the max line $m=($max_line2>$max_line)?$max_line2:$max_line; $bar2=jrn_navigation_bar($offset,$m,$step,$page); echo $bar2; - echo '<h2 class="info"> Echeance dépassée </h2>'; + echo '<h2 class="info"> '._('Echeance dépassée').' </h2>'; echo $list; - echo '<h2 class="info"> Non Payée </h2>'; + echo '<h2 class="info"> '._('Non Payée').' </h2>'; echo $list2; echo $bar2; // Add hidden parameter - $hid=new widget("hidden"); + $hid=new IHidden(); echo '<hr>'; if ( $m != 0 ) - echo widget::submit('paid','Mise à jour paiement'); + echo HtmlInput::submit('paid',_('Mise à jour paiement')); } + /*!\brief display the form for entering data for invoice, + *\param $p_array is null or you can put the predef operation or the $_POST + * + *\return HTML string + */ + function input($p_array=null) { + if ( $p_array != null ) extract($p_array); + $user = new User($this->db); + $own=new Own($this->db); + $flag_tva=$own->MY_TVA_USE; + /* Add button */ + $f_add_button=new IButton('add_card'); + $f_add_button->label=_('Créer une nouvelle fiche'); + $f_add_button->set_attribute('ipopup','ipop_newcard'); + $f_add_button->set_attribute('filter',$this->get_all_fiche_def ()); + // $f_add_button->set_attribute('jrn',$this->id); + $f_add_button->javascript=" select_card_type(this);"; + + $f_add_button2=new IButton('add_card2'); + $f_add_button2->label=_('Créer une nouvelle fiche'); + $f_add_button2->set_attribute('ipopup','ipop_newcard'); + $f_add_button2->set_attribute('filter',$this->get_all_fiche_def ()); + // $f_add_button2->set_attribute('jrn',$this->id); + $f_add_button2->javascript=" select_card_type(this);"; + + $str_add_button=$f_add_button->input(); + $str_add_button2=$f_add_button2->input(); + + // The first day of the periode + $oPeriode=new Periode($this->db); + list ($l_date_start,$l_date_end)=$oPeriode->get_date_limit($user->get_periode()); + + $op_date=( ! isset($e_date) ) ?$l_date_start:$e_date; + $e_ech=(isset($e_ech))?$e_ech:""; + $e_comm=(isset($e_comm))?$e_comm:""; + + $r=''; + $r.=dossier::hidden(); + $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); + $f_legend=_('En-tête facture client'); + + $Echeance=new IDate(); + $Echeance->setReadOnly(false); + + $Echeance->tabindex=2; + $label=HtmlInput::infobulle(4); + $f_echeance=$Echeance->input('e_ech',$e_ech,_('Echéance').$label); + $Date=new IDate(); + $Date->setReadOnly(false); + + $f_date=$Date->input("e_date",$op_date); + + $f_periode=''; + // Periode + //-- + if ($this->check_periode() == true) { + $l_user_per=$user->get_periode(); + $def=(isset($periode))?$periode:$l_user_per; + + $period=new IPeriod("period"); + $period->user=$user; + $period->cn=$this->db; + $period->value=$def; + $period->type=OPEN; + try { + $l_form_per=$period->input(); + } catch (Exception $e) { + if ($e->getCode() == 1 ) { + echo _("Aucune période ouverte"); + exit(); + } + } + $label=HtmlInput::infobulle(3); + $f_periode=_("Période comptable")." $label ".$l_form_per; + } + /* if we suggest the next pj, then we need a javascript */ + $add_js=""; + if ( $own->MY_PJ_SUGGEST=='Y') { + $add_js="update_pj();"; + } + + $wLedger=$this->select_ledger('VEN',2); + if ( $wLedger == null ) + exit(_('Pas de journal disponible')); + $wLedger->table=1; + $wLedger->javascript="onChange='update_predef(\"ven\",\"f\");$add_js'"; + $wLedger->label=" Journal ".HtmlInput::infobulle(2) ; + + $f_jrn=$wLedger->input(); + + $Commentaire=new IText(); + $Commentaire->table=0; + $Commentaire->setReadOnly(false); + $Commentaire->size=60; + $Commentaire->tabindex=3; + + $label=HtmlInput::infobulle(1) ; + + $f_desc=$label.$Commentaire->input("e_comm",h($e_comm)); + // PJ + //-- + /* suggest PJ ? */ + $default_pj=''; + if ( $own->MY_PJ_SUGGEST=='Y') { + $default_pj=$this->guess_pj(); + } + + $pj=new IText(); + + $pj->table=0; + $pj->name="e_pj"; + $pj->size=10; + $pj->value=(isset($e_pj))?$e_pj:$default_pj; + $f_pj=$pj->input().HtmlInput::hidden('e_pj_suggest',$default_pj); + // Display the customer + //-- + $fiche='deb'; + + // Save old value and set a new one + //-- + $e_client=( isset ($e_client) )?$e_client:""; + $e_client_label=" ";//str_pad("",100,"."); + + + // retrieve e_client_label + //-- + + if ( strlen(trim($e_client)) != 0) { + $fClient=new fiche($this->db); + $fClient->get_by_qcode($e_client); + $e_client_label=$fClient->strAttribut(ATTR_DEF_NAME).' '. + ' Adresse : '.$fClient->strAttribut(ATTR_DEF_ADRESS).' '. + $fClient->strAttribut(ATTR_DEF_CP).' '. + $fClient->strAttribut(ATTR_DEF_CITY).' '; + + + } + + $W1=new ICard(); + $W1->label="Client ".HtmlInput::infobulle(0) ; + $W1->name="e_client"; + $W1->tabindex=3; + $W1->value=$e_client; + $W1->table=0; + $W1->set_dblclick("fill_ipopcard(this);"); + $W1->set_attribute('ipopup','ipopcard'); + + // name of the field to update with the name of the card + $W1->set_attribute('label','e_client_label'); + // name of the field to update with the name of the card + $W1->set_attribute('typecard','deb'); + $W1->extra='deb'; + // Add the callback function to filter the card on the jrn + $W1->set_callback('filter_card'); + $W1->set_function('fill_data'); + $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', + $W1->name); + $f_client_qcode=$W1->input(); + $client_label=new ISpan(); + $client_label->table=0; + $f_client=$client_label->input("e_client_label",$e_client_label); + $f_client_bt=$W1->search(); + + + // Record the current number of article + $Hid=new IHidden(); + $p_article= ( isset ($p_article))?$p_article:MAX_ARTICLE; + $r.=$Hid->input("nb_item",$p_article); + + $f_legend_detail=_("Détail articles vendus"); + + // For each article + //-- + for ($i=0;$i< MAX_ARTICLE;$i++) { + // Code id, price & vat code + //-- + $march=(isset(${"e_march$i"}))?${"e_march$i"}:""; + $march_price=(isset(${"e_march".$i."_price"}))?${"e_march".$i."_price"}:""; + if ( $flag_tva=='Y') { + $march_tva_id=(isset(${"e_march$i"."_tva_id"}))?${"e_march$i"."_tva_id"}:""; + $march_tva_amount=(isset(${"e_march$i"."_tva_amount"}))?${"e_march$i"."_tva_amount"}:""; + } + $march_label=' '; + + // retrieve the tva label and name + //-- + if ( strlen(trim($march))!=0 ) { + $fMarch=new fiche($this->db); + $fMarch->get_by_qcode($march); + $march_label=$fMarch->strAttribut(ATTR_DEF_NAME); + if ( $flag_tva=='Y') { + if ( ! (isset(${"e_march$i"."_tva_id"}))) + $march_tva_id=$fMarch->strAttribut(ATTR_DEF_TVA); + } + } + // Show input + //-- + $W1=new ICard(); + $W1->label=""; + $W1->name="e_march".$i; + $W1->value=$march; + $W1->table=1; + $W1->set_attribute('typecard','cred'); + $W1->set_dblclick("fill_ipopcard(this);"); + $W1->set_attribute('ipopup','ipopcard'); + + $W1->extra='cred'; // credits + // name of the field to update with the name of the card + $W1->set_attribute('label','e_march'.$i.'_label'); + // name of the field with the price + $W1->set_attribute('price','e_march'.$i.'_price'); + // name of the field with the TVA_ID + $W1->set_attribute('tvaid','e_march'.$i.'_tva_id'); + // Add the callback function to filter the card on the jrn + $W1->set_callback('filter_card'); + $W1->set_function('fill_data'); + $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', + $W1->name); + + $W1->readonly=false; + + $array[$i]['quick_code']=$W1->input(); + $array[$i]['bt']=$W1->search(); + // For computing we need some hidden field for holding the value + $array[$i]['hidden']=''; + if ( $flag_tva=='Y') $array[$i]['hidden'].=HtmlInput::hidden('tva_march'.$i,0); + + $htva=new INum('htva_march'.$i); + $htva->readOnly=1; + $htva->value=0; + $array[$i]['htva']=$htva->input(); + + if ( $own->MY_TVA_USE=='Y') + $tvac=new INum('tvac_march'.$i); + else + $tvac=new IHidden('tvac_march'.$i); + + $tvac->readOnly=1; + $tvac->value=0; + $array[$i]['tvac']=$tvac->input(); + + + $Span=new ISpan(); + $Span->setReadOnly(false); + // card's name, price + //-- + $array[$i]['denom']=$Span->input("e_march".$i."_label",$march_label); + // price + $Price=new INum(); + $Price->setReadOnly(false); + $Price->size=9; + $Price->javascript="onBlur='format_number(this);clean_tva($i);compute_ledger($i)'"; + $array[$i]['pu']=$Price->input("e_march".$i."_price",$march_price); + $array[$i]['tva']=''; + $array[$i]['amount_tva']=''; + // if tva is not needed then no tva field + if ( $flag_tva == 'Y' ) { + // vat label + //-- + $Tva=new ITva_Select($this->db); + $Tva->javascript="onChange=clean_tva($i);compute_ledger($i)"; + $Tva->selected=$march_tva_id; + $array[$i]['tva']=$Tva->input("e_march$i"."_tva_id"); + // vat amount + //-- + $wTva_amount=new INum(); + $wTva_amount->readOnly=false; + $wTva_amount->size=6; + $wTva_amount->javascript="onBlur='format_number(this);compute_ledger($i)'"; + $array[$i]['amount_tva']=$wTva_amount->input("e_march".$i."_tva_amount",$march_tva_amount); + } + // quantity + //-- + $quant=(isset(${"e_quant$i"}))?${"e_quant$i"}:"1"; + $Quantity=new INum(); + $Quantity->setReadOnly(false); + $Quantity->size=8; + $Quantity->javascript="onChange='format_number(this);clean_tva($i);compute_ledger($i)'"; + $array[$i]['quantity']=$Quantity->input("e_quant".$i,$quant); + + }// foreach article + $f_type=_('Client'); + ob_start(); + require_once('template/form_ledger_detail.php'); + $r.=ob_get_contents(); + ob_clean(); + + + + // Set correctly the REQUEST param for jrn_type + $r.=HtmlInput::hidden('jrn_type','VEN'); + + $r.=HtmlInput::button('add_item',_('Ajout article'), ' onClick="ledger_add_row()"'); + + $r.="</DIV>"; + return $r; + } + function input_paid() { + $r=''; + $r.='<fieldset>'; + $r.='<legend> '._('Payé par').' </legend>'; + $mp=new Acc_Payment($this->db); + $mp->set_parameter('type','VEN'); + $r.=$mp->select(); + $r.='</fieldset>'; + return $r; + } + /*!\brief test function */ - static function test_me() { + static function test_me($p_string='') { + $cn=new Database(dossier::id()); + $a=new Acc_Ledger_Sold($cn,2); + echo $a->input(); } - + } - + diff --git a/include/class_acc_operation.php b/include/class_acc_operation.php index 430e10799..0dff730ab 100644 --- a/include/class_acc_operation.php +++ b/include/class_acc_operation.php @@ -72,7 +72,7 @@ var $jr_id; /*!< pk of jrn */ $this->amount=abs($this->amount); $debit=($this->type=='c')?'false':'true'; - $Res=ExecSqlParam($this->db,"select insert_jrnx + $Res=$this->db->exec_sql("select insert_jrnx ($1::text,abs($2)::numeric,$3::poste_comptable,$4::integer,$5::integer,$6::bool,$7::text,$8::integer,upper($9))", array( $this->date, @@ -85,7 +85,7 @@ var $jr_id; /*!< pk of jrn */ $this->periode, $this->qcode)); if ( $Res==false) return $Res; - $this->jrnx_id=GetSequence($this->db,'s_jrn_op'); + $this->jrnx_id=$this->db->get_current_seq('s_jrn_op'); return $this->jrnx_id; } @@ -95,18 +95,18 @@ var $jr_id; /*!< pk of jrn */ function set_pj() { if ( strlen(trim($this->pj)) == 0 ) { $sql="update jrn set jr_pj_number=$1 where jr_id=$2"; - ExecSqlParam($this->db,$sql,array(null,$this->jr_id)); + $this->db->exec_sql($sql,array(null,$this->jr_id)); return ''; } /* is pj uniq ? */ - if ( CountSql($this->db,"select jr_id from jrn where jr_pj_number=$1 and jr_def_id=$2", + if ( $this->db->count_sql("select jr_id from jrn where jr_pj_number=$1 and jr_def_id=$2", array($this->pj,$this->jrn) ) == 0 ) { $sql="update jrn set jr_pj_number=$1 where jr_id=$2"; - ExecSqlParam($this->db,$sql,array($this->pj,$this->jr_id)); + $this->db->exec_sql($sql,array($this->pj,$this->jr_id)); } else { /* get pref */ - $pref=getDbValue($this->db,"select jrn_def_pj_pref from jrn_def where jrn_def_id=$1", + $pref=$this->db->get_value("select jrn_def_pj_pref from jrn_def where jrn_def_id=$1", array($this->jrn)); /* try another seq */ $flag=0;$limit=100; @@ -114,11 +114,11 @@ var $jr_id; /*!< pk of jrn */ /* limit the search to $limit */ if ( $limit < 1 ) { $this->pj='';$flag=2; break;} - $seq=NextSequence($this->db,'s_jrn_pj'.$this->jrn); + $seq=$this->db->get_next_seq('s_jrn_pj'.$this->jrn); $this->pj=$pref.$seq; /* check if the new pj numb exist */ - $c=CountSql($this->db,"select jr_id from jrn where jr_pj_number=$1 and jr_def_id=$2", + $c=$this->db->count_sql("select jr_id from jrn where jr_pj_number=$1 and jr_def_id=$2", array($this->pj,$this->jrn) ); if ( $c == 0 ) { $flag=1; break;} @@ -127,7 +127,7 @@ var $jr_id; /*!< pk of jrn */ /* a pj numb is found */ if ( $flag == 1 ) { $sql="update jrn set jr_pj_number=$1 where jr_id=$2"; - ExecSqlParam($this->db,$sql,array($this->pj,$this->jr_id)); + $this->db->exec_sql($sql,array($this->pj,$this->jr_id)); } } return $this->pj; @@ -146,7 +146,7 @@ var $jr_id; /*!< pk of jrn */ { $p_comment=FormatString($this->desc); - $diff=getDbValue($this->db,"select check_balance ($1)",array($this->grpt)); + $diff=$this->db->get_value("select check_balance ($1)",array($this->grpt)); if ( $diff != 0 ) { echo "Erreur : balance incorrecte :diff = $diff"; @@ -154,18 +154,20 @@ var $jr_id; /*!< pk of jrn */ } $echeance=( isset( $this->echeance) && strlen(trim($this->echeance)) != 0)?$this->echeance:null; - + if ( ! isset($this->mt) ) { + $this->mt=microtime(true); + } // if amount == -1then the triggers will throw an error // - $Res=ExecSqlParam($this->db,"insert into jrn (jr_def_id,jr_montant,jr_comment,". - "jr_date,jr_ech,jr_grpt_id,jr_tech_per) values (". + $Res=$this->db->exec_sql("insert into jrn (jr_def_id,jr_montant,jr_comment,". + "jr_date,jr_ech,jr_grpt_id,jr_tech_per,jr_mt) values (". "$1,$2,$3,". - "to_date($4,'DD.MM.YYYY'),to_date($5,'DD.MM.YYYY'),$6,$7)", + "to_date($4,'DD.MM.YYYY'),to_date($5,'DD.MM.YYYY'),$6,$7,$8)", array ($this->jrn, $this->amount,$p_comment, - $this->date,$echeance,$this->grpt,$this->periode) + $this->date,$echeance,$this->grpt,$this->periode,$this->mt) ); if ( $Res == false) return false; - $this->jr_id=GetSequence($this->db,'s_jrn'); + $this->jr_id=$this->db->get_current_seq('s_jrn'); return $this->jr_id; } /*! @@ -177,9 +179,9 @@ var $jr_id; /*!< pk of jrn */ function get_internal() { if ( ! isset($this->jr_id) ) throw new Exception('jr_id is not set',1); - $Res=ExecSql($this->db,"select jr_internal from jrn where jr_id=".$this->jr_id); - if ( pg_NumRows($Res) == 0 ) return null; - $l_line=pg_fetch_array($Res); + $Res=$this->db->exec_sql("select jr_internal from jrn where jr_id=".$this->jr_id); + if ( Database::num_row($Res) == 0 ) return null; + $l_line=Database::fetch_array($Res); $this->jr_internal= $l_line['jr_internal']; return $this->jr_internal; } @@ -188,10 +190,10 @@ function get_internal() { * \return 0 ok -1 nok */ function seek_internal($p_internal) { - $res=ExecSqlParam($this->db,'select j_id from jrn where jr_internal=$1', + $res=$this->db->exec_sql('select j_id from jrn where jr_internal=$1', array($p_internal)); - if ( pg_NumRows($Res) == 0 ) return -1; - $this->jr_id=pg_fetch_result($Res,0,0); + if ( Database::num_row($Res) == 0 ) return -1; + $this->jr_id=Database::fetch_result($Res,0,0); return 0; } /*!\brief retrieve data from jrnx @@ -199,33 +201,33 @@ function get_internal() { */ function get_jrnx_detail() { if ( $this->jr_id==0 ) return; - $sql=" select jr_date,j_qcode,j_poste,j_montant,jr_internal,case when j_debit = 'f' then 'C' else 'D' end as debit,jr_comment as description, - vw_name,pcm_lib from jrnx join jrn on (jr_grpt_id=j_grpt) + $sql=" select distinct jr_date,j_qcode,j_poste,j_montant,jr_internal,case when j_debit = 'f' then 'C' else 'D' end as debit,jr_comment as description, + vw_name,pcm_lib,j_debit from jrnx join jrn on (jr_grpt_id=j_grpt) join tmp_pcmn on (j_poste=pcm_val) left join vw_fiche_attr on (j_qcode=quick_code) where jr_id=$1 order by j_debit desc"; - $res=ExecSqlParam($this->db,$sql,array($this->jr_id)); - if ( pg_NumRows ($res) == 0 ) return array(); - $all=pg_fetch_all($res); + $res=$this->db->exec_sql($sql,array($this->jr_id)); + if ( Database::num_row ($res) == 0 ) return array(); + $all=Database::fetch_all($res); return $all; } /*!\brief add a comment to the line (jrnx.j_text) */ function update_comment($p_text) { $sql="update jrnx set j_text=$1 where j_id=$2"; - ExecSqlParam($this->db,$sql,array($p_text,$this->jrnx_id)); + $this->db->exec_sql($sql,array($p_text,$this->jrnx_id)); } /*!\brief add a comment to the operation (jrn.jr_text) */ function operation_update_comment($p_text) { $sql="update jrn set jr_comment=$1 where jr_id=$2"; - ExecSqlParam($this->db,$sql,array($p_text,$this->jr_id)); + $this->db->exec_sql($sql,array($p_text,$this->jr_id)); } /*!\brief return the jrn_def_id from jrn */ function get_ledger() { $sql="select jr_def_id from jrn where jr_id=$1"; - $row=getDbValue($this->db,$sql,array($this->jr_id)); + $row=$this->db->get_value($sql,array($this->jr_id)); return $row; } /*!\brief display_jrnx_detail : get the data from get_jrnx_data and diff --git a/include/class_acc_parm_code.php b/include/class_acc_parm_code.php index 2fedba8f0..0702ea8e5 100644 --- a/include/class_acc_parm_code.php +++ b/include/class_acc_parm_code.php @@ -26,6 +26,7 @@ * \brief Manage the table parm_code which contains the custom parameter * for the module accountancy */ +require_once("class_itext.php"); require_once('class_acc_account_ledger.php'); class Acc_Parm_Code { @@ -52,8 +53,8 @@ class Acc_Parm_Code { function load_all() { $sql="select * from parm_code order by p_code"; - $Res=ExecSql($this->db,$sql); - $r= pg_fetch_all($Res); + $Res=$this->db->exec_sql($sql); + $r= Database::fetch_all($Res); $idx=0; $array=array(); @@ -81,7 +82,7 @@ class Acc_Parm_Code { // check if the account exists $acc=new Acc_Account_Ledger($this->db,$this->p_value); if ( $acc->load() == false ) { - echo "<script> alert('Ce compte n\'existe pas')</script>"; + alert("Ce compte n'existe pas"); } else { $this->p_comment=FormatString($this->p_comment); $this->p_value=FormatString($this->p_value); @@ -90,7 +91,7 @@ class Acc_Parm_Code { "p_comment='".$this->p_comment."' ". ",p_value='".$this->p_value."' ". "where p_code='".$this->p_code."'"; - $Res=ExecSql($this->db,$sql); + $Res=$this->db->exec_sql($sql); } } /*! @@ -118,35 +119,37 @@ class Acc_Parm_Code { */ function form() { - $comment=new widget("text"); + $comment=new IText(); $comment->name='p_comment'; $comment->value=$this->p_comment; $comment->size=45; - $value=new widget("js_search_poste"); + $value=new IPoste(); $value->name='p_value'; $value->value=$this->p_value; $value->size=7; - $poste=new widget("text"); - $poste->SetReadOnly(true); + $value->set_attribute('ipopup','ipop_account'); + $value->set_attribute('account','p_value'); + $poste=new IText(); + $poste->setReadOnly(true); $poste->size=strlen($this->p_code)+1; $poste->name='p_code'; $poste->value=$this->p_code; $r=""; - $r.=JS_SEARCH_POSTE; $r.='<tr>'; $r.='<td align="right"> Code </td>'; - $r.= '<TD>'.$poste->IOValue().'</TD>'; + $r.= '<TD>'.$poste->input().'</TD>'; $r.='</tr>'; $r.='<tr>'; $r.='<td align="right"> Commentaire </td>'; - $r.= '<TD>'.$comment->IOValue().'</TD>'; + $r.= '<TD>'.$comment->input().'</TD>'; $r.='</tr>'; $r.='<tr>'; $r.='<td align="right"> Poste comptable </td>'; - $r.= '<TD>'.$value->IOValue(); + $r.= '<TD>'.$value->input(); $r.='<span id="p_value_label"></span></td>'; $r.='</tr>'; - + $r.=HtmlInput::phpsessid(); + $r.=Dossier::hidden(); return $r; } @@ -163,10 +166,10 @@ class Acc_Parm_Code { if ( $this->p_code == -1 ) return "p_code non initialisé"; $sql='select * from parm_code where p_code=$1 '; - $Res=ExecSqlParam($this->db,$sql,array($this->p_code)); + $Res=$this->db->exec_sql($sql,array($this->p_code)); - if ( pg_NumRows($Res) == 0 ) return 'INCONNU'; - $row= pg_fetch_array($Res,0); + if ( Database::num_row($Res) == 0 ) return 'INCONNU'; + $row= Database::fetch_array($Res,0); $this->p_value=$row['p_value']; $this->p_comment=$row['p_comment']; diff --git a/include/class_acc_payment.php b/include/class_acc_payment.php index 047c2614f..36a3c28e0 100644 --- a/include/class_acc_payment.php +++ b/include/class_acc_payment.php @@ -23,6 +23,9 @@ /*!\file * \brief Handle the table mod_payment */ +require_once("class_iselect.php"); +require_once("class_icard.php"); +require_once("class_ispan.php"); require_once('class_acc_ledger.php'); require_once('class_fiche.php'); require_once('class_fiche_def.php'); @@ -91,18 +94,6 @@ class Acc_Payment public function insert() { if ( $this->verify() != 0 ) return; - /* please adapt - $sql="insert into tva_rate (tva_label,tva_rate,tva_comment,tva_poste) ". - " values ($1,$2,$3,$4) returning tva_id"; - $res=ExecSqlParam($this->cn, - $sql, - array($this->tva_label, - $this->tva_rate, - $this->tva_comment, - $this->tva_poste) - ); - $this->tva_id=pg_fetch_result($res,0,0); - */ } public function update() { @@ -110,7 +101,7 @@ class Acc_Payment $sql="update mod_payment set mp_lib=$1,mp_qcode=$2,mp_type=$3,mp_jrn_def_id=$4,mp_fd_id=$5 ". " where mp_id = $6"; - $res=ExecSqlParam($this->cn, + $res=$this->cn->exec_sql( $sql, array($this->mp_lib, $this->mp_qcode, @@ -120,17 +111,17 @@ class Acc_Payment $this->mp_id) ); if ( strlen (trim($this->mp_jrn_def_id))==0) - ExecSqlParam($this->cn, + $this->cn->exec_sql( 'update mod_payment '. 'set mp_jrn_def_id = null where mp_id=$1', array($this->mp_id)); if ( strlen (trim($this->mp_qcode))==0) - ExecSqlParam($this->cn, + $this->cn->exec_sql( 'update mod_payment '. 'set mp_qcode = null where mp_id=$1', array($this->mp_id)); if ( strlen (trim($this->mp_fd_id))==0) - ExecSqlParam($this->cn, + $this->cn->exec_sql( 'update mod_payment '. 'set mp_fd_id = null where mp_id=$1', array($this->mp_id)); @@ -140,19 +131,17 @@ class Acc_Payment public function load() { $sql='select mp_id,mp_lib,mp_fd_id,mp_jrn_def_id,mp_qcode,mp_type from mod_payment '. ' where mp_id = $1'; - $res=ExecSqlParam($this->cn, + $res=$this->cn->exec_sql( $sql, array($this->mp_id) ); - if ( pg_NumRows($res) == 0 ) return; - $row=pg_fetch_array($res,0); + if ( Database::num_row($res) == 0 ) return; + $row=Database::fetch_array($res,0); foreach ($row as $idx=>$value) { $this->$idx=$value; } } public function delete() { -/* $sql="delete from tva_rate where tva_id=$1"; - $res=ExecSqlParam($this->cn,$sql,array($this->tva_id)); -*/ + } /*!\brief retrieve all the data for a certain type *\param non @@ -162,7 +151,7 @@ class Acc_Payment $sql='select mp_id '. ' from mod_payment '. ' where mp_type=$1'; - $array=get_array($this->cn,$sql,array($this->mp_type)); + $array=$this->cn->get_array($sql,array($this->mp_type)); $ret=array(); if ( !empty($array) ) { foreach ($array as $row) { @@ -183,7 +172,7 @@ class Acc_Payment ' from mod_payment '. ' where mp_type=$1 and mp_jrn_def_id is not null and '. ' (mp_fd_id is not null or mp_qcode is not null)'; - $array=get_array($this->cn,$sql,array($this->mp_type)); + $array=$this->cn->get_array($sql,array($this->mp_type)); $ret=array(); if ( !empty($array) ) { foreach ($array as $row) { @@ -226,7 +215,7 @@ class Acc_Payment public function form() { $td='<TD>';$etd='</td>';$tr='<tr>';$etr='</tr>';$th='<th>';$eth='</th>'; $r=''; - $r.=widget::hidden('id',$this->mp_id); + $r.=HtmlInput::hidden('id',$this->mp_id); $r.='<table>'; $r.=$tr.$td.'Libellé'.$etd; $r.=$td; @@ -234,32 +223,35 @@ class Acc_Payment $r.=$etd.$etr; $r.=$tr.$td; $r.='Type de fiche '.$etd; - $array=make_array($this->cn,'select fd_id,fd_label from fiche_def join fiche_def_ref '. + $array=$this->cn->make_array('select fd_id,fd_label from fiche_def join fiche_def_ref '. ' using (frd_id) where frd_id in (25,4) order by fd_label'); - $fd=new widget('select'); + $fd=new ISelect(); $fd->name='mp_fd_id'; $fd->value=$array; $fd->selected=$this->mp_fd_id; - $r.=$td.$fd->IOValue(); + $r.=$td.$fd->input(); $r.=$etd; $r.=$tr.$td.'Enregistre dans le journal '.$etd; - $array=make_array($this->cn,'select jrn_def_id,jrn_def_name from '. + $array=$this->cn->make_array('select jrn_def_id,jrn_def_name from '. ' jrn_def where jrn_def_type = \'ODS\' or jrn_def_type=\'FIN\''); - $jrn=new widget('select'); + $jrn=new ISelect(); $jrn->value=$array; $jrn->name='mp_jrn_def_id'; $jrn->selected=(isset ($this->mp_jrn_def_id))?$this->mp_jrn_def_id:0; - $r.=$td.$jrn->IOValue().$etd; + $r.=$td.$jrn->input().$etd; $r.=$etr.$tr; $r.=$td.'Avec la fiche'.$etd; - $f=new widget('js_search_only'); + $f=new ICard(); + $f->jrn=$jrn->selected; + $f->noadd=true; $f->name='mp_qcode'; - $f->extra='frd_id in (25,4)'; - $f->extra2='Recherche'; + $list=$this->cn->make_list('select fd_id from fiche_def where frd_id in (25,4)'); + $f->extra=$list; + $f->extra2=_('Recherche'); $f->value=(isset($this->mp_qcode))?$this->mp_qcode:''; - $r.=$td.$f->IOValue().$etd; - $s=new widget('span'); - $r.=$td.$s->IOValue('mp_qcode_label'); + $r.=$td.$f->input().$etd; + $s=new ISpan(); + $r.=$td.$s->input('mp_qcode_label'); $r.='</table>'; return $r; @@ -272,7 +264,7 @@ class Acc_Payment public function select() { $r=''; $array=$this->get_valide(); - $r.=widget::hidden('gDossier',dossier::id()); + $r.=HtmlInput::hidden('gDossier',dossier::id()); $r.='<ol>'; $r.='<li ><input type="radio" name="e_mp" value="0" checked>Paiement encodé plus tard'; if ( empty($array ) == false ){ @@ -281,20 +273,26 @@ class Acc_Payment /* if the qcode is null the propose a search button to select the card */ if ( $row->mp_qcode==NULL) { - $a=new widget('js_search_noadd'); + $a=new ICard(); + $a->jrn=$row->mp_jrn_def_id; $a->extra=$row->mp_fd_id; - $a->extra2='Recherche'; $a->name='e_mp_qcode_'.$row->mp_id; - $s=new widget('span'); + $a->set_dblclick("fill_ipopcard(this);"); + $a->set_callback('filter_card'); + $a->set_function('fill_data'); + $a->set_attribute('ipopup','ipopcard'); + $a->set_attribute('label',$a->name.'_label'); + + $s=new ISpan(); $s->name=$a->name.'_label'; - $f=$a->IOValue().$s->IOValue(); + $f=$a->input().$s->input(); }else { /* if the qcode is not null then add a hidden variable with the qcode */ $fiche=new fiche($this->cn); $fiche->get_by_qcode($row->mp_qcode); - $f=widget::hidden('e_mp_qcode_'.$row->mp_id,$row->mp_qcode); + $f=HtmlInput::hidden('e_mp_qcode_'.$row->mp_id,$row->mp_qcode); $f.=$fiche->strAttribut(ATTR_DEF_NAME); } @@ -322,14 +320,14 @@ class Acc_Payment /*!\brief test function */ static function test_me() { - echo JS_SEARCH_CARD; - $cn=DbConnect(dossier::id()); + echo JS_LEDGER; + $cn=new Database(dossier::id()); $ac=new Acc_Payment($cn); $ac->set_parameter('type','ACH'); echo '<form method="post">'; - echo widget::hidden('test_select',$_REQUEST['test_select']); + echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); echo $ac->select(); - echo widget::submit('go','go'); + echo HtmlInput::submit('go','go'); echo '</form>'; if ( isset($_POST['go'])) print_r($_POST); diff --git a/include/class_acc_reconciliation.php b/include/class_acc_reconciliation.php index dda089ec6..454a28d82 100644 --- a/include/class_acc_reconciliation.php +++ b/include/class_acc_reconciliation.php @@ -25,9 +25,9 @@ * must use it * */ -require_once ('postgres.php'); +require_once("class_iconcerned.php"); +require_once ('class_database.php'); require_once ('class_dossier.php'); -require_once ('class_widget.php'); /*! \brief new class for managing the reconciliation it must be used * instead of the function InsertRapt, ... @@ -36,7 +36,7 @@ require_once ('class_widget.php'); class Acc_Reconciliation { var $db; /*!< database connection */ var $jr_id; /*!< jr_id */ - public static $javascript=JS_CONCERNED_OP; + public static $javascript=JS_LEDGER; function __construct($cn) { $this->db=$cn; $this->jr_id=0; @@ -48,7 +48,7 @@ class Acc_Reconciliation { /*! \brief return a widget of type js_concerned */ function widget() { - $wConcerned=new widget("js_concerned"); + $wConcerned=new IConcerned(); $wConcerned->extra=0; // with 0 javascript search from e_amount... field (see javascript) return $wConcerned; @@ -100,7 +100,7 @@ class Acc_Reconciliation { return true; // verify if exists - if ( CountSql($this->db, + if ( $this->db->count_sql( "select jra_id from jrn_rapt where jra_concerned=".$this->jr_id. " and jr_id=$jr_id2 union @@ -109,7 +109,7 @@ class Acc_Reconciliation { ==0) { // Ok we can insert - $Res=ExecSql($this->db,"insert into jrn_rapt(jr_id,jra_concerned) values ". + $Res=$this->db->exec_sql("insert into jrn_rapt(jr_id,jra_concerned) values ". "(".$this->jr_id.",$jr_id2)"); } return true; @@ -129,14 +129,14 @@ class Acc_Reconciliation { return; } // verify if exists - if ( CountSql($this->db,"select jra_id from jrn_rapt where ". + if ( $this->db->count_sql("select jra_id from jrn_rapt where ". " jra_concerned=".$this->jr_id." and jr_id=$jr_id2 union select jra_id from jrn_rapt where jra_concerned=$jr_id2 ". " and jr_id=".$this->jr_id) !=0) { // Ok we can delete - $Res=ExecSql($this->db,"delete from jrn_rapt where ". + $Res=$this->db->exec_sql("delete from jrn_rapt where ". "(jra_concerned=$jr_id2 and jr_id=".$this->jr_id.") or (jra_concerned=".$this->jr_id." and jr_id=$jr_id2) "); } @@ -153,16 +153,16 @@ class Acc_Reconciliation { $sql=" select jr_id as cn from jrn_rapt where jra_concerned=".$this->jr_id. " union ". " select jra_concerned as cn from jrn_rapt where jr_id=".$this->jr_id; - $Res=ExecSql($this->db,$sql); + $Res=$this->db->exec_sql($sql); // If nothing is found return null - $n=pg_NumRows($Res); + $n=Database::num_row($Res); if ($n ==0 ) return null; // put everything in an array for ($i=0;$i<$n;$i++) { - $l=pg_fetch_array($Res,$i); + $l=Database::fetch_array($Res,$i); $r[$i]=$l['cn']; } return $r; @@ -170,11 +170,11 @@ class Acc_Reconciliation { /*!\brief return the javascript function (static method) * static function javascript() { - return JS_CONCERNED_OP; + return JS_LEDGER; } */ static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $rap=new Acc_Reconciliation($cn); $rap->set_jr_id(38); $a=$rap->get(); @@ -188,7 +188,7 @@ class Acc_Reconciliation { $w->name="jr_concerned"; $w->extra2=""; - echo $w->IOValue(); + echo $w->input(); } } diff --git a/include/class_acc_report.php b/include/class_acc_report.php index 8c8736ffa..9dbacfbbd 100644 --- a/include/class_acc_report.php +++ b/include/class_acc_report.php @@ -22,8 +22,9 @@ * \brief Create, view, modify and parse report */ +require_once("class_itext.php"); +require_once("class_ibutton.php"); require_once('class_acc_report_row.php'); -require_once('class_widget.php'); require_once('impress_inc.php'); /*! @@ -47,9 +48,9 @@ class Acc_Report { /*!\brief Return the report's name */ function get_name() { - $ret=execSql($this->db,"select fr_label from formdef where fr_id=".$this->id); - if (pg_NumRows($ret) == 0) return $this->name; - $a=pg_fetch_array($ret,0); + $ret=$this->db->exec_sql("select fr_label from formdef where fr_id=".$this->id); + if (Database::num_row($ret) == 0) return $this->name; + $a=Database::fetch_array($ret,0); $this->name=$a['fr_label']; return $this->name; } @@ -59,10 +60,9 @@ class Acc_Report { * \param $p_end end periode * \param $p_type_date type of the date : periode or calendar */ - function get_row($p_start,$p_end,$p_type_date) { - $Res=ExecSql($this->db,"select fo_id , + $Res=$this->db->exec_sql("select fo_id , fo_fr_id, fo_pos, fo_label, @@ -71,11 +71,11 @@ class Acc_Report { inner join formdef on fr_id=fo_fr_id where fr_id =".$this->id. "order by fo_pos"); - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); if ($Max==0) { $this->row=0;return null;} $col=array(); for ($i=0;$i<$Max;$i++) { - $l_line=pg_fetch_array($Res,$i); + $l_line=Database::fetch_array($Res,$i); $col[]=ParseFormula($this->db, $l_line['fo_label'], $l_line['fo_formula'], @@ -100,24 +100,25 @@ function form($p_line=0) { $r=""; if ($p_line == 0 ) $p_line=count($this->aAcc_Report_row); $r.= dossier::hidden(); - $r.= widget::hidden('line',$p_line); - $r.= widget::hidden('fr_id',$this->id); - $wForm=new widget("text"); + $r.= HtmlInput::hidden('line',$p_line); + $r.= HtmlInput::hidden('fr_id',$this->id); + $r.=HtmlInput::phpsessid(); + $wForm=new IText(); $r.="Nom du rapport : "; - $r.=$wForm->IOValue('form_nom',$this->name); + $r.=$wForm->input('form_nom',$this->name); - $r.= '<TABLE id="rap1">'; + $r.= '<TABLE id="rap1" width="100%">'; $r.= "<TR>"; $r.= "<TH> Position </TH>"; $r.= "<TH> Texte </TH>"; $r.= "<TH> Formule</TH>"; $r.= '</TR>'; - $wName=new widget("text"); - $wName->size=50; - $wPos=new widget("text"); + $wName=new IText(); + $wName->size=40; + $wPos=new IText(); $wPos->size=3; - $wForm=new widget("text"); + $wForm=new IText(); $wForm->size=35; for ( $i =0 ; $i < $p_line;$i++) { @@ -125,37 +126,39 @@ function form($p_line=0) { $r.= "<TD>"; $wPos->value=( isset($this->aAcc_Report_row[$i]->fo_pos))?$this->aAcc_Report_row[$i]->fo_pos:$i+1; - $r.=$wPos->IOValue("pos".$i); + $r.=$wPos->input("pos".$i); $r.= '</TD>'; $r.= "<TD>"; $wName->value=( isset($this->aAcc_Report_row[$i]->fo_label))?$this->aAcc_Report_row[$i]->fo_label:""; - $r.=$wName->IOValue("text".$i); - $r.= '</TD>'; - - $r.= "<TD>"; - $wForm->value=( isset($this->aAcc_Report_row[$i]->fo_formula))?$this->aAcc_Report_row[$i]->fo_formula:""; - $r.=$wForm->IOValue("form".$i); - + $r.=$wName->input("text".$i); $r.= '</TD>'; $r.='<td>'; - $search=new widget('js_search_poste_only'); - $search->extra="form".$i; - $search->extra2='poste'; - $r.=$search->IOValue(); - $r.='</td>'; + $search=new IPoste("form".$i); + $search->size=50; + $search->value=( isset($this->aAcc_Report_row[$i]->fo_formula))?$this->aAcc_Report_row[$i]->fo_formula:""; + $search->label=_("Recherche poste"); + $search->set_attribute('gDossier',dossier::id()); + $search->set_attribute('bracket',1); + $search->set_attribute('no_overwrite',1); + $search->set_attribute('noquery',1); + $search->set_attribute('account',$search->name); + $search->set_attribute('ipopup','ipop_card'); + + $r.=$search->input(); + $r.='</td>'; $r.= "</TR>"; } $r.= "</TABLE>"; - $wButton=new widget("button"); + $wButton=new IButton(); $wButton->javascript=" rapport_add_row('".dossier::id()."','".$_REQUEST['PHPSESSID']."')"; $wButton->label="Ajout d'une ligne"; - $r.=$wButton->IOValue(); + $r.=$wButton->input(); return $r; } @@ -173,12 +176,12 @@ function form($p_line=0) { } function insert() { try { - startSql($this->db); - $ret_sql=ExecSqlParam($this->db, + $this->db->start(); + $ret_sql=$this->db->exec_sql( "insert into formdef (fr_label) values($1) returning fr_id", array($this->name) ); - $this->id=pg_fetch_result($ret_sql,0,0); + $this->id=Database::fetch_result($ret_sql,0,0); $ix=1; foreach ( $this->aAcc_Report_row as $row) { if ( strlen(trim($row->get_parameter("name"))) != 0 && @@ -186,7 +189,7 @@ function form($p_line=0) { { $ix=($row->get_parameter("position")!="")?$row->get_parameter("position"):$ix; $row->set_parameter("position",$ix); - $ret_sql=ExecSqlParam($this->db, + $ret_sql=$this->db->exec_sql( "insert into form (fo_fr_id,fo_pos,fo_label,fo_formula)". " values($1,$2,$3,$4)", array($this->id, @@ -198,19 +201,19 @@ function form($p_line=0) { } } catch (Exception $e) { - Rollback($this->db); + $this->db->rollback(); echo $e->getMessage(); } - Commit($this->db); + $this->db->commit(); } function update() { try { - startSql($this->db); - $ret_sql=ExecSqlParam($this->db, + $this->db->start(); + $ret_sql=$this->db->exec_sql( "update formdef set fr_label=$1 where fr_id=$2", array($this->name,$this->id)); - $ret_sql=ExecSqlParam($this->db, + $ret_sql=$this->db->exec_sql( "delete from form where fo_fr_id=$1", array($this->id)); $ix=0; @@ -221,7 +224,7 @@ function form($p_line=0) { { $ix=($row->get_parameter("position")!="")?$row->get_parameter("position"):$ix; $row->set_parameter("position",$ix); - $ret_sql=ExecSqlParam($this->db, + $ret_sql=$this->db->exec_sql( "insert into form (fo_fr_id,fo_pos,fo_label,fo_formula)". " values($1,$2,$3,$4)", array($this->id, @@ -234,10 +237,10 @@ function form($p_line=0) { }catch (Exception $e) { - Rollback($this->db); + $this->db->rollback(); echo $e->getMessage(); } - Commit($this->db); + $this->db->commit(); } /*!\brief fill a form thanks an array, usually it is $_POST *\param $p_array keys = fr_id, form_nom,textXX, formXX, posXX where @@ -256,22 +259,22 @@ function form($p_line=0) { } - /*!\brief the fr_id MUST be before called + /*!\brief the fr_id MUST be set before calling */ function load() { - $sql=ExecSqlParam($this->db, + $sql=$this->db->exec_sql( "select fr_label from formdef where fr_id=$1", array($this->id)); - if ( pg_NumRows($sql) == 0 ) return; - $this->name=pg_fetch_result($sql,0,0); - $sql=ExecSqlParam($this->db, + if ( Database::num_row($sql) == 0 ) return; + $this->name=Database::fetch_result($sql,0,0); + $sql=$this->db->exec_sql( "select fo_id,fo_pos,fo_label,fo_formula ". " from form ". " where fo_fr_id=$1 order by fo_pos", array($this->id)); - $f=pg_fetch_all($sql); + $f=Database::fetch_all($sql); $array=array(); if ( ! empty($f) ) { foreach ($f as $r) { @@ -289,7 +292,7 @@ function form($p_line=0) { } function delete() { - $ret=ExecSqlParam($this->db, + $ret=$this->db->exec_sql( "delete from formdef where fr_id=$1", array($this->id) ); @@ -302,9 +305,9 @@ function form($p_line=0) { function get_list() { $sql="select fr_id,fr_label from formdef order by fr_label"; - $ret=ExecSql($this->db,$sql); - if ( pg_NumRows($ret) == 0 ) return array(); - $array=pg_fetch_all($ret); + $ret=$this->db->exec_sql($sql); + if ( Database::num_row($ret) == 0 ) return array(); + $array=Database::fetch_all($ret); $obj=array(); foreach ($array as $row) { $tmp=new Acc_Report($this->db); @@ -319,7 +322,7 @@ function form($p_line=0) { *\return string with html code */ function make_array() { - $sql=make_array($this->db,"select fr_id,fr_label from formdef order by fr_label"); + $sql=$this->db->make_array("select fr_id,fr_label from formdef order by fr_label"); return $sql; } @@ -346,7 +349,7 @@ function form($p_line=0) { function upload() { if ( empty ($_FILES) ) return; if ( strlen(trim($_FILES['report']['tmp_name'])) == 0 ) { - echo '<script>alert("Nom de fichier est vide");</script>'; + alert("Nom de fichier est vide"); return; } $file_report=tempnam('tmp','file_report'); @@ -379,12 +382,12 @@ function form($p_line=0) { function exist($p_id=0) { $c=$this->id; if ( $p_id != 0 ) $c=$p_id; - $ret=execSqlParam($this->db,"select fr_label from formdef where fr_id=$1",array($c)); - if (pg_NumRows($ret) == 0) return false; + $ret=$this->db->exec_sql("select fr_label from formdef where fr_id=$1",array($c)); + if (Database::num_row($ret) == 0) return false; return true; } - function test_me() { - $cn=DbConnect(dossier::id()); + static function test_me() { + $cn=new Database(dossier::id()); $a=new Acc_Report($cn); print_r($a->get_list()); $array=array("text0"=>"test1", @@ -398,11 +401,12 @@ function form($p_line=0) { print_r($a); echo '<form method="post">'; echo $a->form(10); - echo '<INPUT TYPE="submit" value="Enregistre" name="update">'; + + echo HtmlInput::submit('update','Enregistre'); /* Add a line should be a javascript see comptanalytic */ // $r.= '<INPUT TYPE="submit" value="Ajoute une ligne" name="add_line">'; - echo '<INPUT TYPE="submit" value="Efface ce rapport" name="del_form">'; - echo widget::hidden('test_select',$_REQUEST['test_select']); + echo HtmlInput::submit('del_form','Efface ce rapport'); + echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); echo "</FORM>"; if ( isset ($_POST['update'])) { $b=new Acc_Report($cn); diff --git a/include/class_acc_report_row.php b/include/class_acc_report_row.php index 3eb5ba8d9..a278fcd17 100644 --- a/include/class_acc_report_row.php +++ b/include/class_acc_report_row.php @@ -96,16 +96,16 @@ class Acc_Report_Row } return $ret; } - function test_me() + static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $a=new Acc_Report_Row(); $array=array("text0"=>"test1", "form0"=>"7%", "text1"=>"test2", "form1"=>"6%" ); - + $a->db=$cn; $b=$a->from_array($array); print_r($b); echo $a->get_info(); diff --git a/include/class_acc_tva.php b/include/class_acc_tva.php index 723ed22be..124d099e0 100644 --- a/include/class_acc_tva.php +++ b/include/class_acc_tva.php @@ -24,7 +24,7 @@ * \brief this class is used for the table tva_rate */ require_once('class_dossier.php'); -require_once('postgres.php'); +require_once('class_database.php'); /*!\brief Acc_Tva is used for to map the table tva_rate * parameter are @@ -38,16 +38,16 @@ require_once('postgres.php'); */ class Acc_Tva { - private static $cn; /*!< $cn database connection */ + private $cn; /*!< $cn database connection */ private static $variable=array("id"=>"tva_id", "label"=>"tva_label", "rate"=>"tva_rate", "comment"=>"tva_comment", "account"=>"tva_poste"); - function __construct ($p_init) { + function __construct ($p_init,$p_tva_id=0) { $this->cn=$p_init; - $this->tva_id=0; + $this->tva_id=$p_tva_id; $this->poste=""; } public function get_parameter($p_string) { @@ -85,22 +85,22 @@ class Acc_Tva if ( $this->verify() != 0 ) return; $sql="select tva_insert($1,$2,$3,$4)"; - $res=ExecSqlParam($this->cn, + $res=$this->cn->exec_sql( $sql, array($this->tva_label, $this->tva_rate, $this->tva_comment, $this->tva_poste) ); - $this->tva_id=GetSequence($this->cn,'s_tva'); - $err=pg_fetch_result($res); + $this->tva_id=$this->cn->get_current_seq('s_tva'); + $err=Database::fetch_result($res); } public function update() { if ( $this->verify() != 0 ) return; $sql="update tva_rate set tva_label=$1,tva_rate=$2,tva_comment=$3,tva_poste=$4 ". " where tva_id = $5"; - $res=ExecSqlParam($this->cn, + $res=$this->cn->exec_sql( $sql, array($this->tva_label, $this->tva_rate, @@ -113,15 +113,16 @@ class Acc_Tva public function load() { $sql="select tva_label,tva_rate, tva_comment,tva_poste from tva_rate where tva_id=$1"; - $res=ExecSqlParam($this->cn, - $sql, - array($this->tva_id) - ); + $res=$this->cn->exec_sql( + $sql, + array($this->tva_id) + ); - if ( pg_NumRows($res) == 0 ) return; + if ( $this->cn->size() == 0 ) return -1; - $row=pg_fetch_array($res,0); + $row=Database::fetch_array($res,0); foreach ($row as $idx=>$value) { $this->$idx=$value; } + return 0; } /*!\brief get the account of the side (debit or credit) *\param $p_side is d or C @@ -144,13 +145,13 @@ class Acc_Tva } public function delete() { $sql="delete from tva_rate where tva_id=$1"; - $res=ExecSqlParam($this->cn,$sql,array($this->tva_id)); + $res=$this->cn->exec_sql($sql,array($this->tva_id)); } /*!\brief * Test function */ static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $a=new Acc_Tva($cn); echo $a->get_info(); $a->set_parameter("id",1); diff --git a/include/class_action.php b/include/class_action.php index b0f743ed7..cb4ebf8c6 100644 --- a/include/class_action.php +++ b/include/class_action.php @@ -18,11 +18,24 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.f - +require_once('class_itextarea.php'); +require_once("class_idate.php"); +require_once('class_itva_select.php'); +require_once("class_iselect.php"); +require_once("class_ihidden.php"); +require_once("class_itext.php"); +require_once("class_ispan.php"); +require_once("class_icard.php"); +require_once("class_icheckbox.php"); +require_once("class_ifile.php"); require_once("class_fiche.php"); require_once("class_document.php"); require_once("class_document_type.php"); +require_once("class_document_modele.php"); require_once("user_common.php"); +require_once('class_action_detail.php'); +require_once('class_inum.php'); + /*!\file * \brief class_action for manipulating actions * action can be : @@ -45,148 +58,123 @@ require_once("user_common.php"); * The table document_type are the possible actions */ -class action +class Action { - /*!< $db database connexion - * $ag_comment description (ag_gestion.ag_comment) - * $ag_timestamp document date (ag_gestion.ag_timestamp) - * $dt_id type of the document (document_type.dt_id) - * $d_state stage of the document (printed, send to client...) - * $d_number number of the document - * $d_filename filename's document - * $d_mimetype document's filename - * $ag_title title document - * $f_id_dest fiche id (From field ) - * $f_id_exp fiche id (to field) - * $ag_ref_ag_id concern previous action - * $ag_id pk of the table action_gestion - - * \todo replace attribut from class document document by an object document - */ - var $db; - var $ag_comment; - var $ag_timestamp; - var $dt_id; - var $d_state; - var $d_number; - var $d_filename; - var $d_mimetype; - var $ag_title; - var $f_id; - var $ag_ref_ag_id; -/*! constructor - * \brief constructor + var $db; /*!< $db database connexion */ + var $ag_comment; /*!< $ag_comment description (ag_gestion.ag_comment) */ + var $ag_timestamp; /*!< $ag_timestamp document date (ag_gestion.ag_timestamp)*/ + var $dt_id; /*!< $dt_id type of the document (document_type.dt_id)*/ + var $ag_state; /*!< $ag_state stage of the document (printed, send to client...)*/ + var $d_number; /*!< $d_number number of the document*/ + var $d_filename; /*!< $d_filename filename's document */ + var $d_mimetype; /*!< $d_mimetype document's filename */ + var $ag_title; /*!< $ag_title title document */ + var $f_id; /*!< $f_id_dest fiche id (From field ) */ + var $ag_ref_ag_id; /*!< $ag_ref_ag_id concern previous action*/ + var $ag_ref; /*!< $ag_ref is the ref */ + var $ag_hour; /*!< $ag_hour is the hour of the meeting, action */ + var $ag_priority; /*!< $ag_priority is the priority 1 High, 2 medium, 3 low */ + var $ag_dest; /*!< $ag_dest person who is in charged */ + var $ag_contact; /*!< $ag_contact contact */ + /*! constructor + * \brief constructor * \param p_cn database connection */ - function action ($p_cn) + function __construct ($p_cn) { $this->db=$p_cn; $this->f_id=0; } //---------------------------------------------------------------------- - /*! Display + /*! * \brief Display the object, the tags for the FORM * are in the caller. It will be used for adding and updating * action *\note If ag_id is not equal to zero then it is an update otherwise * it is a new document * - * \param $p_view if set to true the form will be in readonly mode - * \param $p_gen true we show the tag for generating a doc - * + * \param $p_view if set to true the form will be in readonly mode (value: true or false) + * \param $p_gen true we show the tag for generating a doc (value : true or false) + *\param $p_base is the p_action parameter + *\param $retour is the html code for the return button * \note update the reference number or the document type is not allowed * * * \return string containing the html code */ - function Display($p_view,$p_gen) + function Display($p_view,$p_gen,$p_base,$retour="") { - echo_debug('class_action',__LINE__,'Display() :'.var_export($_POST,true)); - echo_debug('class_action',__LINE__,'Display $this :'.var_export($this,true)); - - if ( $p_view=='UPD') - { - $upd=true; - $readonly=false; - } + { + $upd=true; + $readonly=false; + } elseif ($p_view=="NEW") - { - $upd=false; - $readonly=false; - } + { + $upd=false; + $readonly=false; + } elseif ($p_view=='READ') - { - $upd=true; - $readonly=true; - } + { + $upd=true; + $readonly=true; + } else - { - exit('class_action'.__LINE__.'Action::Display error unknown parameter'.$p_view); - - } + { + exit('class_action'.__LINE__.'Action::Display error unknown parameter'.$p_view); + + } // Compute the widget // Date - $date=new widget("js_date"); + $date=new IDate(); $date->readonly=$readonly; $date->name="ag_timestamp"; $date->value=$this->ag_timestamp; - // for insert mode only if ( $upd == false ) { // Doc Type - $doc_type=new widget("select"); + $doc_type=new ISelect(); $doc_type->name="dt_id"; - $doc_type->value=make_array($this->db,"select dt_id,dt_value from document_type where dt_id in (".ACTION.")"); + $doc_type->value=$this->db->make_array("select dt_id,dt_value from document_type"); $doc_type->selected=$this->dt_id; $doc_type->readonly=false; - $str_doc_type=$doc_type->IOValue(); + $str_doc_type=$doc_type->input(); echo_debug('class_action',__LINE__,var_export($doc_type,true)); } else { // Doc Type - $doc_type=new widget("hidden"); + $doc_type=new IHidden(); $doc_type->name="dt_id"; $doc_type->value=$this->dt_id; - $str_doc_type=$doc_type->IOValue()." ".getDbValue($this->db,"select dt_value from document_type where dt_id=".$this->dt_id); + $str_doc_type=$doc_type->input().$this->db->get_value("select dt_value from document_type where dt_id=".$this->dt_id); } // Description - $desc=new widget('RICHTEXT'); - $desc->width=700; - $desc->heigh=100; + $desc=new ITextArea(); + $desc->width=70; + $desc->heigh=5; $desc->name="ag_comment"; $desc->readonly=$readonly; - - $desc->value=FormatString(urldecode($this->ag_comment)); + $desc->value=$this->ag_comment; // state // Retrieve the value - if ( $p_view != 'READ' ) - { - $a=make_array($this->db,"select s_id,s_value from document_state "); - $state=new widget("select"); - $state->readonly=$readonly; - $state->name="d_state"; - $state->value=$a; - $state->selected=$this->d_state; - $str_state=$state->IOValue(); - } else { - $str_state=""; - if ( strlen($this->d_state) != 0 ) - { $str_state=getDbValue($this->db,"select s_value from document_state where s_id=".$this->d_state); - $g=new widget("hidden"); - $str_state.=$g->IOValue('d_state',$this->d_state); - } - } + $a=$this->db->make_array("select s_id,s_value from document_state "); + $state=new ISelect(); + $state->readonly=$readonly; + $state->name="ag_state"; + $state->value=$a; + $state->selected=$this->ag_state; + $str_state=$state->input(); + // Retrieve the value if there is an attached doc $doc_ref=""; // Document id - $h2=new widget("hidden"); + $h2=new IHidden(); $h2->name="d_id"; $h2->value=$this->d_id; @@ -197,128 +185,318 @@ class action $doc->get(); if ( strlen(trim($doc->d_lob)) != 0 ) { - $d_id=new widget("hidden"); + $d_id=new IHidden(); $doc_ref="<p> Document ".$doc->a_ref().'</p>'; - $doc_ref.=$h2->IOValue().$d_id->IOValue('d_id',$this->d_id); + $doc_ref.=$h2->input().$d_id->input('d_id',$this->d_id); } } // title - $title=new widget("text"); + $title=new IText(); $title->readonly=$readonly; $title->name="ag_title"; - // $title->value=FormatString($this->ag_title); $title->value=$this->ag_title; - $title->size=80; + $title->size=60; + + // ag_cal + $ag_cal=new ICheckBox('ag_cal'); + $ag_cal->readonly=$readonly; + $ag_cal->name="ag_cal"; + + if ( $this->ag_cal=='C' ) + $ag_cal->selected=true; + else + $ag_cal->selected=false; + + $str_ag_cal=$ag_cal->input(); + + // Priority of the ag_priority + $ag_priority=new ISelect(); + $ag_priority->readonly=$readonly; + $ag_priority->name="ag_priority"; + $ag_priority->selected=$this->ag_priority; + $ag_priority->value=array(array('value'=>1,'label'=>'Haute'), + array('value'=>2,'label'=>'Moyenne'), + array('value'=>3,'label'=>'Basse') + ); + $str_ag_priority=$ag_priority->input(); + + // hour of the action (meeting) ag_hour + $ag_hour=new IText(); + $ag_hour->readonly=$readonly; + $ag_hour->name="ag_hour"; + $ag_hour->value=$this->ag_hour; + $ag_hour->size=6; + $ag_hour->javascript=" onblur=check_hour('ag_hour');"; + $str_ag_hour=$ag_hour->input(); + + // Person in charged of the action + $ag_dest=new ISelect(); + $ag_dest->readonly=$readonly; + $ag_dest->name="ag_dest"; + $repo=new Database(); + $aAg_dest=$repo->make_array("select use_id as value, ". + "use_first_name||' '||use_name||'('||use_login||')' as label ". + " from ac_users natural join jnt_use_dos ". + " join priv_user on (jnt_id=priv_jnt) ". + "where dos_id= ".$_REQUEST['gDossier']); + $aAg_dest[]=array('value'=>0,'label'=>'phpcompta'); + $ag_dest->value=$aAg_dest; + $ag_dest->selected=$this->ag_dest; + $str_ag_dest=$ag_dest->input(); // ag_ref // Always false for update - $ag_ref=new widget("text"); + $ag_ref=new IText(); $ag_ref->readonly=$upd; $ag_ref->name="ag_ref"; $ag_ref->value=FormatString($this->ag_ref); - $client_label=new widget("span"); + $client_label=new ISpan(); - // f_id_dest destination + // f_id_dest sender if ( $this->qcode_dest != '- ERROR -' && strlen(trim($this->qcode_dest)) != 0) { $tiers=new fiche($this->db); $tiers->get_by_qcode($this->qcode_dest); $qcode_dest_label=$tiers->strAttribut(1); + $this->f_id_dest=$tiers->id; } else { - // echo "f_id $this->f_id"; $qcode_dest_label=($this->f_id_dest==0 || trim($this->qcode_dest)=="")?'Interne ':'Error'; } - // f_id_exp sender - if ( $this->qcode_exp != '- ERROR -' && strlen(trim($this->qcode_exp)) != 0) - { - $tiers=new fiche($this->db); - $tiers->get_by_qcode($this->qcode_exp); - $qcode_exp_label=$tiers->strAttribut(1); - } else { - $qcode_exp_label=($this->f_id_exp==0 || trim($this->qcode_exp)=="")?'Interne ':'Error'; - } - - $h_ag_id=new widget("hidden"); + $h_ag_id=new IHidden(); // if concerns another action : show the link otherwise nothing - $lag_ref_ag_id=" X / XX "; + $lag_ref_ag_id=" 00 / 00 "; if ( $this->ag_ref_ag_id != 0 ) { - // $this->GetAgRef("ag_ref_ag_id")."</A>"; + $supl_hidden=''; + if( isset($_REQUEST['sc'])) + $supl_hidden.='&sc='.$_REQUEST['sc']; + if( isset($_REQUEST['f_id'])) + $supl_hidden.='&f_id='.$_REQUEST['f_id']; + if( isset($_REQUEST['sb'])) + $supl_hidden.='&sb='.$_REQUEST['sb']; - $lag_ref_ag_id='<a class="mtitle" href="commercial.php?p_action=suivi_courrier&sa=detail&ag_id='. + $lag_ref_ag_id='<a class="mtitle" href="?p_action='.$_REQUEST['p_action'].$supl_hidden.'&sa=detail&ag_id='. $this->ag_ref_ag_id.'&'.dossier::get().'">'. - getDbValue($this->db,"select ag_ref from action_gestion where ag_id=".$this->ag_ref_ag_id). + $this->db->get_value("select ag_ref from action_gestion where ag_id=$1",array($this->ag_ref_ag_id)). "</A>"; } // sender - $w=new widget('js_search_only'); + $w=new ICard(); $w->readonly=$readonly; - $w->name='qcode_exp'; - $w->value=($this->f_id_exp != 0)?$this->qcode_exp:""; + $w->jrn=0; + $w->name='qcode_dest'; + $w->value=($this->f_id_dest != 0)?$this->qcode_dest:""; $w->label=""; - $w->extra='frd_id in (14,25,8,9,16)'; - $w->extra2='Recherche'; - $sp= new widget("span"); - $h_agrefid=new widget('hidden'); - // destination - $wdest=new widget('js_search_only'); - $wdest->readonly=$readonly; - $wdest->name='qcode_dest'; - $wdest->value=($this->f_id_dest != 0)?$this->qcode_dest:""; - $wdest->label=""; - $wdest->extra='frd_id in (14,25,8,9,16)'; - $wdest->extra2='Recherche'; - $spdest= new widget("span"); - $h_agrefid=new widget('hidden'); + $list_recipient=$this->db->make_list('select fd_id from fiche_def where frd_id in (14,25,8,9,16)'); + $w->extra=$list_recipient; + $w->set_attribute('typecard',$list_recipient); + $w->set_dblclick("fill_ipopcard(this);"); + $w->set_attribute('ipopup','ipopcard'); + + // name of the field to update with the name of the card + $w->set_attribute('label','qcode_dest_label'); + // name of the field to update with the name of the card + $w->set_attribute('typecard',$w->extra); + $w->set_function('fill_data'); + $w->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', + $w->name); + + $sp=new ISpan(); + $sp->name='qcode_dest_label'; + $sp->value=$qcode_dest_label; + + // contact + $ag_contact=new ICard(); + $ag_contact->readonly=$readonly; + $ag_contact->jrn=0; + $ag_contact->name='ag_contact'; + $ag_contact->value=''; + $ag_contact->set_attribute('ipopup','ipopcard'); + + if( $this->ag_contact != 0 ) { + $contact=new Fiche($this->db,$this->ag_contact); + $ag_contact->value=$contact->get_quick_code(); + } + + $ag_contact->label=""; + + $list_contact=$this->db->make_list('select fd_id from fiche_def where frd_id=16'); + $ag_contact->extra=$list_contact; + + $ag_contact->set_dblclick("fill_ipopcard(this);"); + // name of the field to update with the name of the card + $ag_contact->set_attribute('label','ag_contact_label'); + // name of the field to update with the name of the card + $ag_contact->set_attribute('typecard',$list_contact); + $ag_contact->set_function('fill_data'); + $ag_contact->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', + $ag_contact->name); + + $spcontact=new ISpan(); + $spcontact->name='ag_contact_label'; + $spcontact->value=''; + $fiche_contact=new Fiche($this->db); + $fiche_contact->get_by_qcode($this->ag_contact); + if ( $fiche_contact->id != 0 ) { + $spcontact->value=$fiche_contact->strAttribut(ATTR_DEF_NAME); + } + + + $h_agrefid=new IHidden(); $str_ag_ref="<b>".(($this->ag_ref != "")?$this->ag_ref:" Nouveau ")."</b>"; // Preparing the return string $r=""; - $r.=JS_SEARCH_CARD; - $r.= '<p>Date :'.$date->IOValue()." <br>Reference ".$str_ag_ref; - $r.="  Concerne :".$lag_ref_ag_id. - ' Type d\' action'; - echo_debug('class_action',__LINE__,"str_doc_type $str_doc_type"); - $r.= $str_doc_type; + $r.=JS_LEDGER; + /* for new files */ + $upload=new IFile(); + $upload->name="file_upload[]"; + $upload->value=""; + $aAttachedFile=$this->db->get_array('select d_id,d_filename,d_mimetype,'. + '\'show_document.php?PHPSESSID='. + $_REQUEST['PHPSESSID'].'&'. + Dossier::get().'&d_id=\'||d_id as link'. + ' from document where ag_id=$1', + array($this->ag_id)); + /* create the select for document */ + $aDocMod=new ISelect(); + $aDocMod->name='doc_mod'; + $aDocMod->value=$this->db->make_array('select md_id,dt_value||\' : \'||md_name as md_name'. + ' from document_modele join document_type on (md_type=dt_id)'. + ' order by md_name'); + $str_select_doc=$aDocMod->input(); + /* if no document then do not show the generate button */ + if ( empty($aDocMod->value) ) + $str_submit_generate=""; + else + $str_submit_generate=HtmlInput::submit("generate",_("Génére le document")); - // state - $r.=" Etat :".$str_state."</p>"; + $ag_id=$this->ag_id; + + /* fid = Icard */ + $icard=new ICard(); + $icard->jrn=0; + $icard->table=0; + $icard->extra2='QuickCode'; + $icard->noadd="no"; + $icard->extra='all'; + + /* Text desc */ + $text=new IText(); + $num=new INum(); + + /* TVA */ + $itva=new ITva_Select($this->db); + + /* create aArticle for the detail section */ + for ($i=0;$i< MAX_ARTICLE;$i++) { + /* fid = Icard */ + $icard=new ICard(); + $icard->jrn=0; + $icard->table=0; + $icard->noadd="no"; + $icard->extra='all'; + $icard->name="e_march".$i; + $tmp_ad=(isset($this->aAction_detail[$i]))?$this->aAction_detail[$i]:false; + $icard->value=''; + if ( $tmp_ad ) { + $march=new Fiche($this->db); + $f=$tmp_ad->get_parameter('qcode'); + if ( $f != 0 ) { + $march->id=$f; + $icard->value=$march->get_quick_code(); + } + } + $icard->set_dblclick("fill_ipopcard(this);"); + // name of the field to update with the name of the card + $icard->set_attribute('label',"e_march".$i."_label"); + // name of the field to update with the name of the card + $icard->set_attribute('typecard',$icard->extra); + $icard->set_attribute('ipopup','ipopcard'); + $icard->set_function('fill_data'); + $icard->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', + $icard->name); + + $aArticle[$i]['fid']=$icard->search().$icard->input(); + + $text->javascript=' onchange="clean_tva('.$i.');compute_ledger('.$i.')"'; + $text->name="e_march".$i."_label"; + $text->size=40; + $text->value=($tmp_ad)?$tmp_ad->get_parameter('text'):""; + $aArticle[$i]['desc']=$text->input(); + + $num->javascript=' onchange="format_number(this);clean_tva('.$i.');compute_ledger('.$i.')"'; + $num->name="e_march".$i."_price"; + $num->size=8; + $num->value=($tmp_ad)?$tmp_ad->get_parameter('price_unit'):0; + $aArticle[$i]['pu']=$num->input(); + + $num->name="e_quant".$i; + $num->size=8; + $num->value=($tmp_ad)?$tmp_ad->get_parameter('quantity'):0; + $aArticle[$i]['quant']=$num->input(); + + $itva->name='e_march'.$i.'_tva_id'; + $itva->value=($tmp_ad)?$tmp_ad->get_parameter('tva_id'):0; + $itva->javascript=' onchange="clean_tva('.$i.');compute_ledger('.$i.')"'; + $aArticle[$i]['tvaid']=$itva->input(); + + $num->name="e_march".$i."_tva_amount"; + $num->value=($tmp_ad)?$tmp_ad->get_parameter('tva_amount'):0; + $num->javascript=' onchange="compute_ledger('.$i.')"'; + $num->size=8; + $aArticle[$i]['tva']=$num->input(); + + $num->name="tvac_march".$i; + $num->value=($tmp_ad)?$tmp_ad->get_parameter('total'):0; + $num->size=8; + $aArticle[$i]['tvac']=$num->input(); + + $aArticle[$i]['hidden_htva']=HtmlInput::hidden('htva_march'.$i,0); + $aArticle[$i]['hidden_tva']=HtmlInput::hidden('tva_march'.$i,0); + $aArticle[$i]['ad_id']= ($tmp_ad)?HtmlInput::hidden('ad_id'.$i,$tmp_ad->get_parameter('id')):HtmlInput::hidden('ad_id'.$i,0); - $r.= "<p> "; - $r.="Expéditeur : ".$w->IOValue(); - $r.=$sp->IOValue('qcode_exp_label',$qcode_exp_label)."</TD></TR>"; - $r.="Destinataire :".$wdest->IOValue(); - $r.=$spdest->IOValue('qcode_dest_label',$qcode_dest_label)."</TD></TR>"; + } + /* Add the javascript */ + $r.=JS_INFOBULLE; + $r.=JS_LEDGER; + $r.=JS_SHOW_TVA; + $r.=JS_TVA; + $r.=JS_AJAX_FICHE; - // $r.=' Ref :'.$ag_ref->IOValue(); - $r.="</p>"; - echo_debug('class_action',__LINE__,' ag_id is '.$this->ag_id); + /* Add the needed hidden values */ + $r.=dossier::hidden(); + $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); - $r.= "<p> Titre : ".$title->IOValue(); - $r.= "<p>".$desc->IOValue()."</p>"; - $r.= $doc_ref; + /* add the number of item */ + $Hid=new IHidden(); + $r.=$Hid->input("nb_item",MAX_ARTICLE); + + /* get template */ + ob_start(); + require_once ('template/detail-action.php'); + $content=ob_get_contents(); + ob_end_clean(); + $r.=$content; //hidden $r.="<p>"; - $r.=$h2->IOValue(); - $r.=$h_agrefid->IOValue("ag_ref_ag_id",$this->ag_ref_ag_id); - $r.=$h_ag_id->IOValue('ag_id',$this->ag_id); - $hidden=new widget('hidden'); - $r.=$hidden->IOValue('f_id_dest',$this->f_id_dest); - $hidden2=new widget('hidden'); - $r.=$hidden2->IOValue('f_id_exp',$this->f_id_exp); - + $r.=$h2->input(); + $r.=$h_agrefid->input("ag_ref_ag_id",$this->ag_ref_ag_id); + $r.=$h_ag_id->input('ag_id',$this->ag_id); + $hidden2=new IHidden(); + $r.=$hidden2->input('f_id_dest',$this->f_id_dest); $r.="</p>"; // show the list of the concern operation - if ( CountSql($this->db,'select * from action_gestion where ag_ref_ag_id!=0 and ag_ref_ag_id='.$this->ag_id. + if ( $this->db->count_sql('select * from action_gestion where ag_ref_ag_id!=0 and ag_ref_ag_id='.$this->ag_id. " limit 2") > 0 ) - $r.=$this->myList(ACTION," and ag_ref_ag_id=".$this->ag_id); + $r.=$this->myList($p_base,""," and ag_ref_ag_id=".$this->ag_id); return $r; } @@ -329,22 +507,32 @@ class action { echo_debug('class_action',__LINE__,'Action::Get() '); $sql="select ag_id, ag_comment,to_char (ag_timestamp,'DD-MM-YYYY') as ag_timestamp,". - " f_id_dest,f_id_exp,ag_title,ag_comment,ag_ref,d_id,ag_type,d_state, ". - " ag_ref_ag_id ". + " f_id_dest,ag_title,ag_comment,ag_ref,d_id,ag_type,ag_state, ". + " ag_ref_ag_id, ag_dest, ag_hour, ag_priority, ag_cal,ag_contact ". " from action_gestion left join document using (ag_id) where ag_id=".$this->ag_id; - $r=ExecSql($this->db,$sql); - $row=pg_fetch_all($r); + $r=$this->db->exec_sql($sql); + $row=Database::fetch_all($r); if ( $row==false) return; $this->ag_comment=$row[0]['ag_comment']; $this->ag_timestamp=$row[0]['ag_timestamp']; + $this->ag_contact=$row[0]['ag_contact']; $this->f_id_dest=$row[0]['f_id_dest']; - $this->f_id_exp=$row[0]['f_id_exp']; $this->ag_title=$row[0]['ag_title']; $this->ag_type=$row[0]['ag_type']; $this->ag_ref=$row[0]['ag_ref']; + $this->ag_state=$row[0]['ag_state']; $this->ag_ref_ag_id=$row[0]['ag_ref_ag_id']; $this->d_id=$row[0]['d_id']; - // + $this->ag_dest=$row[0]['ag_dest']; + $this->ag_hour=$row[0]['ag_hour']; + $this->ag_priority=$row[0]['ag_priority']; + $this->ag_cal=$row[0]['ag_cal']; + + $action_detail=new Action_Detail($this->db); + $action_detail->set_parameter('ag_id',$this->ag_id); + $this->aAction_detail=$action_detail->load_all(); + + echo_debug('class_action',__LINE__,' Document id = '.$this->d_id); // if there is no document set 0 to d_id if ( $this->d_id == "" ) @@ -352,186 +540,39 @@ class action // if there is a document fill the object if ($this->d_id != 0 ) { - $this->state=$row['0']['d_state']; - $this->d_state=$row[0]['d_state']; + $this->state=$row['0']['ag_state']; + $this->ag_state=$row[0]['ag_state']; } echo_debug('class_action',__LINE__,' After test Document id = '.$this->d_id); $this->dt_id=$this->ag_type; - $adest=new fiche($this->db,$this->f_id_dest); - $this->qcode_dest=$adest->strAttribut(ATTR_DEF_QUICKCODE); - $aexp=new fiche($this->db,$this->f_id_exp); - $this->qcode_exp=$aexp->strAttribut(ATTR_DEF_QUICKCODE); + $aexp=new fiche($this->db,$this->f_id_dest); + $this->qcode_dest=$aexp->strAttribut(ATTR_DEF_QUICKCODE); + + } - echo_debug('class_action',__LINE__,'Detail end () :'.var_export($_POST,true)); - echo_debug('class_action',__LINE__,'Detail $this :'.var_export($this,true)); - - } -/*! Confirm - * \brief Display the encoded data and ask a confirmation - * this correspond to the stage 1, before the generation - * or the upload of document - * - * - * \return string containing the form - */ - function Confirm() - { - echo_debug('class_action',__LINE__,'confirm() :'.var_export($_POST,true)); - echo_debug('class_action',__LINE__,'confirm $this :'.var_export($this,true)); - - if ( isDate($this->ag_timestamp) == null ) - { - // if the date is invalid, default date is today - $this->ag_timestamp=date("d.m.Y"); - } - // Compute the widget - // Date - $date=new widget("text"); - $date->readonly=true; - $date->name="ag_timestamp"; - $date->value=$this->ag_timestamp; - // Doc Type - $doc_type=new widget("hidden"); - $doc_type->name="dt_id"; - $doc_type->value=$this->dt_id; - $a=ExecSql($this->db,"select dt_value from document_type where dt_id=".$this->dt_id); - $v=pg_fetch_array($a,0); - $str_type=$v[0]; - if ( isset ($_REQUEST['url'])) - { - $retour=widget::button_href('Retour',urldecode($_REQUEST['url'])); - - $h_url=sprintf('<input type="hidden" name="url" value="%s">',urldecode($_REQUEST['url'])); - } - else - { - $retour=""; - $h_url=""; - } - - // state - $a=ExecSql($this->db,"select s_value from document_state where s_id=".$this->d_state); - $v=pg_fetch_array($a,0); - $str_state=$v[0]; - $state=new widget("hidden"); - $state->name="d_state"; - $state->value=$this->d_state; - - // title - $title=new widget("text"); - $title->readonly=true; - $title->name="ag_title"; - $title->value=FormatString($this->ag_title); - - // Description - $desc=new widget('textarea'); - $desc->name="ag_comment"; - $desc->readonly=" disabled "; - $desc->value=$this->ag_comment; - // Propose to generate a document - $gen=new widget ("checkbox"); - $gen->name="p_gen"; - $doc_gen=new widget("select"); - $doc_gen->name="gen_doc"; - $doc_gen->value=make_array($this->db, - "select md_id,md_name from document_modele where md_type=".$this->dt_id); - - $h_agrefid=new widget('hidden'); - - // f_id - if ( trim($this->qcode_dest) =="") - { - // internal document - $this->f_id_dest=0; // internal document - $namedest="interne"; - } - else // ( trim($this->qcode_dest) !="" ) - { - $tiers=new fiche($this->db); - $tiers->get_by_qcode($this->qcode_dest); - $this->f_id_dest=$tiers->id; - $namedest=$tiers->strAttribut(1); - if ( $namedest == '- ERROR -') $this->f_id_dest=-1; - } - - // f_id - if ( trim($this->qcode_exp) =="") - { - // internal document - $this->f_id_exp=0; // internal document - $nameexp="interne"; - } - else // ( trim($this->qcode_exp) !="" ) - { - $tiers=new fiche($this->db); - $tiers->get_by_qcode($this->qcode_exp); - $this->f_id_exp=$tiers->id; - $nameexp=$tiers->strAttribut(1); - if ( $nameexp == '- ERROR -') $this->f_id_exp=-1; - } - - - - // Preparing the return string - $r=$retour."<form method=\"post\">"; - $r.=dossier::hidden(); - $r.="<p>Date : ".$date->IOValue()."</p>"; - $r.="<p>Etat $str_state".$state->IOValue()."</p>"; - $r.="<p>Type du document $str_type".$doc_type->IOValue()."</p>"; - $r.="<p> Expediteur : ".$this->qcode_exp." ".$nameexp.'</p>'; - $r.="<p> Destinataire : ".$this->qcode_dest." ".$namedest.'</p>'; - $r.="<p> Titre : ".$title->IOValue(); - $r.="<p>Description :".$desc->IOValue()."</p>"; - - // if no document exist for this type then do not display the question - if ( sizeof($doc_gen->value) != 0) - $r.="<p> Générer un document ".$gen->IOValue()." ".$doc_gen->IOValue()."</p>"; - - - // Add the hidden tag - $r.='<input type="hidden" name="sa" value="save_action_st2">'; - $r.='<input type="hidden" name="p_action" value="suivi_courrier">'; - $r.='<input type="hidden" name="f_id_dest" value="'.$this->f_id_dest.'">'; - $r.='<input type="hidden" name="f_id_exp" value="'.$this->f_id_exp.'">'; - $r.='<input type="hidden" name="qcode_dest" value="'.$this->qcode_dest.'">'; - $r.='<input type="hidden" name="qcode_exp" value="'.$this->qcode_exp.'">'; - - - $r.= $h_agrefid->IOValue("ag_ref_ag_id",$this->ag_ref_ag_id); - - // retrieve customer - - - if ( $this->f_id_dest != -1 && $this->f_id_exp !=-1 ) - $r.=widget::submit("Save","Sauve"); - $r.=widget::submit("corr","Corrige"); - - $r.=$h_url."</form>"; - return $r; - } -/*! SaveStage2 +/*! * \brief Save the document and propose to save the generated document or * to upload one, the data are included except the file. Temporary the generated * document is save * * \return */ - function SaveStage2() + function save() { - echo_debug('class_action',__LINE__,'saveStage2() :'.var_export($_POST,true)); - echo_debug('class_action',__LINE__,' saveStage2() $this :'.var_export($this,true)); + echo_debug('class_action',__LINE__,'save() :'.var_export($_POST,true)); + echo_debug('class_action',__LINE__,' save() $this :'.var_export($this,true)); // Get The sequence id, $seq_name="seq_doc_type_".$this->dt_id; $str_file=""; $add_file=''; - // f_id dest - $tiers=new fiche($this->db); - $tiers->get_by_qcode($this->qcode_dest); // f_id exp $exp=new fiche($this->db); - $exp->get_by_qcode($this->qcode_exp); + $exp->get_by_qcode($this->qcode_dest); + + $contact=new fiche($this->db); + $contact->get_by_qcode($this->ag_contact); if ( trim($this->ag_title) == "") { @@ -540,131 +581,69 @@ class action $doc_mod->get(); $this->ag_title=$doc_mod->dt_value; } - echo_debug('class_action',__LINE__," tiers->id ".$tiers->id); - $this->ag_id=NextSequence($this->db,'action_gestion_ag_id_seq'); + $this->ag_id=$this->db->get_next_seq('action_gestion_ag_id_seq'); + // Create the reference $ref=$this->dt_id.'/'.$this->ag_id; $this->ag_ref=$ref; - /*!\brief the ag_comment is already urlencoded - */ - //we remove newline - $this->ag_comment=str_replace("%OD","",$this->ag_comment); - $this->ag_comment=str_replace("%OA","",$this->ag_comment); - // save into the database - $sql=sprintf("insert into action_gestion". - "(ag_id,ag_timestamp,ag_type,ag_title,f_id_dest,f_id_exp,ag_comment,ag_ref,ag_ref_ag_id) ". - " values (%d,to_date('%s','DD-MM-YYYY'),'%d','%s',%d,%d,'%s','%s',%d)", - $this->ag_id, - $this->ag_timestamp, - $this->dt_id, - FormatString($this->ag_title), - $tiers->id, - $exp->id, - $this->ag_comment, - $ref, - $this->ag_ref_ag_id - ); - ExecSql($this->db,$sql); - - - - // the lob filename and the mimetype needed if we want to generate a doc. - if ( $this->gen == 'on' ) - { - $doc=new Document($this->db); - $doc->f_id=$tiers->id; - $doc->md_id=$this->md_id; - $doc->ag_id=$this->ag_id; - $doc->d_state=$this->d_state; - $str_file=$doc->Generate(); - $d='<input type="hidden" name="d_id" value="'.$doc->d_id.'">'; - } - $r=""; - // readonly and upload of a file - $r.="<hr>"; - $r.='<form enctype="multipart/form-data" method="post">'; - $r.=dossier::hidden(); - echo_debug("class_action",__LINE__,"call display"); - $r.=$this->Display('READ',false); - // Add the hidden tag - $r.='<input type="hidden" name="sa" value="save_action_st3">'; - $r.='<input type="hidden" name="p_action" value="suivi_courrier">'; - // add the d_id - $r.='<input type="hidden" name="d_id" value="'.$this->d_id.'">'; - // ag_comment must be saved in urlcode - $r.='<input type="hidden" name="ag_comment" value="'.urlencode($this->ag_comment).'">'; - // add hidden code for qcode_exp, qcode_dest - $r.='<input type="hidden" name="qcode_dest" value="'.$this->qcode_dest.'">'; - $r.='<input type="hidden" name="qcode_exp" value="'.$this->qcode_exp.'">'; - // Value for the generated document - if ( $this->gen == 'on' ) - { - $r.='<input type="hidden" name="d_id" value="'.$doc->d_id.'">'; - $r.="Sauver le document généré :"; - $r.=$str_file; - $checkbox=new widget("checkbox"); - $checkbox->name="save_generate"; - $r.=$checkbox->IOValue(); - $r.="<hr>"; - } - $upload=new widget("file"); - $upload->name="file_upload"; - $upload->value=""; - $r.="Enregistrer le fichier ".$upload->IOValue(); - $r.=widget::submit("save","Sauve le fichier"); - $r.="</form>"; - return $r; - } -/*! SaveStage3 - * \brief Upload the document or save the generated document - * \param $d_id document_id when we upload we don't increment seq. if = 0 then no file - * - */ - function SaveStage3($d_id) - { - echo_debug('class_action',__LINE__,'SaveStage3() :'.var_export($_POST,true)); - echo_debug('class_action',__LINE__,'SaveStage3 :'.var_export($this,true)); - - // if we save the generated doc - if ( isset($_POST['save_generate'])) - { - return; - } - - // Upload a new document - $doc=new Document($this->db); - $doc->ag_id=$this->ag_id; - // if there is a document and it is not an update - if ( sizeof($_FILES) !=0 && $d_id==0) - { - $doc->md_type=$this->dt_id; - $doc->blank(); - } + if ( $this->ag_cal=='on') + $ag_cal='C'; else - $doc->d_id=$d_id; + $ag_cal='I'; + $this->ag_ref_ag_id=(strlen(trim($this->ag_ref_ag_id))==0)?0:$this->ag_ref_ag_id; + // save into the database + $sql="insert into action_gestion". + "(ag_id,ag_timestamp,ag_type,ag_title,f_id_dest,ag_comment,ag_ref,ag_ref_ag_id, ag_dest, ". + " ag_hour, ag_priority,ag_cal,ag_owner,ag_contact,ag_state) ". + " values ($1,to_date($2,'DD-MM-YYYY'),$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15)"; + $this->db->exec_sql($sql,array($this->ag_id, /* 1 */ + $this->ag_timestamp, /* 2 */ + $this->dt_id, /* 3 */ + $this->ag_title, /* 4 */ + $exp->id, /* 5 */ + $this->ag_comment, /* 6 */ + $ref, /* 7 */ + $this->ag_ref_ag_id, /* 8 */ + $this->ag_dest, /* 9 */ + $this->ag_hour, /* 10 */ + $this->ag_priority, /* 11 */ + $ag_cal, /* 12 */ + $_SESSION['g_user'], /* 13 */ + $contact->id, /* 14 */ + $this->ag_state /* 15 */ + ) + ); + /* insert also the details */ + for ( $i = 0; $i < MAX_ARTICLE;$i++) { + $act=new Action_Detail($this->db); + $act->from_array($_POST,$i); + $act->ag_id=$this->ag_id; + $act->save(); + } + + /* Upload the documents */ + $doc=new Document($this->db); $doc->Upload($this->ag_id); } - /*! myList($p_filter="") - * \brief Show list of action - * \param $p_filter filters on the document_type + * \brief Show list of action by default if sorted on date + *\param $p_base base url with p_action... + * \param $p_filter filters on the document_type * \param $p_search must a valid sql command ( ex 'and ag_title like upper('%hjkh%')) - * - * * \return string containing html code */ - function myList($p_filter="",$p_search="") + function myList($p_base,$p_filter="",$p_search="") { - $str_dossier=dossier::get(); + $str_dossier=dossier::get(); // for the sort $sort=""; - $image_asc='<IMAGE SRC="image/down.png" border="0" >'; - $image_desc='<IMAGE SRC="image/up.png" border="0" >'; - $image_sel_desc='<IMAGE SRC="image/select1.png" border="0" >'; - $image_sel_asc='<IMAGE SRC="image/select2.png" border="0" >'; - + $image_asc='<IMAGE SRC="image/down.gif" border="0" >'; + $image_desc='<IMAGE SRC="image/up.gif" border="0" >'; + $image_sel_desc='<IMAGE SRC="image/select1.gif" border="0" >'; + $image_sel_asc='<IMAGE SRC="image/select2.gif" border="0" >'; $url=CleanUrl(); + $url=$str_dossier.'&'.$p_base; $sort_date='<th><A class="mtitle" href="?'.$url.'&s=date_a">'.$image_asc.'</A>'. 'Date'. @@ -672,9 +651,6 @@ class action $sort_exp='<th><A class="mtitle" href="?'.$url.'&s=exp&'.$str_dossier.'">'.$image_asc.'</A>'. 'Expéditeur'. '<A class="mtitle" href="?'.$url.'&s=exp_d&'.$str_dossier.'">'.$image_desc.'</A></th>'; - $sort_dest='<th><A class="mtitle" href="?'.$url.'&s=dest&'.$str_dossier.'">'.$image_asc.'</A>'. - 'Destinataire'. - '<A class="mtitle" href="?'.$url.'&s=dest_d&'.$str_dossier.'">'.$image_desc.'</A></th>'; $sort_titre='<th><A class="mtitle" href="?'.$url.'&s=ti&'.$str_dossier.'">'.$image_asc.'</A>'. 'Titre'. '<A class="mtitle" href="?'.$url.'&s=ti_d&'.$str_dossier.'">'.$image_desc.'</A></th>'; @@ -686,7 +662,6 @@ class action '<A class="mtitle" href="?'.$url.'&s=ref_d&'.$str_dossier.'">'.$image_desc.'</A></th>'; if ( isset($_GET['s'])){ - { switch ($_GET['s']) { case "date_a": $sort=" ag_timestamp asc"; @@ -706,7 +681,7 @@ class action $sort_exp='<th>'.$image_sel_asc.'</A>'. 'Expéditeur'. '<A class="mtitle" href="?'.$url.'&s=exp_d">'.$image_asc.'</A></th>'; - $sort=" f_id_exp asc"; + $sort=" f_id_dest asc"; break; case "exp_d": @@ -714,21 +689,6 @@ class action 'Expéditeur'. $image_sel_desc.'</th>'; - $sort=" f_id_exp desc"; - break; - - case "dest": - $sort_dest='<th>'.$image_sel_asc. - 'Destinataire'. - '<A class="mtitle" href="?'.$url.'&s=dest_d">'.$image_desc.'</A></th>'; - - $sort=" f_id_dest asc"; - break; - case "dest_d": - $sort_dest='<th><A class="mtitle" href="?'.$url.'&s=dest">'.$image_asc.'</A>'. - 'Destinataire'. - $image_sel_desc.'</th>'; - $sort=" f_id_dest desc"; break; @@ -780,39 +740,48 @@ class action } - $sort=" order by ".$sort; - } + + } else { + $sort=" ag_timestamp desc"; + $sort_date='<th><A class="mtitle" href="?'.$url.'&s=date_a">'.$image_asc.'</A>'. + 'Date'. + $image_sel_desc.'</th>'; } + + $sort=" order by ".$sort; + + if ( strlen(trim($p_filter)) != 0 ) + $p_filter_doc=" dt_id in ( $p_filter )"; + else + $p_filter_doc=" 1=1 "; + $sql=" - select ag_id,to_char(ag_timestamp,'DD-MM-YYYY') as my_date,ag_ref_ag_id,f_id_dest,f_id_exp". - ",ag_title,d_id,md_type,dt_value,ag_ref + select ag_id,to_char(ag_timestamp,'DD-MM-YYYY') as my_date,ag_ref_ag_id,f_id_dest". + ",ag_title,md_type,dt_value,ag_ref, ag_priority from action_gestion - left outer join document using (ag_id) left outer join document_modele on (ag_type=md_type) join document_type on (ag_type=dt_id) - where dt_id in ($p_filter) $p_search $sort"; - $max_line=CountSql($this->db,$sql); + where $p_filter_doc $p_search $sort"; + $max_line=$this->db->count_sql($sql); $step=$_SESSION['g_pagesize']; $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?pg_escape_string($_GET['offset']):0; + $offset=(isset($_GET['offset']))?Database::escape_string($_GET['offset']):0; $limit=" LIMIT $step OFFSET $offset "; $bar=jrn_navigation_bar($offset,$max_line,$step,$page); - $Res=ExecSql($this->db,$sql.$limit); - $a_row=pg_fetch_all($Res); + $Res=$this->db->exec_sql($sql.$limit); + $a_row=Database::fetch_all($Res); $r=""; $r.=$bar; $r.='<table class="document">'; $r.="<tr>"; $r.=$sort_date; - $r.=$sort_dest; $r.=$sort_exp; $r.=$sort_titre; $r.='<th>type</th>'; $r.=$sort_reference; $r.=$sort_concerne; - $r.='<th>Document</th>'; $r.="</tr>"; @@ -825,36 +794,24 @@ class action return $r; } - $r.=JS_SEARCH_CARD; + $r.=JS_LEDGER; $i=0; + //show the sub_action foreach ($a_row as $row ) { - $href='<A class="document" HREF="commercial.php?p_action=suivi_courrier&sa=detail&ag_id='.$row['ag_id'].'&'.$str_dossier.'">'; + $href='<A class="document" HREF="commercial.php?'.$p_base.'&sa=detail&ag_id='.$row['ag_id'].'&'.$str_dossier.'">'; $i++; $tr=($i%2==0)?'even':'odd'; + if ($row['ag_priority'] < 2) $tr='priority1'; $r.="<tr class=\"$tr\">"; $r.="<td>".$href.$row['my_date'].'</a>'."</td>"; - // Destinataire - $fdest=new fiche($this->db); - $fdest->id=$row['f_id_dest']; - $qcode_dest=$fdest->strAttribut(ATTR_DEF_QUICKCODE); - - $qdest=($qcode_dest=="- ERROR -")?"Interne":$qcode_dest; - $jsdest=sprintf("javascript:showfiche('%s','%s')", - $_REQUEST['PHPSESSID'],$qdest); - if ( $qdest != 'Interne' ) - { - $r.="<td>".$href.$qdest." : ".$fdest->getName().'</a></td>'; - } - else - $r.="<td>$href Interne </a> </td>"; // Expediteur $fexp=new fiche($this->db); - $fexp->id=$row['f_id_exp']; - $qcode_exp=$fexp->strAttribut(ATTR_DEF_QUICKCODE); + $fexp->id=$row['f_id_dest']; + $qcode_dest=$fexp->strAttribut(ATTR_DEF_QUICKCODE); - $qexp=($qcode_exp=="- ERROR -")?"Interne":$qcode_exp; + $qexp=($qcode_dest=="- ERROR -")?"Interne":$qcode_dest; $jsexp=sprintf("javascript:showfiche('%s','%s')", $_REQUEST['PHPSESSID'],$qexp); if ( $qexp != 'Interne' ) @@ -869,31 +826,24 @@ class action // show reference if ( $row['ag_ref_ag_id'] != 0 ) { - $retSqlStmt=ExecSql($this->db, + $retSqlStmt=$this->db->exec_sql( "select ag_ref from action_gestion where ag_id=".$row['ag_ref_ag_id']); - $retSql=pg_fetch_all($retSqlStmt); + $retSql=Database::fetch_all($retSqlStmt); if ( $retSql != null ) { foreach ($retSql as $line) { - $ref.='<A href="commercial.php?p_action=suivi_courrier&query='.$line['ag_ref'].'&'.$str_dossier.'">'. + $ref.='<A href="commercial.php?'.$p_base.'&query='.$line['ag_ref'].'&'.$str_dossier.'">'. $line['ag_ref']."<A>"; } } } $r.='<td>'.$href. - $row['ag_title']."</A></td>"; + h($row['ag_title'])."</A></td>"; $r.="<td>".$row['dt_value']."</td>"; $r.="<td>".$row['ag_ref']."</td>"; $r.="<td>".$ref."</td>"; - if ( $row['d_id'] != '') - { - $doc=new Document($this->db,$row['d_id']); - $doc->get(); - if ( strlen(trim($doc->d_lob)) != 0 ) - $r.="<td>".$doc->a_ref()."</td>"; - } $r.="</tr>"; } @@ -910,30 +860,12 @@ class action */ function Update() { - echo_debug('class_action',__LINE__,'Update() $_POST() :'.var_export($_POST,true)); - echo_debug('class_action',__LINE__,'Update() $this :'.var_export($this,true)); - // if ag_id == 0 nothing to do if ( $this->ag_id == 0 ) return ; - // retrieve customer // f_id - if ( trim($this->qcode_exp) =="" ) - { - // internal document - $this->f_id_exp=0; // internal document - } - else - { - $tiers=new fiche($this->db); - if ( $tiers->get_by_qcode($this->qcode_exp) == -1 ) // Error we cannot retrieve this qcode - return false; - else - $this->f_id_exp=$tiers->id; - - } if ( trim($this->qcode_dest) =="" ) { // internal document @@ -948,92 +880,125 @@ class action $this->f_id_dest=$tiers->id; } + $contact=new fiche($this->db); + if ( $contact->get_by_qcode($this->ag_contact) == -1 ) + $contact->id=0; - - //remove newline from ag_comment - $this->ag_comment=str_replace("\n","",$this->ag_comment); - $this->ag_comment=str_replace("\r","",$this->ag_comment); - - // url encoded - $this->ag_comment=urlencode($this->ag_comment); - - // bug PHP : sometimes the newline remains - $this->ag_comment=str_replace("%A0","",$this->ag_comment); - $this->ag_comment=str_replace("%0D","",$this->ag_comment); - $this->ag_comment=str_replace("+%A0+","",$this->ag_comment); - $this->ag_comment=str_replace("+%0D+","",$this->ag_comment); - - - $sql=sprintf("update action_gestion set ag_comment='%s',". - " ag_timestamp=to_date('%s','DD.MM.YYYY'),". - " ag_title='%s',". - " ag_type=%d, ". - " f_id_exp=%d, ". - " f_id_dest=%d, ". - " ag_ref_ag_id=%d". - " where ag_id = %d", - $this->ag_comment, - $this->ag_timestamp, - FormatString($this->ag_title), - $this->dt_id, - $this->f_id_exp, - $this->f_id_dest, - $this->ag_ref_ag_id, - $this->ag_id); - ExecSql($this->db,$sql); + + $ref=$this->dt_id.'/'.$this->ag_id; + if ( $this->ag_cal == 'on') $ag_cal='C'; else $ag_cal='I'; + $this->ag_ref=$ref; + $this->db->exec_sql("update action_gestion set ag_comment=$1,". + " ag_timestamp=to_date($2,'DD.MM.YYYY'),". + " ag_title=$3,". + " ag_type=$4, ". + " f_id_dest=$5, ". + " ag_ref_ag_id=$6 ,". + "ag_state=$7,". + " ag_hour = $9 ,". + " ag_priority = $10 ,". + " ag_dest = $11 , ". + " ag_cal = $12 ,". + " ag_contact = $13 ". + " where ag_id = $8", + array ( $this->ag_comment, /* 1 */ + $this->ag_timestamp, /* 2 */ + $this->ag_title, /* 3 */ + $this->dt_id, /* 4 */ + $this->f_id_dest, /* 5 */ + $this->ag_ref_ag_id, /* 6 */ + $this->ag_state, /* 7 */ + $this->ag_id, /* 8 */ + $this->ag_hour, /* 9 */ + $this->ag_priority, /* 10 */ + $this->ag_dest, /* 11 */ + $ag_cal, /* 12 */ + $contact->id /* 13 */ + )); echo_debug('class_action',__LINE__,$_FILES); - if ( strlen(trim($_FILES['file_upload']['name'])) !=0 ) - { - echo_debug('class_action',__LINE__,'sizeof($_FILES) = '.sizeof($_FILES)); - echo_debug('class_action',__LINE__,'$this->d_id = '.$this->d_id); + // Upload documents + $doc=new Document($this->db); + $doc->Upload($this->ag_id); - // Upload a new document - $doc=new Document($this->db); - if ( $this->d_id !=0 ) - { - $doc->d_id=$this->d_id; - } else { - // we need to increment the counter - $doc->ag_id=$this->ag_id; - $doc->md_type=$this->dt_id; - $doc->blank(); - } - $doc->Upload($this->ag_id); - - } - if ( $this->d_id != 0 ) - { - $doc=new Document($this->db); - $doc->d_id=$this->d_id ; - $doc->d_state=$this->d_state; - $doc->save(); - } + /* save action details */ + for ( $i = 0; $i < MAX_ARTICLE;$i++) { + $act=new Action_Detail($this->db); + $act->from_array($_POST,$i); + $act->save(); + } return true; + } + + /*!\brief generate the document and add it to the action + * \param md_id is the id of the document_modele + */ + function generate_document($md_id) { + $doc=new Document($this->db); + $mod=new Document_Modele($this->db,$md_id); + $mod->load(); + $doc->f_id=$this->f_id_dest; + $doc->md_id=$md_id; + $doc->ag_id=$this->ag_id; + $doc->Generate(); + } + /*!\brief put an array in the variable member, the indice + * is the member name + *\param $p_array to parse + *\return nothing + */ + function fromArray($p_array) { + $this->ag_id=(isset($p_array['ag_id']))?$p_array['ag_id']:""; + $this->qcode_dest=(isset($p_array['qcode_dest']))?$p_array['qcode_dest']:""; + $this->f_id_dest=(isset($p_array['f_id_dest']))?$p_array['f_id_dest']:0; + $this->ag_ref_ag_id=(isset($p_array['ag_ref_ag_id']))?$p_array['ag_ref_ag_id']:0; + $this->ag_timestamp=(isset($p_array['ag_timestamp']))?$p_array['ag_timestamp']:date('d-m-Y'); + $this->qcode_dest=(isset($p_array['qcode_dest']))?$p_array['qcode_dest']:""; + $this->dt_id=(isset($p_array['dt_id']))?$p_array['dt_id']:""; + $this->ag_state=(isset($p_array['ag_state']))?$p_array['ag_state']:2; + $this->ag_ref=(isset($p_array['ag_ref']))?$p_array['ag_ref']:""; + $this->ag_title=(isset($p_array['ag_title']))?$p_array['ag_title']:""; + $this->ag_hour=(isset($p_array['ag_hour']))?$p_array['ag_hour']:""; + $this->ag_dest=(isset($p_array['ag_dest']))?$p_array['ag_dest']:""; + $this->ag_priority=(isset($p_array['ag_priority']))?$p_array['ag_priority']:2; + $this->ag_cal=(isset($p_array['ag_cal']))?$p_array['ag_cal']:""; + $this->ag_contact=(isset($p_array['ag_contact']))?$p_array['ag_contact']:""; + $this->ag_comment=(isset($p_array['ag_comment']))?$p_array['ag_comment']:""; + + } /*!\brief remove the action * */ function remove() - { - $this->get(); - // remove the key - $sql=sprintf("delete from action_gestion where ag_id=%d",$this->ag_id); - ExecSql($this->db,$sql); + { + $this->get(); + // remove the key + $sql="delete from action_gestion where ag_id=$1"; + $this->db->exec_sql($sql,array($this->ag_id)); + + // remove the ref of the depending action + $sql="update action_gestion set ag_ref_ag_id=0 where ag_ref_ag_id=$1"; + $this->db->exec_sql($sql,array($this->ag_id)); - // remove the ref - $sql=sprintf("update action_gestion set ag_ref_ag_id=0 where ag_ref_ag_id=%d", - $this->ag_id); - ExecSql($this->db,$sql); - - // if there is a document - if ( $this->dt_id != 0 ) - { - $doc=new Document($this->db,$this->dt_id); - $doc->get(); - $doc->remove(); - if ( strlen(trim($doc->d_lob))!=0 ) - pg_lo_unlink($this->db,$doc->dt_lob); - } - - } + /* check the number of attached document */ + $doc=new Document($this->db); + $aDoc=$doc->get_all($this->ag_id); + if ( ! empty ($aDoc)) { + // if there are documents + for ($i=0;$i <sizeof($aDoc);$i++) { + $aDoc[$i]->remove(); + } + } + } + /*!\brief return the last p_limit operation into an array + *\param $p_limit is the max of operation to return + *\return $p_array of Action object + */ + function get_last($p_limit) { + $sql="select vw_name,ag_id,ag_title,ag_ref, dt_value,to_char(ag_timestamp,'DD.MM.YYYY') as ag_timestamp_fmt,ag_timestamp ". + " from action_gestion join document_type ". + " on (ag_type=dt_id) join vw_fiche_attr on (f_id=f_id_dest) where ag_state in (2,3) order by ag_timestamp desc limit $p_limit"; + $array=$this->db->get_array($sql); + return $array; + } } diff --git a/include/class_action_detail.php b/include/class_action_detail.php new file mode 100644 index 000000000..4891d21f6 --- /dev/null +++ b/include/class_action_detail.php @@ -0,0 +1,221 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ +require_once ('class_fiche.php'); +require_once ('class_database.php'); +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Action details are the details for a actions + */ + +/*!\brief Action Details are the details for an actions, it means + * the details of an order, delivery order, submit a quote... + * this class is linked to the table action_detail + * - "id"=>"ad_id", primary key + * - "qcode"=>"f_id", quick_code + * - "text"=>"ad_text", description lines + * - "price_unit"=>"ad_pu", price by unit + * - "quantity"=>"ad_quant", quantity + * - "tva_id"=>"ad_tva_id", tva_od + * - "tva_amount"=>"ad_tva_amount", vat amount + * - "total"=>"ad_total_amount", total amount including vat + * - "ag_id"=>"ag_id" => foreign key to action_gestion + * - db is the database connection + */ +class Action_Detail +{ + private static $variable=array( + "id"=>"ad_id", + "qcode"=>"f_id", + "text"=>"ad_text", + "price_unit"=>"ad_pu", + "quantity"=>"ad_quant", + "tva_id"=>"ad_tva_id", + "tva_amount"=>"ad_tva_amount", + "total"=>"ad_total_amount", + "ag_id"=>"ag_id" + ); + function __construct ($p_cn,$p_id=0) { + $this->db=$p_cn; + $this->ad_id=$p_id; + } + public function get_parameter($p_string) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + return $this->$idx; + } + else + exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); + } + public function set_parameter($p_string,$p_value) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + $this->$idx=$p_value; + } + else + exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); + + + } + public function get_info() { return var_export(self::$variable,true); } + public function verify() { + // Verify that the elt we want to add is correct + return 0; + } + public function save() { + if ( $this->ad_id == 0 ) + $this->insert(); + else + $this->update(); + } + + public function insert() { + if ( $this->verify() != 0 ) return; + $sql='INSERT INTO action_detail('. + ' f_id, ad_text, ad_pu, ad_quant, ad_tva_id, ad_tva_amount,'. + ' ad_total_amount, ag_id)'. + ' VALUES ($1, $2, $3, $4,$5,$6,$7,$8) returning ad_id'; + $this->ad_id=$this->db->get_value($sql,array( + $this->f_id, + $this->ad_text, + $this->ad_pu, + $this->ad_quant, + $this->ad_tva_id, + $this->ad_tva_amount, + $this->ad_total_amount, + $this->ag_id + ) + ); + + } + + public function update() { + if ( $this->verify() != 0 ) return; + + $sql='UPDATE action_detail '. + ' SET f_id=$1, ad_text=$2, ad_pu=$3, ad_quant=$4, ad_tva_id=$5,'. + ' ad_tva_amount=$6, ad_total_amount=$7, ag_id=$8'. + ' WHERE ad_id=$9'; + $this->id=$this->db->exec_sql($sql,array( + $this->f_id, + $this->ad_text, + $this->ad_pu, + $this->ad_quant, + $this->ad_tva_id, + $this->ad_tva_amount, + $this->ad_total_amount, + $this->ag_id, + $this->ad_id + ) + ); + + + } + /*!\brief retrieve all the details of an Action + *\return array of Action_Detail + *\see Action::get + */ + public function load_all() { + $sql="SELECT ad_id, f_id, ad_text, ad_pu, ad_quant, ad_tva_id, ad_tva_amount, + ad_total_amount, ag_id FROM action_detail ". + " where ag_id=$1"; + $res=$this->db->get_array( + $sql, + array($this->ag_id) + ); + if ( $this->db->count() == 0 ) return; + $aRet=array(); + for($i=0;$i<count($res);$i++) { + $a=new Action_Detail($this->db); + $row=$res[$i]; + foreach ($row as $idx=>$value) { $a->$idx=$value; } + $aRet[$i]=clone $a; + } + return $aRet; + } + + public function load() { + $sql="SELECT ad_id, f_id, ad_text, ad_pu, ad_quant, ad_tva_id, ad_tva_amount, + ad_total_amount, ag_id FROM action_detail". + " where ad_id=$1"; + + $res=$this->db->get_array($this->db, + $sql, + array($this->ad_id) + ); + if ( $this->db->count() == 0 ) return; + $row=$res[0]; + foreach ($row as $idx=>$value) { $this->$idx=$value; } + } + public function delete() { + exit(__FILE__.__LINE__.' : Non implémenté'); + } + /*!\brief Fill an Action_Detail Object with the data contained in an array + *\param $array + - [ad_id7] => ad_id + - [e_march7] => f_id + - [e_march7_label] => ad_text + - [e_march7_price] => ad_pu + - [e_quant7] => ad_quant + - [e_march7_tva_id] => ad_tva_id + - [e_march7_tva_amount] => ad_tva_amount + - [tvac_march7] => ad_total_amount + - [ag_id] => ag_id + *\param $idx is the idx (example 7) + *\note */ + public function from_array($array,$idx) { + $row=$array; + $this->ad_id=(isset($row['ad_id'.$idx]))?$row['ad_id'.$idx]:0; + + $qcode=(isset($row['e_march'.$idx]))?$row['e_march'.$idx]:""; + if (trim($qcode)=='') { + $this->f_id=0; + } else { + $tmp=new Fiche($this->db); + $tmp->get_by_qcode($qcode,false); + $this->f_id=$tmp->id; + } + $this->ad_text=(isset($row['e_march'.$idx.'_label']))?$row['e_march'.$idx.'_label']:""; + $this->ad_pu=(isset($row['e_march'.$idx.'_price']))?$row['e_march'.$idx.'_price']:0; + $this->ad_quant=(isset($row['e_quant'.$idx]))?$row['e_quant'.$idx]:0; + $this->ad_tva_id=(isset($row['e_march'.$idx.'_tva_id']))?$row['e_march'.$idx.'_tva_id']:0; + $this->ad_tva_amount=(isset($row['e_march'.$idx.'_tva_amount']))?$row['e_march'.$idx.'_tva_amount']:0; + $this->ad_total_amount=(isset($row['tvac_march'.$idx]))?$row['tvac_march'.$idx]:0; + $this->ag_id=(isset($array['ag_id']))?$array['ag_id']:0; + /* protect numeric */ + if (trim($this->ad_pu)=="" || isNumber($this->ad_pu)==0) $this->ad_pu=0; + if (trim($this->ad_quant)=="" || isNumber($this->ad_quant)==0) $this->ad_quant=0; + if (trim($this->ad_tva_amount)==""||isNumber($this->ad_tva_amount)==0) $this->ad_tva_amount=0; + if (trim($this->ad_total_amount)==""||isNumber($this->ad_total_amount)==0) $this->ad_total_amount=0; + if (trim($this->ad_tva_id)=="" || isNumber($this->ad_tva_id)==0) $this->ad_tva_id=0; + } + /*!\brief + *\param + *\return + *\note + *\see + */ + static function test_me() { + } + +} + +/* test::test_me(); */ + diff --git a/include/class_admin.php b/include/class_admin.php index 7e131cee2..cf500b85e 100644 --- a/include/class_admin.php +++ b/include/class_admin.php @@ -19,9 +19,8 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr require_once("constant.php"); -require_once("postgres.php"); +require_once('class_database.php'); require_once("class_acc_parm_code.php"); -require_once("class_widget.php"); require_once('class_fiche.php'); require_once('class_acc_account_ledger.php'); @@ -52,81 +51,7 @@ class Admin extends fiche{ } -/*! \function Summary - ************************************************** - \Brief show the default screen - * - * parm : - * - p_search (filter) - * gen : - * - - * return: string to display - */ - function Summary($p_search) - { - $str_dossier=dossier::get(); - $p_search=FormatString($p_search); - $url=urlencode($_SERVER['REQUEST_URI']); - $script=$_SERVER['PHP_SELF']; - // Creation of the nav bar - // Get the max numberRow - $all_admin=$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_admin,$_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_admin=$this->GetAll($offset,$search); - if ( $all_admin == 0 ) return ""; - $r=$bar; - $r.='<table width="95%"> -<TR style="background-color:lightgrey;"> -<TH>Quick Code</TH> -<th>Nom</th> -<th>Adresse</th> -<th>Action </th> -</TR>'; - if ( sizeof ($step_admin ) == 0 ) - return $r; - foreach ($step_admin as $admin ) { - $r.="<TR>"; - $e=sprintf('<A HREF="%s?p_action=admin&sa=detail&f_id=%d&%s&url=%s" title="Detail"> ', - $script,$admin->id,$str_dossier,$url); - $r.="<TD> $e".$admin->strAttribut(ATTR_DEF_QUICKCODE)."</A></TD>"; - $r.="<TD>".$admin->strAttribut(ATTR_DEF_NAME)."</TD>"; - $r.="<TD>".$admin->strAttribut(ATTR_DEF_ADRESS). - " ".$admin->strAttribut(ATTR_DEF_CP). - " ".$admin->strAttribut(ATTR_DEF_PAYS). - "</TD>"; - $r.="<td>"; - $r.=sprintf('<A class="mtitle" HREF="%s?p_action=contact&qcode=%s&%s&url=%s" title="Contact">Contact</A> - ', - $script,$admin->strAttribut(ATTR_DEF_QUICKCODE),$str_dossier,$url); - $r.=sprintf('<A class="mtitle" HREF="%s?p_action=suivi_courrier&sa=list&qcode=%s&%s&url=%s" title="Action">Action</A> - ', - $script,$admin->strAttribut(ATTR_DEF_QUICKCODE) ,$str_dossier,$url); - $r.=sprintf('<A class="mtitle" HREF="%s?liste&p_action=bank&sa=list&qcode=%s&%s&url=%s&p_periode=-1" title="Financier">Financier</A> - ', - $script,$admin->strAttribut(ATTR_DEF_QUICKCODE) ,$str_dossier,$url); - - $r.='</TD>'; - - $r.="</TR>"; - - } - $r.="</TABLE>"; - $r.=$bar; - return $r; - } } diff --git a/include/class_anc_account.php b/include/class_anc_account.php index 98cdfe16a..a72f1666c 100644 --- a/include/class_anc_account.php +++ b/include/class_anc_account.php @@ -20,15 +20,18 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file *\brief contains the object for the poste_analytique (table poste_analytique) */ /*!\brief contains the object for the poste_analytique (table poste_analytique) * */ -require_once("class_widget.php"); -require_once("postgres.php"); +require_once("class_ihidden.php"); +require_once("class_itext.php"); +require_once("class_iselect.php"); +require_once("class_ispan.php"); +require_once('class_database.php'); require_once("class_anc_plan.php"); class Anc_Account @@ -47,8 +50,8 @@ class Anc_Account $this->ga_id=null; } /*! \brief retrieve data from the database and - * fill the object - * \param $p_where the where clause + * fill the object + * \param $p_where the where clause */ private function fetch_from_db($p_where) { @@ -62,9 +65,9 @@ class Anc_Account where ". $p_where; - $ret=ExecSql($this->db,$sql); - if ( pg_NumRows($ret) == 0 )return null; - $line=pg_fetch_array($ret); + $ret=$this->db->exec_sql($sql); + if ( Database::num_row($ret) == 0 )return null; + $line=Database::fetch_array($ret); $this->id=$line['po_id']; $this->name=$line['po_name']; @@ -81,7 +84,7 @@ class Anc_Account } /*! * \brief retrieve data thanks the name - * \param $p_name name of the analytic account + * \param $p_name name of the analytic account * */ function get_by_name($p_name) @@ -98,9 +101,9 @@ class Anc_Account $this->format_data(); if ( strlen($this->name) == 0) return; - if ( $this->ga_id == null || strlen(trim($this->ga_id)) == 0 ) - $ga_id="NULL"; - else + if ( $this->ga_id == null || strlen(trim($this->ga_id)) == 0 ) + $ga_id="NULL"; + else $ga_id="'".$this->ga_id."'"; $sql="insert into poste_analytique ( po_name , @@ -108,24 +111,20 @@ class Anc_Account po_amount, po_description, ga_id - ) values (". - "'".$this->name."',". - $this->pa_id.",". - $this->amount.",". - "'".$this->description."',". - $ga_id.")"; + ) values ($1,$2,$3,$4,$5)"; + try { - ExecSql($this->db,$sql); + $this->db->exec_sql($sql,array($this->name,$this->pa_id,$this->amount,$this->description,$ga_id)); } catch (Exception $e) { echo_debug(__FILE__,__LINE__,$e); if ( DEBUG ) print_r($e); echo "<p class=\"notice\">Doublon : l'enregistrement n'est pas sauve</p>"; } - + } static function make_array_name($cn,$pa_id) { - $a=make_array($cn,"select po_name,po_name from poste_analytique ". + $a=$cn->make_array("select po_name,po_name from poste_analytique ". " where ". " pa_id =".$pa_id." order by po_name "); return $a; @@ -136,19 +135,20 @@ class Anc_Account if ( strlen($this->name) == 0) return; $sql="update poste_analytique ". - " set po_name='".$this->name."',". - " pa_id=".$this->pa_id.",". - " po_amount=".$this->amount.",". - " po_description='".$this->description."',". - " ga_id='".$this->ga_id."'". - " where po_id=".$this->id; - try { - ExecSql($this->db,$sql); + " set po_name=$1". + " ,pa_id=$2". + " ,po_amount=$3". + " ,po_description=$4". + " ,ga_id=$5". + " where po_id=$6"; + try { + $this->db->exec_sql($sql,array($this->name,$this->pa_id,$this->amount, + $this->description,$this->ga_id,$this->id)); } catch (Exception $e) { echo_debug(__FILE__,__LINE__,$e); echo "<p class=\"notice\">Doublon : l'enregistrement n'est pas sauve</p>"; } - + } private function format_data() { @@ -158,13 +158,15 @@ class Anc_Account $this->amount=FormatString($this->amount); if (strlen($this->amount) == 0 ) $this->amount=0.0; + if ( isNumber($this->amount) ==0 ) + $this->amount=0; $this->description=FormatString($this->description); } function delete() { $sql="delete from poste_analytique where po_id=".$this->id; - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } /*! \brief return an array of object Poste_Analytique * @@ -180,15 +182,15 @@ class Anc_Account from poste_analytique ". " order by po_name"; - $ex=ExecSql($this->db,$sql); - $ret=pg_fetch_all($ex); + $ex=$this->db->exec_sql($sql); + $ret=Database::fetch_all($ex); if ( $ret == null ) return null; $array=array(); foreach ($ret as $line) { - $objet=new Poste_Analytique($this->db); + $object=new Anc_Account($this->db); $object->id=$line['po_id']; $object->name=$line['po_name']; @@ -222,55 +224,57 @@ class Anc_Account } function form() { - $wId=new widget("hidden","po_id","po_id",$this->id); - $wName=new widget("text","Nom","po_name",$this->name); - $wPa_id=new widget("hidden","pa_id","pa_id",$this->pa_id); - $wAmount=new widget("text","Montant","po_amount",$this->amount); - $wDescription=new widget("text","Description","po_description",$this->description); - $aGroup_analytic=make_array($this->db,"select ga_id,ga_id from groupe_analytique where pa_id=".$this->pa_id,1); + $r=''; + $wName=new IText("po_name",$this->name); + $wAmount=new INum("po_amount",$this->amount); + $wDescription=new IText("po_description",$this->description); + $aGroup_analytic=$this->db->make_array("select ga_id,ga_id from groupe_analytique where pa_id=".$this->pa_id,1); if ( count($aGroup_analytic) > 1 ) { - $wGa_id=new widget("select","Groupe","ga_id"); + $wGa_id=new ISelect("ga_id"); $wGa_id->value=$aGroup_analytic; $wGa_id->selected=$this->ga_id; $wGa_id->table=1; } else { - $wGa_id=new widget('span'); + $wGa_id=new ISpan(); } $pa=new Anc_Plan($this->db,$this->pa_id); $pa->get(); - $wPaName=new widget("text","Plan A.","",$pa->name); + $wPaName=new IText("",$pa->name); $wPaName->table=1; - $wPaName->readonly=true; + $wPaName->readOnly=true; $wName->table=1; - $wPa_id->table=1; $wAmount->table=1; $wDescription->table=1; - - $r=$wId->IOValue(); - $r.=$wPa_id->IOValue(); + $r.=HtmlInput::hidden("pa_id",$this->pa_id); + $r.=HtmlInput::hidden("po_id",$this->id); $r.="<table>"; $r.="<tr>"; - $r.=$wName->IOValue(); + $r.=td(_('Nom')); + $r.=$wName->input(); $r.="</tr>"; $r.="<tr>"; - $r.=$wAmount->IOValue(); + $r.=td(_('Montant')); + $r.=$wAmount->input(); $r.="</tr>"; $r.="<tr>"; - $r.=$wDescription->IOValue(); + $r.=td(_('Description')); + $r.=$wDescription->input(); $r.="</tr>"; $r.="<tr>"; - $r.=$wPaName->IOValue(); + $r.=td(_('Plan Analytique')); + $r.=$wPaName->input(); $r.="</tr>"; $r.="<tr>"; - $r.=$wGa_id->IOValue(); + $r.=td(_('Groupe')); + $r.=$wGa_id->input(); $r.="</tr>"; $r.="</table>"; @@ -288,9 +292,9 @@ class Anc_Account $this->ga_id=(isset($p_array['ga_id']) && $p_array['ga_id'] != "-1" )?$p_array['ga_id']:null; } static function test_me() { - $cn=DbConnect(dossier::id()); - $pa_id=getDBValue($cn,"select max(pa_id) from plan_analytique"); - $o=new Poste_Analytique($cn); + $cn=new Database(dossier::id()); + $pa_id=$cn->get_value("select max(pa_id) from plan_analytique"); + $o=new Anc_Account($cn); echo "<h1>Poste_Analytique</h1>"; echo "<h2>get_list</h2>"; $ee=$o->get_list(); diff --git a/include/class_anc_balance_double.php b/include/class_anc_balance_double.php index 9d543db93..1af0d9052 100644 --- a/include/class_anc_balance_double.php +++ b/include/class_anc_balance_double.php @@ -20,23 +20,27 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * \brief - * Print the crossed balance between 2 plan + * Print the crossed balance between 2 plan */ /*! \brief - * Print the crossed balance between 2 plan + * Print the crossed balance between 2 plan * */ +require_once("class_iselect.php"); +require_once("class_itext.php"); +require_once("class_ibutton.php"); +require_once("class_ihidden.php"); require_once ('class_anc_print.php'); require_once ('class_anc_plan.php'); -class Anc_Balance_Double extends Anc_Print +class Anc_Balance_Double extends Anc_Print { -/*! +/*! * \brief compute the html display - * + * * * \return string */ @@ -75,7 +79,7 @@ class Anc_Balance_Double extends Anc_Print $tot_deb=0; $tot_cred=0; - // new + // new $r.="</table>"; $r.="<table class=\"mtitle\">"; $r.="<tr>"; @@ -98,8 +102,8 @@ class Anc_Balance_Double extends Anc_Print $r.=sprintf("<td>%12.2f</td>",$row['a_c']); $r.=sprintf("<td>%12.2f</td>",$row['a_solde']); $r.=sprintf("<td>%s</td>",$row['a_debit']); - $r.="</tr>"; - } + $r.="</tr>"; + } if ( $tot_deb != 0 || $tot_cred !=0 ) { $r.="<tr>"; $r.="<td>Total </td> <td></td><td> $tot_deb </td> <td>$tot_cred</td>"; @@ -125,7 +129,7 @@ class Anc_Balance_Double extends Anc_Print return $r; } -/*! +/*! * \brief Display the result in pdf * * \return none @@ -133,6 +137,7 @@ class Anc_Balance_Double extends Anc_Print function display_pdf() { $array=$this->load(); + if (empty($array))return; $offset=0; $page=1; $pagesize=50; @@ -160,14 +165,14 @@ class Anc_Balance_Double extends Anc_Print $filtre_pa=sprintf("Filtre poste plan1 %s %s", ($this->from_poste!="")?"de ".$this->from_poste:" ", ($this->to_poste!="")?"jusque ".$this->to_poste:""); - + if ( $this->from_poste2 !="" ||$this->to_poste2 !="") $filtre_pb=sprintf("Filtre poste plan2 %s %s", ($this->from_poste2!="")?"de ".$this->from_poste2:" ", ($this->to_poste2!="")?"jusque ".$this->to_poste2:""); - - - for ($i_loop=0;$i_loop<=$count;$i_loop++) { + + + for ($i_loop=0;$i_loop<=$count;$i_loop++) { $view=$array; $view=array_splice($view,$offset,$pagesize); @@ -188,10 +193,10 @@ class Anc_Balance_Double extends Anc_Print 'cols'=>array('a_d'=> array('justification'=>'right'), 'a_solde'=> array('justification'=>'right'), 'a_c'=> array('justification'=>'right')))); - + $page++; - $pdf->ezNewPage(); - + $pdf->ezNewPage(); + $offset+=$pagesize; } $sum=$this->show_sum($array); @@ -213,7 +218,7 @@ class Anc_Balance_Double extends Anc_Print } -/*! +/*! * \brief Compute the csv export * \return string with the csv */ @@ -243,13 +248,13 @@ class Anc_Balance_Double extends Anc_Print $r.=sprintf("%12.2f,",$row['a_c']); $r.=sprintf("%12.2f,",$row['a_solde']); $r.=sprintf('"%s"',$row['a_debit']); - $r.="\r\n"; - } + $r.="\r\n"; + } return $r; } -/*! +/*! * \brief Compute the form to display * \param $p_hidden hidden tag to be included (gDossier,...) * @@ -262,76 +267,75 @@ class Anc_Balance_Double extends Anc_Print // show the second plan $r.='<span style="padding:5px;margin:5px;border:2px double blue;display:block;">'; $plan=new Anc_Plan($this->db); - $plan_id=new widget("select","","pa_id2"); - $plan_id->value=make_array($this->db,"select pa_id, pa_name from plan_analytique order by pa_name"); + $plan_id=new ISelect("pa_id2"); + $plan_id->value=$this->db->make_array("select pa_id, pa_name from plan_analytique order by pa_name"); $plan_id->selected=$this->pa_id2; - $r.= "Plan Analytique :".$plan_id->IOValue(); + $r.= "Plan Analytique :".$plan_id->input(); - $poste=new widget("text"); + $poste=new IText(); $poste->size=10; - $r.="Entre le poste ".$poste->IOValue("from_poste2",$this->from_poste2); - $choose=new widget("button"); + $r.="Entre le poste ".$poste->input("from_poste2",$this->from_poste2); + $choose=new IButton(); $choose->name="Choix Poste"; - $choose->label="Recherche"; + $choose->label=_("Recherche"); $choose->javascript="onClick=search_ca('".$_REQUEST['PHPSESSID']."',".dossier::id().",'from_poste2','pa_id2')"; - $r.=$choose->IOValue(); + $r.=$choose->input(); - $r.=" et le poste ".$poste->IOValue("to_poste2",$this->to_poste2); + $r.=" et le poste ".$poste->input("to_poste2",$this->to_poste2); $choose->javascript="onClick=search_ca('".$_REQUEST['PHPSESSID']."',".dossier::id().",'to_poste2','pa_id2')"; - $r.=$choose->IOValue(); - $r.='<span class="notice" style="display:block">Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche</span>'; + $r.=$choose->input(); + $r.='<span class="notice" style="display:block">'. + _('Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche'). + '</span>'; $r.='</span>'; - $r.='<input type="SUBMIT" value="Afficher">'; + $r.=HtmlInput::submit('Affiche','Affiche'); return $r; } -/*! +/*! * \brief Show the button to export in PDF or CSV * \param $url_csv url of the csv * \param $url_pdf url of the pdf - * \param $p_string hidden data to include in the form - * + * \param $p_string hidden data to include in the form + * * * \return string with the button */ - function show_button($url_csv,$url_pdf,$p_string="") + function show_button($url_csv,$url_pdf,$p_string="") { $r=""; - $submit=new widget(); - $submit->table=0; - $hidden=new widget("hidden"); $r.= '<form method="GET" action="'.$url_pdf.'" style="display:inline">'; $r.= $p_string; - $r.= dossier::hidden(); - $r.= $hidden->IOValue("to",$this->to); - $r.= $hidden->IOValue("from",$this->from); - $r.= $hidden->IOValue("pa_id",$this->pa_id); - $r.= $hidden->IOValue("from_poste",$this->from_poste); - $r.= $hidden->IOValue("to_poste",$this->to_poste); - $r.= $hidden->IOValue("pa_id2",$this->pa_id2); - $r.= $hidden->IOValue("from_poste2",$this->from_poste2); - $r.= $hidden->IOValue("to_poste2",$this->to_poste2); - $r.=widget::submit('bt_pdf',"Export en PDF"); + $r.= HtmlInput::hidden("to",$this->to); + $r.= HtmlInput::hidden("from",$this->from); + $r.= HtmlInput::hidden("pa_id",$this->pa_id); + $r.= HtmlInput::hidden("from_poste",$this->from_poste); + $r.= HtmlInput::hidden("to_poste",$this->to_poste); + $r.= HtmlInput::hidden("pa_id2",$this->pa_id2); + $r.= HtmlInput::hidden("from_poste2",$this->from_poste2); + $r.= HtmlInput::hidden("to_poste2",$this->to_poste2); + $r.=dossier::hidden(); + $r.=HtmlInput::submit('bt_pdf',"Export en PDF"); $r.= '</form>'; $r.= '<form method="GET" action="'.$url_csv.'" style="display:inline">'; - $r.= $hidden->IOValue("to",$this->to); - $r.= $hidden->IOValue("from",$this->from); - $r.= $hidden->IOValue("pa_id",$this->pa_id); - $r.= $hidden->IOValue("from_poste",$this->from_poste); - $r.= $hidden->IOValue("to_poste",$this->to_poste); - $r.= $hidden->IOValue("pa_id2",$this->pa_id2); - $r.= $hidden->IOValue("from_poste2",$this->from_poste2); - $r.= $hidden->IOValue("to_poste2",$this->to_poste2); + $r.= HtmlInput::hidden("to",$this->to); + $r.= HtmlInput::hidden("from",$this->from); + $r.= HtmlInput::hidden("pa_id",$this->pa_id); + $r.= HtmlInput::hidden("from_poste",$this->from_poste); + $r.= HtmlInput::hidden("to_poste",$this->to_poste); + $r.= HtmlInput::hidden("pa_id2",$this->pa_id2); + $r.= HtmlInput::hidden("from_poste2",$this->from_poste2); + $r.= HtmlInput::hidden("to_poste2",$this->to_poste2); $r.= $p_string; $r.= dossier::hidden(); - $r.=widget::submit('bt_csv',"Export en CSV"); + $r.=HtmlInput::submit('bt_csv',"Export en CSV"); $r.= '</form>'; return $r; } -/*! - * \brief complete the object with the data in $_REQUEST +/*! + * \brief complete the object with the data in $_REQUEST */ function get_request() { @@ -341,8 +345,8 @@ class Anc_Balance_Double extends Anc_Print $this->pa_id2=(isset($_REQUEST['pa_id2']))?$_REQUEST['pa_id2']:""; } -/*! - * \brief load the data from the database +/*! + * \brief load the data from the database * * \return array */ @@ -351,21 +355,21 @@ class Anc_Balance_Double extends Anc_Print $filter_poste=""; $and=""; if ( $this->from_poste != "" ){ - $filter_poste.=" $and upper(pa.po_name)>= upper('".pg_escape_string($this->from_poste)."')"; + $filter_poste.=" $and upper(pa.po_name)>= upper('".Database::escape_string($this->from_poste)."')"; $and=" and "; } if ( $this->to_poste != "" ){ - $filter_poste.=" $and upper(pa.po_name)<= upper('".pg_escape_string($this->to_poste)."')"; + $filter_poste.=" $and upper(pa.po_name)<= upper('".Database::escape_string($this->to_poste)."')"; $and=" and "; } if ( $this->from_poste2 != "" ){ - $filter_poste.=" $and upper(pb.po_name)>= upper('".pg_escape_string($this->from_poste2)."')"; + $filter_poste.=" $and upper(pb.po_name)>= upper('".Database::escape_string($this->from_poste2)."')"; $and=" and "; } if ( $this->to_poste2 != "" ){ - $filter_poste.=" $and upper(pb.po_name)<= upper('".pg_escape_string($this->to_poste2)."')"; + $filter_poste.=" $and upper(pb.po_name)<= upper('".Database::escape_string($this->to_poste2)."')"; $and=" and "; } if ( $filter_poste != "") @@ -379,33 +383,33 @@ b_po_id, pb.po_name as b_po_name, sum(a_oa_amount_c) as a_c, sum(a_oa_amount_d) as a_d -from (select +from (select a.po_id as a_po_id, b.po_id as b_po_id, case when a.oa_debit='t' then a.oa_amount else 0 end as a_oa_amount_d, case when a.oa_debit='f' then a.oa_amount else 0 end as a_oa_amount_c -from -operation_analytique as a join operation_analytique as b using (j_id) +from +operation_analytique as a join operation_analytique as b using (j_id) where a.pa_id=". $this->pa_id." and b.pa_id=".$this->pa_id2." ".$this->set_sql_filter()." -) as m join poste_analytique as pa on ( a_po_id=pa.po_id) +) as m join poste_analytique as pa on ( a_po_id=pa.po_id) join poste_analytique as pb on (b_po_id=pb.po_id) $filter_poste - group by a_po_id,b_po_id,pa.po_name,pa.po_description,pb.po_name + group by a_po_id,b_po_id,pa.po_name,pa.po_description,pb.po_name order by 1; "; - $res=ExecSql($this->db,$sql); + $res=$this->db->exec_sql($sql); - if ( pg_NumRows($res) == 0 ) + if ( Database::num_row($res) == 0 ) return null; $a=array(); $count=0; - $array=pg_fetch_all($res); + $array=Database::fetch_all($res); foreach ($array as $row) { $a[$count]['a_po_id']=$row['a_po_id']; $a[$count]['a_d']=$row['a_d']; @@ -424,8 +428,8 @@ order by 1; } -/*! - * \brief Set the filter (account_date) +/*! + * \brief Set the filter (account_date) * * \return return the string to add to load */ @@ -442,10 +446,10 @@ order by 1; } return $sql; - + } - -/*! + +/*! * \brief add extra lines with sum of each account * \param $p_array array returned by load() */ @@ -458,7 +462,7 @@ order by 1; $array=array(); foreach ( $p_array as $row) { - if ( $old != $row['a_po_name'] && $first==false ) + if ( $old != $row['a_po_name'] && $first==false ) { $s=abs($tot_deb-$tot_cred); @@ -475,7 +479,7 @@ order by 1; */ $tot_deb=0; $tot_cred=0; - + $old=$row['a_po_name']; $old_desc=$row['a_po_description']; } @@ -497,7 +501,7 @@ order by 1; ,'debit'=>$tot_deb,'credit'=>$tot_cred, 'solde'=>$s,'dc'=>$d); - + /* $r=sprintf(" %s Debit %12.2f Credit %12.2f solde %12.2f %s", $old, $tot_deb, @@ -509,23 +513,23 @@ order by 1; return $array; } -/*! +/*! * \brief for testing and debuggind the class * it must never be called from production system, it is * intended only for developpers * \param * \param * \param - * + * * * \return none */ static function test_me() { - $a=DbConnect(dossier::id()); - + $a=new Database(dossier::id()); + $bal=new Anc_Balance_Double($a); - $bal->get_request(); + $bal->get_request(); echo '<form method="GET">'; diff --git a/include/class_anc_balance_simple.php b/include/class_anc_balance_simple.php index 102be6f81..1cc6b5d3d 100644 --- a/include/class_anc_balance_simple.php +++ b/include/class_anc_balance_simple.php @@ -20,10 +20,11 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file \brief manage the simple balance for CA, inherit from balance_ca */ +require_once("class_ihidden.php"); require_once ('class_anc_print.php'); require_once ('class_anc_plan.php'); require_once ('ac_common.php'); @@ -35,8 +36,8 @@ require_once ('header_print.php'); class Anc_Balance_Simple extends Anc_Print { -/*! - * \brief load the data from the database +/*! + * \brief load the data from the database * * \return array */ @@ -44,7 +45,7 @@ class Anc_Balance_Simple extends Anc_Print { { $filter=$this->set_sql_filter(); // sum debit - + $sql="select m.po_id,sum(deb) as sum_deb,sum(cred) as sum_cred,"; $sql.=" po_name||' '||po_description as po_name"; $sql.=" from "; @@ -56,14 +57,13 @@ class Anc_Balance_Simple extends Anc_Print { $sql.=" where pa_id=".$this->pa_id; $sql.=" group by po_id,po_name,po_description"; $sql.=" order by po_id"; + $res=$this->db->exec_sql($sql); - $res=ExecSql($this->db,$sql); - - if ( pg_NumRows($res) == 0 ) + if ( Database::num_row($res) == 0 ) return null; $a=array(); $count=0; - $array=pg_fetch_all($res); + $array=Database::fetch_all($res); foreach ($array as $row) { $a[$count]['po_id']=$row['po_id']; $a[$count]['sum_deb']=$row['sum_deb']; @@ -75,10 +75,10 @@ class Anc_Balance_Simple extends Anc_Print { } return $a; - + } -/*! - * \brief Set the filter (account_date) +/*! + * \brief Set the filter (account_date) * * \return return the string to add to load */ @@ -104,11 +104,11 @@ class Anc_Balance_Simple extends Anc_Print { $and=" and "; } return $sql; - + } -/*! +/*! * \brief compute the html display - * + * * * \return string */ @@ -142,12 +142,12 @@ class Anc_Balance_Simple extends Anc_Print { $deb=($row['sum_deb'] > $row['sum_cred'])?"D":"C"; $deb=($row['solde'] == 0 )?'':$deb; $r.=sprintf("<td>%s</td>",$deb); - $r.="</tr>"; - } + $r.="</tr>"; + } $r.="</table>"; return $r; } -/*! +/*! * \brief Compute the form to display * \param $p_hidden hidden tag to be included (gDossier,...) * @@ -157,12 +157,12 @@ class Anc_Balance_Simple extends Anc_Print { function display_form($p_string="") { $r=parent::display_form($p_string); - $r.= '<input type="submit" value="Afficher">'; + $r.= HtmlInput::submit('Affiche','Affiche'); return $r; } -/*! +/*! * \brief Display the result in pdf * * \return none @@ -182,7 +182,8 @@ class Anc_Balance_Simple extends Anc_Print { $this->to_poste, $this->from, $this->to); - for ($i_loop=0;$i_loop<=$count;$i_loop++) { + + for ($i_loop=0;$i_loop<=$count;$i_loop++) { $view=$array; $view=array_splice($view,$offset,$pagesize); @@ -199,22 +200,22 @@ class Anc_Balance_Simple extends Anc_Print { 'cols'=>array('sum_deb'=> array('justification'=>'right'), 'solde'=> array('justification'=>'right'), 'sum_cred'=> array('justification'=>'right')))); - + $page++; - $pdf->ezNewPage(); + $pdf->ezNewPage(); $offset+=$pagesize; } $pdf->ezStream(); } -/*! +/*! * \brief Compute the csv export * \return string with the csv */ function display_csv() { - $array=$this->load(); + $array=$this->load(); if ( is_array($array) == false ){ return $array; @@ -230,68 +231,64 @@ class Anc_Balance_Simple extends Anc_Print { $r.=sprintf("%12.2f,",$row['sum_cred']); $r.=sprintf("%12.2f,",$row['solde']); $r.=sprintf("'%s'",$row['debit']); - $r.="\r\n"; - } + $r.="\r\n"; + } return $r; } -/*! +/*! * \brief Show the button to export in PDF or CSV * \param $url_csv url of the csv * \param $url_pdf url of the pdf - * \param $p_string hidden data to include in the form - * + * \param $p_string hidden data to include in the form + * * * \return string with the button */ - function show_button($url_csv,$url_pdf,$p_string="") + function show_button($url_csv,$url_pdf,$p_string="") { $r=""; - $submit=new widget(); - $submit->table=0; - $hidden=new widget("hidden"); $r.= '<form method="GET" action="'.$url_pdf.'" style="display:inline">'; $r.= $p_string; $r.= dossier::hidden(); - $r.= $hidden->IOValue("to",$this->to); - $r.= $hidden->IOValue("from",$this->from); - $r.= $hidden->IOValue("pa_id",$this->pa_id); - $r.= $hidden->IOValue("from_poste",$this->from_poste); - $r.= $hidden->IOValue("to_poste",$this->to_poste); - $r.=widget::submit('bt_pdf',"Export en PDF"); + $r.= HtmlInput::hidden("to",$this->to); + $r.= HtmlInput::hidden("from",$this->from); + $r.= HtmlInput::hidden("pa_id",$this->pa_id); + $r.= HtmlInput::hidden("from_poste",$this->from_poste); + $r.= HtmlInput::hidden("to_poste",$this->to_poste); + $r.=HtmlInput::submit('bt_pdf',"Export en PDF"); $r.= '</form>'; $r.= '<form method="GET" action="'.$url_csv.'" style="display:inline">'; - $r.= $hidden->IOValue("to",$this->to); - $r.= $hidden->IOValue("from",$this->from); - $r.= $hidden->IOValue("pa_id",$this->pa_id); - $r.= $hidden->IOValue("from_poste",$this->from_poste); - $r.= $hidden->IOValue("to_poste",$this->to_poste); - + $r.= HtmlInput::hidden("to",$this->to); + $r.= HtmlInput::hidden("from",$this->from); + $r.= HtmlInput::hidden("pa_id",$this->pa_id); + $r.= HtmlInput::hidden("from_poste",$this->from_poste); + $r.= HtmlInput::hidden("to_poste",$this->to_poste); $r.= $p_string; $r.= dossier::hidden(); - $r.=widget::submit('bt_csv',"Export en CSV"); + $r.=HtmlInput::submit('bt_csv',"Export en CSV"); $r.= '</form>'; return $r; } -/*! +/*! * \brief for testing and debuggind the class * it must never be called from production system, it is * intended only for developpers * \param * \param * \param - * + * * * \return none */ static function test_me () { // call the page with ?gDossier=14 - $a=DbConnect(dossier::id()); - + $a=new Database(dossier::id()); + $bal=new Anc_Balance_Simple($a); - $bal->get_request(); + $bal->get_request(); echo '<form method="GET">'; diff --git a/include/class_anc_group.php b/include/class_anc_group.php index b208372e7..0b7657a67 100644 --- a/include/class_anc_group.php +++ b/include/class_anc_group.php @@ -24,7 +24,7 @@ * \brief class for the group of the analytic account * */ -require_once ('postgres.php'); +require_once ('class_database.php'); require_once ('constant.php'); require_once ('debug.php'); require_once ('class_dossier.php'); @@ -51,11 +51,11 @@ class Anc_Group { function insert() { $sql=" insert into groupe_analytique (ga_id,ga_description,pa_id) values ('%s','%s',%d)"; - $sql=sprintf($sql,pg_escape_string($this->ga_id), - pg_escape_string($this->ga_description), + $sql=sprintf($sql,Database::escape_string($this->ga_id), + Database::escape_string($this->ga_description), $this->pa_id); try { - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } catch (Exception $a) { return '<span class="notice">Doublon !!</span>'; } @@ -68,9 +68,9 @@ class Anc_Group { function remove() { $this->ga_id=str_replace(' ','',$this->ga_id); $this->ga_id=strtoupper($this->ga_id); - $sql=" delete from groupe_analytique where ga_id='".pg_escape_string($this->ga_id)."'"; + $sql=" delete from groupe_analytique where ga_id='".Database::escape_string($this->ga_id)."'"; - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } /*! @@ -79,8 +79,8 @@ class Anc_Group { function load() { $sql="select ga_id, ga_description,pa_id from groupe_analytique where". " ga_id = ".$this->ga_id; - $res=ExecSql($this->db,$sql); - $array=pg_fetch_all($res); + $res=$this->db->exec_sql($sql); + $array=Database::fetch_all($res); if ( ! empty($array) ) { $this->ga_id=$array['ga_id']; $this->ga_description=$array['ga_description']; @@ -101,8 +101,8 @@ class Anc_Group { $sql=" select ga_id,groupe_analytique.pa_id,pa_name,ga_description ". " from groupe_analytique ". " join plan_analytique using (pa_id)"; - $r=ExecSql($this->db,$sql); - $array=pg_fetch_all($r); + $r=$this->db->exec_sql($sql); + $array=Database::fetch_all($r); $res=array(); if ( ! empty($array)) { foreach ($array as $m ) { @@ -116,7 +116,7 @@ class Anc_Group { } static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); print_r($cn); $o=new Anc_Group($cn); $r=$o->myList(); diff --git a/include/class_anc_group_operation.php b/include/class_anc_group_operation.php index 940ad758e..4f5ce1814 100644 --- a/include/class_anc_group_operation.php +++ b/include/class_anc_group_operation.php @@ -20,16 +20,19 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * \brief group of object operations, used for misc operation */ /*! \brief group of object operations, used for misc operation * */ +require_once("class_idate.php"); +require_once("class_itext.php"); +require_once("class_iselect.php"); +require_once("class_icheckbox.php"); require_once ("class_anc_operation.php"); -require_once ("postgres.php"); -require_once ("class_widget.php"); +require_once('class_database.php'); require_once ('class_anc_plan.php'); require_once ('class_dossier.php'); @@ -55,24 +58,35 @@ class Anc_Group_Operation } /*!\brief add several rows */ function add() { - /*!\todo add a control to check that the amount are balanced if - not throw an exception - */ - foreach ($this->a_operation as $row) { - $row->add(); - } + + $amount=0; + try { + $this->db->start(); + foreach ($this->a_operation as $row) { + $add=round($row->oa_amount,2); + $add=($row->oa_debit=='t')?$add:$add*(-1); + $amount+=round($add,2); + $row->add(); + } + if ( $amount != 0 ) throw new Exception (_('Operation non equilibrée')); + } catch (Exception $e) { + echo $e->getTrace(); + $this->db->rollback(); + exit(); + } + $this->db->commit(); } /*!\brief show a form for the operation (several rows) * \return the string containing the form but without the form tag * */ function form($p_readonly=0){ - $wDate=new widget("js_date","Date : ","pdate",$this->date); + $wDate=new IDate("pdate",$this->date); $wDate->table=1; $wDate->size=10; $wDate->readonly=$p_readonly; - $wDescription=new widget("text","Description","pdesc"); + $wDescription=new IText("pdesc"); $wDescription->table=0; $wDescription->size=80; $wDescription->readonly=$p_readonly; @@ -87,21 +101,21 @@ class Anc_Group_Operation $ret.='<table style="border: 2px outset blue; width: 100%;" >'; - $ret.="<TR>".$wDate->IOValue()."</tr>"; + $ret.="<TR>".$wDate->input()."</tr>"; $ret.='<tr><td style="border:1px groove blue">Description</td>'. '<td colspan="3">'. - $wDescription->IOValue()."</td></tr>"; + $wDescription->input()."</td></tr>"; $Plan=new Anc_Plan($this->db); $aPlan=$Plan->get_list(); $ret.='</table><table style="border: 2px outset blue; width: 100%;">'; /* show 10 rows */ $ret.="<tr>"; - foreach ($aPlan as $d) + foreach ($aPlan as $d) { $idx=$d['id']; /* array of possible value for the select */ - $aPoste[$idx]=make_array($this->db,"select po_id as value,". - " html_quote(po_name||':'||po_description) as label ". + $aPoste[$idx]=$this->db->make_array("select po_id as value,". + " html_quote(po_name||':'||coalesce(po_description,'-')) as label ". " from poste_analytique ". " where pa_id = ".$idx. " order by po_name "); @@ -113,34 +127,32 @@ class Anc_Group_Operation "<th>Débit</th>". "</tr>"; - for ($i = 0;$i < $this->nMaxRow;$i++) + for ($i = 0;$i < $this->nMaxRow;$i++) { $ret.="<tr>"; - foreach ($aPlan as $d) + foreach ($aPlan as $d) { $idx=$d['id']; // init variable - $wSelect=new widget("select","","pop".$i."plan".$idx); + $wSelect=new ISelect("pop".$i."plan".$idx); $wSelect->value=$aPoste[$idx]; - $wSelect->table=1; $wSelect->size=12; - $wSelect->readonly=$p_readonly; - if ( isset($this->a_operation[$i])) { - $wSelect->selected=$this->a_operation[$i]->po_id; + $wSelect->readOnly=$p_readonly; + if ( isset($this->a_operation[$i])) { + $wSelect->selected=$this->a_operation[$i]->po_id; } - $ret.=$wSelect->IOValue(); - } - $wAmount=new widget("text","","pamount$i",0.0); + $ret.=td($wSelect->input()); + } + $wAmount=new INum("pamount$i",0.0); $wAmount->size=12; $wAmount->table=1; - $wAmount->javascript=" onChange=caod_checkTotal()"; - $wAmount->readonly=$p_readonly; - - $wDebit=new widget("checkbox","","pdeb$i"); - $wDebit->table=1; - $wDebit->readonly=$p_readonly; + $wAmount->javascript=" onChange=format_number(this);caod_checkTotal()"; + $wAmount->readOnly=$p_readonly; + + $wDebit=new ICheckBox("pdeb$i"); + $wDebit->readOnly=$p_readonly; $wDebit->javascript=" onChange=caod_checkTotal()"; if ( isset ($this->a_operation[$i])) { $wSelect->selected=$this->a_operation[$i]->po_id; @@ -148,13 +160,13 @@ class Anc_Group_Operation $wDebit->value=$this->a_operation[$i]->oa_debit; if ( $wDebit->value=='t') { $wDebit->selected=true;} } - + // build the table - + $ret.="<TD></TD>"; - $ret.=$wAmount->IOValue(); - $ret.=$wDebit->IOValue(); - + $ret.=$wAmount->input(); + $ret.=td($wDebit->input()); + $ret.="</tr>"; } $ret.="</table>"; @@ -169,12 +181,12 @@ class Anc_Group_Operation for ( $i = 0;$i <$this->nMaxRow;$i++) { - foreach ($aPlan as $d) + foreach ($aPlan as $d) { $idx=$d['id']; $p=new Anc_Operation($this->db); $p->oa_amount=$p_array["pamount$i"]; - + $p->oa_description=$p_array["pdesc"]; $p->oa_date=$p_array['pdate']; $p->j_id=0; @@ -190,9 +202,9 @@ class Anc_Group_Operation /*!\brief save the group of operation but only if the amount is balanced */ function save() { - StartSql($this->db); + $this->db->start(); try { - $oa_group=NextSequence($this->db,'s_oa_group'); + $oa_group=$this->db->get_next_seq('s_oa_group'); for ($i=0;$i<count($this->a_operation);$i++) { $this->a_operation[$i]->oa_group=$oa_group; $this->a_operation[$i]->add(); @@ -202,20 +214,20 @@ class Anc_Group_Operation 'Erreur dans l\'enregistrement '. __FILE__.':'.__LINE__.' '. $ex->getMessage(); - Rollback($p_cn); + $p_cn->rollback(); exit(); } - Commit($this->db); + $this->db->commit(); } /*!\brief show the form */ function show() { return $this->form(1); } - static function test_me() + static function test_me() { $dossier=dossier::id(); - $cn=DbConnect($dossier); + $cn=new Database($dossier); if ( isset($_POST['go'])) { $b=new Anc_Group_Operation($cn); diff --git a/include/class_anc_listing.php b/include/class_anc_listing.php index 512a709a6..df0bff77c 100644 --- a/include/class_anc_listing.php +++ b/include/class_anc_listing.php @@ -20,14 +20,15 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * \brief definition of Anc_Listing */ +require_once("class_ihidden.php"); require_once ('class_anc_plan.php'); require_once ('class_anc_print.php'); require_once ('class_anc_operation.php'); -/*! +/*! * \brief manage the CA listing * * \return @@ -37,22 +38,22 @@ class Anc_Listing extends Anc_Print { function display_form($p_string="") { echo '<form method="get">'; $r=parent::display_form($p_string); - $r.='<input type="submit" name="result" value="Afficher">'; + $r.=HtmlInput::submit('result','Afficher'); $r.= '</form>'; return $r; } -/*! - * \brief complete the object with the data in $_REQUEST +/*! + * \brief complete the object with the data in $_REQUEST */ function get_request() { parent::get_request(); $this->pa_id=(isset($_REQUEST['pa_id']))?$_REQUEST['pa_id']:""; } -/*! +/*! * \brief compute the html display - * + * * * \return string */ @@ -66,18 +67,18 @@ class Anc_Listing extends Anc_Print { } - if ( empty($array) ) { $r.= "aucune donnée"; return $r;} + if ( empty($array) ) { $r.= _("aucune donnée"); return $r;} $r.= '<table>'; $r.= '<tr>'. - '<th>Date</th>'. - '<th>Nom</th>'. - '<th>Description</th>'. - '<th>Montant</th>'. - '<th>D/C</th>'. + '<th>'._('Date').'</th>'. + '<th>'._('Nom').'</th>'. + '<th>'._('Description').'</th>'. + '<th>'._('Montant').'</th>'. + '<th>'._('D/C').'</th>'. '</tr>'; foreach ( $array as $row ) { $r.= '<tr>'; - $r.= + $r.= '<td>'.$row['oa_date'].'</td>'. '<td>'.h($row['po_name']).'</td>'. '<td>'.h($row['oa_description']).'</td>'. @@ -88,8 +89,8 @@ class Anc_Listing extends Anc_Print { $r.= '</table>'; return $r; } -/*! - * \brief load the data from the database +/*! + * \brief load the data from the database * * \return array */ @@ -100,14 +101,14 @@ class Anc_Listing extends Anc_Print { $array=$op->get_list($this->from,$this->to,$this->from_poste,$this->to_poste); return $array; } -/*! +/*! * \brief Compute the csv export * \return string with the csv */ function display_csv() { - $array=$this->load($this->from,$this->to,$this->from_poste,$this->to_poste); + $array=$this->load($this->from,$this->to,$this->from_poste,$this->to_poste); if ( empty($array) == true ){ return $array; @@ -120,64 +121,63 @@ class Anc_Listing extends Anc_Print { $r.=sprintf("'%s',",$row['oa_description']); $r.=sprintf("%12.2f,",$row['oa_amount']); $r.=sprintf("'%s'",(($row['oa_debit']=='f')?'CREDIT':'DEBIT')); - $r.="\r\n"; - } + $r.="\r\n"; + } return $r; } -/*! +/*! * \brief show the export button to pdf and CSV * \param $p_string string containing some HTML tag as hidden field * \param * \param - * + * * * \return string containing the html code */ function show_button($p_string='') { $r=""; - $submit=new widget(); - $submit->table=0; - $hidden=new widget("hidden"); + $submit=HtmlInput::submit('',''); + $hidden=new IHidden(); /* for the export in PDF * Not yet needed, the html print should be enough $r.= '<form method="GET" action="ca_list_pdf.php" style="display:inline">'; $r.= $p_string; $r.= dossier::hidden(); - $r.= $hidden->IOValue("to",$this->to); - $r.= $hidden->IOValue("from",$this->from); - $r.= $hidden->IOValue("pa_id",$this->pa_id); - $r.= $hidden->IOValue("from_poste",$this->from_poste); - $r.= $hidden->IOValue("to_poste",$this->to_poste); - $r.=widget::submit('bt_pdf',"Export en PDF"); + $r.= $hidden->input("to",$this->to); + $r.= $hidden->input("from",$this->from); + $r.= $hidden->input("pa_id",$this->pa_id); + $r.= $hidden->input("from_poste",$this->from_poste); + $r.= $hidden->input("to_poste",$this->to_poste); + $r.=HtmlInput::submit('bt_pdf',"Export en PDF"); $r.= '</form>'; */ $r.= '<form method="GET" action="ca_list_csv.php" style="display:inline">'; - $r.= $hidden->IOValue("to",$this->to); - $r.= $hidden->IOValue("from",$this->from); - $r.= $hidden->IOValue("pa_id",$this->pa_id); - $r.= $hidden->IOValue("from_poste",$this->from_poste); - $r.= $hidden->IOValue("to_poste",$this->to_poste); + $r.= HtmlInput::hidden("to",$this->to); + $r.= HtmlInput::hidden("from",$this->from); + $r.= HtmlInput::hidden("pa_id",$this->pa_id); + $r.= HtmlInput::hidden("from_poste",$this->from_poste); + $r.= HtmlInput::hidden("to_poste",$this->to_poste); $r.= $p_string; $r.= dossier::hidden(); - $r.=widget::submit('bt_csv',"Export en CSV"); + $r.=HtmlInput::submit('bt_csv',"Export en CSV"); $r.= '</form>'; return $r; } -/*! +/*! * \brief debugging and test function for dev. only * \param * \param * \param - * + * * * \return */ static function test_me() { - + } } diff --git a/include/class_anc_operation.php b/include/class_anc_operation.php index 35a2d3c25..d9242f4a7 100644 --- a/include/class_anc_operation.php +++ b/include/class_anc_operation.php @@ -20,15 +20,18 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file *\brief definition of Anc_Operation */ +require_once("class_ibutton.php"); +require_once("class_ihidden.php"); +require_once("class_iselect.php"); +require_once("class_itext.php"); require_once("class_anc_plan.php"); -require_once("class_widget.php"); require_once ("user_common.php"); /*! \brief this class is used to show the form for entering an - * operation only FOR analytic operation + * operation only FOR analytic operation * to save it, to display or to get a list from a certain period * */ @@ -49,7 +52,7 @@ class Anc_Operation var $pa_id; /*!< the plan analytique id */ /*!\brief constructor - * + * */ function Anc_Operation ($p_cn,$p_id=0) { $this->db=$p_cn; @@ -63,16 +66,16 @@ class Anc_Operation function add($p_seq=0) { if ( $this->oa_group == 0) { - $this->oa_group=NextSequence($this->db,'s_oa_group'); + $this->oa_group=$this->db->get_next_seq('s_oa_group'); } if ( $this->j_id == 0 ) { $this->j_id="null"; } - + // we don't save null operations - if ( $this->oa_amount == 0 || $this->po_id==-1) + if ( $this->oa_amount == 0 || $this->po_id==-1) return; $oa_row=(isset($this->oa_row))?$this->oa_row:"NULL"; @@ -90,14 +93,14 @@ class Anc_Operation $this->po_id.",". $this->pa_id.",". $this->oa_amount.",". - "' ".pg_escape_string($this->oa_description)."',". + "' ".Database::escape_string($this->oa_description)."',". "'".$this->oa_debit."',". $this->oa_group.",". $this->j_id.",". "to_date('".$this->oa_date."','DD.MM.YYYY'),".$oa_row.")"; - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } /*!\brief delete a row from the table operation_analytique @@ -106,16 +109,16 @@ class Anc_Operation function delete() { $sql="delete from operation_analytique where oa_id=".$this->oa_id; - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } /*!\brief update a row in the table operation_analytique */ function update() { if ( $this->po_id == -1) { $this->delete();return;} - + $sql="update operation_analytique set po_id=".$this->po_id." where oa_id=".$this->oa_id; - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } /*!\brief get a list of row from a certain periode @@ -143,23 +146,22 @@ class Anc_Operation " join poste_analytique using(po_id) ". "where $pa_id_cond oa_amount <> 0.0 $cond $cond_poste". " order by oa_date ,oa_group,oa_debit desc,oa_id"; - $RetSql=ExecSql($this->db,$sql); + $RetSql=$this->db->exec_sql($sql); - $array=pg_fetch_all($RetSql); + $array=Database::fetch_all($RetSql); return $array; } /*\brief show the HTML table for the operation */ function html_table($p_from){ - - if ($p_from=="") { $from="";$to="";} - else - list($from,$to)=get_periode($this->db,$p_from); - + else { + $p=new Periode($this->db); + list($from,$to)=$p->get_date_limit($p_from); + } $array=$this->get_list($from,$to); if ( empty($array) ) @@ -168,14 +170,14 @@ class Anc_Operation // jrn_navigation_bar $step=$_SESSION['g_pagesize']; $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; + $offset=(isset($_GET['offset']))?$_GET['offset']:0; $bar=jrn_navigation_bar($offset+1,count($array),$step,$page); $view=array_splice($array,$offset,$step); $gDossier=dossier::id(); $ret=""; $ret.=$bar; - $ret.=JS_VIEW_JRN_MODIFY; + $ret.=JS_LEDGER; $count=0; $group=0; $oldgroup=0; @@ -183,25 +185,25 @@ class Anc_Operation foreach ($view as $row) { $group=$row['oa_group']; if ( $group !=$oldgroup ) { - if ( $oldgroup!=0 ) + if ( $oldgroup!=0 ) { - - $efface=new widget('button'); + + $efface=new IButton(); $efface->javascript="op_remove('".$_REQUEST['PHPSESSID']."',".$gDossier.",".$oldgroup.")"; $efface->name="Efface"; $efface->label="Efface"; - $ret.="<td>".$efface->IOValue()."</td>"; - + $ret.="<td>".$efface->input()."</td>"; + $this->oa_group=$oldgroup; $jr_id=$this->get_jrid(); - + if ( $jr_id != 0) { // get the old jr_id - $detail=new widget('button'); + $detail=new IButton(); $detail->javascript="viewOperation($jr_id,'".$_REQUEST['PHPSESSID']."',$gDossier)"; $detail->name="Detail"; $detail->label="Detail"; - $ret.="<td>".$detail->IOValue()."</td>"; + $ret.="<td>".$detail->input()."</td>"; } $ret.='</table>'; @@ -221,7 +223,7 @@ class Anc_Operation $oldgroup=$group; - + } $class=($count%2==0)?"odd":""; @@ -235,7 +237,7 @@ class Anc_Operation "</td>"; if ( $cred=='DEBIT') $ret.='<td></td>'; - + $ret.='<td>'. $row['oa_amount']. "</td>". "<td>". @@ -246,26 +248,26 @@ class Anc_Operation } - $efface=new widget('button'); + $efface=new IButton(); $efface->javascript="op_remove('".$_REQUEST['PHPSESSID']."',$gDossier,".$oldgroup.")"; $efface->name="Efface"; $efface->label="Efface"; - $ret.="<td>".$efface->IOValue()."</td>"; + $ret.="<td>".$efface->input()."</td>"; // get the old jr_id $this->oa_group=$oldgroup; $jr_id=$this->get_jrid(); if ( $jr_id != 0 ){ - $detail=new widget('button'); + $detail=new IButton(); $detail->javascript="viewOperation($jr_id,'".$_REQUEST['PHPSESSID']."',$gDossier)"; $detail->name="Detail"; $detail->label="Detail"; - $ret.="<td>".$detail->IOValue()."</td>"; + $ret.="<td>".$detail->input()."</td>"; } $ret.='</table>'; $ret.=$bar; return $ret; } - /*!\brief retrieve an operation thanks a jrnx.j_id + /*!\brief retrieve an operation thanks a jrnx.j_id * \param the jrnx.j_id * \return false if nothing is found other true */ @@ -280,18 +282,18 @@ class Anc_Operation oa_date, pa_id, oa_row - from operation_analytique - where + from operation_analytique + where j_id=$p_jid order by j_id,oa_row"; - $ret=ExecSql($this->db,$sql); - $res=pg_fetch_all($ret); + $ret=$this->db->exec_sql($sql); + $res=Database::fetch_all($ret); echo_debug(__FILE__.":".__LINE__."count res is ",count($res)); echo_debug(__FILE__.":".__LINE__," res =",$res); if ( $res== false) return null; foreach ($res as $row) { $a=new Anc_Operation($this->db); - foreach ( $row as $attr=>$value ) + foreach ( $row as $attr=>$value ) { $a->$attr=$row[$attr]; } @@ -309,9 +311,9 @@ class Anc_Operation $sql="select jr_date,j_montant,j_debit from jrnx ". " join jrn on (jr_grpt_id = j_grpt) ". "where j_id=".$this->j_id; - $res=ExecSql($this->db,$sql); - if (pg_NumRows($res) == 0 ) return; - $row=pg_fetch_array($res,0); + $res=$this->db->exec_sql($sql); + if (Database::num_row($res) == 0 ) return; + $row=Database::fetch_array($res,0); $this->oa_amount=$row['j_amount']; $this->oa_date=$row['jr_date']; $this->oa_debit=$row['j_debit']; @@ -329,9 +331,9 @@ class Anc_Operation /*!\brief retrieve the jr_id thanks the oa_group */ function get_jrid() { $sql="select distinct jr_id from jrn join jrnx on (j_grpt=jr_grpt_id) join operation_analytique using (j_id) where j_id is not null and oa_group=".$this->oa_group; - $res=ExecSql($this->db,$sql); - if ( pg_NumRows($res) == 0 ) return 0; - $ret=pg_fetch_all($res); + $res=$this->db->exec_sql($sql); + if ( Database::num_row($res) == 0 ) return 0; + $ret=Database::fetch_all($res); return $ret[0]['jr_id']; } /*\brief this function get the balance for a certain period @@ -343,31 +345,31 @@ function get_balance($p_from,$p_to,$p_plan_id) { // for the operation connected to jrnx $cond=sql_filter_per($this->db,$p_from,$p_to,'p_id','j_date'); - $sql="select oa_id, po_id, oa_amount, oa_debit, j_date from jrnx join operation_analytique using (j_id) + $sql="select oa_id, po_id, oa_amount, oa_debit, j_date from jrnx join operation_analytique using (j_id) join poste_analytique using (pa_id) - where + where $cond and j_id is not null and pa_id=$p_plan_id"; - // OD + // OD $cond=sql_filter_per($this->db,$p_from,$p_to,'p_id','oa_date'); - $sql="union select oa_id, po_id, oa_amount, oa_debit,oa_date from - operation_analytique + $sql="union select oa_id, po_id, oa_amount, oa_debit,oa_date from + operation_analytique join poste_analytique using (pa_id) - where j_id is null and + where j_id is null and $cond and pa_id=$p_plan_id "; - try { - $res=ExecSql($this->db,$sql); - $array=pg_fetch_all($res); + try { + $res=$this->db->exec_sql($sql); + $array=Database::fetch_all($res); echo_debug(__FILE__.":".__LINE__," array =",$array); } catch (Exception $e) { var_dump($e); } } /*!\brief display the form for PA - * \param $p_null = 1 if PA optional otherwise 0 mandatory + * \param $p_null = 1 if PA optional otherwise 0 mandatory * \param $p_mode == form 1 ==> read/write otherwise 0==>readonly * \param $p_seq number of the row - * \param $p_amount amount + * \param $p_amount amount * \see save_form_plan */ function display_form_plan($p_array,$p_null,$p_mode,$p_seq,$p_amount) { @@ -380,20 +382,20 @@ function get_balance($p_from,$p_to,$p_plan_id) if ( empty ($a_plan) ) return ""; $table_id="t".$p_seq; - $hidden=new widget("hidden"); + $hidden=new IHidden(); - $result.=$hidden->IOValue('amount_'.$table_id,$p_amount); + $result.=$hidden->input('amount_'.$table_id,$p_amount); if ( $p_mode==1 ) $result.='<table id="'.$table_id.'">'; - else + else $result.='<table>'; $result.="<tr>".$plan->header()."<th>montant</th></tr>"; $nb_row=(!isset(${'nb_'.$table_id}))?1:${'nb_'.$table_id}; - $result.=$hidden->IOValue('nb_'.$table_id,$nb_row); + $result.=$hidden->input('nb_'.$table_id,$nb_row); for ( $i=1; $i <= $nb_row;$i++) { $result.='<tr>'; @@ -402,13 +404,13 @@ function get_balance($p_from,$p_to,$p_plan_id) foreach ($a_plan as $r_plan) { $count++; - - $array=make_array($this->db, + + $array=$this->db->make_array( "select pa_id||'_'||po_id as value,". " html_quote(po_name) as label from poste_analytique ". " where pa_id = ".$r_plan['id']. " order by po_name",$p_null); - $select = new widget("select","","ta_".$p_seq."o".$count."row_".$i,$array); + $select =new ISelect("ta_".$p_seq."o".$count."row_".$i,$array); $select->table=0; // view only or editable if ( $p_mode==1 ) { @@ -421,54 +423,54 @@ function get_balance($p_from,$p_to,$p_plan_id) $select->selected=(isset(${"ta_".$p_seq."o".$count."row_".$i}))?${"ta_".$p_seq."o".$count."row_".$i}:0; } if ($p_mode==1) - $result.='<td id="'.$table_id.'td'.$count.'c'.$i.'">'.$select->IOValue().'</td>'; + $result.='<td id="'.$table_id.'td'.$count.'c'.$i.'">'.$select->input().'</td>'; else - $result.='<td>'.$select->IOValue().'</td>'; - + $result.='<td>'.$select->input().'</td>'; + } - $value=new widget("text"); + $value=new IText(); $value->name="val".$p_seq."l$i"; $value->size=6; $value->value=(isset(${"val".$p_seq."l$i"}))?round(${"val".$p_seq."l$i"},2):$p_amount; // $value->value=($p_doc=="form")?$p_amount:round(${"val".$p_seq."l$i"},2); $value->readonly=($p_mode==1)?false:true; - - $result.='<td>'.$value->IOValue().'</td>'; + + $result.='<td>'.$value->input().'</td>'; $result.="</tr>"; } $result.="</table>"; // add a button to add a row - $button=new widget("button"); + $button=new IButton(); $button->javascript="onChange=add_row('$table_id',$p_seq,$count);"; $button->name="js".$p_seq; $button->label="Nouvelle ligne"; if ( $p_mode == 1 ) - $result.=$button->IOValue(); + $result.=$button->input(); return $result; } /*!\brief it called for each item, the data are taken from $p_array - * data and set before in this. + * data and set before in this. * \param $p_item if the item nb for each item (purchase or selling * merchandise) - * \param $p_array structure + * \param $p_array structure * \verbatim nb_tA A is the number of the item contains the number of - rows of CA for this card + rows of CA for this card valAlR amount for the CA (item A row R) ta_AoCrow_R contains the value of the pa_id and po_id for this row with the form pa_id_po_id %d_%d *\endverbatim - * \attention The idea is one j_id matches several oa_id, + * \attention The idea is one j_id matches several oa_id, * serveral data are set before the call : * -j_id * -oa_debit * -oa_group - * -oa_date + * -oa_date * -oa_description - * + * */ function save_form_plan($p_array,$p_item) { echo_debug(__FILE__.':'.__LINE__,"p_array is ",$p_array); @@ -481,41 +483,41 @@ function get_balance($p_from,$p_to,$p_plan_id) echo_debug(__FILE__.':'.__LINE__.'- ', "max of row for CA = ".$max); // get all the PA $plan=new Anc_Plan($this->db); - $cplan=$plan->count(); + $cplan=$plan->count(); echo_debug(__FILE__.':'.__LINE__," nb of PA $cplan"); - // foreach row + // foreach row for ($i=1;$i<=$max;$i++) { echo_debug(__FILE__.':'.__LINE__." loop i $i"); - // foreach col PA + // foreach col PA for ($e=1;$e<=$cplan+1;$e++) - { + { echo_debug(__FILE__.':'.__LINE__."loop e $e"); echo_debug(__FILE__.':'.__LINE__," Checking ta_".$p_item."o".$e."row_".$i); if ( isset(${"ta_".$p_item."o".$e."row_".$i}) && ${"ta_".$p_item."o".$e."row_".$i}!=-1) - { - echo_debug(__FILE__.':'.__LINE__,"Value is ".${"ta_".$p_item."o".$e."row_".$i}); - $op=new Anc_Operation($this->db); + { + echo_debug(__FILE__.':'.__LINE__,"Value is ".${"ta_".$p_item."o".$e."row_".$i}); + $op=new Anc_Operation($this->db); $val=${"ta_".$p_item."o".$e."row_".$i}; list($op->pa_id,$op->po_id)=sscanf($val,"%d_%d"); $op->oa_group=$this->oa_group; - $op->j_id=$this->j_id; + $op->j_id=$this->j_id; $op->oa_amount=${"val".$p_item."l".$i}; $op->oa_debit=$this->oa_debit; $op->oa_date=$this->oa_date; - + $op->oa_description=$this->oa_description; $op->oa_row=$i; - $op->add(); - } + $op->add(); + } } } - + } /*\brief transform a array of operation into a array usage by *display_form_plan & save_form_plan *\param $p_array array of operation - *\param $p_line line + *\param $p_line line *\return an array complying with \see save_form_plan */ function to_request ($p_array,$p_line){ @@ -551,7 +553,7 @@ function get_balance($p_from,$p_to,$p_plan_id) $result[$table]=$line-1; return $result; } -/*! +/*! * \brief delete from operation_analytique * \param $p_jid the operation_analytique.j_id field * @@ -559,7 +561,7 @@ function get_balance($p_from,$p_to,$p_plan_id) */ function delete_by_jid($p_jid) { $sql="delete from operation_analytique where j_id=$p_jid"; - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } /*\brief test the class @@ -571,7 +573,7 @@ function get_balance($p_from,$p_to,$p_plan_id) $array=$this->get_by_jid(442); echo_debug(__FILE__.':'.__LINE__,"resultat get_by_jid",$array); - $a=$this->to_request($array,1); + $a=$this->to_request($array,1); echo_debug(__FILE__.':'.__LINE__,"resultat to_request ligne 1",$a); diff --git a/include/class_anc_plan.php b/include/class_anc_plan.php index e4fc846d0..288db1049 100644 --- a/include/class_anc_plan.php +++ b/include/class_anc_plan.php @@ -20,16 +20,17 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * \brief Concerns the Analytic plan (table plan_analytique) */ /*! \brief * Concerns the Analytic plan (table plan_analytique) */ +require_once("class_itext.php"); +require_once("class_ihidden.php"); require_once("constant.php"); -require_once("postgres.php"); -require_once("class_widget.php"); +require_once('class_database.php'); require_once("class_anc_account.php"); require_once ('class_dossier.php'); @@ -48,7 +49,7 @@ class Anc_Plan $this->description=""; $this->get(); } - /*!\brief get the list of all existing PA + /*!\brief get the list of all existing PA * \return an array of PA (not object) * */ @@ -57,8 +58,8 @@ class Anc_Plan $array=array(); $sql="select pa_id as id,pa_name as name,". "pa_description as description from plan_analytique order by pa_name"; - $ret=ExecSql($this->db,$sql); - $array=pg_fetch_all($ret); + $ret=$this->db->exec_sql($sql); + $array=Database::fetch_all($ret); return $array; } @@ -67,12 +68,12 @@ class Anc_Plan if ( $this->id==0) return; $sql="select pa_name,pa_description from plan_analytique where pa_id=".$this->id; - $ret= ExecSql($this->db,$sql); - if ( pg_NumRows($ret) == 0) + $ret= $this->db->exec_sql($sql); + if ( Database::num_row($ret) == 0) { return; } - $a= pg_fetch_array($ret,0); + $a= Database::fetch_array($ret,0); $this->name=$a['pa_name']; $this->description=$a['pa_description']; @@ -81,7 +82,7 @@ class Anc_Plan function delete() { if ( $this->id == 0 ) return; - ExecSql($this->db,"delete from plan_analytique where pa_id=".$this->id); + $this->db->exec_sql("delete from plan_analytique where pa_id=".$this->id); } function update() @@ -92,9 +93,8 @@ class Anc_Plan return; $description=FormatString($this->description); - ExecSql($this->db,"update plan_analytique set pa_name='".$name."'". - ", pa_description='".$description."'". - " where pa_id=".$this->id); + $this->db->exec_sql("update plan_analytique set pa_name=$1, + pa_description=$2 where pa_id=$3",array($name,$description,$this->id)); } function add() @@ -104,31 +104,32 @@ class Anc_Plan return; if ( $this->isAppend() == false) return; $description=FormatString($this->description); - ExecSql($this->db,"insert into plan_analytique(pa_name,pa_description)". + $this->db->exec_sql("insert into plan_analytique(pa_name,pa_description)". " values (". "'".$name."',". "'".$description."')"); - $this->id=getSequence($this->db,'plan_analytique_pa_id_seq'); + $this->id=$this->db->get_current_seq('plan_analytique_pa_id_seq'); } function form() { - $wName=new widget('TEXT','Nom','pa_name',$this->name); + $wName=new IText('pa_name',$this->name); + $wName->table=1; - $wDescription=new widget('TEXT','Description','pa_description',$this->description); + $wDescription=new IText('pa_description',$this->description); $wDescription->table=1; - $wId=new widget("HIDDEN","pa_id",$this->id); + $wId=new IHidden("pa_id",$this->id); $ret="<TABLE>"; - $ret.='<tr>'.$wName->IOValue().'</tr>'; - $ret.="<tr>".$wDescription->IOValue()."</tr>"; + $ret.='<tr>'.td(_('Nom')).$wName->input().'</tr>'; + $ret.="<tr>".td(_('Description')).$wDescription->input()."</tr>"; $ret.="</table>"; - $ret.=$wId->IOValue(); + $ret.=$wId->input(); return $ret; } function isAppend() { - $count=getDbValue($this->db,"select count(pa_id) from plan_analytique"); + $count=$this->db->get_value("select count(pa_id) from plan_analytique"); if ( $count > 4) return false; @@ -136,18 +137,18 @@ class Anc_Plan return true; } /*!\brief get all the poste related to the current - * Analytic plan + * Analytic plan * \return an array of Poste_analytic object */ function get_poste_analytique() { $sql="select po_id from poste_analytique where pa_id=".$this->id; - $r=ExecSql($this->db,$sql); + $r=$this->db->exec_sql($sql); $ret=array(); - if ( pg_NumRows($r) == 0 ) + if ( Database::num_row($r) == 0 ) return $ret; - - $all=pg_fetch_all($r); + + $all=Database::fetch_all($r); foreach ($all as $line) { $obj=new Anc_Account($this->db,$line['po_id']); @@ -170,21 +171,21 @@ class Anc_Plan return $res; } function count() { - $a=CountSql($this->db,"select pa_id from plan_analytique"); + $a=$this->db->count_sql("select pa_id from plan_analytique"); return $a; } function exist() { - $a=CountSql($this->db,"select pa_id from plan_analytique where pa_id=". - pg_escape_string($this->pa_id)); + $a=$this->db->count_sql("select pa_id from plan_analytique where pa_id=". + Database::escape_string($this->pa_id)); return ($a==0)?false:true; } static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); echo "<h1>Plan analytique : test</h1>"; echo "clean"; - ExecSql($cn,"delete from plan_analytique"); + $cn->exec_sql("delete from plan_analytique"); $p=new Anc_Plan($cn); echo "<h2>Add</h2>"; diff --git a/include/class_anc_print.php b/include/class_anc_print.php index 94fa79e8f..b9177a160 100644 --- a/include/class_anc_print.php +++ b/include/class_anc_print.php @@ -20,18 +20,22 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * \brief this class is the mother class for the CA printing */ /*! \brief this class is the mother class for the CA printing - * + * * */ -require_once('postgres.php'); +require_once("class_idate.php"); +require_once("class_itext.php"); +require_once("class_ihidden.php"); +require_once("class_iselect.php"); +require_once("class_ibutton.php"); +require_once('class_database.php'); require_once('debug.php'); require_once('constant.php'); -require_once ('class_widget.php'); require_once('class_dossier.php'); require_once ('class_anc_plan.php'); @@ -41,7 +45,7 @@ class Anc_Print { var $from; /*!< $from end date */ var $from_poste; /*!< $from_poste from poste */ var $to_poste; /*!< $to_poste to the poste */ - + function Anc_Print($p_cn) { $this->db=$p_cn; $this->from=""; @@ -50,8 +54,8 @@ class Anc_Print { $this->to_poste=""; } -/*! - * \brief complete the object with the data in $_REQUEST +/*! + * \brief complete the object with the data in $_REQUEST */ function get_request() { if ( isset($_REQUEST['from'])) @@ -71,7 +75,7 @@ class Anc_Print { $this->pa_id=""; } -/*! +/*! * \brief Compute the form to display * \param $p_hidden hidden tag to be included (gDossier,...) * @@ -82,56 +86,56 @@ class Anc_Print { /* if there is no analytic plan return */ $pa=new Anc_Plan($this->db); if ( $pa->count() == 0 ) { - echo '<h2 class="info"> Aucun plan défini</h2>'; + echo '<h2 class="info">'._('Aucun plan défini').'</h2>'; exit(); } - $from=new widget ('js_date','from','from'); + $from=new IDate('from','from'); $from->size=10; $from->value=$this->from; - - $to=new widget('js_date','to','to'); + + $to=new IDate('to','to'); $to->value=$this->to; $to->size=10; - $from_poste=new widget ('text','from_poste','from_poste'); + $from_poste=new IText('from_poste','from_poste'); $from_poste->size=10; $from_poste->value=$this->from_poste; - - $to_poste=new widget('text','to_poste','to_poste'); + + $to_poste=new IText('to_poste','to_poste'); $to_poste->value=$this->to_poste; $to_poste->size=10; - $hidden=new widget("hidden"); + $hidden=new IHidden(); $r=dossier::hidden(); - $r.=$hidden->IOValue("result","1"); - $r.="Depuis : ".$from->IOValue(); - $r.= "jusque : ".$to->IOValue(); - $r.= '<span class="notice"> Les dates sont en format DD.MM.YYYY</span>'; + $r.=$hidden->input("result","1"); + $r.="Depuis : ".$from->input(); + $r.= "jusque : ".$to->input(); + $r.= '<span class="notice">'._('Les dates sont en format DD.MM.YYYY').'</span>'; $r.=$p_hidden; $r.='<span style="padding:5px;margin:5px;border:2px double blue;display:block;">'; $plan=new Anc_Plan($this->db); - $plan_id=new widget("select","","pa_id"); - $plan_id->value=make_array($this->db,"select pa_id, pa_name from plan_analytique order by pa_name"); + $plan_id=new ISelect("pa_id"); + $plan_id->value=$this->db->make_array("select pa_id, pa_name from plan_analytique order by pa_name"); $plan_id->selected=$this->pa_id; - $r.= "Plan Analytique :".$plan_id->IOValue(); + $r.= "Plan Analytique :".$plan_id->input(); - $poste=new widget("text"); + $poste=new IText(); $poste->size=10; - $r.="Entre le poste ".$poste->IOValue("from_poste",$this->from_poste); - $choose=new widget("button"); + $r.="Entre le poste ".$poste->input("from_poste",$this->from_poste); + $choose=new IButton(); $choose->name="Choix Poste"; $choose->label="Recherche"; $choose->javascript="onClick=search_ca('".$_REQUEST['PHPSESSID']."',".dossier::id().",'from_poste','pa_id')"; - $r.=$choose->IOValue(); + $r.=$choose->input(); - $r.=" et le poste ".$poste->IOValue("to_poste",$this->to_poste); + $r.=" et le poste ".$poste->input("to_poste",$this->to_poste); $choose->javascript="onClick=search_ca('".$_REQUEST['PHPSESSID']."',".dossier::id().",'to_poste','pa_id')"; - $r.=$choose->IOValue(); - $r.='<span class="notice" style="display:block">Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche</span>'; + $r.=$choose->input(); + $r.='<span class="notice" style="display:block">'._('Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche').'</span>'; $r.='</span>'; - return $r; + return $r; } } diff --git a/include/class_anticipation.php b/include/class_anticipation.php new file mode 100644 index 000000000..5d2766443 --- /dev/null +++ b/include/class_anticipation.php @@ -0,0 +1,325 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/** + * @file + * @brief Manage the anticipation, prediction of sales, expense, bank... + * + */ +/** + *@brief Manage the anticipation of expense, sales,... + *@see Forecast Forecast_Cat Forecast_Item + * + */ +require_once 'class_forecast.php'; +require_once 'class_forecast_cat.php'; +require_once 'class_forecast_item.php'; +require_once 'class_fiche.php'; +require_once 'class_acc_account_ledger.php'; +require_once 'class_periode.php'; +class Anticipation +{ + /* example private $variable=array("val1"=>1,"val2"=>"Seconde valeur","val3"=>0); */ + private static $variable=array ("id"=>"f_id","name"=>"f_name"); + private $cn; + var $cat; /*!< array of object categorie (forecast_cat)*/ + var $item; /*< array of object item (forecast_item) */ + /** + * @brief constructor + * @param $p_init Database object + */ + function __construct ($p_init,$p_id=0) { + $this->cn=$p_init; + $this->f_id=$p_id; + } + public function get_parameter($p_string) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + return $this->$idx; + } + else + exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + } + public function set_parameter($p_string,$p_value) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + $this->$idx=$p_value; + } + else + exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + + + } + public function get_info() { return var_export(self::$variable,true); } + public function verify() { + // Verify that the elt we want to add is correct + // the f_name must be unique (case insensitive) + return 0; + } + public function save() { + /* please adapt */ + if ( $this->get_parameter("id") == 0 ) + $this->insert(); + else + $this->update(); + } + + public function insert() { + if ( $this->verify() != 0 ) return; + } + + public function update() { + } + + public function load() { + } + /** + *@brief Display the result of the forecast + *@param $p_periode + *@return HTML String with the code + */ + public function display(){ + $forecast=new Forecast($this->cn,$this->f_id); + $forecast->load(); + $str_name=h($forecast->get_parameter('name')); + $r=""; + $aCat=$this->cn->get_array('select fc_id,fc_desc from forecast_cat where f_id=$1 order by fc_order',array($this->f_id)); + $aItem=array();$aReal=array();$poste=new Acc_Account_Ledger($this->cn,0);$fiche=new Fiche($this->cn); + $aPeriode=$this->cn->get_array("select p_id,to_char(p_start,'MM.YYYY') as myear from parm_periode where to_char(p_start,'DD')!='31' order by p_start;"); + for($j=0;$j<count($aCat);$j++){ + $aItem[$j]=$this->cn->get_array('select fi_card,fi_account,fi_text,fi_amount,fi_debit from forecast_item where fc_id=$1 and fi_pid=0 order by fi_order ',array($aCat[$j]['fc_id'])); + $aPerMonth[$j]=$this->cn->get_array('select fi_pid,fi_card,fi_account,fi_text,fi_amount,fi_debit from forecast_item where fc_id=$1 and fi_pid !=0 order by fi_order ',array($aCat[$j]['fc_id'])); + /* compute the real amount for periode */ + for($k=0;$k<count($aItem[$j]);$k++){ + /* for each periode */ + for ($l=0;$l<count($aPeriode);$l++){ + if ($aItem[$j][$k]['fi_account']==''){ + $fiche->id=$aItem[$j][$k]['fi_card']; + $amount=$fiche->get_solde_detail("j_tech_per = ".$aPeriode[$l]['p_id']); + + }else { + $poste->id=$aItem[$j][$k]['fi_account']; + $amount=$poste->get_solde_detail("j_tech_per= ".$aPeriode[$l]['p_id']); + } + if ($aItem[$j][$k]['fi_debit']=='C' && $amount['debit']>$amount['credit']) $amount['solde']=$amount["solde"]*(-1); + if ($aItem[$j][$k]['fi_debit']=='D' && $amount['debit']<$amount['credit']) $amount['solde']=$amount["solde"]*(-1); + $aReal[$j][$k][$l]=$amount['solde']; + } + } + + } + ob_start(); + require_once('template/forecast_result.php'); + $r.=ob_get_contents(); + ob_clean(); + return $r; + } + public static function div() { + $r='<div id="div_anti" style="display:none">'; + $r.= '</div>'; + return $r; + } + public function delete() { + } + /** + *@brief Display a form for modifying the name or/and the category of an existing + * anticipation + *@return html string with the form + */ + private function form_cat_mod() + { + $a=new Forecast($this->cn,$this->f_id); + $a->load(); + $name=new IText('an_name'); + $name->value=$a->get_parameter("name"); + $str_name=$name->input(); + $str_action=_('Modification'); + $r=HtmlInput::hidden('f_id',$this->f_id); + $array=Forecast_Cat::load_all($this->cn,$this->f_id); + + for ($i=0;$i<MAX_CAT;$i++){ + /* category name */ + $name_name=(isset($array[$i]['fc_id']))?'fr_cat'.$array[$i]['fc_id']:'fr_cat_new_'.$i; + $name=new IText($name_name); + $name->value=(isset ($array[$i]['fc_desc']))?$array[$i]['fc_desc']:''; + $aCat[$i]['name']=$name->input(); + + + /* category order */ + $order_name=(isset($array[$i]['fc_id']))?'fc_order'.$array[$i]['fc_id']:'fc_order_new'.$i; + $order=new IText($order_name); + $order->value=(isset($array[$i]['fc_order']))?$array[$i]['fc_order']:$i+1; + $aCat[$i]['order']=$order->input(); + } + + ob_start(); + require_once('template/forecast_cat.php'); + $r.=ob_get_contents(); + ob_clean(); + return $r; + } + /** + *@brief Display a form for adding an new anticipation + *@return html string with the form + */ + private function form_cat_new() + { + $r=""; + $str_action=_('Nouveau'); + + $name=new IText('an_name'); + $str_name=$name->input(); + + $aLabel=array(_('Ventes'),_('Dépense'),_('Banque')); + $aCat=array(); + + for ($i=0;$i<MAX_CAT;$i++){ + /* category name */ + $name=new IText('fr_cat'.$i); + $name->value=(isset($aLabel[$i]))?$aLabel[$i]:''; + $aCat[$i]['name']=$name->input(); + + + /* category order */ + $order=new IText('fr_order'.$i); + $order->value=$i+1; + $aCat[$i]['order']=$order->input(); + } + + ob_start(); + require_once('template/forecast_cat.php'); + $r.=ob_get_contents(); + ob_clean(); + return $r; + + } + /** + * @brief create an empty object anticipation + * @return html string with the form + */ + public function form_cat() { + if ($this->f_id != 0) + return $this->form_cat_mod(); + else + return $this->form_cat_new(); + } + /** + *@brief display a form for modifying or add a forecast + *@return HTML code + */ + public function form_item(){ + $forecast=new Forecast($this->cn,$this->f_id); + $forecast->load(); + $str_name=$forecast->get_parameter('name'); + $r=""; + $str_action=_("Elements"); + $cat=new Forecast_Cat($this->cn); + $array=$cat->make_array($this->f_id); + $periode=new Periode($this->cn); + $aPeriode=$this->cn->make_array("select p_id,to_char(p_start,'MM.YYYY') as label from parm_periode where to_char(p_start,'DD')!='31' order by p_start"); + $aPeriode[]=array('value'=>0,'label'=>'Mensuel'); + $value=$this->cn->get_array("select fi_id,fi_text,fi_account,fi_card,fc_id,fi_amount,fi_debit ". + " from forecast_item ". + " where fc_id in (select fc_id from forecast_cat where f_id = $1)",array($this->f_id)); + for ($i=0;$i<MAX_FORECAST_ITEM;$i++){ + if (isset($value[$i]['fi_id'])){ + $r.=HtmlInput::hidden('fi_id'.$i,$value[$i]['fi_id']); + } + /* category*/ + $category=new ISelect(); + $category->name='an_cat'.$i; + $category->value=$array; + $category->selected=(isset($value[$i]["fc_id"]))?$value[$i]["fc_id"]:-1; + $aCat[$i]['cat']=$category->input(); + + /* amount */ + $amount=new INum('an_cat_amount'.$i); + $amount->value=(isset($value[$i]["fi_amount"]))?$value[$i]["fi_amount"]:0; + $aCat[$i]['amount']=$amount->input(); + + /* Accounting*/ + $account=new IPoste('an_cat_acc'.$i); + $account->set_attribute('ipopup','ipop_account'); + $account->set_attribute('label','an_label'.$i); + $account->set_attribute('account','an_cat_acc'.$i); + $account->value=(isset($value[$i]["fi_account"]))?$value[$i]["fi_account"]:""; + $aCat[$i]['account']=$account->input(); + /*Quick Code */ + $qc=new ICard('an_qc'.$i); + // If double click call the javascript fill_ipopcard + $qc->set_dblclick("fill_ipopcard(this);"); + + // This attribute is mandatory, it is the name of the IPopup + $qc->set_attribute('ipopup','ipopcard'); + + // name of the field to update with the name of the card + $qc->set_attribute('label','an_label'.$i); + + // Type of card : all + $qc->set_attribute('typecard','all'); + $qc->set_attribute('jrn',0); + $qc->extra='all'; + + // when value selected in the autcomplete + $qc->set_function('fill_data'); + if (isset($value[$i]["fi_card"])) { + $f=new Fiche($this->cn,$value[$i]["fi_card"]); + $qc->value=$f->strAttribut(ATTR_DEF_QUICKCODE);; + } + + $aCat[$i]['qc']=$qc->search().$qc->input(); + /* Label */ + $label=new IText('an_label'.$i); + $label->value=(isset($value[$i]["fi_text"]))?$value[$i]["fi_text"]:""; + $aCat[$i]['name']=$label->input(); + + //Deb or Cred + $deb=new ISelect('an_deb'.$i); + $deb->selected=(isset($value[$i]["fi_debit"]))?$value[$i]["fi_debit"]:-1; + $deb->value=array(array('value'=>'D','label'=>_('Débit')), + array('value'=>'C','label'=>_('Crédit')) + ); + $aCat[$i]['deb']=$deb->input(); + //Periode + $isPeriode=new ISelect('month'.$i); + $isPeriode->value=$aPeriode; + $isPeriode->selected=(isset($value[$i]["fi_pid"]))?$value[$i]["fi_pid"]:0; + $aCat[$i]['per']=$isPeriode->input(); + } + ob_start(); + require_once('template/forecast-detail.php'); + $r.=ob_get_contents(); + ob_clean(); + return $r; + } + /** + * @brief unit test + */ + static function test_me() { + $cn=new Database(dossier::id()); + $test=new Anticipation($cn); + + } + +} + +?> diff --git a/include/class_bud_card.php b/include/class_bud_card.php index 0f2d58124..40faa64ae 100644 --- a/include/class_bud_card.php +++ b/include/class_bud_card.php @@ -28,8 +28,9 @@ * */ +require_once("class_itext.php"); require_once ('constant.php'); -require_once ('postgres.php'); +require_once ('class_database.php'); require_once ('class_dossier.php'); class Bud_Card { @@ -64,8 +65,8 @@ class Bud_Card { $sql="insert into bud_card (bc_code,bc_description,bc_price_unit,bc_unit,bh_id) ". " values (substr($1,1,10),$2,$3,substr($4,1,20),$5) returning bc_id "; try { - $a=ExecSqlParam($this->db,$sql,$array); - $x=pg_fetch_array($a,0); + $a=$this->db->exec_sql($sql,$array); + $x=Database::fetch_array($a,0); $this->bc_id=$x['bc_id']; } catch (Exception $e) { @@ -98,7 +99,7 @@ class Bud_Card { $this->bc_id ); try { - ExecSqlParam($this->db,$sql,$array); + $this->db->exec_sql($sql,$array); }catch (Exception $e) { if ( DEBUG == 'true' ) print_r($e); @@ -126,7 +127,7 @@ class Bud_Card { *\return Efface */ function delete() { - ExecSql($this->db,"delete from bud_card where bc_id=".$this->bc_id); + $this->db->exec_sql("delete from bud_card where bc_id=".$this->bc_id); return 'Efface'; } @@ -141,11 +142,11 @@ class Bud_Card { " from bud_card ". " where ". " bc_id =".$this->bc_id; - $res=ExecSql($this->db,$sql); + $res=$this->db->exec_sql($sql); - if ( pg_NumRows($res) == 0 ) return null; + if ( Database::num_row($res) == 0 ) return null; - $a=pg_fetch_array($res,0); + $a=Database::fetch_array($res,0); $this->get_from_array($a); } @@ -156,8 +157,8 @@ class Bud_Card { */ static function get_list($p_cn,$p_bh_id) { $sql="select * from bud_card where bh_id = $p_bh_id"; - $r=ExecSql($p_cn,$sql); - $get=pg_fetch_all($r); + $r=$p_cn->exec_sql($sql); + $get=Database::fetch_all($r); if (empty ($get)) return array(); @@ -178,10 +179,10 @@ class Bud_Card { */ function form() { - $wCode=new widget("text","Code","bc_code",$this->bc_code); - $wDescription=new widget("text","Description","bc_description",$this->bc_description); - $wPriceUnit=new widget("text","Prix/unit","bc_price_unit",$this->bc_price_unit); - $wUnit=new widget("text","Unit","bc_unit",$this->bc_unit); + $wCode=new IText("Code","bc_code",$this->bc_code); + $wDescription=new IText("Description","bc_description",$this->bc_description); + $wPriceUnit=new IText("Prix/unit","bc_price_unit",$this->bc_price_unit); + $wUnit=new IText("Unit","bc_unit",$this->bc_unit); $wCode->table=1; $wDescription->table=1; @@ -191,21 +192,21 @@ class Bud_Card { $r=""; $r.="<table>"; - $r.=widget::hidden('bc_id',$this->bc_id); - $r.=widget::hidden('bh_id',$this->bh_id); + $r.=HtmlInput::hidden('bc_id',$this->bc_id); + $r.=HtmlInput::hidden('bh_id',$this->bh_id); $r.="<tr>"; - $r.=$wCode->IOValue('bc_code',$this->bc_code); + $r.=$wCode->input('bc_code',$this->bc_code); $r.="</tr>"; $r.="<tr>"; - $r.=$wDescription->IOValue(); + $r.=$wDescription->input(); $r.="</tr>"; $r.="<tr>"; - $r.=$wPriceUnit->IOValue(); + $r.=$wPriceUnit->input(); $r.="</tr>"; $r.="<tr>"; - $r.=$wUnit->IOValue(); + $r.=$wUnit->input(); $r.="</tr>"; $r.="</table>"; @@ -213,7 +214,7 @@ class Bud_Card { return $r; } static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $a=new Bud_Card($cn); echo "<h2> Ajout d'un bud_card</h2>"; @@ -221,6 +222,7 @@ class Bud_Card { $a->bc_description="Juste une description"; $a->bc_unit="Euro"; $a->bc_price_unit=0.55; + $a->bh_id=1; $a->add(); print_r($a); diff --git a/include/class_bud_data.php b/include/class_bud_data.php index 6d7e91e4b..cea0cb959 100644 --- a/include/class_bud_data.php +++ b/include/class_bud_data.php @@ -30,8 +30,10 @@ * bud_detail_periode, * the purpose is to insert or save into bud_detail_periode */ -require_once ('class_widget.php'); -require_once ('postgres.php'); +require_once("class_itext.php"); +require_once("class_iselect.php"); +require_once("class_ibutton.php"); +require_once ('class_database.php'); require_once ('constant.php'); require_once ('debug.php'); require_once ('ac_common.php'); @@ -79,8 +81,8 @@ class Bud_Data { " and $sql_po_id ;"; echo_debug(__FILE__.':'.__LINE__.'- load',' SQL ',$sql); - $res1=ExecSql($this->cn,$sql); - $array=pg_fetch_all($res1); + $res1=$this->cn->exec_sql($sql); + $array=Database::fetch_all($res1); $sql_periode="select coalesce(bdp_amount,0) as bdp_amount,a.p_id as p_id ". @@ -100,8 +102,8 @@ class Bud_Data { try { // get the the bud_detail_periode for this bud_detail $arg=array($obj->bd_id); - $res2=ExecSqlParam($this->cn,$sql_periode,$arg); - $per=pg_fetch_all($res2); + $res2=$this->cn->exec_sql($sql_periode,$arg); + $per=Database::fetch_all($res2); } catch (Exception $e) { echo __FILE__.__LINE__."Erreur lors du chargement "; echo_debug(__FILE__,__LINE__,$arg); @@ -131,7 +133,7 @@ class Bud_Data { $ret->bd_id=0; $ret->pcm_lib=""; // populate the periode with 0 - $res_empty=get_array($this->cn, + $res_empty=$this->cn->get_array( "select 0,p_id from parm_periode order by p_start,p_end"); foreach ( $res_empty as $r) { $p_id=$r['p_id']; @@ -191,17 +193,17 @@ class Bud_Data { $p_number++; $tot=0; - $wAmount=new widget('text'); + $wAmount=new IText(); $wAmount->size=8; $wAmount->extra="disabled"; - $wAccount=new widget('js_bud_search_poste'); + $wAccount=new widget('js_bud_search_poste'); $wAccount->table=0; $wAccount->disabled=true; $wAccount->value=$this->pcm_val.' - '.$this->pcm_lib; $wAccount->extra=$this->pcm_val; - $wBudCard=new widget('select'); + $wBudCard=new ISelect(); $wBudCard->value=$this->load_bud_card(); $wBudCard->selected=$this->bc_id; $wBudCard->disabled=true; @@ -211,14 +213,14 @@ class Bud_Data { $r='<form id="form_'.$p_number.'" disabled>'; $r.=dossier::hidden(); - $r.=widget::hidden('po_id',$this->po_id); - $r.=widget::hidden('bh_id',$this->bh_id); - $r.=widget::hidden('bd_id',$this->bd_id); - $r.=widget::hidden('form_id',$p_number); + $r.=HtmlInput::hidden('po_id',$this->po_id); + $r.=HtmlInput::hidden('bh_id',$this->bh_id); + $r.=HtmlInput::hidden('bd_id',$this->bd_id); + $r.=HtmlInput::hidden('form_id',$p_number); - $r.="Fiche Budget ".$wBudCard->IOValue('bc_id'.$p_number); - $r.="Compte d'exploitation ".$wAccount->IOValue('account_'.$p_number); - // $r.=widget::hidden('account_'.$p_number.'_hidden',$this->pcm_val); + $r.="Fiche Budget ".$wBudCard->input('bc_id'.$p_number); + $r.="Compte d'exploitation ".$wAccount->input('account_'.$p_number); + // $r.=HtmlInput::hidden('account_'.$p_number.'_hidden',$this->pcm_val); $r.='Total : <span id="form_total_'.$p_number.'"> '.$tot.' </span>'; $r.='<table WIDTH="100%">'; @@ -228,32 +230,32 @@ class Bud_Data { $wAmount->javascript="onChange='bud_compute_sum(".$p_number.");'"; echo_debug(__FILE__.':'.__LINE__,' p_id '.$p_id.' - amount '.$amount); $tot+=$amount; - $r.='<td >'.$wAmount->IOValue('amount_'.$p_id,sprintf("% 8.2f",$amount))."</td>"; + $r.='<td >'.$wAmount->input('amount_'.$p_id,sprintf("% 8.2f",$amount))."</td>"; } $r.="</tr>"; $r.="</table>"; - $r.=widget::hidden('PHPSESSID',$_REQUEST['PHPSESSID']); + $r.=HtmlInput::hidden('PHPSESSID',$_REQUEST['PHPSESSID']); $r.="</form>"; - $button_change=new widget('button','Change'); + $button_change=new IButton('Change'); $button_change->javascript='bud_form_enable('.$p_number.')'; - $r.=$button_change->IOValue('button_change'.$p_number); + $r.=$button_change->input('button_change'.$p_number); - $button_save=new widget('button','Sauve'); + $button_save=new IButton('Sauve'); $button_save->javascript='bud_form_save('.$p_number.')'; $button_save->extra='style="display:none"'; - $r.=$button_save->IOValue('button_save'.$p_number); + $r.=$button_save->input('button_save'.$p_number); - $button_delete=new widget('button','Efface'); + $button_delete=new IButton('Efface'); $button_delete->javascript='bud_form_delete('.$p_number.')'; $button_delete->extra='style="display:none"'; - $r.=$button_delete->IOValue('button_delete'.$p_number); + $r.=$button_delete->input('button_delete'.$p_number); - $button_escape=new widget('button','Echapper'); + $button_escape=new IButton('Echapper'); $button_escape->javascript='bud_form_disable('.$p_number.')'; $button_escape->extra='style="display:none"'; - $r.=$button_escape->IOValue('button_escape'.$p_number); + $r.=$button_escape->input('button_escape'.$p_number); $r.='<span id="Result'.$p_number.'"></span>'; $r.="<hr>"; @@ -266,7 +268,7 @@ class Bud_Data { private function load_bud_card() { if ( !isset ($this->array_bud_card) ) - $this->array_bud_card=make_array($this->cn, + $this->array_bud_card=$this->cn->make_array( 'select bc_id,bc_code from bud_card '. 'where bh_id='.$this->bh_id); return $this->array_bud_card; @@ -281,7 +283,7 @@ class Bud_Data { if ( ! isset ($this->header ) ){ $r='<table style="border: 2px outset blue; width: 100%;">'; $r.="<tr>"; - $periode=get_array($this->cn,"select to_char(p_start,'MM/YY')as d from parm_periode order by p_start,p_end "); + $periode=$this->cn->get_array("select to_char(p_start,'MM/YY')as d from parm_periode order by p_start,p_end "); foreach ($periode as $row) $r.='<th >'.$row['d'].'</th>'; @@ -344,7 +346,7 @@ class Bud_Data { $r=$this->extract_bud_detail(); $r->update(); - ExecSql($this->cn,"delete from bud_detail_periode where bd_id =".$this->bd_id); + $this->cn->exec_sql("delete from bud_detail_periode where bd_id =".$this->bd_id); echo_debug(__FILE__.':'.__LINE__.'- update ',$this->bud_detail_periode); foreach ( $this->bud_detail_periode as $obj ) { $obj->add(); @@ -363,7 +365,7 @@ class Bud_Data { */ function delete_by_bd_id() { - ExecSql($this->cn,'delete from bud_detail where bd_id='.$this->bd_id); + $this->cn->exec_sql('delete from bud_detail where bd_id='.$this->bd_id); } /*!\brief transform an array containing the word amount_xx where xx * stand for the p_id ( parm_periode primary key) into the data @@ -374,7 +376,7 @@ class Bud_Data { private function get_form_detail_periode($p_array){ echo_debug(__FILE__.':'.__LINE__.'- get_form_detail_periode arg:','',$p_array); extract ($p_array); - $periode=get_array($this->cn,"select p_id from parm_periode"); + $periode=$this->cn->get_array("select p_id from parm_periode"); foreach ($periode as $key=>$value ) { $row=$value['p_id']; @@ -394,18 +396,18 @@ class Bud_Data { */ static function test_me() { - echo JS_PROTOTYPE_JS; + echo JS_PROTOTYPE; echo JS_BUD_SCRIPT; - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $sql="select bh_id||','||po_id,bh_name||' -- '||po_name ". " from bud_hypothese join poste_analytique using (pa_id)"; - $w=new widget("select"); + $w=new ISelect(); echo '<form>'; - echo widget::hidden('test_select',$_REQUEST['test_select']); + echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); echo dossier::hidden(); $w->selected=(isset($_REQUEST['bh_po_id']))?$_REQUEST['bh_po_id']:""; - echo $w->IOValue('bh_po_id',make_array($cn,$sql)); - echo widget::submit('search','Recherche'); + echo $w->input('bh_po_id',$cn->make_array($sql)); + echo HtmlInput::submit('search','Recherche'); echo '</form>'; if ( isset($_REQUEST['search'])) { diff --git a/include/class_bud_detail.php b/include/class_bud_detail.php index 96cceda2f..40a355214 100644 --- a/include/class_bud_detail.php +++ b/include/class_bud_detail.php @@ -32,7 +32,7 @@ */ require_once ('constant.php'); -require_once ('postgres.php'); +require_once ('class_database.php'); require_once ('class_dossier.php'); class Bud_Detail { @@ -59,8 +59,8 @@ class Bud_Detail { $sql="insert into bud_detail (po_id,bc_id,pcm_val,bh_id) ". " values ($1,$2,$3,$4) returning bd_id "; - $a=ExecSqlParam($this->db,$sql,$array); - $this->bd_id=pg_fetch_result($a,0,0); + $a=$this->db->exec_sql($sql,$array); + $this->bd_id=Database::fetch_result($a,0,0); } /*!\brief update thanks the bd_id if bd_id == 0 returns directly * @@ -77,13 +77,13 @@ class Bud_Detail { $this->pcm_val, $this->bd_id ); - ExecSqlParam($this->db,$sql,$array); + $this->db->exec_sql($sql,$array); } /*!\brief delete in bud_detail */ function delete() { - ExecSql($this->db,"delete from bud_detail where bd_id=".$this->bd_id); + $this->db->exec_sql("delete from bud_detail where bd_id=".$this->bd_id); } /*!\brief load one row from the table Bud_Detail and makes an object of it @@ -95,11 +95,11 @@ class Bud_Detail { " from bud_detail ". " where ". " bd_id =".$this->bd_id; - $res=ExecSql($this->db,$sql); + $res=$this->db->exec_sql($sql); - if ( pg_NumRows($res) == 0 ) return; + if ( Database::num_row($res) == 0 ) return; - $a=pg_fetch_array($res,0); + $a=Database::fetch_array($res,0); foreach ( array('bc_id','po_id','pcm_val') as $key) { $this->{"$key"}=$a[$key]; } @@ -120,7 +120,7 @@ class Bud_Detail { * */ static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $a=new Bud_Detail($cn); $a->po_id=4; $a->bh_id=4; diff --git a/include/class_bud_detail_periode.php b/include/class_bud_detail_periode.php index ed2f1e06d..9fff64c73 100644 --- a/include/class_bud_detail_periode.php +++ b/include/class_bud_detail_periode.php @@ -48,7 +48,7 @@ class Bud_Detail_Periode{ */ function delete () { $sql="delete from bud_detail_periode where bdp_id=".$this->bdp_id; - ExecSql($this->cn,$sql); + $this->cn->exec_sql($sql); } /*!\brief add a row in the table bud_detail_periode and set the this->bdp_id with the value in the row @@ -59,8 +59,8 @@ class Bud_Detail_Periode{ " returning bdp_id"; $value=array($this->bdp_amount,$this->p_id,$this->bd_id); try { - $r=ExecSqlParam($this->cn,$sql,$value); - $this->bdp_id=pg_fetch_result($r,0,0); + $r=$this->cn->exec_sql($sql,$value); + $this->bdp_id=Database::fetch_result($r,0,0); } catch (Exception $e) { echo "Erreur : ".$e->getMessage(); } @@ -69,7 +69,7 @@ class Bud_Detail_Periode{ * */ static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); print_r($cn); diff --git a/include/class_bud_hypo.php b/include/class_bud_hypo.php index e0c1a230d..f9468481b 100644 --- a/include/class_bud_hypo.php +++ b/include/class_bud_hypo.php @@ -30,8 +30,11 @@ * different hyp. * */ +require_once("class_itext.php"); +require_once("class_ihidden.php"); +require_once("class_iselect.php"); require_once ('class_dossier.php'); -require_once ('postgres.php'); +require_once ('class_database.php'); class Bud_Hypo { @@ -59,11 +62,11 @@ class Bud_Hypo { " from bud_hypothese ". " where ". " bh_id =".$this->bh_id; - $res=ExecSql($this->db,$sql); + $res=$this->db->exec_sql($sql); - if ( pg_NumRows($res) == 0 ) return; + if ( Database::num_row($res) == 0 ) return; - $a=pg_fetch_array($res,0); + $a=Database::fetch_array($res,0); $this->bh_name=$a['bh_name']; $this->bh_saldo=$a['bh_saldo']; $this->bh_description=$a['bh_description']; @@ -73,7 +76,7 @@ class Bud_Hypo { function delete () { $sql="delete from bud_hypothese where bh_id=".$this->bh_id; - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } function add() { @@ -88,14 +91,14 @@ class Bud_Hypo { $this->bh_description, $pa_id ); - $a=ExecSqlParam($this->db,$sql,$array); - $this->bh_id=pg_fetch_result($a,0,0); + $a=$this->db->exec_sql($sql,$array); + $this->bh_id=Database::fetch_result($a,0,0); } function update() { if ( strlen(trim ($this->bh_name)) == "" ) return; - $bh_name=pg_escape_string($this->bh_name); + $bh_name=Database::escape_string($this->bh_name); $bh_saldo=(isNumber($this->bh_saldo) == 1 ) ?$this->bh_saldo:0; - $bh_description=pg_escape_string($this->bh_description); + $bh_description=Database::escape_string($this->bh_description); $pa_id=($this->pa_id == null || $this->pa_id < 0 )?"NULL":$this->pa_id; $sql=sprintf( @@ -107,7 +110,7 @@ class Bud_Hypo { $bh_description, $this->bh_id ); - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } function get_from_array($p_array) { @@ -126,9 +129,9 @@ class Bud_Hypo { */ static function get_list($p_cn) { $sql="select * from bud_hypothese order by bh_name "; - $r=ExecSql($p_cn,$sql); - if ( pg_NumRows($r)==0 ) return null; - $a=pg_fetch_all($r); + $r=$p_cn->exec_sql($sql); + if ( Database::num_row($r)==0 ) return null; + $a=Database::fetch_all($r); foreach($a as $row) { $tmp=new Bud_Hypo($p_cn); $tmp->bh_id=$row['bh_id']; @@ -143,13 +146,13 @@ class Bud_Hypo { function form($p_update=0) { - $wName=new widget("text","Nom","bh_name",$this->bh_name); + $wName=new IText("Nom","bh_name",$this->bh_name); - $wDescription=new widget("text","Description","bh_description",$this->bh_description); - $wSaldo=new widget("text","Solde","bh_saldo",$this->bh_saldo); - $wBh_id=new widget("hidden","","bh_id",$this->bh_id); - $array=make_array($this->db,"select pa_id,pa_name from plan_analytique",1); - $wPa_id=new widget("select","Plan Analytique","pa_id",$array); + $wDescription=new IText("Description","bh_description",$this->bh_description); + $wSaldo=new IText("Solde","bh_saldo",$this->bh_saldo); + $wBh_id=new IHidden("","bh_id",$this->bh_id); + $array=$this->db->make_array("select pa_id,pa_name from plan_analytique",1); + $wPa_id=new ISelect("Plan Analytique","pa_id",$array); $wPa_id->selected=$this->pa_id; if ( $p_update != 0 ) $wPa_id->readonly=true; $wName->table=1; @@ -158,11 +161,11 @@ class Bud_Hypo { $wPa_id->table=1; $r="<table>"; - $r.='<tr>'.$wName->IOValue().'</tr>'; - $r.='<tr>'.$wDescription->IOValue().'</tr>'; - $r.='<tr>'.$wSaldo->IOValue().'</tr>'; - $r.='<tr>'.$wPa_id->IOValue().'</tr>'; - $r.=$wBh_id->IOValue(); + $r.='<tr>'.$wName->input().'</tr>'; + $r.='<tr>'.$wDescription->input().'</tr>'; + $r.='<tr>'.$wSaldo->input().'</tr>'; + $r.='<tr>'.$wPa_id->input().'</tr>'; + $r.=$wBh_id->input(); $r.="</table>"; return $r; @@ -174,17 +177,17 @@ class Bud_Hypo { else return 0; } function size() { - $count=getDbValue($this->db,"select count(*) from bud_hypothese"); + $count=$this->db->get_value("select count(*) from bud_hypothese"); return $count; } function size_analytic() { - $count=getDbValue($this->db,"select count(*) from bud_hypothese where pa_id is not null"); + $count=$this->db->get_value("select count(*) from bud_hypothese where pa_id is not null"); return $count; } static function test_me() { - $cn=DbConnect (dossier::id()); - ExecSql($cn,"delete from bud_hypothese"); + $cn=new Database (dossier::id()); + $cn->exec_sql("delete from bud_hypothese"); $a=new Bud_Hypo($cn); $a->bh_name="test me function"; $a->bh_saldo=2.123456; diff --git a/include/class_bud_synthese.php b/include/class_bud_synthese.php index 279620e7a..e079780e7 100644 --- a/include/class_bud_synthese.php +++ b/include/class_bud_synthese.php @@ -30,7 +30,6 @@ */ require_once ('class_dossier.php'); require_once ('class_bud_hypo.php'); -require_once ('class_widget.php'); class Bud_Synthese { var $cn; /*!< database connection */ @@ -47,7 +46,7 @@ class Bud_Synthese { } } static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $a=array('from'=>'01.01.2008', 'to'=>'11.01.2008', 'bh_id'=>1); diff --git a/include/class_bud_synthese_acc.php b/include/class_bud_synthese_acc.php index 6156bf023..a926dc0b4 100644 --- a/include/class_bud_synthese_acc.php +++ b/include/class_bud_synthese_acc.php @@ -27,6 +27,7 @@ /*! \brief Manage the hypothese for the budget module */ +require_once("class_iselect.php"); require_once ('class_bud_synthese.php'); require_once ('class_anc_account.php'); require_once ('class_acc_account_ledger.php'); @@ -45,14 +46,14 @@ class Bud_Synthese_Acc extends Bud_Synthese { } function select_hypo() { - $hypo=make_array($this->cn,'select bh_id, bh_name from bud_hypothese '); + $hypo=$this->cn->make_array('select bh_id, bh_name from bud_hypothese '); - $wSelect = new widget('select'); + $wSelect =new ISelect(); $wSelect->name='bh_id'; $wSelect->value=$hypo; $wSelect->javascript='onChange=this.form.submit()'; $wSelect->selected=(isset($this->bh_id))?$this->bh_id:''; - $r="Choississez l'hypothèse :".$wSelect->IOValue(); + $r="Choississez l'hypothèse :".$wSelect->input(); $r.=dossier::hidden(); return $r; } @@ -64,33 +65,33 @@ class Bud_Synthese_Acc extends Bud_Synthese { $hypo=new Bud_Hypo($this->cn); $hypo->bh_id=$this->bh_id; $hypo->load(); - $acc_value=make_array($this->cn,'select distinct pcm_val::text,pcm_val from bud_detail where bh_id='.$this->bh_id." order by pcm_val::text "); - $wAcc_from=new widget("select"); + $acc_value=$this->cn->make_array('select distinct pcm_val::text,pcm_val from bud_detail where bh_id='.$this->bh_id." order by pcm_val::text "); + $wAcc_from=new ISelect(); $wAcc_from->name="acc_from"; $wAcc_from->value=$acc_value; $wAcc_from->selected=$this->acc_from; - $wAcc_to=new widget("select"); + $wAcc_to=new ISelect(); $wAcc_to->name="acc_to"; $wAcc_to->value=$acc_value; $wAcc_to->selected=$this->acc_to; - $per=make_array($this->cn,"select p_id,to_char(p_start,'MM.YYYY') ". + $per=$this->cn->make_array("select p_id,to_char(p_start,'MM.YYYY') ". " from parm_periode order by p_start,p_end"); - $wFrom=new widget('select'); + $wFrom=new ISelect(); $wFrom->name='from'; $wFrom->value=$per; $wFrom->selected=$this->from; - $wto=new widget('select'); + $wto=new ISelect(); $wto->name='to'; $wto->value=$per; $wto->selected=$this->to; $r=""; - $r.="Periode de ".$wFrom->IOValue()." à ".$wto->IOValue(); - $r.="Poste comptable de ".$wAcc_from->IOValue()." à ".$wAcc_to->IOValue(); + $r.="Periode de ".$wFrom->input()." à ".$wto->input(); + $r.="Poste comptable de ".$wAcc_from->input()." à ".$wAcc_to->input(); $r.=dossier::hidden(); return $r; } @@ -150,15 +151,15 @@ class Bud_Synthese_Acc extends Bud_Synthese { " where pcm_val::text >= $1 and ". "pcm_val::text <= $2 and bud_card.bh_id=$3"; - $res=ExecSqlParam($this->cn,$sql,array($this->acc_from,$this->acc_to,$this->bh_id)); - $aBudCard=pg_fetch_all($res); + $res=$this->cn->exec_sql($sql,array($this->acc_from,$this->acc_to,$this->bh_id)); + $aBudCard=Database::fetch_all($res); echo_debug(__FILE__.':'.__LINE__.'- load','aBudCard',$aBudCard); $array=array(); - $cn=DbConnect(dossier::id()); - pg_prepare($cn,"sql_detail","select distinct bc_id,bc_code,bc_description,bc_price_unit ". + $cn=new Database(dossier::id()); + $cn->prepare("sql_detail","select distinct bc_id,bc_code,bc_description,bc_price_unit ". " from bud_detail join bud_card using (bc_id)". " where pcm_val=$1"); - pg_prepare($cn,"sql_detail_periode","select sum(bdp_amount) as amount,". + $cn->prepare("sql_detail_periode","select sum(bdp_amount) as amount,". "p_id from bud_card join bud_detail using (bc_id)". " join bud_detail_periode using (bd_id) ". " join parm_periode using (p_id) ". @@ -175,8 +176,8 @@ class Bud_Synthese_Acc extends Bud_Synthese { $line['acc_name']=$acc_account->label; $line['acc_amount']=$acc_account->get_solde($per_acc); - $res=pg_execute("sql_detail",array($rBudCard['pcm_val'])); - $row=pg_fetch_all($res); + $res=$cn->execute("sql_detail",array($rBudCard['pcm_val'])); + $row=Database::fetch_all($res); $idx=0; foreach ($row as $col) { $sub=array(); @@ -189,8 +190,8 @@ class Bud_Synthese_Acc extends Bud_Synthese { $periode=array(); $sub['unit']=0; - $res2=pg_execute("sql_detail_periode",array($bc_id,$rBudCard['pcm_val'])); - $col_per=pg_fetch_all($res2); + $res2=$cn->execute("sql_detail_periode",array($bc_id,$rBudCard['pcm_val'])); + $col_per=Database::fetch_all($res2); if ( empty ($col_per) ) continue; // fill the periode array foreach ($col_per as $cPer) { @@ -238,7 +239,7 @@ class Bud_Synthese_Acc extends Bud_Synthese { $r=""; if (empty($p_array)) return; $persql=sql_filter_per($this->cn,$this->from,$this->to,'p_id','p_id'); - $per=get_array($this->cn,"select to_char(p_start,'MM.YYYY') as d". + $per=$this->cn->get_array("select to_char(p_start,'MM.YYYY') as d". " from parm_periode ". " where $persql"); @@ -272,25 +273,25 @@ class Bud_Synthese_Acc extends Bud_Synthese { function hidden() { $r=""; foreach (array('bh_id','acc_from','acc_to','from','to') as $e) - $r.=widget::hidden($e,$this->$e); + $r.=HtmlInput::hidden($e,$this->$e); return $r; } static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $obj=new Bud_Synthese_Acc($cn); echo '<form method="GET">'; echo $obj->select_hypo(); - echo widget::submit('recherche','recherche'); + echo HtmlInput::submit('recherche','recherche'); echo '</form>'; if ( isset($_GET['recherche'])) { $obj->from_array($_GET); echo '<form method="GET">'; - widget::hidden('test_select',$_REQUEST['test_select']); + HtmlInput::hidden('test_select',$_REQUEST['test_select']); echo $obj->form(); - echo widget::hidden('bh_id',$obj->bh_id); - echo widget::submit('recherche2','recherche'); + echo HtmlInput::hidden('bh_id',$obj->bh_id); + echo HtmlInput::submit('recherche2','recherche'); echo '</form>'; } if ( isset($_GET['recherche2'])){ diff --git a/include/class_bud_synthese_anc.php b/include/class_bud_synthese_anc.php index 9e4cde358..2426c76d2 100644 --- a/include/class_bud_synthese_anc.php +++ b/include/class_bud_synthese_anc.php @@ -27,6 +27,7 @@ /*! \brief Manage the hypothese for the budget module */ +require_once("class_iselect.php"); require_once ('class_bud_synthese.php'); require_once ('class_anc_account.php'); require_once ('class_acc_account_ledger.php'); @@ -43,14 +44,14 @@ class Bud_Synthese_Anc extends Bud_Synthese { } function select_hypo() { - $hypo=make_array($this->cn,'select bh_id, bh_name from bud_hypothese '. + $hypo=$this->cn->make_array('select bh_id, bh_name from bud_hypothese '. ' where pa_id is not null order by bh_name'); - $wSelect = new widget('select'); + $wSelect =new ISelect(); $wSelect->name='bh_id'; $wSelect->value=$hypo; $wSelect->javascript='onChange=this.form.submit()'; $wSelect->selected=(isset($this->bh_id))?$this->bh_id:''; - $r="Choississez l'hypothèse :".$wSelect->IOValue(); + $r="Choississez l'hypothèse :".$wSelect->input(); $r.=dossier::hidden(); return $r; } @@ -63,31 +64,31 @@ class Bud_Synthese_Anc extends Bud_Synthese { $hypo->bh_id=$this->bh_id; $hypo->load(); $po_value=Anc_Account::make_array_name($this->cn,$hypo->pa_id); - $wPo_from=new widget("select"); + $wPo_from=new ISelect(); $wPo_from->name="po_from"; $wPo_from->value=$po_value; $wPo_from->selected=$this->po_from; - $wPo_to=new widget("select"); + $wPo_to=new ISelect(); $wPo_to->name="po_to"; $wPo_to->value=$po_value; $wPo_to->selected=$this->po_to; - $per=make_array($this->cn,"select p_id,to_char(p_start,'MM.YYYY') ". + $per=$this->cn->make_array("select p_id,to_char(p_start,'MM.YYYY') ". " from parm_periode order by p_start,p_end"); - $wFrom=new widget('select'); + $wFrom=new ISelect(); $wFrom->name='from'; $wFrom->value=$per; $wFrom->selected=$this->from; - $wto=new widget('select'); + $wto=new ISelect(); $wto->name='to'; $wto->value=$per; $wto->selected=$this->to; $r=""; - $r.="Periode de ".$wFrom->IOValue()." à ".$wto->IOValue(); - $r.="Poste analytique de ".$wPo_from->IOValue()." à ".$wPo_to->IOValue(); + $r.="Periode de ".$wFrom->input()." à ".$wto->input(); + $r.="Poste analytique de ".$wPo_from->input()." à ".$wPo_to->input(); $r.=dossier::hidden(); return $r; } @@ -146,13 +147,13 @@ class Bud_Synthese_Anc extends Bud_Synthese { " from bud_card join bud_detail using (bc_id) ". "join poste_analytique using(po_id) where po_name >= $1 and ". "po_name <=$2 and bud_card.bh_id=$3"; - $res=ExecSqlParam($this->cn,$sql,array($this->po_from,$this->po_to,$this->bh_id)); - $aBudCard=pg_fetch_all($res); + $res=$this->cn->exec_sql($sql,array($this->po_from,$this->po_to,$this->bh_id)); + $aBudCard=Database::fetch_all($res); $array=array(); - $cn=DbConnect(dossier::id()); - pg_prepare($cn,"sql_detail","select distinct pcm_val from bud_detail ". + $cn=new Database(dossier::id()); + $cn->prepare("sql_detail","select distinct pcm_val from bud_detail ". " where bc_id=$1"); - pg_prepare($cn,"sql_detail_periode","select sum(bdp_amount) as amount,". + $cn->prepare("sql_detail_periode","select sum(bdp_amount) as amount,". "p_id from bud_card join bud_detail using (bc_id)". " join bud_detail_periode using (bd_id) ". " join parm_periode using (p_id) ". @@ -168,16 +169,16 @@ class Bud_Synthese_Anc extends Bud_Synthese { $line['bc_description']=$rBudCard['bc_description']; $line['bc_unit']=$rBudCard['bc_unit']; - $res=pg_execute("sql_detail",array($line['bc_id'])); - $row=pg_fetch_all($res); + $res=$cn->execute("sql_detail",array($line['bc_id'])); + $row=Database::fetch_all($res); $idx=0; foreach ($row as $col) { $sub=array(); $pcm_val=$col['pcm_val']; $sub['pcm_val']=$pcm_val; $periode=array(); - $res2=pg_execute("sql_detail_periode",array($rBudCard['bc_id'],$pcm_val)); - $col_per=pg_fetch_all($res2); + $res2=$cn->execute("sql_detail_periode",array($rBudCard['bc_id'],$pcm_val)); + $col_per=Database::fetch_all($res2); if ( empty ($col_per) ) continue; $sub['unit']=0; foreach ($col_per as $cPer) { @@ -228,7 +229,7 @@ class Bud_Synthese_Anc extends Bud_Synthese { $r=""; if (empty($p_array)) return; $persql=sql_filter_per($this->cn,$this->from,$this->to,'p_id','p_id'); - $per=get_array($this->cn,"select to_char(p_start,'MM.YYYY') as d". + $per=$this->cn->get_array("select to_char(p_start,'MM.YYYY') as d". " from parm_periode ". " where $persql"); @@ -266,25 +267,25 @@ class Bud_Synthese_Anc extends Bud_Synthese { function hidden() { $r=""; foreach (array('bh_id','po_from','po_to','from','to') as $e) - $r.=widget::hidden($e,$this->$e); + $r.=HtmlInput::hidden($e,$this->$e); return $r; } static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $obj=new Bud_Synthese_Anc($cn); echo '<form method="GET">'; - echo widget::hidden('test_select',$_REQUEST['test_select']); + echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); echo $obj->select_hypo(); - echo widget::submit('recherche','recherche'); + echo HtmlInput::submit('recherche','recherche'); echo '</form>'; if ( isset($_GET['recherche'])) { $obj->from_array($_GET); echo '<form method="GET">'; - echo widget::hidden('test_select',$_REQUEST['test_select']); + echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); echo $obj->form(); - echo widget::hidden('bh_id',$obj->bh_id); - echo widget::submit('recherche2','recherche'); + echo HtmlInput::hidden('bh_id',$obj->bh_id); + echo HtmlInput::submit('recherche2','recherche'); echo '</form>'; } if ( isset($_GET['recherche2'])){ diff --git a/include/class_bud_synthese_group.php b/include/class_bud_synthese_group.php index 5eb5b6665..fb69f07ce 100644 --- a/include/class_bud_synthese_group.php +++ b/include/class_bud_synthese_group.php @@ -28,7 +28,7 @@ * \brief Manage the hypothese for the budget module * synthese */ -require_once ('class_widget.php'); +require_once("class_iselect.php"); require_once ('class_bud_synthese.php'); require_once ('class_acc_account_ledger.php'); require_once ('class_bud_hypo.php'); @@ -41,14 +41,14 @@ class Bud_Synthese_Group extends Bud_Synthese { } } function select_hypo() { - $hypo=make_array($this->cn,'select bh_id, bh_name from bud_hypothese order by bh_name'); - $wSelect = new widget('select'); + $hypo=$this->cn->make_array('select bh_id, bh_name from bud_hypothese order by bh_name'); + $wSelect =new ISelect(); $wSelect->name='bh_id'; $wSelect->value=$hypo; $wSelect->selected=$this->bh_id; $wSelect->javascript='onChange=this.form.submit()'; - $r="Choississez l'hypothèse :".$wSelect->IOValue(); + $r="Choississez l'hypothèse :".$wSelect->input(); $r.=dossier::hidden(); return $r; } @@ -63,38 +63,38 @@ class Bud_Synthese_Group extends Bud_Synthese { $hypo->load(); $fga_id=0; if ($hypo->has_plan() == 1 ) { - $anc_value=make_array($this->cn,"select distinct ga_id, ". + $anc_value=$this->cn->make_array("select distinct ga_id, ". " ga_id||'-'||substr(ga_description,10) as ga_description ". "from groupe_analytique ". " join poste_analytique using (ga_id) ". " join bud_detail using (po_id) ". " where bh_id=".$this->bh_id,1); if ( count($anc_value) > 0 ) { - $wGa_id=new widget("select"); + $wGa_id=new ISelect(); $wGa_id->name="ga_id"; $wGa_id->value=$anc_value; $wGa_id->selected=$this->ga_id; $fga_id=1; } } - $per=make_array($this->cn,"select p_id,to_char(p_start,'MM.YYYY') ". + $per=$this->cn->make_array("select p_id,to_char(p_start,'MM.YYYY') ". " from parm_periode order by p_start,p_end"); - $wFrom=new widget('select'); + $wFrom=new ISelect(); $wFrom->name='from'; $wFrom->value=$per; $wFrom->selected=$this->from; - $wto=new widget('select'); + $wto=new ISelect(); $wto->name='to'; $wto->value=$per; $wto->selected=$this->to; $r=""; - $r.="Periode de ".$wFrom->IOValue()." à ".$wto->IOValue(); + $r.="Periode de ".$wFrom->input()." à ".$wto->input(); /* if there a group analytic */ if ( $fga_id==1) - $r.="Groupe ".$wGa_id->IOValue(); + $r.="Groupe ".$wGa_id->input(); $r.=dossier::hidden(); return $r; } @@ -192,7 +192,7 @@ class Bud_Synthese_Group extends Bud_Synthese { " and $per ". " group by pcm_val,p_id,bc_price_unit order by pcm_val,p_id"; - $res=get_array($this->cn,$sql); + $res=$this->cn->get_array($sql); echo_debug(__FILE__.':'.__LINE__.'- load','$res',$res); $pcm_val=""; $old="XX"; @@ -326,7 +326,7 @@ Array $hypo->bh_id=$this->bh_id; $hypo->load(); $initial=$hypo->bh_saldo; - $per=get_array($this->cn,"select p_id,to_char(p_start,'MM.YYYY') as d". + $per=$this->cn->get_array("select p_id,to_char(p_start,'MM.YYYY') as d". " from parm_periode ". " where p_id between ".$this->from.' and '. $this->to." order by p_start" ); @@ -385,7 +385,7 @@ Array $r=""; $persql=sql_filter_per($this->cn,$this->from,$this->to,'p_id','p_id'); list ($head,$foot)=$this->head_foot($p_array); - $per=get_array($this->cn,"select p_id,to_char(p_start,'MM.YYYY') as d". + $per=$this->cn->get_array("select p_id,to_char(p_start,'MM.YYYY') as d". " from parm_periode ". " where $persql"); $r.='<table>'; @@ -457,7 +457,7 @@ Array function display_csv($p_array) { $r=""; list ($head,$foot)=$this->head_foot($p_array); - $per=get_array($this->cn,"select p_id,to_char(p_start,'MM.YYYY') as d". + $per=$this->cn->get_array("select p_id,to_char(p_start,'MM.YYYY') as d". " from parm_periode ". " where p_id between ".$this->from.' and '. $this->to." order by p_start" ); @@ -514,25 +514,25 @@ Array function hidden() { $r=""; foreach (array('bh_id','ga_id','from','to') as $e) - $r.=widget::hidden($e,$this->$e); + $r.=HtmlInput::hidden($e,$this->$e); return $r; } static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $obj=new Bud_Synthese_Group($cn); echo '<form method="GET">'; - echo widget::hidden('test_select',$_REQUEST['test_select']); + echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); echo $obj->select_hypo(); - echo widget::submit('recherche','recherche'); + echo HtmlInput::submit('recherche','recherche'); echo '</form>'; if ( isset($_GET['recherche'])) { $obj->from_array($_GET); echo '<form method="GET">'; echo $obj->form(); - echo widget::hidden('bh_id',$obj->bh_id); - echo widget::hidden('test_select',$_REQUEST['test_select']); - echo widget::submit('recherche2','recherche'); + echo HtmlInput::hidden('bh_id',$obj->bh_id); + echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); + echo HtmlInput::submit('recherche2','recherche'); echo '</form>'; } if ( isset($_GET['recherche2'])){ diff --git a/include/class_bud_synthese_hypo.php b/include/class_bud_synthese_hypo.php index 9736f22d9..3d21dc9fb 100644 --- a/include/class_bud_synthese_hypo.php +++ b/include/class_bud_synthese_hypo.php @@ -28,6 +28,7 @@ * \brief Manage the hypothese for the budget module * synthese */ +require_once("class_iselect.php"); require_once ('class_bud_synthese.php'); require_once ('class_acc_account_ledger.php'); require_once ('class_bud_hypo.php'); @@ -37,36 +38,36 @@ class Bud_Synthese_Hypo extends Bud_Synthese { /* echo "constructor ".__FILE__; */ /* } */ static function make_array($p_cn) { - $a=make_array($p_cn,'select bh_id, bh_name from bud_hypothese '. + $a=$p_cn->make_array('select bh_id, bh_name from bud_hypothese '. ' order by bh_name'); return $a; } function form() { - $wSelect = new widget('select'); + $wSelect =new ISelect(); $wSelect->name='bh_id'; $wSelect->value=Bud_Synthese_Hypo::make_array($this->cn); $wSelect->selected=$this->bh_id; $wSelect->javascript='onChange=this.form.submit()'; - $r="Choississez l'hypothèse :".$wSelect->IOValue(); + $r="Choississez l'hypothèse :".$wSelect->input(); - $per=make_array($this->cn,"select p_id,to_char(p_start,'MM.YYYY') ". + $per=$this->cn->make_array("select p_id,to_char(p_start,'MM.YYYY') ". " from parm_periode order by p_start,p_end"); - $wFrom=new widget('select'); + $wFrom=new ISelect(); $wFrom->name='from'; $wFrom->value=$per; $wFrom->selected=$this->from; $wFrom->selected=$this->from; - $wto=new widget('select'); + $wto=new ISelect(); $wto->name='to'; $wto->selected=$this->to; $wto->value=$per; $wto->selected=$this->to; - $r.="Periode de ".$wFrom->IOValue()." à ".$wto->IOValue(); + $r.="Periode de ".$wFrom->input()." à ".$wto->input(); $r.=dossier::hidden(); return $r; } @@ -108,11 +109,11 @@ Array $per=sql_filter_per($this->cn,$this->from,$this->to,'p_id','p_id'); $per_acc=sql_filter_per($this->cn,$this->from,$this->to,'p_id','j_tech_per'); $sql_poste="select distinct pcm_val from bud_detail where bh_id=".$this->bh_id; - $aPoste=get_array($this->cn,$sql_poste); + $aPoste=$this->cn->get_array($sql_poste); $hypo=new Bud_Hypo($this->cn,$this->bh_id); - $local_con=DbConnect(dossier::id()); + $local_con=new Database(dossier::id()); if ( $hypo->has_plan() == 1 ) { - $sql_prepare=pg_prepare($local_con,"get_group","select sum(bdp_amount) as amount,ga_id,". + $sql_prepare=$local_con->prepare("get_group","select sum(bdp_amount) as amount,ga_id,". "bc_price_unit". " from ". " bud_detail join bud_detail_periode using (bd_id) ". @@ -124,7 +125,7 @@ Array " group by ga_id,bc_price_unit ". " order by ga_id "); } else { - $sql_prepare=pg_prepare($local_con,"get_group","select sum(bdp_amount) as amount,'Aucun groupe' as ga_id,". + $sql_prepare=$local_con->prepare("get_group","select sum(bdp_amount) as amount,'Aucun groupe' as ga_id,". "bc_price_unit". " from ". " bud_detail join bud_detail_periode using (bd_id) ". @@ -138,7 +139,7 @@ Array } $array=array(); // Now we put 0 if there is nothing for a group - $aGroup=get_array($this->cn,"select distinct ga_id from bud_detail join poste_analytique ". + $aGroup=$this->cn->get_array("select distinct ga_id from bud_detail join poste_analytique ". " using (po_id) where bh_id=".$this->bh_id." order by ga_id "); if ( empty ($aPoste)) return array(); @@ -146,8 +147,8 @@ Array foreach ($aPoste as $rPoste) { $pcm_val=$rPoste['pcm_val']; $line=array(); - $res=pg_execute("get_group",array($pcm_val,$this->bh_id)); - $row=pg_fetch_all($res); + $res=$cn->execute("get_group",array($pcm_val,$this->bh_id)); + $row=Database::fetch_all($res); if ( empty ($row) ) continue; // initialize all groupe to 0 if ( ! empty($aGroup) ) { @@ -172,8 +173,8 @@ Array /*!\bug it is a bug ? When I close a connection created and used * locally, it closed also the main connection so I reopened it */ - pg_close($local_con); - $this->cn=DbConnect(dossier::id()); + $local_con->close(); + $this->cn=new Database(dossier::id()); return $array; } /*!\brief compute the summary @@ -201,7 +202,7 @@ Array if ( empty ($p_array)) return ; // Now we put 0 if there is nothing for a group - $aGroup=get_array($this->cn,"select distinct ga_id from bud_detail join poste_analytique ". + $aGroup=$this->cn->get_array("select distinct ga_id from bud_detail join poste_analytique ". " using (po_id) where bh_id=".$this->bh_id." order by ga_id "); @@ -240,7 +241,7 @@ Array $array=array(); if ( empty ($p_array)) return $array ; // Now we put 0 if there is nothing for a group - $aGroup=get_array($this->cn,"select distinct ga_id from bud_detail join poste_analytique ". + $aGroup=$this->cn->get_array("select distinct ga_id from bud_detail join poste_analytique ". " using (po_id) where bh_id=".$this->bh_id." order by ga_id "); @@ -270,7 +271,7 @@ Array if ( empty ($p_array)) return; $heading=""; $r=""; - $aGroup=get_array($this->cn,"select distinct ga_id from bud_detail join poste_analytique ". + $aGroup=$this->cn->get_array("select distinct ga_id from bud_detail join poste_analytique ". " using (po_id) where bh_id=".$this->bh_id." order by ga_id "); $heading.='<tr>'; $heading.='<th>CE </th>'; @@ -317,7 +318,7 @@ Array if ( empty ($p_array)) return; $heading=""; $r=""; - $aGroup=get_array($this->cn,"select distinct ga_id from bud_detail join poste_analytique ". + $aGroup=$this->cn->get_array("select distinct ga_id from bud_detail join poste_analytique ". " using (po_id) where bh_id=".$this->bh_id." order by ga_id "); $heading.='"CE",'; foreach ($aGroup as $rGroup ) @@ -354,7 +355,7 @@ Array function hidden() { $r=""; foreach (array('bh_id','from','to') as $e) - $r.=widget::hidden($e,$this->$e); + $r.=HtmlInput::hidden($e,$this->$e); return $r; } /*!\brief the same as summary but show it in html */ @@ -362,7 +363,7 @@ Array if ( empty ($p_array))return ''; $summary_array=$this->summary($p_array); arsort($summary_array); - $aGroup=get_array($this->cn,"select distinct ga_id from bud_detail join poste_analytique ". + $aGroup=$this->cn->get_array("select distinct ga_id from bud_detail join poste_analytique ". " using (po_id) where bh_id=".$this->bh_id." order by ga_id "); $per_acc=sql_filter_per($this->cn,$this->from,$this->to,'p_id','j_tech_per'); @@ -403,12 +404,12 @@ Array return $r; } static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $obj=new Bud_Synthese_Hypo($cn); echo '<form method="GET">'; - echo widget::hidden('test_select',$_REQUEST['test_select']); + echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); echo $obj->form(); - echo widget::submit('recherche','Recherche'); + echo HtmlInput::submit('recherche','Recherche'); echo '</form>'; print_r($_GET); if ( isset ($_GET['recherche'])) { diff --git a/include/class_calendar.php b/include/class_calendar.php new file mode 100644 index 000000000..0a5b4c72f --- /dev/null +++ b/include/class_calendar.php @@ -0,0 +1,134 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Display the calendar + */ +class Calendar { + var $current_date; + private static $nb_day=array(31,29,31,30,31,30,31,31,30,31,30,31); + + function __construct() { + /* get the current month */ + $this->current_date=getdate(); + $this->month=$this->current_date['mon']; + $this->day=self::$nb_day[$this->month-1]; + $this->year=$this->current_date['year']; + } + + /*!\brief fill the array given as parameter with the data from action_gestion + *\param $p_array array of the date of the month + */ + function fill_from_action(&$p_array) { + $cn=new Database(dossier::id()); + $sql="select ag_id,substr(ag_title,0,20) as ag_title_fmt,to_char(ag_timestamp,'DD')::integer as ag_timestamp_day ". + " from action_gestion ". + " where ". + " to_char(ag_timestamp,'MM')::integer=$1 ". + " and to_char(ag_timestamp,'YYYY')::integer=$2 ". + " and ag_cal='C' and ag_owner=$3"; + $array=$cn->get_array($sql,array($this->month,$this->year,$_SESSION['g_user'])); + for ($i=0;$i<count($array);$i++) { + $ind=$array[$i]['ag_timestamp_day']; + $p_array[$ind]='<A HREF="commercial.php?'.dossier::get().'&p_action=suivi_courrier&sa=detail&ag_id='.$array[$i]['ag_id'].'">'; + $p_array[$ind].="<span class=\"day\">".h($array[$i]['ag_title_fmt']).'</span>'; + $p_array[$ind].="</A>"; + + } + } + /*!\brief fill the array given as parameter with the data from todo + *\param $p_array array of the date of the month + */ + function fill_from_todo(&$p_array) { + $cn=new Database(dossier::id()); + $sql="select tl_id,substr(tl_title,0,20) as tl_title_fmt,to_char(tl_date,'DD')::integer as tl_date_day ". + " from todo_list ". + " where ". + " to_char(tl_date,'MM')::integer=$1 ". + " and to_char(tl_date,'YYYY')::integer=$2 ". + " and use_login=$3"; + $array=$cn->get_array($sql,array($this->month,$this->year,$_SESSION['g_user'])); + for ($i=0;$i<count($array);$i++) { + $ind=$array[$i]['tl_date_day']; + $p_array[$ind].="<span class=\"todo\">".h($array[$i]['tl_title_fmt']).'</span>'; + } + } + /*!\brief display a calendar after a call to Calendar::fill + *\param none + *\return HTML String + */ + function display() { + /* day */ + $cell=array(); + for ($i=0;$i<42;$i++) { + $cell[$i]=""; + } + $this->set_month_year(); + /* weekday */ + $week=array(_('Dimanche'),_('Lundi'),_('Mardi'),_('Mercredi'),_('Jeudi'),_('Vendredi'),_('Samedi')); + + $this->fill_from_action($cell); + $this->fill_from_todo($cell); + $wMonth=new ISelect('per'); + $cn=new Database(dossier::id()); + $wMonth->value=$cn->make_array("select p_id,to_char(p_start,'MM/YYYY') from parm_periode order by p_start"); + $wMonth->selected=$this->default_periode; + $wMonth->javascript="onchange=change_month(this)"; + $wMonth->set_attribute('gDossier',dossier::id()); + $wMonth->set_attribute('phpsessid',$_REQUEST['PHPSESSID']); + $month_year=$wMonth->input().$wMonth->get_js_attr(); + ob_start(); + require_once('template/calendar.php'); + $ret=ob_get_contents(); + ob_end_clean(); + return $ret; + } + /** + *@brief set correctly the month and the year with the default_periode + */ + function set_month_year() { + $cn=new Database(dossier::id()); + $array=$cn->get_array("select to_char(p_start,'MM') as month, to_char(p_start,'YYYY') as year ". + " from parm_periode where p_id=$1",array($this->default_periode)); + $this->month=$array[0]['month']; + $this->year=$array[0]['year']; + } + /** + *@brief get the periode from the preference of the current user + * change the value of default_periode + *@return $this->default_periode + */ + function get_preference() { + $cn=new Database(dossier::id()); + $user=new User($cn); + $this->default_periode=$user->get_periode(); + return $this->default_periode; + } + /** + *@brief set the periode to the parameter, change the value of $this->default_periode + * there is no check on the periode + */ + function set_periode($p_per) { + $this->default_periode=$p_per; + } + + } diff --git a/include/class_contact.php b/include/class_contact.php index c86ba2810..318de3220 100644 --- a/include/class_contact.php +++ b/include/class_contact.php @@ -47,7 +47,7 @@ class contact extends fiche * * \return string to display */ - function Summary($p_search) + function Summary($p_search="",$p_action="") { $p_search=FormatString($p_search); $extra_sql=""; @@ -87,7 +87,6 @@ attr_value using (jft_id) where av_text=upper('".$this->company."') and ad_id=". <th>Téléphone</th> <th>email</th> <th>Fax</th> -<th colspan="2">Société</th> </TR>'; $base=$_SERVER['PHP_SELF']; // Compute the url @@ -106,7 +105,7 @@ attr_value using (jft_id) where av_text=upper('".$this->company."') and ad_id=". $back_url=urlencode($_SERVER['REQUEST_URI']); if ( sizeof ($step_contact ) == 0 ) return $r; - echo JS_SEARCH_CARD; + echo JS_LEDGER; foreach ($step_contact as $contact ) { $l_company=new fiche($this->cn); $l_company->get_by_qcode($contact->strAttribut(ATTR_DEF_COMPANY),false); @@ -123,14 +122,13 @@ $back_url=urlencode($_SERVER['REQUEST_URI']); ); } $r.="<TR>"; - $r.='<TD><A HREF="'.$url."&sa=detail&f_id=".$contact->id."\">".$contact->strAttribut(ATTR_DEF_QUICKCODE). + $qcode=$contact->strAttribut(ATTR_DEF_QUICKCODE); + $r.='<TD><A HREF="javascript:void(0)" onclick="this.ipopup=\'ipopcard\';this.qcode=(\''.$qcode.'\');fill_ipopcard(this);">'.$qcode. "</A></TD>"; $r.="<TD>".$contact->strAttribut(ATTR_DEF_NAME)."</TD>"; $r.="<TD>".$contact->strAttribut(ATTR_DEF_TEL)."</TD>"; $r.="<TD>".$contact->strAttribut(ATTR_DEF_EMAIL)."</TD>". - "<TD> ".$contact->strAttribut(ATTR_DEF_FAX)."</TD>". - "<TD> ".$l_company_name. "</TD>". - '<TD> <A href="?'.dossier::get().'&p_action=suivi_courrier&qcode='.$contact->strAttribut(ATTR_DEF_QUICKCODE).'&url='.$back_url.'">Courrier</A></TD>'; + "<TD> ".$contact->strAttribut(ATTR_DEF_FAX)."</TD>"; $r.="</TR>"; diff --git a/include/class_customer.php b/include/class_customer.php index 74c44cc84..0d5c555da 100644 --- a/include/class_customer.php +++ b/include/class_customer.php @@ -19,9 +19,8 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr require_once("constant.php"); -require_once("postgres.php"); +require_once('class_database.php'); require_once("class_acc_parm_code.php"); -require_once("class_widget.php"); require_once('class_periode.php'); require_once('class_fiche.php'); require_once('class_acc_account_ledger.php'); @@ -57,11 +56,11 @@ class Customer extends fiche{ function get_by_account($p_poste=0) { $this->poste=($p_poste==0)?$this->poste:$p_poste; $sql="select * from vw_client where poste_comptable=$1"; - $Res=ExecSqlParam($this->cn,$sql,array($this->poste)); - if ( pg_NumRows($Res) == 0) return null; - if ( pg_NumRows($Res) > 1 ) throw new Exception ('Plusieurs fiches avec le même poste',1); + $Res=$this->cn->exec_sql($sql,array($this->poste)); + if ( Database::num_row($Res) == 0) return null; + if ( Database::num_row($Res) > 1 ) throw new Exception ('Plusieurs fiches avec le même poste',1); // There is only _one_ row by customer - $row=pg_fetch_array($Res,0); + $row=Database::fetch_array($Res,0); $this->name=$row['name']; $this->id=$row['f_id']; $this->street=$row['rue']; @@ -83,7 +82,7 @@ class Customer extends fiche{ function VatListing($p_year) { $cond_sql=" and A.j_date = B.j_date and extract(year from A.j_date) ='$p_year'"; /* List of customer */ - $aCustomer=get_array($this->cn,'select f_id,name,quick_code,tva_num,poste_comptable from vw_client '. + $aCustomer=$this->cn->get_array('select f_id,name,quick_code,tva_num,poste_comptable from vw_client '. " where tva_num !='' "); /* Use the code */ @@ -126,22 +125,22 @@ where $cond_sql "; - $Res=ExecSql($this->cn,$sql); + $Res=$this->cn->exec_sql($sql); // Foreach operation // where 7% or tva account are involved // and store the result in an array (a_Res) //--- - for ($i=0; $i < pg_NumRows($Res);$i++) { + for ($i=0; $i < Database::num_row($Res);$i++) { // Get each row //--- - $row1=pg_fetch_array($Res,$i); + $row1=Database::fetch_array($Res,$i); // select the operation //---- - $Res2=ExecSql($this->cn,"select j_poste,j_montant,j_debit from jrnx where j_grpt=".$row1['j_grpt']); - $a_row=pg_fetch_all($Res2); + $Res2=$this->cn->exec_sql("select j_poste,j_montant,j_debit from jrnx where j_grpt=".$row1['j_grpt']); + $a_row=Database::fetch_all($Res2); // Store the amount in the array //--- @@ -173,115 +172,7 @@ where return $a_Res; } -/*! Summary - ************************************************** - * \brief show the default screen - * - * \param p_search (filter) - * - * \return: string to display - */ - function Summary($p_search) - { - $str_dossier=dossier::get(); - $p_search=FormatString($p_search); - $url=urlencode($_SERVER['REQUEST_URI']); - $script=$_SERVER['PHP_SELF']; - // Creation of the nav bar - // Get the max numberRow - $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=""; - $user=new User($this->cn); - $exercice=$user->get_exercice(); - $tPeriode=new Periode($this->cn); - list($max,$min)=$tPeriode->get_limit($exercice); - - - 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,$search); - if ( $all_client == 0 ) return ""; - $r=$bar; - $r.='<table width="95%"> -<TR style="background-color:lightgrey;"> -<TH>Quick Code</TH> -<th>Nom</th> -<th>Adresse</th> -<th>Total débit</th> -<th>Total crédit</th> -<th>Solde</th> -<th colspan="5">Action </th> -</TR>'; - echo_debug(__FILE__,__LINE__,$step_client); - if ( sizeof ($step_client ) == 0 ) - return $r; - foreach ($step_client as $client ) { - $r.="<TR>"; - $e=sprintf('<A HREF="%s?p_action=client&sb=detail&f_id=%d&%s&url=%s" title="Détail"> ', - $script,$client->id,$str_dossier,$url); - - $r.="<TD> $e".$client->strAttribut(ATTR_DEF_QUICKCODE)."</A></TD>"; - $r.="<TD>".h($client->strAttribut(ATTR_DEF_NAME))."</TD>"; - $r.="<TD>".h($client->strAttribut(ATTR_DEF_ADRESS). - " ".$client->strAttribut(ATTR_DEF_CP). - " ".$client->strAttribut(ATTR_DEF_PAYS)). - "</TD>"; - - - /* Filter on the default year */ - $User=new User($this->cn); - $filter_year=" j_tech_per in (select p_id from parm_periode ". - "where p_exercice='".$User->get_exercice()."')"; - $a=$client->get_solde_detail($filter_year); - - $r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['debit']); - $r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['credit']); - $r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['solde']); - - if ( basename($script)=='commercial.php') { - $r.="<TD>"; - - $r.=sprintf('<A class="mtitle" HREF="%s?p_action=contact&qcode=%s&%s&url=%s" title="Contact">Contact</A></td>', - $script,$client->strAttribut(ATTR_DEF_QUICKCODE),$str_dossier,$url); - $r.=sprintf('<td><A class="mtitle" HREF="%s?p_action=suivi_courrier&sa=list&qcode=%s&%s&url=%s" title="Action">Courrier</A></td> ', - $script,$client->strAttribut(ATTR_DEF_QUICKCODE) ,$str_dossier,$url); - - - } - $p_action_ven=( $script == "commercial.php")?"p_action=client&sa=f":"p_action=ven&sa=l"; - $r.='<td><A class="mtitle" HREF="?'.$p_action_ven.'&p_periode=-1&'.$str_dossier.'&qcode='.$client->strAttribut(ATTR_DEF_QUICKCODE).'&url='.$url.'" title="Historique Facture">Facture</A></td>'; - $r.=sprintf('<td><A class="mtitle" HREF="%s?liste&p_action=bank&sa=l&qcode=%s&%s&url=%s&p_periode=-1" title="Financier">Financier</A></td>', - $script,$client->strAttribut(ATTR_DEF_QUICKCODE) ,$str_dossier,$url); - - $r.=sprintf('<td><A class="mtitle" HREF="%s?p_action=impress&type=poste&f_id=%s&%s&from_periode=%s&to_periode=%s&bt_html=Visualisation" -title="Operation">Operation</A></td>', - $script,$client->strAttribut(ATTR_DEF_QUICKCODE) ,$str_dossier,$max->p_id,$min->p_id); - - $r.='</TD>'; - - - - $r.="</TR>"; - - } - $r.="</TABLE>"; - $r.=$bar; - return $r; - } } diff --git a/include/class_database.php b/include/class_database.php new file mode 100644 index 000000000..521866e7d --- /dev/null +++ b/include/class_database.php @@ -0,0 +1,664 @@ +<?php + /* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + /* $Revision$ */ + + // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + + /*!\file + * \brief contains the class for connecting to a postgresql database + */ +require_once('constant.php'); +require_once('ac_common.php'); +require_once('debug.php'); + +/*!\brief + * This class allow you to connect to the postgresql database, execute sql, retrieve data + * + */ +class Database +{ + + private $db; /*!< database connection */ + private $ret; /*!< return value */ + /*!\brief constructor + *\param $p_database_id is the id of the dossier, or the modele following the + * p_type if = 0 then connect to the repository + *\param $p_type is 'DOS' (defaut) for dossier or 'MOD' + */ + function __construct ($p_database_id=0,$p_type='dos') { + if ( IsNumber($p_database_id) == false || strlen($p_database_id) > 5 ) die ("-->Dossier invalide [$p_database_id]"); + $phpcompta_user=phpcompta_user; + $password=phpcompta_password; + $port=phpcompta_psql_port; + $host=( ! defined ("phpcompta_psql_host"))?'127.0.0.1':phpcompta_psql_host; + + if ( $p_database_id == 0 ) { /* connect to the repository */ + $l_dossier=sprintf("%saccount_repository",strtolower(domaine)); + } else if ( $p_type == 'dos') { /* connect to a folder (dossier) */ + $l_dossier=sprintf("%sdossier%d",strtolower(domaine),$p_database_id); + } else if ($p_type=='mod') { /* connect to a template (modele) */ + $l_dossier=sprintf("%smod%d",strtolower(domaine),$p_database_id); + } else if ($p_type=='template') { + $l_dossier='template1'; + } else { throw new Exception ('Connection invalide'); } + + ob_start(); + $a=pg_connect("dbname=$l_dossier host='$host' user='$phpcompta_user' +password='$password' port=$port"); + + if ( $a == false ) + { + ob_end_clean(); + echo '<h2 class="error">Impossible de se connecter à postgreSql !</h2>'; + echo '<p>'; + echo "Vos paramètres sont incorrectes : <br>"; + echo "<br>"; + echo "base de donnée : $l_dossier<br>"; + echo "Domaine : ".domaine."<br>"; + echo "Port $port <br>"; + echo "Utilisateur : $phpcompta_user <br>"; + echo '</p>'; + + exit ("Connection impossible : vérifiez vos paramètres de base +de données"); + + } + $this->db=$a; + ob_end_clean(); + } + + public function verify() { + // Verify that the elt we want to add is correct + } + function set_encoding($p_charset) { + pg_set_client_encoding($this->db,$p_charset); + } + /*! + * \brief send a sql string to the database + * \param $p_string sql string + * \param $p_array array for the SQL string (see pg_query_params) + * \return false if error otherwise true + */ + function exec_sql( $p_string,$p_array=null) { + try { + + if ( $p_array==null ) { + $this->ret=pg_query($this->db,$p_string); + } else { + $this->ret=pg_query_params($this->db,$p_string,$p_array); + } + if ( ! $this->ret ) { throw new Exception (" SQL ERROR $p_string ",1);} + }catch (Exception $a) { + if (DEBUG) { + print_r ($p_string); + print_r($p_array); + echo $a->getMessage(); + echo $a->getTrace(); + } + throw ($a); + } + + return $this->ret; + + } + /*! \brief Count the number of row returned by a sql statement + * + * \param $p_sql sql string + * \param $p_array if not null we use the safer pg_query_params + */ + + function count_sql($p_sql,$p_array=null) + { + $r_sql=$this->exec_sql($p_sql,$p_array); + return pg_NumRows($r_sql); + } + /*!\brief get the current sequence value + */ + function get_current_seq($p_seq) + { + $Res=$this->get_value("select currval('$p_seq') as seq"); + return $Res; + } + + + /*!\brief get the next sequence value + */ + function get_next_seq($p_seq) + { + $Res=$this->exec_sql("select nextval('$p_seq') as seq"); + $seq=pg_fetch_array($Res,0); + return $seq['seq']; + } + /** + * @ brief : start a transaction + * + */ + + function start() { + $Res=$this->exec_sql("start transaction"); + } + /** + * Commit the transaction + * + */ + + function commit() { + $Res=$this->exec_sql("commit"); + } + /** + * rollback the current transaction + */ + function rollback() { + $Res=$this->exec_sql("rollback"); + } + /** + * @brief alter the sequence value + * @param $p_name name of the sequence + * @param $min the start value of the sequence + */ + function alter_seq($p_name,$min) { + if ($min < 1) $min=1; + $Res=$this->exec_sql("alter sequence $p_name restart $min"); + } + /*! + * \brief Execute a sql script + * \param $script script name + */ + function execute_script($script) { + + if ( DEBUG=='false' ) ob_start(); + $hf=fopen($script,'r'); + if ( $hf == false ) { + echo 'Ne peut ouvrir '.$script; + exit(); + } + $sql=""; + $flag_function=false; + while (!feof($hf)) { + $buffer=fgets($hf); + $buffer=str_replace ("$","\$",$buffer); + print $buffer."<br>"; + // comment are not execute + if ( substr($buffer,0,2) == "--" ) { + //echo "comment $buffer"; + continue; + } + // Blank Lines Are Skipped + If ( Strlen($buffer)==0) { + //echo "Blank $buffer"; + Continue; + } + if ( strpos(strtolower($buffer),"create function")===0 ) { + echo "found a function"; + $flag_function=true; + $sql=$buffer; + continue; + } + if ( strpos(strtolower($buffer),"create or replace function")===0 ) { + echo "found a function"; + $flag_function=true; + $sql=$buffer; + continue; + } + // No semi colon -> multiline command + if ( $flag_function== false && strpos($buffer,';') == false ) { + $sql.=$buffer; + continue; + } + if ( $flag_function ) { + if ( strpos(strtolower($buffer), "language plpgsql") === false && + strpos(strtolower($buffer), "language 'plpgsql'") === false ) { + $sql.=$buffer; + continue; + } + } else { + // cut the semi colon + $buffer=str_replace (';','',$buffer); + } + $sql.=$buffer; + echo_debug('setup.php',__LINE__,"Execute sql $sql"); + if ( $this->exec_sql($sql) == false ) { + $this->rollback(); + if ( DEBUG=='false' ) ob_end_clean(); + print "ERROR : $sql"; + exit(); + } + $sql=""; + $flag_function=false; + print "<hr>"; + } // while (feof) + fclose($hf); + if ( DEBUG=='false' ) ob_end_clean(); + } + /*! + * \brief Get version of a database, the content of the + * table version + * + * \return version number + * + */ + function get_version() { + $Res=$this->get_value("select val from version"); + return $Res; + } + +/** + *@brief fetch the $p_indice array from the last query + *@param $p_indice index + * + */ + function fetch($p_indice) { + if ( $this->ret == false ) throw new Exception ('this->ret is empty'); + return pg_fetch_array($this->ret ) ; + } + /*!@brief return the number of rows found by the last query, + synomym for count()*/ + function size() { + return pg_NumRows($this->ret); + } + /*!@brief return the number of rows found by the last query, + synomym for size()*/ + function count() { + return pg_NumRows($this->ret); + } + + /*!\brief loop to apply all the path to a folder or + * a template + * \param $p_name database name + * \param $from_setup == 1 if called from setup.php + * + */ + function apply_patch($p_name,$from_setup=1) + { + $MaxVersion=DBVERSION-1; + echo '<ul>'; + $add=($from_setup==0)?'admin/':''; + for ( $i = 4;$i <= $MaxVersion;$i++) + { + $to=$i+1; + if ( $this->get_version() <= $i ) { + echo "<li>Patching ".$p_name. + " from the version ".$this->get_version()." to $to</h3> </li>"; + + $this->execute_script($add.'sql/patch/upgrade'.$i.'.sql'); + if ( DEBUG=='false' ) ob_start(); + // specific for version 4 + if ( $i == 4 ) + { + $sql="select jrn_def_id from jrn_def "; + $Res=$this->exec_sql($sql); + $Max=$this->size(); + for ($seq=0;$seq<$Max;$seq++) { + $row=pg_fetch_array($Res,$seq); + $sql=sprintf ("create sequence s_jrn_%d",$row['jrn_def_id']); + $this->exec_sql($sql); + } + } + // specific to version 7 + if ( $i == 7 ) + { + // now we use sequence instead of computing a max + // + $Res2=$this->exec_sql('select coalesce(max(jr_grpt_id),1) as l from jrn'); + $Max2= pg_NumRows($Res2) ; + if ( $Max2 == 1) { + $Row=pg_fetch_array($Res2,0); + var_dump($Row); + $M=$Row['l']; + $this->exec_sql("select setval('s_grpt',$M,true)"); + } + } + // specific to version 17 + if ( $i == 17 ) + { + $this->execute_script($add.'sql/patch/upgrade17.sql'); + $max=$this->get_value('select last_value from s_jnt_fic_att_value'); + $this->alter_seq($p_cn,'s_jnt_fic_att_value',$max+1); + } // version + + // reset sequence in the modele + //-- + if ( $i == 30 && $p_name=="mod" ) + { + $a_seq=array('s_jrn','s_jrn_op','s_centralized', + 's_stock_goods','c_order','s_central'); + foreach ($a_seq as $seq ) { + $sql=sprintf("select setval('%s',1,false)",$seq); + $Res=$this->exec_sql($sql); + } + $sql="select jrn_def_id from jrn_def "; + $Res=$this->exec_sql($sql); + $Max=pg_NumRows($Res); + for ($seq=0;$seq<$Max;$seq++) { + $row=pg_fetch_array($Res,$seq); + $sql=sprintf ("select setval('s_jrn_%d',1,false)",$row['jrn_def_id']); + $this->exec_sql($sql); + } + + } + if ( $i == 36 ) { + /* check the country and apply the path */ + $res=$this->exec_sql("select pr_value from parameter where pr_id='MY_COUNTRY'"); + $country=pg_fetch_result($res,0,0); + $this->execute_script($add."sql/patch/upgrade36.".$country.".sql"); + $this->exec_sql('update tmp_pcmn set pcm_type=find_pcm_type(pcm_val)'); + } + if ($i == 59 ){ + $res=$this->exec_sql("select pr_value from parameter where pr_id='MY_COUNTRY'"); + $country=pg_fetch_result($res,0,0); + if ( $country == 'BE') $this->exec_sql("insert into parm_code values ('SUPPLIER',440,'Poste par défaut pour les fournisseurs')"); + if ($country=='FR') $this->exec_sql("insert into parm_code values ('SUPPLIER',400,'Poste par défaut pour les fournisseurs')"); + } + if ( $i == 61 ) { + $country=$this->get_value ("select pr_value from parameter where pr_id='MY_COUNTRY'"); + $this->execute_script($add."sql/patch/upgrade61.".$country.".sql"); + } + if ( DEBUG == 'false') ob_end_clean(); + } + } + echo '</ul>'; + } + /*!\brief return the value of the sql, the sql will return only one value + * with the value + * \param $p_sql the sql stmt example :select s_value from + document_state where s_id=2 + *\param $p_array if array is not null we use the ExecSqlParm (safer) + *\see exec_sql + *\note print a warning if several value are found, if only the first value is needed + * consider using a LIMIT clause + * \return only the first value or an empty string if nothing is found + */ + function get_value($p_sql,$p_array=null) + { + $this->ret=$this->exec_sql($p_sql,$p_array); + if ( pg_NumRows($this->ret) == 0 ) return ""; + if ( pg_NumRows($this->ret) > 1 ) echo "Attention $p_sql retourne plusieurs valeurs"; + $r=pg_fetch_row($this->ret,0); + return $r[0]; + + } + /*!\brief purpose return the result of a sql statment + * in a array + * \param $p_sql sql query + * \param $p_array if not null we use ExecSqlParam + *\return an empty array if nothing is found + */ + function get_array($p_sql,$p_array=null) { + $r=$this->exec_sql($p_sql,$p_array); + + if ( ($Max= pg_NumRows($r)) == 0 ) return array(); + $array=pg_fetch_all($r); + return $array; + } + + function create_sequence($p_name,$min=1) { + if ($min < 1) $min=1; + $sql="create sequence ".$p_name." minvalue $min"; + $this->exec_sql($sql); + } + /*!\brief test if a sequence exist */ + /* \return true if the seq. exist otherwise false + */ + function exist_sequence($p_name) { + $r=$this->count_sql("select relname from pg_class where relname=lower($1)",array($p_name)); + if ( $r==0) + return false; + return true; + } + /*!\brief test if a table exist + * \return true if a table exist otherwise false + */ + function exist_table($p_name) { + $r=$this->count_sql("select tablename from pg_tables where tablename=lower($1)", array($p_name)); + if ( $r==0) + return false; + return true; + } + /* + *!\brief test if a view exist + * \return true if the view. exist otherwise false + */ + function exist_view($p_name) { + $r=$this->count_sql("select viewname from pg_views where viewname=lower($1)",array($p_name)); + if ( $r==0) + return false; + return true; + } + /*! + *\brief create a string containing the value separated by comma + * for use in a SQL in statement + *\return the string or empty if nothing is found + *\see fid_card.php + */ + function make_list($sql,$p_array=null) { + if ( $p_array == null ) { + $aArray=$this->get_array($sql); + } else { + $aArray=$this->get_array($sql,$p_array); + } + if (empty ($aArray) ) return ""; + $aIdx=array_keys($aArray[0]); + $idx=$aIdx[0]; + $ret="";$f=""; + for ($i = 0; $i < count($aArray);$i++) { + $row=$aArray[$i]; + $ret.=$f.$aArray[$i][$idx]; + $f=','; + } + return $ret; + } + /*! + * \brief make a array with the sql + * + * \param $p_sql sql statement, only the first two column will be returned in + * an array. The first col. is the label and the second the value + * \param $p_null if the array start with a null value + *\note this function is used with ISelect when it is needed to have a list of + * options + * \return: a double array like + \verbatim +Array +( + [0] => Array + ( + [value] => 1 + [label] => Marchandise A + ) + + [1] => Array + ( + [value] => 2 + [label] => Marchandise B + ) + + [2] => Array + ( + [value] => 3 + [label] => Marchandise C + ) +) + \endverbatim + * \see ISelect + */ + function make_array($p_sql,$p_null=0) { + $a=$this->exec_sql($p_sql); + $max=pg_NumRows($a); + if ( $max==0) return null; + for ($i=0;$i<$max;$i++) { + $row=pg_fetch_row($a); + $r[$i]['value']=$row[0]; + $r[$i]['label']=$row[1]; + } + // add a blank item ? + if ( $p_null == 1 ) { + for ($i=$max;$i!=0;$i--) { + $r[$i]['value']= $r[$i-1]['value']; + $r[$i]['label']= $r[$i-1]['label']; + } + $r[0]['value']=-1; + $r[0]['label']=" "; + } // if ( $p_null == 1 ) + + return $r; + } + /*! + * \brief Save a "piece justificative" + * + * \param $seq jr_grpt_id + * \return $oid of the lob file if success + * null if a error occurs + * + */ + function save_upload_document ($seq) { + /* there is + no file to + upload */ + if ($_FILES["pj"]["error"] == UPLOAD_ERR_NO_FILE ){ return;} + + $new_name=tempnam($_ENV['TMP'],'pj'); + echo_debug(__FILE__,__LINE__,"new name=".$new_name); + echo_debug(__FILE__.":".__LINE__.$_FILES); + if ($_FILES["pj"]["error"] > 0) + { + print_r($_FILES); + echo_error(__FILE__.":".__LINE__."Error: " . $_FILES["pj"]["error"] ); + } + if ( strlen ($_FILES['pj']['tmp_name']) != 0 ) { + echo_debug(__FILE__.":".__LINE__.'_FILE is'.$_FILES['pj']['tmp_name']); + if (move_uploaded_file($_FILES['pj']['tmp_name'], + $new_name)) { + // echo "Image saved"; + echo_debug(__FILE__.":".__LINE__."Doc saved"); + $oid= pg_lo_import($this->db,$new_name); + if ( $oid == false ) { + echo_error('postgres.php',__LINE__,"cannot upload document"); + $this->rollback(); + return; + } + echo_debug(__FILE__,__LINE__,"Loading document"); + // Remove old document + $ret=$this->exec_sql("select jr_pj from jrn where jr_grpt_id=$seq"); + if (pg_num_rows($ret) != 0) { + $r=pg_fetch_array($ret,0); + $old_oid=$r['jr_pj']; + if (strlen($old_oid) != 0) + pg_lo_unlink($cn,$old_oid); + } + // Load new document + $this->exec_sql("update jrn set jr_pj=".$oid.", jr_pj_name='".$_FILES['pj']['name']."', ". + "jr_pj_type='".$_FILES['pj']['type']."' where jr_grpt_id=$seq"); + return $oid; + + } else { + echo "<H1>Error</H1>"; + $this->rollback(); + + } + } + return 0; + } + /*!\brief wrapper for the function pg_NumRows + *\param $ret is the result of a exec_sql + *\return number of line affected + */ + static function num_row($ret) { return pg_NumRows($ret); } + + + /*!\brief wrapper for the function pg_fetch_array + *\param $ret is the result of a pg_exec + *\param $p_indice is the index + *\return $array of column + */ + static function fetch_array($ret,$p_indice=0) { return pg_fetch_array($ret,$p_indice); } + + /*!\brief wrapper for the function pg_fetch_all + *\param $ret is the result of pg_exec (exec_sql) + *\return double array (row x col ) + */ + static function fetch_all($ret) { return pg_fetch_all($ret); } + + /*!\brief wrapper for the function pg_fetch_all + *\param $ret is the result of pg_exec (exec_sql) + *\param $p_row is the indice of the row + *\param $p_col is the indice of the col + *\return a string or an integer + */ + static function fetch_result($ret,$p_row=0,$p_col=0) { return pg_fetch_result($ret,$p_row,$p_col); } + + /*!\brief wrapper for the function pg_lo_unlink + *\param $p_oid is the of oid + *\return return the result of the operation + */ + function lo_unlink($p_oid) { return pg_lo_unlink($this->db,$p_oid); } + + /*!\brief wrapper for the function pg_lo_unlink + *\param $p_string string name for pg_prepare function + *\param $p_sql is the sql to prepare + *\return return the result of the operation + */ + function prepare($p_string,$p_sql) { return pg_prepare($this->db,$p_string,$p_sql); } + /*!\brief wrapper for the function pg_lo_unlink + *\param $p_string string name for pg_prepare function + *\param $p_array contains the variables + *\return return the result of the operation + */ + function execute($p_string,$p_array) { return pg_execute($this->db,$p_string,$p_array); } + + /*!\brief wrapper for the function pg_lo_export + *\param $p_oid is the oid of the log + *\param $tmp is the file + *\return result of the operation + */ + function lo_export($p_oid,$tmp) { + return pg_lo_export($this->db,$p_oid,$tmp); + } + /*!\brief wrapper for the function pg_lo_export + *\param $p_oid is the oid of the log + *\param $tmp is the file + *\return result of the operation + */ + function lo_import($p_oid) { + return pg_lo_import($this->db,$p_oid); + } + + /*!\brief wrapper for the function pg_escape_string + *\param $p_string is the string to escape + *\return escaped string + */ + static function escape_string($p_string) { + return pg_escape_string($p_string); + } + /*!\brief wrapper for the function pg_close + */ + function close() { pg_close($this->db);} + /*!\brief + *\param + *\return + *\note + *\see + */ + function __toString() { + return "database "; + } + static function test_me() { + } + +} + +/* test::test_me(); */ diff --git a/include/class_document.php b/include/class_document.php index 09759e834..6ba039a22 100644 --- a/include/class_document.php +++ b/include/class_document.php @@ -39,7 +39,6 @@ class Document var $d_lob; /*!< $d_lob the oid of the lob */ var $d_number; /*!< $d_number number of the document */ var $md_id; /*!< $md_id document's template */ - var $d_state; /*!< $d_state document.d_state status of the document */ /* Constructor * \param $p_cn Database connection */ @@ -52,32 +51,25 @@ class Document */ function blank() { - $this->d_id=NextSequence($this->db,"document_d_id_seq"); + $this->d_id=$this->db->get_next_seq("document_d_id_seq"); // affect a number - $this->d_number=NextSequence($this->db,"seq_doc_type_".$this->md_type); + $this->d_number=$this->db->get_next_seq("seq_doc_type_".$this->md_type); $sql=sprintf('insert into document(d_id,ag_id,d_number) values(%d,%d,%d)', $this->d_id, $this->ag_id, $this->d_number); - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } - /*!\brief Save save the state of the document + + /*! + * \brief Generate the document, Call $this-\>Replace to replace + * tag by value + * + * + * \return an array : the url where the generated doc can be found, the name + * of the file and his mimetype */ - function save() - { - $sql="update document set d_state=".$this->d_state. - " where d_id=".$this->d_id; - ExecSql($this->db,$sql); - } -/*! - * \brief Generate the document, Call $this-\>Replace to replace - * tag by value - * - * - * \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 @@ -88,12 +80,12 @@ class Document mkdir ($dirname); echo_debug('class_action',__LINE__,"Dirname is $dirname"); // Retrieve the lob and save it into $dirname - StartSql($this->db); + $this->db->start(); $dm_info="select md_type,md_lob,md_filename,md_mimetype from document_modele where md_id=".$this->md_id; - $Res=ExecSql($this->db,$dm_info); + $Res=$this->db->exec_sql($dm_info); - $row=pg_fetch_array($Res,0); + $row=Database::fetch_array($Res,0); $this->d_lob=$row['md_lob']; $this->d_filename=$row['md_filename']; $this->d_mimetype=$row['md_mimetype']; @@ -102,7 +94,7 @@ class Document chdir($dirname); $filename=$row['md_filename']; - pg_lo_export($this->db,$row['md_lob'],$filename); + $this->db->lo_export($row['md_lob'],$filename); $type="n"; echo_debug('class_document',__LINE__,'The document type is '.$row['md_mimetype']); // if the doc is a OOo, we need to unzip it first @@ -110,9 +102,6 @@ class Document if ( strpos($row['md_mimetype'],'vnd.oasis') != 0 ) { echo_debug('class_document',__LINE__,'Unzip the OOo'); - echo '<span id="gen_msg">'; - echo '<blink><font color="red">Un moment de patience, le document se prépare...</font></blink>'; - echo '</span><br>'; ob_start(); system("unzip '".$filename."'"); // Remove the file we do not need anymore @@ -124,13 +113,13 @@ class Document else $file_to_parse=$filename; // affect a number - $this->d_number=NextSequence($this->db,"seq_doc_type_".$row['md_type']); + $this->d_number=$this->db->get_next_seq("seq_doc_type_".$row['md_type']); echo_debug(__FILE__,__LINE__,"seq_doc_type_".$row['md_type'].' = '.$this->d_number); // parse the document - return the doc number ? $this->ParseDocument($dirname,$file_to_parse,$type); - Commit($this->db); + $this->db->commit(); // if the doc is a OOo, we need to re-zip it if ( strpos($row['md_mimetype'],'vnd.oasis') != 0 ) { @@ -139,9 +128,6 @@ class Document ob_end_clean(); echo " "; ?> -<script language="javascript"> - this.document.getElementById('gen_msg').innerHTML='<font color="green">le document est prêt</color>'; -</script> <?php $file_to_parse=$filename; @@ -152,6 +138,7 @@ class Document mkdir ($l_dir); // we need to rename the new generated file + echo_debug(__FILE__,__LINE__, "rename(".$dirname.DIRECTORY_SEPARATOR.$file_to_parse.",".$_SERVER['DOCUMENT_ROOT'].$dirname.DIRECTORY_SEPARATOR.$file_to_parse.")"); rename($dirname.DIRECTORY_SEPARATOR.$file_to_parse,$_SERVER['DOCUMENT_ROOT'].$dirname.DIRECTORY_SEPARATOR.$file_to_parse); $this->SaveGenerated($_SERVER['DOCUMENT_ROOT'].$dirname.DIRECTORY_SEPARATOR.$file_to_parse); // Invoice @@ -266,8 +253,11 @@ class Document } fclose($h); fclose($output_file); - rename ($output_name,$infile_name); - // Save the document into the database + echo_debug(__FILE__,__LINE__,'rename file '.$output_name.' to '.$infile_name ); + if ( ($ret=rename ($output_name,$infile_name)) == FALSE ){ + echo _('Ne peut pas sauver '.$output_name.' vers '.$infile_name.' code d\'erreur ='.$ret); + } + } /*! SaveGenerated @@ -279,94 +269,81 @@ class Document */ function SaveGenerated($p_file) { - echo_debug('class_document',__LINE__,'Save generated'); + echo_debug('class_document',__LINE__,'Save generated [p_file='.$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); + $this->db->start(); + $this->d_lob=$this->db->lo_import($p_file); if ( $this->d_lob == false ) { - Rollback($this->db); echo_debug('class_document',__LINE__,"can't save file $p_file"); + $this->db->rollback(); 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,d_state) - values (%d,%s,%d,'%s','%s',%d)", - $this->ag_id, - $this->d_lob, - $this->d_number, - $this->d_filename, - $this->d_mimetype, - $this->d_state - ); - ExecSql($this->db,$sql); - $this->d_id=GetSequence($this->db,"document_d_id_seq"); - echo_debug('class_document',__LINE__,'document sauv� : d_id'.$this->d_id); + $sql="insert into document(ag_id,d_lob,d_number,d_filename,d_mimetype) + values ($1,$2,$3,$4,$5)"; + + $this->db->exec_sql($sql, array($this->ag_id, + $this->d_lob, + $this->d_number, + $this->d_filename, + $this->d_mimetype)); + $this->d_id=$this->db->get_current_seq("document_d_id_seq"); + echo_debug('class_document',__LINE__,'document sauvé : d_id'.$this->d_id); // Clean the file unlink ($p_file); - Commit($this->db); + $this->db->commit(); return 0; } /*! Upload * \brief Upload a file into document * all the needed data are in $_FILES we don't increment the seq - * + * \param $p_file : array containing by default $_FILES * * \return */ - function Upload() + function Upload($p_ag_id) { - // nothing to save if ( sizeof($_FILES) == 0 ) return; + /* for several files */ + /* $_FILES is now an array */ // Start Transaction - StartSql($this->db); - $new_name=tempnam($_ENV['TMP'],'doc_'); - - - // 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)) + $this->db->start(); + $name=$_FILES['file_upload']['name']; + for ($i = 0; $i < sizeof($name);$i++) { + $new_name=tempnam($_ENV['TMP'],'doc_'); + // check if a file is submitted + if ( strlen($_FILES['file_upload']['tmp_name'][$i]) != 0 ) { - $oid=pg_lo_import($this->db,$new_name); - // check if the lob is in the database - if ( $oid == false ) + // upload the file and move it to temp directory + if ( move_uploaded_file($_FILES['file_upload']['tmp_name'][$i],$new_name)) { - Rollback($this->db); - return 1; + $oid=$this->db->lo_import($new_name); + // check if the lob is in the database + if ( $oid == false ) + { + $this->db->rollback(); + return 1; + } } + // the upload in the database is successfull + $this->d_lob=$oid; + $this->d_filename=$_FILES['file_upload']['name'][$i]; + $this->d_mimetype=$_FILES['file_upload']['type'][$i]; + + // insert into the table + $sql="insert into document (ag_id, d_lob,d_filename,d_mimetype,d_number) values ($1,$2,$3,$4,5)"; + $this->db->exec_sql($sql,array($p_ag_id,$this->d_lob,$this->d_filename,$this->d_mimetype)); } - // 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); - + } /* end for */ + $this->db->commit(); + } -/*! a_ref - * \brief create and compute a string for reference the doc <A ...> - * - * \return a string - */ + /*! a_ref + * \brief create and compute a string for reference the doc <A ...> + * + * \return a string + */ function a_ref() { if ( $this->d_id == 0 ) @@ -382,15 +359,15 @@ class Document function Send() { // retrieve the template and generate document - StartSql($this->db); - $ret=ExecSql($this->db, + $this->db->start(); + $ret=$this->db->exec_sql( "select d_id,d_lob,d_filename,d_mimetype from document where d_id=".$this->d_id ); - if ( pg_num_rows ($ret) == 0 ) + if ( Database::num_row ($ret) == 0 ) return; - $row=pg_fetch_array($ret,0); + $row=Database::fetch_array($ret,0); //the document is saved into file $tmp $tmp=tempnam($_ENV['TMP'],'document_'); - pg_lo_export($this->db,$row['d_lob'],$tmp); + $this->db->lo_export($row['d_lob'],$tmp); $this->d_mimetype=$row['d_mimetype']; $this->d_filename=$row['d_filename']; @@ -412,23 +389,43 @@ class Document unlink ($tmp); - Commit($this->db); + $this->db->commit(); } + /*!\brief get all the document of a given action + *\param $ag_id the ag_id from action::ag_id (primary key) + *\return an array of objects document or an empty array if nothing found + */ + function get_all($ag_id) { + $res=$this->db->get_array('select d_id, ag_id, d_lob, d_number, d_filename,'. + ' d_mimetype from document where ag_id=$1',array($ag_id)); + $a=array(); + for ($i=0;$i<sizeof($res); $i++ ) { + $doc=new Document($this->db); + $doc->d_id=$res[$i]['d_id']; + $doc->ag_id=$res[$i]['ag_id']; + $doc->d_lob=$res[$i]['d_lob']; + $doc->d_number=$res[$i]['d_number']; + $doc->d_filename=$res[$i]['d_filename']; + $doc->d_mimetype=$res[$i]['d_mimetype']; + $a[$i]=clone $doc; + } + return $a; + } + /*!\brief Get complete all the data member thx info from the database */ function get() { $sql="select * from document where d_id=".$this->d_id; - $ret=ExecSql($this->db,$sql); - if ( pg_num_rows($ret) == 0 ) + $ret=$this->db->exec_sql($sql); + if ( Database::num_row($ret) == 0 ) return; - $row=pg_fetch_array($ret,0); + $row=Database::fetch_array($ret,0); $this->ag_id=$row['ag_id']; $this->d_mimetype=$row['d_mimetype']; $this->d_filename=$row['d_filename']; $this->d_lob=$row['d_lob']; - $this->d_state=$row['ag_id']; $this->d_number=$row['d_number']; } @@ -623,7 +620,7 @@ class Document break; case 'REFERENCE': - $act=new action($this->db); + $act=new Action($this->db); $act->ag_id=$this->ag_id; $act->get(); $r=$act->ag_ref; @@ -709,10 +706,11 @@ class Document if ( !isset (${$id}) ) return ""; $march_id='e_march'.$counter.'_price' ; if ( ! isset (${$march_id})) return ''; - if ( ${$march_id} == 0 )return ''; - $tva=GetTvaRate($this->db,${$id}); - if ( $tva == null || $tva==0 ) return ""; - $r=$tva['tva_label']; + if ( ${$march_id} == 0) return ''; + $tva=new Acc_Tva($this->db,${$id}); + if ($tva->load() == -1 ) return ""; + $r=$tva->get_parameter('label'); + break; /* total VAT for one sold */ @@ -729,14 +727,9 @@ class Document || strlen(trim( $price )) ==0 || strlen(trim($qt)) ==0) return ""; - $a_tva=GetTvaRate($this->db,${$tva}); - echo_debug('class_document',__LINE__,'Tva :'.var_export($a_tva,true)); - // if no vat returns 0 - if ( sizeof($a_tva) == 0 ) return ""; - $r=round(${$price},2)*${$qt}*$a_tva['tva_rate']; - $r=round($r,2); + $r=${'e_march'.$counter.'_tva_amount'}; break; - + /* TVA automatically computed */ case 'VEN_ART_TVA': extract ($_POST); $qt='e_quant'.$counter; @@ -748,11 +741,9 @@ class Document || strlen(trim( $price )) ==0 || strlen(trim($qt)) ==0) return ""; - $a_tva=GetTvaRate($this->db,${$tva}); - echo_debug('class_document',__LINE__,'Tva :'.var_export($a_tva,true)); - // if no vat returns 0 - if ( sizeof($a_tva) == 0 ) return ""; - $r=round(${$price},2)*$a_tva['tva_rate']; + $oTva=new Acc_Tva($cn,${$tva}); + if ($oTva->load() == null) return ""; + $r=round(${$price},2)*$oTva->get_parameter('rate'); $r=round($r,2); break; @@ -767,15 +758,13 @@ class Document || strlen(trim( $price )) ==0 || strlen(trim($qt)) ==0) return ""; - $a_tva=GetTvaRate($this->db,${$tva}); - echo_debug('class_document',__LINE__,'Tva :'.var_export($a_tva,true)); - // if no vat returns 0 - if ( sizeof($a_tva) == 0 ) { + $tva=new Acc_Tva($cn,${$id}); + if ($tva->load() == null) { $r=round(${$price},2); }else { - $r=round(${$price}*$a_tva['tva_rate']+${$price},2); + $r=round(${$price}*$tva->get_parameter('rate')+${$price},2); } - + break; case 'VEN_ART_QUANT': @@ -808,27 +797,23 @@ class Document case 'VEN_TVAC': extract ($_POST); - $id='e_march'.$counter.'_price' ; + $id='e_march'.$counter.'_tva_amount' ; + $price='e_march'.$counter.'_price' ; $quant='e_quant'.$counter; - // if it is exist - if ( ! isset(${$id})) + if ( ! isset(${'e_march'.$counter.'_price'})|| !isset(${'e_quant'.$counter})) return ""; // check that something is sold if ( ${'e_march'.$counter.'_price'} == 0 || ${'e_quant'.$counter} == 0 ) return ""; - $r=${$id}*${$quant}; - $tva='e_march'.$counter.'_tva_id'; - /* if we do not use vat this var. is not set */ - if ( !isset(${$tva}) ) return $r; - $tva=GetTvaRate($this->db,${$tva}); - // if there is no vat we return now - if ( $tva == null || $tva == 0 ) return $r; - // we compute with the vat included - $r=$r+$r*$tva['tva_rate']; - $r=round($r,2); + // if it is exist + if ( ! isset(${$id})) + $r=round(${$price}*${$quant},2); + else + $r=round(${$price}*${$quant}+$id,2); break; + case 'TOTAL_VEN_HTVA': extract($_POST); echo_debug('class_document',__LINE__,'TOTAL_VEN_TVA item :'.$nb_item); @@ -861,20 +846,18 @@ class Document $sum=0.0; for ($i=0;$i<$nb_item;$i++) { - $tva='e_march'.$counter.'_tva_id'; - $tva_rate=0; + $tva='e_march'.$i.'_tva_amount'; + $tva_amount=0; /* if we do not use vat this var. is not set */ if ( isset(${$tva}) ) { - $tva=GetTvaRate($this->db,${'e_march'.$i.'_tva_id'}); - $tva_rate=( $tva == null || $tva == 0 )?0.0:$tva['tva_rate']; - echo_debug('class_document',__LINE__,' :'.$i.' sur '.$nb_item); + $tva_amount=${$tva}; } $sell=${'e_march'.$i.'_price'}; $qt=${'e_quant'.$i}; - echo_debug('class_document',__LINE__,'sell :'.$sell.' qt = '.$qt); + - $sum+=$sell*$qt*(1+$tva_rate); + $sum+=$sell*$qt+$tva_amount; $sum=round($sum,2); } $r=round($sum,2); @@ -882,21 +865,12 @@ class Document break; case 'TOTAL_TVA': extract($_POST); - $tva='e_march'.$counter.'_tva_id'; - /* if we do not use vat this var. is not set */ - if ( !isset(${$tva}) ) return '0'; - $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']; - echo_debug('class_document',__LINE__,' :'.$i.' sur '.$nb_item); - $sell=${'e_march'.$i.'_price'}; - $qt=${'e_quant'.$i}; - echo_debug('class_document',__LINE__,'sell :'.$sell.' qt = '.$qt); - - $sum+=$sell*$qt*$tva_rate; + $tva='e_march'.$i.'_tva_amount'; + if (! isset(${$tva})) $tva_amount=0.0; else $tva_amount=${$tva}; + $sum+=$tva_amount; $sum=round($sum,2); } $r=$sum; @@ -933,7 +907,9 @@ class Document function remove() { $sql='delete from document where d_id='.$this->d_id; - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); + if ($this->d_lob != 0 ) + $this->db->lo_unlink($this->d_lob); } /*!\brief Move a document from the table document into the concerned row * the document is not copied : it is only a link @@ -946,9 +922,12 @@ class Document $sql=sprintf("update jrn set jr_pj=%s,jr_pj_name='%s',jr_pj_type='%s' where jr_internal='%s'", $this->d_lob,$this->d_filename,$this->d_mimetype,$p_internal); - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); // clean the table document - //$this->remove(); + $sql='delete from document where d_id='.$this->d_id; + $this->db->exec_sql($sql); + + } diff --git a/include/class_document_modele.php b/include/class_document_modele.php index 7ee709e6f..6c6df39f8 100644 --- a/include/class_document_modele.php +++ b/include/class_document_modele.php @@ -24,7 +24,9 @@ /*! * \brief Class for the document template */ - +require_once('class_icheckbox.php'); +require_once('class_ihidden.php'); +require_once('class_ifile.php'); class Document_modele { var $cn; /*!< $cn database connection */ var $md_id; /*!< $md_id pk */ @@ -49,9 +51,9 @@ class Document_modele { function myList() { $s=dossier::get(); $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 ""; + $Res=$this->cn->exec_sql($sql); + $all=Database::fetch_all($Res); + if ( Database::num_row($Res) == 0 ) return ""; $r='<p><form method="post">'; $r.=dossier::hidden(); $r.="<table>"; @@ -69,20 +71,20 @@ class Document_modele { $r.='<A HREF="show_document_modele.php?md_id='.$row['md_id'].'&'.$s.'">Document</a>'; $r.="</td>"; $r.="<TD>"; - $c=new widget("checkbox"); + $c=new ICheckBox(); $c->name="dm_remove_".$row['md_id']; - $r.=$c->IOValue(); + $r.=$c->input(); $r.="</td>"; $r.="</tr>"; } $r.="</table>"; // need hidden parameter for subaction - $a=new widget("hidden"); + $a=new IHidden(); $a->name="sa"; $a->value="rm_template"; - $r.=$a->IOValue(); - $r.=widget::submit("rm_template","Effacer la sélection"); + $r.=$a->input(); + $r.=HtmlInput::submit("rm_template","Effacer la sélection"); $r.="</form></p>"; return $r; } @@ -104,8 +106,8 @@ class Document_modele { try { // Start transaction - StartSql($this->cn); - // Save data into the table invoice + $this->cn->start(); + // Save data into the table document_modele // 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 @@ -114,13 +116,13 @@ class Document_modele { // insert into the table document_modele $this->name=FormatString($this->md_name); - $this->md_id=NextSequence($this->cn,'document_modele_md_id_seq'); + $this->md_id=$this->cn->get_next_seq('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); + $Ret=$this->cn->exec_sql($sql); // create the sequence for this modele of document - $this->md_sequence="document_".NextSequence($this->cn,"document_seq"); + $this->md_sequence="document_".$this->cn->get_next_seq("document_seq"); // if start is not equal to 0 and he's a number than the user // request a number change echo_debug('class_document_modele',__LINE__, "this->start ".$this->start." a number ".isNumber($this->start)); @@ -128,7 +130,7 @@ class Document_modele { if ( $this->start != 0 && isNumber($this->start) == 1 ) { $sql="alter sequence seq_doc_type_".$this->md_type." restart ".$this->start; - ExecSql($this->cn,$sql); + $this->cn->exec_sql($sql); } } @@ -141,31 +143,31 @@ class Document_modele { $new_name)) { // echo "Image saved"; - $oid= pg_lo_import($this->cn,$new_name); + $oid= $this->cn->lo_import($new_name); if ( $oid == false ) { echo_error('class_document_modele.php',__LINE__,"cannot upload document"); - Rollback($cn); + $this->cn->rollback(); 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) + $ret=$this->cn->exec_sql("select md_lob from document_modele where md_id=".$this->md_id); + if (Database::num_row($ret) != 0) { - $r=pg_fetch_array($ret,0); + $r=Database::fetch_array($ret,0); $old_oid=$r['md_lob']; if (strlen($old_oid) != 0) - pg_lo_unlink($this->cn,$old_oid); + $this->cn->lo_unlink($old_oid); } // Load new document - 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); + $this->cn->exec_sql("update document_modele set md_lob=".$oid.", md_mimetype='".$_FILES['doc']['type']."' ,md_filename='".$_FILES['doc']['name']."' where md_id=".$this->md_id); + $this->cn->commit(); } else { echo "<H1>Error</H1>"; - Rollback($this->cn); + $this->cn->rollback(); exit; } } @@ -183,68 +185,23 @@ class Document_modele { */ function Delete() { - StartSql($this->cn); + $this->cn->start(); // 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); + $res=$this->cn->exec_sql($sql); + $r=Database::fetch_array($res,0); // if a lob is found if ( strlen ($r['md_lob']) != 0 ) { // we remove it first - pg_lo_unlink($this->cn,$r['md_lob']); + $this->cn->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); + $sql=$this->cn->exec_sql($sql); + $this->cn->commit(); } - /*! - * \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($_ENV['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 @@ -260,42 +217,51 @@ class Document_modele { $r.='<form enctype="multipart/form-data" action="'.$p_action.'" method="post">'; $r.=dossier::hidden(); // we need to add the sub action as hidden - $h=new widget("hidden"); + $h=new IHidden(); $h->name="sa"; $h->value="add_document"; - $r.=$h->IOValue(); + $r.=$h->input(); $r.='<table>'; - $t=new widget("text"); + $t=new IText(); $t->name="md_name"; - $r.="<tr><td> Nom </td><td>".$t->IOValue()."</td>"; + $r.="<tr><td> Nom </td><td>".$t->input()."</td>"; $r.="</tr>"; $r.="<tr><td>Type de document </td>"; - $w=new widget("select"); + $w=new ISelect(); $w->name="md_type"; - $w->value=make_array($this->cn,'select dt_id,dt_value from document_type'); - $r.="<td>".$w->IOValue()."</td></tr>"; + $w->value=$this->cn->make_array('select dt_id,dt_value from document_type'); + $r.="<td>".$w->input()."</td></tr>"; - $f=new widget("file"); + $f=new IFile(); $f->name="doc"; - $r.="<tr><td>fichier</td><td> ".$f->IOValue()."</td></tr>"; + $r.="<tr><td>fichier</td><td> ".$f->input()."</td></tr>"; - $start=new widget("text"); + $start=new IText(); $start->name="start_seq"; $start->size=9; $start->value="0"; - $r.="<tr><td> Numerotation commence a</td><td> ".$start->IOValue()."</td>"; + $r.="<tr><td> Numerotation commence a</td><td> ".$start->input()."</td>"; $r.='<td class="notice">Si vous laissez à 0, la numérotation ne changera pas, la prochaine facture sera n+1, n étant le n° que vous avez donné</td>'; $r.="</tr>"; $r.='</table>'; - $r.=widget::submit('add_document','Ajout'); + $r.=HtmlInput::submit('add_document','Ajout'); $r.="</form></p>"; return $r; } - + /*!\brief load the value of a document_modele,the ag_id variable must be set + */ + function load() { + $array=$this->cn->get_array("SELECT md_id, md_name, md_lob, md_type, md_filename, md_mimetype". + " FROM document_modele where md_id=$1",array($this->md_id)); + if ( count($array) == 0 ) return null; + foreach ( array('md_name', 'md_lob','md_type', 'md_filename', 'md_mimetype') as $idx) { + $this->$idx=$array[0][$idx]; + } + } } ?> diff --git a/include/class_document_type.php b/include/class_document_type.php index 9591aba80..af1767cd4 100644 --- a/include/class_document_type.php +++ b/include/class_document_type.php @@ -43,8 +43,8 @@ class Document_type function get() { $sql="select * from document_type where dt_id=".$this->dt_id; - $R=ExecSql($this->db,$sql); - $r=pg_fetch_array($R,0); + $R=$this->db->exec_sql($sql); + $r=Database::fetch_array($R,0); $this->dt_id=$r['dt_id']; $this->dt_value=$r['dt_value']; } diff --git a/include/class_dossier.php b/include/class_dossier.php index 0c03ad48d..fe59e4c68 100644 --- a/include/class_dossier.php +++ b/include/class_dossier.php @@ -34,7 +34,7 @@ "desc"=>"dos_description"); * */ -require_once('postgres.php'); +require_once('class_database.php'); include_once('debug.php'); require_once('ac_common.php'); @@ -43,7 +43,7 @@ class dossier { "name"=>"dos_name", "desc"=>"dos_description"); function __construct($p_id) { - $this->cn=DbConnect(); // Connect to the repository + $this->cn=new Database(); // Connect to the repository $this->dos_id=$p_id; } /*!\brief return the $_REQUEST['gDossier'] after a check */ @@ -52,11 +52,66 @@ class dossier { self::check(); return $_REQUEST['gDossier']; } + + /*! + * \param 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 + ++*/ + function show_dossier($p_type,$p_first=0,$p_max=10,$p_Num=0) { + $l_user=$_SESSION['g_user']; + if ( $p_max == 0 ) { + $l_step=""; + } else { + $l_step="LIMIT $p_max OFFSET $p_first"; + } + + if ( $p_type == "all") { + $l_sql="select *, 'W' as priv_priv from ac_dossier ORDER BY dos_name "; + $p_Num=$this->cn->count_sql($l_sql); + } else { + $l_sql="select * from jnt_use_dos + natural join ac_dossier + natural join ac_users + inner join priv_user on priv_jnt=jnt_id where + use_login='".$l_user."' and priv_priv !='NO' + order by dos_name "; + $p_Num=$this->cn->count_sql($l_sql); + } + $l_sql=$l_sql.$l_step; + $p_res=$this->cn->exec_sql($l_sql); + + echo_debug('postgres.php',__LINE__,"ShowDossier:".$p_res." Line = $p_Num"); + + $Max=$this->cn->size(); + if ( $Max == 0 ) return null; + for ( $i=0;$i<$Max; $i++) { + $row[]=$this->cn->fetch($p_res); + } + return $row; + } + +/*! + * \brief Return all the users + * as an array + */ +function get_user() { + $sql="select * from ac_users where use_login!='phpcompta'"; + $Res=$this->cn->exec_sql($sql); + $Num=$this->cn->size(); + if ( $Num == 0 ) return null; + for ($i=0;$i < $Num; $i++) { + $User[]=$this->cn->fetch($i); + } + return $User; +} + /*!\brief check if gDossier is set */ static function check() { if ( ! isset ($_REQUEST['gDossier']) ){ echo_error ('Dossier inconnu '); - exit('Dossier invalide'); + exit('Dossier invalide '); } $id=$_REQUEST['gDossier']; if ( is_numeric ($id) == 0 || @@ -84,9 +139,9 @@ class dossier { echo_debug(__FILE__,__LINE__,"get_name"); self::check(); - $cn=DbConnect(); + $cn=new Database(); $id=($id==0)?$_REQUEST['gDossier']:$id; - $name=getDbValue($cn,"select dos_name from ac_dossier where dos_id=$1",array($_REQUEST['gDossier'])); + $name=$cn->get_value("select dos_name from ac_dossier where dos_id=$1",array($_REQUEST['gDossier'])); return $name; } @@ -117,13 +172,13 @@ class dossier { public function update() { if ( strlen(trim($this->dos_name))== 0 ) return; - if ( getDbValue($this->cn,"select count(*) from ac_dossier where dos_name=$1 and dos_id<>$2", + if ( $this->cn->get_value("select count(*) from ac_dossier where dos_name=$1 and dos_id<>$2", array($this->dos_name,$this->dos_id)) !=0 ) return ; $sql="update ac_dossier set dos_name=$1,dos_description=$2 ". " where dos_id = $3"; - $res=ExecSqlParam($this->cn, + $res=$this->cn->exec_sql( $sql, array(trim($this->dos_name), trim($this->dos_description), @@ -135,17 +190,17 @@ class dossier { $sql="select dos_name,dos_description from ac_dossier where dos_id=$1"; - $res=ExecSqlParam($this->cn, + $res=$this->cn->exec_sql( $sql, array($this->dos_id) ); - if ( pg_NumRows($res) == 0 ) return; - $row=pg_fetch_array($res,0); + if ( Database::num_row($res) == 0 ) return; + $row=Database::fetch_array($res,0); foreach ($row as $idx=>$value) { $this->$idx=$value; } } static function get_version($p_cn) { - return getDbValue($p_cn,'select val from version'); + return $p_cn->get_value('select val from version'); } } diff --git a/include/class_extension.php b/include/class_extension.php new file mode 100644 index 000000000..b2e224740 --- /dev/null +++ b/include/class_extension.php @@ -0,0 +1,273 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief the extension class manages the plugins for the security, the access + * the inclusion... + */ + /*!\brief manage the extension, it involves the table extension + * + * Data member + * - $cn database connection + * - $variable : + * - id (extension.ex_id) + * - name (extension.ex_name) + * - code (extension.ex_code) + * - desc (extension.ex_desc) + * - enable (extension.ex_enable) + * - filepath (extension.ex_file) + */ +class Extension +{ + private static $variable=array('id'=>'ex_id', + 'name'=>'ex_name', + 'code'=>'ex_code', + 'desc'=>'ex_desc', + 'enable'=>'ex_enable', + 'filepath'=>'ex_file'); + /*!\brief constructor + *\param a database connextion + */ + function __construct ($p_init) { + $this->cn=$p_init; + $this->ex_id=0; + } + public function get_parameter($p_string) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + return $this->$idx; + } + else + exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'.$p_string); + } + public function set_parameter($p_string,$p_value) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + $this->$idx=$p_value; + } + else + exit (__FILE__.":".__LINE__.'Erreur attribut inexistant '.$p_string); + + + } + public function get_info() { return var_export(self::$variable,true); } + public function verify() { + // Verify that the elt we want to add is correct + if (trim($this->ex_code)=="") throw new Exception('Le code ne peut pas être vide'); + if (trim($this->ex_name)=="") throw new Exception('Le nom ne peut pas être vide'); + + } + /*!\brief call insert for a new plugin or update if the plugin exist */ + public function save() { + if ( $this->get_parameter("id") == 0 ) + $this->insert(); + else + $this->update(); + } + /*!\brief insert a plugin + * \return error = -1 otherwiser the id */ + public function insert() { + if ( $this->verify() != 0 ) return -1; + if ( $this->cn->count_sql('select * from extension where upper(ex_code)=upper($1)', + array($this->ex_code)) > 0) + throw new Exception ('Ce code existe déjà'); + if ( $this->cn->count_sql('select * from extension where upper(ex_name)=upper($1)', + array($this->ex_name)) > 0) + throw new Exception ('Ce nom existe déjà'); + + $sql='INSERT INTO extension( ex_code, ex_desc, ex_file, ex_enable,ex_name) '. + ' VALUES ($1, $2, $3,$4,$5) returning ex_id'; + $res=$this->cn->exec_sql( + $sql, + array($this->ex_code, + $this->ex_desc, + $this->ex_file, + $this->ex_enable, + $this->ex_name) + ); + $this->ex_id=Database::fetch_result($res,0,0); + } + /*!\brief update a plugin + * \return error = -1 otherwiser 0 */ + public function update() { + if ( $this->verify() != 0 ) return -1; + $sql='UPDATE extension '. + 'SET ex_code=$1, ex_desc=$2, ex_file=$3, ex_enable=$4,ex_name=$5 '. + ' WHERE ex_id=$6 '; + $this->cn->exec_sql($sql, + array($this->ex_code, + $this->ex_desc, + $this->ex_file, + $this->ex_enable, + $this->ex_name, + $this->ex_id) + ); + return 0; + } + /*!\brief load a plugin */ + public function load() { + $sql='SELECT ex_id, ex_name,ex_code, ex_desc, ex_file, ex_enable '. + ' FROM extension where ex_id=$1'; + $res=$this->cn->exec_sql($sql,array($this->ex_id)); + if ( Database::num_row($res) == 0 ) return -1; + $row=Database::fetch_array($res,0); + foreach ($row as $idx=>$value) { $this->$idx=$value; } + return 0; + } + /*!\brief delete a plugin */ + public function delete() { + $sql="delete from extension where ex_id=$1"; + $res=$this->cn->exec_sql($sql,array($this->ex_id)); + } + /*!\brief load all the plugin and returns an array + *\param $p_cn database connx + */ + static public function listing($p_cn) { + $sql="SELECT ex_id, ex_name,ex_code, ex_desc, ex_file, ex_enable FROM extension"; + $array=$p_cn->get_array($sql); + return $array; + } + /*!\brief transform an array into a valid object + *\param $array with the value + *\verbatim +code => '' +desc =>'' +enable=>'' +file=>'' +actif=>'' +ex_id=>'' +\endverbatim + *\see ajax_extension.php + */ + function fromArray($p_array) { + $this->ex_id=$p_array['ex_id']; + $this->ex_name=$p_array['name']; + $this->ex_code=$p_array['code']; + $this->ex_desc=$p_array['desc']; + $this->ex_enable=$p_array['enable']; + $this->ex_file=$p_array['file']; + + } + /*!@brief search a extension, the what is the column (extends_code */ + function search($p_what,$p_value) { + switch($p_what) { + case 'code': + $cond=" where ex_code = upper($1) "; + break; + default: + return -1; + } + + $sql="select ex_id from extension $cond"; + $res=$this->cn->get_value($sql, array($p_value)); + if ( $res=="") return -1; + + $this->ex_id=$res; + $this->load(); + + } + /*!\brief return 1 if the user given in parameter can access this extension + * otherwise returns 0 + *\param $p_login the user login + *\return 1 has access, 0 has no access + */ + function can_request($p_login) { + $sql="select use_access from user_sec_extension where ". + "upper(use_login ) = upper($1) and ex_id=$2"; + $ret=$this->cn->get_value($sql,array($p_login,$this->ex_id)); + if ( $this->cn->count() == 0 ) return 0; + if ( $ret=='Y') return 1; + return 0; + } + /*!@brief save the security in the table + *@param $p_array is an array of value + * indices are : + * - "is_" + login + * - value is Y or N + * you must add the value of gDossier +\code +[is_phpcompta]=>N +[gDossier]=>xx +\endcode + */ + function save_security($p_array) { + $d=$p_array['gDossier']; + $cn=new Database($d); + $list_user=User::get_list($d); + for ($i=0;$i<sizeof($list_user);$i++) { + $ix="is_".$list_user[$i]['use_login']; + /* if exist */ + if ( isset($p_array[$ix] )) { + if ( $cn->count_sql("select ex_id from user_sec_extension where use_login=$1 and ex_id=$2" + ,array($list_user[$i]['use_login'],$this->ex_id)) == 0 ) { + /* insert */ + $sql="INSERT INTO user_sec_extension( + ex_id, use_login, use_access) VALUES ($1,$2,$3)"; + $cn->exec_sql($sql,array($this->ex_id,$list_user[$i]['use_login'],$p_array[$ix])); + + }else { + /* update */ + $sql="update user_sec_extension set use_access=$1 where ex_id=$2 and use_login=$3"; + $cn->exec_sql($sql,array($p_array[$ix],$this->ex_id,$list_user[$i]['use_login'])); + } + } + + } + } + /*!@brief make an array of the available plugin for the current user + * @return an array + *@see ISelect + */ + static function make_array($cn) { + $sql="select ex_code as value, ex_name as label from user_sec_extension ". + " join extension using (ex_id) where ex_enable='Y' and use_access='Y' ". + " and use_login=$1"; + $a=$cn->get_array($sql,array($_SESSION['g_user'])); + return $a; + } + /*!\brief test this class + */ + static function test_me() { + $cn=new Database(dossier::id()); + print '<h1>Save</h1>'; + $ext=new Extension($cn); + /* create a plugin */ + $ext->set_parameter('code','test'); + $ext->set_parameter('enable','Y'); + $ext->set_parameter('desc','plugin de test'); + $ext->set_parameter('filepath','test.php'); + $ext->save(); + print '<h1>Show</h1>'; + /* show plugins */ + $res=$cn->get_array('select * from extension'); + print_r($res); + /* delete plugin */ + print '<h1>Load</h1>'; + $ext->load(); + print_r($ext); + print '<h1>Delete</h1>'; + $ext->delete(); + } + +} + +/* test::test_me(); */ diff --git a/include/class_fiche.php b/include/class_fiche.php index f7f5bcd12..d8ce4b893 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -22,15 +22,21 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr include_once("class_attribut.php"); +require_once("class_ispan.php"); +require_once("class_itva.php"); +require_once("class_itext.php"); +require_once("class_ihidden.php"); require_once('class_fiche_def.php'); -require_once('class_widget.php'); +require_once('class_iposte.php'); + /*! \file * \brief define Class fiche, this class are using * class attribut */ /*! * \brief define Class fiche and fiche def, those class are using - * class attribut + * class attribut. When adding or modifing new card in a IPOPUP + * the ipopup for the accounting item is ipop_account */ //----------------------------------------------------- @@ -51,10 +57,11 @@ class fiche { } /*! get_by_qcode($p_qcode) * \brief Retrieve a card thx his quick_code - * complete the object,, set the id member of the object + * complete the object,, set the id member of the object or set it + * to 0 if no card is found * \param $p_qcode quick_code (ad_id=23) * \param $p_all retrieve all the attribut of the card, possible value - * are true, false retrieve only the f_id + * are true, false retrieves only the f_id * \return 0 success 1 error not found */ @@ -62,17 +69,15 @@ class fiche { { if ( $p_qcode == null ) $p_qcode=$this->quick_code; - - $p_qcode=FormatString($p_qcode); + $p_qcode=trim($p_qcode); $sql="select f_id from jnt_fic_att_value join attr_value - using (jft_id) where ad_id=23 and av_text=upper('".$p_qcode."')"; - $Res=ExecSql($this->cn,$sql); - $r=pg_fetch_all($Res); - echo_debug('fiche',__LINE__,'result:'.var_export($r,true).'size '.sizeof($r)); - - if ( $r == null ) + using (jft_id) where ad_id=23 and av_text=upper($1)"; + $this->id=$this->cn->get_value($sql,array($p_qcode)); + if ( $this->cn->count()==0) { + $this->id=0; return 1; - $this->id=$r[0]['f_id']; + } + echo_debug('class_fiche',__LINE__,'f_id = '.$this->id); if ( $p_all ) @@ -96,11 +101,11 @@ class fiche { join attr_def on (attr_def.ad_id=jnt_fic_att_value.ad_id) where f_id=".$this->id. " order by jnt_order"; - $Ret=ExecSql($this->cn,$sql); - if ( ($Max=pg_NumRows($Ret)) == 0 ) + $Ret=$this->cn->exec_sql($sql); + if ( ($Max=Database::num_row($Ret)) == 0 ) return ; for ($i=0;$i<$Max;$i++) { - $row=pg_fetch_array($Ret,$i); + $row=Database::fetch_array($Ret,$i); $this->fiche_def=$row['fd_id']; $t=new Attribut ($row['ad_id']); $t->ad_text=$row['ad_text']; @@ -173,9 +178,9 @@ class fiche { " and vw_name ~* '$p_search'"; } - $Ret=ExecSql($this->cn,$sql.$p_sql); + $Ret=$this->cn->exec_sql($sql.$p_sql); - return pg_NumRows($Ret) ; + return Database::num_row($Ret) ; } /*! ************************************************** @@ -207,13 +212,13 @@ class fiche { } - $Ret=ExecSql($this->cn,$sql); - if ( ($Max=pg_NumRows($Ret)) == 0 ) + $Ret=$this->cn->exec_sql($sql); + if ( ($Max=Database::num_row($Ret)) == 0 ) return ; $all[0]=new fiche($this->cn); for ($i=0;$i<$Max;$i++) { - $row=pg_fetch_array($Ret,$i); + $row=Database::fetch_array($Ret,$i); $t=new fiche($this->cn,$row['f_id']); $t->getAttribut(); $all[$i]=$t; @@ -247,8 +252,8 @@ class fiche { // 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=".FormatString($this->id)." and ad_id=".$p_ad_id; - $Res=ExecSql($this->cn,$sql); - $row=pg_fetch_all($Res); + $Res=$this->cn->exec_sql($sql); + $row=Database::fetch_all($Res); // if not found return error if ( $row == false ) return ' - ERROR -'; @@ -263,8 +268,49 @@ class fiche { } return '- ERROR -'; } + /*!\brief make an array of attributes of the category of card (FICHE_DEF.FD_ID) + *The array can be used with the function insert, it will return a struct like this : + * in the first key (av_textX), X is the ATTR_DEF::AD_ID +\verbatim +Example +Array +( + [av_text1] => Nom + [av_text12] => Personne de contact + [av_text5] => Poste Comptable + [av_text13] => numéro de tva + [av_text14] => Adresse + [av_text15] => code postal + [av_text24] => Ville + [av_text16] => pays + [av_text17] => téléphone + [av_text18] => email + [av_text23] => Quick Code +) + +\endverbatim + *\param $pfd_id FICHE_DEF::FD_ID + *\return an array of attribute + *\exception Exception if the cat of card doesn't exist, Exception.getCode()=1 + *\see fiche::insert() + */ + function toArray($pfd_id) { + $sql="select 'av_text'||to_char(ad_id,'9999') as key,". + " ad_text ". + " from fiche_def join jnt_fic_attr using (fd_id)". + " join attr_def using (ad_id) ". + " where fd_id=$1 order by jnt_order"; + $ret=$this->cn->get_array($sql,array($pfd_id)); + if ( empty($ret)) throw new Exception(_('Cette categorie de card n\'existe pas').' '.$pfd_id,1); + $array=array(); + foreach($ret as $idx=>$val) { + $a=str_replace(' ','',$val['key']); + $array[$a]=$val['ad_text']; + } + return $array; + + } /*! - ************************************************** * \brief insert a new record * show a blank card to be filled * @@ -284,59 +330,64 @@ class fiche { $msg=""; if ( $attr->ad_id == ATTR_DEF_ACCOUNT) { - $r.=JS_SEARCH_POSTE; - $w=new widget("js_search_poste"); + $w=new IPoste("av_text".$attr->ad_id); + $w->set_attribute('ipopup','ipop_account'); + $w->set_attribute('account',"av_text".$attr->ad_id); // 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); - $label=new widget("span"); + $ret_sql=$this->cn->exec_sql($sql); + $a=Database::fetch_array($ret_sql,0); + $label=new ISpan(); $label->name="av_text".$attr->ad_id."_label"; if ( $a['account_auto'] == 't' ) - $msg.="<TD>".$label->IOValue()."<br> <font color=\"red\">Rappel: Poste créé automatiquement !</font></TD> "; + $msg.="<TD>".$label->input()."<br> <font color=\"red\">"._("Rappel: Poste créé automatiquement à partir de ").$f->class_base." </font></TD> "; else { // if there is a class base in fiche_def_ref, this account will be the // the default one if ( strlen(trim($f->class_base)) != 0 ) { - $msg.="<TD>".$label->IOValue()."<br> <font color=\"red\">Rappel: Poste par défaut sera ". + $msg.="<TD>".$label->input()."<br> <font color=\"red\">"._("Rappel: Poste par défaut sera "). $f->class_base. " !</font></TD> "; + $w->value=$f->class_base; } } - - + $r.="<TR>".td("Poste Comptable","input_text").td($w->input())."$msg </TR>"; + continue; } elseif ( $attr->ad_id == ATTR_DEF_TVA) { $r.=JS_SHOW_TVA; - $w=new widget("js_tva"); + $w=new ITva(); } elseif ( $attr->ad_id == ATTR_DEF_COMPANY ) { - $r.=JS_SEARCH_CARD; - $w=new widget("js_search"); + $r.=JS_LEDGER; + $w=new ICard(); // 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"); + $sql=' select fd_id from fiche_def where frd_id in ('.FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX.')'; + $filter=$this->cn->make_list($sql); + $w->extra=$filter; + $w->extra2=0; + $label=new ISpan(); $label->name="av_text".$attr->ad_id."_label"; - $msg=$label->IOValue(); + $msg=$label->input(); + } else { - $w=new widget("text"); + $w=new IText(); } $w->table=1; $w->label=$attr->ad_text; $w->name="av_text".$attr->ad_id; - $r.="<TR>".$w->IOValue()."$msg </TR>"; + $r.="<TR>".td($w->label,"input_text").$w->input()."$msg </TR>"; } $r.= '</table>'; return $r; @@ -344,7 +395,6 @@ class fiche { /*! - ************************************************** * \brief Display object instance, getAttribute * sort the attribute and add missing ones * \param $p_readonly true= if can not modify, otherwise false @@ -364,102 +414,112 @@ class fiche { foreach ( $attr as $r) { $msg=""; + $bulle=""; if ( $p_readonly) { - $w=new widget("text"); + $w=new IText(); + $w->table=1; + $w->readOnly=true; + } if ($p_readonly==false) { + if ( $r->ad_id == ATTR_DEF_ACCOUNT) { - $ret.=JS_SEARCH_POSTE; - $w=new widget("js_search_poste"); + $w=new IPoste("av_text".$r->ad_id); + $w->set_attribute('ipopup','ipop_account'); + $w->set_attribute('account',"av_text".$r->ad_id); + // account created automatically + $w->table=1; // 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); - $msg='<tD><span id="'.$r->ad_id.'_label"></span></td>'; + $ret_sql=$this->cn->exec_sql($sql); + $a=Database::fetch_array($ret_sql,0); + $bulle=HtmlInput::infobulle(10); if ( $a['account_auto'] == 't' ) - $msg.="<TD> <font color=\"red\">si vide le Poste sera créé automatiquement</font> </TD> "; - $msg.="<td><font color=\"red\">ATTENTION changer le poste comptable d'une fiche modifiera toutes les opérations où cette fiche est utilisée</font></td>"; + $bulle.=HtmlInput::warnbulle(11); + } elseif ( $r->ad_id == ATTR_DEF_TVA) { $ret.=JS_SHOW_TVA; - $w=new widget("js_tva"); + $w=new ITva(); + $w->table=1; + } elseif ( $r->ad_id == ATTR_DEF_COMPANY ) { - $ret.=JS_SEARCH_CARD; - $w=new widget("js_search"); + $ret.=JS_LEDGER; + $w=new ISearch(); // 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"); + $w->table=1; + + $label=new ISpan(); $label->name="av_text".$r->ad_id."_label"; - $msg=$label->IOValue(); + $msg=$label->input(); } else { - $w=new widget("text"); + $w=new IText(); + $w->table=1; } } - $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.="<TR>".$w->IOValue()."$msg </TR>"; + $ret.="<TR>".td($r->ad_text.$bulle).$w->input()."$msg </TR>"; } $ret.="</table>"; return $ret; } /*! - ************************************************** - * \brief Save a card, call insert or update - * - * \param p_fiche_def (default 0) - */ + * \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(); + { + // 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 * \param p_array is the array containing the data */ function insert($p_fiche_def,$p_array=null) - { - if ( $p_array == null) - $p_array=$_POST; - - $fiche_id=NextSequence($this->cn,'s_fiche'); - $this->id=$fiche_id; - // first we create the card - StartSql($this->cn); - try - { - - $sql=sprintf("insert into fiche(f_id,fd_id)". - " values (%d,%d)", - $fiche_id,$p_fiche_def); - $Ret=ExecSql($this->cn,$sql); + { + if ( $p_array == null) + $p_array=$_POST; + + $fiche_id=$this->cn->get_next_seq('s_fiche'); + $this->id=$fiche_id; + // first we create the card + $this->cn->start(); + try + { + $sql=sprintf("insert into fiche(f_id,fd_id)". + " values (%d,%d)", + $fiche_id,$p_fiche_def); + $Ret=$this->cn->exec_sql($sql); // parse the $p_array array foreach ($p_array as $name=>$value ) { echo_debug ("class_fiche",__LINE__,"Name = $name value $value") ; + /* avoid the button for searching an accounting item */ + if ( $name=='av_text5_bt') continue; list ($id) = sscanf ($name,"av_text%d"); if ( $id == null ) continue; echo_debug("class_fiche",__LINE__,"add $id"); @@ -471,16 +531,15 @@ class fiche { echo_debug("Modify ATTR_DEF_QUICKCODE"); $sql=sprintf("select insert_quick_code(%d,'%s')", $fiche_id,FormatString($value)); - ExecSql($this->cn,$sql); + $this->cn->exec_sql($sql); continue; } // stock if ( $id == ATTR_DEF_STOCK ) { - $st=CountSql($this->cn,'select * from stock_goods where '. + $st=$this->cn->count_sql('select * from stock_goods where '. " upper(sg_code)=upper('$value')"); if ( $st == 0 ) { $user=new User($this->cn); - $exercice=$user->get_exercice(); if ( $exercice == 0 ) throw new Exception ('Veuillez choisir une période dans vos préférences ',1); $str_stock=sprintf('insert into stock_goods(f_id,sg_quantity,sg_comment,sg_code,sg_type,sg_exercice) '. @@ -490,7 +549,7 @@ class fiche { FormatString($value), $exercice); - ExecSql($this->cn,$str_stock); + $this->cn->exec_sql($str_stock); } } // name @@ -519,7 +578,8 @@ class fiche { $sql=sprintf("select account_insert(%d,null)", $this->id); } - ExecSql($this->cn,$sql); + $this->cn->exec_sql($sql); + echo_debug(__FILE__,__LINE__,$sql); } catch (Exception $e) { throw new Exception ("Erreur : ce compte [$v] n'a pas de compte parent.". "L'opération est annulée", @@ -534,7 +594,7 @@ class fiche { // 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) + if ( $this->cn->count_sql("select * from tva_rate where tva_id=".$value) == 0) { echo_debug("class_fiche",__LINE__,"Tva invalide $value"); continue; @@ -544,7 +604,7 @@ class fiche { // 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) ". + $exist=$this->cn->count_sql("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)."'"); @@ -558,22 +618,21 @@ class fiche { $sql=sprintf("select attribut_insert(%d,%d,'%s')", $fiche_id,$id,trim($value2)); - ExecSql($this->cn,$sql); + $this->cn->exec_sql($sql); } } catch (Exception $e) { - Rollback($this->cn); + $this->cn->rollback(); throw ($e); return; } - Commit($this->cn); + $this->cn->commit(); return; } /*!\brief update a card - * \todo add a check to return an error and rollback operation */ function update($p_array=null) { @@ -581,7 +640,7 @@ class fiche { $p_array=$_POST; try { - StartSql($this->cn); + $this->cn->start(); // parse the $p_array array foreach ($p_array as $name=>$value ) { @@ -592,23 +651,23 @@ class fiche { // 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 ) { + $Ret=$this->cn->exec_sql($sql); + if ( Database::num_row($Ret) != 1 ) { // we need to insert this new attribut echo_debug ("class_fiche ".__LINE__." adding id !!! "); - $jft_id=NextSequence($this->cn,'s_jnt_fic_att_value'); + $jft_id=$this->cn->get_next_seq('s_jnt_fic_att_value'); $sql2=sprintf("insert into jnt_fic_att_value(jft_id,ad_id,f_id) values (%s,%s,%s)", $jft_id,$id,$this->id); - $ret2=ExecSql($this->cn,$sql2); + $ret2=$this->cn->exec_sql($sql2); // insert a null value for this attribut $sql3=sprintf("insert into attr_value(jft_id,av_text) values (%s,null)", $jft_id); - $ret3=ExecSql($this->cn,$sql3); + $ret3=$this->cn->exec_sql($sql3); } else { - $tmp=pg_fetch_array($Ret,0); + $tmp=Database::fetch_array($Ret,0); $jft_id=$tmp['jft_id']; } // Special traitement @@ -618,7 +677,7 @@ class fiche { echo_debug("Modify ATTR_DEF_QUICKCODE"); $sql=sprintf("select update_quick_code(%d,'%s')", $jft_id,FormatString($value)); - ExecSql($this->cn,$sql); + $this->cn->exec_sql($sql); continue; } // name @@ -631,12 +690,12 @@ class fiche { } if ( $id == ATTR_DEF_STOCK ) { - $st=CountSql($this->cn,'select * from stock_goods where '. + $st=$this->cn->count_sql('select * from stock_goods where '. " f_id=".$this->id); if ( $st == 0 ) { $user=new User($this->cn); $exercice=$user->get_exercice(); - if ( $exercice == 0 ) throw Exception ('Annee invalide erreur'); + if ( $exercice == 0 ) throw new Exception ('Annee invalide erreur'); $str_stock=sprintf('insert into stock_goods(f_id,sg_quantity,sg_comment,sg_code,sg_type,sg_exercice) '. ' values (%d,0,\'%s\',upper(\'%s\'),\'d\',\'%s\')', @@ -645,12 +704,12 @@ class fiche { FormatString($value), $exercice); - ExecSql($this->cn,$str_stock); + $this->cn->exec_sql($str_stock); }else { $str_stock=sprintf("update stock_goods set sg_code=upper('%s') where f_id=%d", FormatString($value), $this->id); - ExecSql($this->cn,$str_stock); + $this->cn->exec_sql($str_stock); } } @@ -665,10 +724,10 @@ class fiche { $sql=sprintf("select account_update(%d,%d)", $this->id,$v); try { - ExecSql($this->cn,$sql); + $this->cn->exec_sql($sql); /* update also the jrnx */ $sql='update jrnx set j_poste=$1 where j_qcode in (select quick_code from vw_fiche_attr where f_id=$2)'; - ExecSqlParam($this->cn, + $this->cn->exec_sql( $sql, array($v,$this->id)); @@ -684,11 +743,11 @@ class fiche { $sql=sprintf("select account_update(%d,null)", $this->id); try { - $Ret=ExecSql($this->cn,$sql); + $Ret=$this->cn->exec_sql($sql); /* update also the jrnx */ $sql='update jrnx set j_poste=$1 where j_qcode in (select quick_code from vw_fiche_attr where f_id=$2)'; - ExecSqlParam($this->cn, + $this->cn->exec_sql( $sql, array($v,$this->id)); @@ -707,7 +766,7 @@ class fiche { // 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) + if ( $this->cn->count_sql("select * from tva_rate where tva_id=".$value) == 0) { echo_debug("class_fiche",__LINE__,"Tva invalide $value"); continue; @@ -716,7 +775,7 @@ class fiche { } if ( $id == ATTR_DEF_COMPANY ) { - $exist=CountSql($this->cn,"select f_id from fiche join fiche_def using (fd_id) ". + $exist=$this->cn->count_sql("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)."'"); @@ -732,16 +791,16 @@ class fiche { $value2=FormatString($value); $sql=sprintf("update attr_value set av_text='%s' where jft_id=%d", trim($value2),$jft_id); - ExecSql($this->cn,$sql); + $this->cn->exec_sql($sql); } } catch (Exception $e ) { echo '<span class="error">'. $e->getMessage(). '</span>'; - Rollback($this->cn); + $this->cn->rollback(); return; } - Commit($this->cn); + $this->cn->commit(); return; } @@ -760,9 +819,9 @@ class fiche { // if the card is used do not removed it $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); - if ( CountSql($this->cn,"select * from jrnx where j_qcode='".pg_escape_string($qcode)."'") != 0) + if ( $this->cn->count_sql("select * from jrnx where j_qcode='".Database::escape_string($qcode)."'") != 0) { - echo "<SCRIPT> alert('Impossible cette fiche est utilisée dans un journal'); </SCRIPT>"; + alert('Impossible cette fiche est utilisée dans un journal'); return; } @@ -771,18 +830,18 @@ class fiche { $class=$this->strAttribut(ATTR_DEF_ACCOUNT); $is_used_jrnx=0; if ( trim(strlen($class)) != 0 && isNumber($class) == 1 ) - $is_used_jrnx= CountSql($this->cn,"select * from jrnx where j_poste=$class"); + $is_used_jrnx= $this->cn->count_sql("select * from jrnx where j_poste=$class"); // if class is not NULL and if we use it before, we can't remove it if (FormatString($class) != null && $is_used_jrnx != 0 ) { - echo "<SCRIPT> alert('Impossible ce poste est utilisée dans un journal'); </SCRIPT>"; + alert('Impossible ce poste est utilisée dans un journal'); return; } else // Remove in PCMN if ( trim(strlen($class)) != 0 && isNumber($class) == 1 && $is_used_jrnx == 0) { - ExecSql($this->cn,"delete from tmp_pcmn where pcm_val=$class"); + $this->cn->exec_sql("delete from tmp_pcmn where pcm_val=$class"); } } @@ -791,13 +850,14 @@ class fiche { /*!\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); + $Res=$this->cn->exec_sql($sql); + $r=Database::fetch_all($Res); if ( sizeof($r) == 0 ) return 1; return $r[0]['av_text']; @@ -810,8 +870,8 @@ class fiche { { $sql="select av_text from jnt_fic_att_value join attr_value using (jft_id) where ad_id=23 and f_id=".$this->id; - $Res=ExecSql($this->cn,$sql); - $r=pg_fetch_all($Res); + $Res=$this->cn->exec_sql($sql); + $r=Database::fetch_all($Res); if ( sizeof($r) == 0 ) return null; return $r[0]['av_text']; @@ -839,12 +899,65 @@ class fiche { */ function get_fiche_def_ref_id() { - $result=get_array($this->cn,"select frd_id from fiche join fiche_Def using (fd_id) where f_id=".$this->id); + $result=$this->cn->get_array("select frd_id from fiche join fiche_Def using (fd_id) where f_id=".$this->id); if ( $result == null ) return null; return $result[0]['frd_id']; } + /** + *@brief fetch and return and array + *@see get_row get_row_date + */ + private function get_row_result($res) { + $array=array(); + $tot_cred=0.0; + $tot_deb=0.0; + $Max=Database::num_row($res); + if ( $Max == 0 ) return null; + for ($i=0;$i<$Max;$i++) { + $array[]=Database::fetch_array($res,$i); + if ($array[$i]['j_debit']=='t') { + $tot_deb+=$array[$i]['deb_montant'] ; + } else { + $tot_cred+=$array[$i]['cred_montant'] ; + } + } + $this->row=$array; + return array($array,$tot_deb,$tot_cred); + } + /*! + * \brief Get data for poste + * + * \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 get_row_date($p_from,$p_to) + { + if ( $this->id == 0 ) + { + echo_error("class_fiche",__LINE__,"id is 0"); + return; + } + $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); + + $Res=$this->cn->exec_sql("select j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_qcode,". + "case when j_debit='t' then j_montant else 0 end as deb_montant,". + "case when j_debit='f' then j_montant else 0 end as cred_montant,". + " jr_comment as description,jrn_def_name as jrn_name,". + "j_debit, jr_internal,jr_id ". + " from jrnx left join jrn_def on jrn_def_id=j_jrn_def ". + " left join jrn on jr_grpt_id=j_grpt". + " where j_qcode=$1 and ". + " ( to_date($2,'DD.MM.YYYY') <= j_date and ". + " to_date($3,'DD.MM.YYYY') >= j_date )". + " order by j_date",array($qcode,$p_from,$p_to)); + + return $this->get_row_result($Res); + } /*! * \brief Get data for poste @@ -865,7 +978,7 @@ class fiche { $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); $periode=sql_filter_per($this->cn,$p_from,$p_to,'p_id','jr_tech_per'); - $Res=ExecSql($this->cn,"select to_char(j_date,'DD.MM.YYYY') as j_date,j_qcode,". + $Res=$this->cn->exec_sql("select j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_qcode,". "case when j_debit='t' then j_montant else 0 end as deb_montant,". "case when j_debit='f' then j_montant else 0 end as cred_montant,". " jr_comment as description,jrn_def_name as jrn_name,". @@ -874,21 +987,8 @@ class fiche { " left join jrn on jr_grpt_id=j_grpt". " where j_qcode='".$qcode."' and ".$periode. " order by j_date::date"); - $array=array(); - $tot_cred=0.0; - $tot_deb=0.0; - $Max=pg_NumRows($Res); - if ( $Max == 0 ) return null; - for ($i=0;$i<$Max;$i++) { - $array[]=pg_fetch_array($Res,$i); - if ($array[$i]['j_debit']=='t') { - $tot_deb+=$array[$i]['deb_montant'] ; - } else { - $tot_cred+=$array[$i]['cred_montant'] ; - } - } - $this->row=$array; - return array($array,$tot_deb,$tot_cred); + return $this->get_row_result($Res); + } /*! * \brief HtmlTable, display a HTML of a card for the asked period @@ -901,7 +1001,7 @@ class fiche { $name=$this->getName(); - list($array,$tot_deb,$tot_cred)=$this->get_row( $p_array['from_periode'], + list($array,$tot_deb,$tot_cred)=$this->get_row_date( $p_array['from_periode'], $p_array['to_periode'] ); @@ -958,7 +1058,7 @@ class fiche { $name=h($this->getName()); - list($array,$tot_deb,$tot_cred)=$this->get_row( $p_array['from_periode'], + list($array,$tot_deb,$tot_cred)=$this->get_row_date( $p_array['from_periode'], $p_array['to_periode'] ); @@ -980,7 +1080,7 @@ class fiche { foreach ( $this->row as $op ) { echo "<TR>". "<TD>".$op['jr_internal']."</TD>". - "<TD>".$op['j_date']."</TD>". + "<TD>".$op['j_date_fmt']."</TD>". "<TD>".h($op['description'])."</TD>". "<TD>".$op['deb_montant']."</TD>". "<TD>".$op['cred_montant']."</TD>". @@ -1011,41 +1111,40 @@ class fiche { if ( $p_array == null) $p_array=$_REQUEST; - $submit=new widget(); - $hid=new widget("hidden"); + $hid=new IHidden(); echo '<div class="noprint">'; echo "<table >"; echo '<TR>'; echo '<TD><form method="GET" ACTION="">'. - widget::submit('bt_other',"Autre poste"). + HtmlInput::submit('bt_other',"Autre poste"). dossier::hidden(). - $hid->IOValue("type","poste").$hid->IOValue('p_action','impress')."</form></TD>"; + $hid->input("type","poste").$hid->input('p_action','impress')."</form></TD>"; echo '<TD><form method="POST" ACTION="quick_code_pdf.php">'. - widget::submit('bt_pdf',"Export PDF"). + HtmlInput::submit('bt_pdf',"Export PDF"). dossier::hidden(). - $hid->IOValue("type","poste"). - $hid->IOValue('p_action','impress'). - $hid->IOValue("f_id",$this->id). + $hid->input("type","poste"). + $hid->input('p_action','impress'). + $hid->input("f_id",$this->id). dossier::hidden(). - $hid->IOValue("from_periode",$p_array['from_periode']). - $hid->IOValue("to_periode",$p_array['to_periode']); + $hid->input("from_periode",$p_array['from_periode']). + $hid->input("to_periode",$p_array['to_periode']); if (isset($p_array['oper_detail'])) - echo $hid->IOValue('oper_detail','on'); + echo $hid->input('oper_detail','on'); echo "</form></TD>"; echo '<TD><form method="POST" ACTION="quick_code_csv.php">'. - widget::submit('bt_csv',"Export CSV"). + HtmlInput::submit('bt_csv',"Export CSV"). dossier::hidden(). - $hid->IOValue("type","poste"). - $hid->IOValue('p_action','impress'). - $hid->IOValue("f_id",$this->id). - $hid->IOValue("from_periode",$p_array['from_periode']). - $hid->IOValue("to_periode",$p_array['to_periode']); + $hid->input("type","poste"). + $hid->input('p_action','impress'). + $hid->input("f_id",$this->id). + $hid->input("from_periode",$p_array['from_periode']). + $hid->input("to_periode",$p_array['to_periode']); if (isset($p_array['oper_detail'])) - echo $hid->IOValue('oper_detail','on'); + echo $hid->input('oper_detail','on'); echo "</form></TD>"; echo "</table>"; @@ -1063,7 +1162,7 @@ function get_solde_detail($p_cond="") { $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); if ( $p_cond != "") $p_cond=" and ".$p_cond; - $Res=ExecSql($this->cn,"select sum(deb) as sum_deb, sum(cred) as sum_cred from + $Res=$this->cn->exec_sql("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, case when j_debit='f' then j_montant else 0 end as cred @@ -1072,9 +1171,9 @@ function get_solde_detail($p_cond="") { j_qcode = ('$qcode'::text) $p_cond ) as m "); - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); if ($Max==0) return 0; - $r=pg_fetch_array($Res,0); + $r=Database::fetch_array($Res,0); return array('debit'=>$r['sum_deb'], 'credit'=>$r['sum_cred'], @@ -1092,14 +1191,98 @@ function empty_attribute($p_attr) { left join attr_def using (ad_id) where f_id=".$this->id. " and ad_id = ".$p_attr. " order by ad_id"; - $res=ExecSql($this->cn,$sql); - if ( pg_NumRows($res) == 0 ) return true; - $text=pg_fetch_result($res,0,0); + $res=$this->cn->exec_sql($sql); + if ( Database::num_row($res) == 0 ) return true; + $text=Database::fetch_result($res,0,0); return (strlen(trim($text)) > 0)?false:true; } +/*! Summary + * \brief show the default screen + * + * \param p_search (filter) + * \param p_action show the action column + * + * \return: string to display + */ + function Summary($p_search="",$p_action="") + { + $str_dossier=dossier::get(); + $p_search=FormatString($p_search); + $script=$_SERVER['PHP_SELF']; + // Creation of the nav bar + // Get the max numberRow + $all_tiers=$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_tiers,$_SESSION['g_pagesize'],$page); + // set a filter ? + $search=""; + $user=new User($this->cn); + $exercice=$user->get_exercice(); + $tPeriode=new Periode($this->cn); + list($max,$min)=$tPeriode->get_limit($exercice); + + + 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_tiers=$this->GetAll($offset,$search); + if ( $all_tiers == 0 ) return ""; + $r=$bar; + $r.='<table width="95%"> +<TR style="background-color:lightgrey;"> +<TH>Quick Code</TH> +<th>Nom</th> +<th>Adresse</th> +<th>Total débit</th> +<th>Total crédit</th> +<th>Solde</th>'; +$r.='</TR>'; + echo_debug(__FILE__,__LINE__,$step_tiers); + if ( sizeof ($step_tiers ) == 0 ) + return $r; + foreach ($step_tiers as $tiers ) { + $r.="<TR>"; + $e=sprintf('<A HREF="%s?p_action=%s&sb=detail&f_id=%d&%s&sc=sv" title="Détail"> ', + $script,$p_action,$tiers->id,$str_dossier); + + $r.="<TD> $e".$tiers->strAttribut(ATTR_DEF_QUICKCODE)."</A></TD>"; + $r.="<TD>".h($tiers->strAttribut(ATTR_DEF_NAME))."</TD>"; + $r.="<TD>".h($tiers->strAttribut(ATTR_DEF_ADRESS). + " ".$tiers->strAttribut(ATTR_DEF_CP). + " ".$tiers->strAttribut(ATTR_DEF_PAYS)). + "</TD>"; + + + /* Filter on the default year */ + $User=new User($this->cn); + $filter_year=" j_tech_per in (select p_id from parm_periode ". + "where p_exercice='".$User->get_exercice()."')"; + $a=$tiers->get_solde_detail($filter_year); + + $r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['debit']); + $r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['credit']); + $r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['solde']); + + + $r.="</TR>"; + + } + $r.="</TABLE>"; + $r.=$bar; + return $r; + } /*! * \brief get the fd_id of the card : fd_id, it set the attribute fd_id */ @@ -1107,7 +1290,7 @@ function empty_attribute($p_attr) { { if ( $this->id == 0 ) exit('class_fiche : f_id = 0 '); $sql='select fd_id from fiche where f_id='.$this->id; - $R=getDbValue($this->cn,$sql); + $R=$this->cn->get_value($sql); if ( $R == "" ) $this->fd_id=0; else @@ -1157,22 +1340,22 @@ function belong_ledger($p_jrn,$p_type="") $get='jrn_def_fiche_cred'; } if ( $get != "" ) { - $Res=ExecSql($this->cn,"select $get as fiche from jrn_def where jrn_def_id=$p_jrn"); + $Res=$this->cn->exec_sql("select $get as fiche from jrn_def where jrn_def_id=$p_jrn"); } else { // Get all the fiche type (deb and cred) - $Res=ExecSql($this->cn," select jrn_def_fiche_cred as fiche + $Res=$this->cn->exec_sql(" select jrn_def_fiche_cred as fiche from jrn_def where jrn_def_id=$p_jrn union select jrn_def_fiche_deb from jrn_def where jrn_def_id=$p_jrn" ); } - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); if ( $Max==0) { return -2; } /* convert the array to a string */ - $list=pg_fetch_all($Res); + $list=Database::fetch_all($Res); $str_list=""; $comma=''; foreach ($list as $row) { @@ -1192,8 +1375,8 @@ function belong_ledger($p_jrn,$p_type="") where fd_id in (".$str_list.") and f_id= ".$this->id; - $Res=ExecSql($this->cn,$sql); - $Max=pg_NumRows($Res); + $Res=$this->cn->exec_sql($sql); + $Max=Database::num_row($Res); if ($Max==0 ) return 0; else @@ -1206,7 +1389,7 @@ function belong_ledger($p_jrn,$p_type="") */ static function get_fiche_def($p_cn,$pFd_id) { $sql='select f_id from fiche where fd_id=$1'; - $array=get_array($p_cn,$sql,array($pFd_id)); + $array=$p_cn->get_array($sql,array($pFd_id)); if ( empty ($array) ) return null; foreach ($array as $ret ) { $r[]=new fiche($p_cn,$ret['f_id']); @@ -1220,23 +1403,99 @@ function is_used() { /* retrieve first the quickcode */ $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); $sql='select count(*) as c from jrnx where j_qcode=$1'; - $count=getDbValue($this->cn,$sql,array($qcode)); + $count=$this->cn->get_value($sql,array($qcode)); if ( $count == 0 ) return false; return true; } /*\brief remove a card without verification */ function delete() { // Remove from attr_value - $Res=ExecSql($this->cn,"delete from attr_value + $Res=$this->cn->exec_sql("delete from attr_value where jft_id in (select jft_id from jnt_fic_att_value natural join fiche where f_id=".$this->id.")"); // Remove from jnt_fic_att_value - $Res=ExecSql($this->cn,"delete from jnt_fic_att_value where f_id=".$this->id); + $Res=$this->cn->exec_sql("delete from jnt_fic_att_value where f_id=".$this->id); // Remove from fiche - $Res=ExecSql($this->cn,"delete from fiche where f_id=".$this->id); + $Res=$this->cn->exec_sql("delete from fiche where f_id=".$this->id); } + /*!\brief create the sql statement for retrieving all + * the card + *\return string with sql statement + *\param $array contains the condition +\verbatim + [jrn] => 2 + [typecard] => cred / deb / filter or list + [query] => string +\endverbatim + *\note the typecard cred, deb or filter must be used with jrn, the value of list means a list of fd_id + *\see ajax_card.php cards.js + */ + function build_sql($array) { + if ( ! empty($array) ) extract($array); + $and=''; + $filter_fd_id='true'; + $filter_query=''; + if ( isset($typecard)) { + switch($typecard) { + case 'cred': + if ( ! isset($jrn)) throw ('Erreur pas de valeur pour jrn'); + $filter_jrn=$this->cn->make_list("select jrn_def_fiche_cred from jrn_Def where jrn_def_id=$1",array($jrn)); + $filter_fd_id=" fd_id in (".$filter_jrn.")"; + $and=" and "; + break; + case 'deb': + if ( ! isset($jrn)) throw ('Erreur pas de valeur pour jrn'); + $filter_jrn=$this->cn->make_list("select jrn_def_fiche_deb from jrn_Def where jrn_def_id=$1",array($jrn)); + $filter_fd_id=" fd_id in (".$filter_jrn.")"; + $and=" and "; + break; + case 'filter': + if ( ! isset($jrn)) throw ('Erreur pas de valeur pour jrn'); + $filter_jrn=$this->cn->make_list("select jrn_def_fiche_deb from jrn_Def where jrn_def_id=$1",array($jrn)); + $fp1=" fd_id in (".$filter_jrn.")"; + $filter_jrn=$this->cn->make_list("select jrn_def_fiche_cred from jrn_Def where jrn_def_id=$1",array($jrn)); + $fp2=" fd_id in (".$filter_jrn.")"; + + $filter_fd_id='('.$fp1.' or '.$fp2.')'; + $and=" and "; + break; + case 'all': + $filter_fd_id=' true'; + break; + default: + $filter_fd_id=' fd_id in ('.$typecard.')'; + } + } + + $and=" and "; + if (isset($query)){ + $query=FormatString($query); + $filter_query=$and."(vw_name ilike '%$query%' or quick_code ilike ('%$query%') or vw_description ilike '%$query%')"; + } + $sql="select * from vw_fiche_attr where ".$filter_fd_id.$filter_query; + return $sql; + + } + static function test_me() { + $cn=new Database(dossier::id()); + $a=new Fiche($cn); + $select_cat=new ISelect('fd_id'); + $select_cat->value=$cn->make_array('select fd_id,fd_label from fiche_def where frd_id='. + FICHE_TYPE_CLIENT); + echo '<FORM METHOD="GET"> '; + echo dossier::hidden(); + echo HtmlInput::hidden('test_select',$_GET['test_select']); + echo 'Choix de la catégorie'; + echo $select_cat->input(); + echo HtmlInput::submit('go_card','Afficher'); + echo '</form>'; + if ( isset ($_GET['go_card'])) { + $empty=$a->toArray($_GET['fd_id']); + print_r($empty); + } + } } ?> diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php index b4aa2beb8..6f698f820 100644 --- a/include/class_fiche_def.php +++ b/include/class_fiche_def.php @@ -19,9 +19,11 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr include_once("class_attribut.php"); +require_once("class_itext.php"); require_once('class_fiche_def_ref.php'); require_once('class_fiche.php'); require_once('user_common.php'); +require_once('class_iradio.php'); /*! \file * \brief define Class fiche and fiche def, those class are using @@ -44,6 +46,16 @@ class fiche_def { $this->cn=$p_cn; $this->id=$p_id; } +/*!\brief show the content of the form to create a new fiche_def_ref +*/ +function input () +{ + $ref=$this->cn->get_array("select * from fiche_def_ref order by frd_text"); + $iradio=new IRadio(); + $p_js=" SearchPosteFilter('".$_REQUEST['PHPSESSID']."','".dossier::id()."','class_base','all','','class_base_label')"; + require_once ('template/fiche_def_input.php'); + return; +} /*! ************************************************** @@ -57,12 +69,12 @@ class fiche_def { " natural join attr_def where fd_id=".$this->id. " order by jnt_order"; - $Ret=ExecSql($this->cn,$sql); + $Ret=$this->cn->exec_sql($sql); - if ( ($Max=pg_NumRows($Ret)) == 0 ) + if ( ($Max=Database::num_row($Ret)) == 0 ) return ; for ($i=0;$i < $Max;$i++) { - $row=pg_fetch_array($Ret,$i); + $row=Database::fetch_array($Ret,$i); $t = new Attribut($row['ad_id']); $t->ad_text=$row['ad_text']; $t->jnt_order=$row['jnt_order']; @@ -79,15 +91,15 @@ class fiche_def { function Get() { if ( $this->id == 0 ) return 0; - ExecSqlParam($this->cn,'select fiche_attribut_synchro($1)', + $this->cn->exec_sql('select fiche_attribut_synchro($1)', array($this->id)); $sql="select * from fiche_def ". " where fd_id=".$this->id; - $Ret=ExecSql($this->cn,$sql); - if ( ($Max=pg_NumRows($Ret)) == 0 ) + $Ret=$this->cn->exec_sql($sql); + if ( ($Max=Database::num_row($Ret)) == 0 ) return ; - $row=pg_fetch_array($Ret,0); + $row=Database::fetch_array($Ret,0); $this->label=$row['fd_label']; $this->class_base=$row['fd_class_base']; $this->fiche_def=$row['frd_id']; @@ -102,12 +114,12 @@ class fiche_def { function GetAll() { $sql="select * from fiche_def "; - $Ret=ExecSql($this->cn,$sql); - if ( ($Max=pg_NumRows($Ret)) == 0 ) + $Ret=$this->cn->exec_sql($sql); + if ( ($Max=Database::num_row($Ret)) == 0 ) return ; for ( $i = 0; $i < $Max;$i++) { - $row=pg_fetch_array($Ret,$i); + $row=Database::fetch_array($Ret,$i); $this->all[$i]=new fiche_def($this->cn,$row['fd_id']); $this->all[$i]->label=$row['fd_label']; $this->all[$i]->class_base=$row['fd_class_base']; @@ -125,7 +137,7 @@ class fiche_def { * \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; + return ($this->cn->count_sql("select * from vw_fiche_def where ad_id=$p_attr and fd_id=".$this->id)>0)?true:false; } /*! @@ -143,7 +155,8 @@ class fiche_def { $r.=sprintf("<TD>%s</TD>",$this->fiche_def); return $r; } - /*!\brief Add a fiche thanks the element from the array + /*!\brief Add a fiche category thanks the element from the array + * you cannot add twice the same cat. name * table : insert into fiche_def * insert into attr_def * @@ -154,18 +167,12 @@ class fiche_def { */ function Add($array) { - echo_debug('class_fiche',__LINE__,"Add Modele"); - - // Show what we receive for debug purpose only - // - foreach ( $array as $key=>$element ) { - echo_debug('class_fiche_def',__LINE__,"p_$key $element"); ${"p_$key"}=$element; } // Format correctly the name of the cat. of card $p_nom_mod=FormatString($p_nom_mod); - echo_debug('class_fiche_def',__LINE__,"Adding $p_nom_mod"); + // Format the p_class_base // must be an integer if ( isNumber($p_class_base) == 0 && FormatString($p_class_base) != null ) { @@ -176,8 +183,8 @@ class fiche_def { return; // $p_FICHE_REF cannot be null !!! (== fiche_def_ref.frd_id - if (! isset ($p_FICHE_REF) or strlen($p_FICHE_REF) == 0 ) { - echo_error ("AddModele : fiche_ref MUST NOT be null or empty"); + if (! isset ($p_FICHE_REF) || strlen($p_FICHE_REF) == 0 ) { + alert (_('Vous devez choisir une categorie')); return; } $fiche_Def_ref=new fiche_def_ref($this->cn,$p_FICHE_REF); @@ -193,7 +200,10 @@ class fiche_def { $p_class_base=$fiche_Def_ref->frd_class_base; echo_debug('class_fiche_def',__LINE__,'Found class base ='.$p_class_base); } - + /* check if the cat. name already exists */ + $sql="select count(*) from fiche_Def where upper(fd_label)=upper($1)"; + $count=$this->cn->get_value($sql,array(trim($p_nom_mod))); + if ($count != 0 ) return -1; // Set the value of fiche_def.fd_create_account // automatic creation for 'poste comptable' if ( isset($p_create) && strlen(trim($p_class_base)) != 0) @@ -208,37 +218,37 @@ class fiche_def { $sql=sprintf("insert into fiche_def(fd_label,fd_class_base,frd_id,fd_create_account) values ('%s',%s,%d,'%s')", $p_nom_mod,$p_class_base,$p_FICHE_REF,$p_create); - $Res=ExecSql($this->cn,$sql); + $Res=$this->cn->exec_sql($sql); // p_class must be added to tmp_pcmn $sql=sprintf("select account_add(%d,'%s')", $p_class_base,$p_nom_mod); - $Res=ExecSql($this->cn,$sql); + $Res=$this->cn->exec_sql($sql); // Get the fd_id - $fd_id=GetSequence($this->cn,'s_fdef'); + $fd_id=$this->cn->get_current_seq('s_fdef'); // Add the class_base if needed $sql=sprintf("insert into jnt_fic_attr(fd_id,ad_id,jnt_order) values (%d,%d,10)",$fd_id,ATTR_DEF_ACCOUNT); - $Res=ExecSql($this->cn,$sql); + $Res=$this->cn->exec_sql($sql); } else { //There is no class base not even as default $sql=sprintf("insert into fiche_def(fd_label,frd_id,fd_create_account) values ('%s',%d,'%s')", $p_nom_mod,$p_FICHE_REF,$p_create); - $Res=ExecSql($this->cn,$sql); + $Res=$this->cn->exec_sql($sql); // Get the fd_id - $fd_id=GetSequence($this->cn,'s_fdef'); + $fd_id=$this->cn->get_current_seq('s_fdef'); } // Get the default attr_def from attr_min - $def_attr=Get_attr_min($this->cn,$p_FICHE_REF); + $def_attr=$this->get_attr_min($p_FICHE_REF); //if defaut attr not null // build the sql insert for the table attr_def @@ -251,10 +261,10 @@ class fiche_def { $sql=sprintf("insert into jnt_fic_Attr(fd_id,ad_id,jnt_order) values (%d,%s,%d)", $fd_id,$v['ad_id'],$jnt_order); - ExecSql($this->cn,$sql); + $this->cn->exec_sql($sql); } } - + return 0; }//--------------end function Add ---------------------------- /*! @@ -278,13 +288,37 @@ class fiche_def { $sql.=" offset $offset limit $step"; } - $Ret=ExecSql($this->cn,$sql); - if ( ($Max=pg_NumRows($Ret)) == 0 ) + $Ret=$this->cn->exec_sql($sql); + if ( ($Max=Database::num_row($Ret)) == 0 ) return ; $all[0]=new fiche($this->cn); for ($i=0;$i<$Max;$i++) { - $row=pg_fetch_array($Ret,$i); + $row=Database::fetch_array($Ret,$i); + $t=new fiche($this->cn,$row['f_id']); + $t->getAttribut(); + $all[$i]=$t; + + } + return $all; + } +/*! + * \brief Get all the card where the fiche_def.frd_id is given in parameter + * \return array of fiche or null is nothing is found + */ + function get_by_category($p_cat) { + $sql="select f_id + from + fiche join fiche_def using(fd_id) + where frd_id=$1"; + + $Ret=$this->cn->exec_sql($sql,array($p_cat)); + if ( ($Max=Database::num_row($Ret)) == 0 ) + return null; + $all[0]=new fiche($this->cn); + + for ($i=0;$i<$Max;$i++) { + $row=Database::fetch_array($Ret,$i); $t=new fiche($this->cn,$row['f_id']); $t->getAttribut(); $all[$i]=$t; @@ -308,7 +342,7 @@ class fiche_def { $page=(isset($_GET['page']))?$_GET['page']:1; $offset=(isset($_GET['offset']))?$_GET['offset']:0; - $max_line=CountSql($this->cn,"select f_id,av_text from + $max_line=$this->cn->count_sql("select f_id,av_text from fiche join jnt_fic_att_value using (f_id) join attr_value using (jft_id) where fd_id='".$this->id."' and ad_id=".ATTR_DEF_NAME." order by f_id"); @@ -319,11 +353,11 @@ class fiche_def { // Get all name the cards of the select category // 1 for attr_def.ad_id is always the name - $Res=ExecSql($this->cn,"select f_id,vw_name,quick_code from ". + $Res=$this->cn->exec_sql("select f_id,vw_name,quick_code from ". " vw_fiche_attr ". " where fd_id='".$this->id. "' order by f_id $sql_offset $sql_limit "); - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); echo $bar; $str=""; // save the url @@ -339,13 +373,13 @@ class fiche_def { echo '<FORM METHOD="POST" action="?p_action=fiche&action=vue'.$str.'">'; echo dossier::hidden(); - echo '<INPUT TYPE="HIDDEN" name="fiche" value="'.$this->id.'">'; - echo '<INPUT TYPE="SUBMIT" name="add" Value="Ajout fiche">'; + echo HtmlInput::hidden("fiche",$this->id); + echo HtmlInput::submit('add','Ajout fiche'); echo '</FORM>'; $str_dossier=dossier::get(); echo '<table>'; for ( $i = 0; $i < $Max; $i++) { - $l_line=pg_fetch_array($Res,$i); + $l_line=Database::fetch_array($Res,$i); if ( $i%2 == 0) echo '<TR class="odd">'; else @@ -359,12 +393,38 @@ class fiche_def { echo '</table>'; echo '<FORM METHOD="POST" action="?p_action=fiche&action=vue'.$str.'">'; echo dossier::hidden(); - echo '<INPUT TYPE="HIDDEN" name="fiche" value="'.$this->id.'">'; - echo '<INPUT TYPE="SUBMIT" name="add" Value="Ajout fiche">'; + echo HtmlInput::hidden("fiche",$this->id); + echo HtmlInput::submit('add','Ajout fiche'); echo '</FORM>'; echo $bar; } + /*!\brief show input for the basic attribute : label, class_base, create_account + * use only when we want to update + * + *\return HTML string with the form + */ + function input_base() { + $r=""; + $r.=_('Label'); + $label=new IText('label',$this->label); + $r.=$label->input(); + $r.='<br>'; + /* the accounting item */ + $class_base=new IPoste('class_base',$this->class_base); + $class_base->set_attribute('ipopup','ipop_account'); + $class_base->set_attribute('account','class_base'); + $class_base->set_attribute('label','acc_label'); + $r.=_('Poste Comptable de base').' : '; + $r.=$class_base->input(); + $r.='<span id="acc_label"></span><br>'; + /* auto Create */ + $ck=new ICheckBox('create'); + $ck->selected=($this->create_account=='f')?false:true; + $r.=_('Chaque fiche aura automatiquement son propre poste comptable : '); + $r.=$ck->input(); + return $r; + } /*!\brief Display all the attribut of the fiche_def *\param $str give the action possible values are remove, empty */ @@ -373,7 +433,7 @@ class fiche_def { echo_debug("class_fiche_def",__LINE__,"DisplayAttribut"); if ( $this->id == 0 ) return ; - ExecSqlParam($this->cn,'select fiche_attribut_synchro($1)', + $this->cn->exec_sql('select fiche_attribut_synchro($1)', array($this->id)); $MaxLine=sizeof($this->attribut); @@ -389,22 +449,19 @@ class fiche_def { $r.='<TR class="'.$class.'"><td>'; // Can change the name if ( $this->attribut[$i]->ad_id == ATTR_DEF_NAME ) { - $a=sprintf('Label</TD><TD><INPUT TYPE="TEXT" NAME="label" VALUE="%s">', - $this->label); - $r.=$a; - $r.='</td><TD><input type="submit" NAME="change_name" value="Change Nom">'; + continue; } else { if ( $str == "remove" ) { //Only for the not mandatory attribute (not defined in attr_min) - if ( CountSql($this->cn,"select * from attr_min where frd_id=". + if ( $this->cn->count_sql("select * from attr_min where frd_id=". $this->fiche_def." and ad_id = ".$this->attribut[$i]->ad_id) == 0 && $this->attribut[$i]->ad_id != ATTR_DEF_QUICKCODE && $this->attribut[$i]->ad_id != ATTR_DEF_ACCOUNT ) { - $add_action=sprintf( '</TD><TD> Supprimer <input type="checkbox" name="chk_remove[]" value="%d">', - $this->attribut[$i]->ad_id); - } + $add_action=sprintf( '</TD><TD> Supprimer <input type="checkbox" name="chk_remove[]" value="%d">', + $this->attribut[$i]->ad_id); + } else $add_action="</td><td>"; } @@ -414,27 +471,27 @@ class fiche_def { /*---------------------------------------- */ /* ORDER OF THE CARD */ /*---------------------------------------- */ - $order=new widget('text'); + $order=new IText(); $order->name='jnt_order'.$this->attribut[$i]->ad_id; $order->size=3; $order->value=$this->attribut[$i]->jnt_order; - $r.='</td><td> '.$order->IOValue(); + $r.='</td><td> '.$order->input(); } $r.= '</td></tr>'; } // Show the possible attribute which are not already attribute of the model // of card - $Res=ExecSql($this->cn,"select ad_id,ad_text from attr_def + $Res=$this->cn->exec_sql("select ad_id,ad_text from attr_def where ad_id not in (select ad_id from fiche_def natural join jnt_fic_attr where fd_id=".$this->id.")"); - $M=pg_NumRows($Res); + $M=Database::num_row($Res); // Show the unused attribute $r.='<TR> <TD>'; $r.= '<SELECT NAME="ad_id">'; - for ($i=0;$i<$M;$i++) { $l=pg_fetch_array($Res,$i); + for ($i=0;$i<$M;$i++) { $l=Database::fetch_array($Res,$i); $a=sprintf('<OPTION VALUE="%s"> %s', $l['ad_id'],$l['ad_text']); $r.=$a; @@ -458,9 +515,42 @@ class fiche_def { $sql=sprintf("update fiche_def set fd_label='%s' ". "where fd_id=%d", $p_label,$this->id); - $Res=ExecSql($this->cn,$sql); + $Res=$this->cn->exec_sql($sql); } + /*!\brief set the auto create accounting item for each card and + * save it into the database + * \param $p_label true or false + */ + function set_autocreate($p_label) + { + if ( $this->id == 0 ) return; + if ($p_label==true) + $t='t'; + if ($p_label==false) + $t='f'; + + $sql="update fiche_def set fd_create_account=$1 ". + "where fd_id=$2"; + + $Res=$this->cn->exec_sql($sql,array($t,$this->id)); + + } + /*!\brief Save the class base + * \param $p_label label + */ + function save_class_base($p_label) + { + if ( $this->id == 0 ) return; + $p_label=FormatString($p_label); + + $sql="update fiche_def set fd_class_base=$1 ". + "where fd_id=$2"; + + $Res=$this->cn->exec_sql($sql,array($p_label,$this->id)); + } + + /*!\brief insert a new attribut for this fiche_def * \param $p_ad_id id of the attribut */ @@ -474,7 +564,7 @@ class fiche_def { // it means insert a row in jnt_fic_attr $sql=sprintf("insert into jnt_fic_attr (fd_id,ad_id,jnt_order) values (%d,%d,%d)", $this->id,$p_ad_id,$max); - $Res=ExecSql($this->cn,$sql); + $Res=$this->cn->exec_sql($sql); // update all the existing card } @@ -486,10 +576,10 @@ class fiche_def { { foreach ($array as $ch) { - StartSql($this->cn); + $this->cn->start(); $sql="delete from jnt_fic_attr where fd_id=".$this->id. " and ad_id=".$ch; - ExecSql($this->cn,$sql); + $this->cn->exec_sql($sql); $sql="delete from attr_value where jft_id in ( select ". " jft_id from attr_value join jnt_fic_att_value using (jft_id) ". @@ -497,15 +587,15 @@ class fiche_def { " where ". "fd_id = ".$this->id." and ". "ad_id=".$ch.")"; - ExecSql($this->cn,$sql); + $this->cn->exec_sql($sql); $sql="delete from jnt_fic_att_value where jft_id in (". " select jft_id from jnt_fic_att_value join fiche using (f_id) ". " where ". " fd_id = ".$this->id." and ". " ad_id = ".$ch.")"; - ExecSql($this->cn,$sql); - Commit($this->cn); + $this->cn->exec_sql($sql); + $this->cn->commit(); } } @@ -520,13 +610,13 @@ class fiche_def { if ( $row->ad_id == 1 ) continue; if ( ${'jnt_order'.$row->ad_id} <= 0 ) continue; $sql='update jnt_fic_attr set jnt_order=$1 where fd_id=$2 and ad_id=$3'; - ExecSqlParam($this->cn,$sql,array(${'jnt_order'.$row->ad_id}, + $this->cn->exec_sql($sql,array(${'jnt_order'.$row->ad_id}, $this->id, $row->ad_id)); } /* correct the order */ - ExecSql($this->cn,'select attribute_correct_order()'); + $this->cn->exec_sql('select attribute_correct_order()'); } @@ -553,14 +643,50 @@ class fiche_def { /* if remains == 0 then remove cat */ if ( $remain == 0 ) { $sql='delete from jnt_fic_attr where fd_id=$1'; - ExecSqlParam($this->cn,$sql,array($this->id)); + $this->cn->exec_sql($sql,array($this->id)); $sql='delete from fiche_def where fd_id=$1'; - ExecSqlParam($this->cn,$sql,array($this->id)); + $this->cn->exec_sql($sql,array($this->id)); } return $remain; } +/*! + * \brief retrieve the mandatory field of the card model + * + * \param $p_fiche_def_ref + * \return array of ad_id (attr_min.ad_id) and labels (attr_def.ad_text) + */ +function get_attr_min($p_fiche_def_ref) { + + // find the min attr for the fiche_def_ref + $Sql="select ad_id,ad_text from attr_min natural join attr_def + natural join fiche_def_ref + where + frd_id= $1"; + $Res=$this->cn->exec_sql($Sql,array($p_fiche_def_ref)); + $Num=Database::num_row($Res); + + // test the number of returned rows + if ($Num == 0 ) return null; + + // Get Results & Store them in a array + for ($i=0;$i<$Num;$i++) { + $f=Database::fetch_array($Res,$i); + $array[$i]['ad_id']=$f['ad_id']; + $array[$i]['ad_text']=$f['ad_text']; + } + return $array; +} + /*!\brief count the number of fiche_def (category) which has the frd_id (type of category) + *\param $p_frd_id is the frd_id in constant.php the FICHE_TYPE_ + *\return the number of cat. of card of the given type + *\see constant.php + */ +function count_category($p_frd_id) { + $ret=$this->cn->count_sql("select fd_id from fiche_def where frd_id=$1",array($p_frd_id)); + return $ret; +} diff --git a/include/class_fiche_def_ref.php b/include/class_fiche_def_ref.php index 6c80479bd..94739b10a 100644 --- a/include/class_fiche_def_ref.php +++ b/include/class_fiche_def_ref.php @@ -51,8 +51,8 @@ class fiche_def_ref function LoadAll() { $sql="select * from fiche_def_ref order by frd_id"; - $Res=ExecSql($this->db,$sql); - $all=pg_fetch_all($Res); + $Res=$this->db->exec_sql($sql); + $all=Database::fetch_all($Res); if ( $Res == false ) return array(); $idx=0; $array=array(); @@ -93,12 +93,12 @@ class fiche_def_ref function Input() { $r=""; - $h=new widget('hidden'); - $r.='<li>Id :'.$h->IOValue('frd_id',$this->frd_id).$this->frd_id."</li>"; - $w=new widget("text"); - $r.='<li>Commentaire :'.$w->IOValue('frd_text',$this->frd_text)."</li>"; - $t=new widget('text'); - $r.='<li>Poste de base:'.$t->IOValue('frd_class_base',$this->frd_class_base)."</li>"; + $h=new IHidden(); + $r.='<li>Id :'.$h->input('frd_id',$this->frd_id).$this->frd_id."</li>"; + $w=new IText(); + $r.='<li>Commentaire :'.$w->input('frd_text',$this->frd_text)."</li>"; + $t=new IText(); + $r.='<li>Poste de base:'.$t->input('frd_class_base',$this->frd_class_base)."</li>"; return $r; } @@ -115,7 +115,7 @@ class fiche_def_ref $sql="update fiche_def_ref set frd_text='". $this->frd_text."' , frd_class_base='".$this->frd_class_base."'". " where frd_id=".$this->frd_id; - $Res=ExecSql($this->db,$sql); + $Res=$this->db->exec_sql($sql); } /*! ************************************************** @@ -128,9 +128,9 @@ class fiche_def_ref { $sql="select * from fiche_def_ref ". " where frd_id=".$this->frd_id; - $Res=ExecSql($this->db,$sql); - if ( pg_NumRows($Res) == 0 ) return null; - $r=pg_fetch_array($Res,0); + $Res=$this->db->exec_sql($sql); + if ( Database::num_row($Res) == 0 ) return null; + $r=Database::fetch_array($Res,0); $this->frd_text=$r['frd_text']; $this->frd_class_base=$r['frd_class_base']; } diff --git a/include/class_forecast.php b/include/class_forecast.php new file mode 100644 index 000000000..a161afeb4 --- /dev/null +++ b/include/class_forecast.php @@ -0,0 +1,129 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* $Revision: 1649 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief manage the table forecast + */ +/*! + * \brief manage the table forecast + */ +class Forecast +{ + private static $variable=array ("id"=>"f_id","name"=>"f_name"); + private $cn; + /** + * @brief constructor + * @param $p_init Database object + */ + function __construct ($p_init,$p_id=0) { + $this->cn=$p_init; + $this->f_id=$p_id; + } + public function get_parameter($p_string) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + return $this->$idx; + } + else + exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + } + public function set_parameter($p_string,$p_value) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + $this->$idx=$p_value; + } + else + exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + } + public function get_info() { return var_export(self::$variable,true); } + + public function verify() { + // Verify that the elt we want to add is correct + // the f_name must be unique (case insensitive) + if ( strlen(trim($this->f_name))==0) throw new Exception(_('Le nom ne peut pas être vide')); + return 0; + } + public function save() { + /* please adapt */ + if ( $this->get_parameter("id") == 0 ) + $this->insert(); + else + $this->update(); + } + + public function insert() { + if ( $this->verify() != 0 ) return; + $sql="insert into forecast (f_name) ". + " values ($1) returning f_id"; + $res=$this->cn->exec_sql( + $sql, + array($this->f_name) + ); + $this->f_id=Database::fetch_result($res,0,0); + } + + /** + *@brief update the forecast table + */ + public function update() { + if ( $this->verify() != 0 ) return; + + $sql="update forecast set f_name=$1 ". + " where f_id = $2"; + $res=$this->cn->exec_sql( + $sql, + array($this->f_name, $this->f_id) + ); + + } + /** + *@brief load all the existing forecast + *@param $p_cn is an Database object + *@return array of f_id and f_name + */ + public static function load_all($p_cn) { + $sql="select f_id, f_name from forecast"; + $ret=$p_cn->get_array($sql); + return $ret; + } + public function load() { + $sql="select f_name from forecast where f_id=$1"; + $res=$this->cn->exec_sql( + $sql, + array($this->f_id) + ); + if ( Database::num_row($res) == 0 ) return -1; + $row=Database::fetch_array($res,0); + foreach ($row as $idx=>$value) { $this->$idx=$value; } + } + public function delete() { + $sql="delete from forecast where f_id=$1"; + $res=$this->cn->exec_sql($sql,array($this->f_id)); + } + /** + * @brief unit test + */ + static function test_me() { + } + +} +?> diff --git a/include/class_forecast_cat.php b/include/class_forecast_cat.php new file mode 100644 index 000000000..befda7649 --- /dev/null +++ b/include/class_forecast_cat.php @@ -0,0 +1,152 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/** +* @file + * @brief manage the table forecast_cat, this table contains the categories of forecast + * as expense, asset, sales... + */ +/** + *@brief this class is called normally from forecast, a forecast contains category + * like sales, expenses, each category contains items + *@see Forecast + * + */ +class Forecast_Cat +{ + /* example private $variable=array("val1"=>1,"val2"=>"Seconde valeur","val3"=>0); */ + private static $variable=array ("id"=>"fc_id","order"=>"fc_order","desc"=>"fc_desc","forecast"=>"f_id"); + private $cn; + /** + * @brief constructor + * @param $p_init Database object + */ + function __construct ($p_init,$p_id=0) { + $this->cn=$p_init; + $this->fc_id=$p_id; + } + public function get_parameter($p_string) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + return $this->$idx; + } + else + exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + } + public function set_parameter($p_string,$p_value) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + $this->$idx=$p_value; + } + else + exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + + + } + public function get_info() { return var_export(self::$variable,true); } + public function verify() { + if (strlen(trim($this->fc_order))==0){ + $this->fc_order="1"; + } + // Verify that the elt we want to add is correct + // the f_name must be unique (case insensitive) + return 0; + } + public function save() { + if ( $this->get_parameter("id") == 0 ) + $this->insert(); + else + $this->update(); + } + + public function insert() { + if ( $this->verify() != 0 ) return; + + $sql="insert into forecast_cat (fc_desc,fc_order,f_id) ". + " values ($1,$2,$3) returning fc_id"; + $res=$this->cn->exec_sql( + $sql, + array($this->fc_desc,$this->fc_order,$this->f_id) + ); + $this->fc_id=Database::fetch_result($res,0,0); + } + + public function update() { + if ( $this->verify() != 0 ) return; + + $sql="update forecast_cat set fc_desc=$1,f_id=$2,fc_order=$3 ". + " where fc_id = $4"; + $res=$this->cn->exec_sql( + $sql, + array($this->fc_desc,$this->f_id, $this->fc_order,$this->fc_id) + ); + } + /** + *@brief Load all the cat. for a given forecast and return them into a array + *@param $p_cn database connx + *@param $p_id is the forecast id (f_id) + *@return an array with all the data + */ + public static function load_all($p_cn,$p_id) { + $sql="select fc_id,fc_desc,fc_order from forecast_cat where f_id=$1"; + + $res=$p_cn->get_array($sql,array($p_id)); + + return $res; + } + public function load() { + + $sql="select fc_desc, f_id,fc_order from forecast_cat where fc_id=$1"; + + $res=$this->cn->exec_sql( + $sql, + array($this->fc_id) + ); + + if ( Database::num_row($res) == 0 ) return; + $row=Database::fetch_array($res,0); + foreach ($row as $idx=>$value) { $this->$idx=$value; } + } + /** + *@brief Make a array for a ISelect of the available cat + *@param $id is forecast::f_id + *@return array for ISelect + *@see ISelect + */ + public function make_array($id) { + $sql="select fc_id,fc_desc from forecast_cat where f_id=$id"; + $ret=$this->cn->make_array($sql); + return $ret; + } + public function delete() { + $sql="delete from forecast_cat where fc_id=$1"; + $res=$this->cn->exec_sql($sql,array($this->fc_id)); + } + /** + * @brief unit test + */ + static function test_me() { + } + +} + + ?> \ No newline at end of file diff --git a/include/class_forecast_item.php b/include/class_forecast_item.php new file mode 100644 index 000000000..a79e89ef2 --- /dev/null +++ b/include/class_forecast_item.php @@ -0,0 +1,147 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/** +* @file + * @brief manage the table forecast_item contains the items, the item are part of category of forecast_cat, which are + * part of Forecast + */ +/** + *@brief manage the table forecast_item contains the items, the item are part of category of forecast_cat, which are + * part of Forecast + * @see Forecast Forecast_Cat + * + * + */ +class Forecast_Item +{ + /* example private $variable=array("val1"=>1,"val2"=>"Seconde valeur","val3"=>0); */ + private static $variable=array ("id"=>"fi_id","text"=>"fi_text","account"=>"fi_account", + "card"=>"fi_card","order"=>"fi_order","cat_id"=>"fc_id","amount"=>"fi_amount","debit"=>"fi_debit","periode"=>"fi_pid"); + private $cn; + /** + * @brief constructor + * @param $p_init Database object + */ + function __construct ($p_init,$p_id=0) { + $this->cn=$p_init; + $this->fi_id=$p_id; + } + public function get_parameter($p_string) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + return $this->$idx; + } + else + exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + } + public function set_parameter($p_string,$p_value) { + if ( array_key_exists($p_string,self::$variable) ) { + $idx=self::$variable[$p_string]; + $this->$idx=$p_value; + } + else + exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + + + } + public function get_info() { return var_export(self::$variable,true); } + public function verify() { + // Verify that the elt we want to add is correct + // the f_name must be unique (case insensitive) + return 0; + } + public function save() { + /* please adapt */ + if ( $this->get_parameter("id") == 0 ) + $this->insert(); + else + $this->update(); + } + + public function insert() { + if ( $this->verify() != 0 ) return; + + $sql="INSERT INTO forecast_item( + fi_text, fi_account, fi_card, fi_order, fc_id, fi_amount, + fi_debit,fi_pid) + VALUES ($1, $2, $3, $4, $5, $6, $7,$8) returning fi_id;"; + $res=$this->cn->exec_sql( + $sql, + array($this->fi_text,$this->fi_account,$this->fi_card,$this->fi_order,$this->fc_id,$this->fi_amount,$this->fi_debit,$this->fi_pid) + ); + $this->fi_id=Database::fetch_result($res,0,0); + } + + public function update() { + if ( $this->verify() != 0 ) return; + + $sql="UPDATE forecast_item + SET fi_text=$1, fi_account=$2, fi_card=$3, fi_order=$4, fc_id=$5, + fi_amount=$6, fi_debit=$7,fi_pid=$8 + WHERE fi_id=$9;"; + $res=$this->cn->exec_sql($sql, + array($this->fi_text, + $this->fi_account, + $this->fi_card, + $this->fi_order, + $this->fc_id, + $this->fi_amount, + $this->fi_debit, + $this->fi_pid, + $this->fi_id) + ); + + } + + public function load() { + + $sql="SELECT fi_id, fi_text, fi_account, fi_card, fi_order, fc_id, fi_amount, + fi_debit,fi_pid + FROM forecast_item where fi_id=$1"; + + $res=$this->cn->exec_sql( + $sql, + array($this->fi_id) + ); + + if ( Database::num_row($res) == 0 ) return; + $row=Database::fetch_array($res,0); + foreach ($row as $idx=>$value) { $this->$idx=$value; } + } + + + + + public function delete() { + $sql="delete from forecast_item where fi_id=$1"; + $res=$this->cn->exec_sql($sql,array($this->fi_id)); + } + /** + * @brief unit test + */ + static function test_me() { + } + +} + + ?> \ No newline at end of file diff --git a/include/class_gestion_purchase.php b/include/class_gestion_purchase.php index 3a7cc953d..cca2984f6 100644 --- a/include/class_gestion_purchase.php +++ b/include/class_gestion_purchase.php @@ -70,9 +70,9 @@ class gestion_purchase extends gestion_table qp_dep_priv from quant_purchase left join tva_rate on (qp_vat_code=tva_id) where qp_internal='".$this->qp_internal."'"; - $ret=ExecSql($this->db,$sql); + $ret=$this->db->exec_sql($sql); // $res contains all the line - $res=pg_fetch_all($ret); + $res=Database::fetch_all($ret); if ( sizeof($res)==0) return null; $count=0; @@ -86,10 +86,10 @@ class gestion_purchase extends gestion_table return $array; } function search_by_jid($p_jid) { - $res=ExecSql($this->db,"select qp_id from quant_purchase where j_id=".$p_jid); + $res=$this->db->exec_sql("select qp_id from quant_purchase where j_id=".$p_jid); - if ( pg_NumRows($res) == 1) - $this->qp_id=pg_fetch_result($res,0,0); + if ( Database::num_row($res) == 1) + $this->qp_id=Database::fetch_result($res,0,0); else $this->qp_id=0; } @@ -109,9 +109,9 @@ class gestion_purchase extends gestion_table qp_dep_priv from quant_purchase where qp_id=".$this->qp_id; - $ret=ExecSql($this->db,$sql); + $ret=$this->db->exec_sql($sql); // $res contains all the line - $res=pg_fetch_all($ret); + $res=Database::fetch_all($ret); if ( empty($res) ) return null; foreach ($res[0] as $idx=>$value) diff --git a/include/class_gestion_sold.php b/include/class_gestion_sold.php index e7a109b17..1663dcaec 100644 --- a/include/class_gestion_sold.php +++ b/include/class_gestion_sold.php @@ -27,9 +27,7 @@ /*! \brief this object handles the table quant_sold * */ - /*!\todo the qs_valid field is not used it should be delete into - * the table quant_sold - */ + require_once ('class_gestion_table.php'); @@ -64,9 +62,9 @@ class gestion_sold extends gestion_table j_id from quant_sold left join tva_rate on (qs_vat_code=tva_id) where qs_internal='".$this->qs_internal."'"; - $ret=ExecSql($this->db,$sql); + $ret=$this->db->exec_sql($sql); // $res contains all the line - $res=pg_fetch_all($ret); + $res=Database::fetch_all($ret); if ( sizeof($res)==0) return null; $count=0; diff --git a/include/class_html_input.php b/include/class_html_input.php new file mode 100755 index 000000000..405f2c4a2 --- /dev/null +++ b/include/class_html_input.php @@ -0,0 +1,191 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +/* $Revision: 2350 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*! \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. + * + * special value + * js_search and js_search_only :you need to add a span widget the name + * of the js_* widget + '_label' , the member extra contains cred,deb to + * filter the search of cred of deb of a jrn or contains a string with + * a list of frd_id. + * Possible type + * $type + * - TEXT + * - HIDDEN + * - BUTTON in this->js you have the javascript code + * - SELECT the options are passed via this->value, this array is + * build thanks the make_array function, each array (of the + * array) aka row must contains a field value and a field label + * - PASSWORD + * - CHECKBOX + * - RADIO + * - TEXTAREA + * - RICHTEXT + * - FILE + * - JS_SEARCH_POSTE call a popup window for searching the account + * - JS_SEARCH call a popup window for searching a quickcode or to add one + * - JS_SEARCH_ONLY like JS_SEARCH but without adding a quickcode + * - JS_LEDGER_CTRL like js_search_only but the tag to update is given + * - SPAN + * - JS_TVA open a popup window for the VAT + * - JS_CONCERNED open a popup window for search a operation, if extra == 0 then + * get the amount thx javascript + * - js_DATE show a calendar + * + * For JS_SEARCH_POST,JS_SEARCH or JS_SEARCH_ONLY + * - $extra contains 'cred', 'deb', 'all' or a list of fiche_def_ref (frd_id) + * to filter the search/add for the card + * + * - $extra2 filter on the card parameter, which are given in Avance->journaux menu, + * it is the journal id. If empty, there is no link with a ledger + * + */ +class HtmlInput { + + var $type; /*!< $type type of the widget */ + var $name; /*!< $name field NAME of the INPUT */ + var $value; /*!< $value what the INPUT contains */ + var $readOnly; /*!< $readonly true : we cannot change value */ + var $size; /*!< $size size of the input */ + var $selected; /*!< $selected for SELECT RADIO and CHECKBOX the selected value */ + var $table; /*!< $table =1 add the table tag */ + var $label; /*!< $label the question before the input */ + var $disabled; /*!< $disabled poss. value == true or nothing, to disable INPUT*/ + var $extra; /*!< $extra different usage, it depends of the $type */ + var $extra2; /*!< $extra2 different usage, + it depends of the $type */ + var $javascript; /*!< $javascript is the javascript to add to the widget */ + var $ctrl; /*!<$ctrl is the control to update (see js_search_card_control) */ + + var $tabindex; + function __construct($p_name="",$p_value="") { + $this->name=$p_name; + $this->readOnly=false; + $this->size=20; + $this->width=50; + $this->heigh=20; + $this->value=$p_value; + $this->selected=""; + $this->table=0; + $this->disabled=false; + $this->javascript=""; + $this->extra2="all"; + $this->attribute=array(); + + } + function setReadOnly($p_read) { + $this->readonly=$p_read; + } + /*!\brief set the extra javascript property for the INPUT field + *\param $p_name name of the parameter + *\param $p_value default value of this parameter + */ + public function set_attribute($p_name,$p_value) { + $this->attribute[]=array($p_name,$p_value); + $this->$p_name=$p_value; + } + /** + *@brief you can add attribute to this in javascript + * this function is a wrapper and create a script (in js) to modify + * "this" (in javascript) with the value of obj->attribute from PHP + *@return return string with the javascript code + */ + public function get_js_attr(){ + require_once('function_javascript.php'); + $attr=""; + /* Add properties at the widget */ + for ($i=0;$i< count($this->attribute);$i++){ + list($name,$value)=$this->attribute[$i]; + $tmp1=sprintf("$('%s').%s='%s';", + $this->name, + $name, + $value); + $attr.=$tmp1; + } + $attr=create_script($attr); + return $attr; + } + + //##################################################################### + /* Debug + */ + function debug() { + echo "Type ".$this->type."<br>"; + echo "name ".$this->name."<br>"; + echo "value". $this->value."<br>"; + $readonly=($this->readonly==false)?"false":"true"; + echo "read only".$readonly."<br>"; + } + static function submit ($p_name,$p_value,$p_javascript="") { + + return '<INPUT TYPE="SUBMIT" NAME="'.$p_name.'" VALUE="'.$p_value.'" '.$p_javascript.'>'; + } + static function button ($p_name,$p_value,$p_javascript="") { + + return '<INPUT TYPE="button" NAME="'.$p_name.'" ID="'.$p_name.'" VALUE="'.$p_value.'" '.$p_javascript.'>'; + } + + static function reset ($p_value) { + return '<INPUT TYPE="RESET" VALUE="'.$p_value.'">'; + } + static function hidden($p_name,$p_value) { + return '<INPUT TYPE="hidden" id="'.$p_name.'" NAME="'.$p_name.'" VALUE="'.$p_value.'">'; + } + static function phpsessid() { + return self::hidden('phpsessid',$_REQUEST['PHPSESSID']); + } + static function extension() { + return self::hidden('code',$_REQUEST['code']); + } + + /*!\brief create a button with a ref + *\param $p_label the text + *\param $p_value the location of the window, the PHPSESSID is added, but not the gDossier + *\param $p_name the id of the span + *\return string with htmlcode + */ + static function button_anchor($p_label,$p_value,$p_name="") { + $str='&PHPSESSID='.$_REQUEST['PHPSESSID']; + $r=sprintf('<span id="%s" class="action"> <A class="action" href="%s">%s</A></span>', + $p_name, + $p_value.$str, + $p_label); + return $r; + } + static function infobulle($p_comment){ + $r='<A HREF="#" style="display:inline;color:black;background-color:yellow;padding-left:4px;width:2em;padding-right:4px;text-decoration:none;" onmouseover="showBulle(\''.$p_comment.'\')" onclick="showBulle(\''.$p_comment.'\')" onmouseout="hideBulle(0)">?</A>'; + return $r; + } + static function warnbulle($p_comment){ + $r='<A HREF="#" style="display:inline;color:black;background-color:red;padding-left:4px;padding-right:4px;text-decoration:none;" onmouseover="showBulle(\''.$p_comment.'\')" onclick="showBulle(\''.$p_comment.'\')" onmouseout="hideBulle(0)">XX</A>'; + return $r; + } + +} diff --git a/include/class_iaction.php b/include/class_iaction.php new file mode 100644 index 000000000..6149d1222 --- /dev/null +++ b/include/class_iaction.php @@ -0,0 +1,62 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input show just a ref to an action + * create a button with a link, if you want to use a javascript + * value must be empty + */ +require_once('class_html_input.php'); + class IAction extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name="",$p_value="") + { + $this->name=($p_name=="")?$this->name:$p_name; + $this->value=($p_value=="")?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + $this->javascript= (!isset ($this->javascript))?"":$this->javascript; + if ( $this->value !="") + $r=sprintf('<span id="%s" class="action"> <A class="action" HREF="%s" %s>%s</A></span>', + $this->name, + $this->value, + $this->javascript, + $this->label); + else + $r=sprintf('<span id="%s" class="action"> <A class="action" href="javascript: %s">%s</A></span>', + $this->name, + $this->javascript, + $this->label); + + return $r; + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + return; + } + static public function test_me() + { + + } +} diff --git a/include/class_ibutton.php b/include/class_ibutton.php new file mode 100644 index 000000000..035fcc07d --- /dev/null +++ b/include/class_ibutton.php @@ -0,0 +1,56 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class IButton extends HtmlInput +{ + var $label; + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + $extra= ( isset($this->extra))?$this->extra:""; + + $r='<input type="BUTTON" name="'.$this->name.'"'. + ' id="'.$this->name.'"'. + ' value="'.$this->label.'"'. + ' onClick="'.$this->javascript.'"'.$extra.'>'; + $attr=$this->get_js_attr(); + $r.=$attr; + return $r; + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + return ""; + } + static public function test_me() + { + + } +} diff --git a/include/class_icard.php b/include/class_icard.php new file mode 100644 index 000000000..49559c060 --- /dev/null +++ b/include/class_icard.php @@ -0,0 +1,317 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Input HTML for the card show buttons, in the file, you have to add JS_CARD + * + */ + + /*! + * \brief Input HTML for the card show buttons, in the file, you have to add JS_CARD + * How to use : + * - label is the label in the button + * - extra contents the type (all, deb or cred, a list of FD_ID between parent. or a SQL clause + * - attribute are the attribute to set (via ajax). The ledger is either a attribute (jrn) or a + * hidden field in the document, if none are set, there is no filter on the ledger + *\note you must in a hidden field PHPSESSID and the gDossier (dossier::hidden) + *\see ajaxFid + *\see card.js + *\see fid.php + * + * Set the hidden field or input field to be set by javascript with the function set_attribute + * call the input method. After selecting a value the update_value function is called. If you need + * to modify the queryString before the request is sent, you'll use the set_callback; the first + * parameter is the INPUT field and the second the queryString, the function must returns a + * queryString + *\code +// insert all the javascript files + echo js_include('prototype.js'); + echo js_include('scriptaculous.js'); + echo js_include('effects.js'); + echo js_include('controls.js'); + +// + $W1=new ICard(); + $W1->label="Client ".HtmlInput::infobulle(0) ; + $W1->name="e_client"; + $W1->tabindex=3; + $W1->value=$e_client; + $W1->table=0; +// If double click call the javascript fill_ipopcard + $W1->set_dblclick("fill_ipopcard(this);"); + +// This attribute is mandatory, it is the name of the IPopup + $W1->set_attribute('ipopup','ipopcard'); + + // name of the field to update with the name of the card + $W1->set_attribute('label','e_client_label'); + + // Type of card : deb, cred, + $W1->set_attribute('typecard','deb'); + + $W1->extra='deb'; + +// Add the callback function to filter the card on the jrn + $W1->set_callback('filter_card'); + +// when value selected in the autcomplete + $W1->set_function('fill_data'); + +// when the data change + $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', + $W1->name); + $f_client_qcode=$W1->input(); + $client_label=new ISpan(); + $client_label->table=0; + $f_client=$client_label->input("e_client_label",$e_client_label); + +// Search button for card + $f_client_bt=$W1->search(); + * \endcode + */ +require_once('class_html_input.php'); +require_once('function_javascript.php'); + +class ICard extends HtmlInput +{ + function __construct($name="",$value="") { + parent::__construct($name,$value); + $this->fct='update_value'; + $this->dblclick=''; + $this->callback='null'; + $this->javascript=''; + } + /*!\brief set the javascript callback function + * by default it is update_value called BEFORE the querystring is send + * + *\param $p_name callback function name + */ + function set_callback($p_name) { + $this->callback=$p_name; + } + + /*!\brief set the javascript callback function + * by default it is update_value called AFTER an item has been selected + *\param $p_name callback function name + */ + function set_function($p_name) { + $this->fct=$p_name; + } + /*!\brief return the html string for creating the ipopup, this ipopup + * can be used for adding, modifying or display a card + *\param $p_name name of the ipopup, must be set after with set_attribute +\code + $f_add_button=new IButton('add_card'); + $f_add_button->label='Créer une nouvelle fiche'; + $f_add_button->set_attribute('ipopup','ipop_newcard'); + $f_add_button->set_attribute('filter',$this->get_all_fiche_def ()); + $f_add_button->javascript=" select_card_type(this);"; + $str_add_button=$f_add_button->input(); + +\endcode + *\return html string + *\note must be one of first instruction on a new page, to avoid problem + * of position with IE + */ + static function ipopup($p_name) { + $ip_card=new IPopup ($p_name); + $ip_card->set_width('30%'); + $ip_card->title='Fiche '; + $ip_card->value=''; + return $ip_card->input(); + } + /*!\brief set the extra javascript property for a double click on + * INPUT field + *\param $p_action action when a double click happens + *\note the $p_action cannot contain a double quote + */ + function set_dblclick($p_action) { + $this->dblclick=$p_action; + } + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + if ( $p_name == null && $this->name == "") + throw (new Exception('Le nom d une icard doit être donne')); + + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + $l_sessid=$_REQUEST['PHPSESSID']; + + $attr=$this->get_js_attr(); + + $label=''; + if ( $this->dblclick != '') { + $e=sprintf(' ondblclick="%s" ', + $this->dblclick); + $this->dblclick=$e; + } + $input=sprintf('<INPUT TYPE="Text" class="input_text" '. + ' NAME="%s" ID="%s" VALUE="%s" SIZE="%d" %s %s>', + $this->name, + $this->name, + $this->value, + $this->size, + $this->dblclick, + $this->javascript + ); + + $ind=sprintf('<span id="%s_ind" style="display:none"> <img src="image/loading.gif" alt="Chargement..."/>'. + '</span>', + $this->name); + + $div=sprintf('<div id="%s_choices" class="autocomplete"></div>', + $this->name); + + $query=dossier::get().'&PHPSESSID='.$l_sessid.'&e='.urlencode($this->extra); + + $javascript=sprintf('try { new Ajax.Autocompleter("%s","%s_choices","fid_card.php?%s",'. + '{paramName:"FID",minChars:1,indicator:null,'. + 'callback:%s, '. + ' afterUpdateElement:%s});} catch (e){alert(e.message);};', + $this->name,$this->name,$query, + $this->callback, + $this->fct); + + $javascript=create_script($javascript.$this->dblclick); + + $r=$label.$input.$attr.$ind.$div.$javascript; + if ( $this->table == 1 ) + $r=td($r); + return $r; + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + $r=sprintf(' <INPUT TYPE="hidden" NAME="%s" VALUE="%s" SIZE="8">', + $this->name, + $this->value + ); + $r.='<span>'.$this->value.'</span>'; + return $r; + + } + static function javascript() { + $str=''; + echo js_include('prototype.js'); + echo js_include('scriptaculous.js'); + echo js_include('effects.js'); + echo js_include('controls.js'); + return $str; + } + /** + *@brief return a string containing the button for displaying + * a search form. When clicking on the result, update the input text file + * the common used attribute as + * - jrn the ledger + * - label the field to update + * - name name of the input text + * - price amount + * - tvaid + * - typecard (deb, cred, filter or list of value) + * will be set + * if ICard is in readOnly, the button disappears, so the return string is empty + *\see ajax_card.php + *\note the ipopup id is hard coded : ipop_card + *@return HTML string with the button + */ + function search() { + if ( $this->readOnly==true) return ''; + + $button=new IButton($this->name.'_bt'); + $a=""; + foreach (array('typecard','jrn','label','price','tvaid') as $att) { + if (isset($this->$att) ) + $a.="this.".$att."='".$this->$att."';"; + } + if (isset($this->name)) + $a.="this.inp='".$this->name."';"; + $a.="this.popup='ipop_card';"; + + $button->javascript=$a.' search_card(this)'; + return $button->input(); + } + + static public function test_me() + { + require_once('class_itext.php'); + $_SESSION['isValid']=1; + $a=new ICard('testme'); + $a->extra="all"; + $a->set_attribute('label','ctl_label'); + $a->set_attribute('tvaid','ctl_tvaid'); + $a->set_attribute('price','ctl_price'); + $a->set_attribute('purchase','ctl_purchase'); + $a->set_attribute('type','all'); +echo <<<EOF +<div id="debug" style="border:solid 1px black;overflow:auto"></div> +<script type="text/javascript" language="javascript" src="js/prototype.js"> +</script> +<script type="text/javascript" language="javascript" src="js/scriptaculous.js"> +</script> +<script type="text/javascript" language="javascript" src="js/effects.js"> +</script> +<script type="text/javascript" language="javascript" src="js/controls.js"> +</script> +<script type="text/javascript" language="javascript" src="js/ajax_fid.js"> +</script> +<script type="text/javascript" language="javascript" > + function test_value(text,li) { + alert("premier"+li.id); + + str=""; + str=text.id+'<hr>'; + if ( text.js_attr1) { str+=text.js_attr1;str+='<hr>';} + if ( text.js_attr2) { str+=text.js_attr2;str+='<hr>';} + if ( text.js_attr3) { str+=text.js_attr3;str+='<hr>';} + for (var i in text) { str+=i+'<br>'; + } + + // $('debug').innerHTML=str; + ajaxFid(text); +} +</script> +EOF; + echo "<form>"; + $l=new IText('ctl_label'); + $t=new IText('ctl_tvaid'); + $p=new IText('ctl_price'); + $b=new IText('ctl_purchase'); + + echo "Label ".$l->input().'<br>'; + echo "Tva id ".$t->input().'<br>'; + echo "Price ".$p->input().'<br>'; + echo "Purchase ".$b->input().'<br>'; + + if ( isset($_REQUEST['test_select']) ) + echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); + $a->set_function('test_value'); + $a->javascript=' onchange="alert(\'onchange\');" onblur="alert(\'onblur\');" '; + echo $a->input(); + echo dossier::hidden(); + echo HtmlInput::submit('Entree','entree'); + echo '</form>'; +echo <<<EOF +EOF; + } +} diff --git a/include/class_icardctrl.php b/include/class_icardctrl.php new file mode 100644 index 000000000..a77937ff1 --- /dev/null +++ b/include/class_icardctrl.php @@ -0,0 +1,84 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + * \see ICard SearchCard fiche_search.php + */ +require_once('class_html_input.php'); +class ICardCtrl extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + + $l_sessid=$_REQUEST['PHPSESSID']; + + if ( !isset($this->javascript) || $this->javascript=="") { /* if javascript is empty or not set then we + add a default behaviour */ + $this->javascript=sprintf('onBlur="ajaxFid(\'%s\',\'%s\',\'%s\',\'%s\',\'%s\')"', + $this->name, + $this->extra, //deb or cred + $l_sessid, + "searchcardControl", + $this->ctrl + ); + } + if ( $this->extra2 == "" ) $this->extra2="QuickCode"; + $r=sprintf('<table><tr><TD> + <INPUT TYPE="button" onClick="searchCardCtrl(\'%s\',\'%s\',\'%s\',\'%s\')" value="%s"> + %s</TD><TD> <INPUT class="input_text" TYPE="Text" " '. + ' NAME="%s" ID="%s" VALUE="%s" SIZE="8" %s></tr></table>', + $l_sessid, + $this->extra, + $this->name, + $this->ctrl, + $this->extra2, + $this->label, + $this->name, + $this->name, + $this->value, + $this->javascript + ); + + + + return $r; + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + $r=sprintf(' <INPUT TYPE="hidden" NAME="%s" VALUE="%s" SIZE="8">', + $this->name, + $this->value + ); + return $r; + + } + static public function test_me() + { + + } + } diff --git a/include/class_icheckbox.php b/include/class_icheckbox.php new file mode 100644 index 000000000..be2f17eb7 --- /dev/null +++ b/include/class_icheckbox.php @@ -0,0 +1,62 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class ICheckBox extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + + $check=( $this->selected==true )?"checked":"unchecked"; + $r='<input type="CHECKBOX" id="'.$this->name.'" name="'.$this->name.'"'; + $r.=" $check"; + $r.=' '.$this->disabled." ".$this->javascript.'>'; + + $r=$r." $this->label"; + + return $r; + + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + $check=( $this->selected==true )?"checked":"unchecked"; + $r='<input type="CHECKBOX" id="'.$this->name.'" name="'.$this->name.'"'; + $r.=" $check"; + $r.=' disabled>'; + + return $r; + + } + static public function test_me() + { + + } +} diff --git a/include/class_iconcerned.php b/include/class_iconcerned.php new file mode 100644 index 000000000..d9ca66caa --- /dev/null +++ b/include/class_iconcerned.php @@ -0,0 +1,66 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class IConcerned extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + $td="";$etd=""; + + $l_sessid=$_REQUEST['PHPSESSID']; + + $r=sprintf("$td + <INPUT TYPE=\"button\" onClick=SearchJrn('%s',".dossier::id().",'%s',%s,'%s') value=\"?\"> + $etd $td + <INPUT TYPE=\"text\" style=\"color:black;background:lightyellow;border:solid 1px grey;\" NAME=\"%s\" ID=\"%s\" VALUE=\"%s\" SIZE=\"8\" readonly> + $etd", + $l_sessid, + $this->name, + $this->extra, + $this->extra2, + $this->name, + $this->name, + $this->value + ); + return $r; + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + $r=sprintf("<span><b>%s</b></span>",$this->value); + $r.=sprintf('<input type="hidden" name="%s" value="%s">', $this->name,$this->value); + return $r; + + } + static public function test_me() + { + + } +} diff --git a/include/class_idate.php b/include/class_idate.php new file mode 100644 index 000000000..9dd93de5f --- /dev/null +++ b/include/class_idate.php @@ -0,0 +1,71 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class IDate extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + $r='<input type="text" name="'.$this->name.'" id="'.$this->name.'"'. + 'style="border:solid 1px blue;"'. + 'size="10"'. + ' value ="'.$this->value.'"'. + '/>'. + '<img src="image/x-office-calendar.png" id="'.$this->name.'_trigger"'. + ' style="cursor: pointer; border: 1px solid red;" '. + 'onmouseover="this.style.background=\'red\';" onmouseout="this.style.background=\'\'" />'; + $r.='<script type="text/javascript">'. + 'Calendar.setup({'. + // 'date : "'.$this->value.'", + 'inputField : "'.$this->name.'", // id of the input field + ifFormat : "%d.%m.%Y", // format of the input field + button : "'.$this->name.'_trigger", // trigger for the calendar (button ID) + align : "Bl", // alignment (defaults to "Bl") + singleClick : true + }); +</script> +'; + return $r; + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + $r="<span> Date : ".$this->value; + $r.='<input type="hidden" name="'.$this->name.'"'. + 'id="'.$this->name.'"'. + ' value = "'.$this->value.'"></span>'; + return $r; + + } + static public function test_me() + { + + } +} diff --git a/include/class_ifile.php b/include/class_ifile.php new file mode 100644 index 000000000..47c3acbcf --- /dev/null +++ b/include/class_ifile.php @@ -0,0 +1,49 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class IFile extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + $r='<INPUT class="inp" TYPE="file" name="'.$this->name.'" VALUE="'.$this->value.'">'; + return $r; + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + + + } + static public function test_me() + { + + } +} diff --git a/include/class_ihidden.php b/include/class_ihidden.php new file mode 100644 index 000000000..8e37d8534 --- /dev/null +++ b/include/class_ihidden.php @@ -0,0 +1,42 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class IHidden extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + $r='<INPUT TYPE="HIDDEN" id="'.$this->name.'" name="'.$this->name.'" value="'.$this->value.'">'; + return $r; + + } + static public function test_me() + { + + } +} diff --git a/include/class_inum.php b/include/class_inum.php new file mode 100644 index 000000000..401f783db --- /dev/null +++ b/include/class_inum.php @@ -0,0 +1,61 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief for the numeric input text field + */ +require_once('class_itext.php'); +/*!\brief + * This class handles only the numeric input, the input will + * call a javascript + * to change comma to period and will round it (2 decimal) + * + */ +class INum extends IText +{ + function __construct($name='',$value='') { + parent::__construct($name,$value); + $this->javascript='onchange="format_number(this);"'; + $this->size=9; + $this->style='style="text-align:right;border:1px solid blue;margin:2px"'; + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + $this->size=9; + $readonly=" readonly ";$this->style='style="border:solid 1px blue;color:black;background:#EDEDED;text-align:right"'; + $this->value=str_replace('"','',$this->value); + $r='<INPUT '.$this->style.' TYPE="TEXT" id="'. + $this->name.'"'. + 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '. + 'SIZE="'.$this->size.'" '.$this->javascript." $readonly $this->extra >"; + + /* add tag for column if inside a table */ + if ( $this->table == 1 ) $r='<td>'.$r.'</td>'; + + return $r; + + } + +} + + diff --git a/include/class_iperiod.php b/include/class_iperiod.php new file mode 100644 index 000000000..b326ad951 --- /dev/null +++ b/include/class_iperiod.php @@ -0,0 +1,150 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ + /*! \brief Generate the form for the periode + * Data Members + * - $cn connexion to the current folder + * - $type the type of the periode OPEN CLOSE NOTCENTRALIZED or ALL, IT MUST BE SET + * - $filter_year make a filter on the default exercice by default true + * - $user if a filter_year is required then we need who is the user (object User) + * - $show_end_date; $show_end_date is not set or false, do not show the end date default = true + * - $show_start_date; $show_start_date is not set or false, do not show the start date default=true + */ +require_once('class_html_input.php'); + class IPeriod extends HtmlInput +{ + var $type; /*!< $type the type of the periode OPEN CLOSE NOTCENTRALIZED or ALL */ + var $cn; /*!< $cn is the database connection */ + var $show_end_date; /*!< $show_end_date is not set or false, do not show the end date */ + var $show_start_date; /*!< $show_start_date is not set or false, do not show the start date */ + var $filter_year; /*!< $filter_year make a filter on the default exercice by default yes */ + var $user; /*! $user if a filter is required then we need who is the user (object User)*/ + function __construct($p_name="",$p_value="") { + $this->name=$p_name; + $this->readOnly=false; + $this->size=20; + $this->width=50; + $this->heigh=20; + $this->value=$p_value; + $this->selected=""; + $this->table=0; + $this->disabled=false; + $this->javascript=""; + $this->extra2="all"; + $this->show_start_date=true; + $this->show_end_date=true; + + } + /*! + * \brief show the input html for a periode + * \return string containing html code for the HTML + * + * + */ + public function input($p_name=null,$p_value=null) + { + foreach (array('type','cn') as $a){ + if ( ! isset ($this->$a) ) throw new Exception('Variable non définie [ '.$a.']'); + } + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + + switch ($this->type) { + case CLOSED: + $sql_closed="where p_closed=true and p_central = false "; + break; + case OPEN: + $sql_closed="where p_closed=false"; + break; + case NOTCENTRALIZED: + $sql_closed="where p_closed=true and p_central = false "; + break; + case ALL: + $sql_closed=""; + break; + default: + throw new Exception("invalide p_type in ".__FILE__.':'.__LINE__); + } + $sql="select p_id,to_char(p_start,'DD.MM.YYYY') as p_start_string, + to_char(p_end,'DD.MM.YYYY') as p_end_string + from parm_periode + $sql_closed "; + /* Create a filter on the current exercice */ + if ( ! isset($this->filter_year) || (isset($this->filter_year) && $this->filter_year==true)) + { + if (! isset($this->user) ) throw new Exception (__FILE__.':'.__LINE__.' user is not set'); + $cond=''; + if ($this->type == 'all' ) $cond=' where true '; + $cond.=" and p_exercice='".$this->user->get_exercice()."'"; + } + $sql.=" order by p_start,p_end"; + $Res=$this->cn->exec_sql($sql); + $Max=$this->cn->size($Res); + if ( $Max == 0 ) throw new Exception(_('Aucune periode trouvée'),1); + $ret='<SELECT NAME="'.$this->name.'" '.$this->javascript.'>'; + for ( $i = 0; $i < $Max;$i++) { + $l_line=$this->cn->fetch($i); + if ( $this->value==$l_line['p_id'] ) + $sel="SELECTED"; + else + $sel=""; + + if ( $this->show_start_date == true && $this->show_end_date==true ) + { + $ret.=sprintf('<OPTION VALUE="%s" %s>%s - %s',$l_line['p_id'] + ,$sel + ,$l_line['p_start_string'] + ,$l_line['p_end_string']); + } else if ($this->show_start_date == true ) { + $ret.=sprintf('<OPTION VALUE="%s" %s>%s ',$l_line['p_id'] + ,$sel + ,$l_line['p_start_string'] + ); + } else if ( $this->show_end_date == true ) { + $ret.=sprintf('<OPTION VALUE="%s" %s>%s ',$l_line['p_id'] + ,$sel + ,$l_line['p_end_string'] + ); + } + + } + $ret.="</SELECT>"; + return $ret; + + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + $r="not implemented ".__FILE__.":".__LINE__; + return $r; + + } + static public function test_me() + { + + } +} diff --git a/include/class_ipopup.php b/include/class_ipopup.php new file mode 100644 index 000000000..ecf4c9b76 --- /dev/null +++ b/include/class_ipopup.php @@ -0,0 +1,150 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief create a popup in html above the current layer + * the html inside the popup cannot contain any floating elt as div.. + * + */ +require_once('function_javascript.php'); +require_once('class_html_input.php'); + +class IPopup extends HtmlInput +{ + var $name; /*!< name name and id of the div */ + function __construct($p_name) + { + $this->name=$p_name; + $this->parameter=''; + $this->attribute=array(); + } + function set_width($p_val) { + $js=sprintf('$("%s'.'_border").style.width="%s";', + $this->name,$p_val); + $this->parameter.=$js; + + } + function set_height($p_val) { + $js=sprintf('$("%s'.'_border").style.height="%s";', + $this->name,$p_val); + $this->parameter.=$js; + + } + + function set_zindex($p_val) { + $js=sprintf('$("%s'.'_border").style.zIndex=%d;', + $this->name,$p_val); + $js=sprintf('$("%s'.'_content").style.zIndex=%d;', + $this->name,$p_val); + $this->parameter.=$js; + } + /*!\brief set the attribute thanks javascript as the width, the position ... + *\param $p_name attribute name + *\param $p_val val of the attribute + *\note add to the this->attribut, it will be used in input() + */ + function set_attribute($p_name,$p_val) { + $this->attribute[]=array($p_name,$p_val); + } + /*!\brief set the title of a ipopup thanks javascript and php mode + *\param title of the IPopup + *\return html string with js script + */ + function set_title($p_title) { + $this->title=$p_title; + $s=sprintf('$("%s_"+"title")="%s"', + $this->name,$this->title); + return create_script($s); + } + function input() { + $r=""; + $r=sprintf('<div id="%s_fond" name="fond" class="popup_back">',$this->name); + $r.="</div>"; + if ( isset($this->title) && trim($this->title) != "" ) { + $r.=sprintf('<div name ="%s_border" id="%s_border" class="popup_border_title">', + $this->name, + $this->name); + $r.=sprintf('<span id="%s_">%s</span>',$this->name,$this->title); + } else { + $r.=sprintf('<div name ="%s_border" id="%s_border" class="popup_border_notitle">', + $this->name, + $this->name); + } + $javascript=sprintf("javascript:hide('%s_border');hide('%s_fond')", + $this->name, + $this->name); + $r.='<div style="position:absolute;top:0px;right:10px;font-weight:normal;font-size:8px;background-color:blue;color:black;text-align:right">'; + $r.=sprintf('<a style="color:white;text-decoration:none" href="%s">'._('Fermer').'</a></div>', + $javascript); + $r.=sprintf('<div name ="%s_content" id="%s_content" class="popup_content"> %s </div></div>', + $this->name, + $this->name, + $this->value); + + /* Add properties at the widget */ + $attr=$this->parameter; + for ($i=0;$i< count($this->attribute);$i++){ + list($name,$value)=$this->attribute[$i]; + $tmp1=sprintf("$('%s').%s='%s';", + $this->name, + $name, + $value); + $attr.=$tmp1; + } + + /* add draggable possibility */ + $draggable=sprintf(" new Draggable('%s_border',{starteffect:function(){ + new Effect.Highlight('%s_border',{scroll:window,queue:'end'}); } });" + ,$this->name + ,$this->name); + $attr=create_script($attr.$draggable); + $r.=$attr; + return $r; + } + + static function test_me() { + echo js_include('js/scripts.js'); + require_once('class_iselect.php'); + $select=new ISelect('a'); + $select->value=array(array ('value'=>0,'label'=>'Première valeur'), + array ('value'=>0,'label'=>'Première valeur'), + array ('value'=>0,'label'=>'Première valeur')); + for ($e=0;$e<50;$e++){echo $select->input();if ($e%10 == 0 ) echo '<hr>';} + $a=new IPopup('pop1'); + $a->value=""; + for ($e=0;$e<500;$e++){$a->value.="<p>Il etait une fois dans un pays vraiment lointain où même plus loin que ça</p>";} + echo $a->input(); +echo <<<EOF + <input type="button" onclick="hide('pop1');hide('pop1_border')" value="cacher"> + <input type="button" onclick="showIPopup('pop1')" value="montrer"> +EOF; + $a=new IPopup('pop2'); + $a->value=''; + $a->title="Retrouvez une saucisse"; + echo $a->input(); +echo <<<EOF + <input type="button" onclick="hide('pop2');hide('pop2_border')" value="cacher"> + <input type="button" onclick="showIPopup('pop2')" value="montrer"> +EOF; + + } +} diff --git a/include/class_acexception.php b/include/class_ipopupcard.php similarity index 85% rename from include/class_acexception.php rename to include/class_ipopupcard.php index 6da5dcb01..131f89332 100644 --- a/include/class_acexception.php +++ b/include/class_ipopupcard.php @@ -21,12 +21,15 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /*!\file - * \brief acException extends Exception + * \brief */ +require_once('class_ipopup.php'); -/*! \brief acException extends Exception - * - */ -class AcException extends Exception { +class IPopupCard extends IPopup { + function __construct($name="") { } + static function testme() { + + } +} \ No newline at end of file diff --git a/include/class_iposte.php b/include/class_iposte.php new file mode 100644 index 000000000..efed2a071 --- /dev/null +++ b/include/class_iposte.php @@ -0,0 +1,142 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + * + */ +require_once('class_html_input.php'); +require_once('class_itext.php'); +require_once('class_ibutton.php'); +require_once('class_ipopup.php'); +require_once('function_javascript.php'); +/** + *@brief show a button, for selecting a account and a input text for manually inserting an account + * the different value of table are + * - 0 no table, it means no TD tags + * - 1 the button and the text are separated by TD tags + * - 2 the button and the text are in the same column (TD) + *\note we use the set_attribute for giving parameter to search_account + * attribute are + * - phpsessid + * - gDossier + * - jrn if set there is a filter on a ledger, in that case, contains the jrn_id (0 for no filter) + * - ipopup ipopup to open + * - account field to update with the account_number, + * - label field to update control with account_label, + * - bracket if true return the account_number between bracket + * - noquery don't start a search with the content + * - no_overwrite do not overwrite the existant content + * - query value to seek + *\see ajax_poste.php + *\code +require_once('class_iposte.php'); +echo IPoste::ipopup('ipop_account'); +// The popup +$value->set_attribute('ipopup','ipop_account'); +// the input text to update +$value->set_attribute('account','p_value'); +\endcode + */ +class IPoste extends HtmlInput +{ + static function ipopup($p_name) { + $ip=new IPopup($p_name); + $ip->title='Plan comptable'; + $ip->value=''; + $ip->set_height('80%'); + $ip->set_zindex(20); + return $ip->input(); + } + /*!\brief create the javascript for adding the javascript properties + * onto the *button* + *\return a javascript surrounded by the tag <SCRIPT> + */ + public function get_js_attr(){ + $attr=""; + /* Add properties at the widget */ + for ($i=0;$i< count($this->attribute);$i++){ + list($name,$value)=$this->attribute[$i]; + $tmp1=sprintf("$('%s_bt').%s='%s';", + $this->name, + $name, + $value); + $attr.=$tmp1; + } + $attr=create_script($attr); + return $attr; + } + + public function dsp_button() { + $ib=new IButton($this->name.'_bt'); + $ib->javascript='search_poste(this)'; + + /* add the property */ + $sc=$this->get_js_attr(); + return $ib->input().$sc; + } + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + //-- + if ( ! isset($this->ctrl) ) $this->ctrl='none'; + $l_sessid=$_REQUEST['PHPSESSID']; + if ( ! isset($this->javascript)) $this->javascript=""; + + /* create the text */ + $itext=new IText($this->name,$this->value); + $itext->size=(isset($this->size))?$this->size:10; + + /* create the button */ + $ibutton=$this->dsp_button(); + $r=$ibutton.$itext->input(); + if ( $this->table==1) $r=td($r); + + return $r; + + + //-- + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + $r=sprintf('<TD><input type="hidden" name="%s" value="%s"> + %s + + </TD>', + $this->name, + $this->value , + $this->value + ); + + return $r; + + } + static public function test_me() + { + + } +} diff --git a/include/class_iradio.php b/include/class_iradio.php new file mode 100644 index 000000000..5b2404ebf --- /dev/null +++ b/include/class_iradio.php @@ -0,0 +1,55 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class IRadio extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + + $check=( $this->selected==true||$this->selected=='t' )?"checked":"unchecked"; + $r='<input type="RADIO" name="'.$this->name.'"'; + $r.=" VALUE=\"$this->value\""; + $r.=" $check > "; + return $r; + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + + $check=( $this->selected==true || $this->selected=='t' )?"Yes":"no"; + $r=$check; + return $r; + + } + static public function test_me() + { + + } +} diff --git a/include/class_isearch.php b/include/class_isearch.php new file mode 100644 index 000000000..7941f4c3d --- /dev/null +++ b/include/class_isearch.php @@ -0,0 +1,48 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class ISearch extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + + + } + static public function test_me() + { + + } +} diff --git a/include/class_iselect.php b/include/class_iselect.php new file mode 100644 index 000000000..0b3eb7296 --- /dev/null +++ b/include/class_iselect.php @@ -0,0 +1,78 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class ISelect extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + + + $disabled=($this->disabled==true)?"disabled":""; + + //echo "<b>Selected <b>".$this->selected; + $r=(isset($this->label))?$this->label:''; + + // if ( $this->table == 1 ) $r=td($r); + + $a="<SELECT id=\"$this->name\" NAME=\"$this->name\" $this->javascript $disabled>"; + + if (empty($this->value)) return ''; + for ( $i=0;$i<sizeof($this->value);$i++) + { + $checked=($this->selected==$this->value[$i]['value'])?"SELECTED":""; + $a.='<OPTION VALUE="'.$this->value[$i]['value'].'" '.$checked.'>'; + $a.=$this->value[$i]['label']; + } + $a.="</SELECT>"; + if ( $this->table == 1 ) $a='<td>'.$a.'</td>'; + + return $r.$a; + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + $r=""; + for ( $i=0;$i<sizeof($this->value);$i++) + { + if ($this->selected==$this->value[$i]['value'] ) + { + $r=h($this->value[$i]['label']); + + } + } + return $r; + } + + + static public function test_me() + { + + } +} diff --git a/include/class_ispan.php b/include/class_ispan.php new file mode 100644 index 000000000..d33907a56 --- /dev/null +++ b/include/class_ispan.php @@ -0,0 +1,54 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class ISpan extends HtmlInput +{ + public function __construct($p_name="",$p_value="") { + parent::__construct($p_name,$p_value); + $this->style="display:inline"; + + } + /*!\brief show the html input of the widget, the span is always readonly */ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + + + $r=sprintf('<span style="%s" id="%s">%s </span>', + $this->style, + $this->name, + $this->value + ); + + return $r; + } + + static public function test_me() + { + + } +} diff --git a/include/class_itext.php b/include/class_itext.php new file mode 100644 index 000000000..0273845a2 --- /dev/null +++ b/include/class_itext.php @@ -0,0 +1,79 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class IText extends HtmlInput +{ + function __construct($name='',$value='') { + parent::__construct($name,$value); + $this->style=' class="input_text" '; + } + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + + $t= ((isset($this->title)))?'title="'.$this->title.'" ':' '; + + $extra=(isset($this->extra))?$this->extra:""; + + $this->value=str_replace('"','',$this->value); + $r='<INPUT '.$this->style.' TYPE="TEXT" id="'. + $this->name.'"'.$t. + 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '. + 'SIZE="'.$this->size.'" '.$this->javascript." $this->extra >"; + /* add tag for column if inside a table */ + if ( $this->table == 1 ) $r='<td>'.$r.'</td>'; + + return $r; + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + $t= ((isset($this->title)))?'title="'.$this->title.'" ':' '; + + $extra=(isset($this->extra))?$this->extra:""; + + $readonly=" readonly ";$this->style='style="border:solid 1px blue;color:black;background:#EDEDED"'; + $this->value=str_replace('"','',$this->value); + $r='<INPUT '.$this->style.' TYPE="TEXT" id="'. + $this->name.'"'.$t. + 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '. + 'SIZE="'.$this->size.'" '.$this->javascript." $readonly $this->extra >"; + + /* add tag for column if inside a table */ + if ( $this->table == 1 ) $r='<td>'.$r.'</td>'; + + return $r; + + } + static public function test_me() + { + + } +} diff --git a/include/class_itextarea.php b/include/class_itextarea.php new file mode 100644 index 000000000..cdf512409 --- /dev/null +++ b/include/class_itextarea.php @@ -0,0 +1,62 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class ITextarea extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + + $r=""; + $r.='<TEXTAREA style="border:solid blue 1px" name="'.$this->name.'" id="'.$this->name.'"'; + $r.=" rows=\"$this->heigh\" "; + $r.=" cols=\"$this->width\" "; + $r.='>'; + $r.=$this->value; + + $r.="</TEXTAREA>"; + return $r; + } + + + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + $r='<p>'; + $r.=h($this->value); + $r.=sprintf('<input type="hidden" name="%s" value="%s">', + $this->name,h($this->value)); + $r.='</p>'; + + } + static public function test_me() + { + + } +} diff --git a/include/class_itva.php b/include/class_itva.php new file mode 100644 index 000000000..212cabfe0 --- /dev/null +++ b/include/class_itva.php @@ -0,0 +1,59 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_html_input.php'); + class ITva extends HtmlInput +{ + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + + $r=sprintf('Tva <INPUT TYPE="Text" style="border:solid 1px blue;" '. + ' NAME="%s" VALUE="%s" SIZE="3" onChange="ChangeTVA(\'%s\',\'%s\');">', + $this->name, + $this->value, + $this->label, + $this->name); + $l_sessid=$_REQUEST['PHPSESSID']; + $r.=sprintf("<input type=\"button\" value=\"Tva\" + onClick=\"ShowTva('%s',%d,'%s');\"></TD>", + $l_sessid,dossier::id(),$this->name); + if ( $this->table == 1 ) $r=td($r); + return $r; + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + throw new Exception ("Pas de function display pour la TVA",1); + } + static public function test_me() + { + + } +} diff --git a/include/class_itva_select.php b/include/class_itva_select.php new file mode 100644 index 000000000..0ada9acdc --- /dev/null +++ b/include/class_itva_select.php @@ -0,0 +1,53 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision: 1615 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief Html Input + */ +require_once('class_iselect.php'); + class ITva_Select extends ISelect +{ + public function __construct($p_cn) { $this->db=$p_cn; } + + /*!\brief show the html input of the widget*/ + public function input($p_name=null,$p_value=null) + { + $this->name=($p_name==null)?$this->name:$p_name; + $this->value=($p_value==null)?$this->value:$p_value; + if ( $this->readOnly==true) return $this->display(); + + $select_tva=$this->db->make_array("select tva_id,tva_label from tva_rate order by tva_label asc",0); + $this->value=$select_tva; + $r=parent::input(); + return $r; + + } + /*!\brief print in html the readonly value of the widget*/ + public function display() + { + throw new Exception ("Pas de function display pour la TVA",1); + } + static public function test_me() + { + + } +} diff --git a/include/class_own.php b/include/class_own.php index e0dcca98c..4a02a83a1 100644 --- a/include/class_own.php +++ b/include/class_own.php @@ -30,9 +30,9 @@ class Own { // constructor function Own($p_cn) { $this->db=$p_cn; - $Res=ExecSql($p_cn,"select * from parameter where pr_id like 'MY_%'"); - for ($i = 0;$i < pg_NumRows($Res);$i++) { - $row=pg_fetch_array($Res,$i); + $Res=$p_cn->exec_sql("select * from parameter where pr_id like 'MY_%'"); + for ($i = 0;$i < Database::num_row($Res);$i++) { + $row=Database::fetch_array($Res,$i); $key=$row['pr_id']; $elt=$row['pr_value']; // store value here @@ -59,13 +59,13 @@ class Own { $this->check($p_attr); $value=$this->$p_attr; // check if the parameter does exist - if ( getDbValue($this->db,'select count(*) from parameter where pr_id=$1',array($p_attr)) != 0 ) + if ( $this->db->get_value('select count(*) from parameter where pr_id=$1',array($p_attr)) != 0 ) { - $Res=ExecSqlParam($this->db,"update parameter set pr_value=$1 where pr_id=$2", + $Res=$this->db->exec_sql("update parameter set pr_value=$1 where pr_id=$2", array($value,$p_attr)); } else { - $Res=ExecSqlParam($this->db,"insert into parameter (pr_id,pr_value) values( $1,$2)", + $Res=$this->db->exec_sql("insert into parameter (pr_id,pr_value) values( $1,$2)", array($p_attr,$value)); } @@ -93,6 +93,7 @@ class Own { $this->save('MY_STRICT'); $this->save('MY_TVA_USE'); $this->save('MY_PJ_SUGGEST'); + $this->save('MY_CHECK_PERIODE'); } diff --git a/include/class_periode.php b/include/class_periode.php index 7e192008e..08ac85988 100644 --- a/include/class_periode.php +++ b/include/class_periode.php @@ -20,15 +20,15 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * \brief definition of the class periode */ -/*! +/*! * \brief For the periode tables parm_periode and jrn_periode */ require_once ('ac_common.php'); require_once ('debug.php'); -require_once ('postgres.php'); +require_once ('class_database.php'); class Periode { var $cn; /*!< database connection */ var $jrn_def_id; /*!< the jr, 0 means all the ledger*/ @@ -37,7 +37,8 @@ class Periode { open and CE for centralized */ var $p_start; /*!< start of the periode */ var $p_end; /*!< end of the periode */ - function __construct($p_cn) { + function __construct($p_cn,$p_id=0) { + $this->p_id=$p_id; $this->cn=$p_cn; } function set_jrn($p_jrn) { @@ -48,29 +49,32 @@ class Periode { } /*!\brief return the p_id of the start and the end of the exercice *into an array - *\param $p_exercice + *\param $p_exercice *\return array [start]=>,[end]=> */ function limit_year($p_exercice) { - $sql_start="select p_id from parm_periode where p_exercice=$1 order by p_start ASC"; - $start=getDbValue($this->cn,$sql_start,array($p_exercice)); - $sql_end="select p_id from parm_periode where p_exercice=$1 order by p_end DESC"; - $end=getDbValue($this->cn,$sql_end,array($p_exercice)); + $sql_start="select p_id from parm_periode where p_exercice=$1 order by p_start ASC limit 1"; + $start=$this->cn->get_value($sql_start,array($p_exercice)); + $sql_end="select p_id from parm_periode where p_exercice=$1 order by p_end DESC limit 1"; + $end=$this->cn->get_value($sql_end,array($p_exercice)); return array("start"=>$start,"end"=>$end); } + /*!\brief check if a periode is closed. If jrn_def_id is set to a no zero value then check only for this ledger + *\return 1 is the periode is closed otherwise return 0 + */ function is_closed() { if ( $this->jrn_def_id != 0 ) $sql="select status from jrn_periode ". " where jrn_def_id=".$this->jrn_def_id. " and p_id =".$this->p_id; - else + else $sql="select p_closed as status from parm_periode ". " where ". " p_id =".$this->p_id; - $res=ExecSql($this->cn,$sql); - $status=pg_fetch_result($res,0,0); + $res=$this->cn->exec_sql($sql); + $status=Database::fetch_result($res,0,0); echo_debug(__FILE__.':'.__LINE__.'- is_closed','return ',$status); - if ( $status == 'CL' || $status=='t' ||$status=='CE') + if ( $status == 'CL' || $status=='t' ||$status=='CE') return 1; return 0; } @@ -81,13 +85,13 @@ class Periode { $sql="select status from jrn_periode ". " where jrn_def_id=".$this->jrn_def_id. " and p_id =".$this->p_id; - else + else $sql="select p_closed as status from parm_periode ". " where ". " p_id =".$this->p_id; - $res=ExecSql($this->cn,$sql); - $status=pg_fetch_result($res,0,0); - if ( $status == 'OP' || $status=='f' ) + $res=$this->cn->exec_sql($sql); + $status=Database::fetch_result($res,0,0); + if ( $status == 'OP' || $status=='f' ) return 1; return 0; } @@ -96,86 +100,86 @@ class Periode { $sql="select status from jrn_periode ". " where jrn_def_id=".$this->jrn_def_id. " and p_id =".$this->p_id; - else + else $sql="select p_centralized as status from parm_periode ". " where ". " p_id =".$this->p_id; - $res=ExecSql($this->cn,$sql); - $status=pg_fetch_result($res,0,0); - if ( $status == 'CE' || $status=='t' ) + $res=$this->cn->exec_sql($sql); + $status=Database::fetch_result($res,0,0); + if ( $status == 'CE' || $status=='t' ) return 1; return 0; } function close() { if ( $this->jrn_def_id == 0 ) { - ExecSql($this->cn,"update parm_periode set p_closed=true where p_id=". + $this->cn->exec_sql("update parm_periode set p_closed=true where p_id=". $this->p_id); - ExecSql($this->cn,"update jrn_periode set status='CL' ". + $this->cn->exec_sql("update jrn_periode set status='CL' ". " where p_id = ".$this->p_id); return; }else { - ExecSql($this->cn,"update jrn_periode set status='CL' ". + $this->cn->exec_sql("update jrn_periode set status='CL' ". " where jrn_def_id=".$this->jrn_def_id." and ". " p_id = ".$this->p_id); /* if all ledgers have this periode closed then synchro with the table parm_periode */ - $nJrn=CountSql( $this->cn,"select * from jrn_periode where ". + $nJrn=count_sql( $this->cn,"select * from jrn_periode where ". " p_id=".$this->p_id); - $nJrnPeriode=CountSql( $this->cn,"select * from jrn_periode where ". + $nJrnPeriode=count_sql( $this->cn,"select * from jrn_periode where ". " p_id=".$this->p_id." and status='CL'"); - if ( $nJrnPeriode==$nJrn) - ExecSql($this->cn,"update parm_periode set p_closed=true where p_id=".$this->p_id); + if ( $nJrnPeriode==$nJrn) + $this->cn->exec_sql("update parm_periode set p_closed=true where p_id=".$this->p_id); return; } - + } function centralized() { if ( $this->jrn_def_id == 0 ) { - ExecSql($this->cn,"update parm_periode set p_central=true"); + $this->cn->exec_sql("update parm_periode set p_central=true"); return; }else { - ExecSql($this->cn,"update jrn_periode set status='CE' ". + $this->cn->exec_sql("update jrn_periode set status='CE' ". " where ". " p_id = ".$this->p_id); return; } - + } -/*! +/*! * \brief Display all the periode and their status * - */ + */ function display_form_periode() { $str_dossier=dossier::get(); if ( $this->jrn_def_id==0 ) { - $Res=ExecSql($this->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 + $Res=$this->cn->exec_sql("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 from parm_periode order by p_start,p_end"); - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); echo '<TABLE ALIGN="CENTER">'; echo "</TR>"; echo '<TH> Date début </TH>'; echo '<TH> Date fin </TH>'; echo '<TH> Exercice </TH>'; echo "</TR>"; - + for ($i=0;$i<$Max;$i++) { - $l_line=pg_fetch_array($Res,$i); - echo '<TR>'; + $l_line=Database::fetch_array($Res,$i); + echo '<TR>'; echo '<TD ALIGN="CENTER"> '.$l_line['date_start'].'</TD>'; echo '<TD ALIGN="CENTER"> '.$l_line['date_end'].'</TD>'; echo '<TD ALIGN="CENTER"> '.$l_line['p_exercice'].'</TD>'; - - if ( $l_line['p_closed'] == 't' ) { + + if ( $l_line['p_closed'] == 't' ) { $closed=($l_line['p_central']=='t')?'<TD>Centralisée</TD>':'<TD>Fermée</TD>'; $change='<TD></TD>'; $remove='<TD></TD>'; } else { - $closed='<TD class="mtitle">'; + $closed='<TD class="mtitle">'; $closed.='<A class="mtitle" HREF="?p_action=periode&action=closed&p_per='.$l_line['p_id'].'&'.$str_dossier.'"> Cloturer</A>'; $change='<TD class="mtitle">'; $change.='<A class="mtitle" HREF="?p_action=periode&action=change_per&p_per='. @@ -185,15 +189,15 @@ class Periode { $remove='<TD class="mtitle">'; $remove.='<A class="mtitle" HREF="?p_action=periode&action=delete_per&p_per='. $l_line['p_id']."&$str_dossier\"> Efface</A>"; - + } echo "$closed"; echo $change; - + echo $remove; - + echo '</TR>'; - + } echo '<TR> <FORM ACTION="?p_action=periode" METHOD="POST">'; echo dossier::hidden(); @@ -204,17 +208,17 @@ class Periode { echo '<TD></TD>'; echo '<TD></TD>'; echo '</FORM></TR>'; - + echo '</TABLE>'; - + } else { - $Res=ExecSql($this->cn,"select p_id,to_char(p_start,'DD.MM.YYYY') as date_start,to_char(p_end,'DD.MM.YYYY') as date_end,status,p_exercice + $Res=$this->cn->exec_sql("select p_id,to_char(p_start,'DD.MM.YYYY') as date_start,to_char(p_end,'DD.MM.YYYY') as date_end,status,p_exercice from parm_periode join jrn_periode using (p_id) where jrn_def_id=".$this->jrn_def_id." order by p_start,p_end"); - $Max=pg_NumRows($Res); - $r=ExecSql($this->cn,'select jrn_Def_name from jrn_Def where jrn_Def_id='. + $Max=Database::num_row($Res); + $r=$this->cn->exec_sql('select jrn_Def_name from jrn_Def where jrn_Def_id='. $this->jrn_def_id); - $jrn_name=pg_fetch_result($r,0,0); + $jrn_name=Database::fetch_result($r,0,0); echo '<h2> Journal '.$jrn_name.'</h2>'; echo '<TABLE ALIGN="CENTER">'; echo "</TR>"; @@ -222,25 +226,25 @@ class Periode { echo '<TH> Date fin </TH>'; echo '<TH> Exercice </TH>'; echo "</TR>"; - + for ($i=0;$i<$Max;$i++) { - $l_line=pg_fetch_array($Res,$i); - echo '<TR>'; + $l_line=Database::fetch_array($Res,$i); + echo '<TR>'; echo '<TD ALIGN="CENTER"> '.$l_line['date_start'].'</TD>'; echo '<TD ALIGN="CENTER"> '.$l_line['date_end'].'</TD>'; echo '<TD ALIGN="CENTER"> '.$l_line['p_exercice'].'</TD>'; - - if ( $l_line['status'] != 'OP' ) { + + if ( $l_line['status'] != 'OP' ) { $closed=($l_line['status']=='CE')?'<TD>Centralisee</TD>':'<TD>Fermée</TD>'; } else { - $closed='<TD class="mtitle">'; + $closed='<TD class="mtitle">'; $closed.='<A class="mtitle" HREF="?p_action=periode&action=closed&p_per='.$l_line['p_id'].'&'.$str_dossier.'&jrn_def_id='.$this->jrn_def_id.'"> Cloturer</A>'; - $closed.='</td>'; + $closed.='</td>'; } echo "$closed"; - + echo '</TR>'; - + } echo '</TABLE>'; @@ -251,44 +255,46 @@ class Periode { isDate($p_date_end) == null || strlen (trim($p_exercice)) == 0 || (string) $p_exercice != (string)(int) $p_exercice) - { + { return 1; } - $p_id=NextSequence($this->cn,'s_periode'); + $p_id=$this->cn->get_next_seq('s_periode'); $sql=sprintf(" insert into parm_periode(p_id,p_start,p_end,p_closed,p_exercice)". "values (%d,to_date('%s','DD.MM.YYYY'),to_date('%s','DD.MM.YYYY')". - ",'f','%s')", + ",'f','%s')", $p_id, $p_date_start, $p_date_end, $p_exercice); try { - StartSql($this->cn); - $Res=ExecSql($this->cn,$sql); - $Res=ExecSql($this->cn,"insert into jrn_periode (jrn_def_id,p_id,status) ". + $this->cn->start(); + $Res=$this->cn->exec_sql($sql); + $Res=$this->cn->exec_sql("insert into jrn_periode (jrn_def_id,p_id,status) ". "select jrn_def_id,$p_id,'OP' from jrn_def"); - Commit($this->cn); + $this->cn->commit(); } catch (Exception $e) { - Rollback($this->cn); + $this->cn->rollback(); echo_debug(__FILE__.':'.__LINE__.'- Periode insert','Exception ',$e); echo_debug(__FILE__.':'.__LINE__.'- Periode insert','Exception ',$e->getMessage()); return 1; } return 0; } - /*!\brief load data from database + /*!\brief load data from database + *\return 0 on success and -1 on error */ function load() { - $row=get_array($this->cn,"select p_start,p_end,p_exercice,p_closed,p_central from parm_periode where p_id=$1", + $row=$this->cn->get_array("select p_start,p_end,p_exercice,p_closed,p_central from parm_periode where p_id=$1", array($this->p_id)); - if ($row == null ) return; - + if ($row == null ) return -1; + $this->p_start=$row[0]['p_start']; $this->p_end=$row[0]['p_end']; $this->p_exercice=$row[0]['p_exercice']; $this->p_closed=$row[0]['p_closed']; $this->p_central=$row[0]['p_central']; + return 0; } /*!\brief return the max and the min periode of the exercice given @@ -298,47 +304,72 @@ class Periode { */ function get_limit($p_exercice) { - $max=getDbValue($this->cn,"select p_id from parm_periode where p_exercice=$1 order by p_start asc",array($p_exercice)); - $min=getDbValue($this->cn,"select p_id from parm_periode where p_exercice=$1 order by p_start desc",array($p_exercice)); + $max=$this->cn->get_value("select p_id from parm_periode where p_exercice=$1 order by p_start asc limit 1",array($p_exercice)); + $min=$this->cn->get_value("select p_id from parm_periode where p_exercice=$1 order by p_start desc limit 1",array($p_exercice)); $rMax=new Periode($this->cn); $rMax->p_id=$max; - $rMax->load(); + if ( $rMax->load() ) throw new Exception('Periode n\'existe pas'); $rMin=new Periode($this->cn); $rMin->p_id=$min; - $rMin->load(); + if ( $rMin->load() ) throw new Exception('Periode n\'existe pas'); return array($rMax,$rMin); } -/*! +/*! * \brief Give the start & end date of a periode - * - * \return array containing the start date & the end date - * - * - */ - public function get_date_limit($p_periode) { + * \param $p_periode is the periode id, if omitted the value is the current object + * \return array containing the start date & the end date, index are p_start and p_end or NULL if + * nothing is found +\verbatim +$ret['p_start']=>'01.01.2009' +$ret['p_end']=>'31.01.2009' +\endverbatim + */ + public function get_date_limit($p_periode = 0) { + if ( $p_periode == 0 ) $p_periode=$this->p_id; $sql="select to_char(p_start,'DD.MM.YYYY') as p_start, to_char(p_end,'DD.MM.YYYY') as p_end from parm_periode - where p_id=".$p_periode; - $Res=ExecSql($this->cn,$sql); - if ( pg_NumRows($Res) == 0) return null; - return pg_fetch_array($Res,0); - - } + where p_id=$1"; + $Res=$this->cn->exec_sql($sql,array($p_periode)); + if ( Database::num_row($Res) == 0) return null; + return Database::fetch_array($Res,0); + } +/*!\brief return the first day of periode +*the this->p_id must be said +*\return a string with the date (DD.MM.YYYY) +*/ public function first_day() { list($p_start,$p_end)=$this->get_date_limit($this->p_id); return $p_start; } - function get_exercice() { - $sql="select p_exercice from parm_periode where p_id=".$this->id; - $Res=ExecSql($this->cn,$sql); - if ( pg_NumRows($Res) == 0) return null; - return pg_fetch_result($Res,0,0); + function get_exercice($p_id=0) { + if ( $p_id == 0 ) $p_id=$this->p_id; + $sql="select p_exercice from parm_periode where p_id=".$p_id; + $Res=$this->cn->exec_sql($sql); + if ( Database::num_row($Res) == 0) return null; + return Database::fetch_result($Res,0,0); } +/*!\brief retrieve the periode thanks the date_end +*\param date format DD.MM.YYYY + * \return the periode id + *\exception if not periode is found or if more than one periode is found + */ + function find_periode($p_date) { + $sql="select p_id from parm_periode where p_start <= to_date($1,'DD.MM.YYYY') and p_end >= to_date($1,'DD.MM.YYYY') "; + $ret=$this->cn->exec_sql($sql,array($p_date)); + $nb_periode=Database::num_row($ret); + if ( $nb_periode == 0 ) + throw (new Exception('Aucune période trouvée',101)); + if ( $nb_periode > 1 ) + throw (new Exception("Trop de périodes trouvées $nb_periode pour $p_date",100)); + $per=Database::fetch_result($ret,0); + $this->p_id=$per; + return $per; + } static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $obj=new Periode($cn); $obj->set_jrn(1); $obj->display_form_periode(); diff --git a/include/class_pre_op_ach.php b/include/class_pre_op_ach.php index 5d7372f23..b0f2c661d 100644 --- a/include/class_pre_op_ach.php +++ b/include/class_pre_op_ach.php @@ -57,7 +57,7 @@ class Pre_op_ach extends Pre_operation_detail { */ function save() { try { - StartSql($this->db); + $this->db->start(); if ($this->operation->save() == false ) return; // save the client @@ -67,7 +67,7 @@ class Pre_op_ach extends Pre_operation_detail { $this->operation->od_id, $this->e_client, "f"); - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); // save the selling for ($i=0;$i<$this->operation->nb_item;$i++) { $sql=sprintf('insert into op_predef_detail (opd_poste,opd_amount,opd_tva_id,opd_quantity,'. @@ -82,13 +82,13 @@ class Pre_op_ach extends Pre_operation_detail { $this->operation->od_id, $this->{"e_march".$i."_tva_amount"} ); - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } } catch (Exception $e) { echo ($e->getMessage()); - Rollback($this->db); + $this->db->rollback(); } - Commit($this->db); + $this->db->commit(); } /*!\brief compute an array accordingly with the FormVenView function */ @@ -119,8 +119,8 @@ class Pre_op_ach extends Pre_operation_detail { $sql="select opd_id,opd_poste,opd_amount,opd_tva_id,opd_debit,". " opd_quantity,opd_tva_amount from op_predef_detail where od_id=".$this->operation->od_id. " order by opd_id"; - $res=ExecSql($this->db,$sql); - $array=pg_fetch_all($res); + $res=$this->db->exec_sql($sql); + $array=Database::fetch_all($res); return $array; } function set_od_id($p_id) { diff --git a/include/class_pre_op_advanced.php b/include/class_pre_op_advanced.php index 37f903d25..2e7c82fae 100644 --- a/include/class_pre_op_advanced.php +++ b/include/class_pre_op_advanced.php @@ -56,7 +56,7 @@ class Pre_Op_Advanced extends Pre_operation_detail { */ function save() { try { - StartSql($this->db); + $this->db->start(); if ($this->operation->save() == false ) return; // save the selling @@ -75,12 +75,12 @@ class Pre_Op_Advanced extends Pre_operation_detail { $this->{'isqc'.$i} ); - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } } catch (Exception $e) { echo ($e->getMessage()); - Rollback($this->db); + $this->db->rollback(); } } @@ -122,8 +122,8 @@ class Pre_Op_Advanced extends Pre_operation_detail { $sql="select opd_id,opd_poste,opd_amount,opd_debit,". " opd_qc from op_predef_detail where od_id=".$this->operation->od_id. " order by opd_id"; - $res=ExecSql($this->db,$sql); - $array=pg_fetch_all($res); + $res=$this->db->exec_sql($sql); + $array=Database::fetch_all($res); return $array; } function set_od_id($p_id) { diff --git a/include/class_pre_op_fin.php b/include/class_pre_op_fin.php index 6225aaff3..65098502a 100644 --- a/include/class_pre_op_fin.php +++ b/include/class_pre_op_fin.php @@ -52,7 +52,7 @@ class Pre_op_fin extends Pre_operation_detail { */ function save() { try { - StartSql($this->db); + $this->db->start(); if ($this->operation->save() == false ) return; // save the client @@ -62,7 +62,7 @@ class Pre_op_fin extends Pre_operation_detail { $this->operation->od_id, $this->e_bank_account, "t"); - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); // save the selling for ($i=0;$i<$this->operation->nb_item;$i++) { $sql=sprintf('insert into op_predef_detail (opd_poste,'. @@ -76,11 +76,11 @@ class Pre_op_fin extends Pre_operation_detail { 'f', $this->operation->od_id ); - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } } catch (Exception $e) { echo ($e->getMessage()); - Rollback($this->db); + $this->db->rollback(); } } @@ -111,8 +111,8 @@ class Pre_op_fin extends Pre_operation_detail { $sql="select opd_id,opd_poste,opd_amount,opd_comment,opd_debit". " from op_predef_detail where od_id=".$this->operation->od_id. " order by opd_id"; - $res=ExecSql($this->db,$sql); - $array=pg_fetch_all($res); + $res=$this->db->exec_sql($sql); + $array=Database::fetch_all($res); return $array; } function set_od_id($p_id) { diff --git a/include/class_pre_op_ods.php b/include/class_pre_op_ods.php index fbc79a1d4..b77e6045d 100644 --- a/include/class_pre_op_ods.php +++ b/include/class_pre_op_ods.php @@ -53,7 +53,7 @@ class Pre_op_ods extends Pre_operation_detail { */ function save() { try { - StartSql($this->db); + $this->db->start(); if ($this->operation->save() == false ) return; @@ -68,11 +68,11 @@ class Pre_op_ods extends Pre_operation_detail { ($this->{"e_account".$i."_type"}=='d')?'t':'f', $this->operation->od_id ); - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } } catch (Exception $e) { echo ($e->getMessage()); - Rollback($this->db); + $this->db->rollback(); } } @@ -102,8 +102,8 @@ class Pre_op_ods extends Pre_operation_detail { $sql="select opd_id,opd_poste,opd_amount,opd_debit". " from op_predef_detail where od_id=".$this->operation->od_id. " order by opd_debit, opd_id,opd_amount"; - $res=ExecSql($this->db,$sql); - $array=pg_fetch_all($res); + $res=$this->db->exec_sql($sql); + $array=Database::fetch_all($res); return $array; } function set_od_id($p_id) { diff --git a/include/class_pre_op_ven.php b/include/class_pre_op_ven.php index a2e9f6615..1903ab338 100644 --- a/include/class_pre_op_ven.php +++ b/include/class_pre_op_ven.php @@ -55,7 +55,7 @@ class Pre_op_ven extends Pre_operation_detail { */ function save() { try { - StartSql($this->db); + $this->db->start(); if ($this->operation->save() == false ) return; // save the client @@ -65,7 +65,7 @@ class Pre_op_ven extends Pre_operation_detail { $this->operation->od_id, $this->e_client, "t"); - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); // save the selling for ($i=0;$i<$this->operation->nb_item;$i++) { if ( strlen(trim($this->{"e_march".$i}))==0) continue; @@ -80,13 +80,13 @@ class Pre_op_ven extends Pre_operation_detail { 'f', $this->operation->od_id ); - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } } catch (Exception $e) { echo ($e->getMessage()); - Rollback($this->db); + $this->db->rollback(); } - commit($this->db); + $this->db->commit(); } /*!\brief compute an array accordingly with the FormVenView function @@ -117,8 +117,8 @@ class Pre_op_ven extends Pre_operation_detail { $sql="select opd_id,opd_poste,opd_amount,opd_tva_id,opd_debit,". " opd_quantity from op_predef_detail where od_id=".$this->operation->od_id. " order by opd_id"; - $res=ExecSql($this->db,$sql); - $array=pg_fetch_all($res); + $res=$this->db->exec_sql($sql); + $array=Database::fetch_all($res); return $array; } function set_od_id($p_id) { diff --git a/include/class_pre_operation.php b/include/class_pre_operation.php index 9508c4d60..90bf80ad3 100644 --- a/include/class_pre_operation.php +++ b/include/class_pre_operation.php @@ -28,7 +28,8 @@ * and op_def_detail * */ -require_once ('class_widget.php'); +require_once("class_iselect.php"); +require_once("class_ihidden.php"); class Pre_operation { var $db; /*!< $db database connection */ @@ -49,7 +50,7 @@ class Pre_operation $this->jrn_type=$_POST['jrn_type']; $this->name=(isset($_POST['e_comm']))?$_POST['e_comm']:""; if ( $this->name=="") { - $n=NextSequence($this->db,'op_def_op_seq'); + $n=$this->db->get_next_seq('op_def_op_seq'); $this->name=$this->jrn_type.$n; // common value } @@ -57,14 +58,14 @@ class Pre_operation function delete () { $sql="delete from op_predef where od_id=".$this->od_id. " and od_direct ='".$this->od_direct."'"; - ExecSql($this->db,$sql); + $this->db->exec_sql($sql); } /*!\brief save the predef check first is the name is unique * \return true op.success otherwise false */ function save() { - if ( CountSql($this->db,"select * from op_predef ". - "where upper(od_name)=upper('".pg_escape_string($this->name)."')". + if ( $this->db->count_sql("select * from op_predef ". + "where upper(od_name)=upper('".Database::escape_string($this->name)."')". "and jrn_def_id=".$this->p_jrn) != 0 ) { @@ -79,12 +80,12 @@ class Pre_operation 'values'. "(%d,'%s',%d,'%s','%s')", $this->p_jrn, - pg_escape_string($this->name), + Database::escape_string($this->name), $this->nb_item, $this->jrn_type, $this->od_direct); - ExecSql($this->db,$sql); - $this->od_id=GetSequence($this->db,'op_def_op_seq'); + $this->db->exec_sql($sql); + $this->od_id=$this->db->get_current_seq('op_def_op_seq'); return true; } /*!\brief load the data from the database and return an array @@ -95,8 +96,8 @@ class Pre_operation " from op_predef where od_id=".$this->od_id. " and od_direct='".$this->od_direct."'". " order by od_name"; - $res=ExecSql($this->db,$sql); - $array=pg_fetch_all($res); + $res=$this->db->exec_sql($sql); + $array=Database::fetch_all($res); echo_debug(__FILE__.':'.__LINE__.'- ','load pre_op',$array); return $array; @@ -116,21 +117,21 @@ class Pre_operation /*!\brief show the button for selecting a predefined operation */ function show_button() { - $select=new widget("select"); - $value=make_array($this->db,"select od_id,od_name from op_predef ". + $select=new ISelect(); + $value=$this->db->make_array("select od_id,od_name from op_predef ". " where jrn_def_id=".$this->p_jrn. " and od_direct ='".$this->od_direct."'". " order by od_name"); if ( empty($value)==true) return ""; $select->value=$value; - $r=$select->IOValue("pre_def"); + $r=$select->input("pre_def"); return $r; } /*!\brief count the number of pred operation for a ledger */ function count() { - $a=CountSql($this->db,"select od_id,od_name from op_predef ". + $a=$this->db->count_sql("select od_id,od_name from op_predef ". " where jrn_def_id=".$this->p_jrn. " and od_direct ='".$this->od_direct."'". " order by od_name"); @@ -144,8 +145,8 @@ class Pre_operation " where jrn_def_id=".$this->p_jrn. " and od_direct ='".$this->od_direct."'". " order by od_name"; - $res=ExecSql($this->db,$sql); - $all=pg_fetch_all($res); + $res=$this->db->exec_sql($sql); + $all=Database::fetch_all($res); return $all; } /*!\brief set the ledger @@ -174,13 +175,13 @@ class Pre_operation_detail { */ function form_get () { - $hid=new widget("hidden"); - $r=$hid->IOValue("action","use_opd"); + $hid=new IHidden(); + $r=$hid->input("action","use_opd"); $r.=dossier::hidden(); - $r.=$hid->IOValue("p_jrn",$this->get("ledger")); - $r.=$hid->IOValue("jrn_type",$this->get("ledger_type")); + $r.=$hid->input("p_jrn",$this->get("ledger")); + $r.=$hid->input("jrn_type",$this->get("ledger_type")); if ($this->count() != 0 ) { - $r.= widget::submit('use_opd','Utilisez une op.prédéfinie'); + $r.= HtmlInput::submit('use_opd','Utilisez une op.prédéfinie'); $r.= $this->show_button(); } return $r; @@ -188,7 +189,7 @@ class Pre_operation_detail { } /*!\brief count the number of pred operation for a ledger */ function count() { - $a=CountSql($this->db,"select od_id,od_name from op_predef ". + $a=$this->db->count_sql("select od_id,od_name from op_predef ". " where jrn_def_id=".$this->jrn_def_id. " and od_direct ='".$this->od_direct."'". " order by od_name"); @@ -197,16 +198,16 @@ class Pre_operation_detail { /*!\brief show the button for selecting a predefined operation */ function show_button() { - $select=new widget("select"); + $select=new ISelect(); $value=$this->get_operation(); // if ( empty($value)==true) return ""; $select->value=$value; - $r=$select->IOValue("pre_def"); + $r=$select->input("pre_def"); return $r; } public function get_operation() { - $value=make_array($this->db,"select od_id,od_name from op_predef ". + $value=$this->db->make_array("select od_id,od_name from op_predef ". " where jrn_def_id=".FormatString($this->jrn_def_id). " and od_direct ='".FormatString($this->od_direct)."'". " order by od_name"); diff --git a/include/class_supplier.php b/include/class_supplier.php index 075f74830..4937375e9 100644 --- a/include/class_supplier.php +++ b/include/class_supplier.php @@ -19,9 +19,8 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr require_once("constant.php"); -require_once("postgres.php"); +require_once('class_database.php'); require_once("class_acc_parm_code.php"); -require_once("class_widget.php"); require_once('class_periode.php'); require_once('class_fiche.php'); require_once('class_acc_account_ledger.php'); @@ -57,10 +56,10 @@ class Supplier extends fiche{ function get_by_account($p_poste=0) { $this->poste=($p_poste==0)?$this->poste:$p_poste; $sql="select * from vw_supplier where poste_comptable=".$this->poste; - $Res=ExecSql($this->cn,$sql); - if ( pg_NumRows($Res) == 0) return null; + $Res=$this->cn->exec_sql($sql); + if ( Database::num_row($Res) == 0) return null; // There is only _one_ row by supplier - $row=pg_fetch_array($Res,0); + $row=Database::fetch_array($Res,0); $this->name=$row['name']; $this->id=$row['f_id']; $this->street=$row['rue']; @@ -70,106 +69,7 @@ class Supplier extends fiche{ } -/*! - ************************************************** - * \brief show the default screen - * - * \param p_search (filter) - * \return string to display - */ - function Summary($p_search) - { - $str_dossier=dossier::get(); - $p_search=FormatString($p_search); - $url=urlencode($_SERVER['REQUEST_URI']); - $script=basename($_SERVER['PHP_SELF']); - // Creation of the nav bar - // Get the max numberRow - $all_supplier=$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_supplier,$_SESSION['g_pagesize'],$page); - // set a filter ? - $search=""; - $user=new User($this->cn); - $exercice=$user->get_exercice(); - $tPeriode=new Periode($this->cn); - list($max,$min)=$tPeriode->get_limit($exercice); - 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_supplier=$this->GetAll($offset,$search); - if ( $all_supplier == 0 ) return ""; - $r=$bar; - $r.='<table width="95%"> -<TR style="background-color:lightgrey;"> -<TH>Quick Code</TH> -<th>Nom</th> -<th>Adresse</th> -<th>Total débit</th> -<th>Total crédit</th> -<th>Solde</th> -<th colspan="5">Action </th> -</TR>'; - if ( sizeof ($step_supplier ) == 0 ) - return $r; - foreach ($step_supplier as $supplier ) { - $r.="<TR>"; - $e=sprintf('<A class="mtitle" HREF="%s?p_action=fournisseur&'.$str_dossier.'&sa=detail&f_id=%d&url=%s" title="Détail"> ', - $script,$supplier->id,$url); - - $r.="<TD> $e".$supplier->strAttribut(ATTR_DEF_QUICKCODE)."</A></TD>"; - $r.="<TD>".h($supplier->strAttribut(ATTR_DEF_NAME))."</TD>"; - $r.="<TD>".h($supplier->strAttribut(ATTR_DEF_ADRESS). - " ".$supplier->strAttribut(ATTR_DEF_CP). - " ".$supplier->strAttribut(ATTR_DEF_PAYS)). - "</TD>"; - - - /* Filter on the default year */ - $User=new User($this->cn); - $filter_year=" j_tech_per in (select p_id from parm_periode ". - "where p_exercice='".$User->get_exercice()."')"; - $a=$supplier->get_solde_detail($filter_year); - $r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['debit']); - $r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['credit']); - $r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['solde']); - - if ( $script == 'commercial.php') { - - $r.=sprintf('<td><A class="mtitle" HREF="%s?p_action=contact&qcode=%s&%s&url=%s" title="Contact">Contact</A></td>', - $script,$supplier->strAttribut(ATTR_DEF_QUICKCODE),$str_dossier,$url); - $r.=sprintf('<td><A class="mtitle" HREF="%s?p_action=suivi_courrier&sa=list&qcode=%s&%s&url=%s" title="Action">Courrier</A></td> ', - $script,$supplier->strAttribut(ATTR_DEF_QUICKCODE) ,$str_dossier,$url); - } - - - $r.='<td><A class="mtitle" HREF="?p_action=ach&sa=l&'.$str_dossier.'&p_periode=-1&qcode='.$supplier->strAttribut(ATTR_DEF_QUICKCODE).'&'.$str_dossier.'&url='.$url.'" title="Historique Facture">Facture</A></td>'; - $r.=sprintf('<td><A class="mtitle" HREF="?p_action=bank&sa=l&'.$str_dossier.'&qcode=%s&url=%s&p_periode=-1" title="Financier">Financier</A></td>', - $supplier->strAttribut(ATTR_DEF_QUICKCODE) ,$url); - - $r.=sprintf('<td><A class="mtitle" HREF="?p_action=impress&type=poste&f_id=%s&%s&from_periode=%s&to_periode=%s&bt_html=Visualisation" -title="Operation">Operation</A></td>', - $supplier->strAttribut(ATTR_DEF_QUICKCODE) ,$str_dossier,$max->p_id,$min->p_id); - - $r.='</TD>'; - - $r.="</TR>"; - - } - $r.="</TABLE>"; - $r.=$bar; - return $r; - } } diff --git a/include/class_todo_list.php b/include/class_todo_list.php index 99c0db1f6..1376973a7 100644 --- a/include/class_todo_list.php +++ b/include/class_todo_list.php @@ -24,6 +24,7 @@ * \brief the todo list is managed by this class */ +require_once('function_javascript.php'); /*!\brief * This class manages the table todo_list @@ -106,14 +107,14 @@ class Todo_List $sql="insert into todo_list (tl_date,tl_title,tl_desc,use_login) ". " values (to_date($1,'DD.MM.YYYY'),$2,$3,$4) returning tl_id"; - $res=ExecSqlParam($this->cn, + $res=$this->cn->exec_sql( $sql, array($this->tl_date, $this->tl_title, $this->tl_desc, $this->use_login) ); - $this->tl_id=pg_fetch_result($res,0,0); + $this->tl_id=Database::fetch_result($res,0,0); } @@ -122,7 +123,7 @@ class Todo_List $sql="update todo_list set tl_title=$1,tl_date=to_date($2,'DD.MM.YYYY'),tl_desc=$3 ". " where tl_id = $4"; - $res=ExecSqlParam($this->cn, + $res=$this->cn->exec_sql( $sql, array($this->tl_title, $this->tl_date, @@ -138,10 +139,10 @@ class Todo_List $sql="select tl_id, tl_title,tl_desc,to_char( tl_date,'DD.MM.YYYY') as tl_date from todo_list where use_login=$1". " order by tl_date desc"; - $res=ExecSqlParam($this->cn, + $res=$this->cn->exec_sql( $sql, array($this->use_login)); - $array=pg_fetch_all($res); + $array=Database::fetch_all($res); return $array; } public function load() { @@ -149,35 +150,35 @@ from todo_list where use_login=$1". $sql="select tl_id,tl_title,tl_desc,to_char( tl_date,'DD.MM.YYYY') as tl_date from todo_list where tl_id=$1"; - $res=ExecSqlParam($this->cn, + $res=$this->cn->exec_sql( $sql, array($this->tl_id) ); - if ( pg_NumRows($res) == 0 ) return; - $row=pg_fetch_array($res,0); + if ( Database::num_row($res) == 0 ) return; + $row=Database::fetch_array($res,0); foreach ($row as $idx=>$value) { $this->$idx=$value; } } public function delete() { $sql="delete from todo_list where tl_id=$1"; - $res=ExecSqlParam($this->cn,$sql,array($this->tl_id)); + $res=$this->cn->exec_sql($sql,array($this->tl_id)); } - public function toJSON() { - - $r=''; - $r.='{'; - $r.='"tl_id":"'.$this->tl_id.'",'; - $r.='"tl_title":"'.$this->tl_title.'",'; - $r.='"tl_desc":"'.rawurlencode($this->tl_desc).'",'; - $r.='"tl_date":"'.$this->tl_date.'"'; - $r.='}'; - return $r; + /** + *@brief transform into xml + */ + public function toXML() { + $id='<tl_id>'.$this->tl_id.'</tl_id>'; + $title='<tl_title>'.escape_xml($this->tl_title).'</tl_title>'; + $desc='<tl_desc>'.escape_xml($this->tl_desc).'</tl_desc>'; + $date='<tl_date>'.$this->tl_date.'</tl_date>'; + $ret='<data>'.$id.$title.$desc.$date.'</data>'; + return $ret; } /*!\brief static testing function */ static function test_me() { - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $r=new Todo_List($cn); $r->set_parameter('title','test'); $r->use_login='phpcompta'; diff --git a/include/class_user.php b/include/class_user.php index 8d15e64f1..73c6bf5fd 100644 --- a/include/class_user.php +++ b/include/class_user.php @@ -27,9 +27,10 @@ * Data & function about connected users */ -include_once("constant.php"); +require_once("constant.php"); +require_once("user_common.php"); require_once('class_dossier.php'); - +require_once('ac_common.php'); class User { var $id; var $pass; @@ -40,11 +41,15 @@ class User { function User ($p_cn,$p_id=-1){ // if p_id is not set then check the connected user if ( $p_id == -1 ) { - if ( ! isset ($_SESSION['g_user'])) - exit('<h2 class="error"> Utilisateur déconnecté</h2>'); + if ( ! isset ($_SESSION['g_user'])){ + echo '<h2 class="error">'._('Session expirée<br>Utilisateur déconnecté').'</h2>'; + redirect('index.php',1); + exit(); + } $this->login=$_SESSION['g_user']; $this->pass=$_SESSION['g_pass']; + $this->lang=(isset($_SESSION['g_lang']))?$_SESSION['g_lang']:'fr_FR.utf8'; $this->valid=(isset ($_SESSION['isValid']))?1:0; $this->db=$p_cn; $this->id=-1; @@ -88,43 +93,50 @@ class User { use_active, use_admin from ac_users "; - $cn=DbConnect(); - $Res=ExecSqlParam($cn,$sql.$sql_cond,$sql_array); - if (($Max=pg_NumRows($Res)) == 0 ) return -1; - $row=pg_fetch_array($Res,0); + $cn=new Database(); + $Res=$cn->exec_sql($sql.$sql_cond,$sql_array); + if (($Max=Database::num_row($Res)) == 0 ) return -1; + $row=Database::fetch_array($Res,0); $this->id=$row['use_id']; $this->first_name=$row['use_first_name']; $this->name=$row['use_name']; $this->active=$row['use_active']; $this->login=$row['use_login']; $this->admin=$row['use_admin']; - + } + function save() { + + $Sql="update ac_users set use_first_name=$1, use_name=$2 + ,use_active=$3,use_admin=$4 where use_id=$5"; + $cn=new Database(); + $Res=$cn->exec_sql($Sql,array($this->first_name,$this->last_name,$this->active,$this->admin,$this->id)); } /*! * \brief Check if user is active and exists in therepository * Automatically redirect, it doesn't check if a user can access a folder + *\param $silent false, echo an error message and exit, true : exit without warning + * default is false * ++*/ - function Check() + function Check($silent=false) { $res=0; $pass5=md5($this->pass); - $cn=DbConnect(); - if ( $cn != false ) { - $sql="select ac_users.use_login,ac_users.use_active, ac_users.use_pass, + $cn=new Database(); + $sql="select ac_users.use_login,ac_users.use_active, ac_users.use_pass, use_admin,use_first_name,use_name from ac_users where ac_users.use_id='$this->id' and ac_users.use_active=1 and ac_users.use_pass='$pass5'"; echo_debug('class_user.php',__LINE__,"Sql = $sql"); - $ret=pg_exec($cn,$sql); - $res=pg_NumRows($ret); + $ret=$cn->exec_sql($sql); + $res=Database::num_row($ret); echo_debug('class_user.php',__LINE__,"Number of found rows : $res"); if ( $res >0 ) { - $r=pg_fetch_array($ret,0); + $r=Database::fetch_array($ret,0); $_SESSION['use_admin']=$r['use_admin']; $_SESSION['use_name']=$r['use_name']; $_SESSION['use_first_name']=$r['use_first_name']; @@ -136,18 +148,15 @@ class User { $this->load_global_pref(); - } + } if ( $res == 0 ) { - echo '<META HTTP-EQUIV="REFRESH" content="4;url=index.html">'; - echo "<BR><BR><BR><BR><BR><BR>"; - echo "<P ALIGN=center><BLINK> - <FONT size=+12 COLOR=RED> - utilisateur ou mot de passe incorrect - </FONT></BLINK></P></BODY></HTML>"; + if ( ! $silent) { + alert(_('Utilisateur ou mot de passe incorrect')); + redirect('index.html'); + } session_unset(); - exit -1; } else { $this->valid=1; @@ -165,15 +174,36 @@ class User { * */ function get_folder_access($p_dossier = 0) { - if ($p_dossier==0) - $p_dossier=dossier::id(); - $cn=DbConnect(); + if ($p_dossier==0) $p_dossier=dossier::id(); + if ( $this->is_local_admin($p_dossier) == 1) return 'L'; + $cn=new Database(); + $sql="select priv_priv from priv_user join jnt_use_dos on (jnt_id=priv_jnt) join ac_users using (use_id) where use_id=$1 and dos_id=$2"; - $res=getDbValue($cn,$sql,array($this->id,$p_dossier)); + + $res=$cn->get_value($sql,array($this->id,$p_dossier)); + if ( $res=='') return 'X'; return $res; } + /*\brief save the access of a folder + *\param $db_id the dossier id + *\param $priv the priv. to set + */ + function set_folder_access($db_id,$priv) { + + $cn=new Database(); + $jnt=$cn->get_value("select jnt_id from jnt_use_dos where dos_id=$1 and use_id=$2",array($db_id,$this->id)); + + if ( $cn->size() == 0 ) { + + $Res=$cn->exec_sql("insert into jnt_use_dos(dos_id,use_id) values($1,$2)",array($db_id,$this->id)); + $jnt=$cn->get_value("select jnt_id from jnt_use_dos where dos_id=$1 and use_id=$2",array($db_id,$this->id)); + $Res=$cn->exec_sql("insert into priv_user (priv_priv,priv_jnt) values($1,$2)",array($priv,$jnt)); + } + $Res=$cn->exec_sql("update priv_user set priv_priv=$1 where priv_jnt=$2",array($priv,$jnt)); + + } /*!\brief check that a user is valid and the access to the folder * \param $p_ledger the ledger to check *\return the priv_priv @@ -191,7 +221,8 @@ where use_id=$1 and dos_id=$2"; return 'W'; $sql="select uj_priv from user_sec_jrn where uj_login=$1 and uj_jrn_id=$2"; - $res=getDbValue($this->db,$sql,array($this->login,$p_ledger)); + $res=$this->db->get_value($sql,array($this->login,$p_ledger)); + if ( $res=='' ) $res='X'; return $res; } @@ -204,8 +235,6 @@ where use_id=$1 and dos_id=$2"; * \return an array */ function get_ledger($p_type='ALL',$p_access=3) { - - if ( $this->admin != 1 && $this->is_local_admin() != 1) { $sql_type=($p_type=='ALL')?'':"and jrn_def_type=upper('".FormatString($p_type)."')"; switch($p_access) { @@ -220,7 +249,8 @@ where use_id=$1 and dos_id=$2"; $sql_access=" and uj_priv = 'R'"; break; - } + } + $sql="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, jrn_deb_max_line,jrn_cred_max_line @@ -237,11 +267,11 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, from jrn_def join jrn_type on jrn_def_type=jrn_type_id $sql_type order by jrn_Def_id"; - } - $res=ExecSql($this->db,$sql); - if ( pg_NumRows($res) == 0 ) return null; - $array=pg_fetch_all($res); + } + $res=$this->db->exec_sql($sql); + if ( Database::num_row($res) == 0 ) return null; + $array=Database::fetch_all($res); return $array; } @@ -249,11 +279,9 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, * \param $p_type = ALL or the type of the ledger (ACH,VEN,FIN,ODS) * \param $p_access =3 for READ or WRITE, 2 READ and write, 1 for readonly * - *\return string + *\return sql condition like = jrn_def_id in (...) */ function get_ledger_sql($p_type='ALL',$p_access=3) { - /* for admin or local admin there is no restriction on the ledger */ - if ($this->admin == 1 || $this->is_local_admin(dossier::id()) == 1) return ' jrn_def_id > 0 '; $aLedger=$this->get_ledger($p_type,$p_access); if ( empty ($aLedger)) return ' jrn_def_id < 0 '; $sql=" jrn_def_id in ("; @@ -274,10 +302,10 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, $sql="select use_admin from ac_users where use_login=$1 and use_active=1 "; - $cn=DbConnect(); - $res=ExecSqlParam($cn,$sql,array($this->login)); - if ( pg_NumRows($res)==0) exit(__FILE__." ".__LINE__." aucun resultat"); - $this->admin=pg_fetch_result($res,0); + $cn=new Database(); + $res=$cn->exec_sql($sql,array($this->login)); + if ( Database::num_row($res)==0) exit(__FILE__." ".__LINE__." aucun resultat"); + $this->admin=Database::fetch_result($res,0); } else $this->admin=1; @@ -292,33 +320,33 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, */ function set_periode($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); + $Res=$this->db->exec_sql($sql); } private function set_default_periode() { /* get the first periode */ $sql='select min(p_id) as pid from parm_periode where p_closed = false and p_start = (select min(p_start) from parm_periode)'; - $Res=ExecSql($this->db,$sql); + $Res=$this->db->exec_sql($sql); - $pid=pg_fetch_result($Res,0,0); + $pid=Database::fetch_result($Res,0,0); /* if all the periode are closed, then we use the last closed period */ if ( $pid == null ) { $sql='select min(p_id) as pid from parm_periode where p_start = (select max(p_start) from parm_periode)'; - $Res2=ExecSql($this->db,$sql); - $pid=pg_fetch_result($Res2,0,0); + $Res2=$this->db->exec_sql($sql); + $pid=Database::fetch_result($Res2,0,0); if ( $pid == null ) { - echo "Aucune periode trouvable !!!"; + echo _("Aucune période trouvéee !!!"); exit(1); } - $pid=pg_fetch_result($Res2,0,0); + $pid=Database::fetch_result($Res2,0,0); } $sql=sprintf("insert into user_local_pref (user_id,parameter_value,parameter_type) values ('%s','%d','PERIODE')", $this->id,$pid); - $Res=ExecSql($this->db,$sql); + $Res=$this->db->exec_sql($sql); } /*! @@ -351,15 +379,15 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, /*!\brief set the mini rapport to display on the welcome page */ function set_mini_report($p_id) { - $count=getDbValue($this->db,"select count(*) from user_local_pref where user_id=$1 and parameter_type=$2", + $count=$this->db->get_value("select count(*) from user_local_pref where user_id=$1 and parameter_type=$2", array($this->id,'MINIREPORT')); if ( $count == 1 ) { $sql="update user_local_pref set parameter_value=$1 where user_id=$2 and parameter_type='MINIREPORT'"; - $Res=ExecSqlParam($this->db,$sql,array($p_id,$this->id)); + $Res=$this->db->exec_sql($sql,array($p_id,$this->id)); } else { $sql="insert into user_local_pref (user_id,parameter_type,parameter_value)". "values($1,'MINIREPORT',$2)"; - $Res=ExecSqlParam($this->db,$sql,array($this->id,$p_id)); + $Res=$this->db->exec_sql($sql,array($this->id,$p_id)); } @@ -373,10 +401,10 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, function get_preference () { $sql="select parameter_type,parameter_value from user_local_pref where user_id='".$this->id."'"; - $Res=ExecSql($this->db,$sql); + $Res=$this->db->exec_sql($sql); $l_array=array(); - for ( $i =0;$i < pg_NumRows($Res);$i++) { - $row= pg_fetch_array($Res,$i); + for ( $i =0;$i < Database::num_row($Res);$i++) { + $row= Database::fetch_array($Res,$i); $type=$row['parameter_type']; $l_array[$type]=$row['parameter_value']; } @@ -398,10 +426,10 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, if ( $this->Admin()==1 ) return 1; if ( $this->is_local_admin(dossier::id()) == 1 ) return 1; - $Res=ExecSqlParam($this->db, + $Res=$this->db->exec_sql( "select * from user_sec_act where ua_login=$1 and ua_act_id=$2", array($this->login,$p_action_id)); - $Count=pg_NumRows($Res); + $Count=Database::num_row($Res); if ( $Count == 0 ) return 0; if ( $Count == 1 ) return 1; echo "<H2 class=\"error\"> Action Invalide !!! $Count select * from user_sec_act where ua_login='$p_login' and ua_act_id=$p_action_id </H2>"; @@ -416,12 +444,12 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, function load_global_pref() { echo_debug('class_user.php',__LINE__,"function load_global_pref"); - $cn=Dbconnect(); + $cn=new Database(); // Load everything in an array - $Res=ExecSql ($cn,"select parameter_type,parameter_value from + $Res=$cn->exec_sql ("select parameter_type,parameter_value from user_global_pref where user_id='".$this->login."'"); - $Max=pg_NumRows($Res); + $Max=Database::num_row($Res); if ( $Max == 0 ) { $this->insert_default_global_pref(); $this->load_global_pref(); @@ -430,12 +458,12 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, // Load value into array $line=array(); for ($i=0;$i<$Max;$i++) { - $row=pg_fetch_array($Res,$i); + $row=Database::fetch_array($Res,$i); $type=$row['parameter_type']; $line[$type]=$row['parameter_value'];; } // save array into g_ variable - $array_pref=array ('g_theme'=>'THEME','g_pagesize'=>'PAGESIZE','g_topmenu'=>'TOPMENU'); + $array_pref=array ('g_theme'=>'THEME','g_pagesize'=>'PAGESIZE','g_topmenu'=>'TOPMENU','g_lang'=>'LANG'); foreach ($array_pref as $name=>$parameter ) { if ( ! isset ($line[$parameter]) ) { echo_debug("Missing pref : ".$parameter); @@ -460,20 +488,22 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, echo_debug('class_user.php',__LINE__,"parameter p_type $p_type p_value $p_value"); $default_parameter= array("THEME"=>"Light", - "PAGESIZE"=>"50",'TOPMENU'=>'TEXT'); - $cn=Dbconnect(); + "PAGESIZE"=>"50", + 'TOPMENU'=>'TEXT', + 'LANG'=>'fr_FR.utf8'); + $cn=new Database(); $Sql="insert into user_global_pref(user_id,parameter_type,parameter_value) values ('%s','%s','%s')"; if ( $p_type == "" ) { foreach ( $default_parameter as $name=>$value) { $Insert=sprintf($Sql,$this->login,$name,$value); - ExecSql($cn,$Insert); + $cn->exec_sql($Insert); } } else { $value=($p_value=="")?$default_parameter[$p_type]:$p_value; $Insert=sprintf($Sql,$this->login,$p_type,$value); - ExecSql($cn,$Insert); + $cn->exec_sql($Insert); } @@ -488,14 +518,15 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, */ function update_global_pref($p_type,$p_value="") { $default_parameter= array("THEME"=>"Light", - "PAGESIZE"=>"50",'TOPMENU'=>'SELECT'); - $cn=Dbconnect(); - $Sql="update user_global_pref set parameter_value='%s' - where parameter_type='%s' and - user_id='%s'"; + "PAGESIZE"=>"50", + "LANG"=>'fr_FR.utf8', + 'TOPMENU'=>'SELECT'); + $cn=new Database(); + $Sql="update user_global_pref set parameter_value=$1 + where parameter_type=$2 and + user_id=$3"; $value=($p_value=="")?$default_parameter[$p_type]:$p_value; - $Update=sprintf($Sql,$value,$p_type,$this->login); - ExecSql($cn,$Update); + $cn->exec_sql($Sql,array($value,$p_type,$this->login)); }//end function /*!\brief Return the year of current Periode @@ -505,10 +536,10 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, function get_exercice() { $sql="select p_exercice from parm_periode where p_id=".$this->get_periode(); - $Ret=ExecSql($this->db,$sql); - if (pg_NumRows($Ret) == 1) + $Ret=$this->db->exec_sql($sql); + if (Database::num_row($Ret) == 1) { - $r=pg_fetch_array($Ret,0); + $r=Database::fetch_array($Ret,0); return $r['p_exercice']; } else @@ -544,28 +575,7 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, } } - /*! - * \brief Get the privilege of an user on a folder - */ - function get_privilege($p_dossier) - { - /* you must be connected to the repository */ - $sql="select priv_priv - from priv_user left join jnt_use_dos on jnt_id=priv_jnt - inner join ac_users on ac_users.use_id=jnt_use_dos.use_id - where ac_users.use_id=$1 and dos_id=$2"; - - - $Res=ExecSqlParam($this->db,$sql,array($this->id,$p_dossier)); - - $Num=pg_NumRows($Res); - - /* If nothing is found there is no access */ - if ( $Num==0) return 'X'; - - $priv=pg_fetch_row($Res,0); - return $priv[0]; - } + /*! * \brief Check if an user is an local administrator * @@ -588,14 +598,38 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, ' on ( jnt_use_dos.jnt_id = priv_user.priv_jnt) '. " where priv_priv='L' and use_login='".$this->login."' and dos_id=$p_dossier"; - $cn=DbConnect(); + $cn=new Database(); - $isAdmin=CountSql($cn,$sql); + $isAdmin=$cn->count_sql($sql); return $isAdmin; } + /*! + *\brief return an array with all the users who can access $p_dossier including the global admin. The user + * must be activated + * + *\param $p_dossier dossier + *\return an array of user's object + * array indices + * - use_id (id ) + * - use_login (login of the user) + * - use_name + * - use_first_name + * + *\exception throw an exception if nobody can access + */ + static function get_list($p_dossier) { + $sql="select distinct use_id,use_login,use_first_name,use_name from ac_users + left outer join jnt_use_dos using (use_id) +where +(dos_id=$1 or use_admin=1) and use_active=1"; + $repo=new Database(); + $array=$repo->get_array($sql,array($p_dossier)); + if ( $repo->size() == 0 ) throw new Exception ('Error inaccessible folder'); + return $array; + } /*! * \brief check the access of an user on a ledger * @@ -612,16 +646,22 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, { return $this->get_ledger_access($p_jrn); } - function check_dossier($p_dossier_id) + /*!\brief check if an user can access a folder, if he cannot display a dialog box + * and exit + *\param the folder if + *\param $silent false, echo an error message and exit, true : exit without warning + * default is false + */ + function check_dossier($p_dossier_id,$silent=false) { $this->Admin(); - if ( $this->admin==1) return 'L'; - $cn=DbConnect(); + if ( $this->admin==1 || $this->is_local_admin($p_dossier_id)==1) return 'L'; + $cn=new Database(); - $dossier=getDbValue($cn,"select priv_priv from jnt_use_dos join priv_user on (priv_jnt=jnt_id) where dos_id=$1 and use_id=$2", + $dossier=$cn->get_value("select priv_priv from jnt_use_dos join priv_user on (priv_jnt=jnt_id) where dos_id=$1 and use_id=$2", array($p_dossier_id,$this->id)); if ( $dossier=='X' || $dossier=='') { - alert('Dossier non accessible'); + if ( ! $silent) alert(_('Dossier non accessible')); exit(); } } diff --git a/include/class_widget.php b/include/class_widget.php deleted file mode 100644 index d889c3091..000000000 --- a/include/class_widget.php +++ /dev/null @@ -1,786 +0,0 @@ -<?php -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -/* $Revision$ */ - -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - -/*! \file - * \brief 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. - * - * special value - * js_search and js_search_only :you need to add a span widget the name - * of the js_* widget + '_label' , the member extra contains cred,deb to - * filter the search of cred of deb of a jrn or contains a string with - * a list of frd_id. - * Possible type - * $type - * - TEXT - * - HIDDEN - * - BUTTON in this->js you have the javascript code - * - SELECT the options are passed via this->value, this array is - * build thanks the make_array function, each array (of the - * array) aka row must contains a field value and a field label - * - PASSWORD - * - CHECKBOX - * - RADIO - * - TEXTAREA - * - RICHTEXT - * - FILE - * - JS_SEARCH_POSTE call a popup window for searching the account - * - JS_SEARCH call a popup window for searching a quickcode or to add one - * - JS_SEARCH_ONLY like JS_SEARCH but without adding a quickcode - * - JS_SEARCH_CARD_CTRL like js_search_only but the tag to update is given - * - SPAN - * - JS_TVA open a popup window for the VAT - * - JS_CONCERNED open a popup window for search a operation, if extra == 0 then - * get the amount thx javascript - * - js_DATE show a calendar - * - * For JS_SEARCH_POST,JS_SEARCH or JS_SEARCH_ONLY - * - $extra contains 'cred', 'deb', 'all' or a list of fiche_def_ref (frd_id) - * to filter the search/add for the card - * - * - $extra2 filter on the card parameter, which are given in Avance->journaux menu, - * it is the journal id. If empty, there is no link with a ledger - * - */ -class widget { - - var $type; /*!< $type type of the widget */ - var $name; /*!< $name field NAME of the INPUT */ - var $value; /*!< $value what the INPUT contains */ - var $readonly; /*!< $readonly true : we cannot change value */ - var $size; /*!< $size size of the input */ - var $selected; /*!< $selected for SELECT RADIO and CHECKBOX the selected value */ - var $table; /*!< $table =1 add the table tag */ - var $label; /*!< $label the question before the input */ - var $disabled; /*!< $disabled poss. value == true or nothing, to disable INPUT*/ - var $extra; /*!< $extra different usage, it depends of the $type */ - var $extra2; /*!< $extra2 different usage, - it depends of the $type */ - var $javascript; /*!< $javascript is the javascript to add to the widget */ - var $ctrl; /*!<$ctrl is the control to update (see js_search_card_control) */ - - var $tabindex; - function widget($p_type="",$p_label="",$p_name="",$p_value="") { - $this->type=$p_type; - $this->name=$p_name; - $this->readonly=false; - $this->size=20; - $this->width=50; - $this->heigh=20; - $this->value=$p_value; - $this->selected=""; - $this->table=0; - $this->label=$p_label; - $this->disabled=false; - $this->javascript=""; - $this->extra2="all"; - } - function SetReadOnly($p_read) { - $this->readonly=$p_read; - } - /*! function IOValue($p_name,$p_value="",$p_label="") - ***************************************************** - * \brief create the corresponding INPUT 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="") { - - if ( $p_name != null) - $this->name=$p_name; - $this->value=($p_value===null)?$this->value:$p_value; - $this->label=($p_label == "")?$this->label:$p_label; - - - $disabled = $this->disabled ? "readonly" : ""; - //##################################################################### - // Input text type - if (strtoupper($this->type)=="TEXT") { - $t= ((isset($this->title)))?'title="'.$this->title.'" ':' '; - - $extra=(isset($this->extra))?$this->extra:""; - if ( $this->readonly==true ){ - $readonly=" readonly ";$style='style="border:solid 1px grey;color:black;background:lightblue;"'; - } else { - $readonly=" ";$style='class="input_text"'; - } - $this->value=str_replace('"','',$this->value); - $r='<INPUT '.$style.' TYPE="TEXT" id="'. - $this->name.'"'.$t. - 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '. - 'SIZE="'.$this->size.'" '.$this->javascript." ".$disabled." $readonly $this->extra >"; - - if ($this->table==1) { - if ( $this->label != "") { - $r="<TD style=\"border:groove 1px blue;\">".$this->label."</TD><TD>".$r."</TD>"; - }else { - $r="<TD>".$r."</TD>"; - } - } - return $r; - } - // Hidden field - //##################################################################### - if (strtoupper($this->type)=="HIDDEN") { - $r='<INPUT TYPE="HIDDEN" id="'.$this->name.'" name="'.$this->name.'" value="'.$this->value.'">'; - if ( $this->readonly==true) return ""; - return $r; - } - //##################################################################### - // Select value - if ( strtoupper($this->type) == "SELECT") { - - if ($this->readonly==false ) - { - - $disabled=($this->disabled==true)?"disabled":""; - //echo "<b>Selected <b>".$this->selected; - $r="<SELECT id=\"$this->name\" NAME=\"$this->name\" $this->javascript $disabled>"; - if (empty($this->value)) return ''; - for ( $i=0;$i<sizeof($this->value);$i++) - { - $checked=($this->selected==$this->value[$i]['value'])?"SELECTED":""; - $r.='<OPTION VALUE="'.$this->value[$i]['value'].'" '.$checked.'>'; - $r.=$this->value[$i]['label']; - } - $r.="</SELECT>"; - } - if ( $this->readonly==true) - { - $r=""; - echo_debug('class_widget.php',__LINE__,"this->selected = ".$this->selected); - for ( $i=0;$i<sizeof($this->value);$i++) - { - echo_debug('class_widget.php',__LINE__,"check for ".$this->value[$i]['value']); - if ($this->selected==$this->value[$i]['value'] ) - { - $r=h($this->value[$i]['label']); - - } - } - } - if ( $this->table==1) { - $r="<TD> $r </TD>"; - if ( $this->label != "") $r="<TD style=\"border: 1px groove blue;\"> $this->label</TD>".$r; - } - return $r; - } - //##################################################################### - // Password - if (strtoupper($this->type)=="PASSWORD") { - if ( $this->readonly==true) return ""; - $r='<input type="password" name="'.$this->name; - $r.='">'; - if ($this->table==1) { - $r="<TD> $this->label </TD><TD> $r </TD>"; - } - return $r; - } - //##################################################################### - // Checkbox - if (strtoupper($this->type)=="CHECKBOX") { - if ( $this->readonly == true) { - $check=( $this->selected==true )?"checked":"unchecked"; - $r='<input type="CHECKBOX" id="'.$this->name.'" name="'.$this->name.'"'; - $r.=" $check"; - $r.=' disabled>'; - - } else { - $check=( $this->selected==true )?"checked":"unchecked"; - $r='<input type="CHECKBOX" id="'.$this->name.'" name="'.$this->name.'"'; - $r.=" $check"; - $r.=' '.$disabled." ".$this->javascript.'>'; - } - if ($this->table==1) { - $r="<TD> $this->label </TD><TD> $r </TD>"; - } else { - $r=$r." $this->label"; - } - return $r; - } - //##################################################################### - //radio - if (strtoupper($this->type)=="RADIO") { - if ( $this->readonly == true) { - $check=( $this->selected==true || $this->selected=='t' )?"Yes":"no"; - $r=$check; - } else { - $check=( $this->selected==true||$this->selected=='t' )?"checked":"unchecked"; - $r='<input type="RADIO" name="'.$this->name.'"'; - $r.=" VALUE=\"$this->value\""; - $r.=" $check"; - $r.=' '.$disabled.'>'; - } - if ($this->table==1) { - $r="<TD> $this->label </TD><TD> $r </TD>"; - } else { - $r=$this->label.$r; - } - return $r; - } - //##################################################################### - //textarea - if (strtoupper($this->type)=="TEXTAREA") { - if ( $this->readonly == false ) { - $r=""; - $r.='<TEXTAREA style="border:solid blue 1px" name="'.$this->name.'" id="'.$this->name.'"'; - $r.=" rows=\"$this->heigh\" "; - $r.=" cols=\"$this->width\" "; - $r.=' '.$disabled.'>'; - $r.=$this->value; - - $r.="</TEXTAREA>"; - } else { - $r='<p>'; - $r.=h($this->value); - $r.=sprintf('<input type="hidden" name="%s" value="%s">', - $this->name,urlencode($this->value)); - $r.='</p>'; - - } - if ($this->table==1) { - $r="<TD> $this->label </TD><TD> $r </TD>"; - } - return $r; - } - - //############################################################################# - // Rich Text - /*!\brief - * \note for the type RICHTEXT we need to include the javascript file - * into the head \see commercial.php html_page_start($_SESSION['g_theme'],"","richtext.js"); - */ - - if ( strtoupper($this->type)=='RICHTEXT') - { - $r= ' <script language="JavaScript" type="text/javascript"> '. - '<!-- '."\n". - "\nfunction submitForm() {\n". - " updateRTE('".$this->name."');\n ". - " return true; \n". - "} \n". - 'initRTE("image/", "", "");'."\n". - '//-->'."\n". - '</script>'. - '<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>'. - 'Note Interne : '. - '<script language="JavaScript" type="text/javascript">'."\n". - '<!--'."\n"; - //Usage: writeRichText(fieldname, html, width, height, buttons, readOnly) - - echo_debug('class_widget',__LINE__,'to write is '.$this->name); - /*\! brief - *\note the value must be urlencoded - */ - // Removing new line - - // $msg=urlencode($this->value); - $msg=$this->value; - $msg=str_replace("%OA","",$msg); - $msg=str_replace("%OD","",$msg); - $msg=str_replace("\n","",$msg); - $msg=str_replace("\r","",$msg); - - $read=($this->readonly==false)?"false":"true"; - - - $r.=sprintf(" writeRichText('%s','%s',%d,%d,true,%s);\n", - $this->name, - $msg, - $this->width, - $this->heigh, - $read); - $r.= "\n//-->". - "</script>"; - echo_debug ('class_widget',__LINE__,"writeRichText '$r'"); - - return $r; - - } - - //############################################################################# - //file - if (strtoupper($this->type)=="FILE") { - if ( $this->readonly == false ) { - $r='<INPUT class="inp" TYPE="file" name="'.$this->name.'" VALUE="'.$this->value.'">'; - - } - if ( $this->table==1) $r="<TD>$this->label</TD><TD>$r</TD>"; - return $r; - } - //############################################################################# - // js_search_poste_only - if ( strtolower($this->type == 'js_search_poste_only')) { - - if ( ! isset($this->ctrl) ) $this->ctrl='none'; - if ( ! isset($this->extra2)) $this->extra2='poste'; - $r=sprintf(' - <INPUT class="inp" TYPE="button" onClick=SearchPoste(\'%s\','.dossier::id().',\'%s\',0,\'%s\',\'N\',\'%s\') value="Poste?"> - %s - ', - $_REQUEST['PHPSESSID'], - $this->extra, - $this->extra2, - $this->ctrl, - $this->label - ); - return $r; - } - //############################################################################# - // input type == js_search_poste => button search for the account - if ( strtolower($this->type)=="js_search_poste") { - if ( ! isset($this->ctrl) ) $this->ctrl='none'; - $l_sessid=$_REQUEST['PHPSESSID']; - if ( $this->readonly == false ) { - if ( ! isset($this->javascript)) $this->javascript=""; - - // Do we need to filter ?? - if ( $this->extra2 == null ) { - $r=sprintf('<TD> - <INPUT class="inp" TYPE="button" onClick=SearchPoste(\'%s\','.dossier::id().',\'%s\',\'%s\',\'label\',\'Y\') %s value="Poste?"> - %s</TD><TD> - - <INPUT style="border:groove 1px blue;" TYPE="Text" NAME="%s" ID="%s" VALUE="%s" SIZE="8"> - </TD>', - $l_sessid, - $this->name, - $this->extra, - $this->ctrl, - $this->label, - $this->name, - $this->name, - $this->value - ); - - } else { // $p_list is not null, so we have a filter - $r=sprintf('<TD> - <INPUT TYPE="button" onClick="SearchPosteFilter(\'%s\','.dossier::id().',\'%s\',\'%s\',\'%s\',\'%s\')" %s value="Poste?"> - %s</TD><TD> - - <INPUT style="border:groove 1px blue;" TYPE="Text" NAME="%s" id="%s" VALUE="%s" SIZE="8"> - </TD>', - $l_sessid, - $this->name, - $this->extra2, - $this->extra, - $this->ctrl, - $this->javascript, - $this->label, - $this->name, - $this->name, - $this->value - ); - - } //else - } else { - $r=sprintf('<TD><input type="hidden" name="%s" value="%s"> - %s - - </TD>', - $this->name, - $this->value , - $this->value - ); - - } //else if readonly == true - if ( $this->table==0) { - $r=str_replace ('<TD>','',$r); - $r=str_replace ('</TD>','',$r); - } - return $r; - - } // end js_search_poste -//############################################################################# - // input type == js_search => button search for card - if ( strtolower($this->type)=="js_search") { - $l_sessid=$_REQUEST['PHPSESSID']; - if ( $this->readonly == false ) { - $r=sprintf('<TD> - <INPUT TYPE="button" onClick=NewCard(\'%s\',\'%s\',\'%s\') value="Nouvelle fiche"> - </TD><TD> - <INPUT TYPE="button" onClick=SearchCard(\'%s\',\'%s\',\'%s\') value="Recherche fiche"> - %s - <INPUT style="border:solid 1px blue;" TYPE="Text" ID="%s" NAME="%s" VALUE="%s" SIZE="8" onBlur="ajaxFid(\'%s\',\'%s\',\'%s\')"> - - ', - $l_sessid, - $this->extra, // deb or cred - $this->name, - $l_sessid, - $this->extra, - $this->name, - $this->label, - $this->name, - $this->name, - $this->value, - $this->name, - $this->extra, //deb or cred - $l_sessid - ); - } else { - // readonly == true - $r=sprintf('<TD> %s</TD> - <TD> - <INPUT TYPE="hidden" NAME="%s" VALUE="%s" SIZE="8"> - </TD>', - $this->label, - $this->name, - $this->value - ); - - } - return $r; - }// poste==js_search - -//############################################################################# - // input type == js_search => button search for card - /*!\brief js_search_only only for searching a card no new button - */ - if ( strtolower($this->type)=="js_search_only") { - $l_sessid=$_REQUEST['PHPSESSID']; - - if ( $this->javascript=="") { /* if javascript is empty then we - add a default behaviour */ - $this->javascript=sprintf('onBlur="ajaxFid(\'%s\',\'%s\',\'%s\',\'%s\',\'%s\')"', - $this->name, - $this->extra, //deb or cred - $l_sessid, - 'js_search_only', - 'none' - ); - } - if ( $this->readonly == false ) { - if ( $this->extra2 == "" ) $this->extra2="QuickCode"; - if ( $this->table==1) - { - $r=sprintf('<TD> - <INPUT TYPE="button" onClick="SearchCard(\'%s\',\'%s\',\'%s\')" value="%s"> - %s</TD><TD> <INPUT class="input_text" TYPE="Text" " '. - ' NAME="%s" ID="%s" VALUE="%s" SIZE="8" %s>', - $l_sessid, - $this->extra, - $this->name, - $this->extra2, - $this->label, - $this->name, - $this->name, - $this->value, - $this->javascript - ); - } - else - { - $r=sprintf(' - <INPUT TYPE="button" onClick="SearchCard(\'%s\',\'%s\',\'%s\')" value="%s"> - %s <INPUT TYPE="Text" style="border:solid 1px blue;" '. - ' NAME="%s" ID="%s" VALUE="%s" SIZE="8" %s">', - $l_sessid, - $this->extra, - $this->name, - $this->extra2, - $this->label, - $this->name, - $this->name, - $this->value, - $this->javascript - ); - } - } else { - // readonly == true - if ( $this->table == 1 ) - { - - $r=sprintf('<TD> %s</TD> - <TD> %s - <INPUT TYPE="hidden" NAME="%s" VALUE="%s" SIZE="8"> - ', - $this->label, - $this->value, - $this->name, - $this->value - ); - } - else { - // readonly == true and table == 0 - $r=sprintf('%s', - $this->value - ); - - } - - } - return $r; - }// poste==js_search_only - if ( strtolower($this->type)=="js_search_noadd") { - $l_sessid=$_REQUEST['PHPSESSID']; - - if ( $this->javascript=="") { /* if javascript is empty then we - add a default behaviour */ - $this->javascript=sprintf('onBlur="ajaxFid(\'%s\',\'%s\',\'%s\',\'%s\',\'%s\')"', - $this->name, - $this->extra, //deb or cred - $l_sessid, - 'js_search_only', - 'none' - ); - } - if ( $this->extra2 == "" ) $this->extra2="QuickCode"; - { - $r=sprintf('<TD> - <INPUT TYPE="button" onClick="SearchCard(\'%s\',\'%s\',\'%s\',1)" value="%s"> - %s</TD><TD> <INPUT class="input_text" TYPE="Text" " '. - ' NAME="%s" ID="%s" VALUE="%s" SIZE="8" %s>', - $l_sessid, - $this->extra, - $this->name, - $this->extra2, - $this->label, - $this->name, - $this->name, - $this->value, - $this->javascript - ); - } - - return $r; - }// poste==js_search_noadd - -//############################################################################# - // input type == js_search => button search for card - /*!\brief js_search_only only for searching a card when it is needed to update a other control - * \todo to finish + ajax - */ - if ( strtolower($this->type)=="js_search_card_control") { - $l_sessid=$_REQUEST['PHPSESSID']; - - if ( $this->javascript=="") { /* if javascript is empty then we - add a default behaviour */ - $this->javascript=sprintf('onBlur="ajaxFid(\'%s\',\'%s\',\'%s\',\'%s\',\'%s\')"', - $this->name, - $this->extra, //deb or cred - $l_sessid, - "searchcardControl", - $this->ctrl - ); - } - if ( $this->readonly == false ) { - if ( $this->extra2 == "" ) $this->extra2="QuickCode"; - $r=sprintf('<table><tr><TD> - <INPUT TYPE="button" onClick="searchCardCtrl(\'%s\',\'%s\',\'%s\',\'%s\')" value="%s"> - %s</TD><TD> <INPUT class="input_text" TYPE="Text" " '. - ' NAME="%s" ID="%s" VALUE="%s" SIZE="8" %s></tr></table>', - $l_sessid, - $this->extra, - $this->name, - $this->ctrl, - $this->extra2, - $this->label, - $this->name, - $this->name, - $this->value, - $this->javascript - ); - } else { - // readonly == true and table == 0 - $r=sprintf('%s', $this->value ); - } - return $r; - } - //############################################################################# - // type=span - if ( strtolower($this->type)=="span") { - $r=sprintf('<span style="inline" id="%s">%s </span>', - $this->name, - $this->value - ); - - return $r; - }// end type = span -//##################################################################### - // input type == js_tva - if ( strtolower($this->type)=="js_tva") { - $id=sprintf("<span id=%s></span>",$this->label); - $r=sprintf('%s<TD>Tva</TD><TD> <INPUT TYPE="Text" style="border:solid 1px blue;" '. - ' NAME="%s" VALUE="%s" SIZE="3" onChange="ChangeTVA(\'%s\',\'%s\');">', - $id, - $this->name, - $this->value, - $this->label, - $this->name); - $l_sessid=$_REQUEST['PHPSESSID']; - $r.=sprintf("<input type=\"button\" value=\"Tva\" - onClick=\" - ShowTva('%s',%d,'%s');\"></TD>", - $l_sessid,dossier::id(),$this->name); - return $r; - } -//##################################################################### - // input type == js_concerned => button search for the concerned operations - if ( strtolower($this->type)=="js_concerned") { - $td="";$etd=""; - if ( $this->table == 1 ) { $td='<td>'; $etd='</td>';} - - if ( $this->readonly == false) { - $l_sessid=$_REQUEST['PHPSESSID']; - - $r=sprintf("$td - <INPUT TYPE=\"button\" onClick=SearchJrn('%s',".dossier::id().",'%s',%s,'%s') value=\"?\"> - %s $etd $td - <INPUT TYPE=\"text\" style=\"color:black;background:lightyellow;border:solid 1px grey;\" NAME=\"%s\" ID=\"%s\" VALUE=\"%s\" SIZE=\"8\" readonly> - $etd", - $l_sessid, - $this->name, - $this->extra, - $this->extra2, - $this->label, - $this->name, - $this->name, - $this->value - ); - } else { - $r=sprintf("$td<span>%s <b>%s</b></span>",$this->label,$this->value); - $r.=sprintf('<input type="hidden" name="%s" value="%s">'.$etd, $this->name,$this->value); - } - - return $r; - }// end js_concerned - //##################################################################### - // BUTTON - //##################################################################### - if ( strtolower($this->type)=="button") { - $extra= ( isset($this->extra))?$this->extra:""; - if ( $this->readonly==true) return ""; - $r='<input type="BUTTON" name="'.$this->name.'"'. - ' id="'.$this->name.'"'. - ' value="'.$this->label.'"'. - ' onClick="'.$this->javascript.'"'.$extra.'>'; - return $r; - } - //##################################################################### - // JS_BUD_SEARCH_POSTE - //##################################################################### - if ( strtolower($this->type)=="js_bud_search_poste") { - if ( $this->readonly==true) return ""; - $dis= ( $this->disabled==true) ? "disabled":""; - - $this->javascript="bud_search_poste('".$_REQUEST['PHPSESSID']."',".dossier::id().",'$this->name')"; - $r='<input type="BUTTON" value="?"'.$dis. - ' onClick="'.$this->javascript.'" style="display:line">'; - $r.='<input type="text" readonly id="'.$this->name.'" name="'. - $this->name.'" value ="'.$this->value.'" size="35">'; - - $r.='<input type="hidden" name="'.$this->name.'_hidden" id="'.$this->name.'_hidden" value="'.$this->extra.'">'; - return $r; - } - - - //##################################################################### - // JS_DATE - //##################################################################### - if ( strtolower($this->type)=="js_date") { - if ( $this->readonly) { - $r="<span> Date : ".$this->value; - $r='<input type="hidden" name="'.$this->name.'"'. - 'id="'.$this->name.'"'. - ' value = "'.$this->value.'"></span>'; - } else { - $r='<input type="text" name="'.$this->name.'" id="'.$this->name.'"'. - 'style="border:solid 1px blue;"'. - 'size="10"'. - ' value ="'.$this->value.'"'. - '/>'. - '<img src="image/x-office-calendar.png" id="'.$this->name.'_trigger"'. - ' style="cursor: pointer; border: 1px solid red;" '. - 'onmouseover="this.style.background=\'red\';" onmouseout="this.style.background=\'\'" />'; - $r.='<script type="text/javascript">'. - 'Calendar.setup({'. - // 'date : "'.$this->value.'", - 'inputField : "'.$this->name.'", // id of the input field - ifFormat : "%d.%m.%Y", // format of the input field - button : "'.$this->name.'_trigger", // trigger for the calendar (button ID) - align : "Bl", // alignment (defaults to "Bl") - singleClick : true - }); -</script> -'; - } - if ($this->table==1) { - if ( $this->label != "") { - $r="<TD style=\"border:groove 1px blue;\">".$this->label."</TD><TD>".$r."</TD>"; - }else { - $r="<TD>".$r."</TD>"; - } - } - - return $r; - - } - return "INVALID WIDGET $this->type "; - } //end function - //##################################################################### - /* Debug - */ - function debug() { - echo "Type ".$this->type."<br>"; - echo "name ".$this->name."<br>"; - echo "value". $this->value."<br>"; - $readonly=($this->readonly==false)?"false":"true"; - echo "read only".$readonly."<br>"; - } - static function submit ($p_name,$p_value,$p_javascript="") { - - return '<INPUT TYPE="SUBMIT" NAME="'.$p_name.'" VALUE="'.$p_value.'" '.$p_javascript.'>'; - } - static function button ($p_name,$p_value,$p_javascript="") { - - return '<INPUT TYPE="button" NAME="'.$p_name.'" ID="'.$p_name.'" VALUE="'.$p_value.'" '.$p_javascript.'>'; - } - - static function reset ($p_value) { - return '<INPUT TYPE="RESET" VALUE="'.$p_value.'">'; - } - static function hidden($p_name,$p_value) { - return '<INPUT TYPE="hidden" id="'.$p_name.'" NAME="'.$p_name.'" VALUE="'.$p_value.'">'; - } - static function button_href($p_name,$p_value) { - $str='&PHPSESSID='.$_REQUEST['PHPSESSID']; -// $p_value.=$str; - return sprintf('<button onClick="window.location=\'%s\'">%s</button>', - $p_value, - $p_name); - - } - static function infobulle($p_comment){ - $r='<A HREF="#" style="display:inline;color:black;background-color:yellow" onmouseover="showBulle(\''.$p_comment.'\')" onClick="showBulle(\''.$p_comment.'\')" onmouseout="hideBulle(0)">?</A>'; - return $r; - } - -} diff --git a/include/client.inc.php b/include/client.inc.php index d42855035..a7f4e1087 100644 --- a/include/client.inc.php +++ b/include/client.inc.php @@ -18,87 +18,73 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + /*!\brief include from client.inc.php and concerned only the customer card and + * the customer category + */ +require_once("class_iselect.php"); +require_once("class_ihidden.php"); require_once("class_customer.php"); -$sub_action=(isset($_REQUEST['sb']))?$_REQUEST['sb']:"list"; +require_once("class_ibutton.php"); +require_once('class_iaction.php'); +require_once('class_fiche_def.php'); +require_once('class_iaction.php'); +require_once('class_fiche_def.php'); +require_once('class_ipopup.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo JS_CARD; +echo JS_AJAX_FICHE; +echo HtmlInput::phpsessid(); +echo ICard::ipopup('ipop_newcard'); +$ip_cat=new IPopup('ipop_cat'); +$ip_cat->title=_('Ajout d\'une catégorie'); +$ip_cat->value=''; +echo $ip_cat->input(); +echo IPoste::ipopup('ipop_account'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); +echo ICard::ipopup('ipopcard'); +$low_action=(isset($_REQUEST['sb']))?$_REQUEST['sb']:"list"; /*! \file * \brief Called from the module "Gestion" to manage the customer */ $User->can_request(GECUST); $href=basename($_SERVER['PHP_SELF']); -// Menu +// by default open liste +if ( $low_action == "" ) + $low_action="list"; + + +//----------------------------------------------------- // Remove a card -if ( isset ($_POST['delete']) ) +//----------------------------------------------------- +if ( isset($_POST['delete'] ) ) { + if ( $User->check_action(FICADD) == 0 ) { + alert('Vous ne pouvez pas enlever de fiche'); + return; + } $f_id=$_REQUEST['f_id']; $fiche=new Customer($cn,$f_id); $fiche->remove(); - $sub_action="list"; -} -//----------------------------------------------------- -// Add card -if ( $sub_action=="insert" ) -{ - - $retour=widget::button_href("Retour", urldecode($_REQUEST['url'])); - - $customer=new Customer($cn); - $customer->Save($_REQUEST['fd_id']); - - echo '<div class="content">'; - echo $retour; - echo "<table>"; - echo $customer->Display(true); - echo "</table>"; - echo $retour; - echo '</div>'; + $low_action="list"; } + //----------------------------------------------------- -// Save modification -if ( isset ($_POST['mod'])) -{ - - // modification is asked - $f_id=$_REQUEST['f_id']; - - $client=new Customer($cn,$f_id); - $client->Save(); -} -// by default open liste -if ( $sub_action == "" ) - $sub_action="list"; +// list of customer //----------------------------------------------------- -//Display a blank card -if ( $sub_action=="blank") -{ - - $retour=widget::button_href('Retour',$href.'?p_action=client&'.dossier::get()); - - echo '<div class="content">'; - - echo $retour; - $c=new Customer($cn); - echo '<form method="post" action="'.$href.'"'; - echo dossier::hidden(); - echo '<input type="hidden" name="p_action" value="client">'; - echo '<input type="hidden" name="sb" value="insert">'; - echo '<input type="hidden" name="fd_id" value="'.$_GET['fd_id'].'">'; - echo '<input type="hidden" name="url" value="'.$_GET['url'].'">'; - echo $c->blank($_GET['fd_id']); - echo '<input type="Submit" value="Sauve">'; - echo '</form>'; - echo $retour; - echo '</div>'; -} -//----------------------------------------------------- -// list - - -if ( $sub_action == "list" ) +if ( $low_action == "list" ) { ?> @@ -108,29 +94,11 @@ if ( $sub_action == "list" ) <?php echo dossier::hidden(); $a=(isset($_GET['query']))?$_GET['query']:""; - printf ('<input type="text" name="query" value="%s">', + printf ('Recherche <input type="text" name="query" value="%s">', $a); ?> <input type="submit" name="submit_query" value="recherche"> <input type="hidden" name="p_action" value="client"> -</form> -</span> -<span style="position:float;float:left"> -<form method="get" action="<?php echo $href;?>"> - <?php echo dossier::hidden(); ?> -<input type="hidden" name="p_action" value="client"> - -<?php - $w=new widget("select"); - $w->name="fd_id"; - $w->value= make_array($cn,"select fd_id,fd_label from fiche_def where ". - " frd_id=".FICHE_TYPE_CLIENT); - echo $w->IOValue(); -?> -<input type="hidden" name="sb" value="blank"> -<input type="submit" name="submit_query" value="Ajout Client"> -<input type="hidden" name="url" <?php $url=urlencode($_SERVER['REQUEST_URI']);echo 'value="'.$url.'"'; ?> - </form> </span> <?php @@ -138,40 +106,64 @@ if ( $sub_action == "list" ) $search=(isset($_GET['query']))?$_GET['query']:""; echo '<div class="content">'; - echo $client->Summary($search); + echo $client->Summary($search,'client'); + + + echo '<br>'; + echo '<br>'; + echo '<br>'; + /* Add button */ + $f_add_button=new IButton('add_card'); + $f_add_button->label=_('Créer une nouvelle fiche'); + $f_add_button->set_attribute('ipopup','ipop_newcard'); + $f_add_button->set_attribute('win_refresh','yes'); + // $list=$cn->make_list("select fd_id from fiche_def where frd_id=$1",array(FICHE_TYPE_CLIENT)); + $f_add_button->set_attribute('type_cat',FICHE_TYPE_CLIENT); + $f_add_button->javascript=" select_card_type(this);"; + echo $f_add_button->input(); + + $f_cat_button=new IButton('add_cat'); + $f_cat_button->set_attribute('ipopup','ipop_cat'); + $f_cat_button->set_attribute('type_cat',FICHE_TYPE_CLIENT); + $f_cat_button->label=_('Ajout d\'une catégorie'); + $f_cat_button->javascript='add_category(this)'; + echo $f_cat_button->input(); echo '</div>'; echo '</div>'; + } -//----------------------------------------------------- -// Show Detail -if ( $sub_action == 'detail' ) +/*---------------------------------------------------------------------- + * Detail for a card, Suivi, Contact, Operation,... * + * cc stands for customer card + *----------------------------------------------------------------------*/ +if ( $low_action == 'detail') { + /* Menu */ + require_once('client_card.inc.php'); + exit(); +} + +if ( $low_action=="insert" ) { - $f_id=$_REQUEST['f_id']; + /* security : check if user can add card */ + if ( $User->check_action(FICADD) == 0 ) { + alert('Vous ne pouvez pas ajouter de fiche'); + return; + } + + $customer=new Customer($cn); + $customer->Save($_REQUEST['fd_id']); echo '<div class="content">'; - $client=new Customer($cn,$f_id); - $retour=widget::button_href("Retour", urldecode($_REQUEST['url'])); + echo "<table>"; + echo $customer->Display(true); + echo "</table>"; + $retour=new IAction(); + $retour->label="Retour"; + $retour->value="?p_action=client&".dossier::get(); + echo $retour->input(); + echo '</div>'; - echo $retour; - echo '<form action="'.$_REQUEST['url'].'" method="post">'; - echo dossier::hidden(); - echo $client->Display(false); - $w=new widget("hidden"); - $w->name="p_action"; - $w->value="client"; - echo $w->IOValue(); - $w->name="f_id"; - $w->value=$f_id; - echo $w->IOValue(); - - - echo widget::submit('mod','Sauver les modifications'); - echo widget::reset("Annuler"); - echo widget::submit('delete','Effacer cette fiche','onclick="return confirm(\'Confirmer effacement ?\');"'); - - echo '</form>'; - echo $retour; - echo '<div>'; } + html_page_stop(); ?> diff --git a/include/client_card.inc.php b/include/client_card.inc.php new file mode 100644 index 000000000..96791d85d --- /dev/null +++ b/include/client_card.inc.php @@ -0,0 +1,130 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file will handle all the actions for a specific customer ( + * contact,operation,invoice and financial) + * include from client.inc.php and concerned only the customer card and + * the customer category + */ +require_once('class_contact.php'); +require_once('class_ipopup.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo js_include('card.js'); + +echo ICard::ipopup('ipopcard'); + + /* $sub_action = sb = detail */ + /* $cn database conx */ +$return=new IAction(); +$return->name='retour'; +$return->label='Retour'; +$return->value='?p_action=client&'.$str_dossier; +$root="?p_action=client&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier; +$ss_action=( isset ($_REQUEST['sc'] ))? $_REQUEST['sc']: ''; +switch ($ss_action) { +case 'dc': + $def=1; + break; +case 'sv': /* all the actions (mail,meeting...) */ + $def=2; + break; +case 'cn': + $def=3; + break; +case 'op': + $def=4; + break; +default: + $def=1; + $ss_action='dc'; +} +$f=new fiche($cn,$_REQUEST['f_id']); +echo '<span style="padding:2px"><h2 class="info2" style="display:inline">'.$f->get_quick_code()." ".$f->strAttribut(ATTR_DEF_NAME).'</span></h2>'; +echo '<div class="u_subtmenu">'; +echo ShowItem(array( + array($root."&sc=dc",_('Fiche'),_('Détail de la fiche'),1), + array($root.'&sc=sv',_('Suivi'),_('Suivi client, devis, bon de commande, courrier'),2), + array($root.'&sc=cn',_('Contact'),_('Liste de contacts de ce client'),3), + array($root.'&sc=op',_('Opérations'),_('Toutes les opérations'),4), + array('?p_action=client&'.dossier::get(),_('Retour liste'),_('Retour à la liste des clients'),5) + ), + 'H',"mtitle","mtitle",$def,' width="100%"'); +echo '</div>'; + +//--------------------------------------------------------------------------- +// Show Detail of a card and category +//--------------------------------------------------------------------------- +if ( $ss_action == 'dc' ) +{ + require_once('detail_client.inc.php'); +} +//--------------------------------------------------------------------------- +// Follow up : mail, bons de commande, livraison, rendez-vous... +//--------------------------------------------------------------------------- +if ( $ss_action == 'sv' ) { + require_once('suivi_client.inc.php'); +} +/*---------------------------------------------------------------------- + * Operation all the operation of this customer + * + * ----------------------------------------------------------------------*/ +if ( $ss_action == 'op') { + require_once('operation_client.inc.php'); +} +/*---------------------------------------------------------------------- + * All the contact + * + *----------------------------------------------------------------------*/ +if ( $ss_action == 'cn') { + echo '<div class="content">'; + echo dossier::hidden(); + echo HtmlInput::phpsessid(); + $f=new fiche($cn,$_REQUEST['f_id']); + $contact=new Contact($cn); + $contact->company=$f->get_quick_code(); + echo $contact->summary(); + + $sql=' select fd_id from fiche_def where frd_id='.FICHE_TYPE_CONTACT; + $filter=$cn->make_list($sql); + if ( empty ($filter)) { + echo '<span class="notice">'; + echo _("Vous devez aller dans fiche et créer une catégorie pour les contacts"); + echo '</span>'; + exit(); + } + /* Add button */ + $f_add_button=new IButton('add_card'); + $f_add_button->label=_('Créer une nouvelle fiche'); + $f_add_button->set_attribute('ipopup','ipopcard'); + + $f_add_button->set_attribute('filter',$filter); + $f_add_button->javascript=" select_card_type(this);"; + + echo $f_add_button->input(); + echo '</div>'; +} diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php index 12882a94c..5e80af41c 100644 --- a/include/compta_ach.inc.php +++ b/include/compta_ach.inc.php @@ -23,22 +23,39 @@ /*!\file * \brief file included to manage all the sold operation */ +require_once("class_icheckbox.php"); require_once("class_acc_ledger_purchase.php"); require_once ('class_pre_op_ach.php'); -require_once ('check_priv.php'); +require_once('class_ipopup.php'); $gDossier=dossier::id(); +echo js_include('prototype.js'); +echo js_include('card.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('ajax_fiche.js'); +echo js_include('dragdrop.js'); +echo js_include('acc_ledger.js'); +echo js_include('accounting_item.js'); +echo JS_INFOBULLE; +echo ICard::ipopup('ipopcard'); +echo ICard::ipopup('ipop_newcard'); +echo IPoste::ipopup('ipop_account'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); $p_action=(isset($_REQUEST['p_action']))?$_REQUEST['p_action']:''; -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); //menu = show a list of ledger $str_dossier=dossier::get(); -$array=array( - array('?p_action=ach&sa=n&'.$str_dossier,'Nouvelle dépense','Nouvel achat ou dépense',1), - array('?p_action=ach&sa=l&'.$str_dossier,'Liste achat','Liste des achats',2), - array('?p_action=ach&sa=lnp&'.$str_dossier,'Liste dépenses non payées','Liste des ventes non payées',3), - array('?p_action=impress&type=jrn&'.$str_dossier,'Impression','Impression') - ,array('?p_action=fournisseur&'.$str_dossier,'Fournisseur','Solde des fournisseurs',5) + +$array=array( + array('?p_action=ach&sa=n&'.$str_dossier,_('Nouvelle dépense'),_('Nouvel achat ou dépense'),1), + array('?p_action=ach&sa=l&'.$str_dossier,_('Liste achat'),_('Liste des achats'),2), + array('?p_action=ach&sa=lnp&'.$str_dossier,_('Liste dépenses non payées'),_('Liste des ventes non payées'),3) ); $sa=(isset ($_REQUEST['sa']))?$_REQUEST['sa']:-1; @@ -58,15 +75,13 @@ switch ($sa) { case 'lnp': $def=3; break; - case 'f': - $def=5; - break; } -if ( $_REQUEST['p_action'] == 'fournisseur') $def=5; +//if ( $_REQUEST['p_action'] == 'fournisseur') $def=5; echo '<div class="lmenu">'; echo ShowItem($array,'H','mtitle','mtitle',$def); echo '</div>'; $href=basename($_SERVER['PHP_SELF']); + //---------------------------------------------------------------------- // Encode a new invoice // empty form for encoding @@ -83,31 +98,31 @@ if ( $def==1 || $def == 4 ) { /* if a new invoice is encoded, we display a form for confirmation */ if ( isset ($_POST['view_invoice'] ) ) { $Ledger=new Acc_Ledger_Purchase($cn,$_POST['p_jrn']); - try { + try { $Ledger->verify($_POST); - } catch (AcException $e){ - echo '<script> alert("'.$e->getMessage().'");</script>'; + } catch (Exception $e){ + alert($e->getMessage()); $correct=1; } // if correct is not set it means it is correct if ( ! isset($correct)) { echo '<div class="content">'; - + echo '<form action="'.$href.'" enctype="multipart/form-data" method="post">'; - echo widget::hidden('sa','n'); - echo widget::hidden('p_action','ach'); + echo HtmlInput::hidden('sa','n'); + echo HtmlInput::hidden('p_action','ach'); echo dossier::hidden(); echo $Ledger->confirm($_POST ); - - $chk=new widget('checkbox'); + + $chk=new ICheckBox(); $chk->selected=false; echo "<br>Sauvez cette opération comme modèle ?"; - echo $chk->IOValue('opd_save'); - echo '<hr>'; - echo widget::submit("record","Enregistrement",'onClick="return verify_ca(\'error\');"'); - echo widget::submit('correct',"Corriger"); + echo $chk->input('opd_save'); + echo '<hr>'; + echo HtmlInput::submit("record",_("Enregistrement"),'onClick="return verify_ca(\'error\');"'); + echo HtmlInput::submit('correct',_("Corriger")); echo '</form>'; - + echo '</div>'; exit(); } @@ -118,10 +133,10 @@ if ( $def==1 || $def == 4 ) { if ( isset($_POST['record']) ){ $Ledger=new Acc_Ledger_Purchase($cn,$_POST['p_jrn']); - try { + try { $Ledger->verify($_POST); - } catch (AcException $e){ - echo '<script> alert("'.$e->getMessage().'");</script>'; + } catch (Exception $e){ + alert($e->getMessage()); $correct=1; } if ( ! isset($correct)) { @@ -129,7 +144,7 @@ if ( $def==1 || $def == 4 ) { $Ledger=new Acc_Ledger_Purchase($cn,$_POST['p_jrn']); $internal=$Ledger->insert($_POST); - + /* Save the predefined operation */ if ( isset($_POST['opd_save']) && $User->check_action(PARPREDE)==1) { echo_debug(__FILE__,__LINE__,'saving predefined op'); @@ -137,17 +152,19 @@ if ( $def==1 || $def == 4 ) { $opd->get_post(); $opd->save(); } - + /* Show button */ echo '<h2 class="info">'.$Ledger->get_name().'</h2>'; - echo "<h2 >Opération sauvée $internal "; + echo "<h2 >"._('Opération sauvée')." $internal "; if ( $Ledger->pj != '') echo ' Piece : '.h($Ledger->pj); echo "</h2>"; if ( strcmp($Ledger->pj,$_POST['e_pj']) != 0 ) { - echo '<h3 class="notice"> Attention numéro pièce existante, elle a du être adaptée</h3>'; + echo '<h3 class="notice"> '._('Attention numéro pièce existante, elle a du être adaptée').'</h3>'; } - - echo widget::button_href('Nouvelle dépense',$href.'?p_action=ach&sa=n&'.dossier::get()); + if (isset($Ledger->doc)) { + echo $Ledger->doc.'<hr>'; + } + echo HtmlInput::button_anchor(_('Nouvelle dépense'),$href.'?p_action=ach&sa=n&'.dossier::get()); echo '</div>'; exit(); } @@ -158,9 +175,7 @@ if ( $def==1 || $def == 4 ) { // ------------------------------ echo '<div class="content">'; - echo JS_PROTOTYPE; - - + echo "<FORM NAME=\"form_detail\" METHOD=\"POST\" >"; $array=(isset($_POST['correct'])||isset ($correct))?$_POST:null; $Ledger=new Acc_Ledger_Purchase($cn,0); @@ -171,7 +186,7 @@ if ( $def==1 || $def == 4 ) { if ( !isset($_REQUEST ['p_jrn'])) { $def_ledger=$Ledger->get_first('ach'); $Ledger->id=$def_ledger['jrn_def_id']; - } else + } else $Ledger->id=$_REQUEST ['p_jrn']; @@ -184,71 +199,108 @@ if ( $def==1 || $def == 4 ) { $p_post=$op->compute_array(); $Ledger->id=$_REQUEST ['p_jrn_predef']; $p_post['p_jrn']=$Ledger->id; - echo $Ledger->display_form($p_post); + echo $Ledger->input($p_post); + echo '<div class="content">'; + echo $Ledger->input_paid(); + echo '</div>'; echo '<script>'; - echo 'compute_all_purchase();'; + echo 'compute_all_ledger();'; echo '</script>'; } else { - echo $Ledger->display_form($array); - echo widget::hidden("p_action","ach"); - echo widget::hidden("sa","p"); - + echo $Ledger->input($array); + echo HtmlInput::hidden("p_action","ach"); + echo HtmlInput::hidden("sa","p"); + echo '<div class="content">'; + echo $Ledger->input_paid(); + echo '</div>'; echo '<script>'; - echo 'compute_all_purchase();'; + echo 'compute_all_ledger();'; echo '</script>'; } + echo '<div class="content">'; + echo HtmlInput::button('act',_('Actualiser'),'onClick="compute_all_ledger();"'); + echo HtmlInput::submit("view_invoice",_("Enregistrer")); + echo HtmlInput::reset(_('Effacer ')); + echo '</div>'; echo "</FORM>"; echo '<form method="GET" action="'.$href.'">'; - echo widget::hidden("sa","p"); - echo widget::hidden("p_action","ach"); + echo HtmlInput::hidden("sa","p"); + echo HtmlInput::hidden("p_action","ach"); echo dossier::hidden(); - echo widget::hidden('p_jrn_predef',$Ledger->id); + echo HtmlInput::hidden('p_jrn_predef',$Ledger->id); $op=new Pre_op_ach($cn); $op->set('ledger',$Ledger->id); $op->set('ledger_type',"ACH"); $op->set('direct','f'); echo $op->form_get(); + + echo '</form>'; + echo '<form onsubmit="cal();return false;" name="calc_line" method="get">'; + echo JS_CALC_LINE; echo '</form>'; echo '</div>'; + exit(); } //------------------------------------------------------------------------------- // Listing //-------------------------------------------------------------------------------- if ( $def == 2 ) { - // Check privilege - echo '<div class="content">'; - $Ledger=new Acc_Ledger_Purchase($cn,0); - if ( !isset($_GET['p_jrn'])) { - $def_ledger=$Ledger->get_first('ach'); - $Ledger->id=$def_ledger['jrn_def_id']; - } else - $Ledger->id=$_GET['p_jrn']; + // Check privilege + if ( isset($_REQUEST['p_jrn']) && + $User->check_jrn($_REQUEST['p_jrn']) == 'X') { - if ( $User->check_jrn($Ledger->id)=='X') { - NoAccess(); - exit -1; + NoAccess(); + exit -1; } + $Ledger=new Acc_Ledger_Purchase($cn,0); + if ( !isset($_REQUEST['p_jrn'])) { + $Ledger->id=-1; + } else + $Ledger->id=$_REQUEST['p_jrn']; + echo $Ledger->display_search_form(); //------------------------------ // UPdate the payment //------------------------------ if ( isset ( $_GET ['paid'])) { $Ledger->update_paid($_GET); } - + $p_array=$_GET; + /* by default we should the default period */ + if ( ! isset($p_array['date_start'])) { + $period=$User->get_periode(); + $per=new Periode($cn,$period); + list($date_start,$date_end)=$per->get_date_limit(); + $p_array['date_start']=$date_start; + $p_array['date_end']=$date_end; + } + /* compute the sql stmt */ + list($sql,$where)=$Ledger->build_search_sql($p_array); + + $max_line=$cn->count_sql($sql); + + $step=$_SESSION['g_pagesize']; + $page=(isset($_GET['offset']))?$_GET['page']:1; + $offset=(isset($_GET['offset']))?$_GET['offset']:0; + $bar=jrn_navigation_bar($offset,$max_line,$step,$page); echo '<form method="GET" action="'.$href.'">'; - echo widget::hidden("sa","l"); - echo widget::hidden("p_action","ach"); + echo HtmlInput::hidden("sa","l"); + echo HtmlInput::hidden("p_action","ach"); echo dossier::hidden(); - $Ledger->show_ledger(); + echo $bar; + list($count,$html)= $Ledger->list_operation($sql,$offset,1); + echo $html; + echo $bar; + echo '<p>'.HtmlInput::submit('paid',_('Mise à jour paiement')).'</p>'; + echo '</form>'; echo '</div>'; @@ -259,41 +311,53 @@ if ( $def == 2 ) { // Listing unpaid //--------------------------------------------------------------------------- if ( $def==3 ) { - $Ledger=new Acc_Ledger_Purchase($cn,0); - if ( !isset($_GET['p_jrn'])) { - $def_ledger=$Ledger->get_first('ach'); - $Ledger->id=$def_ledger['jrn_def_id']; - } else - $Ledger->id=$_GET['p_jrn']; - - if ( $User->check_jrn($Ledger->id)=='X') { - NoAccess(); - exit -1; + echo '<div class="content">'; + // Check privilege + if ( isset($_REQUEST['p_jrn']) && + $User->check_jrn($_REQUEST['p_jrn']) == 'X') { + NoAccess(); + exit -1; } - // Ask to update payment - if ( isset ( $_GET['paid'])) { + $Ledger=new Acc_Ledger_Purchase($cn,0); + if ( !isset($_REQUEST['p_jrn'])) { + $Ledger->id=-1; + } else + $Ledger->id=$_REQUEST['p_jrn']; + echo $Ledger->display_search_form(); + //------------------------------ + // UPdate the payment + //------------------------------ + if ( isset ( $_GET ['paid'])) { $Ledger->update_paid($_GET); } - echo '<div class="content">'; + /* compute the sql stmt */ + list($sql,$where)=$Ledger->build_search_sql($_GET); + if ( trim($where) != '') + $sql .= ' and '.SQL_LIST_UNPAID_INVOICE; + else + $sql .= ' where '.SQL_LIST_UNPAID_INVOICE; - echo '<FORM METHOD="GET" action="'.$href.'">'; - $wLedger=$Ledger->select_ledger('ACH',3); - if ($wLedger == null) exit ('Pas de journal disponible'); - $wLedger->javascript="onChange=submit()"; - echo "Journal ".$wLedger->IOValue(); - echo widget::submit ('search','Recherche'); - echo widget::hidden("p_action","ach"); - echo widget::hidden('sa','lnp'); - echo dossier::hidden(); + $max_line=$cn->count_sql($sql); + + $step=$_SESSION['g_pagesize']; + $page=(isset($_GET['offset']))?$_GET['page']:1; + $offset=(isset($_GET['offset']))?$_GET['offset']:0; + $bar=jrn_navigation_bar($offset,$max_line,$step,$page); + + + echo '<form method="GET" action="'.$href.'">'; + echo HtmlInput::hidden("sa","lnp"); + echo HtmlInput::hidden("p_action","ach"); + echo dossier::hidden(); + echo $bar; + list($count,$html)= $Ledger->list_operation($sql,$offset,1); + echo $html; + echo $bar; + + echo '<p>'.HtmlInput::submit('paid',_('Mise à jour paiement')).'</p>'; + echo '</form>'; - $Ledger->show_unpaid(); - echo '</FORM>'; echo '</div>'; exit(); - } -if ( $p_action == 'fournisseur') { - $User->can_request(GESUPPL,1); - require_once ('supplier.inc.php'); -} \ No newline at end of file diff --git a/include/compta_fin.inc.php b/include/compta_fin.inc.php index 7f00d1aab..8e3246962 100644 --- a/include/compta_fin.inc.php +++ b/include/compta_fin.inc.php @@ -23,17 +23,39 @@ /*!\file * \brief this file is to be included to handle the financial ledger */ +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo JS_INFOBULLE; +echo js_include('acc_ledger.js'); +echo js_include('ajax_fiche.js'); +echo JS_CARD; +echo js_include('accounting_item.js'); +echo js_include('dragdrop.js'); +echo js_include('acc_ledger.js'); require_once ('class_acc_ledger_fin.php'); +require_once('class_ipopup.php'); + $gDossier=dossier::id(); $p_action=(isset ($_REQUEST['p_action']))?$_REQUEST['p_action']:''; -$cn=DbConnect(dossier::id()); -$menu_action="?p_action=bank&".dossier::get(); +echo ICard::ipopup('ipopcard'); +echo ICard::ipopup('ipop_newcard'); +echo IPoste::ipopup('ipop_account'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); + + +$cn=new Database(dossier::id()); +$menu_action="?p_action=fin&".dossier::get(); $menu=array( - array($menu_action.'&sa=n','Nouvel extrait','Encodage d\'un nouvel extrait',1), - array($menu_action.'&sa=l','Liste','Liste opération bancaire',2), - array($menu_action.'&sa=s','Solde','Solde des comptes',3), - array('?p_action=impress&type=jrn&'.dossier::get(),'Impression','Impression') + array($menu_action.'&sa=n',_('Nouvel extrait'),_('Encodage d\'un nouvel extrait'),1), + array($menu_action.'&sa=l',_('Liste'),_('Liste opération bancaire'),2), + array($menu_action.'&sa=s',_('Solde'),_('Solde des comptes'),3), + array('?p_action=impress&type=jrn&'.dossier::get(),_('Impression'),_('Impression')) ); $sa=(isset($_REQUEST['sa']))?$_REQUEST['sa']:-1; @@ -51,7 +73,7 @@ default: $def=1; } echo '<div class="lmenu">'; -echo ShowItem($menu,'H','mtitle','mtitle',$def); + echo ShowItem($menu,'H','mtitle','mtitle',$def); echo '</div>'; $href=basename($_SERVER['PHP_SELF']); @@ -83,17 +105,17 @@ if ( $def == 1 ) { if ( isset($_POST['save'])) { try { $Ledger->verify($_POST); - } catch (AcException $e) { - echo '<script> alert("'.$e->getMessage().'");</script>'; + } catch (Exception $e) { + alert($e->getMessage()); $correct=1; } if ( ! isset ($correct )) { echo '<div class="content">'; echo '<form name="form_detail" enctype="multipart/form-data" ACTION="'.$href.'" METHOD="POST">'; - echo widget::hidden('p_action','bank'); + echo HtmlInput::hidden('p_action','fin'); echo $Ledger->confirm($_POST); - echo widget::submit('confirm','Confirmer'); - echo widget::submit('correct','Corriger'); + echo HtmlInput::submit('confirm',_('Confirmer')); + echo HtmlInput::submit('correct',_('Corriger')); echo '</form>'; echo '</div>'; @@ -107,15 +129,15 @@ if ( $def == 1 ) { if ( isset($_POST['confirm'])) { try { $Ledger->verify($_POST); - } catch (AcException $e) { - echo '<script> alert("'.$e->getMessage().'");</script>'; + } catch (Exception $e) { + alert($e->getMessage()); $correct=1; } if ( !isset($correct)) { echo '<div class="content">'; $a= $Ledger->insert($_POST); - echo '<h2 class="info">Opération sauvée </h2>'; - echo widget::button_href('Nouvelle extrait',$href.'?p_action=bank&sa=n&'.dossier::get()); + echo '<h2 class="info">'._('Opération sauvée').' </h2>'; + echo HtmlInput::button_anchor(_('Nouvel extrait'),$href.'?p_action=fin&sa=n&'.dossier::get()); echo $a; echo '</div>'; exit(); @@ -130,129 +152,114 @@ if ( $def == 1 ) { //---------------------------------------- // Blank form //---------------------------------------- - echo JS_PROTOTYPE; echo '<div class="content">'; echo '<form name="form_detail" enctype="multipart/form-data" ACTION="'.$href.'" METHOD="POST">'; - echo widget::hidden('p_action','bank'); - echo widget::hidden('sa','n'); + echo HtmlInput::hidden('p_action','fin'); + echo HtmlInput::hidden('sa','n'); $array=( isset($correct))?$_POST:null; // show select ledger - echo $Ledger->display_form($array); - echo widget::button('add_item','Ajout article', ' onClick="ledger_fin_add_row()"'); - echo widget::submit('save','Sauve'); - echo widget::reset('Effacer '); + echo $Ledger->input($array); + echo HtmlInput::button('add_item',_('Ajout article'), ' onClick="ledger_fin_add_row()"'); + echo HtmlInput::submit('save',_('Sauve')); + echo HtmlInput::reset(_('Effacer')); echo '</form>'; echo JS_CALC_LINE; echo '</div>'; exit(); + } //-------------------------------------------------------------------------------- // Show the listing //-------------------------------------------------------------------------------- if ( $def == 2) { - - echo '<div class="content">'; - if ( isset($_REQUEST['p_jrn'])) + $Ledger=new Acc_Ledger_Fin($cn,0); + if ( !isset($_REQUEST['p_jrn'])) { + $Ledger->id=-1; + } else $Ledger->id=$_REQUEST['p_jrn']; - else { - $def_ledger=$Ledger->get_first('fin'); - $Ledger->id=$def_ledger['jrn_def_id']; + echo '<div class="content">'; + echo $Ledger->display_search_form(); + $p_array=$_GET; + /* by default we should the default period */ + if ( ! isset($p_array['date_start'])) { + $period=$User->get_periode(); + $per=new Periode($cn,$period); + list($date_start,$date_end)=$per->get_date_limit(); + $p_array['date_start']=$date_start; + $p_array['date_end']=$date_end; } - $jrn_priv=$User->get_ledger_access($Ledger->id); + /* compute the sql stmt */ + list($sql,$where)=$Ledger->build_search_sql($p_array); - // Check privilege - if ( isset($_REQUEST['p_jrn']) && $jrn_priv=='X') { - NoAccess(); - exit -1; - } + $max_line=$cn->count_sql($sql); - $Ledger->show_ledger(); - echo '</div>'; + $step=$_SESSION['g_pagesize']; + $page=(isset($_GET['offset']))?$_GET['page']:1; + $offset=(isset($_GET['offset']))?$_GET['offset']:0; + $bar=jrn_navigation_bar($offset,$max_line,$step,$page); + + echo HtmlInput::hidden("sa","lnp"); + echo HtmlInput::hidden("p_action","ach"); + echo dossier::hidden(); + echo $bar; + list($count,$html)= $Ledger->list_operation($sql,$offset); + echo $html; + echo $bar; + + echo '</div>'; exit(); } //-------------------------------------------------------------------------------- // Show the saldo //-------------------------------------------------------------------------------- if ( $def==3) { - require_once("poste.php"); require_once ('class_acc_parm_code.php'); echo '<div class="content">'; - echo '<fieldset><legend>Par poste Comptable</legend>'; - // find the bank account - // NOTE : those values are in a table because - // they are _national_ parameters - $banque=new Acc_Parm_Code($cn,'BANQUE'); - $caisse=new Acc_Parm_Code($cn,'CAISSE'); - $vir_interne=new Acc_Parm_Code($cn,'VIREMENT_INTERNE'); - $accountSql="select distinct pcm_val::text as pcm_val,pcm_lib from - tmp_pcmn - where pcm_val::text like '".$banque->p_value."%' or pcm_val::text like '".$vir_interne->p_value."%' - or pcm_val::text like '".$caisse->p_value."%' - order by pcm_val::text"; - $aFinAccount=get_array($cn,$accountSql); + $fiche=new fiche_def($cn); + $array=$fiche->get_by_category(FICHE_TYPE_FIN); + echo '<div class="content">'; - echo "<table class=\"result\">"; + echo '<table width="50%" class="result">'; // Filter the saldo // on the current year $filter_year=" j_tech_per in (select p_id from parm_periode where p_exercice='".$User->get_exercice()."')"; - + // for highligting tje line + $idx=0; // for each account - for ( $i = 0; $i < count($aFinAccount);$i++) { + for ( $i = 0; $i < count($array);$i++) { // get the saldo - $m=get_solde($cn,$aFinAccount[$i]['pcm_val'],' and '.$filter_year); + $m=$array[$i]->get_solde_detail($filter_year); + + $solde=$m['debit']-$m['credit']; + // print the result if the saldo is not equal to 0 - if ( $m != 0.0 ) { - echo "<tr>"; - echo "<TD>". - $aFinAccount[$i]['pcm_val']. + if ( $m['debit'] != 0.0 || $m['credit'] != 0.0) { + if ( $idx%2 != 0 ) + $odd="odd"; + else + $odd=""; + $idx++; + echo "<tr class=\"$odd\">"; + echo "<TD >". + $array[$i]->strAttribut(ATTR_DEF_QUICKCODE). + "</TD>"; + + echo "<TD >". + $array[$i]->strAttribut(ATTR_DEF_NAME). "</TD>". - "<TD>". - $aFinAccount[$i]['pcm_lib']. - "</TD>"."<TD>". - $m. + "<TD align=\"right\">". + $solde. "</TD>"."</TR>"; } }// for echo "</table>"; - echo '</fieldset>'; - echo '<fieldset><legend>Par fiche (quick_code)</legend>'; - - $strAccount='('; - foreach ($aFinAccount as $a) { - $strAccount.="'".$a['pcm_val']."',"; - } - $strAccount.="'-1')"; - - /* find all the quick_code with the corresponding account */ - $sql='select f_id from fiche join jnt_fic_att_value using (f_id) join attr_value using (jft_id) where ad_id='.ATTR_DEF_ACCOUNT. - ' and av_text in '.$strAccount; - - $aFiche=get_array($cn,$sql); - echo '<table class="result">'; - foreach ($aFiche as $k=>$f_id) { - - $fiche=new fiche($cn,$f_id['f_id']); - $saldo_detail=$fiche->get_solde_detail($filter_year); - $saldo=( $saldo_detail['debit']>=$saldo_detail['credit'])?$saldo_detail['solde']:$saldo_detail['solde']*(-1); - $name=$fiche->getName(); - $qcode=$fiche->get_quick_code(); - -?> -<tr> -<td> <?=$qcode?></td> -<td> <?=$name?> </td> -<td> <?=$saldo?></td> -</tr> -<?php - } - echo ' </table>'; - echo '</fieldset>'; echo "</div>"; exit(); -} \ No newline at end of file +} + diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php index bd8d09fba..2f96f99ec 100644 --- a/include/compta_ven.inc.php +++ b/include/compta_ven.inc.php @@ -23,24 +23,38 @@ /*!\file * \brief file included to manage all the sold operation */ +require_once("class_icheckbox.php"); require_once("class_acc_ledger_sold.php"); -require_once ('check_priv.php'); require_once ('class_pre_op_ven.php'); require_once ('class_document.php'); require_once ('class_acc_ledger_info.php'); -$p_action=(isset($_REQUEST['p_action']))?$_REQUEST['p_action']:''; -require_once ('check_priv.php'); -$gDossier=dossier::id(); +require_once('class_ipopup.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo js_include('acc_ledger.js'); +echo JS_INFOBULLE; +echo JS_CARD; +echo ICard::ipopup('ipopcard'); +echo ICard::ipopup('ipop_newcard'); +echo IPoste::ipopup('ipop_account'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); -$cn=DbConnect(dossier::id()); +$p_action=(isset($_REQUEST['p_action']))?$_REQUEST['p_action']:''; +$gDossier=dossier::id(); +$cn=new Database(dossier::id()); //menu = show a list of ledger $str_dossier=dossier::get(); -$array=array( - array('?p_action=ven&sa=n&'.$str_dossier,'Nouvelle vente','Nouvelle vente',1), - array('?p_action=ven&sa=l&'.$str_dossier,'Liste ventes','Liste des ventes',2), - array('?p_action=ven&sa=lnp&'.$str_dossier,'Liste vente non payées','Liste des ventes non payées',3), - array('?p_action=impress&type=jrn&'.$str_dossier,'Impression','Impression') - ,array('?p_action=client&sa=f&'.$str_dossier,'Clients','Solde des clients',5) +$array=array( + array('?p_action=ven&sa=n&'.$str_dossier,_('Nouvelle vente'),_('Nouvelle vente'),1), + array('?p_action=ven&sa=l&'.$str_dossier,_('Liste ventes'),_('Liste des ventes'),2), + array('?p_action=ven&sa=lnp&'.$str_dossier,_('Liste vente non payées'),_('Liste des ventes non payées'),3) ); $sa=(isset ($_REQUEST['sa']))?$_REQUEST['sa']:-1; @@ -60,15 +74,14 @@ switch ($sa) { case 'lnp': $def=3; break; - case 'f': - $def=5; - break; } -if ( $_REQUEST['p_action'] == 'client') $def=5; + echo '<div class="lmenu">'; echo ShowItem($array,'H','mtitle','mtitle',$def); echo '</div>'; $href=basename($_SERVER['PHP_SELF']); + + //---------------------------------------------------------------------- // Encode a new invoice // empty form for encoding @@ -77,42 +90,42 @@ if ( $def==1 || $def == 4 ) { $Ledger=new Acc_Ledger_Sold($cn,0); // Check privilege - if ( isset($_REQUEST['p_jrn']) && + if ( isset($_REQUEST['p_jrn']) && $User->check_jrn($_REQUEST['p_jrn']) != 'W' ) { NoAccess(); exit -1; } - + /* if a new invoice is encoded, we display a form for confirmation */ if ( isset ($_POST['view_invoice'] ) ) { $Ledger=new Acc_Ledger_Sold($cn,$_POST['p_jrn']); - try { + try { $Ledger->verify($_POST); - } catch (AcException $e){ - echo '<script> alert("'.$e->getMessage().'");</script>'; + } catch (Exception $e){ + alert($e->getMessage()); $correct=1; } // if correct is not set it means it is correct if ( ! isset($correct)) { echo '<div class="content">'; - + echo '<form action="'.$href.'" enctype="multipart/form-data" method="post">'; - echo widget::hidden('sa','n'); - echo widget::hidden('p_action','ven'); + echo HtmlInput::hidden('sa','n'); + echo HtmlInput::hidden('p_action','ven'); echo dossier::hidden(); echo $Ledger->confirm($_POST ); - - $chk=new widget('checkbox'); + + $chk=new ICheckBox(); $chk->selected=false; - echo "Sauvez cette opération comme modèle ?"; - echo $chk->IOValue('opd_save'); - echo '<hr>'; - echo widget::submit("record","Enregistrement",'onClick="return verify_ca(\'error\');"'); - echo widget::submit('correct',"Corriger"); + echo _("Sauvez cette opération comme modèle ?"); + echo $chk->input('opd_save'); + echo '<hr>'; + echo HtmlInput::submit("record",_("Enregistrement"),'onClick="return verify_ca(\'error\');"'); + echo HtmlInput::submit('correct',_("Corriger")); echo '</form>'; - + echo '</div>'; exit(); } @@ -130,12 +143,13 @@ if ( $def==1 || $def == 4 ) { } $Ledger=new Acc_Ledger_Sold($cn,$_POST['p_jrn']); - try { + try { $Ledger->verify($_POST); - } catch (AcException $e){ - echo '<script> alert("'.$e->getMessage().'");</script>'; + } catch (Exception $e){ + alert($e->getMessage()); $correct=1; } + if ( ! isset($correct)) { echo '<div class="content">'; $Ledger=new Acc_Ledger_Sold($cn,$_POST['p_jrn']); @@ -147,44 +161,33 @@ if ( $def==1 || $def == 4 ) { $opd->get_post(); $opd->save(); } - + /* Show button */ echo '<h2 class="info">'.$Ledger->get_name().'</h2>'; - echo "<h2 >Opération sauvée $internal "; + echo "<h2 >"._('Opération sauvée')." $internal "; if ( $Ledger->pj != '') echo ' Piece : '.h($Ledger->pj); echo "</h2>"; - if ( strcmp($Ledger->pj,$_POST['e_pj']) != 0 ) { - echo '<h3 class="notice"> Attention numéro pièce existante, elle a du être adaptée</h3>'; + echo '<h3 class="notice"> '._('Attention numéro pièce existante, elle a du être adaptée').'</h3>'; } - /* Here you need to generate the invoice */ - if ( isset($_REQUEST['gen_invoice']) ) { - $doc=new Document($cn); - $doc->f_id=$_REQUEST['e_client']; - $doc->md_id=$_REQUEST['gen_doc']; - $doc->ag_id=0; - $str_file=$doc->Generate(); - $doc->MoveDocumentPj($internal); - $sql="update jrn set jr_comment=jr_comment ||'Facture ".$doc->d_number."' where jr_internal='$internal'"; - ExecSql($cn,$sql); - /* Save the additional information into jrn_info */ - $obj=new Acc_Ledger_Info($cn); - $jr_id=$obj->search_id_internal($internal); - if (strlen(trim($_POST['bon_comm'] )) != 0 ) { - $obj->set_type('BON_COMMANDE'); - $obj->set_value($_POST['bon_comm']); - $obj->insert(); - } - if (strlen(trim($_POST['other_info'] )) != 0 ) { - $obj->set_type('OTHER'); - $obj->set_value($_POST['other_info']); - $obj->insert(); - } - echo $str_file; - + /* Show link for Invoice */ + if (isset ($Ledger->doc) ) { echo $Ledger->doc; echo '<hr>';} + + /* Save the additional information into jrn_info */ + $obj=new Acc_Ledger_Info($cn); + $jr_id=$obj->search_id_internal($internal); + if (strlen(trim($_POST['bon_comm'] )) != 0 ) { + $obj->set_type('BON_COMMANDE'); + $obj->set_value($_POST['bon_comm']); + $obj->insert(); + } + if (strlen(trim($_POST['other_info'] )) != 0 ) { + $obj->set_type('OTHER'); + $obj->set_value($_POST['other_info']); + $obj->insert(); } - echo widget::button_href('Nouvelle vente',$href.'?p_action=ven&sa=n&'.dossier::get()); + echo HtmlInput::button_anchor(_('Nouvelle vente'),$href.'?p_action=ven&sa=n&'.dossier::get()); echo '</div>'; exit(); } @@ -194,9 +197,7 @@ if ( $def==1 || $def == 4 ) { // ------------------------------ echo '<div class="content">'; - echo JS_PROTOTYPE; - - echo "<FORM NAME=\"form_detail\" METHOD=\"POST\">"; + echo "<FORM NAME=\"form_detail\" METHOD=\"POST\" >"; $array=(isset($_POST['correct'])||isset ($correct))?$_POST:null; $Ledger=new Acc_Ledger_Sold($cn,0); @@ -207,7 +208,7 @@ if ( $def==1 || $def == 4 ) { if ( !isset($_REQUEST ['p_jrn'])) { $def_ledger=$Ledger->get_first('ven'); $Ledger->id=$def_ledger['jrn_def_id']; - } else + } else $Ledger->id=$_REQUEST ['p_jrn']; @@ -222,33 +223,48 @@ if ( $def==1 || $def == 4 ) { $p_post=$op->compute_array(); $Ledger->id=$_REQUEST ['p_jrn_predef']; - echo $Ledger->display_form($p_post); + echo $Ledger->input($p_post); + echo '<div class="content">'; + echo $Ledger->input_paid(); + echo '</div>'; echo '<script>'; - echo 'compute_all_sold();'; + echo 'compute_all_ledger();'; echo '</script>'; } else { - echo widget::hidden("p_action","ven"); - echo widget::hidden("sa","p"); - echo $Ledger->display_form($array); + echo HtmlInput::hidden("p_action","ven"); + echo HtmlInput::hidden("sa","p"); + echo $Ledger->input($array); + echo '<div class="content">'; + echo $Ledger->input_paid(); + echo '</div>'; + echo '<script>'; + echo 'compute_all_ledger();'; + echo '</script>'; } + echo '<div class="content">'; + echo HtmlInput::button('act',_('Actualiser'),'onClick="compute_all_ledger();"'); + echo HtmlInput::submit("view_invoice",_("Enregistrer")); + echo HtmlInput::reset(_('Effacer ')); + echo '</div>'; echo "</FORM>"; - + echo '<div class="content">'; echo '<form method="GET" action="'.$href.'">'; - echo widget::hidden("sa","p"); - echo widget::hidden("p_action","ven"); + echo HtmlInput::hidden("sa","p"); + echo HtmlInput::hidden("p_action","ven"); echo dossier::hidden(); - echo widget::hidden('p_jrn_predef',$Ledger->id); + echo HtmlInput::hidden('p_jrn_predef',$Ledger->id); $op=new Pre_op_ven($cn); $op->set('ledger',$Ledger->id); $op->set('ledger_type',"VEN"); $op->set('direct','f'); echo $op->form_get(); + echo '</div>'; $own=new Own($cn); /* if we suggest the pj n# the run the script */ if ( $own->MY_PJ_SUGGEST=='Y') { echo '<script> update_pj();</script>'; - } + } echo '</form>'; echo '<form onsubmit="cal();return false;" name="calc_line" method="get">'; echo JS_CALC_LINE; @@ -262,7 +278,7 @@ if ( $def==1 || $def == 4 ) { if ( $def == 2 ) { echo '<div class="content">'; // Check privilege - if ( isset($_REQUEST['p_jrn']) && + if ( isset($_REQUEST['p_jrn']) && $User->check_jrn($_REQUEST['p_jrn']) == 'X') { NoAccess(); @@ -271,25 +287,46 @@ if ( $def == 2 ) { $Ledger=new Acc_Ledger_Sold($cn,0); if ( !isset($_REQUEST['p_jrn'])) { - $def_ledger=$Ledger->get_first('ven'); - $Ledger->id=$def_ledger['jrn_def_id']; - } else + $Ledger->id=-1; + } else $Ledger->id=$_REQUEST['p_jrn']; - + echo $Ledger->display_search_form(); //------------------------------ // UPdate the payment //------------------------------ if ( isset ( $_GET ['paid'])) { $Ledger->update_paid($_GET); } - + $p_array=$_GET; + /* by default we should the default period */ + if ( ! isset($p_array['date_start'])) { + $period=$User->get_periode(); + $per=new Periode($cn,$period); + list($date_start,$date_end)=$per->get_date_limit(); + $p_array['date_start']=$date_start; + $p_array['date_end']=$date_end; + } + /* compute the sql stmt */ + list($sql,$where)=$Ledger->build_search_sql($p_array); + + $max_line=$cn->count_sql($sql); + + $step=$_SESSION['g_pagesize']; + $page=(isset($_GET['offset']))?$_GET['page']:1; + $offset=(isset($_GET['offset']))?$_GET['offset']:0; + $bar=jrn_navigation_bar($offset,$max_line,$step,$page); echo '<form method="GET" action="'.$href.'">'; - echo widget::hidden("sa","l"); - echo widget::hidden("p_action","ven"); + echo HtmlInput::hidden("sa","l"); + echo HtmlInput::hidden("p_action","ven"); echo dossier::hidden(); - $Ledger->show_ledger(); + echo $bar; + list($count,$html)= $Ledger->list_operation($sql,$offset,1); + echo $html; + echo $bar; + echo '<p>'.HtmlInput::submit('paid',_('Mise à jour paiement')).'</p>'; + echo '</form>'; echo '</div>'; @@ -300,47 +337,57 @@ if ( $def == 2 ) { // Listing unpaid //--------------------------------------------------------------------------- if ( $def==3 ) { + echo '<div class="content">'; // Check privilege - if ( isset($_REQUEST['p_jrn']) && + if ( isset($_REQUEST['p_jrn']) && $User->check_jrn($_REQUEST['p_jrn']) == 'X') { - - NoAccess(); - exit -1; + NoAccess(); + exit -1; } - + $Ledger=new Acc_Ledger_Sold($cn,0); if ( !isset($_REQUEST['p_jrn'])) { - $def_ledger=$Ledger->get_first('ven'); - $Ledger->id=$def_ledger['jrn_def_id']; - } else + $Ledger->id=-1; + } else $Ledger->id=$_REQUEST['p_jrn']; - - // Ask to update payment - if ( isset ( $_GET['paid'])) { + echo $Ledger->display_search_form(); + //------------------------------ + // UPdate the payment + //------------------------------ + if ( isset ( $_GET ['paid'])) { $Ledger->update_paid($_GET); } - echo '<div class="content">'; - echo '<FORM METHOD="GET" action="'.$href.'">'; - $wLedger=$Ledger->select_ledger('VEN',3); - if ( $wLedger == null ) { - alert('aucun journal de disponible'); - exit(); - } - $wLedger->javascript="onChange=submit()"; - echo "Journal ".$wLedger->IOValue(); - echo widget::submit ('search','Recherche'); - echo widget::hidden("p_action","ven"); - echo widget::hidden('sa','lnp'); - echo dossier::hidden(); + $p_array=$_GET; + + /* compute the sql stmt */ + list($sql,$where)=$Ledger->build_search_sql($p_array); + if ( trim($where) != '') + $sql .= ' and '.SQL_LIST_UNPAID_INVOICE; + else + $sql .= ' where '.SQL_LIST_UNPAID_INVOICE; + + $max_line=$cn->count_sql($sql); + + $step=$_SESSION['g_pagesize']; + $page=(isset($_GET['offset']))?$_GET['page']:1; + $offset=(isset($_GET['offset']))?$_GET['offset']:0; + $bar=jrn_navigation_bar($offset,$max_line,$step,$page); + + + echo '<form method="GET" action="'.$href.'">'; + echo HtmlInput::hidden("sa","lnp"); + echo HtmlInput::hidden("p_action","ven"); + echo dossier::hidden(); + echo $bar; + list($count,$html)= $Ledger->list_operation($sql,$offset,1); + echo $html; + echo $bar; + + echo '<p>'.HtmlInput::submit('paid',_('Mise à jour paiement')).'</p>'; + echo '</form>'; - $Ledger->show_unpaid(); - echo '</FORM>'; echo '</div>'; exit(); } -if ( $p_action == 'client') { - $User->can_request(GECUST,1); - require_once ('client.inc.php'); -} diff --git a/include/config_file.php b/include/config_file.php index 12891321f..35e77a114 100644 --- a/include/config_file.php +++ b/include/config_file.php @@ -24,7 +24,7 @@ * \brief functions concerning the config file config.inc.php. The domain is not set into the form for security issues */ -require_once('class_widget.php'); +require_once("class_itext.php"); /*!\brief @@ -48,34 +48,34 @@ function config_file_form($p_array=null) $cdomain=''; } else extract ($p_array); - $text=new widget('text'); + $text=new IText(); $r=''; $r.='<div style="position:float;float:left;text-align:right;line-height:1.8em;padding:0 0.9em 0 0">'; $r.='Répertoire temporaire : '; $text->title='Indiquez ici le répertoire où les documents temporaires peuvent être sauvé exemple c:\\\\temp, /tmp'; - $r.=$text->IOValue('ctmp',$ctmp); + $r.=$text->input('ctmp',$ctmp); $r.='<A href="#" title="'.$text->title.'" onclick="alert(\''.$text->title.'\')">(?)</a>'; $r.='<br>'; $r.='Chemin complet vers les executable de Postgresql : '; $text->title='Le chemin vers le repertoire contenant psql, pg_dump...'; - $r.=$text->IOValue('cpath',$cpath); + $r.=$text->input('cpath',$cpath); $r.='<A href="#" title="'.$text->title.'" onclick="alert(\''.$text->title.'\')">(?)</a>'; $r.='<br>'; $text->title="Utilisateur de la base de donnée postgresql"; $r.='Utilisateur de la base de donnée : '; - $r.=$text->IOValue('cuser',$cuser); + $r.=$text->input('cuser',$cuser); $r.='<A href="#" title="'.$text->title.'" onclick="alert(\''.$text->title.'\')">(?)</a>'; $r.='<br>'; $text->title="Mot de passe de l\' utilisateur"; $r.='Mot de passe de l\'utilisateur : '; - $r.=$text->IOValue('cpasswd',$cpasswd); + $r.=$text->input('cpasswd',$cpasswd); $r.='<A href="#" title="'.$text->title.'" onclick="alert(\''.$text->title.'\')">(?)</a>'; $r.='<br>'; $text->title="Port "; $r.='Port de postgresql : '; - $r.=$text->IOValue('cport',$cport); + $r.=$text->input('cport',$cport); $r.='<A href="#" title="'.$text->title.'" onclick="alert(\''.$text->title.'\')">(?)</a>'; $r.='<br>'; $r.='</div>'; @@ -88,38 +88,39 @@ function config_file_create($p_array,$from_setup=1,$os=1) { $add=($from_setup==1)?'..'.DIRECTORY_SEPARATOR:''; $hFile= fopen($add.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'config.inc.php','w'); fputs($hFile,'<?php '); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile, 'date_default_timezone_set (\'Europe/Brussels\');'); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile, "\$_ENV['TMP']='".$ctmp."';"); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile, 'define("PG_PATH","'.$cpath.'");'); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); if ( $os == 1 ) { fputs($hFile, 'define("PG_RESTORE","'.$cpath.DIRECTORY_SEPARATOR.'pg_restore ");'); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile, 'define("PG_DUMP","'.$cpath.DIRECTORY_SEPARATOR.'pg_dump ");'); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile, 'define ("PSQL","'.$cpath.DIRECTORY_SEPARATOR.'psql");'); } else { fputs($hFile, 'define("PG_RESTORE","pg_restore.exe");'); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile, 'define("PG_DUMP","pg_dump.exe");'); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile, 'define ("PSQL","psql.exe");'); } - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile, 'define ("phpcompta_user","'.$cuser.'");'); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile, 'define ("phpcompta_password","'.$cpasswd.'");'); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile, 'define ("phpcompta_psql_port","'.$cport.'");'); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile, 'define ("phpcompta_psql_host","127.0.0.1");'); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); + fputs($hFile, 'define ("domaine","");'); - fputs($hFile,"\n\r"); + fputs($hFile,"\r\n"); fputs($hFile,'?>'); fclose($hFile); } diff --git a/include/constant.php b/include/constant.php index ab5fbfe4a..ffe5bca70 100644 --- a/include/constant.php +++ b/include/constant.php @@ -1,4 +1,4 @@ -<?php +<?php /* * This file is part of PhpCompta. * @@ -21,17 +21,19 @@ /*! \file * \brief Contains all the variable + the javascript - * and some parameter + * and some parameter */ require_once ('config.inc.php'); require_once('constant.security.php'); -define ("DBVERSION",59); +define ("DBVERSION",62); define ("MAX_COMPTE",4); -define ('MAX_BUD_DETAIL',20); -define ('MAX_ARTICLE',8); -define ("DEBUG","false"); /* value are true or false */ +define ('MAX_ARTICLE',9); +define ('MAX_CAT',15); +define ('MAX_FORECAST_ITEM',20); + +define ("DEBUG","false"); // Erreur define ("NOERROR",0); @@ -89,6 +91,11 @@ define ("ATTR_DEF_COMPANY",25); define ("ATTR_DEF_FAX",26); define ("ATTR_DEF_NUMBER_CUSTOMER",30); define ("ATTR_DEF_DEP_PRIV",31); +define ("ATTR_DEF_DEPENSE_NON_DEDUCTIBLE",20); +define ("ATTR_DEF_TVA_NON_DEDUCTIBLE",21); +define ("ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP",22); +define ("ATTR_DEF_QUICKCODE",23); + define ("FICHE_TYPE_CLIENT",9); define ("FICHE_TYPE_VENTE",1); @@ -102,35 +109,20 @@ define ("FICHE_TYPE_ACH_SER",3); -define ("ATTR_DEF_DEPENSE_NON_DEDUCTIBLE",20); -define ("ATTR_DEF_TVA_NON_DEDUCTIBLE",21); -define ("ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP",22); -define ("ATTR_DEF_QUICKCODE",23); define ("JS_CONFIRM", "<SCRIPT language=\"javascript\" src=\"js/confirm.js\"> </SCRIPT>"); -define ("JS_SEARCH_POSTE", -"<SCRIPT language=\"javascript\" src=\"js/search_poste.js\"> </SCRIPT>"); - -define ("JS_BUD_SCRIPT", -"<SCRIPT language=\"javascript\" src=\"js/bud_script.js\"> </SCRIPT>"); - -define ("JS_VIEW_JRN_CANCEL", -"<script language=\"javascript\" src=\"js/cancel_op.js\"> </script>"); - -define ("JS_VIEW_JRN_MODIFY", -"<script language=\"javascript\" src=\"js/modify_op.js\"> </script>"); +define ("JS_ACCOUNTING_ITEM", +"<SCRIPT language=\"javascript\" src=\"js/accounting_item.js\"> </SCRIPT>"); -define ("JS_UPDATE_PCMN", -"<script language=\"javascript\" src=\"js/update_pcmn.js\"> </script>"); - -define ("JS_SEARCH_CARD"," -<script language=\"javascript\" src=\"js/search_card.js\"></script> +define ("JS_LEDGER"," +<script language=\"javascript\" src=\"js/acc_ledger.js\"></script> "); -// concerned operation -define ("JS_CONCERNED_OP",' -<script type="text/javascript" language="javascript" src="js/jrn_concerned.js"> -</script>'); +define ("JS_CARD"," +<script language=\"javascript\" src=\"js/card.js\"></script> +"); + + define ('JS_CALENDAR',' <script type="text/javascript" language="javascript" src="js/jrn_concerned.js"> </script>'); @@ -174,15 +166,14 @@ define ("JS_COMPUTE_ODS", function ShowTva(p_sessid,p_dossier,ctl) { var win=window.open('show_tva.php?ctl='+ctl+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier,'Montre','scrollbar,toolbar=no,width=300,height=300,resizable=yes'); - } + } function GetIt(ctl,tva_id) { self.opener.SetValue(ctl,tva_id) - window.close(); - } + window.close(); + } </script>"); define ("JS_TVA","<script language=\"javascript\"> - function ChangeTVA(p_ctl,p_value) { if (document.getElementById(p_ctl) ) { var f=document.getElementsByName(p_value); @@ -197,16 +188,15 @@ define ("JS_AJAX_FICHE",'<script language="javascript" src="js/ajax_fiche.js"></ define ("JS_TODO",'<script language="javascript" src="js/todo_list.js"></script>'); define ("JS_AJAX_OP",'<script language="javascript" src="js/ajax_op.js"></script>'); define ("JS_PROTOTYPE",'<script language="javascript" src="js/prototype.js"></script>'); -define ("JS_MINTOOLKIT",'<script language="javascript" src="js/mintoolkit.js"></script>'); // Sql string define ("SQL_LIST_ALL_INVOICE",""); -define ("SQL_LIST_UNPAID_INVOICE"," where (jr_rapt is null or jr_rapt = '') and jr_valid = true and jr_ech is null" -); +define ("SQL_LIST_UNPAID_INVOICE"," (jr_rapt is null or jr_rapt = '') and jr_valid = true and jr_ech is null" +); -define ("SQL_LIST_UNPAID_INVOICE_DATE_LIMIT" ," - where (jr_rapt is null or jr_rapt = '') +define ("SQL_LIST_UNPAID_INVOICE_DATE_LIMIT" ," + where (jr_rapt is null or jr_rapt = '') and to_date(to_char(jr_ech,'DD.MM.YYYY'),'DD.MM.YYYY') < to_date(to_char(now(),'DD.MM.YYYY'),'DD.MM.YYYY') and jr_ech is not null and jr_valid = true" ); ?> diff --git a/include/constant.security.php b/include/constant.security.php index 27d1194b9..5cff00899 100644 --- a/include/constant.security.php +++ b/include/constant.security.php @@ -1,8 +1,4 @@ <?php -define ("BUDLEC",100); //Accès en lecture -define ("BUDHYP",110); //Création hypothèse -define ("BUDFIC",120); //Création de fiche -define ("BUDIMP",130); //Impression define ("CAPA",210); //Ajout de plan analytique define ("CAPO",220); //Ajout de poste analytique define ("CAGA",230); //Ajout de groupe analytique @@ -14,6 +10,7 @@ define ("GEOP",307); //Effacement d'opération define ("GECOUR",310); //Courrier (lecture & écriture) define ("GESUPPL",311); /* Fournisseur */ define ("GECUST",312); /* Clients */ +define ("GEADM",313); /* Administration */ define ("GESTOCK",320); //gestion de stock define ("IMPRAP",700); //Rapport define ("IMPJRN",710); //Journaux @@ -43,4 +40,7 @@ define ("PARRAP",1230); //Création de rapport define ("PARPREDE",1240); //Effacement et création d'opération prédéfinie define ("STOLE",1500); //Stock (lecture) define ("STOWRITE",1510); //Stock (changement) +define ("EXTENSION",1600); //Extension +define ("PREVCON",1701); //Prevision +define ("PREVMOD",1702); //Prevision ?> diff --git a/include/contact.inc.php b/include/contact.inc.php index d48c701f5..cc4d37ce8 100644 --- a/include/contact.inc.php +++ b/include/contact.inc.php @@ -21,8 +21,11 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr //!\brief File for adding contact, contact is a kind of fiche +require_once("class_icard.php"); +require_once("class_ispan.php"); +require_once("class_iselect.php"); +require_once("class_ihidden.php"); require_once('class_contact.php'); -require_once('class_widget.php'); /*! \file * \brief the contact class is derived from the class fiche * the contact is in fact a card but more specific @@ -36,7 +39,7 @@ $sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:""; // TODO add function for generating url, hidden tags... if ( isset ($_REQUEST['url'])) { - $retour=widget::button_href('Retour',urldecode($_REQUEST['url'])); + $retour=HtmlInput::button_anchor('Retour',urldecode($_REQUEST['url'])); $h_url=sprintf('<input type="hidden" name="url" value="%s">',urldecode($_REQUEST['url'])); } @@ -88,7 +91,7 @@ if ( $sub_action == "" ) //Display a blank card if ( $sub_action=="blank") { - $retour_action=widget::button_href('Retour', "commercial.php?p_action=contact&$str_dossier"); + $retour_action=HtmlInput::button_anchor('Retour', "commercial.php?p_action=contact&$str_dossier"); echo '<div class="u_redcontent">'; @@ -96,12 +99,12 @@ if ( $sub_action=="blank") $c=new contact($cn); echo '<form method="post" action="commercial.php"'; echo dossier::hidden(); - echo '<input type="hidden" name="p_action" value="client">'; - echo '<input type="hidden" name="sa" value="insert">'; - echo '<input type="hidden" name="fd_id" value="'.$_GET['fd_id'].'">'; - echo '<input type="hidden" name="url" value="'.$_GET['url'].'">'; + echo HtmlInput::hidden('p_action','client'); + echo HtmlInput::hidden("sa","insert"); + echo HtmlInput::hidden("fd_id",$_GET['fd_id']); + echo HtmlInput::hidden("url", $_GET['url']);; echo $c->blank($_GET['fd_id']); - echo '<input type="Submit" value="Sauve">'; + echo HtmlInput::submit('Sauve','Sauve'); echo '</form>'; echo $retour_action; echo '</div>'; @@ -129,18 +132,19 @@ if ( $sub_action == "list" ) <?php echo dossier::hidden(); $qcode=(isset($_GET['qcode']))?$_GET['qcode']:""; - echo JS_SEARCH_CARD; - $w=new widget('js_search_only'); + echo JS_LEDGER; + $w=new ICard(); $w->name='qcode'; $w->value=$qcode; $w->label='qcode'; $w->table=0; + $w->jrn=0; $w->extra='4,8,9,14'; - echo $w->IOValue(); + echo $w->input(); - $sp= new widget("span"); - echo $sp->IOValue("qcode_label",$qcode)."</TD></TR>"; + $sp=new ISpan(); + echo $sp->input("qcode_label",$qcode)."</TD></TR>"; ?> @@ -156,9 +160,9 @@ if ( $sub_action == "list" ) <input type="hidden" name="p_action" value="contact"> <?php - $w=new widget("select"); + $w=new ISelect(); $w->name="fd_id"; - $w->value= make_array($cn,"select fd_id,fd_label from fiche_def where ". + $w->value= $cn->make_array("select fd_id,fd_label from fiche_def where ". " frd_id=".FICHE_TYPE_CONTACT); // if array is empty show an warning and stops if ( sizeof ($w->value) == 0 ) { @@ -166,7 +170,7 @@ if ( $sub_action == "list" ) echo '<p>allez dans fiche creation et choississez contact comme sorte</p>'; exit(); } - echo $w->IOValue(); + echo $w->input(); ?> <input type="hidden" name="sa" value="blank"> @@ -201,17 +205,17 @@ if ( $sub_action == 'detail' ) echo '<form action="'.$_SERVER['REQUEST_URI'].'" method="post">'; echo dossier::hidden(); echo $contact->Display(false); - $w=new widget("hidden"); + $w=new IHidden(); $w->name="p_action"; $w->value="contact"; - echo $w->IOValue(); + echo $w->input(); $w->name="f_id"; $w->value=$f_id; - echo $w->IOValue(); + echo $w->input(); - echo widget::submit('mod','Sauver les modifications'); + echo HtmlInput::submit('mod','Sauver les modifications'); echo '<A HREF="commercial.php?p_action=contact&'.$str_dossier.'"><INPUT TYPE="button" value="Retour"></A>'; - echo widget::submit('delete','Effacer cette fiche'); + echo HtmlInput::submit('delete','Effacer cette fiche'); echo '</form>'; echo $retour; echo '<div>'; diff --git a/include/debug.php b/include/debug.php index 8bd3a943d..d18516dab 100644 --- a/include/debug.php +++ b/include/debug.php @@ -20,7 +20,7 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -//include_once ("postgres.php"); +//require_once('class_database.php'); include_once("constant.php"); /*! \file * \brief Debug procedure @@ -34,11 +34,16 @@ include_once("constant.php"); function echo_debug ($file,$line="",$msg="") { if ( DEBUG=='true' ) { $f=fopen ($_ENV['TMP'].DIRECTORY_SEPARATOR."phpcompta.log","a+"); - $a=var_export($msg,true); - $e=basename($file); - fwrite($f,"$e : $line $a\n"); - fclose ($f); + + if ($f == false) { echo "Ne peut ouvrir le fichier pour deboggage"; } + else { + $a=var_export($msg,true); + $e=basename($file); + fwrite($f,"$e : $line $a\n"); + fclose ($f); + } } + return; } ?> diff --git a/include/detail_adm.inc.php b/include/detail_adm.inc.php new file mode 100644 index 000000000..bfe00c8e6 --- /dev/null +++ b/include/detail_adm.inc.php @@ -0,0 +1,74 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file will handle all the actions for a specific customer ( + * contact,operation,invoice and financial) + * include from adm.inc.php and concerned only the customer card and + * the customer category + * parameter + * - p_action = adm + * - sb = detail + * - sc = dc + */ + //---------------------------------------------------------------------------- + // Save modification + //--------------------------------------------------------------------------- +if ( isset ($_POST['mod'])) +{ + + // modification is asked + $f_id=$_REQUEST['f_id']; + + $adm=new Fiche($cn,$f_id); + $adm->Save(); + +} + +echo '<div class="u_content">'; +$f_id=$_REQUEST['f_id']; +echo '<div class="content">'; +if ( isset($_POST['mod'])) echo hb('Information sauvée'); + +$adm=new Fiche($cn,$f_id); +echo JS_INFOBULLE; +echo '<form method="post">'; +echo dossier::hidden(); +echo HtmlInput::hidden('sb','detail'); +echo HtmlInput::hidden('dc','cc'); +echo $adm->Display(false); +$w=new IHidden(); +$w->name="p_action"; +$w->value="adm"; +echo $w->input(); +$w->name="f_id"; +$w->value=$f_id; +echo $w->input(); + +echo HtmlInput::submit('mod',_('Sauver les modifications')); +echo HtmlInput::reset(_("Annuler")); +echo HtmlInput::submit('delete','Effacer cette fiche','onclick="return confirm(\'Confirmer effacement ?\');"'); +echo '</form>'; +echo $return->input(); +echo '</div>'; + + diff --git a/include/detail_client.inc.php b/include/detail_client.inc.php new file mode 100644 index 000000000..e98d43cf8 --- /dev/null +++ b/include/detail_client.inc.php @@ -0,0 +1,74 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file will handle all the actions for a specific customer ( + * contact,operation,invoice and financial) + * include from client.inc.php and concerned only the customer card and + * the customer category + * parameter + * - p_action = client + * - sb = detail + * - sc = dc + */ + //---------------------------------------------------------------------------- + // Save modification + //--------------------------------------------------------------------------- +if ( isset ($_POST['mod'])) +{ + + // modification is asked + $f_id=$_REQUEST['f_id']; + + $client=new Customer($cn,$f_id); + $client->Save(); + +} + +echo '<div class="u_content">'; +$f_id=$_REQUEST['f_id']; +echo '<div class="content">'; +if ( isset($_POST['mod'])) echo hb(_('Information sauvée')); + +$client=new Customer($cn,$f_id); +echo JS_INFOBULLE; +echo '<form method="post">'; +echo dossier::hidden(); +echo HtmlInput::hidden('sb','detail'); +echo HtmlInput::hidden('dc','cc'); +echo $client->Display(false); +$w=new IHidden(); +$w->name="p_action"; +$w->value="client"; +echo $w->input(); +$w->name="f_id"; +$w->value=$f_id; +echo $w->input(); + +echo HtmlInput::submit('mod',_('Sauver les modifications')); +echo HtmlInput::reset(_("Annuler")); +echo HtmlInput::submit('delete',_('Effacer cette fiche'),'onclick="return confirm(\'Confirmer effacement ?\');"'); +echo '</form>'; +echo $return->input(); +echo '</div>'; + + diff --git a/include/detail_supplier.inc.php b/include/detail_supplier.inc.php new file mode 100644 index 000000000..0da5acb85 --- /dev/null +++ b/include/detail_supplier.inc.php @@ -0,0 +1,74 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file will handle all the actions for a specific customer ( + * contact,operation,invoice and financial) + * include from supplier.inc.php and concerned only the customer card and + * the customer category + * parameter + * - p_action = supplier + * - sb = detail + * - sc = dc + */ + //---------------------------------------------------------------------------- + // Save modification + //--------------------------------------------------------------------------- +if ( isset ($_POST['mod'])) +{ + + // modification is asked + $f_id=$_REQUEST['f_id']; + + $supplier=new Customer($cn,$f_id); + $supplier->Save(); + +} + +echo '<div class="u_content">'; +$f_id=$_REQUEST['f_id']; +echo '<div class="content">'; +if ( isset($_POST['mod'])) echo hb(_('Information sauvée')); + +$supplier=new Supplier($cn,$f_id); +echo JS_INFOBULLE; +echo '<form method="post">'; +echo dossier::hidden(); +echo HtmlInput::hidden('sb','detail'); +echo HtmlInput::hidden('dc','cc'); +echo $supplier->Display(false); +$w=new IHidden(); +$w->name="p_action"; +$w->value="supplier"; +echo $w->input(); +$w->name="f_id"; +$w->value=$f_id; +echo $w->input(); + +echo HtmlInput::submit('mod',_('Sauver les modifications')); +echo HtmlInput::reset(_("Annuler")); +echo HtmlInput::submit('delete',_('Effacer cette fiche'),'onclick="return confirm(\'Confirmer effacement ?\');"'); +echo '</form>'; +echo $return->input(); +echo '</div>'; + + diff --git a/include/dexia.inc.php b/include/dexia.inc.php index f551d2586..8ec811ae7 100644 --- a/include/dexia.inc.php +++ b/include/dexia.inc.php @@ -32,7 +32,7 @@ $LinesSkipped=0; $LinesImported=0; $LinesDup=0; $row=1; -StartSql($p_cn); +$p_cn->start(); while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { $num = count($data); @@ -85,7 +85,7 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) //---------------------------------------------------- $Sql="select * from import_tmp where code='$ref_extrait' and compte_ordre='$compte_ordre' limit 2"; - if ( CountSql($p_cn,$Sql) > 0) + if ( $p_cn->count_sql($Sql) > 0) { /* Skip it it already encoded */ echo "Double skipped : $ref_extrait $detail <BR>"; @@ -124,10 +124,10 @@ compte_ordre='$compte_ordre' limit 2"; // Check if no need to rollback when executing the SQL //----------------------------------------------------- try { - ExecSql($p_cn,$Sql); + $p_cn->exec_sql($Sql); } catch (Exception $e) { - Rollback($p_cn); + $p_cn->rollback(); echo "Rollbacking : $ref_extrait $detail <BR>"; $LinesSkipped++; continue; diff --git a/include/dexia_be.inc.php b/include/dexia_be.inc.php index 61a358e6a..216007fdb 100644 --- a/include/dexia_be.inc.php +++ b/include/dexia_be.inc.php @@ -32,7 +32,7 @@ $LinesSkipped=0; $LinesImported=0; $LinesDup=0; $row=1; -StartSql($p_cn); +$p_cn->start(); while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { $num = count($data); echo_debug('dexia_be',__LINE__,$num); @@ -74,7 +74,7 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { // Skip dubbel //---------------------------------------------------- $Sql="select * from import_tmp where code='$ref_extrait' and compte_ordre='$compte_ordre' limit 2"; - if ( CountSql($p_cn,utf8_encode($Sql)) > 0) + if ( $p_cn->count_sql(utf8_encode($Sql)) > 0) { /* Skip it it already encoded */ echo "Double skipped : $ref_extrait $detail <BR>"; @@ -113,9 +113,9 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { // Check if no need to rollback when executing the SQL //----------------------------------------------------- try { - ExecSql($p_cn,$Sql,'latin1') ; + $p_cn->exec_sql($Sql,'latin1') ; } catch (Exception $e) { - Rollback($p_cn); + $p_cn->rollback(); echo "Rollbacking : $ref_extrait $detail <BR>"; $LinesSkipped++; break; diff --git a/include/dossier.inc.php b/include/dossier.inc.php index 1bcd7a763..b3efacdf7 100644 --- a/include/dossier.inc.php +++ b/include/dossier.inc.php @@ -24,7 +24,10 @@ * \brief Management of the folder * */ -require_once ('class_widget.php'); +require_once("class_itext.php"); +require_once("class_icheckbox.php"); +require_once("class_itextarea.php"); + $sa=(isset($_REQUEST['sa']))?$_REQUEST['sa']:'list'; //--------------------------------------------------------------------------- // Update @@ -37,51 +40,52 @@ if ( isset ($_POST['upd']) && isset ($_POST['d'])) { echo '<div class="u_redcontent">'; // check and add an new folder if ( isset ($_POST["DATABASE"]) ) { - $cn=DbConnect(); + $cn=new Database(); $dos=trim($_POST["DATABASE"]); $dos=FormatString($dos); if (strlen($dos)==0) { - echo ("Le nom du dossier est vide"); + echo _("Le nom du dossier est vide"); exit -1; } - $encoding=getDbValue($cn,"select encoding from pg_database where ". + $encoding=$cn->get_value("select encoding from pg_database where ". " datname='".domaine.'mod'.FormatString($_POST["FMOD_ID"])."'"); if ( $encoding != 6 ) { - echo "<script> alert('Désolé vous devez migrer ce modèle en unicode')</script>"; - echo '<span class="error">le modele '.domaine.'mod'.$_POST["FMOD_ID"]." doit être migré en unicode."; - echo 'Pour le passer en unicode, faites-en un backup puis restaurez le fichier reçu</span>'; - echo widget::button_href('Retour','admin_repo.php?action=dossier_mgt'); + alert(_('Désolé vous devez migrer ce modèle en unicode')); + echo '<span class="error">'; + echo _('le modele ').domaine.'mod'.$_POST["FMOD_ID"]._(" doit être migré en unicode."); + echo _('Pour le passer en unicode, faites-en un backup puis restaurez le fichier reçu').'</span>'; + echo HtmlInput::button_anchor('Retour','admin_repo.php?action=dossier_mgt'); exit(); } $desc=FormatString($_POST["DESCRIPTION"]); try { - StartSql($cn); - $Res=ExecSql($cn,"insert into ac_dossier(dos_name,dos_description) + $cn->start(); + $Res=$cn->exec_sql("insert into ac_dossier(dos_name,dos_description) values ('".$dos."','$desc')"); - $l_id=GetSequence($cn,'dossier_id'); - Commit($cn); + $l_id=$cn->get_current_seq('dossier_id'); + $cn->commit(); } catch (Exception $e) { - $msg="Desole la creation de ce dossier a echoue, la cause la plus probable est". - ' deux fois le même nom de dossier'; - echo '<script>alert("'.$msg.'");</script>'; - echo_debug(__FILE__.':'.__LINE__.'- echec ','Echec creation ',$e); - $l_id=0; - Rollback($cn); - - } - // If the id is not null, name successfully inserted - // Database created - - if ( $l_id != 0) { + $msg=_("Desole la creation de ce dossier a echoue,\n la cause la plus probable est". + ' deux fois le même nom de dossier'); + alert($msg);; + echo_debug(__FILE__.':'.__LINE__.'- echec ','Echec creation ',$e); + $l_id=0; + $cn->rollback(); + + } + // If the id is not null, name successfully inserted + // Database created + + if ( $l_id != 0) { //-- // setting the year //-- $year=FormatString($_POST['YEAR']); if ( strlen($year) != 4 || isNumber($year) == 0 || $year > 2100 || $year < 2000 || $year != round($year,0)) { - echo "$year est une année invalide"; - $Res=ExecSql($cn,"delete from ac_dossier where dos_id=$l_id"); + echo "$year"._(" est une année invalide"); + $Res=$cn->exec_sql("delete from ac_dossier where dos_id=$l_id"); } else { @@ -92,26 +96,27 @@ if ( isset ($_POST["DATABASE"]) ) { FormatString($_POST["FMOD_ID"])); echo_debug("[".$Sql."]"); ob_start(); - if ( pg_query($cn,$Sql)==false) { + if ( $cn->exec_sql($Sql)==false) { echo "[".$Sql."]"; - ob_end_clean(); - ExecSql($cn,"delete from ac_dossier where dos_id=$l_id"); - echo "<h2 class=\"error\"> Base de donnée ".domaine."mod".$_POST['FMOD_ID']." est accèdée, déconnectez-vous d'abord</h2>"; + //ob_end_clean(); + $cn->exec_sql("delete from ac_dossier where dos_id=$l_id"); + echo "<h2 class=\"error\">"._(" Base de donnée ").domaine."mod".$_POST['FMOD_ID']." ". + _("est accèdée, déconnectez-vous d'abord")."</h2>"; exit; - } + } ob_flush(); - $Res=ExecSql($cn,"insert into jnt_use_dos (use_id,dos_id) values (1,$l_id)"); + $Res=$cn->exec_sql("insert into jnt_use_dos (use_id,dos_id) values (1,$l_id)"); // Connect to the new database - $cn=DbConnect($l_id); + $cn=new Database($l_id); //--year -- - $Res=ExecSql($cn,"delete from parm_periode"); + $Res=$cn->exec_sql("delete from parm_periode"); if ( ($year % 4 == 0 && $year % 100 != 0) || $year % 400 == 0 ) $fev=29; else $fev=28; - $Res=ExecSql($cn,"delete from user_local_pref where parameter_type='PERIODE'"); + $Res=$cn->exec_sql("delete from user_local_pref where parameter_type='PERIODE'"); $nb_day=array(31,$fev,31,30,31,30,31,31,30,31,30,30); $m=1; foreach ($nb_day as $day) @@ -121,17 +126,17 @@ if ( isset ($_POST["DATABASE"]) ) { $sql=sprintf("insert into parm_periode (p_start,p_end,p_exercice) values (to_date('%s','DD-MM-YYYY'),to_date('%s','DD-MM-YYYY'),'%s')", $p_start,$p_end,$year); - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); $m++; } $sql=sprintf("insert into parm_periode (p_start,p_end,p_exercice) values (to_date('31-12-%s','DD-MM-YYYY'),to_date('31-12-%s','DD-MM-YYYY'),'%s')", $year,$year,$year); - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); $sql=" insert into jrn_periode(p_id,jrn_def_id,status) ". "select p_id,jrn_def_id, 'OP'". " from parm_periode cross join jrn_def"; - $Res=ExecSql($cn,$sql); + $Res=$cn->exec_sql($sql); } @@ -141,20 +146,21 @@ if ( isset ($_POST["DATABASE"]) ) { <h2> Dossier Management</h2> <?php - $cn=DbConnect(); + $cn=new Database(); //--------------------------------------------------------------------------- // List of folder if ( $sa == 'list' ) { - echo widget::button_href('Rafraîchir','admin_repo.php?action=dossier_mgt'); - echo widget::button_href('Ajouter','admin_repo.php?action=dossier_mgt&sa=add'); + echo HtmlInput::button_anchor(_('Rafraîchir'),'admin_repo.php?action=dossier_mgt'); + echo HtmlInput::button_anchor(_('Ajouter'),'admin_repo.php?action=dossier_mgt&sa=add'); - $offset=(isset($_REQUEST['offset']))?$_REQUEST['offset']:0; - $page=(isset($_REQUEST['page']))?$_REQUEST['page']:1; - $count=getDbValue($cn,"select count(*) from ac_dossier"); - $size=10; + $offset=(isset($_REQUEST['offset']))?$_REQUEST['offset']:0; + $page=(isset($_REQUEST['page']))?$_REQUEST['page']:1; + $count=$cn->get_value("select count(*) from ac_dossier"); + $size=10; echo jrn_navigation_bar($offset,$count,$size,$page); - $Res=ShowDossier('all',$offset,$size); + $repo=new Dossier(0); + $Res=$repo->show_dossier('all',$offset,$size); $compteur=1; $template=""; echo JS_CONFIRM; @@ -174,15 +180,15 @@ if ( $sa == 'list' ) { "<TD><I> ".h($Dossier['dos_description'])."</I> </TD> <TD>"; - echo widget::button_href('Effacer','?action=dossier_mgt&sa=del&d='.$Dossier['dos_id']); + echo HtmlInput::button_anchor(_('Effacer'),'?action=dossier_mgt&sa=del&d='.$Dossier['dos_id']); echo "</TD>"; - echo '<td>'.widget::button_href('Modifier','?action=dossier_mgt&sa=mod&d=' + echo '<td>'.HtmlInput::button_anchor(_('Modifier'),'?action=dossier_mgt&sa=mod&d=' .$Dossier['dos_id']). '</td>'; - echo '<td>'.widget::button_href('Backup','backup.php?action=backup&sa=b&t=d&d=' - .$Dossier['dos_id']). + echo '<td>'.HtmlInput::button_anchor(_('Backup'),'backup.php?action=backup&sa=b&t=d&d=' + .$Dossier['dos_id']). '</td>'; - + echo '<tr>'; $compteur++; @@ -201,16 +207,16 @@ if ( $sa == 'list' ) { // Add a new folder if ( $sa == 'add' ) { // Load the available Templates - $Res=ExecSql($cn,"select mod_id,mod_name,mod_desc from + $Res=$cn->exec_sql("select mod_id,mod_name,mod_desc from modeledef order by mod_name"); - $count=pg_NumRows($Res); + $count=Database::num_row($Res); if ( $count == 0 ) { - echo "No template available"; + echo _("pas de modèle disponible"); } else { $template='<SELECT NAME=FMOD_ID>'; for ($i=0;$i<$count;$i++) { - $mod=pg_fetch_array($Res,$i); + $mod=Database::fetch_array($Res,$i); $template.='<OPTION VALUE="'.$mod['mod_id'].'"> '.h($mod['mod_name']." - ".substr($mod['mod_desc'],0,30)); }// for $template.="</SELECT>"; @@ -224,16 +230,16 @@ if ( $sa == 'list' ) { <FORM ACTION="admin_repo.php?action=dossier_mgt" METHOD="POST"> <TABLE> <TR> - <TD> Nom du dossier</td><td> <INPUT TYPE="TEXT" NAME="DATABASE"> </TD> + <TD><?php echo _('Nom du dossier'); ?></td><td> <INPUT TYPE="TEXT" NAME="DATABASE"> </TD> </TR><TR> - <TD> Description</td><td> <TEXTAREA COLS="60" ROWS="2" NAME="DESCRIPTION" ></TEXTAREA> </TD> +<TD><?php echo _('Description'); ?></td><td> <TEXTAREA COLS="60" ROWS="2" NAME="DESCRIPTION" ></TEXTAREA> </TD> </TR> - <TR> <TD> Modèle</td><td> <?php echo $template; ?> </TD></TR> +<TR> <TD><?php echo _('Modèle'); ?></td><td> <?php echo $template; ?> </TD></TR> <TR><TD>Année </TD><TD><input type="text" size=4 name="YEAR" value=<?php echo '"'.$m_date.'"'; ?>></TD></TR> <TR> - <TD> <INPUT TYPE=SUBMIT VALUE="Creation Dossier"></TD> + <TD> <INPUT TYPE=SUBMIT VALUE="<?php echo _('Creation Dossier'); ?>" </TD> <td> -<?php echo widget::button_href('Retour','admin_repo.php?action=dossier_mgt'); ?> + <?php echo HtmlInput::button_anchor(_('Retour'),'admin_repo.php?action=dossier_mgt'); ?> </td> </TR> </TABLE> @@ -246,20 +252,20 @@ if ( $sa == 'mod' ) { require_once ('class_dossier.php'); $dos=new dossier($_REQUEST['d']); $dos->load(); - $wText=new widget('text'); + $wText=new IText(); echo '<form action="admin_repo.php" method="post">'; - echo widget::hidden('action','dossier_mgt'); - echo widget::hidden('d',$dos->get_parameter("id")); - echo 'Nom : '; - echo $wText->IOValue('name',$dos->get_parameter('name')); + echo HtmlInput::hidden('action','dossier_mgt'); + echo HtmlInput::hidden('d',$dos->get_parameter("id")); + echo _('Nom').' : '; + echo $wText->input('name',$dos->get_parameter('name')); echo '<br>'; - $wDesc=new widget('textarea'); + $wDesc=new ITextArea(); $wDesc->heigh=5; - echo 'Description : <br>'; - echo $wDesc->IOValue('desc',$dos->get_parameter('desc')); + echo _('Description').' : <br>'; + echo $wDesc->input('desc',$dos->get_parameter('desc')); echo '<br>'; - echo widget::submit('upd','Modifie'); - echo widget::button_href('Retour','?action=dossier_mgt'); + echo HtmlInput::submit('upd',_('Modifie')); + echo HtmlInput::button_anchor(_('Retour'),'?action=dossier_mgt'); echo '</form>'; } //--------------------------------------------------------------------------- @@ -269,50 +275,51 @@ if ( $sa == 'del' ) { $d=new Dossier($_REQUEST ['d'] ); $d->load(); echo '<form method="post">'; - echo widget::hidden('d',$_REQUEST['d']); - echo widget::hidden('sa','remove'); - echo '<h2 class="error">Etes vous sure et certain de vouloir effacer '.$d->dos_name.' ???</h2>'; - $confirm=new widget('checkbox'); + echo HtmlInput::hidden('d',$_REQUEST['d']); + echo HtmlInput::hidden('sa','remove'); + echo '<h2 class="error">'._('Etes vous sûr et certain de vouloir effacer ').$d->dos_name.' ???</h2>'; + $confirm=new ICheckBox(); $confirm->name="p_confirm"; - echo 'Cochez la case si vous êtes sûr de vouloir effacer ce dossier'; - echo $confirm->IOValue(); - echo widget::submit('remove','Effacer'); - echo widget::button_href('Retour','?action=dossier_mgt'); + echo _('Cochez la case si vous êtes sûr de vouloir effacer ce dossier'); + echo $confirm->input(); + echo HtmlInput::submit('remove',_('Effacer')); + echo HtmlInput::button_anchor(_('Retour'),'?action=dossier_mgt'); echo '</form>'; } //--------------------------------------------------------------------------- // action = del //--------------------------------------------------------------------------- if ( $sa == 'remove' ) { - if ( ! isset ($_REQUEST['p_confirm'])) {echo('Désolé, vous n\'avez pas coché la case'); echo widget::button_href('Retour','?action=dossier_mgt');exit();} + if ( ! isset ($_REQUEST['p_confirm'])) {echo _('Désolé, vous n\'avez pas coché la case'); echo HtmlInput::button_anchor('Retour','?action=dossier_mgt');exit();} - $cn=DbConnect(); + $cn=new Database(); $msg="dossier"; - $name=getDbValue($cn,"select dos_name from ac_dossier where dos_id=$1",array($_REQUEST['d'])); + $name=$cn->get_value("select dos_name from ac_dossier where dos_id=$1",array($_REQUEST['d'])); if ( strlen(trim($name)) == 0 ) { - echo "<h2 class=\"error\"> $msg inexistant</h2>"; + echo "<h2 class=\"error\"> $msg "._('inexistant')."</h2>"; exit(); } $sql="drop database ".domaine."dossier".FormatString($_REQUEST['d']); ob_start(); - if ( pg_query($cn,$sql)==false) { + if ( $cn->exec_sql($sql)==false) { ob_end_clean(); - echo "<h2 class=\"error\"> - Base de donnée ".domaine."dossier".$_REQUEST['d']." est accèdée, déconnectez-vous d'abord</h2>"; + echo "<h2 class=\"error\"> "; + echo _('Base de donnée ').domaine."dossier".$_REQUEST['d']. +_("est accèdée, déconnectez-vous d'abord")."</h2>"; exit; } ob_flush(); $sql="delete from priv_user where priv_id in (select jnt_id from jnt_use_dos where dos_id=$1)"; - ExecSqlParam($cn,$sql,array($_REQUEST['d'])); + $cn->exec_sql($sql,array($_REQUEST['d'])); $sql="delete from jnt_use_dos where dos_id=$1"; - ExecSqlParam($cn,$sql,array($_REQUEST['d'])); + $cn->exec_sql($sql,array($_REQUEST['d'])); $sql="delete from ac_dossier where dos_id=$1"; - ExecSqlParam($cn,$sql,array($_REQUEST['d'])); + $cn->exec_sql($sql,array($_REQUEST['d'])); print '<h2 class="info">'; print "Voilà le dossier ".h($name)." est effacé</h2>"; - echo widget::button_href('Retour','?action=dossier_mgt'); + echo HtmlInput::button_anchor('Retour','?action=dossier_mgt'); } ?> </div> diff --git a/include/eub_be.inc.php b/include/eub_be.inc.php index 86dc6568a..e8a41b24c 100644 --- a/include/eub_be.inc.php +++ b/include/eub_be.inc.php @@ -27,6 +27,7 @@ // Bank type = eub //----------------------------------------------------- $row=1; +$p_cn->set_encoding('latin1'); while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { $num = count($data); for ($c=0; $c < $num; $c++) { @@ -71,7 +72,7 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { '$p_bq_account', $p_jrn, 'n')"; - $Res=ExecSql($p_cn,$Sql,'latin1'); + $Res=$p_cn->exec_sql($Sql); } } // for ($c=0;$c<$num;$c++) $row++; diff --git a/include/ext/dummy/dummy.php b/include/ext/dummy/dummy.php new file mode 100755 index 000000000..3a391931d --- /dev/null +++ b/include/ext/dummy/dummy.php @@ -0,0 +1,104 @@ +<?php +require_once ('class_icard.php'); +require_once('class_ifile.php'); +require_once('class_database.php'); +require_once('class_iselect.php'); +require_once('class_dossier.php'); +require_once('class_fiche.php'); + +/* +Ma première extension, intégrer un fichier de client dans une catégorie +de fiche, ce fichier est en CSV. Le code est simple et compréhensible, normalement on +devrait avoir une meilleure gestion des erreurs, vérifier les attaques SQL Inject,... +Ce code n'est là QUE pour expliquer le concept +*/ + + +// se connecter au dossier courant +$cn=new Database(dossier::id()); + +// dans extension.php on vérifie la sécurité, en ajoutez une ici n'est en général +// pas nécessaire + + +// Ce form permet de choisir dans quel cat de fiche je veux intégrer les +// enregistrements. + +echo '<form METHOD="get" action="extension.php">'; +echo dossier::hidden(); +// Ceci vous permet de revenir ici (voir extension.php) +echo HtmlInput::extension(); + +echo "Choix de la catégorie de fiche"; +$select_cat=new ISelect('fd_id'); +$select_cat->value=$cn->make_array('select fd_id,fd_label from fiche_def where frd_id='. + FICHE_TYPE_CLIENT); +echo $select_cat->input(); +echo HtmlInput::submit('display_prop','Afficher les propriétés'); + +echo '</FORM>'; + +// on choisit d'afficher les propriétés avant de confirmer l'import +// get parce qu'on interroge +if ( isset($_GET['display_prop'])){ + $a=new Fiche($cn); + $prop=$a->toArray($_GET['fd_id']); + foreach ($prop as $key=>$value) echo "Index : $key valeur $value <br/>"; + + echo '<form method="POST" action="extension.php" enctype="multipart/form-data">'; + echo dossier::hidden(); + echo HtmlInput::extension(); + echo HtmlInput::hidden('fd_id',$_GET['fd_id']); + $file=new IFile('fichier_csv'); + echo $file->input(); + echo HtmlInput::submit('start_import','Démarrez importation'); + echo '</form>'; + exit; +} +// Il est demandé de démarrer l'importation +// Post parce qu'on sauve +// On image que le fichier CSV n'a que 4 champs +// "nom client","prenom client", "numero client","adresse client" +// +if ( isset($_POST['start_import'])){ + $fd_id=$_POST['fd_id']; + $tmp_file=$_FILES['fichier_csv']['tmp_name']; + if ( ! is_uploaded_file($tmp_file)) + die ('Je ne peux charger ce fichier'); + // on ouvre le fichier + $f=fopen($tmp_file,'r'); + // On récupère les propriétés de cette catégorie de fiche + $client=new Fiche($cn); + // $array contient toutes les valeurs nécessaires à Fiche::insert, + $array=$client->toArray($_POST['fd_id']); + + while ( $data=fgetcsv($f)) { + // remarque : on a éliminé les traitements d'erreur + + // On remet tous les attributs (propriétés) à vide + foreach(array_keys($array) as $key) $array[$key]=""; + + // Nom et prénom + $array['av_text1']=$data[0].' '.$data[1]; + // Numéro de client + $array['av_text30']=$data[2]; + // Adresse + $array['av_text14']=$data[3]; + // Quickcode + $array['av_text23']="CLI".$data[2]; + $client->insert($fd_id,$array); + } + exit; +} + +?> + +Voici le fichier plugin_client.txt (dans le répertoire dev) +"Nom client1","Prénom","C1","Rue de la boite,55" +"Nom client2","Prénom","C2","Rue du couvercle,55" +"Nom client3","Prénom","C3","Rue de la chaussure,55" +"Nom client4","Prénom","C4","Rue de la couleur,55" + +Si vous vérifiez dans VW_CLIENT, vous verrez que toutes vos fiches ont été ajoutées. Dans l'exemple, il faudra rajouter un traitement d'erreur plus élaborée, le fait que si une fiche echoue , l'opération est annulée (Database::rollback) ou alors création d'un fichier avec les enregistrements "ratés"... + + diff --git a/include/ext_inc.php b/include/ext_inc.php new file mode 100644 index 000000000..2aa4af7e6 --- /dev/null +++ b/include/ext_inc.php @@ -0,0 +1,23 @@ +<?php + +/* if a code has been asked */ +if (isset($_REQUEST['code']) ) { + $cn=new Database(dossier::id()); + $ext=new Extension($cn); + $ext->search('code',$_REQUEST['code']); + if ( $ext->get_parameter('id') != 0 ) { + /* security */ + if ( $ext->can_request($_SESSION['g_user']) == 0 ) { + alert(j(_("Vous ne pouvez pas utiliser cette extension. Contactez votre responsable"))); + exit(); + } + /* show name of extension */ + echo "<h2>".$ext->get_parameter('name').'</h2>'; + require_once('ext'.DIRECTORY_SEPARATOR.trim($ext->get_parameter('filepath'))); + } else { + alert(j(_("Cette extension n'existe pas "))); + exit(); + } + +} +?> \ No newline at end of file diff --git a/include/extension.inc.php b/include/extension.inc.php new file mode 100644 index 000000000..d7db0d12d --- /dev/null +++ b/include/extension.inc.php @@ -0,0 +1,64 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file is included from parameters and its purpose is to + * enable, disable and manage security for the extensions + * + * variable : + * - p_action is ext + * - sb is nothing vw (view) or save + * - $cn database connection + *@todo Extension : ne doit faire de location.reload mais utiliser javascript pour metter + * à jour la table présentant les extensions : delete -> enlève une ligne, add / update -> mettre + * la ligne à jour. + * Le bouton delete doit être déplacé dans le form AJAX + */ + +require_once('class_extension.php'); +require_once('class_html_input.php'); +require_once('class_ibutton.php'); +require_once('class_ipopup.php'); +echo js_include('scriptaculous.js'); +echo js_include('prototype.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo js_include('extension.js'); + +$ipopup=new IPopup('dtext'); +$ipopup->value=''; +$ipopup->title=_('Détail extension'); +echo HtmlInput::hidden('popup','dtext').dossier::hidden().HtmlInput::phpsessid(); +echo $ipopup->input(); + +echo '<div class="content">'; + +$ext=Extension::listing($cn); +$new=new IButton('new'); +$new->label=_('Nouvelle extension'); +$new->javascript="new_extension()"; +$str_new=$new->input(); +require_once('template/extension.php'); + + +echo '</div>'; diff --git a/include/fiche.inc.php b/include/fiche.inc.php index 448448f3d..cc45a2878 100644 --- a/include/fiche.inc.php +++ b/include/fiche.inc.php @@ -22,14 +22,26 @@ * \brief module to manage the card (removing, listing, creating, modify attribut) */ include_once ("ac_common.php"); +require_once("class_itext.php"); +require_once("class_ihidden.php"); require_once('class_fiche.php'); -include_once ("postgres.php"); +require_once('class_database.php'); include_once ("user_menu.php"); -require_once ("check_priv.php"); require_once('class_dossier.php'); +require_once('class_ipopup.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo JS_CARD; +echo JS_INFOBULLE; +echo IPoste::ipopup('ipop_account'); + $gDossier=dossier::id(); $str_dossier=dossier::get(); -echo JS_SEARCH_POSTE; +echo js_include('accounting_item.js'); echo JS_AJAX_FICHE; if ( !isset($sessid)) @@ -39,9 +51,8 @@ if ( !isset($sessid)) $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$sessid."',".dossier::id().",'class_base','')\">"; -include_once("fiche_inc.php"); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); echo_debug(__FILE__,__LINE__,"Connected"); // Security check $write=$User->check_action(FICADD); @@ -53,14 +64,14 @@ if ($write == 0 ){ function ShowRecherche() { echo '<DIV class="u_redcontent">'; echo '<form method="GET" action="?">'; - echo dossier::hidden(); - $w=new widget('text'); + echo dossier::hidden().HtmlInput::phpsessid(); + $w=new IText(); $search_text=(isset($_REQUEST['search_text']))?$_REQUEST['search_text']:""; - $h=new widget('hidden'); - echo $h->IOValue('p_action','fiche'); - echo $h->IOValue('action','search'); - echo "Recherche :".$w->IOValue('search_text',$search_text); - echo widget::submit('submit','Rechercher'); + $h=new IHidden(); + echo $h->input('p_action','fiche'); + echo $h->input('action','search'); + echo "Recherche :".$w->input('search_text',$search_text); + echo HtmlInput::submit('submit',_('Rechercher')); echo '</form>'; echo '</div>'; } @@ -71,25 +82,44 @@ function ShowFicheDefInput($p_fiche_def) $p_fiche_def->Get(); $p_fiche_def->GetAttribut(); - if (isset ($_REQUEST['label']) ) + + /* we change the main attribute */ + if (isset ($_REQUEST['label']) ){ $p_fiche_def->SaveLabel($_REQUEST['label']); + if ( isset($_REQUEST['create'])) { + $p_fiche_def->set_autocreate(true); + } else { + $p_fiche_def->set_autocreate(false); + } + $p_fiche_def->save_class_base($_REQUEST['class_base']); + } + $p_fiche_def->Get(); + $r.= '<H2 class="info">'.h($p_fiche_def->label).'</H2>'; - + /* show the values label class_base and create account */ + $r.='<form method="post">'; + $r.=dossier::hidden().HtmlInput::phpsessid(); + $r.=HtmlInput::hidden("fd_id",$p_fiche_def->id); + $r.=HtmlInput::hidden("p_action","fiche"); + $r.= $p_fiche_def->input_base(); + $r.='<hr>'; + $r.=HtmlInput::submit('change_name',_('Sauver')); + $r.='</form>'; + /* attributes */ $r.= '<FORM action="?p_action=fiche" method="POST">'; - $r.=dossier::hidden(); - $r.= '<INPUT TYPE="HIDDEN" NAME="fd_id" VALUE="'.$p_fiche_def->id.'">'; - + $r.=dossier::hidden().HtmlInput::phpsessid(); + $r.=HtmlInput::hidden("fd_id",$p_fiche_def->id); $r.= $p_fiche_def->DisplayAttribut("remove"); - $r.= ' <INPUT TYPE="SUBMIT" Value="Ajoute cet élément" NAME="add_line">'; - $r.= ' <INPUT TYPE="SUBMIT" Value="Sauver" NAME="save_line">'; - $r.=widget::submit('remove_cat','Effacer cette catégorie','onclick="return confirm(\'Vous confirmez ?\')"'); + $r.= HtmlInput::submit('add_line',_('Ajoutez cet élément')); + $r.= HtmlInput::submit("save_line",_("Sauvez")); + $r.=HtmlInput::submit('remove_cat',_('Effacer cette catégorie'),'onclick="return confirm(\''._('Vous confirmez ?').'\')"'); // if there is nothing to remove then hide the button if ( strpos ($r,"chk_remove") != 0 ) { - $r.=' <INPUT TYPE="SUBMIT" Value="Enleve les éléments cochés" NAME="remove_line">'; + $r.=HtmlInput::submit('remove_line',_("Enleve les éléments cochés") ); } $r.= "</form>"; - $r.=" <p class=\"notice\"> Attention : il n'y aura pas de demande de confirmation pour enlèver les -attributs sélectionnés. Il ne sera pas possible de revenir en arrière</p>"; + $r.=" <p class=\"notice\"> "._("Attention : il n'y aura pas de demande de confirmation pour enlever les +attributs sélectionnés. Il ne sera pas possible de revenir en arrière")."</p>"; return $r; } @@ -113,7 +143,7 @@ if ( isset ($_POST['remove_cat'] ) ) { $remains=$fd_id->remove(); if ( $remains != 0 ) /* some card are not removed because it is used */ - alert('Impossible d\'enlever cette catégorie, certaines fiches sont encore utilisées\n'. + alert('Impossible d\'enlever cette catégorie, certaines fiches sont encore utilisées'."\n". 'Les fiches non utilisées ont cependant été effacées'); } // Add a line in the card model @@ -182,7 +212,7 @@ if ( isset ($_POST["change_name"] ) ) { $User->can_request(FICCAT); $r= '<DIV class="u_redcontent">'; if ( $write ==0) - $r.= "<h2 class=\"error\"> Pas d'accès </h2>"; + $r.= "<h2 class=\"error\"> "._("Pas d'accès")." </h2>"; else { $fiche_def=new fiche_def($cn,$_REQUEST['fd_id']); @@ -190,6 +220,9 @@ if ( isset ($_POST["change_name"] ) ) { } $r.= '</DIV>'; $recherche=false; + ShowMenuFiche($gDossier); + echo $r; + exit(); } ShowMenuFiche($gDossier); @@ -246,17 +279,17 @@ if ( isset ( $_GET["action"]) ) { } if ( $write != 0 ) echo '<form method="post" action="?p_action=fiche&action=vue&fiche='.$_GET['fiche'].$str.'">'; - echo dossier::hidden(); + echo dossier::hidden().HtmlInput::phpsessid(); echo $fiche->Display($t); - echo '<input type="hidden" name="f_id" value="'.$_GET['fiche_id'].'">'; + echo HtmlInput::hidden("f_id",$_GET['fiche_id']); if ( $write != 0 ) { - echo '<input type="submit" name="update_fiche" value="Mise à jour">'; - echo '<input type="submit" name="delete" value="Effacer cette fiche">'; + echo HtmlInput::submit("update_fiche","Mise à jour"); + echo HtmlInput::submit("delete" ,"Effacer cette fiche"); } $str=""; echo '<a class="mtitle" href="?p_action=fiche&action=vue&'.$str_dossier.'&fiche='.$fiche->fiche_def.$str. - '"><input type="button" value="Annuler"></A>'; + '"><input type="button" value='._("Annuler").'></A>'; if ( $write != 0 ) echo '</form>'; echo '</DIV>'; $recherche=false; @@ -267,7 +300,14 @@ if ( isset ( $_GET["action"]) ) { if ($action == "add_modele" ) { $User->can_request(FICCAT); echo '<DIV class="u_redcontent">'; - CreateCategory($cn,$search); + echo '<form method="post">'; + $oFiche_Def=new fiche_def($cn); + echo HtmlInput::hidden("p_action","fiche"); + echo dossier::hidden().HtmlInput::phpsessid(); + echo $oFiche_Def->input($search); // CreateCategory($cn,$search); + echo HtmlInput::submit("add_modele" ,"Sauve"); + + echo '</form>'; echo '</DIV>'; $recherche=false; } @@ -287,16 +327,17 @@ if ( isset ( $_GET["action"]) ) { if ( $action == "search" ) { ShowRecherche(); - $sql="select distinct f_id,fd_id,av_text from fiche join jnt_fic_att_value using (f_id) + $sql="select distinct f_id,fd_id from fiche join jnt_fic_att_value using (f_id) join attr_value using (jft_id) where - upper(av_text) like upper('%".FormatString($_GET["search_text"])."%') order by av_text,f_id"; - $all=get_array($cn,$sql); + upper(av_text) like upper('%".FormatString($_GET["search_text"])."%') order by f_id"; + + $all=$cn->get_array($sql); // test on the size // if ( sizeof($all) != 0 ) { echo '<DIV class="u_redcontent">'; - echo "Nombre de résultat : ".sizeof($all).'<br>'; + echo "Résultat : ".sizeof($all).'éléments trouvés <br>'; foreach ($all as $f_id){ $fiche=new fiche($cn,$f_id['f_id']); echo '<A class="mtitle" href="?p_action=fiche&'.$str_dossier.'&action=detail&fiche_id='.$f_id['f_id']. @@ -332,11 +373,11 @@ if ( isset ($_POST["fiche"]) && isset ($_POST["add"] ) ) { $fiche=new fiche($cn,0); echo '<form method="post" action="'.$url.'&fiche='.$_POST['fiche'].'">'; - echo dossier::hidden(); + echo dossier::hidden().HtmlInput::phpsessid(); echo $fiche->blank($_POST['fiche']); - echo '<input type="submit" name="add_fiche" value="Ajout">'; + echo HtmlInput::submit("add_fiche","Ajout"); echo '<a class="mtitle" href="'.$url.'&fiche='.$_POST['fiche'].'&'.$str_dossier.'">'. - '<input type="button" value="Annuler"></A>'; + '<input type="button" value='._("Annuler").'></A>'; echo '</form>'; diff --git a/include/fiche_def.inc.php b/include/fiche_def.inc.php index 3fcff91b0..153f30cbe 100644 --- a/include/fiche_def.inc.php +++ b/include/fiche_def.inc.php @@ -18,7 +18,9 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +require_once("class_ihidden.php"); require_once("class_fiche_def.php"); + /*! \file * \brief Let customise the fiche_def_ref for the user */ @@ -35,6 +37,7 @@ if ( isset ($_POST['confirm_mod'])) { // Load All Fiche_def $fiche_def=new fiche_def_ref($cn); $all=$fiche_def->LoadAll(); + // Display Them echo '<table align="left">'; for ($i=0;$i<sizeof($all);$i++) @@ -43,10 +46,11 @@ for ($i=0;$i<sizeof($all);$i++) echo $all[$i]->Display(); echo "<TD>"; echo '<form method="post">'; - $w=new widget('hidden'); - echo $w->IOValue('idx',$i); - echo widget::submit('mod','modifie'); - echo $w->IOValue('fiche','p_action'); + $w=new IHidden(); + echo $w->input('idx',$all[$i]->frd_id); + echo HtmlInput::submit('mod','modifie'); + echo $w->input($p_action,'p_action'); + echo $w->input($sa,'sa'); echo "</form>"; echo "</TD>"; echo '</TR>'; @@ -57,22 +61,26 @@ if ( isset ($_POST['mod']) ) { extract ($_POST); echo '<div style="float:left;padding:2%">'; - echo "Voulez-vous modifier ?<br><font color=\"red\"> Attention, ne changer pas la signification de "; - 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>"; - $idx=$_POST['idx']; + echo _("Voulez-vous modifier ?"); + echo "<br><font color=\"red\"> "; + echo _("Attention, ne changer pas la signification de ce poste."); + echo hi(_("par exemple ne pas changer Client par fournisseur"))."<br>"; + echo _("sinon le programme fonctionnera mal, ". + "utiliser uniquement des chiffres pour la classe de base ou rien")."</font>"; + $mod=new fiche_def_ref($cn); - $mod->frd_id=$all[$idx]->frd_id; - $mod->frd_text=$all[$idx]->frd_text; - $mod->frd_class_base=$all[$idx]->frd_class_base; + $mod->frd_id=$idx; + $mod->Get(); echo '<form method="post">'; echo '<ul style="list-style-type:none"'; echo $mod->Input(); echo "</ul>"; - $w=new widget("hidden"); - echo $w->IOValue('p_action','fiche'); - echo widget::submit('confirm_mod' ,'Confirme'); - echo widget::submit('no','Cancel'); + $w=new IHidden(); + echo $w->input('p_action',$p_action); + echo $w->input('sa',$sa); + echo HtmlInput::submit('confirm_mod' ,'Confirme'); + echo HtmlInput::submit('no','Cancel'); echo '</form>'; echo '</div>'; } -echo '</div>'; \ No newline at end of file +echo '</div>'; diff --git a/include/fiche_inc.php b/include/fiche_inc.php deleted file mode 100644 index 35a85f0c5..000000000 --- a/include/fiche_inc.php +++ /dev/null @@ -1,215 +0,0 @@ -<?php -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -// $Revision$ -/*! \file - * \brief Function for managing card, redundant with the class fiche - * but make sometimes the code more easy - */ -require_once('class_fiche.php'); - -/*! - *************************************************** - * \brief Creation of a Category of card or correction - * - * - * \param $p_cn database connection - * \param $p_ligne number of lines - * \param $p_array array - * \param $p_js class base (javascript code) - * - * \return nothing - * - * - */ -function CreateCategory ($p_cn,$p_js,$p_array=null,$p_ligne=1) -{ - echo_debug('fiche_inc.php',__LINE__,"CreateCategory ($p_array,$p_ligne=1) "); - - // Creating form - $display='<FORM ACTION="?p_action=fiche" METHOD="POST">'; - $display.=dossier::hidden(); - // Number of line of the card - $display.='<INPUT TYPE="HIDDEN" NAME="INC" VALUE="'.$p_ligne.'">'; - - // Table of input - $display.='<TABLE BORDER="0" CELLSPACING="0">'; - - - //Name of the CARD (fiche_def.fd_label) - $display.='<TR><TD> Catégorie de fiche </TD>'; - $display.='<TD><INPUT TYPE="INPUT" NAME="nom_mod">'; - $display.='</TD></TR>'; - - // Class base fiche_def.fd_class_base (optional) - $display.='<TR><TD> Classe de base </TD>'; - $display.='<TD><INPUT TYPE="INPUT" NAME="class_base"> '.$p_js; - $display.='</TD></TR>'; - // Checkbox for the creation of a post - $display.='<TR><TD> <INPUT TYPE="CHECKBOX" NAME="create" CHECKED>Création automatique du poste comptable</TD></TR>'; - - //display the different template - $ref=Get_fiche_def_ref($p_cn); - - // check if $ref is an array - // and display the choice - - // select by default the first choice - $check="CHECKED"; - if ( sizeof($ref) ) { - foreach ($ref as $i=>$v) { - $display.='<TR><TD COLSPAN="2">'; - - $display.='<INPUT TYPE="RADIO" NAME="FICHE_REF" VALUE="'.$v['id'].'"'.$check.'>'; - $display.=$v['text']; - // if a class base exist in fiche_def_ref, we display it - if ( sizeof ($v['class']) != 0 ) - $display.="  <I>Class base = ".$v['class']."</I>"; - $display.="</TD></TR>"; - $check=""; - } - - } - // closing the form - $display.='</TABLE>'; - $display.='<INPUT TYPE="SUBMIT" NAME="add_modele" VALUE="Sauve">'; - $display.='</FORM>'; - - // display it - echo $display; - -} -/*! getFicheName - *************************************************** - * \brief retourne le nom de la fiche - * en fournissant le quick_code - * - * - * \param p_cn connexion - * \param p_id quick_code - * - */ -function getFicheName($p_cn,$p_id) { - // Retrieve the attribute with the ad_id 1 - // 1 is always the name - $p_id=FormatString($p_id); - $fiche=new fiche($p_cn); - $fiche->get_by_qcode($p_id); - return $fiche->strAttribut(ATTR_DEF_NAME); -} - -/*! Get_fiche_def_ref - *************************************************** - * \brief - * 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 - */ -function Get_fiche_def_ref($p_cn) -{ - // get all the data from fiche_def_ref - $Res=ExecSql($p_cn, "select frd_id,frd_text,frd_class_base - from fiche_def_ref - order by frd_text"); - - // check if the result is valid - $Max=pg_NumRows($Res); - if ( $Max == 0) return null; - - // store the result in a array - for ($i=0;$i<$Max;$i++) { - $f=pg_fetch_array($Res,$i); - $array[$i]['id']=$f['frd_id']; - $array[$i]['text']=$f['frd_text']; - $array[$i]['class']=$f['frd_class_base']; - } - - // return result - return $array; -} -/*! Get_attr_min - *************************************************** - * \brief retrieve the mandatory field of the card model - * - * \param $p_cn database connexion - * \param $p_fiche_def_ref - * \return array of ad_id (attr_min.ad_id) and labels (attr_def.ad_text) - * - */ -function Get_attr_min($p_cn,$p_fiche_def_ref) { - // find the min attr for the fiche_def_ref - $Sql="select ad_id,ad_text from attr_min natural join attr_def - natural join fiche_def_ref - where - frd_id= $p_fiche_def_ref"; - $Res=ExecSql($p_cn,$Sql); - $Num=pg_NumRows($Res); - - // test the number of returned rows - if ($Num == 0 ) return null; - - // Get Results & Store them in a array - for ($i=0;$i<$Num;$i++) { - $f=pg_fetch_array($Res,$i); - $array[$i]['ad_id']=$f['ad_id']; - $array[$i]['ad_text']=$f['ad_text']; - } - return $array; -} -/*! getFicheAttribut - *************************************************** - * \brief retrun array of attribut or string - * - * \param p_cn connexion - * \param p_id quick_code - * \param attribut if attribut == "" then return a array - * taken from vw_fiche_attr - * \return string avec nom fiche is attr is not null - * or array is attr is empty - * - */ -function getFicheAttribut($p_cn,$p_id,$p_attr="") { - $p_id=FormatString($p_id); - if ( $p_attr != "") { - $Res=ExecSql($p_cn,"select av_text from - attr_value - natural join jnt_fic_att_value - natural join fiche - where - ad_id=$p_attr - and f_id=(select f_id from vw_poste_qcode where j_qcode=upper('$p_id')) "); - if ( pg_NumRows($Res) == 0 ) return NULL; - $st=pg_fetch_array($Res,0); - return $st['av_text']; - } else { - // Get attribut from the view - $Res=ExecSql($p_cn,"select * from vw_fiche_attr where quick_code=upper('$p_id')"); - if ( pg_NumRows($Res) == 0 ) return null; - $st=pg_fetch_array($Res,0); - return $st; - } -} - -?> diff --git a/include/forecast.inc.php b/include/forecast.inc.php new file mode 100644 index 000000000..a8e1910d3 --- /dev/null +++ b/include/forecast.inc.php @@ -0,0 +1,341 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* $Revision: 1649 $ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief display, add, delete and modify forecast + */ +echo js_include('scripts.js'); +echo js_include('prototype.js'); +echo js_include('forecast.js'); +require_once 'class_anticipation.php'; + +$sa=(isset($_REQUEST['sa']))?$_REQUEST['sa']:''; +/********************************************************************** + * Remove a anticipation + * + * + **********************************************************************/ +/** + * @todo add security for forecast.inc.php + */ +if ( isset($_GET['del'])){ + $forecast=new Forecast($cn,$_GET['f_id']); + $forecast->delete(); +} +/********************************************************************** + * Save the modification mod_cat_save + * + * + **********************************************************************/ +if ( isset($_POST['mod_cat_save'])){ + $anti=new Forecast($cn,$_POST['f_id']); + try{ + $cn->start(); + /* Save forecast */ + $anti->set_parameter('name',$_POST['an_name']); + $anti->save(); + + /* add new category */ + for ($i=0;$i<MAX_CAT;$i++){ + if( isset($_POST['fr_cat_new'.$i])) { + if (strlen(trim($_POST['fr_cat_new'.$i])) != 0 ) { + $c=new Forecast_Cat($cn); + $c->set_parameter('order',$_POST['fr_order_new'.$i]); + $c->set_parameter('desc',$_POST['fr_cat_new'.$i]); + $c->set_parameter('forecast',$_POST['f_id']); + $c->save(); + } + } + } + + /* update existing cat */ + foreach ($_POST as $key=>$value){ + $var=sscanf($key,'fr_cat%d'); + $idx=sprintf("fr_cat%d",$var[0]); + if (isset($_POST[$idx])){ + $fc=new Forecast_Cat($cn,$var[0]); + if (strlen(trim($_POST[$idx]))==0) { + $fc->delete(); + } else { + $fc->set_parameter('order',$_POST['fc_order'.$var[0]]); + $fc->set_parameter('desc',$_POST['fr_cat'.$var[0]]); + $fc->set_parameter('forecast',$_POST['f_id']); + $fc->save(); + } + + } + } + + $cn->commit(); + } catch (Exception $e) { + alert($e->getMessage()); + $cn->rollback(); + + } + $sa='vw'; + +} +/********************************************************************** + * Save first the data for new + * + * + **********************************************************************/ +if ( $sa == 'new' || isset ($_POST['step3'])) { + $correct=0; + if (isset($_POST['step3'])){ + /*save all the items */ + try{ + $cn->start(); + for ($i=0;$i<MAX_FORECAST_ITEM;$i++){ + + // Delete if needed + if ( isset($_POST['fi_id'.$i])) { + if (strlen(trim($_POST['an_cat_acc'.$i]))==0 &&strlen(trim($_POST['an_qc'.$i]))== 0){ + $e=new Forecast_item($cn); + $e->set_parameter("id",$_POST['fi_id'.$i]); + $e->delete(); + } + } + + if (strlen(trim($_POST['an_cat_acc'.$i]))!=0 || strlen(trim($_POST['an_qc'.$i]))!= 0){ + /* we save only if there is something */ + $e=new Forecast_item($cn); + if ( isset($_POST['fi_id'.$i])) { + $e->set_parameter("id",$_POST['fi_id'.$i]); + } + $e->set_parameter('text',$_POST['an_label'.$i]); + $e->set_parameter('amount',$_POST['an_cat_amount'.$i]); + $e->set_parameter('debit',$_POST['an_deb'.$i]); + $e->set_parameter('cat_id',$_POST['an_cat'.$i]); + $e->set_parameter('account',$_POST['an_cat_acc'.$i]); + $e->set_parameter('periode',$_POST['month'.$i]); + $f=new Fiche($cn); + if ( $f->get_by_qcode($_POST['an_qc'.$i],false) == 0 ) + $e->set_parameter('card',$f->id); + else + $e->set_parameter('card',null); + $e->set_parameter('order',$i); + $e->save(); + } + } + $cn->commit(); + $sa='vw'; // to avoid to restart the add of new anticipation + } catch (Exception $e){ + $cn->rollback(); + alert($e->getMessage()); + $correct=1; + } + + } + /* Second step : we save the name and category + * and propose the items we add the item */ + if ($correct==2 || isset ($_POST['step2'])){ + try{ + $cn->start(); + /* Save forecast */ + $a=new Forecast($cn); + $a->set_parameter('name',$_POST['an_name']); + $a->save(); + $id=$a->get_parameter("id"); + /* save cat */ + for ($i=0;$i<MAX_CAT;$i++){ + if( strlen(trim($_POST['fr_cat'.$i])) != 0 ) { + $c=new Forecast_Cat($cn); + $c->set_parameter('order',$_POST['fr_order'.$i]); + $c->set_parameter('desc',$_POST['fr_cat'.$i]); + $c->set_parameter('forecast',$id); + $c->save(); + } + } + $cn->commit(); + } catch (Exception $e) { + alert($e->getMessage()); + $correct=1;unset($_POST['step2']); + $cn->rollback(); + } + + } + +} +/********************************************************************** + * Display menu + * + * + **********************************************************************/ +// display button add and list of forecast to display +$aForecast=Forecast::load_all($cn); +$menu=array(); +$get_dossier=dossier::get(); +$phpsessid="PHPSESSID=".$_REQUEST['PHPSESSID']; + +for ($i = 0;$i<count($aForecast);$i++){ + $href="?p_action=prev&sa=vw&".$get_dossier."&".$phpsessid.'&f_id='.$aForecast[$i]['f_id']; + $name=h($aForecast[$i]['f_name']); + $menu[]=array($href,$name,$name,$aForecast[$i]['f_id']); +} + +$href="?p_action=prev&sa=new&".$get_dossier.'&'.$phpsessid; +$menu[]=array($href,_("Ajout prévision"),_("Ajout d'une prévision"),0); +$def=(isset($_REQUEST['f_id']))?$_REQUEST['f_id']:-1; +echo '<div class="lmenu">'; +echo ShowItem($menu,'H','mtitle','mtitle',$def); +echo '</div>'; +/********************************************************************** + * Ask for a new anticipation (forecast) + * + * + **********************************************************************/ +if ( $sa == 'new') { + /* Second step : we save the name and category + * and propose the items we add the item */ + if ($correct==2 || isset ($_POST['step2'])){ + echo js_include('accounting_item.js'); + echo js_include('ajax_fiche.js'); + echo js_include('card.js'); + echo js_include('prototype.js'); + echo js_include('scriptaculous.js'); + echo js_include('effects.js'); + echo js_include('controls.js'); + echo js_include('dragdrop.js'); + echo js_include('accounting_item.js'); + + + /* Propose a form for the items + */ + $anticip=new Anticipation($cn,$a->get_parameter("id")); + echo '<div class="content">'; + echo ICard::ipopup('ipopcard'); + echo IPoste::ipopup('ipop_account'); + $search_card=new IPopup('ipop_card'); + $search_card->title=_('Recherche de fiche'); + $search_card->value=''; + echo $search_card->input(); + + echo '<form method="post" action="?">'; + echo dossier::hidden().HtmlInput::phpsessid(); + echo HtmlInput::hidden('sa','new'); + echo HtmlInput::hidden('p_action','prev'); + echo HtmlInput::hidden('f_id',$id); + echo $anticip->form_item(); + echo HtmlInput::submit('step3',_('Sauver')); + echo '</form>'; + echo '</div>'; + + } + /* First step, the name and the category */ + if ( ! isset ($_POST['step2']) || $correct==1){ + $anc=new Anticipation($cn); + echo '<div class="content">'; + /* display a blank form for name and category */ + echo '<form method="post" action="?">'; + echo dossier::hidden().HtmlInput::phpsessid(); + echo HtmlInput::hidden('sa','new'); + echo HtmlInput::hidden('p_action','prev'); + echo $anc->form_cat(); + echo HtmlInput::submit('step2',_('Sauver')); + echo '</form>'; + echo '</div>'; + } + +} +/********************************************************************** + * If we request to modify the category or the name + * + * + **********************************************************************/ +if ( isset($_GET['mod_cat'])){ + $anc=new Anticipation($cn,$_GET['f_id']); + echo '<div class="content">'; + /* display a blank form for name and category */ + echo '<form method="post" action="?">'; + echo dossier::hidden().HtmlInput::phpsessid(); + echo HtmlInput::hidden('sa','mod'); + echo HtmlInput::hidden('p_action','prev'); + echo $anc->form_cat(); + echo HtmlInput::submit('mod_cat_save',_('Sauver')); + echo '</form>'; + echo '</div>'; +} +/********************************************************************** + * If we request to modify the items + * + * + **********************************************************************/ +if (isset($_GET['mod_item'])){ + echo js_include('accounting_item.js'); + echo js_include('ajax_fiche.js'); + echo js_include('card.js'); + echo js_include('prototype.js'); + echo js_include('scriptaculous.js'); + echo js_include('effects.js'); + echo js_include('controls.js'); + echo js_include('dragdrop.js'); + echo js_include('accounting_item.js'); + + + /* Propose a form for the items + */ + $anticip=new Anticipation($cn,$_GET['f_id']); + echo '<div class="content">'; + echo ICard::ipopup('ipopcard'); + echo IPoste::ipopup('ipop_account'); + $search_card=new IPopup('ipop_card'); + $search_card->title=_('Recherche de fiche'); + $search_card->value=''; + echo $search_card->input(); + + echo '<form method="post" action="?">'; + echo dossier::hidden().HtmlInput::phpsessid(); + echo HtmlInput::hidden('sa','new'); + echo HtmlInput::hidden('p_action','prev'); + echo HtmlInput::hidden('f_id',$_GET['f_id']); + echo $anticip->form_item(); + echo HtmlInput::submit('step3',_('Sauver')); + echo '</form>'; + echo '</div>'; +} +/********************************************************************** + * if a forecast is asked we display the result + * + * + **********************************************************************/ +if ( isset($_REQUEST['f_id']) && $sa=="vw") { + echo '<div class="content">'; + $forecast=new Anticipation($cn); + $forecast->set_parameter("id",$_REQUEST['f_id']); + echo $forecast->display(); + echo '<div class="noprint">'; + echo '<form method="get">'; + echo dossier::hidden().HtmlInput::phpsessid(); + echo HtmlInput::hidden('f_id',$_REQUEST['f_id']); + echo HtmlInput::submit('mod_cat',_('Modifier nom ou catégories')); + echo HtmlInput::submit('mod_item',_('Modifier éléments')); + //echo HtmlInput::submit('cvs',_('Export CVS')); + echo HtmlInput::submit('del',_('Effacer'),'onclick="return confirm(\''._('Vous confirmez l\\\' effacement').'\')"'); + echo HtmlInput::hidden('p_action','prev'); + echo '</form>'; + echo '</div>'; + echo '</div>'; + exit(); +} + +?> \ No newline at end of file diff --git a/include/fortis_be.inc.php b/include/fortis_be.inc.php index 263b1367c..6506b3c16 100644 --- a/include/fortis_be.inc.php +++ b/include/fortis_be.inc.php @@ -78,8 +78,8 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { code='".$code."' and num_compte='".$num_compte."'"; $sql=utf8_encode($sql); - $Res=ExecSql($p_cn,$sql); - $Num=pg_NumRows($Res); + $Res=$p_cn->exec_sql($sql); + $Num=Database::num_row($Res); if($Num > 0 ) { echo "Opération FORTIS ".$code." déj&eagrave; importée.<br/>"; @@ -107,7 +107,7 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { $p_jrn, 'n')"; - $Res=ExecSql($p_cn,$Sql); + $Res=$p_cn->exec_sql($Sql); } } diff --git a/include/function_javascript.php b/include/function_javascript.php new file mode 100644 index 000000000..491dd0a3b --- /dev/null +++ b/include/function_javascript.php @@ -0,0 +1,802 @@ +<? +/* +PHP URL encoding/decoding functions for Javascript interaction V3.0 +(C) 2006 www.captain.at - all rights reserved +License: GPL +*/ +/*! + *\brief create the HTML for including of a javascript file + *\param $p_string name of the file + *\return the HTML script + */ +function js_include($p_string) { + $script='<script type="text/javascript" charset="utf8" language="javascript" src="js/'.$p_string.'"></script>'; + return $script; +} +/*! + *\brief create the HTML for adding the script tags around of the script + *\param $p_string source codename of the file + *\return the HTML script + */ +function create_script($p_string) { + $script='<script type="text/javascript" charset="utf8" language="javascript">'.$p_string.' </script>'; + return $script; + +} +function encodeURIComponent($string) { + $result = ""; + for ($i = 0; $i < strlen($string); $i++) { + $result .= encodeURIComponentbycharacter(urlencode($string[$i])); + } + return $result; +} + +function encodeURIComponentbycharacter($char) { + if ($char == "+") { return "%20"; } + if ($char == "%21") { return "!"; } + if ($char == "%27") { return '"'; } + if ($char == "%28") { return "("; } + if ($char == "%29") { return ")"; } + if ($char == "%2A") { return "*"; } + if ($char == "%7E") { return "~"; } + if ($char == "%80") { return "%E2%82%AC"; } + if ($char == "%81") { return "%C2%81"; } + if ($char == "%82") { return "%E2%80%9A"; } + if ($char == "%83") { return "%C6%92"; } + if ($char == "%84") { return "%E2%80%9E"; } + if ($char == "%85") { return "%E2%80%A6"; } + if ($char == "%86") { return "%E2%80%A0"; } + if ($char == "%87") { return "%E2%80%A1"; } + if ($char == "%88") { return "%CB%86"; } + if ($char == "%89") { return "%E2%80%B0"; } + if ($char == "%8A") { return "%C5%A0"; } + if ($char == "%8B") { return "%E2%80%B9"; } + if ($char == "%8C") { return "%C5%92"; } + if ($char == "%8D") { return "%C2%8D"; } + if ($char == "%8E") { return "%C5%BD"; } + if ($char == "%8F") { return "%C2%8F"; } + if ($char == "%90") { return "%C2%90"; } + if ($char == "%91") { return "%E2%80%98"; } + if ($char == "%92") { return "%E2%80%99"; } + if ($char == "%93") { return "%E2%80%9C"; } + if ($char == "%94") { return "%E2%80%9D"; } + if ($char == "%95") { return "%E2%80%A2"; } + if ($char == "%96") { return "%E2%80%93"; } + if ($char == "%97") { return "%E2%80%94"; } + if ($char == "%98") { return "%CB%9C"; } + if ($char == "%99") { return "%E2%84%A2"; } + if ($char == "%9A") { return "%C5%A1"; } + if ($char == "%9B") { return "%E2%80%BA"; } + if ($char == "%9C") { return "%C5%93"; } + if ($char == "%9D") { return "%C2%9D"; } + if ($char == "%9E") { return "%C5%BE"; } + if ($char == "%9F") { return "%C5%B8"; } + if ($char == "%A0") { return "%C2%A0"; } + if ($char == "%A1") { return "%C2%A1"; } + if ($char == "%A2") { return "%C2%A2"; } + if ($char == "%A3") { return "%C2%A3"; } + if ($char == "%A4") { return "%C2%A4"; } + if ($char == "%A5") { return "%C2%A5"; } + if ($char == "%A6") { return "%C2%A6"; } + if ($char == "%A7") { return "%C2%A7"; } + if ($char == "%A8") { return "%C2%A8"; } + if ($char == "%A9") { return "%C2%A9"; } + if ($char == "%AA") { return "%C2%AA"; } + if ($char == "%AB") { return "%C2%AB"; } + if ($char == "%AC") { return "%C2%AC"; } + if ($char == "%AD") { return "%C2%AD"; } + if ($char == "%AE") { return "%C2%AE"; } + if ($char == "%AF") { return "%C2%AF"; } + if ($char == "%B0") { return "%C2%B0"; } + if ($char == "%B1") { return "%C2%B1"; } + if ($char == "%B2") { return "%C2%B2"; } + if ($char == "%B3") { return "%C2%B3"; } + if ($char == "%B4") { return "%C2%B4"; } + if ($char == "%B5") { return "%C2%B5"; } + if ($char == "%B6") { return "%C2%B6"; } + if ($char == "%B7") { return "%C2%B7"; } + if ($char == "%B8") { return "%C2%B8"; } + if ($char == "%B9") { return "%C2%B9"; } + if ($char == "%BA") { return "%C2%BA"; } + if ($char == "%BB") { return "%C2%BB"; } + if ($char == "%BC") { return "%C2%BC"; } + if ($char == "%BD") { return "%C2%BD"; } + if ($char == "%BE") { return "%C2%BE"; } + if ($char == "%BF") { return "%C2%BF"; } + if ($char == "%C0") { return "%C3%80"; } + if ($char == "%C1") { return "%C3%81"; } + if ($char == "%C2") { return "%C3%82"; } + if ($char == "%C3") { return "%C3%83"; } + if ($char == "%C4") { return "%C3%84"; } + if ($char == "%C5") { return "%C3%85"; } + if ($char == "%C6") { return "%C3%86"; } + if ($char == "%C7") { return "%C3%87"; } + if ($char == "%C8") { return "%C3%88"; } + if ($char == "%C9") { return "%C3%89"; } + if ($char == "%CA") { return "%C3%8A"; } + if ($char == "%CB") { return "%C3%8B"; } + if ($char == "%CC") { return "%C3%8C"; } + if ($char == "%CD") { return "%C3%8D"; } + if ($char == "%CE") { return "%C3%8E"; } + if ($char == "%CF") { return "%C3%8F"; } + if ($char == "%D0") { return "%C3%90"; } + if ($char == "%D1") { return "%C3%91"; } + if ($char == "%D2") { return "%C3%92"; } + if ($char == "%D3") { return "%C3%93"; } + if ($char == "%D4") { return "%C3%94"; } + if ($char == "%D5") { return "%C3%95"; } + if ($char == "%D6") { return "%C3%96"; } + if ($char == "%D7") { return "%C3%97"; } + if ($char == "%D8") { return "%C3%98"; } + if ($char == "%D9") { return "%C3%99"; } + if ($char == "%DA") { return "%C3%9A"; } + if ($char == "%DB") { return "%C3%9B"; } + if ($char == "%DC") { return "%C3%9C"; } + if ($char == "%DD") { return "%C3%9D"; } + if ($char == "%DE") { return "%C3%9E"; } + if ($char == "%DF") { return "%C3%9F"; } + if ($char == "%E0") { return "%C3%A0"; } + if ($char == "%E1") { return "%C3%A1"; } + if ($char == "%E2") { return "%C3%A2"; } + if ($char == "%E3") { return "%C3%A3"; } + if ($char == "%E4") { return "%C3%A4"; } + if ($char == "%E5") { return "%C3%A5"; } + if ($char == "%E6") { return "%C3%A6"; } + if ($char == "%E7") { return "%C3%A7"; } + if ($char == "%E8") { return "%C3%A8"; } + if ($char == "%E9") { return "%C3%A9"; } + if ($char == "%EA") { return "%C3%AA"; } + if ($char == "%EB") { return "%C3%AB"; } + if ($char == "%EC") { return "%C3%AC"; } + if ($char == "%ED") { return "%C3%AD"; } + if ($char == "%EE") { return "%C3%AE"; } + if ($char == "%EF") { return "%C3%AF"; } + if ($char == "%F0") { return "%C3%B0"; } + if ($char == "%F1") { return "%C3%B1"; } + if ($char == "%F2") { return "%C3%B2"; } + if ($char == "%F3") { return "%C3%B3"; } + if ($char == "%F4") { return "%C3%B4"; } + if ($char == "%F5") { return "%C3%B5"; } + if ($char == "%F6") { return "%C3%B6"; } + if ($char == "%F7") { return "%C3%B7"; } + if ($char == "%F8") { return "%C3%B8"; } + if ($char == "%F9") { return "%C3%B9"; } + if ($char == "%FA") { return "%C3%BA"; } + if ($char == "%FB") { return "%C3%BB"; } + if ($char == "%FC") { return "%C3%BC"; } + if ($char == "%FD") { return "%C3%BD"; } + if ($char == "%FE") { return "%C3%BE"; } + if ($char == "%FF") { return "%C3%BF"; } + return $char; +} + +function decodeURIComponent($string) { + $result = ""; + for ($i = 0; $i < strlen($string); $i++) { + $decstr = ""; + for ($p = 0; $p <= 8; $p++) { + $decstr .= $string[$i+$p]; + } + list($decodedstr, $num) = decodeURIComponentbycharacter($decstr); + $result .= urldecode($decodedstr); + $i += $num ; + } + return $result; +} + +function decodeURIComponentbycharacter($str) { + + $char = $str; + + if ($char == "%E2%82%AC") { return array("%80", 8); } + if ($char == "%E2%80%9A") { return array("%82", 8); } + if ($char == "%E2%80%9E") { return array("%84", 8); } + if ($char == "%E2%80%A6") { return array("%85", 8); } + if ($char == "%E2%80%A0") { return array("%86", 8); } + if ($char == "%E2%80%A1") { return array("%87", 8); } + if ($char == "%E2%80%B0") { return array("%89", 8); } + if ($char == "%E2%80%B9") { return array("%8B", 8); } + if ($char == "%E2%80%98") { return array("%91", 8); } + if ($char == "%E2%80%99") { return array("%92", 8); } + if ($char == "%E2%80%9C") { return array("%93", 8); } + if ($char == "%E2%80%9D") { return array("%94", 8); } + if ($char == "%E2%80%A2") { return array("%95", 8); } + if ($char == "%E2%80%93") { return array("%96", 8); } + if ($char == "%E2%80%94") { return array("%97", 8); } + if ($char == "%E2%84%A2") { return array("%99", 8); } + if ($char == "%E2%80%BA") { return array("%9B", 8); } + + $char = substr($str, 0, 6); + + if ($char == "%C2%81") { return array("%81", 5); } + if ($char == "%C6%92") { return array("%83", 5); } + if ($char == "%CB%86") { return array("%88", 5); } + if ($char == "%C5%A0") { return array("%8A", 5); } + if ($char == "%C5%92") { return array("%8C", 5); } + if ($char == "%C2%8D") { return array("%8D", 5); } + if ($char == "%C5%BD") { return array("%8E", 5); } + if ($char == "%C2%8F") { return array("%8F", 5); } + if ($char == "%C2%90") { return array("%90", 5); } + if ($char == "%CB%9C") { return array("%98", 5); } + if ($char == "%C5%A1") { return array("%9A", 5); } + if ($char == "%C5%93") { return array("%9C", 5); } + if ($char == "%C2%9D") { return array("%9D", 5); } + if ($char == "%C5%BE") { return array("%9E", 5); } + if ($char == "%C5%B8") { return array("%9F", 5); } + if ($char == "%C2%A0") { return array("%A0", 5); } + if ($char == "%C2%A1") { return array("%A1", 5); } + if ($char == "%C2%A2") { return array("%A2", 5); } + if ($char == "%C2%A3") { return array("%A3", 5); } + if ($char == "%C2%A4") { return array("%A4", 5); } + if ($char == "%C2%A5") { return array("%A5", 5); } + if ($char == "%C2%A6") { return array("%A6", 5); } + if ($char == "%C2%A7") { return array("%A7", 5); } + if ($char == "%C2%A8") { return array("%A8", 5); } + if ($char == "%C2%A9") { return array("%A9", 5); } + if ($char == "%C2%AA") { return array("%AA", 5); } + if ($char == "%C2%AB") { return array("%AB", 5); } + if ($char == "%C2%AC") { return array("%AC", 5); } + if ($char == "%C2%AD") { return array("%AD", 5); } + if ($char == "%C2%AE") { return array("%AE", 5); } + if ($char == "%C2%AF") { return array("%AF", 5); } + if ($char == "%C2%B0") { return array("%B0", 5); } + if ($char == "%C2%B1") { return array("%B1", 5); } + if ($char == "%C2%B2") { return array("%B2", 5); } + if ($char == "%C2%B3") { return array("%B3", 5); } + if ($char == "%C2%B4") { return array("%B4", 5); } + if ($char == "%C2%B5") { return array("%B5", 5); } + if ($char == "%C2%B6") { return array("%B6", 5); } + if ($char == "%C2%B7") { return array("%B7", 5); } + if ($char == "%C2%B8") { return array("%B8", 5); } + if ($char == "%C2%B9") { return array("%B9", 5); } + if ($char == "%C2%BA") { return array("%BA", 5); } + if ($char == "%C2%BB") { return array("%BB", 5); } + if ($char == "%C2%BC") { return array("%BC", 5); } + if ($char == "%C2%BD") { return array("%BD", 5); } + if ($char == "%C2%BE") { return array("%BE", 5); } + if ($char == "%C2%BF") { return array("%BF", 5); } + if ($char == "%C3%80") { return array("%C0", 5); } + if ($char == "%C3%81") { return array("%C1", 5); } + if ($char == "%C3%82") { return array("%C2", 5); } + if ($char == "%C3%83") { return array("%C3", 5); } + if ($char == "%C3%84") { return array("%C4", 5); } + if ($char == "%C3%85") { return array("%C5", 5); } + if ($char == "%C3%86") { return array("%C6", 5); } + if ($char == "%C3%87") { return array("%C7", 5); } + if ($char == "%C3%88") { return array("%C8", 5); } + if ($char == "%C3%89") { return array("%C9", 5); } + if ($char == "%C3%8A") { return array("%CA", 5); } + if ($char == "%C3%8B") { return array("%CB", 5); } + if ($char == "%C3%8C") { return array("%CC", 5); } + if ($char == "%C3%8D") { return array("%CD", 5); } + if ($char == "%C3%8E") { return array("%CE", 5); } + if ($char == "%C3%8F") { return array("%CF", 5); } + if ($char == "%C3%90") { return array("%D0", 5); } + if ($char == "%C3%91") { return array("%D1", 5); } + if ($char == "%C3%92") { return array("%D2", 5); } + if ($char == "%C3%93") { return array("%D3", 5); } + if ($char == "%C3%94") { return array("%D4", 5); } + if ($char == "%C3%95") { return array("%D5", 5); } + if ($char == "%C3%96") { return array("%D6", 5); } + if ($char == "%C3%97") { return array("%D7", 5); } + if ($char == "%C3%98") { return array("%D8", 5); } + if ($char == "%C3%99") { return array("%D9", 5); } + if ($char == "%C3%9A") { return array("%DA", 5); } + if ($char == "%C3%9B") { return array("%DB", 5); } + if ($char == "%C3%9C") { return array("%DC", 5); } + if ($char == "%C3%9D") { return array("%DD", 5); } + if ($char == "%C3%9E") { return array("%DE", 5); } + if ($char == "%C3%9F") { return array("%DF", 5); } + if ($char == "%C3%A0") { return array("%E0", 5); } + if ($char == "%C3%A1") { return array("%E1", 5); } + if ($char == "%C3%A2") { return array("%E2", 5); } + if ($char == "%C3%A3") { return array("%E3", 5); } + if ($char == "%C3%A4") { return array("%E4", 5); } + if ($char == "%C3%A5") { return array("%E5", 5); } + if ($char == "%C3%A6") { return array("%E6", 5); } + if ($char == "%C3%A7") { return array("%E7", 5); } + if ($char == "%C3%A8") { return array("%E8", 5); } + if ($char == "%C3%A9") { return array("%E9", 5); } + if ($char == "%C3%AA") { return array("%EA", 5); } + if ($char == "%C3%AB") { return array("%EB", 5); } + if ($char == "%C3%AC") { return array("%EC", 5); } + if ($char == "%C3%AD") { return array("%ED", 5); } + if ($char == "%C3%AE") { return array("%EE", 5); } + if ($char == "%C3%AF") { return array("%EF", 5); } + if ($char == "%C3%B0") { return array("%F0", 5); } + if ($char == "%C3%B1") { return array("%F1", 5); } + if ($char == "%C3%B2") { return array("%F2", 5); } + if ($char == "%C3%B3") { return array("%F3", 5); } + if ($char == "%C3%B4") { return array("%F4", 5); } + if ($char == "%C3%B5") { return array("%F5", 5); } + if ($char == "%C3%B6") { return array("%F6", 5); } + if ($char == "%C3%B7") { return array("%F7", 5); } + if ($char == "%C3%B8") { return array("%F8", 5); } + if ($char == "%C3%B9") { return array("%F9", 5); } + if ($char == "%C3%BA") { return array("%FA", 5); } + if ($char == "%C3%BB") { return array("%FB", 5); } + if ($char == "%C3%BC") { return array("%FC", 5); } + if ($char == "%C3%BD") { return array("%FD", 5); } + if ($char == "%C3%BE") { return array("%FE", 5); } + if ($char == "%C3%BF") { return array("%FF", 5); } + + $char = substr($str, 0, 3); + if ($char == "%20") { return array("+", 2); } + + $char = substr($str, 0, 1); + + if ($char == "!") { return array("%21", 0); } + if ($char == "\"") { return array("%27", 0); } + if ($char == "(") { return array("%28", 0); } + if ($char == ")") { return array("%29", 0); } + if ($char == "*") { return array("%2A", 0); } + if ($char == "~") { return array("%7E", 0); } + + if ($char == "%") { + return array(substr($str, 0, 3), 2); + } else { + return array($char, 0); + } +} + +function encodeURI($string) { + $result = ""; + for ($i = 0; $i < strlen($string); $i++) { + $result .= encodeURIbycharacter(urlencode($string[$i])); + } + return $result; +} + +function encodeURIbycharacter($char) { + if ($char == "+") { return "%20"; } + if ($char == "%21") { return "!"; } + if ($char == "%23") { return "#"; } + if ($char == "%24") { return "$"; } + if ($char == "%26") { return "&"; } + if ($char == "%27") { return "\""; } + if ($char == "%28") { return "("; } + if ($char == "%29") { return ")"; } + if ($char == "%2A") { return "*"; } + if ($char == "%2B") { return "+"; } + if ($char == "%2C") { return ","; } + if ($char == "%2F") { return "/"; } + if ($char == "%3A") { return ":"; } + if ($char == "%3B") { return ";"; } + if ($char == "%3D") { return "="; } + if ($char == "%3F") { return "?"; } + if ($char == "%40") { return "@"; } + if ($char == "%7E") { return "~"; } + if ($char == "%80") { return "%E2%82%AC"; } + if ($char == "%81") { return "%C2%81"; } + if ($char == "%82") { return "%E2%80%9A"; } + if ($char == "%83") { return "%C6%92"; } + if ($char == "%84") { return "%E2%80%9E"; } + if ($char == "%85") { return "%E2%80%A6"; } + if ($char == "%86") { return "%E2%80%A0"; } + if ($char == "%87") { return "%E2%80%A1"; } + if ($char == "%88") { return "%CB%86"; } + if ($char == "%89") { return "%E2%80%B0"; } + if ($char == "%8A") { return "%C5%A0"; } + if ($char == "%8B") { return "%E2%80%B9"; } + if ($char == "%8C") { return "%C5%92"; } + if ($char == "%8D") { return "%C2%8D"; } + if ($char == "%8E") { return "%C5%BD"; } + if ($char == "%8F") { return "%C2%8F"; } + if ($char == "%90") { return "%C2%90"; } + if ($char == "%91") { return "%E2%80%98"; } + if ($char == "%92") { return "%E2%80%99"; } + if ($char == "%93") { return "%E2%80%9C"; } + if ($char == "%94") { return "%E2%80%9D"; } + if ($char == "%95") { return "%E2%80%A2"; } + if ($char == "%96") { return "%E2%80%93"; } + if ($char == "%97") { return "%E2%80%94"; } + if ($char == "%98") { return "%CB%9C"; } + if ($char == "%99") { return "%E2%84%A2"; } + if ($char == "%9A") { return "%C5%A1"; } + if ($char == "%9B") { return "%E2%80%BA"; } + if ($char == "%9C") { return "%C5%93"; } + if ($char == "%9D") { return "%C2%9D"; } + if ($char == "%9E") { return "%C5%BE"; } + if ($char == "%9F") { return "%C5%B8"; } + if ($char == "%A0") { return "%C2%A0"; } + if ($char == "%A1") { return "%C2%A1"; } + if ($char == "%A2") { return "%C2%A2"; } + if ($char == "%A3") { return "%C2%A3"; } + if ($char == "%A4") { return "%C2%A4"; } + if ($char == "%A5") { return "%C2%A5"; } + if ($char == "%A6") { return "%C2%A6"; } + if ($char == "%A7") { return "%C2%A7"; } + if ($char == "%A8") { return "%C2%A8"; } + if ($char == "%A9") { return "%C2%A9"; } + if ($char == "%AA") { return "%C2%AA"; } + if ($char == "%AB") { return "%C2%AB"; } + if ($char == "%AC") { return "%C2%AC"; } + if ($char == "%AD") { return "%C2%AD"; } + if ($char == "%AE") { return "%C2%AE"; } + if ($char == "%AF") { return "%C2%AF"; } + if ($char == "%B0") { return "%C2%B0"; } + if ($char == "%B1") { return "%C2%B1"; } + if ($char == "%B2") { return "%C2%B2"; } + if ($char == "%B3") { return "%C2%B3"; } + if ($char == "%B4") { return "%C2%B4"; } + if ($char == "%B5") { return "%C2%B5"; } + if ($char == "%B6") { return "%C2%B6"; } + if ($char == "%B7") { return "%C2%B7"; } + if ($char == "%B8") { return "%C2%B8"; } + if ($char == "%B9") { return "%C2%B9"; } + if ($char == "%BA") { return "%C2%BA"; } + if ($char == "%BB") { return "%C2%BB"; } + if ($char == "%BC") { return "%C2%BC"; } + if ($char == "%BD") { return "%C2%BD"; } + if ($char == "%BE") { return "%C2%BE"; } + if ($char == "%BF") { return "%C2%BF"; } + if ($char == "%C0") { return "%C3%80"; } + if ($char == "%C1") { return "%C3%81"; } + if ($char == "%C2") { return "%C3%82"; } + if ($char == "%C3") { return "%C3%83"; } + if ($char == "%C4") { return "%C3%84"; } + if ($char == "%C5") { return "%C3%85"; } + if ($char == "%C6") { return "%C3%86"; } + if ($char == "%C7") { return "%C3%87"; } + if ($char == "%C8") { return "%C3%88"; } + if ($char == "%C9") { return "%C3%89"; } + if ($char == "%CA") { return "%C3%8A"; } + if ($char == "%CB") { return "%C3%8B"; } + if ($char == "%CC") { return "%C3%8C"; } + if ($char == "%CD") { return "%C3%8D"; } + if ($char == "%CE") { return "%C3%8E"; } + if ($char == "%CF") { return "%C3%8F"; } + if ($char == "%D0") { return "%C3%90"; } + if ($char == "%D1") { return "%C3%91"; } + if ($char == "%D2") { return "%C3%92"; } + if ($char == "%D3") { return "%C3%93"; } + if ($char == "%D4") { return "%C3%94"; } + if ($char == "%D5") { return "%C3%95"; } + if ($char == "%D6") { return "%C3%96"; } + if ($char == "%D7") { return "%C3%97"; } + if ($char == "%D8") { return "%C3%98"; } + if ($char == "%D9") { return "%C3%99"; } + if ($char == "%DA") { return "%C3%9A"; } + if ($char == "%DB") { return "%C3%9B"; } + if ($char == "%DC") { return "%C3%9C"; } + if ($char == "%DD") { return "%C3%9D"; } + if ($char == "%DE") { return "%C3%9E"; } + if ($char == "%DF") { return "%C3%9F"; } + if ($char == "%E0") { return "%C3%A0"; } + if ($char == "%E1") { return "%C3%A1"; } + if ($char == "%E2") { return "%C3%A2"; } + if ($char == "%E3") { return "%C3%A3"; } + if ($char == "%E4") { return "%C3%A4"; } + if ($char == "%E5") { return "%C3%A5"; } + if ($char == "%E6") { return "%C3%A6"; } + if ($char == "%E7") { return "%C3%A7"; } + if ($char == "%E8") { return "%C3%A8"; } + if ($char == "%E9") { return "%C3%A9"; } + if ($char == "%EA") { return "%C3%AA"; } + if ($char == "%EB") { return "%C3%AB"; } + if ($char == "%EC") { return "%C3%AC"; } + if ($char == "%ED") { return "%C3%AD"; } + if ($char == "%EE") { return "%C3%AE"; } + if ($char == "%EF") { return "%C3%AF"; } + if ($char == "%F0") { return "%C3%B0"; } + if ($char == "%F1") { return "%C3%B1"; } + if ($char == "%F2") { return "%C3%B2"; } + if ($char == "%F3") { return "%C3%B3"; } + if ($char == "%F4") { return "%C3%B4"; } + if ($char == "%F5") { return "%C3%B5"; } + if ($char == "%F6") { return "%C3%B6"; } + if ($char == "%F7") { return "%C3%B7"; } + if ($char == "%F8") { return "%C3%B8"; } + if ($char == "%F9") { return "%C3%B9"; } + if ($char == "%FA") { return "%C3%BA"; } + if ($char == "%FB") { return "%C3%BB"; } + if ($char == "%FC") { return "%C3%BC"; } + if ($char == "%FD") { return "%C3%BD"; } + if ($char == "%FE") { return "%C3%BE"; } + if ($char == "%FF") { return "%C3%BF"; } + return $char; +} + +function decodeURI($string) { + $result = ""; + for ($i = 0; $i < strlen($string); $i++) { + $decstr = ""; + for ($p = 0; $p <= 8; $p++) { + $decstr .= $string[$i+$p]; + } + list($decodedstr, $num) = decodeURIbycharacter($decstr); + $result .= urldecode($decodedstr); + $i += $num ; + } + return $result; +} + +function decodeURIbycharacter($str) { + + $char = $str; + + if ($char == "%E2%82%AC") { return array("%80", 8); } + if ($char == "%E2%80%9A") { return array("%82", 8); } + if ($char == "%E2%80%9E") { return array("%84", 8); } + if ($char == "%E2%80%A6") { return array("%85", 8); } + if ($char == "%E2%80%A0") { return array("%86", 8); } + if ($char == "%E2%80%A1") { return array("%87", 8); } + if ($char == "%E2%80%B0") { return array("%89", 8); } + if ($char == "%E2%80%B9") { return array("%8B", 8); } + if ($char == "%E2%80%98") { return array("%91", 8); } + if ($char == "%E2%80%99") { return array("%92", 8); } + if ($char == "%E2%80%9C") { return array("%93", 8); } + if ($char == "%E2%80%9D") { return array("%94", 8); } + if ($char == "%E2%80%A2") { return array("%95", 8); } + if ($char == "%E2%80%93") { return array("%96", 8); } + if ($char == "%E2%80%94") { return array("%97", 8); } + if ($char == "%E2%84%A2") { return array("%99", 8); } + if ($char == "%E2%80%BA") { return array("%9B", 8); } + + $char = substr($str, 0, 6); + + if ($char == "%C2%81") { return array("%81", 5); } + if ($char == "%C6%92") { return array("%83", 5); } + if ($char == "%CB%86") { return array("%88", 5); } + if ($char == "%C5%A0") { return array("%8A", 5); } + if ($char == "%C5%92") { return array("%8C", 5); } + if ($char == "%C2%8D") { return array("%8D", 5); } + if ($char == "%C5%BD") { return array("%8E", 5); } + if ($char == "%C2%8F") { return array("%8F", 5); } + if ($char == "%C2%90") { return array("%90", 5); } + if ($char == "%CB%9C") { return array("%98", 5); } + if ($char == "%C5%A1") { return array("%9A", 5); } + if ($char == "%C5%93") { return array("%9C", 5); } + if ($char == "%C2%9D") { return array("%9D", 5); } + if ($char == "%C5%BE") { return array("%9E", 5); } + if ($char == "%C5%B8") { return array("%9F", 5); } + if ($char == "%C2%A0") { return array("%A0", 5); } + if ($char == "%C2%A1") { return array("%A1", 5); } + if ($char == "%C2%A2") { return array("%A2", 5); } + if ($char == "%C2%A3") { return array("%A3", 5); } + if ($char == "%C2%A4") { return array("%A4", 5); } + if ($char == "%C2%A5") { return array("%A5", 5); } + if ($char == "%C2%A6") { return array("%A6", 5); } + if ($char == "%C2%A7") { return array("%A7", 5); } + if ($char == "%C2%A8") { return array("%A8", 5); } + if ($char == "%C2%A9") { return array("%A9", 5); } + if ($char == "%C2%AA") { return array("%AA", 5); } + if ($char == "%C2%AB") { return array("%AB", 5); } + if ($char == "%C2%AC") { return array("%AC", 5); } + if ($char == "%C2%AD") { return array("%AD", 5); } + if ($char == "%C2%AE") { return array("%AE", 5); } + if ($char == "%C2%AF") { return array("%AF", 5); } + if ($char == "%C2%B0") { return array("%B0", 5); } + if ($char == "%C2%B1") { return array("%B1", 5); } + if ($char == "%C2%B2") { return array("%B2", 5); } + if ($char == "%C2%B3") { return array("%B3", 5); } + if ($char == "%C2%B4") { return array("%B4", 5); } + if ($char == "%C2%B5") { return array("%B5", 5); } + if ($char == "%C2%B6") { return array("%B6", 5); } + if ($char == "%C2%B7") { return array("%B7", 5); } + if ($char == "%C2%B8") { return array("%B8", 5); } + if ($char == "%C2%B9") { return array("%B9", 5); } + if ($char == "%C2%BA") { return array("%BA", 5); } + if ($char == "%C2%BB") { return array("%BB", 5); } + if ($char == "%C2%BC") { return array("%BC", 5); } + if ($char == "%C2%BD") { return array("%BD", 5); } + if ($char == "%C2%BE") { return array("%BE", 5); } + if ($char == "%C2%BF") { return array("%BF", 5); } + if ($char == "%C3%80") { return array("%C0", 5); } + if ($char == "%C3%81") { return array("%C1", 5); } + if ($char == "%C3%82") { return array("%C2", 5); } + if ($char == "%C3%83") { return array("%C3", 5); } + if ($char == "%C3%84") { return array("%C4", 5); } + if ($char == "%C3%85") { return array("%C5", 5); } + if ($char == "%C3%86") { return array("%C6", 5); } + if ($char == "%C3%87") { return array("%C7", 5); } + if ($char == "%C3%88") { return array("%C8", 5); } + if ($char == "%C3%89") { return array("%C9", 5); } + if ($char == "%C3%8A") { return array("%CA", 5); } + if ($char == "%C3%8B") { return array("%CB", 5); } + if ($char == "%C3%8C") { return array("%CC", 5); } + if ($char == "%C3%8D") { return array("%CD", 5); } + if ($char == "%C3%8E") { return array("%CE", 5); } + if ($char == "%C3%8F") { return array("%CF", 5); } + if ($char == "%C3%90") { return array("%D0", 5); } + if ($char == "%C3%91") { return array("%D1", 5); } + if ($char == "%C3%92") { return array("%D2", 5); } + if ($char == "%C3%93") { return array("%D3", 5); } + if ($char == "%C3%94") { return array("%D4", 5); } + if ($char == "%C3%95") { return array("%D5", 5); } + if ($char == "%C3%96") { return array("%D6", 5); } + if ($char == "%C3%97") { return array("%D7", 5); } + if ($char == "%C3%98") { return array("%D8", 5); } + if ($char == "%C3%99") { return array("%D9", 5); } + if ($char == "%C3%9A") { return array("%DA", 5); } + if ($char == "%C3%9B") { return array("%DB", 5); } + if ($char == "%C3%9C") { return array("%DC", 5); } + if ($char == "%C3%9D") { return array("%DD", 5); } + if ($char == "%C3%9E") { return array("%DE", 5); } + if ($char == "%C3%9F") { return array("%DF", 5); } + if ($char == "%C3%A0") { return array("%E0", 5); } + if ($char == "%C3%A1") { return array("%E1", 5); } + if ($char == "%C3%A2") { return array("%E2", 5); } + if ($char == "%C3%A3") { return array("%E3", 5); } + if ($char == "%C3%A4") { return array("%E4", 5); } + if ($char == "%C3%A5") { return array("%E5", 5); } + if ($char == "%C3%A6") { return array("%E6", 5); } + if ($char == "%C3%A7") { return array("%E7", 5); } + if ($char == "%C3%A8") { return array("%E8", 5); } + if ($char == "%C3%A9") { return array("%E9", 5); } + if ($char == "%C3%AA") { return array("%EA", 5); } + if ($char == "%C3%AB") { return array("%EB", 5); } + if ($char == "%C3%AC") { return array("%EC", 5); } + if ($char == "%C3%AD") { return array("%ED", 5); } + if ($char == "%C3%AE") { return array("%EE", 5); } + if ($char == "%C3%AF") { return array("%EF", 5); } + if ($char == "%C3%B0") { return array("%F0", 5); } + if ($char == "%C3%B1") { return array("%F1", 5); } + if ($char == "%C3%B2") { return array("%F2", 5); } + if ($char == "%C3%B3") { return array("%F3", 5); } + if ($char == "%C3%B4") { return array("%F4", 5); } + if ($char == "%C3%B5") { return array("%F5", 5); } + if ($char == "%C3%B6") { return array("%F6", 5); } + if ($char == "%C3%B7") { return array("%F7", 5); } + if ($char == "%C3%B8") { return array("%F8", 5); } + if ($char == "%C3%B9") { return array("%F9", 5); } + if ($char == "%C3%BA") { return array("%FA", 5); } + if ($char == "%C3%BB") { return array("%FB", 5); } + if ($char == "%C3%BC") { return array("%FC", 5); } + if ($char == "%C3%BD") { return array("%FD", 5); } + if ($char == "%C3%BE") { return array("%FE", 5); } + if ($char == "%C3%BF") { return array("%FF", 5); } + + $char = substr($str, 0, 3); + if ($char == "%20") { return array("+", 2); } + + $char = substr($str, 0, 1); + + if ($char == "!") { return array("%21", 0); } + if ($char == "#") { return array("%23", 0); } + if ($char == "$") { return array("%24", 0); } + if ($char == "&") { return array("%26", 0); } + if ($char == "\"") { return array("%27", 0); } + if ($char == "(") { return array("%28", 0); } + if ($char == ")") { return array("%29", 0); } + if ($char == "*") { return array("%2A", 0); } + if ($char == "+") { return array("%2B", 0); } + if ($char == ",") { return array("%2C", 0); } + if ($char == "/") { return array("%2F", 0); } + if ($char == ":") { return array("%3A", 0); } + if ($char == ";") { return array("%3B", 0); } + if ($char == "=") { return array("%3D", 0); } + if ($char == "?") { return array("%3F", 0); } + if ($char == "@") { return array("%40", 0); } + if ($char == "~") { return array("%7E", 0); } + + if ($char == "%") { + return array(substr($str, 0, 3), 2); + } else { + return array($char, 0); + } +} + +function escape($string) { + $result = ""; + for ($i = 0; $i < strlen($string); $i++) { + $result .= escapebycharacter(urlencode($string[$i])); + } + return $result; +} + +function escapebycharacter($char) { + if ($char == '+') { return '%20'; } + if ($char == '%2A') { return '*'; } + if ($char == '%2B') { return '+'; } + if ($char == '%2F') { return '/'; } + if ($char == '%40') { return '@'; } + if ($char == '%80') { return '%u20AC'; } + if ($char == '%82') { return '%u201A'; } + if ($char == '%83') { return '%u0192'; } + if ($char == '%84') { return '%u201E'; } + if ($char == '%85') { return '%u2026'; } + if ($char == '%86') { return '%u2020'; } + if ($char == '%87') { return '%u2021'; } + if ($char == '%88') { return '%u02C6'; } + if ($char == '%89') { return '%u2030'; } + if ($char == '%8A') { return '%u0160'; } + if ($char == '%8B') { return '%u2039'; } + if ($char == '%8C') { return '%u0152'; } + if ($char == '%8E') { return '%u017D'; } + if ($char == '%91') { return '%u2018'; } + if ($char == '%92') { return '%u2019'; } + if ($char == '%93') { return '%u201C'; } + if ($char == '%94') { return '%u201D'; } + if ($char == '%95') { return '%u2022'; } + if ($char == '%96') { return '%u2013'; } + if ($char == '%97') { return '%u2014'; } + if ($char == '%98') { return '%u02DC'; } + if ($char == '%99') { return '%u2122'; } + if ($char == '%9A') { return '%u0161'; } + if ($char == '%9B') { return '%u203A'; } + if ($char == '%9C') { return '%u0153'; } + if ($char == '%9E') { return '%u017E'; } + if ($char == '%9F') { return '%u0178'; } + return $char; +} + +function unescape($string) { + $result = ""; + for ($i = 0; $i < strlen($string); $i++) { + $decstr = ""; + for ($p = 0; $p <= 5; $p++) { + $decstr .= $string[$i+$p]; + } + list($decodedstr, $num) = unescapebycharacter($decstr); + $result .= urldecode($decodedstr); + $i += $num ; + } + return $result; +} + +function unescapebycharacter($str) { + + $char = $str; + + if ($char == '%u20AC') { return array("%80", 5); } + if ($char == '%u201A') { return array("%82", 5); } + if ($char == '%u0192') { return array("%83", 5); } + if ($char == '%u201E') { return array("%84", 5); } + if ($char == '%u2026') { return array("%85", 5); } + if ($char == '%u2020') { return array("%86", 5); } + if ($char == '%u2021') { return array("%87", 5); } + if ($char == '%u02C6') { return array("%88", 5); } + if ($char == '%u2030') { return array("%89", 5); } + if ($char == '%u0160') { return array("%8A", 5); } + if ($char == '%u2039') { return array("%8B", 5); } + if ($char == '%u0152') { return array("%8C", 5); } + if ($char == '%u017D') { return array("%8E", 5); } + if ($char == '%u2018') { return array("%91", 5); } + if ($char == '%u2019') { return array("%92", 5); } + if ($char == '%u201C') { return array("%93", 5); } + if ($char == '%u201D') { return array("%94", 5); } + if ($char == '%u2022') { return array("%95", 5); } + if ($char == '%u2013') { return array("%96", 5); } + if ($char == '%u2014') { return array("%97", 5); } + if ($char == '%u02DC') { return array("%98", 5); } + if ($char == '%u2122') { return array("%99", 5); } + if ($char == '%u0161') { return array("%9A", 5); } + if ($char == '%u203A') { return array("%9B", 5); } + if ($char == '%u0153') { return array("%9C", 5); } + if ($char == '%u017E') { return array("%9E", 5); } + if ($char == '%u0178') { return array("%9F", 5); } + + $char = substr($str, 0, 3); + if ($char == "%20") { return array("+", 2); } + + $char = substr($str, 0, 1); + + if ($char == '*') { return array("%2A", 0); } + if ($char == '+') { return array("%2B", 0); } + if ($char == '/') { return array("%2F", 0); } + if ($char == '@') { return array("%40", 0); } + + if ($char == "%") { + return array(substr($str, 0, 3), 2); + } else { + return array($char, 0); + } +} + /*!\brief When data are transfered thanks ajax in a xml document, the xml + * can not contains some character, to escape those characters, we must use this + * function + *\param $p_xml the xml to escape + *\return the xml string with the forbidden char escaped + *\see ajax_card.js ajaxFid + */ +function escape_xml($p_xml) { + $xml=$p_xml; + $xml=str_replace('&','&',$xml); + $xml=str_replace('<','<',$xml); + $xml=str_replace('>','>',$xml); + $xml=str_replace("'",''',$xml); + $xml=str_replace('"','"',$xml); + return $xml; +} +?> diff --git a/include/header_print.php b/include/header_print.php index c41abe16b..f22d927f3 100644 --- a/include/header_print.php +++ b/include/header_print.php @@ -25,7 +25,7 @@ * */ -require_once ('postgres.php'); +require_once ('class_database.php'); require_once ('debug.php'); require_once ('class.ezpdf.php'); require_once ('class_own.php'); @@ -37,7 +37,7 @@ function header_pdf($p_cn,&$p_pdf) { $own=new own($p_cn); $soc=$own->MY_NAME; $date=date('d / m / Y H:i '); - $dossier=" Dossier : ".dossier::name(); + $dossier=" Dossier : ".utf8_decode(dossier::name()); $p_pdf->ezText($dossier." ".$soc." ".$date,9); } function header_txt($p_cn) { @@ -45,7 +45,7 @@ function header_txt($p_cn) { $soc=$own->MY_NAME; $date=date('d / m / Y H:i '); - $dossier=" Dossier : ".dossier::name(); + $dossier=utf8_decode(" Dossier : ".dossier::name()); return $dossier." ".$soc." ".$date; } diff --git a/include/import_inc.php b/include/import_inc.php index 41455715c..f21486e1d 100644 --- a/include/import_inc.php +++ b/include/import_inc.php @@ -23,16 +23,33 @@ // Modified Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ include_once("jrn.php"); -include_once("preference.php"); include_once("user_common.php"); +require_once("class_icard.php"); +require_once("class_iconcerned.php"); +require_once("class_ispan.php"); +require_once("class_iselect.php"); require_once('class_user.php'); -require_once('class_widget.php'); require_once('class_fiche.php'); require_once('class_acc_ledger.php'); require_once("class_acc_parm_code.php"); require_once('class_acc_operation.php'); +require_once('class_ipopup.php'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo js_include('bq_import.js'); +echo js_include('acc_ledger.js'); + +echo JS_CARD; +echo ICard::ipopup('ipopcard'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); + /*! - ************************************************** * \brief 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 @@ -52,34 +69,19 @@ function ImportCSV($p_cn,$file,$p_bq_account,$p_format_csv,$p_jrn) die; } -StartSql($p_cn); +$p_cn->start(); // include the right format for CSV --> given by the <form require_once($p_format_csv); -echo "Importation terminée."; +echo _("Importation terminée"); // if importation succeeds then we can commit the change -Commit($p_cn); +$p_cn->commit(); } -/*!\brief Update import_tmp with the bank account - * - */ -function UpdateCSV($p_cn){ - $code=FormatString($_POST['code']); - $count=FormatString($_POST['count']); - $poste=FormatString($_POST['poste'.$count]); - $concern=FormatString($_POST['e_concerned'.$count]); - $sql = utf8_encode("update import_tmp set poste_comptable='$poste' ,status='w',". - "jr_rapt='$concern' where code='$code'"); - $Res=ExecSql($p_cn,$sql); -} - - - /*!\brief This function show a record from the table import_tmp, the tag for the form * are not included in the function and must set in the calling proc. @@ -90,48 +92,54 @@ function UpdateCSV($p_cn){ * modify the Quick Code or remove record poss.value are form, remove */ function ShowBox($p_val,$counter,$p_cn,$p_form='form'){ - $w=new widget('js_search_only'); + $w=new ICard(); + $w->jrn=$p_val['jrn']; $w->name='poste'.$counter; $w->extra='filter'; - $w->extra2='QuickCode'; - $w->label=''; + $w->typecard='cred'; + $w->set_dblclick("fill_ipopcard(this);"); + $w->set_attribute('ipopup','ipopcard'); + $w->set_callback('filter_card'); + $w->set_function('fill_data'); + $w->table=0; if ( $p_form == 'remove' ) - $w->readonly=true; + $w->readOnly=true; -$oJrn=new Acc_Ledger($p_cn,$p_val['jrn']); + $oJrn=new Acc_Ledger($p_cn,$p_val['jrn']); // widget concerned - $wConcerned=new widget('js_concerned'); + $wConcerned=new IConcerned(); $wConcerned->name="e_concerned"+$counter; $wConcerned->extra=abs($p_val['montant']); $wConcerned->extra2='paid'; - $wConcerned->label='op. concernée'; + $wConcerned->label=_('op. concernée'); $wConcerned->table=0; - $s=new widget('span'); + $wConcerned->value=$p_val['jr_rapt']; + + $s=new ISpan(); // if in readonly retrieve the conc. ope if ( $p_form== 'remove') { - $wConcerned->readonly=true; - $wConcerned->value=$p_val['jr_rapt']; + $wConcerned->readOnly=true; } if ( isset($p_val['poste_comptable'])) { $w->value=$p_val['poste_comptable']; - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $f=new fiche($p_cn); $f->get_by_qcode($p_val['poste_comptable']); $s->value=$f->strAttribut(ATTR_DEF_NAME); } echo '<input type="hidden" id="code'.$counter.'" value="'.$p_val['code'].'">'; echo '<input type="hidden" name="count" value="'.$counter.'">'; - echo widget::hidden('p_jrn',$p_val['jrn']); + echo HtmlInput::hidden('p_jrn',$p_val['jrn']); echo '<table border="1" width="500">'; echo '<tr><td width="200">'.$p_val['code'].'</td><td width="200">'.$p_val['date_exec'].'</td><td width="100">'.$p_val['montant'].' EUR</td><tr/>'; - echo "<tr><td> Journal : ".$oJrn->get_name()."</TD><TD>poste comptable Destination : ".$p_val['bq_account']."</td><tr>"; + echo "<tr><td>"._('Journal')." : ".$oJrn->get_name()."</TD><TD>"._('poste comptable Destination')." : ".$p_val['bq_account']."</td><tr>"; echo '<tr colspan="3"><td height="50" colspan="3">'.$p_val['detail'].'</td></tr>'; - echo '<tr><td colspan="3"> '.$wConcerned->IOValue("e_concerned".$counter).'</td></tr>'; - echo '<tr><td>'.$w->IOValue().' '.$s->IOValue('poste'.$counter.'_label'). + echo '<tr><td colspan="3"> '.$wConcerned->input("e_concerned".$counter).'</td></tr>'; + echo '<tr><td>'.$w->search().$w->input().' '.$s->input('poste'.$counter.'_label'). "</TD>"; echo "<td>n° compte : ".$p_val['num_compte']."</td>"; @@ -156,7 +164,7 @@ $oJrn=new Acc_Ledger($p_cn,$p_val['jrn']); dossier::id(), $counter); - echo '<td><input type="button" value="Enlever" onClick="'.$str_notconfi.'"'. + echo '<td><input type="button" value='._("Enlever").' onClick="'.$str_notconfi.'"'. '></td><tr/>'; } @@ -169,16 +177,17 @@ $oJrn=new Acc_Ledger($p_cn,$p_val['jrn']); function VerifImport($p_cn){ $sql = "select * from import_tmp where status='n' ". " order by date_exec,code"; - $Res=ExecSql($p_cn,$sql); - $Num=pg_NumRows($Res); - echo $Num." opérations à complèter.<br/><br/>"; + echo HtmlInput::phpsessid(); + $Res=$p_cn->exec_sql($sql); + $Num=Database::num_row($Res); + echo $Num._(" opérations à complèter")."<br/><br/>"; $i=1; // include javascript for popup - echo JS_SEARCH_CARD; - echo JS_CONCERNED_OP; + echo JS_CARD; + echo JS_LEDGER; echo JS_AJAX_FICHE; - echo JS_PROTOTYPE; - while($val = pg_fetch_array($Res)){ + for ( $i=0;$i< $Num;$i++){ + $val = Database::fetch_array($Res,$i); echo '<form METHOD="POST" id="form_'.$i.'"action="import.php?action=verif">'; echo dossier::hidden(); ShowBox($val,$i,$p_cn,'form'); @@ -196,13 +205,11 @@ function ConfirmTransfert($p_cn,$periode){ $sql = "select to_char(p_start,'DD-MM-YYYY') as p_start,to_char(p_end,'DD-MM-YYYY') as p_end". " from parm_periode where p_id = '".$periode."'"; - $Res=ExecSql($p_cn,$sql); - $val = pg_fetch_array($Res); + $Res=$p_cn->exec_sql($sql); + $val = Database::fetch_array($Res); if ( $val == false ) { - echo "<script>". - "alert ('Vous devez selectionner votre période dans vos préférences');". - "</script>"; + alert (_('Vous devez selectionner votre période dans vos préférences')); exit(); } $start ="to_date('".$val['p_start']."','DD-MM-YYYY')"; @@ -212,27 +219,30 @@ function ConfirmTransfert($p_cn,$periode){ " montant,num_compte,poste_comptable,bq_account,jrn,detail,jr_rapt ". " from import_tmp where status = 'w' AND date_exec BETWEEN ".$start." and ".$end; - + - $Res=ExecSql($p_cn,$sql); - $Num=pg_NumRows($Res); - echo $Num." opérations à transfèrer.<br/><br/>"; + $Res=$p_cn->exec_sql($sql); + $Num=Database::num_row($Res); + echo $Num." "._("opérations à transfèrer")."<br/><br/>"; if ( $Num == 0 ) return; - $i=1; - while($val = pg_fetch_array($Res)){ + for ( $i=0;$i<$Num;$i++){ + $val = Database::fetch_array($Res,$i); echo '<form method="post" id="form_'.$i.'" action="import.php">'; echo dossier::hidden(); echo '<input type="hidden" name="action" value="remove">'; ShowBox($val,$i,$p_cn,'remove'); echo '</form>'; - $i++; } echo '<form method="post" id="form_'.$i.'" action="import.php">'; echo dossier::hidden(); - echo '<input type="hidden" name="action" value="transfer">'; - echo '<input type="submit" name="sub" value="Commencer le transfert">'; + /* to avoid double post */ + $mt=microtime(true); + echo HtmlInput::hidden('mt',$mt); + echo HtmlInput::hidden("action" ,"transfer"); + echo HtmlInput::hidden("period" ,$periode); + echo HtmlInput::submit("sub",_("Commencer le transfert")); echo '</form>'; } @@ -254,13 +264,11 @@ function TransferCSV($p_cn, $periode){ $sql = "select to_char(p_start,'DD-MM-YYYY') as p_start,to_char(p_end,'DD-MM-YYYY') as p_end". " from parm_periode where p_id = '".$periode."'"; - $Res=ExecSql($p_cn,$sql); - $val = pg_fetch_array($Res); + $Res=$p_cn->exec_sql($sql); + $val = Database::fetch_array($Res); if ( $val == false ) { - echo "<script>". - "alert ('Vous devez selectionner votre période dans vos préférences');". - "</script>"; + alert (_('Vous devez selectionner votre période dans vos préférences')); exit(); } @@ -273,12 +281,12 @@ function TransferCSV($p_cn, $periode){ try { - StartSql($p_cn); - $ResAll=ExecSql($p_cn,$sql); - $Max=pg_NumRows($ResAll); + $p_cn->start(); + $ResAll=$p_cn->exec_sql($sql); + $Max=Database::num_row($ResAll); echo $Max." opérations à transférer.<br/>"; for ($i = 0;$i < $Max;$i++) { - $val=pg_fetch_array($ResAll,$i); + $val=Database::fetch_array($ResAll,$i); $code=$val['code']; $date_exec=$val['date_exec']; @@ -299,28 +307,27 @@ function TransferCSV($p_cn, $periode){ $f->get_by_qcode($bq_account); $bq_poste=$f->strAttribut(ATTR_DEF_ACCOUNT); // Vérification que le poste comptable trouvé existe - if ( $poste_comptable == '- ERROR -') + if ( $poste_comptable == '- ERROR -' || strlen(trim($poste_comptable))==0) $test=0; else { - $sqltest = "select * from tmp_pcmn WHERE pcm_val='".$poste_comptable."'"; - - $Restest=ExecSql($p_cn,$sqltest); - $test=pg_NumRows($Restest); + $sqltest = "select * from tmp_pcmn WHERE pcm_val=$1"; + $Restest=$p_cn->exec_sql($sqltest,array($poste_comptable)); + $test=Database::num_row($Restest); } // Test it if($test == 0) { - $sqlupdate = "update import_tmp set status='n' WHERE code='".$code."' AND num_compte='".$num_compte."' or num_compte is null"; - $Resupdate=ExecSql($p_cn,$sqlupdate); - echo "Poste comptable erronné pour l'opération ".$num_compte."-".$code.", réinitialisation du poste comptable<br/>"; + $sqlupdate = "update import_tmp set status='n' WHERE code=$1 or num_compte is null"; + $Resupdate=$p_cn->exec_sql($sqlupdate,array($code)); + echo _("Poste comptable erronné pour l'opération ").$num_compte."-".$code.", ".("réinitialisation du poste comptable")."<br/>"; continue; } // Finances - $seq=NextSequence($p_cn,'s_grpt'); + $seq=$p_cn->get_next_seq('s_grpt'); $p_user = $_SESSION['g_user']; $acc_op=new Acc_Operation($p_cn); @@ -334,6 +341,7 @@ function TransferCSV($p_cn, $periode){ $acc_op->jrn=$jrn; $acc_op->periode=$periode; $acc_op->qcode=$bq_account; + $acc_op->mt=$_REQUEST['mt']; $r=$acc_op->insert_jrnx(); @@ -354,7 +362,7 @@ function TransferCSV($p_cn, $periode){ $internal=$oJrn->compute_internal_code($seq); - $Res=ExecSql($p_cn,"update jrn set jr_internal='".$internal."' where ". + $Res=$p_cn->exec_sql("update jrn set jr_internal='".$internal."' where ". " jr_id = ".$jr_id); // insert rapt @@ -362,60 +370,47 @@ function TransferCSV($p_cn, $periode){ $acc_reconc->set_jr_id=$jr_id; $acc_reconc->insert($jr_rapt); - echo "Tranfert de l'opération ".$code." effectué<br/>"; + echo _("Tranfert de l'opération ").$code._(" effectué")."<br/>"; $sql2 = "update import_tmp set status='t' where code='".$code."'"; - $Res2=ExecSql($p_cn,$sql2); + $Res2=$p_cn->exec_sql($sql2); } } catch (Exception $e) { - Rollback($p_cn); + $p_cn->rollback(); echo '<span class="error">'. 'Erreur dans '.__FILE__.':'.__LINE__. ' Message = '.$e->getMessage(). '</span>'; } - Commit($p_cn); + $p_cn->commit(); } /*! -************************************************** * \brief ShowForm for getting data about * the bank transfert in cvs * * \param $p_cn database connection -* -* \return none */ function ShowFormTransfert($p_cn){ -$w=new widget("select"); +$w=new ISelect(); echo '<FORM METHOD="POST" action="import.php?action=import" enctype="multipart/form-data">'; echo dossier::hidden(); echo '<INPUT TYPE="file" name="fupload" size="20"><br>'; // ask for the journal target - $jrn=make_array ($p_cn,"select jrn_def_id,jrn_def_name from jrn_def where jrn_def_type='FIN';"); - $w->label='Journal'; - echo $w->label." :".$w->IOValue('import_jrn',$jrn)."<br>"; + $jrn=$p_cn->make_array ("select jrn_def_id,jrn_def_name from jrn_def where jrn_def_type='FIN';"); + $w->label=_('Journal'); + echo $w->label." :".$w->input('import_jrn',$jrn)."<br>"; // choose the bank account $banque=new Acc_Parm_Code($p_cn,'BANQUE'); - $bq=make_array($p_cn,"select j_qcode,vw_name from vw_poste_qcode join vw_fiche_attr on (j_qcode=quick_code) where j_poste::text like '".$banque->p_value."%'"); + $bq=$p_cn->make_array("select j_qcode,vw_name from vw_poste_qcode join vw_fiche_attr on (j_qcode=quick_code) where j_poste::text like '".$banque->p_value."%'"); $w->label='Banque'; - echo "Compte en banque :".$w->IOValue('import_bq',$bq)."<br>"; - $format_csv=make_array($p_cn,"select include_file,name from format_csv_banque;"); + echo "Compte en banque :".$w->input('import_bq',$bq)."<br>"; + $format_csv=$p_cn->make_array("select include_file,name from format_csv_banque;"); $w->label="Format import"; - echo $w->label.$w->IOValue('format_csv',$format_csv).'<br>'; - echo '<INPUT TYPE="SUBMIT" Value="Import fiche">'; + echo $w->label.$w->input('format_csv',$format_csv).'<br>'; + echo HtmlInput::submit("Import fiche",_("Import fiche")); echo '</FORM>'; } -/*!\brief RemoveRow put a flag delete on a row of the table import_tmp - * (import_tmp.status) - * \param $p_cn database connection - * \param $p_code import_tmp.code must be unique - */ -function DropRecord($p_cn,$p_code) -{ - ExecSql($p_cn,"update import_tmp set status='d' where code='".$p_code."'"); -} - ?> diff --git a/include/impress.inc.php b/include/impress.inc.php index 0ba3e1170..cd875fd00 100644 --- a/include/impress.inc.php +++ b/include/impress.inc.php @@ -23,20 +23,19 @@ /*! \file * \brief Main page for the printing */ -require_once("check_priv.php"); $str_dossier=dossier::get(); // show sub menu echo "<DIV class=\"u_subtmenu\">"; echo JS_AJAX_FICHE; -$p_array=array(array ("?p_action=impress&type=jrn&".$str_dossier,"Journaux"), - array("?p_action=impress&type=poste&".$str_dossier,"Poste"), - array("?p_action=impress&type=fiche&".$str_dossier,"Fiche"), - array("?p_action=impress&type=rapport&".$str_dossier,"Rapport"), - array('?p_action=impress&type=bal&'.$str_dossier,'Balance des comptes'), - array("?p_action=impress&type=bilan&".$str_dossier,"Bilan"), - array("?p_action=impress&type=list_client&".$str_dossier,"Liste Clients Assujettis") +$p_array=array(array ("?p_action=impress&type=jrn&".$str_dossier,_("Journaux")), + array("?p_action=impress&type=poste&".$str_dossier,_("Poste")), + array("?p_action=impress&type=fiche&".$str_dossier,_("Fiche")), + array("?p_action=impress&type=rapport&".$str_dossier,_("Rapport")), + array('?p_action=impress&type=bal&'.$str_dossier,_('Balance des comptes')), + array("?p_action=impress&type=bilan&".$str_dossier,_("Bilan")), + array("?p_action=impress&type=list_client&".$str_dossier,_("Liste Clients Assujettis")) ); $default=( isset ($_GET['type']))?"?p_action=impress&type=".$_GET['type']."&$str_dossier":""; @@ -45,7 +44,7 @@ $result=ShowItem($p_array,'H',"mtitle","mtitle",$default,' width="100%"'); echo $result; echo "</DIV>"; -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include_once("impress_inc.php"); diff --git a/include/impress_bilan.inc.php b/include/impress_bilan.inc.php index 6b08e39e8..22c03aee0 100644 --- a/include/impress_bilan.inc.php +++ b/include/impress_bilan.inc.php @@ -29,8 +29,8 @@ require_once ('class_acc_bilan.php'); //----------------------------------------------------- // Show the jrn and date //----------------------------------------------------- -include_once("postgres.php"); -/*$ret=make_array($cn,"select fr_id,fr_label +require_once('class_database.php'); +/*$ret=$cn->make_array("select fr_id,fr_label from formdef order by fr_label"); */ @@ -42,11 +42,11 @@ $bilan=new Acc_Bilan($cn); echo '<div class="content">'; echo '<FORM METHOD="GET">'; -echo widget::hidden('p_action','impress'); -echo widget::hidden('type','bilan'); +echo HtmlInput::hidden('p_action','impress'); +echo HtmlInput::hidden('type','bilan'); echo dossier::hidden(); echo $bilan->display_form ($filter_year); -echo widget::submit('verif','Verification comptabilite'); +echo HtmlInput::submit('verif','Verification comptabilite'); echo '</FORM>'; @@ -58,11 +58,11 @@ if ( isset($_GET['verif'])) { require_once ('verif_bilan.inc.php'); echo '<FORM METHOD="GET" ACTION="bilan.php">'; echo dossier::hidden(); - echo widget::hidden('b_id',$bilan->id); + echo HtmlInput::hidden('b_id',$bilan->id); - echo widget::hidden('from_periode',$bilan->from); - echo widget::hidden('to_periode',$bilan->to); - echo widget::submit('Impression','Impression'); + echo HtmlInput::hidden('from_periode',$bilan->from); + echo HtmlInput::hidden('to_periode',$bilan->to); + echo HtmlInput::submit('Impression','Impression'); echo '</form>'; } diff --git a/include/impress_fiche.inc.php b/include/impress_fiche.inc.php index 816d9ba0b..6b4ab0c67 100644 --- a/include/impress_fiche.inc.php +++ b/include/impress_fiche.inc.php @@ -21,11 +21,11 @@ /*!\file * \brief printing of card */ -include_once('postgres.php'); +include_once('class_database.php'); include_once('class_fiche.php'); -include_once("class_widget.php"); + $gDossier=dossier::id(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); //----------------------------------------------------- if ( isset ($_REQUEST['fd_id'])) { @@ -35,24 +35,23 @@ if ( isset ($_REQUEST['fd_id'])) { include_once("class_acc_account_ledger.php"); echo '<div class="content">'; - $submit=new widget(); - $hid=new widget("hidden"); - $fiche_id=new widget("hidden"); - $w=new widget("select"); + $hid=new IHidden(); + $fiche_id=new IHidden(); + $w=new ISelect(); $fiche_def=new fiche_def($cn); echo '<form method="POST" ACTION="fiche_csv.php">'.dossier::hidden(). - widget::submit('bt_csv',"Export CSV"). - $hid->IOValue("type","fiche"). - $hid->IOValue("p_action","impress"). - $fiche_id->IOValue("fd_id",$_REQUEST['fd_id']); + HtmlInput::submit('bt_csv',"Export CSV"). + $hid->input("type","fiche"). + $hid->input("p_action","impress"). + $fiche_id->input("fd_id",$_REQUEST['fd_id']); if ($with_amount) { - echo $hid->IOValue("with_amount"); - echo $hid->IOValue("from_periode",$_REQUEST['from_periode']); - echo $hid->IOValue("to_periode",$_REQUEST['to_periode']); + echo $hid->input("with_amount"); + echo $hid->input("from_periode",$_REQUEST['from_periode']); + echo $hid->input("to_periode",$_REQUEST['to_periode']); } echo "</form>"; - echo '<form method="Post" action="?p_action=impress&type=fiche">'.widget::submit("bt_submit","Autres fiches").dossier::hidden()."</form>"; + echo '<form method="Post" action="?p_action=impress&type=fiche">'.HtmlInput::submit("bt_submit","Autres fiches").dossier::hidden()."</form>"; $fiche_def->id=$_REQUEST['fd_id']; @@ -64,19 +63,19 @@ if ( isset ($_REQUEST['fd_id'])) { // filter on the current year $filter_year=" where p_exercice='".$User->get_exercice()."'"; - $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); + $periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); $w->selected=(isset($_POST['from_periode']))?$_POST['from_periode']:""; - print "Depuis ".$w->IOValue('from_periode',$periode_start); - $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); + print "Depuis ".$w->input('from_periode',$periode_start); + $periode_end=$cn->make_array("select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); $w->selected=(isset($_POST['to_periode']))?$_POST['to_periode']:""; - print " Jusque ".$w->IOValue('to_periode',$periode_end); + print " Jusque ".$w->input('to_periode',$periode_end); - print widget::submit('bt_solde',"Avec solde"). - $hid->IOValue("type","fiche"). - $fiche_id->IOValue("fd_id",$_REQUEST['fd_id']). - $hid->IOValue("with_amount"); + print HtmlInput::submit('bt_solde',"Avec solde"). + $hid->input("type","fiche"). + $fiche_id->input("fd_id",$_REQUEST['fd_id']). + $hid->input("with_amount"); echo '<p><i> Attention: les soldes ne tiennent pas compte des journaux OD qui '. 'n\'utilisent pas les quick codes, les soldes des postes sont dans impression->poste</i></p>'; diff --git a/include/impress_inc.php b/include/impress_inc.php index a860d0e0e..c6f7f1d4b 100644 --- a/include/impress_inc.php +++ b/include/impress_inc.php @@ -23,329 +23,8 @@ * \brief contains function for the printing * \todo the functions of impress_inc.php should be replaced in a OO way */ +require_once('class_periode.php'); -/*! - * \brief Get dat for poste - * - * \param connection - * \param condition - * \param position - * - */ -function get_dataPoste($p_cn,$p_poste,$p_condition) -{ - $Res=ExecSql($p_cn,"select to_char(j_date,'DD.MM.YYYY') as j_date,". - "case when j_debit='t' then to_char(j_montant,'999999999.99') else ' ' end as deb_montant,". - "case when j_debit='f' then to_char(j_montant,'999999999.99') else ' ' end as cred_montant,". - " jr_comment as description,jrn_def_name as jrn_name,". - "j_debit, jr_internal ". - " from jrnx left join jrn_def on jrn_def_id=j_jrn_def ". - " left join jrn on jr_grpt_id=j_grpt". - " where j_poste=".$p_poste." and ".$p_condition. - " order by j_date::date"); - $array=array(); - $tot_cred=0; - $tot_deb=0; - $Max=pg_NumRows($Res); - if ( $Max == 0 ) return null; - for ($i=0;$i<$Max;$i++) { - $array[]=pg_fetch_array($Res,$i); - if ($array[$i]['j_debit']=='t') { - $tot_deb+=$array[$i]['deb_montant'] ; - } else { - $tot_cred+=$array[$i]['cred_montant'] ; - } - } - return array($array,$tot_deb,$tot_cred); -} -/*! - * \brief Get data from the jrn table - * - * \param connection - * \param array periode - * \param filter (default = YES) - * \return error code if something code wrong - * otherwise the result - * - */ -function get_dataJrn($p_cn,$p_array,$filter=YES) -{ - if ( !isset ($p_array['periode']) ) return NO_PERIOD_SELECTED; - - if ( $filter==YES) { - if ( ! isset ( $p_array['central'])){ - $cond=CreatePeriodeCond($p_array['periode']); - $Res=ExecSql($p_cn,"select to_char(j_date,'DD.MM.YYYY') as j_date, - j_montant as montant,j_debit as debit,j_poste as poste,". - "j_text as description,j_grpt as grp,jr_comment as comment, - j_rapt as oc,jr_internal from jrnx left join jrn on ". - "jr_grpt_id=j_grpt where j_jrn_def=".$p_array['p_id']. - " and ".$cond." order by j_date::date,j_grpt,j_debit desc"); - } else { - // create - $cond=CreatePeriodeCond($p_array['periode'],"c_periode"); - - $Res=ExecSql($p_cn,"select to_char(c_date,'DD.MM.YYYY') as j_date, - c_montant as montant,c_debit as debit,c_poste as poste,". - "c_description as description,c_grp as grp,c_comment as comment, - c_rapt as oc,c_internal as jr_internal from centralized left join jrn on ". - "jr_grpt_id=c_grp where c_jrn_def=".$p_array['p_id']." and ". - $cond." order by c_id,c_date,c_grp,c_debit desc"); - } - - } // if filter == YES - if ( $filter == NO) { - if ( ! isset ($p_array['central']) ) { - $cond=CreatePeriodeCond($p_array['periode']); - $Res=ExecSql($p_cn,"select to_char(j_date,'DD.MM.YYYY') as j_date, - j_montant as montant,j_debit as debit,j_poste as poste,". - "j_text as description,j_grpt as grp,jr_comment as comment, - j_rapt as oc,jr_internal from jrnx left join jrn on ". - "jr_grpt_id=j_grpt where ". - $cond." order by j_date::date,j_grpt,j_debit desc"); - } else { - $cond=CreatePeriodeCond($p_array['periode'],"c_periode"); - - $Res=ExecSql($p_cn,"select to_char(c_date,'DD.MM.YYYY') as j_date, - c_montant as montant,c_debit as debit,c_poste as poste,". - "c_description as description,c_grp as grp,c_comment as comment, - c_rapt as oc,c_internal as jr_internal from centralized left join jrn on ". - "jr_grpt_id=c_grp where ". - $cond." order by c_id,c_date,c_grp,c_debit desc"); - - } - }// filter == no - $array=array(); - $Max=pg_NumRows($Res); - for ($i=0;$i<$Max;$i++) { - $array[]=pg_fetch_array($Res,$i); - } - return $array; -} -/*! \function CreatePeriodeCond - * \brief Create the sql query for the periode - * - * \param p_periode - * \param p_field (default = j_tech_per) - * \return a string containing the query - * - */ -function CreatePeriodeCond($p_periode,$p_field=" j_tech_per") -{ - if ( count($p_periode) == 1) { - return $p_field."=".$p_periode[0]; - } - - $cond_periode=" $p_field in ("; - // condition periode - $old=0; - $follow=0; - foreach ( $p_periode as $per) { - if ( $old == 0) { - $old=$per; - $follow=1; - continue; - } - if ( $per == $old+1 ) { - $old=$per; - $follow++; - } - - }// foreach - if ( count($p_periode) == $follow) { - $cond=$p_field." >= ".$p_periode[0].' and '.$p_field.' <= '.$p_periode[count($p_periode)-1]; - return $cond; - } - - // condition periode - foreach ( $p_periode as $per) { - $cond_periode.=$per.","; - } - $cond_periode=substr($cond_periode,0,strlen($cond_periode)-1); - $cond_periode.=")"; - return $cond_periode; -} -/*! - * \brief Get The data for the pdf printing - * \param connection - * \param array - * \param p_limit starting line - * \param p_offset number of lines - * \return Array with the asked data - * - */ -function get_dataJrnPdf($p_cn,$p_array,$p_limit,$p_offset) -{ - echo_debug('impress_inc.php',__LINE__,"get_dataJrnPdf"); - - if ( !isset ($p_array['periode']) ) return NO_PERIOD_SELECTED; - - if ( $p_array['filter']==YES) { - $cond=CreatePeriodeCond($p_array['periode']); - if ( ! isset ($p_array['central']) ) { - // Journaux non centralisés - $Res=ExecSql($p_cn,"select j_id,to_char(j_date,'DD.MM.YYYY') as j_date, - jr_internal, - case j_debit when 't' then j_montant::text else ' ' end as deb_montant, - case j_debit when 'f' then j_montant::text else ' ' end as cred_montant, - j_debit as debit,j_poste as poste,jr_montant , ". - "pcm_lib as description,j_grpt as grp,jr_comment , - jr_rapt as oc, j_tech_per as periode from jrnx left join jrn on ". - "jr_grpt_id=j_grpt ". - " left join tmp_pcmn on pcm_val=j_poste ". - " where j_jrn_def=".$p_array['p_id']. - " and ".$cond." order by j_date::date asc,jr_internal,j_debit desc". - " limit ".$p_limit." offset ".$p_offset); - }else { - // Journaux centralisés - $cond=CreatePeriodeCond($p_array['periode'],"c_periode"); - $Sql="select c_id as j_id, - c_j_id, - to_char (c_date,'DD.MM.YYYY') as j_date , - c_internal as jr_internal, - case c_debit when 't' then c_montant::text else ' ' end as deb_montant, - case c_debit when 'f' then c_montant::text else ' ' end as cred_montant, - c_debit as j_debit, - c_poste as poste, - pcm_lib as description, - jr_comment, - jr_montant, - c_grp as grp, - c_comment as comment, - c_rapt as oc, - c_periode as periode - from centralized left join jrn on ". - "jr_grpt_id=c_grp left join tmp_pcmn on pcm_val=c_poste where ". - " c_jrn_def=".$p_array['p_id']." and ". - $cond." order by c_id "; - $Res=ExecSql($p_cn,$Sql." limit ".$p_limit." offset ".$p_offset); - - } - } else { - // Grand Livre - if (! isset($p_array['central'])) { - // Non centralisé - $cond=CreatePeriodeCond($p_array['periode']); - $Res=ExecSql($p_cn,"select j_id,to_char(j_date,'DD.MM.YYYY') as j_date, - jr_internal, - case j_debit when 't' then j_montant::text else ' ' end as deb_montant, - case j_debit when 'f' then j_montant::text else ' ' end as cred_montant, - j_debit as debit,j_poste as poste,". - "pcm_lib as description,j_grpt as grp,jr_comment as jr_comment, - jr_montant, - jr_rapt as oc, j_tech_per as periode from jrnx left join jrn on ". - "jr_grpt_id=j_grpt left join tmp_pcmn on pcm_val=j_poste where ". - " ".$cond." order by j_date::date,j_grpt,j_debit desc". - " limit ".$p_limit." offset ".$p_offset); - - } else { - // Centralisé - $cond=CreatePeriodeCond($p_array['periode'],"c_periode"); - $Sql="select c_id as j_id, - c_j_id, - to_char (c_date,'DD.MM.YYYY') as j_date , - c_internal as jr_internal, - case c_debit when 't' then c_montant::text else ' ' end as deb_montant, - case c_debit when 'f' then c_montant::text else ' ' end as cred_montant, - c_debit as j_debit, - c_poste as poste, - pcm_lib as description, - jr_comment, - jr_montant, - c_grp as grp, - c_comment as comment, - c_rapt as oc, - c_periode as periode - from centralized left join jrn on ". - "jr_grpt_id=c_grp left join tmp_pcmn on pcm_val=c_poste where ". - $cond." order by c_id "; - $Res=ExecSql($p_cn,$Sql." limit ".$p_limit." offset ".$p_offset); - } // Grand Livre - } - - - $array=array(); - $Max=pg_NumRows($Res); - if ($Max==0) return null; - $case=""; - $tot_deb=0; - $tot_cred=0; - for ($i=0;$i<$Max;$i++) { - $line=pg_fetch_array($Res,$i); - $mont_deb=($line['deb_montant']!=0)?sprintf("% 8.2f",$line['deb_montant']):""; - $mont_cred=($line['cred_montant']!=0)?sprintf("% 8.2f",$line['cred_montant']):""; - $jr_montant=($line['jr_montant']!=0)?sprintf("% 8.2f",$line['jr_montant']):""; - $tot_deb+=$line['deb_montant']; - $tot_cred+=$line['cred_montant']; - echo_debug('impress_inc.php',__LINE__," GetJrnDataPdf : mont_Deb ".$mont_deb); - echo_debug('impress_inc.php',__LINE__," GetJrnDataPdf : mont_cred ".$mont_cred); - - if ( $case != $line['grp'] ) { - $case=$line['grp']; - $array[]=array ( - 'j_id'=>$line['j_id'], - 'j_date' => $line['j_date'], - 'internal'=>$line['jr_internal'], - 'deb_montant'=>'', - 'cred_montant'=>'<b><i>'.$jr_montant.'</i></b>', - 'description'=>'<b><i>'.$line['jr_comment'].'</i></b>', - 'poste' => $line['oc'], - 'periode' =>$line['periode'] ); - - $array[]=array ( - 'j_id'=>$line['j_id'], - 'j_date' => '', - 'internal'=>'', - 'deb_montant'=>$mont_deb, - 'cred_montant'=>$mont_cred, - 'description'=>$line['description'], - 'poste' => $line['poste'], - 'periode' => $line['periode'] - ); - - }else { - $array[]=array ( - 'j_id'=>$line['j_id'], - 'j_date' => '', - 'internal'=>'', - 'deb_montant'=>$mont_deb, - 'cred_montant'=>$mont_cred, - 'description'=>$line['description'], - 'poste' => $line['poste'], - 'periode' => $line['periode']); - - } - - - } - echo_debug('impress_inc.php',__LINE__,"Total debit $tot_deb,credit $tot_cred"); - $a=array($array,$tot_deb,$tot_cred); - return $a; -} -/*! - * \brief - * - * \param - * - *\return - */ -function get_dataGrpt($p_cn,$p_array) -{ - if ( !isset ($p_array['periode']) ) return NO_PERIOD_SELECTED; - $cond=CreatePeriodeCond($p_array['periode']); - $Res=ExecSql($p_cn,"select distinct ". - " j_grpt as grp". - " from jrnx ". - " where j_jrn_def=".$p_array['p_id']. - " and ".$cond." order by j_grpt"); - $array=array(); - $Max=pg_NumRows($Res); - $case=""; - for ($i=0;$i<$Max;$i++) { - $array[]=pg_fetch_array($Res,$i); - } - return $array; -} /*! * \brief * \param $p_cn database connection @@ -368,13 +47,14 @@ function get_rappel_simple ($p_cn,$p_jrn_id,$p_jrn_type,$p_from,&$arap) exit; } // find the last operation of the previous periode - $min=getDbValue($p_cn,"select max (c_id) from centralized where c_jrn_def=$p_jrn_id ". + $min=$p_cn->get_value("select max (c_id) from centralized where c_jrn_def=$p_jrn_id ". " and c_date < (select p_start from parm_periode where p_id = $p_from)"); if ($min == "" ) return 0; // Find Exercice - $Exercice=get_exercice($p_cn,$p_from); + $periode=new Periode($p_cn,$p_from); + $Exercice=$periode->get_exercice(); - $a_Tva=get_array($p_cn,"select tva_id,tva_label,tva_poste from tva_rate where tva_rate != 0.0000 order by tva_id"); + $a_Tva=$p_cn->get_array("select tva_id,tva_label,tva_poste from tva_rate where tva_rate != 0.0000 order by tva_id"); // Compute VAT foreach ($a_Tva as $line_tva) @@ -384,13 +64,13 @@ function get_rappel_simple ($p_cn,$p_jrn_id,$p_jrn_type,$p_from,&$arap) $ctva=$deb; else $ctva=$cred; - $sum_deb=getDbValue($p_cn,"select sum(j_montant) from (select distinct c_internal,j_montant ". + $sum_deb=$p_cn->get_value("select sum(j_montant) from (select distinct c_internal,j_montant ". " from jrnx join centralized on (j_grpt=c_grp) ". " where c_id < $min and j_poste = '$ctva' and j_debit='t' and ". " c_jrn_def=$p_jrn_id and j_tech_per in ". " (select p_id from parm_periode where p_exercice='$Exercice') ) as w"); - $sum_cred=getDbValue($p_cn,"select sum(j_montant) from (select distinct c_internal,j_montant ". + $sum_cred=$p_cn->get_value("select sum(j_montant) from (select distinct c_internal,j_montant ". " from jrnx join centralized on (j_grpt=c_grp) ". " where c_id < $min and j_poste = '$ctva' and j_debit='f' and ". " c_jrn_def=$p_jrn_id and j_tech_per in ". @@ -402,7 +82,7 @@ function get_rappel_simple ($p_cn,$p_jrn_id,$p_jrn_type,$p_from,&$arap) $arap[$ix]=($p_jrn_type=='ACH')?$sum_deb-$sum_cred:$sum_cred-$sum_deb; } // Previous period - $previous=getDbValue($p_cn,"select max(p_id) from parm_periode where ". + $previous=$p_cn->get_value("select max(p_id) from parm_periode where ". "p_end < (select p_end from parm_periode where p_id=$p_from) ". " and p_start <= (select p_start from parm_periode where p_id=$p_from)"); @@ -429,8 +109,6 @@ function get_rappel_simple ($p_cn,$p_jrn_id,$p_jrn_type,$p_from,&$arap) */ function get_rappel($p_cn,$p_jrnx_id,$p_jrn_id,$p_exercice,$which,$p_type,$p_central) { - include_once("preference.php"); - if ( $which == LAST) $cmp="<="; else @@ -444,7 +122,7 @@ function get_rappel($p_cn,$p_jrnx_id,$p_jrn_id,$p_exercice,$which,$p_type,$p_cen // Vue filtree => Journaux & Jrn centralisé if ( $p_central == 1 ) { - $c_line=CountSql($p_cn,"select * from centralized left join parm_periode on c_periode=p_id ". + $c_line=$p_cn->count_sql("select * from centralized left join parm_periode on c_periode=p_id ". " where c_jrn_def=$p_jrn_id and p_exercice='".$p_exercice."'". " and c_order $cmp $p_jrnx_id "); @@ -456,20 +134,20 @@ function get_rappel($p_cn,$p_jrnx_id,$p_jrn_id,$p_exercice,$which,$p_type,$p_cen " where c_jrn_def=$p_jrn_id and ". " p_exercice='".$p_exercice."'". " and c_order $cmp $p_jrnx_id " ; - $Res=ExecSql($p_cn,$sql." and c_debit='t' "); - if ( pg_NumRows($Res) == 0 ) + $Res=$p_cn->exec_sql($sql." and c_debit='t' "); + if ( Database::num_row($Res) == 0 ) $deb=0; else { - $line=pg_fetch_array($Res,0); + $line=Database::fetch_array($Res,0); $deb=$line['tot_amount']; } - $Res=ExecSql($p_cn,$sql." and c_debit='f' "); - if ( pg_NumRows($Res) == 0 ) + $Res=$p_cn->exec_sql($sql." and c_debit='f' "); + if ( Database::num_row($Res) == 0 ) $cred=0; else { - $line=pg_fetch_array($Res,0); + $line=Database::fetch_array($Res,0); $cred=$line['tot_amount']; } echo_debug('impress_inc.php',__LINE__,"MONTANT $deb,$cred"); @@ -480,7 +158,7 @@ function get_rappel($p_cn,$p_jrnx_id,$p_jrn_id,$p_exercice,$which,$p_type,$p_cen } // Type = jrn if ($p_type==0 ) { // Si Grand Livre, prendre donnée centralisée{ if ( $p_central == 1) { - $c_line=CountSql($p_cn,"select * from centralized left join parm_periode on c_periode=p_id ". + $c_line=$p_cn->count_sql("select * from centralized left join parm_periode on c_periode=p_id ". "where p_exercice='".$p_exercice."'". " and c_id $cmp $p_jrnx_id "); @@ -491,20 +169,20 @@ function get_rappel($p_cn,$p_jrnx_id,$p_jrn_id,$p_exercice,$which,$p_type,$p_cen " where ". " p_exercice='".$p_exercice."'". " and c_order $cmp $p_jrnx_id " ; - $Res=ExecSql($p_cn,$sql." and c_debit='t' "); - if ( pg_NumRows($Res) == 0 ) + $Res=$p_cn->exec_sql($sql." and c_debit='t' "); + if ( Database::num_row($Res) == 0 ) $deb=0; else { - $line=pg_fetch_array($Res,0); + $line=Database::fetch_array($Res,0); $deb=$line['tot_amount']; } - $Res=ExecSql($p_cn,$sql." and c_debit='f' "); - if ( pg_NumRows($Res) == 0 ) + $Res=$p_cn->exec_sql($sql." and c_debit='f' "); + if ( Database::num_row($Res) == 0 ) $cred=0; else { - $line=pg_fetch_array($Res,0); + $line=Database::fetch_array($Res,0); $cred=$line['tot_amount']; } echo_debug('impress_inc.php',__LINE__,"MONTANT $deb,$cred"); @@ -579,6 +257,7 @@ echo_debug(__FILE__,__LINE__,"receiving $p_formula"); // then we must modify the cond for the periode $from=str_replace("FROM=","",$afrom[0]); + // Get the periode /*! \note special value for the clause FROM=00.0000 */ @@ -586,20 +265,32 @@ echo_debug(__FILE__,__LINE__,"receiving $p_formula"); // retrieve the first month of this periode $User=new User($p_cn); $user_periode=$User->get_periode(); - $periode=getDbValue($p_cn, - "select p_exercice from parm_periode where p_id=$user_periode"); - $sql_per="select to_char(p_start,'MM.YYYY') as start from parm_periode where ". - " p_exercice='".$periode."' order by p_start"; - $ret=get_array($p_cn,$sql_per); - $from=$ret[0]['start']; + $oPeriode=new Periode($p_cn); + $periode=$oPeriode->get_exercice($user_periode); + list($first,$last)=$oPeriode->get_limit($periode); + $ret=$first->get_date_limit(); + if ($ret == null ) throw new Exception ('Pas de limite à cette période',1); + $cond=sql_filter_per($p_cn,$ret['p_start'],$p_end,'date','j_tech_per'); - } - $from=getPeriodeFromMonth($p_cn,$from); + } else { + $oPeriode=new Periode($p_cn); + try { + $from=$oPeriode->find_periode('01'.$from); + } catch (Exception $exp) { + /* if none periode is found + then we take the first periode of the year + */ + $User=new User($p_cn); + $user_periode=$User->get_periode(); - // the clause from is something else - // Compute the cond - $cond=sql_filter_per($p_cn,$from,$p_end,'p_id','j_tech_per'); + $year=$oPeriode->get_exercice($user_periode); + list($first,$last)=$oPeriode->get_limit($year); + $ret=$first->get_date_limit(); + if ($ret == null ) throw new Exception ('Pas de limite à cette période',1); + $cond=sql_filter_per($p_cn,$ret['p_start'],$p_end,'date','j_tech_per'); + } + } } if ( strpos($p_formula,"FROM") != 0) { @@ -638,7 +329,7 @@ echo_debug(__FILE__,__LINE__,"p_formula = $p_formula "); while (ereg("\[([0-9]+)([Tt]*)\]",trim($p_label),$e) == true) { $nom = "!!".$e[1]."!!"; if (CheckFormula($e[0])) { - $nom = getDbValue ($p_cn, "SELECT pcm_lib AS acct_name FROM tmp_pcmn WHERE pcm_val::text LIKE $1||'%' ORDER BY pcm_val ASC LIMIT 1",array($e[1])); + $nom = $p_cn->get_value ( "SELECT pcm_lib AS acct_name FROM tmp_pcmn WHERE pcm_val::text LIKE $1||'%' ORDER BY pcm_val ASC LIMIT 1",array($e[1])); if($nom) { if($e[2] == 'T') $nom = strtoupper($nom); if($e[2] == 't') $nom = strtolower($nom); @@ -655,60 +346,6 @@ echo_debug(__FILE__,__LINE__,"p_formula = $p_formula "); return $p_formula; } } -/*! - * \brief Parse the formula contained in the fo_formula - * field and return a array containing all the columns - * - * \param $p_cn connexion - * \param $p_label - * \param $p_formula - * \return array - * - */ -function GetFormulaValue($p_cn,$p_label,$p_formula,$p_cond) -{ - $aret=array(); - $l_debit=0; - $l_credit=0; - // somme debit - $Res=ExecSql($p_cn,"select sum (j_montant) as montant from - jrnx where $p_cond and j_debit='t' and j_poste::text like '$p_formula'"); - if (pg_NumRows($Res)==0){ - $l_debit=0; - } else { - $l=pg_fetch_array($Res,0); - $l_debit=$l['montant']; - } - // somme credit - $Res=ExecSql($p_cn,"select sum (j_montant) as montant from - jrnx where $p_cond and j_debit='f' and j_poste::text like '$p_formula'"); - if (pg_NumRows($Res)==0) { - $l_credit=0; - } else { - $l=pg_fetch_array($Res,0); - $l_credit=$l['montant']; - } - - if ( $l_credit==$l_debit) { - $aret=array('desc' => $p_label, - 'montant' => '0', - 'cmontant'=>0); - } - if ( $l_credit < $l_debit) { - $l2=sprintf("% .2f",$l_debit-$l_credit); - $aret=array('desc' => $p_label, - 'montant' => $l2, - 'cmontant'=>$l2); - } - if ( $l_credit>$l_debit) { - $l2=sprintf("(% .2f)",$l_credit-$l_debit); - $aret=array('desc' => $p_label, - 'montant' => $l2, - 'cmontant'=> $l_debit-$l_credit); - - } - return $aret; -} /*! * \brief Check if formula doesn't contain * php injection diff --git a/include/impress_jrn.inc.php b/include/impress_jrn.inc.php index 86cc82992..eb65e80b7 100644 --- a/include/impress_jrn.inc.php +++ b/include/impress_jrn.inc.php @@ -22,67 +22,156 @@ * \brief ask for Printing the ledger (pdf,html) */ -include_once("class_widget.php"); +require_once("class_ihidden.php"); +require_once("class_iselect.php"); +require_once("class_icheckbox.php"); + require_once('class_dossier.php'); $gDossier=dossier::id(); +//----------------------------------------------------- +// Show the jrn and date +//----------------------------------------------------- +require_once('class_database.php'); + +if ( $User->Admin() == 0 && $User->is_local_admin()==0) { + $sql="select jrn_def_id,jrn_def_name + from jrn_def join jrn_type on jrn_def_type=jrn_type_id + join user_sec_jrn on uj_jrn_id=jrn_def_id + where + uj_login='$User->login' + and uj_priv !='X' + "; + $ret=$cn->make_array($sql); +} else { + $ret=$cn->make_array("select jrn_def_id,jrn_def_name + from jrn_def join jrn_type on jrn_def_type=jrn_type_id"); + + } + +// Count the forbidden journaux + $NoPriv=$cn->count_sql("select jrn_def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, + jrn_deb_max_line,jrn_cred_max_line + from jrn_def join jrn_type on jrn_def_type=jrn_type_id + join user_sec_jrn on uj_jrn_id=jrn_def_id + where + uj_login='$User->id' + and uj_priv ='X' + "); + // Pour voir tout les journal ? + if ( $NoPriv == 0 ) { + $a=count($ret); + $all=array('value'=>0,'label'=>'Grand Livre'); + $ret[$a]=$all; + } +if ( count($ret) < 1 ) + NoAccess(); + +//----------------------------------------------------- +// Form +//----------------------------------------------------- + +echo '<div class="content">'; +echo '<FORM METHOD="GET">'.dossier::hidden(); +echo HtmlInput::hidden('p_action','impress'); +echo HtmlInput::hidden('type','jrn'); + +echo '<TABLE ><TR>'; +$w=new ISelect(); +$w->table=1; +$label="Choississez le journal"; +$w->selected=(isset($_GET['jrn_id']))?$_GET['jrn_id']:''; +print td($label).$w->input("jrn_id",$ret); +print '</TR>'; +print '<TR>'; +// filter on the current year +$filter_year=" where p_exercice='".$User->get_exercice()."'"; + +$periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); +$w->selected=(isset($_GET['from_periode']))?$_GET['from_periode']:''; +print td('Depuis').$w->input('from_periode',$periode_start); +print '</TR>'; +print '<TR>'; + +$periode_end=$cn->make_array("select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); +$w->selected=(isset($_GET['to_periode']))?$_GET['to_periode']:''; +print td('Jusque ').$w->input('to_periode',$periode_end); +print "</TR><TR>"; +$centralise=new ICheckBox(); +print td("Depuis les journaux centralisés"); +$centralise->selected=(isset($_GET['cent']))?true:false; +print td($centralise->input('cent')); +$a=array( + array('value'=>0,'label'=>'Detaillé'), + array('value'=>1,'label'=>'Simple') + ); +$w->selected=1; +print '</TR>'; +print '<TR>'; +$w->selected=(isset($_GET['p_simple']))?$_GET['p_simple']:''; +echo td('Style d\'impression').$w->input('p_simple',$a); +print "</TR>"; +echo '</TABLE>'; +print HtmlInput::submit('bt_html','Visualisation'); + +echo '</FORM>'; + echo '<span class="notice"> Attention : en-cas d\'impression de journaux centralisés, dans le PDF, les montants débit et crédit calculés par page sont la somme des montants de la page uniquement. Si une opération est sur 2 pages ces montants diffèreront évidemment. Ces montants doivent être égaux sur la dernière page. Pour vérifier la balance, utilisez la balance des comptes ou Avancé->Vérification</span>'; + //----------------------------------------------------- // If print is asked // First time in html // after in pdf or cvs //----------------------------------------------------- -if ( isset( $_POST['bt_html'] ) ) { +if ( isset( $_REQUEST['bt_html'] ) ) { require_once("class_acc_ledger.php"); - $p_cent=( isset ( $_POST['cent']) )?'on':'off'; - // $POST=from_periode, to_periode, jrn_id, cent - $d=var_export($_POST,true); + $p_cent=( isset ( $_GET ['cent']) )?'on':'off'; + + $d=var_export($_GET,true); echo_debug('impress_jrn.php',__LINE__,$d); - $Jrn=new Acc_Ledger($cn,$_POST['jrn_id']); + $Jrn=new Acc_Ledger($cn,$_GET['jrn_id']); $Jrn->get_name(); - if ( $_POST['p_simple']==0 ) + if ( $_GET['p_simple']==0 ) { - $Row=$Jrn->get_row( $_POST['from_periode'], - $_POST['to_periode'], + $Row=$Jrn->get_row( $_GET['from_periode'], + $_GET['to_periode'], $p_cent); } else { - $Row=$Jrn->get_rowSimple($_POST['from_periode'], - $_POST['to_periode'], + $Row=$Jrn->get_rowSimple($_GET['from_periode'], + $_GET['to_periode'], $p_cent); // var_dump($Row); } $rep=""; - $submit=new widget(); - $hid=new widget("hidden"); + $hid=new IHidden(); echo '<div class="content">'; echo '<h2 class="info">'.h($Jrn->name).'</h2>'; echo "<table>"; echo '<TR>'; echo '<TD><form method="GET" ACTION="?">'.dossier::hidden(). - widget::submit('bt_other',"Autre journal"). - $hid->IOValue("type","jrn").$hid->IOValue('p_action','impress')."</form></TD>"; + $hid->input("type","jrn").$hid->input('p_action','impress')."</form></TD>"; echo '<TD><form method="GET" ACTION="jrn_pdf.php">'.dossier::hidden(). - widget::submit('bt_pdf',"Export PDF"). - $hid->IOValue("type","jrn"). - $hid->IOValue("p_action","impress"). - $hid->IOValue("central",$p_cent). - $hid->IOValue("jrn_id",$Jrn->id). - $hid->IOValue("from_periode",$_POST['from_periode']). - $hid->IOValue("to_periode",$_POST['to_periode']); - echo $hid->IOValue("p_simple",$_POST['p_simple']); + HtmlInput::submit('bt_pdf',"Export PDF"). + $hid->input("type","jrn"). + $hid->input("p_action","impress"). + $hid->input("central",$p_cent). + $hid->input("jrn_id",$Jrn->id). + $hid->input("from_periode",$_GET['from_periode']). + $hid->input("to_periode",$_GET['to_periode']); + echo $hid->input("p_simple",$_GET['p_simple']); echo "</form></TD>"; echo '<TD><form method="GET" ACTION="jrn_csv.php">'.dossier::hidden(). - widget::submit('bt_csv',"Export CSV"). - $hid->IOValue("type","jrn"). - $hid->IOValue("p_action","impress"). - $hid->IOValue("central",$p_cent). - $hid->IOValue("jrn_id",$Jrn->id). - $hid->IOValue("from_periode",$_POST['from_periode']). - $hid->IOValue("to_periode",$_POST['to_periode']); - echo $hid->IOValue("p_simple",$_POST['p_simple']); + HtmlInput::submit('bt_csv',"Export CSV"). + $hid->input("type","jrn"). + $hid->input("p_action","impress"). + $hid->input("central",$p_cent). + $hid->input("jrn_id",$Jrn->id). + $hid->input("from_periode",$_GET['from_periode']). + $hid->input("to_periode",$_GET['to_periode']); + echo $hid->input("p_simple",$_GET['p_simple']); echo "</form></TD>"; echo "</TR>"; @@ -94,7 +183,7 @@ require_once("class_acc_ledger.php"); echo '<TABLE class="result">'; - if ( $_POST['p_simple'] == 0 ) { + if ( $_GET['p_simple'] == 0 ) { // detailled printing //--- foreach ( $Jrn->row as $op ) { @@ -127,7 +216,7 @@ require_once("class_acc_ledger.php"); "<th> montant</th>". "</TR>"; // set a filter for the FIN - $a_parm_code=get_array($cn,"select p_value from parm_code where p_code in ('BANQUE','COMPTE_COURANT','CAISSE')"); + $a_parm_code=$cn->get_array("select p_value from parm_code where p_code in ('BANQUE','COMPTE_COURANT','CAISSE')"); $sql_fin="("; $or=""; foreach ($a_parm_code as $code) { @@ -148,7 +237,7 @@ require_once("class_acc_ledger.php"); // the credit must be negative and written in red // Get the jrn type if ( $line['jrn_def_type'] == 'FIN' ) { - $positive = CountSql($cn,"select * from jrn inner join jrnx on jr_grpt_id=j_grpt ". + $positive = $cn->count_sql("select * from jrn inner join jrnx on jr_grpt_id=j_grpt ". " where jr_id=".$line['jr_id']." and $sql_fin ". " and j_debit='f'"); @@ -168,8 +257,8 @@ require_once("class_acc_ledger.php"); echo "</table>"; // show the saldo - $solde=$Jrn->get_solde( $_POST['from_periode'], - $_POST['to_periode'], + $solde=$Jrn->get_solde( $_GET['from_periode'], + $_GET['to_periode'], $p_cent); echo "solde débiteur:".$solde[0]."<br>"; echo "solde créditeur:".$solde[1]; @@ -178,81 +267,5 @@ require_once("class_acc_ledger.php"); exit; } -//----------------------------------------------------- -// Show the jrn and date -//----------------------------------------------------- -include_once("postgres.php"); - -if ( $User->Admin() == 0 && $User->is_local_admin()==0) { - $sql="select jrn_def_id,jrn_def_name - from jrn_def join jrn_type on jrn_def_type=jrn_type_id - join user_sec_jrn on uj_jrn_id=jrn_def_id - where - uj_login='$User->login' - and uj_priv !='X' - "; - $ret=make_array($cn,$sql); -} else { - $ret=make_array($cn,"select jrn_def_id,jrn_def_name - from jrn_def join jrn_type on jrn_def_type=jrn_type_id"); - - } - -// Count the forbidden journaux - $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, - jrn_deb_max_line,jrn_cred_max_line - from jrn_def join jrn_type on jrn_def_type=jrn_type_id - join user_sec_jrn on uj_jrn_id=jrn_def_id - where - uj_login='$User->id' - and uj_priv ='X' - "); - // Pour voir tout les journal ? - if ( $NoPriv == 0 ) { - $a=count($ret); - $all=array('value'=>0,'label'=>'Grand Livre'); - $ret[$a]=$all; - } -if ( count($ret) < 1 ) - NoAccess(); -//----------------------------------------------------- -// Form -//----------------------------------------------------- -echo '<div class="content">'; -echo '<FORM ACTION="?p_action=impress&type=jrn" METHOD="POST">'.dossier::hidden(); -echo '<TABLE width="90%" align="center"><TR>'; -$w=new widget("select"); -$w->table=1; -$w->label="Choississez le journal"; -print $w->IOValue("jrn_id",$ret); -print '</TR>'; -print '<TR>'; -// filter on the current year -$filter_year=" where p_exercice='".$User->get_exercice()."'"; - -$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); -$w->label="Depuis"; -print $w->IOValue('from_periode',$periode_start); -$w->label=" jusqu'à "; -$periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); -print $w->IOValue('to_periode',$periode_end); -print "</TR><TR>"; -$centralise=new widget("checkbox"); -$centralise->label="Depuis les journaux centralisés"; -$centralise->table=1; -print $centralise->IOValue('cent'); -$a=array( - array('value'=>0,'label'=>'Detaillé'), - array('value'=>1,'label'=>'Simple') - ); -$w->selected=1; -echo $w->IOValue('p_simple',$a,'Style d\'impression'); -print "</TR>"; -echo '</TABLE>'; -print widget::submit('bt_html','Visualisation'); - -echo '</FORM>'; - echo '<span class="notice"> Attention : en-cas d\'impression de journaux centralisés, dans le PDF, les montants débit et crédit calculés par page sont la somme des montants de la page uniquement. Si une opération est sur 2 pages ces montants diffèreront évidemment. Ces montants doivent être égaux sur la dernière page. Pour vérifier la balance, utilisez la balance des comptes ou Avancé->Vérification</span>'; - echo '</div>'; ?> diff --git a/include/impress_listing_client.inc.php b/include/impress_listing_client.inc.php index 6c6aee84d..14da0052a 100644 --- a/include/impress_listing_client.inc.php +++ b/include/impress_listing_client.inc.php @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Revision$ */ -include_once("class_widget.php"); /*! \file * \brief print the listing of customer for vat */ @@ -25,12 +24,13 @@ include_once("class_widget.php"); //----------------------------------------------------- // Show the jrn and date //----------------------------------------------------- +require_once("class_iselect.php"); +require_once("class_customer.php"); //----------------------------------------------------- // Submit Html //----------------------------------------------------- if ( isset($_POST['bt_html'] )) { - require_once("class_customer.php"); $customer=new Customer($cn); $a_Res=$customer->VatListing($_POST['year']); @@ -72,7 +72,7 @@ $aPoste=array(); //----------------------------------------------------- // Form //----------------------------------------------------- -$w=new widget("select"); +$w=new ISelect(); $w->table=1; echo '<div class="u_redcontent">'; @@ -81,17 +81,17 @@ echo dossier::hidden(); echo '<TABLE>'; print '<TR>'; -$year=make_array($cn,"select distinct extract(year from jr_date), extract(year from jr_date) from jrn"); +$year=$cn->make_array("select distinct extract(year from jr_date), extract(year from jr_date) from jrn"); if ( sizeof($year) == 0 ) { echo "Aucun enregistrement dans les journaux"; exit(); } $w->label="Année concernée"; -print $w->IOValue('year',$year); +print $w->input('year',$year); print "</TR>"; echo '</TABLE>'; -print widget::submit('bt_html','Impression'); +print HtmlInput::submit('bt_html','Impression'); echo '</FORM>'; diff --git a/include/impress_poste.inc.php b/include/impress_poste.inc.php index 9947fb8bf..2e9f395d5 100644 --- a/include/impress_poste.inc.php +++ b/include/impress_poste.inc.php @@ -18,7 +18,10 @@ */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -include_once("class_widget.php"); +require_once("class_ispan.php"); +require_once("class_icard.php"); +require_once("class_iselect.php"); +require_once("class_icheckbox.php"); require_once('class_acc_operation.php'); /*! \file * \brief Print account (html or pdf) @@ -30,64 +33,102 @@ require_once('class_acc_operation.php'); //----------------------------------------------------- // Show the jrn and date //----------------------------------------------------- -include_once("postgres.php"); +require_once('class_database.php'); +echo JS_LEDGER; +echo JS_PROTOTYPE; +require_once('class_ipopup.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo js_include('card.js'); +echo js_include('acc_ledger.js'); +echo IPoste::ipopup('ipop_account'); +echo ICard::ipopup('ipopcard'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); + //----------------------------------------------------- // Form //----------------------------------------------------- echo '<div class="content">'; -echo JS_SEARCH_POSTE; -echo JS_SEARCH_CARD; -echo JS_PROTOTYPE; -echo '<FORM action="?" METHOD="GET">'; -echo widget::hidden('p_action','impress'); -echo widget::hidden('type','poste'); -echo dossier::hidden(); -echo '<TABLE><TR>'; -$span=new widget("span"); -$w=new widget("js_search_poste"); -$w->table=1; +echo '<FORM action="?" METHOD="GET">'; +echo HtmlInput::hidden('p_action','impress'); +echo HtmlInput::hidden('type','poste'); +echo dossier::hidden();echo HtmlInput::phpsessid(); +echo '<TABLE><TR>'; +$span=new ISpan(); + +$w=new IPoste('poste_id'); +$w->set_attribute('ipopup','ipop_account'); +$w->set_attribute('label','poste_id_label'); +$w->set_attribute('account','poste_id'); +$w->table=0; $w->value=(isset($_REQUEST['poste_id']))?$_REQUEST['poste_id']:""; $w->label="Choississez le poste"; -print $w->IOValue("poste_id"); -echo $span->IOValue('poste_id_label'); -$w_poste=new widget("js_search_only"); -$w_poste->table=1; -$w_poste->label="Ou Choississez la fiche"; -$w_poste->extra='all'; +print td('Choississez un poste ').td($w->input()); +echo td($span->input('poste_id_label')); +echo '</tr><tr>'; + +$w_poste=new ICard('f_id'); +$w_poste->table=0; +$w_poste->jrn=0; +echo td("Ou choississez la fiche"); +$w_poste->set_attribute('label','f_id_label'); +$w_poste->set_attribute('ipopup','ipop_card'); +$w_poste->set_attribute('gDossier',dossier::id()); +$w_poste->set_attribute('typecard','all'); +$w_poste->set_function('fill_data'); +$w_poste->set_dblclick("fill_ipopcard(this);"); + + $w_poste->value=(isset($_REQUEST['f_id']))?$_REQUEST['f_id']:""; -print $w_poste->IOValue("f_id"); -echo $span->IOValue('f_id_label'); +print td($w_poste->search().$w_poste->input()); +echo td($span->input('f_id_label')); print '</TR>'; print '<TR>'; // filter on the current year -$select=new widget("select"); -$select->table=1; +/* +$select=new ISelect(); $filter_year=" where p_exercice='".$User->get_exercice()."'"; -$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); +$periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); $select->label="Depuis"; $select->selected=(isset($_REQUEST['from_periode']))?$_REQUEST['from_periode']:""; -print $select->IOValue('from_periode',$periode_start); +print td($select->input('from_periode',$periode_start)); $select->label=" jusqu'à "; -$periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); +$periode_end=$cn->make_array("select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); $select->selected=(isset($_REQUEST['to_periode']))?$_REQUEST['to_periode']:""; -print $select->IOValue('to_periode',$periode_end); +print td($select->input('to_periode',$periode_end)); print "</TR>"; +*/ +$date_from=new IDate('from_periode'); +$date_to=new IDate('to_periode'); +$year=$User->get_exercice(); +$date_from->value=(isset($_REQUEST['from_periode']))?$_REQUEST['from_periode']:"01.01.".$year; +$date_to->value=(isset($_REQUEST['to_periode']))?$_REQUEST['to_periode']:"31.12.".$year; +echo td(_('Depuis').$date_from->input()); +echo td(_('Jusque ').$date_to->input()); +// print "<TR><TD>"; -$all=new widget("checkbox"); +$all=new ICheckBox(); $all->label="Tous les postes qui en dépendent"; $all->disabled=false; $all->selected=(isset($_REQUEST['poste_fille']))?true:false; -echo $all->IOValue("poste_fille"); +echo $all->input("poste_fille"); echo '</TD></TR><TR><TD>'; -$detail=new widget("checkbox"); +$detail=new ICheckBox(); $detail->label="Détail des opérations"; $detail->disabled=false; $detail->selected=(isset($_REQUEST['oper_detail']))?true:false; -echo $detail->IOValue("oper_detail"); +echo $detail->input("oper_detail"); echo '</td></tr>'; echo '</TABLE>'; -print widget::submit('bt_html','Visualisation'); +print HtmlInput::submit('bt_html','Visualisation'); echo '</FORM>'; echo '<hr>'; @@ -107,11 +148,11 @@ if ( isset( $_REQUEST['bt_html'] ) ) { if ( isset ($_GET['poste_fille']) ) { $parent=$_GET['poste_id']; - $a_poste=get_array($cn,"select pcm_val from tmp_pcmn where pcm_val::text like '$parent%' order by pcm_val::text"); + $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like '$parent%' order by pcm_val::text"); $go=3; } // Check if the post is numeric and exists - elseif ( CountSql($cn,'select * from tmp_pcmn where pcm_val='.FormatString($_GET['poste_id'])) != 0 ) + elseif ( $cn->count_sql('select * from tmp_pcmn where pcm_val='.FormatString($_GET['poste_id'])) != 0 ) { $Poste=new Acc_Account_Ledger($cn,$_GET['poste_id']);$go=1; } @@ -141,10 +182,10 @@ if ( isset( $_REQUEST['bt_html'] ) ) { // Detail //---------------------------------------------------------------------- Acc_Account_Ledger::HtmlTableHeader(); - $Poste->get_row( $_GET['from_periode'], $_GET['to_periode']); + $Poste->get_row_date( $_GET['from_periode'], $_GET['to_periode']); if ( empty($Poste->row)) exit(); $Poste->load(); - echo '<table "width=70%">'; + echo '<table class="result">'; echo '<tr><td class="mtitle" colspan="5"><h2 class="info">'. $_GET['poste_id'].' '.h($Poste->label).'</h2></td></tr>'; foreach ($Poste->row as $a) { @@ -209,12 +250,12 @@ if ( isset( $_REQUEST['bt_html'] ) ) { // Detail //---------------------------------------------------------------------- echo Acc_Account_Ledger::HtmlTableHeader(); - echo '<table "width=70%">'; + echo '<table class="result">'; foreach ($a_poste as $poste_id ) { $Poste=new Acc_Account_Ledger ($cn,$poste_id['pcm_val']); $Poste->load(); - $Poste->get_row( $_GET['from_periode'], $_GET['to_periode']); + $Poste->get_row_date( $_GET['from_periode'], $_GET['to_periode']); if ( empty($Poste->row)) continue; echo '<tr><td class="mtitle" colspan="5"><h2 class="info">'. $poste_id['pcm_val'].' '.h($Poste->label).'</h2></td></tr>'; diff --git a/include/impress_rapport.inc.php b/include/impress_rapport.inc.php index 693942871..8abd3a983 100644 --- a/include/impress_rapport.inc.php +++ b/include/impress_rapport.inc.php @@ -17,48 +17,52 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Revision$ */ -include_once("class_widget.php"); /*! \file * \brief print first the report in html and propose to print it in pdf * file included by user_impress * * some variable are already defined ($cn, $User ...) - */ - +require_once("class_ihidden.php"); +require_once("class_iselect.php"); +require_once("class_idate.php"); +require_once("class_acc_report.php"); //----------------------------------------------------- // If print is asked // First time in html // after in pdf or cvs //----------------------------------------------------- if ( isset( $_GET['bt_html'] ) ) { - require_once("class_acc_report.php"); $Form=new Acc_Report($cn,$_GET['form_id']); $Form->get_name(); // step asked ? //-- - if ($_GET['p_step'] == 0 ) { - if ( $_GET ['type_periode'] == 0 ) - $array=$Form->get_row( $_GET['from_periode'],$_GET['to_periode'], $_GET['type_periode']); - else - $array=$Form->get_row( $_GET['from_date'],$_GET['to_date'], $_GET['type_periode']); - } else { - // step are asked - //-- - for ($e=$_GET['from_periode'];$e<=$_GET['to_periode'];$e+=$_GET['p_step']) - { - $periode=getPeriodeName($cn,$e); - if ( $periode == null ) continue; - $array[]=$Form->get_row($e,$e,$_GET['type_periode']); - $periode_name[]=$periode; - } - } + if ( $_GET['type_periode'] == 1 ) + $array=$Form->get_row( $_GET['from_date'],$_GET['to_date'], $_GET['type_periode']); + + if ($_GET['type_periode'] == 0 && $_GET['p_step'] == 0 ) + $array=$Form->get_row( $_GET['from_periode'],$_GET['to_periode'], $_GET['type_periode']); + + + if ($_GET['type_periode'] == 0 && $_GET['p_step'] == 1 ) { + // step are asked + //-- + for ($e=$_GET['from_periode'];$e<=$_GET['to_periode'];$e+=$_GET['p_step']) + { + + $periode=getPeriodeName($cn,$e); + if ( $periode == null ) continue; + $array[]=$Form->get_row($e,$e,$_GET['type_periode']); + $periode_name[]=$periode; + } + } + $rep=""; - $submit=new widget(); - $hid=new widget("hidden"); + + $hid=new IHidden(); echo '<div class="content">'; if ( $_GET['type_periode'] == 0) { $t=($_GET['from_periode']==$_GET['to_periode'])?"":" -> ".getPeriodeName($cn,$_GET['to_periode'],'p_end'); @@ -78,37 +82,39 @@ if ( isset( $_GET['bt_html'] ) ) { echo '<TR>'; echo '<TD><form method="GET" ACTION="?">'. dossier::hidden(). - widget::submit('bt_other',"Autre Rapport"). - $hid->IOValue("type","rapport").$hid->IOValue("p_action","impress")."</form></TD>"; + HtmlInput::submit('bt_other',"Autre Rapport"). + $hid->input("type","rapport").$hid->input("p_action","impress")."</form></TD>"; echo '<TD><form method="GET" ACTION="form_pdf.php">'. - widget::submit('bt_pdf',"Export PDF"). + HtmlInput::submit('bt_pdf',"Export PDF"). dossier::hidden(). - $hid->IOValue("type","rapport"). - $hid->IOValue("p_action","impress"). - $hid->IOValue("form_id",$Form->id); - if ( isset($_GET['from_periode'])) echo $hid->IOValue("from_periode",$_GET['from_periode']); - if ( isset($_GET['to_periode'])) echo $hid->IOValue("to_periode",$_GET['to_periode']); - echo $hid->IOValue("p_step",$_GET['p_step']); - if ( isset($_GET['from_date'])) echo $hid->IOValue("from_date",$_GET['from_date']); - if ( isset($_GET['to_date'])) echo $hid->IOValue("to_date",$_GET['to_date']); - echo $hid->IOValue("type_periode",$_GET['type_periode']); + $hid->input("type","rapport"). + $hid->input("p_action","impress"). + $hid->input("form_id",$Form->id); + if ( isset($_GET['from_periode'])) echo $hid->input("from_periode",$_GET['from_periode']); + if ( isset($_GET['to_periode'])) echo $hid->input("to_periode",$_GET['to_periode']); + if (isset($_GET['p_step'])) echo $hid->input("p_step",$_GET['p_step']); + if ( isset($_GET['from_date'])) echo $hid->input("from_date",$_GET['from_date']); + if ( isset($_GET['to_date'])) echo $hid->input("to_date",$_GET['to_date']); + echo $hid->input("type_periode",$_GET['type_periode']); + echo "</form></TD>"; echo '<TD><form method="GET" ACTION="form_csv.php">'. - widget::submit('bt_csv',"Export CSV"). - dossier::hidden(). - $hid->IOValue("type","form"). - $hid->IOValue("p_action","impress"). - $hid->IOValue("form_id",$Form->id); - if ( isset($_GET['from_periode'])) echo $hid->IOValue("from_periode",$_GET['from_periode']); - if ( isset($_GET['to_periode'])) echo $hid->IOValue("to_periode",$_GET['to_periode']); - echo $hid->IOValue("p_step",$_GET['p_step']); - if ( isset($_GET['from_date'])) echo $hid->IOValue("from_date",$_GET['from_date']); - if ( isset($_GET['to_date'])) echo $hid->IOValue("to_date",$_GET['to_date']); - echo $hid->IOValue("type_periode",$_GET['type_periode']); + HtmlInput::submit('bt_csv',"Export CSV"). + dossier::hidden(). + $hid->input("type","form"). + $hid->input("p_action","impress"). + $hid->input("form_id",$Form->id); + if ( isset($_GET['from_periode'])) echo $hid->input("from_periode",$_GET['from_periode']); + if ( isset($_GET['to_periode'])) echo $hid->input("to_periode",$_GET['to_periode']); + if (isset($_GET['p_step'])) echo $hid->input("p_step",$_GET['p_step']); + if ( isset($_GET['from_date'])) echo $hid->input("from_date",$_GET['from_date']); + if ( isset($_GET['to_date'])) echo $hid->input("to_date",$_GET['to_date']); + echo $hid->input("type_periode",$_GET['type_periode']); + echo "</form></TD>"; @@ -117,7 +123,7 @@ if ( isset( $_GET['bt_html'] ) ) { echo "</table>"; if ( count($Form->row ) == 0 ) exit; - + if ( $_GET['type_periode']==0 ) { if ( $_GET['p_step'] == 0) { // check the step // show tables @@ -132,7 +138,10 @@ if ( isset( $_GET['bt_html'] ) ) { ShowReportResult($e); } } - + } + else { + ShowReportResult($Form->row); + } echo "</div>"; exit; } @@ -140,8 +149,8 @@ if ( isset( $_GET['bt_html'] ) ) { //----------------------------------------------------- // Show the jrn and date //----------------------------------------------------- -include_once("postgres.php"); -$ret=make_array($cn,"select fr_id,fr_label +require_once('class_database.php'); +$ret=$cn->make_array("select fr_id,fr_label from formdef order by fr_label"); if ( sizeof($ret) == 0 ) { @@ -153,53 +162,56 @@ if ( sizeof($ret) == 0 ) { //----------------------------------------------------- echo '<div class="content">'; echo '<FORM METHOD="GET">'; -$hidden=new widget("hidden"); -echo $hidden->IOValue("p_action","impress"); -echo $hidden->IOValue("type","rapport"); +$hidden=new IHidden(); +echo $hidden->input("p_action","impress"); +echo $hidden->input("type","rapport"); echo dossier::hidden(); echo '<TABLE border="2"><TR>'; -$w=new widget("select"); +$w=new ISelect(); $w->table=1; -$w->label="Choississez le rapport"; -print $w->IOValue("form_id",$ret); +print td("Choississez le rapport"); +print $w->input("form_id",$ret); print '</TR>'; //-- calendrier ou periode comptable $aCal=array( array('value'=>0,'label'=>'Période comptable'), array('value'=>1,'label'=>'Calendrier') ); -$w->label='Type de date : '; + $w->javascript=' onchange=enable_type_periode();'; echo '<tr>'; -echo $w->IOValue('type_periode',$aCal); +print td('Type de date : '); +echo $w->input('type_periode',$aCal); echo '</Tr>'; $w->javascript=''; print '<TR>'; // filter on the current year $filter_year=" where p_exercice='".$User->get_exercice()."'"; -$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); -$w->label="Période comptable : Depuis"; -print $w->IOValue('from_periode',$periode_start); -$w->label=" jusqu'à "; -$periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); -print $w->IOValue('to_periode',$periode_end); +$periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); +print td("Période comptable : Depuis"); +echo $w->input('from_periode',$periode_start); +print td(" jusqu'à "); +$periode_end=$cn->make_array("select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); +print $w->input('to_periode',$periode_end); print "</TR>"; +echo '<tr>'; //--- by date -$date=new widget('js_date'); -$date->table=1; -$date->label="Calendrier depuis :"; -echo $date->IOValue('from_date'); -$date->label="jusque"; -echo $date->IOValue('to_date'); +$date=new IDate(); +echo td("Calendrier depuis :"); +echo td($date->input('from_date')); +echo td("jusque"); +echo td($date->input('to_date')); +echo '</tr>'; + $aStep=array( array('value'=>0,'label'=>'Pas d\'étape'), array('value'=>1,'label'=>'1 mois') ); - -$w->label='Par étape de'; -echo '<TR> '.$w->IOValue('p_step',$aStep); +echo '<tr>'; +echo td('Par étape de'); +echo $w->input('p_step',$aStep); echo '</TR>'; echo '</TABLE>'; @@ -207,7 +219,7 @@ echo '<span class="notice"> Attention : vous ne pouvez pas utiliser les é echo '<br>'; echo '<span class="notice"> Les clauses FROM sont ignorés avec les dates calendriers</span>'; echo '<br>'; -print widget::submit('bt_html','Visualisation'); +print HtmlInput::submit('bt_html','Visualisation'); echo '</FORM>'; echo '<script>enable_type_periode()</script>'; diff --git a/include/ing_be.inc.php b/include/ing_be.inc.php index 17a7a1ad0..268f74526 100644 --- a/include/ing_be.inc.php +++ b/include/ing_be.inc.php @@ -27,6 +27,7 @@ // Bank ING //----------------------------------------------------- $row=1; +$p_cn->set_encoding('latin1'); while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { $num = count($data); for ($c=0; $c < $num; $c++) { @@ -82,8 +83,8 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { $code = $annee."-".$code; $sql = "select * from import_tmp where code='".$code."' and num_compte='".$num_compte."'"; - $Res=ExecSql($p_cn,$sql,'latin1'); - $Num=pg_NumRows($Res); + $Res=$p_cn->exec_sql($sql); + $Num=Database::num_row($Res); if($Num > 0) { echo "Opération FORTIS ".$code." déj&eagrave; importée.<br/>"; @@ -111,7 +112,7 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { $p_jrn, 'n')"; echo $sql; - $Res=ExecSql($p_cn,$Sql,'latin1'); + $Res=$p_cn->exec_sql($Sql); } } diff --git a/include/jrn.php b/include/jrn.php index 95a411dfd..102847c4f 100644 --- a/include/jrn.php +++ b/include/jrn.php @@ -23,6 +23,9 @@ /*! \file * \brief work with the ledger */ +require_once("class_itext.php"); +require_once("class_ifile.php"); +require_once("class_ihidden.php"); require_once('class_fiche.php'); require_once ('class_gestion_sold.php'); require_once ('class_gestion_purchase.php'); @@ -59,7 +62,7 @@ function ShowOperationExpert($p_cn,$p_jr_id,$p_mode=1) } echo_debug('jrn.php',__LINE__,$l_array); // Javascript - $r=JS_VIEW_JRN_MODIFY; + $r=JS_LEDGER; // Build the form $col_vide="<TD></TD>"; @@ -87,24 +90,24 @@ function ShowOperationExpert($p_cn,$p_jr_id,$p_mode=1) // comment can be changed $r.="<TD>"; - $comment=new widget("text"); + $comment=new IText(); $comment->table=0; $comment->name="comment"; $comment->readonly=($p_mode==0)?true:false; $comment->value=$content['jr_comment']; $comment->size=40; - $r.=$comment->IOValue(); + $r.=$comment->input(); $r.="</TD>"; // pj can be changed $r.="<TD> PJ Num. "; - $comment=new widget("text"); + $comment=new IText(); $comment->table=0; $comment->name="pj"; $comment->readonly=($p_mode==0)?true:false; $comment->value=$content['jr_pj_number']; $comment->size=10; - $r.=$comment->IOValue(); + $r.=$comment->input(); $r.="</TD>"; @@ -156,7 +159,7 @@ function ShowOperationExpert($p_cn,$p_jr_id,$p_mode=1) // }// foreach ($l_array[$i] as $value=>$content) }// for ( $i =0 ; $i < sizeof($l_array); $i++) if ( $p_mode == 1) { - $file=new widget("file"); + $file=new IFile(); $file->table=1; //doc if ( $content['jr_pj_name'] != "") @@ -175,7 +178,7 @@ function ShowOperationExpert($p_cn,$p_jr_id,$p_mode=1) if ( $p_mode == 1 ) { $r.="<hr>"; $r.= "<table>"; - $r.="<TR>".$file->IOValue("pj","","Pièce justificative")."</TR>"; + $r.="<TR>".$file->input("pj","","Pièce justificative")."</TR>"; $r.="</table>"; } $r.="<hr>"; @@ -228,7 +231,7 @@ function ShowOperationExpert($p_cn,$p_jr_id,$p_mode=1) $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchJrn(\''.$sessid."',".$gDossier.",'rapt','".$content['jr_montant']."')\">"; $r.= '<H2 class="info">rapprochement </H2> - <INPUT TYPE="TEXT" name="rapt" value="">'.$search; + <INPUT TYPE="TEXT" id="rapt" name="rapt" value="">'.$search; } // if mode == 1 @@ -249,7 +252,6 @@ function ShowOperationExpert($p_cn,$p_jr_id,$p_mode=1) function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) { - echo_debug('jrn.php',__LINE__,"function ShowOperationUser($p_cn,$p_jr_id,$p_mode) "); $gDossier=dossier::id(); $l_array=get_dataJrnJrIdUser($p_cn,$p_jr_id); $str_dossier=dossier::get(); @@ -269,7 +271,7 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) echo_debug('jrn.php',__LINE__,$l_array); // Javascript - $r=JS_VIEW_JRN_MODIFY; + $r=JS_LEDGER; // Build the form $col_vide="<TD></TD>"; @@ -279,7 +281,7 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) // for the first line $internal=$content['jr_internal']; - $r.='<TABLE>'; + $r.='<TABLE width="100%">'; $r.="<TR>"; // Date $r.='<TD ><h3>'; @@ -296,23 +298,23 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) $r.='<Input type="hidden" name="jr_grpt_id" value="'.$content['jr_grpt_id'].'">'; $r.='</tr><tr>'; // comment can be changed - $comment=new widget("text"); + $comment=new IText(); $comment->table=0; $comment->name="comment"; $comment->readonly=($p_mode==0)?true:false; $comment->value=$content['jr_comment']; $comment->size=40; - $r.='<td>'.$comment->IOValue().'</td>'; + $r.='<td>'.$comment->input().'</td>'; // pj can be changed $r.="<TD> PJ Num. "; - $comment=new widget("text"); + $comment=new IText(); $comment->table=0; $comment->name="pj"; $comment->readonly=($p_mode==0)?true:false; $comment->value=$content['jr_pj_number']; $comment->size=10; - $r.=$comment->IOValue(); + $r.=$comment->input(); $r.="</TD>"; // Is Paid @@ -328,7 +330,8 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) // for purchase ledger if ( $content['jrn_def_type'] == 'ACH' ) { - $r.='<tr><td><table>'; + $r.='</table>'; + $r.='<table width="100%">'; echo_debug(__FILE__.":".__LINE__." content['qp_supplier'] ".$content['qp_supplier']); $client=new fiche($p_cn,$content['qp_supplier']); $r.="Client : ".$client->getName(); @@ -375,7 +378,7 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) $tot_amount+=$row->qp_price; $tot_dep_priv+=$row->qp_dep_priv; - // $hid_jid=new widget("hidden","","p_jid_".$row->j_id,$row->j_id); + // $hid_jid=new IHidden("","p_jid_".$row->j_id,$row->j_id); $r.=($i%2==0)?"<tr class=\"odd\">":'<tr>'; $i++; $pu=0.0; if ( $row->qp_price != 0.0 && $row->qp_price != 0 ) @@ -411,42 +414,41 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) $r.='<tr><td colspan="8"><hr style="color:blue;"></td></tr>'; $r.='<tr style="font-size:13px;color:green;">'. '<td colspan="7">Total HTVA</td>'. - '<td>'.sprintf('% 12.2f',$tot_amount)."</td>". + '<td style="text-align:right">'.sprintf('% 12.2f',$tot_amount)."</td>". "</tr>"; if ( $tot_tva != 0 ) $r.='<tr style="font-size:13px;color:green;">'. '<td colspan="7">Total TVA</td>'. - '<td>'.sprintf('%12.2f',$tot_tva) + '<td style="text-align:right;">'.sprintf('%12.2f',$tot_tva) ."</td>". "</tr>"; if ( $tot_nd !=0 ) $r.='<tr style="font-size:13px;color:green;">'. '<td colspan="7">Total nd </td>'. - '<td style="font-size:13px;color:green;">'.sprintf('%12.2f',$tot_nd)."</td>". + '<td style="font-size:13px;text-align:right;color:green;">'.sprintf('%12.2f',$tot_nd)."</td>". "</tr>"; if ( $tot_tva_nd !=0 ) $r.='<tr style="font-size:13px;color:green;">'. '<td colspan="7">Total tva nd</td>'. - '<td style="font-size:13px;color:green;">'.sprintf('%12.2f',$tot_tva_nd)."</td>". + '<td style="font-size:13px;text-align:right;color:green;">'.sprintf('%12.2f',$tot_tva_nd)."</td>". "</tr>"; if ( $tot_tva_nd_recup !=0 ) $r.='<tr style="font-size:13px;color:green;">'. '<td colspan="7">Total tva nd recup. par impot</td>'. - '<td style="font-size:13px;color:green;">'.sprintf('%12.2f',$tot_tva_nd_recup)."</td>". + '<td style="font-size:13px;text-align:right;color:green;">'.sprintf('%12.2f',$tot_tva_nd_recup)."</td>". "</tr>"; if ( $tot_dep_priv !=0 ) $r.='<tr style="font-size:13px;color:green;">'. '<td colspan="7">Total tva nd recup. par impot</td>'. - '<td style="font-size:13px;color:green;">'.sprintf('%12.2f',$tot_dep_priv)."</td>". + '<td style="font-size:13px;text-align:right;color:green;">'.sprintf('%12.2f',$tot_dep_priv)."</td>". "</tr>"; $r.='<tr style="font-size:13px;color:green;">'. '<td colspan="7">Total </td>'. - '<td style="font-size:13px;color:green;">'.sprintf('%12.2f',$tot_dep_priv+$tot_amount+$tot_tva+$tot_tva_nd_recup+$tot_nd+$tot_tva_nd)."</td>". + '<td style="font-size:13px;text-align:right;color:green;">'.sprintf('%12.2f',$tot_dep_priv+$tot_amount+$tot_tva+$tot_tva_nd_recup+$tot_nd+$tot_tva_nd)."</td>". "</tr>"; - $r.= '</table></td></tr>'; - + } @@ -460,6 +462,8 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) /* now we get the different lines for this operation thanks */ /* the qs_internal == jr_internal */ + $r.'</table>'; + $r.='<table width="100%">'; $r.='<tr>'; $r.='<th>Nom</th>'; $r.='<th>PU</th>'; @@ -513,20 +517,23 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) } + $r.='</table>'; + $r.='<hr>'; if ($own->MY_TVA_USE == 'Y' ) { - $r.="<tr>". + $r.='<table>'; + $r.="<tr>". + "<td>"."</td>". + "<td>"."</td>". "<td>"."</td>". - "<td>"."</td>". - "<td>"."</td>". - "<td>Total HTVA</td>". - '<td style="font-size:13px;color:green;">'.sprintf('% 12.2f',$tot_amount)."</td>". + "<td>Total HTVA</td>". + '<td style="text-align:right;font-size:13px;color:green;">'.sprintf('% 12.2f',$tot_amount)."</td>". "</tr>"; $r.="<tr>". "<td>"."</td>". "<td>"."</td>". "<td>"."</td>". "<td>Total TVA</td>". - '<td style="text-justify:right;font-size:13px;color:green;">'.sprintf('%12.2f',$tot_tva) + '<td style="text-align:right;font-size:13px;color:green;">'.sprintf('%12.2f',$tot_tva) ."</td>". "</tr>"; @@ -538,7 +545,8 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) '<td style="font-size:13px;color:green;">'.sprintf('%12.2f',$tot_amount+$tot_tva)."</td>". "</tr>"; } else { - $r.="<tr>". + $r.='<table>'; + $r.="<tr>". "<td>"."</td>". "<td>Total </td>". '<td style="font-size:13px;color:green;">'.sprintf('%12.2f',$tot_amount+$tot_tva)."</td>". @@ -548,7 +556,7 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) $r.="</TABLE>"; - $file=new widget("file"); + $file=new IFile(); $file->table=1; //doc if ( $p_mode ==1 && $content['jr_pj_name'] != "") @@ -582,7 +590,7 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) if ( $p_mode == 1 ) { $r.= "<table>"; - $r.="<TR>".$file->IOValue("pj","","Pièce justificative")."</TR>"; + $r.="<TR>".$file->input("pj","","Pièce justificative")."</TR>"; $r.="</table>"; $r.="<hr>"; @@ -617,209 +625,13 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) $search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchJrn(\''.$sessid."',".$gDossier.",'rapt','".$content['jr_montant']."')\">"; $r.= '<H2 class="info">rapprochement </H2> - <INPUT TYPE="TEXT" name="rapt" value="">'.$search; + <INPUT TYPE="TEXT" id="rapt" name="rapt" value="">'.$search; } // if p_mode==1 $r.='<input type="hidden" name="jr_id" value="'.$content['jr_id'].'">'; // echo $r; return $r; } -/*! - * \brief Vue des écritures comptables - * - * parm : - * - p_dossier, - * - p_user, - * - p_jrn - * - p_url for modif - * - array - * gen : - * - - * return: - * - - * - */ -function ViewJrn($p_dossier,$p_user,$p_jrn,$p_url,$p_array=null) { - echo_debug('jrn.php',__LINE__,"function ViewJrn($p_dossier,$p_user,$p_jrn,$p_array=null) "); - - $db=sprintf("dossier%d",$p_dossier); - $cn=DbConnect($p_dossier); - $oJrn=new Acc_Ledger($cn,$p_jrn); - $l_prop=$oJrn->get_propertie(); - echo "<H2 class=\"info\">".$l_prop['jrn_def_name']."( ".$l_prop['jrn_def_code'].")"."</H2>"; - if ( $p_array == null) { - include_once("preference.php"); - $l_periode=GetUserPeriode($cn,$p_user); - $Res=ExecSql($cn,"select jr_id,j_id,jr_internal,to_char(j_date,'DD.MM.YYYY') as j_date, - j_montant,j_poste,pcm_lib,j_grpt,j_debit,j_centralized,j_tech_per, - pcm_lib - from jrnx inner join tmp_pcmn on j_poste=pcm_val - inner join jrn on jr_grpt_id=j_grpt - where - j_jrn_def=$p_jrn and j_tech_per=$l_periode - order by j_id,j_grpt,j_debit desc"); - } else { - // Construction Query - foreach ( $p_array as $key=>$element) { - ${"l_$key"}=$element; - echo_debug ("l_$key $element"); - } - $sql="select j_id,to_char(j_date,'DD.MM.YYYY') as j_date,j_montant,j_poste, - pcm_lib,j_grpt,jr_id,j_debit,j_centralized,j_tech_per,jr_internal - from jrnx inner join tmp_pcmn on j_poste=pcm_val - inner join jrn on jr_grpt_id=j_grpt - where - j_jrn_def=$p_jrn"; - $l_and="and "; - if ( ereg("^[0-9]+$", $l_s_montant) || ereg ("^[0-9]+\.[0-9]+$", $l_s_montant) ) { - $sql.=" and jr_montant $l_mont_sel $l_s_montant"; - } - if ( isDate($l_date_start) != null ) { - $sql.=$l_and." j_date >= to_date('".$l_date_start."','DD.MM.YYYY')"; - } - if ( isDate($l_date_end) != null ) { - $sql.=$l_and." j_date <= to_date('".$l_date_end."','DD.MM.YYYY')"; - } - $l_s_comment=FormatString($l_s_comment); - if ( $l_s_comment != null ) { - $sql.=$l_and." upper(jr_comment) like upper('%".$l_s_comment."%') "; - } - - $sql.=" order by j_id,j_grpt,j_debit desc"; - echo_debug ("search query is $sql"); - $Res=ExecSql($cn,$sql); - } - $MaxLine=pg_NumRows($Res); - if ( $MaxLine == 0 ) return; - $col_vide="<TD></TD>"; - echo '<TABLE ALIGN="center">'; - $l_id=0; - for ( $i=0; $i < $MaxLine; $i++) { - $l_line=pg_fetch_array($Res,$i); - if ( $l_line['j_debit'] == 't' ) { - echo '<TR style="background-color:lightblue;">'; - } - else { - echo '<TR>'; - } - if ( $l_id == $l_line['j_grpt'] ) { - echo $col_vide.$col_vide.$col_vide; - } else { - echo "<TD>"; - echo $l_line['j_date']; - echo "</TD>"; - - - echo "<TD>"; - if ( isset ($_GET["PHPSESSID"]) ) { - $sessid=$_GET["PHPSESSID"]; - } else { - $sessid=$_POST["PHPSESSID"]; - } - - list($z_type,$z_num,$num_op)=split("-",$l_line['jr_internal']); - printf ('<INPUT TYPE="BUTTON" VALUE="%s" onClick="modifyOperation(\'%s\',\'%s\')">', - $num_op,$sessid,$l_line['jr_id']); - // echo $num_op; - echo "</TD>"; - - - // no modification only cancel of wrong op. - echo '<TD class="mlltitle">'; - echo "<A class=\"mtitle\" HREF=$p_url?action=update&line=".$l_line['jr_id'].">"; - echo "M"; - echo "</A></TD>"; - $l_id=$l_line['j_grpt']; - } - if ($l_line['j_debit']=='f') - echo $col_vide; - - echo '<TD>'; - echo $l_line['j_poste']; - echo '</TD>'; - - echo '<TD>'; - echo $l_line['pcm_lib']; - echo '</TD>'; - echo $col_vide; - - echo '<TD>'; - echo $l_line['j_montant']; - echo '</TD>'; - - if ( $l_line['j_debit']=='t') - echo $col_vide; - - echo "</TR>"; - - - } - echo '</TABLE>'; -} -/*! - * \brief Get data from jrnx where p_grpt=jrnx(j_grpt) - * - * parm : - * - connection - * - p_grpt - * gen : - * - none - * return: - * - return array - * - */ -function get_data ($p_cn,$p_grpt) { - echo_debug('jrn.php',__LINE__,"get_data $p_cn $p_grpt"); - $Res=ExecSql($p_cn,"select - to_char(j_date,'DD.MM.YYYY') as j_date, - j_text, - j_debit, - j_poste, - j_montant, - j_id, - jr_comment, - to_char(jr_ech,'DD.MM.YYYY') as jr_ech, - to_char(jr_date,'DD.MM.YYYY') as jr_date, - jr_id,jr_internal,jr_def_id,jr_pj - from jrnx inner join jrn on j_grpt=jr_grpt_id where j_grpt=$p_grpt"); - $MaxLine=pg_NumRows($Res); - if ( $MaxLine == 0 ) return null; - $deb=0;$cred=0; - for ( $i=0; $i < $MaxLine; $i++) { - - $l_line=pg_fetch_array($Res,$i); - $l_array['op_date']=$l_line['j_date']; - if ( $l_line['j_debit'] == 't' ) { - $l_class=sprintf("class_deb%d",$deb); - $l_montant=sprintf("mont_deb%d",$deb); - $l_text=sprintf("text_deb%d",$deb); - $l_array[$l_class]=$l_line['j_poste']; - $l_array[$l_montant]=$l_line['j_montant']; - $l_array[$l_text]=$l_line['j_text']; - $l_id=sprintf("op_deb%d",$deb); - $l_array[$l_id]=$l_line['j_id']; - $deb++; - } - if ( $l_line['j_debit'] == 'f' ) { - $l_class=sprintf("class_cred%d",$cred); - $l_montant=sprintf("mont_cred%d",$cred); - $l_array[$l_class]=$l_line['j_poste']; - $l_array[$l_montant]=$l_line['j_montant']; - $l_id=sprintf("op_cred%d",$cred); - $l_array[$l_id]=$l_line['j_id']; - $l_text=sprintf("text_cred%d",$deb); - $l_array[$l_text]=$l_line['j_text']; - - $cred++; - } - $l_array['jr_internal']=$l_line['jr_internal']; - $l_array['comment']=$l_line['jr_comment']; - $l_array['ech']=$l_line['jr_ech']; - $l_array['jr_id']=$l_line['jr_id']; - $l_array['jr_def_id']=$l_line['jr_def_id']; - } - return array($l_array,$deb,$cred); -} /*! * \brief Get data from jrn and jrnx thanks the jr_id @@ -834,8 +646,7 @@ function get_data ($p_cn,$p_grpt) { */ function get_dataJrnJrId ($p_cn,$p_jr_id) { - echo_debug('jrn.php',__LINE__,"get_dataJrn $p_cn $p_jr_id"); - $Res=ExecSql($p_cn,"select + $Res=$p_cn->exec_sql("select j_text, j_debit, j_poste, @@ -859,12 +670,12 @@ function get_dataJrnJrId ($p_cn,$p_jr_id) { where jr_id=$p_jr_id order by j_debit desc,j_id asc"); - $MaxLine=pg_NumRows($Res); + $MaxLine=Database::num_row($Res); echo_debug('jrn.php',__LINE__,"Found $MaxLine lines"); if ( $MaxLine == 0 ) return null; for ( $i=0; $i < $MaxLine; $i++) { - $line=pg_fetch_array($Res,$i); + $line=Database::fetch_array($Res,$i); $array['j_debit']=$line['j_debit']; // is there a name from this j_qcode // @@ -916,7 +727,7 @@ function get_dataJrnJrIdUser ($p_cn,$p_jr_id) { echo_debug(__FILE__.":".__LINE__."get_dataJrnJrIdUser"); - $Res=ExecSql($p_cn,"select ". + $Res=$p_cn->exec_sql("select ". "*". " from quant_sold join jrn on (qs_internal=jr_internal) ". " join jrn_def on (jr_def_id=jrn_def_id) ". @@ -925,21 +736,21 @@ function get_dataJrnJrIdUser ($p_cn,$p_jr_id) { " where jr_id=$p_jr_id order by jrnx.j_id"); - $MaxLine=pg_NumRows($Res); + $MaxLine=Database::num_row($Res); echo_debug('jrn.php',__LINE__,"Found $MaxLine lines"); // if no info found in quant_sold try in quant_purchase if ( $MaxLine == 0 ) { - $Res=ExecSql($p_cn,"select ". + $Res=$p_cn->exec_sql("select ". "*". " from quant_purchase join jrn on (qp_internal=jr_internal)". " join jrn_def on (jr_def_id=jrn_def_id) ". " inner join jrnx on (j_grpt=jr_grpt_id) ". " join tmp_pcmn on (pcm_val=j_poste)". " where jr_id=$p_jr_id"); - $MaxLine=pg_NumRows($Res); + $MaxLine=Database::num_row($Res); if ( $MaxLine == 0 ) return null; @@ -948,7 +759,7 @@ function get_dataJrnJrIdUser ($p_cn,$p_jr_id) { for ( $i=0; $i < $MaxLine; $i++) { - $line=pg_fetch_array($Res,$i); + $line=Database::fetch_array($Res,$i); $array['j_debit']=$line['j_debit']; diff --git a/include/modele.inc.php b/include/modele.inc.php index 878e1f848..6dac76671 100644 --- a/include/modele.inc.php +++ b/include/modele.inc.php @@ -26,21 +26,22 @@ * \brief concerne only the template * */ -require_once ('class_widget.php'); +require_once("class_itext.php"); +require_once("class_icheckbox.php"); $sa=(isset ( $_REQUEST['sa']))?$_REQUEST['sa']:'list'; if ( isset ($_POST['upd']) && isset($_POST['m'])){ if ( isset($_POST['name']) && isset($_POST['desc'])) { extract($_POST); - $cn=DbConnect(); + $cn=new Database(); if ( strlen(trim($name)) !=0 - && getDbValue($cn,'select count(*) from modeledef where '. + && $cn->get_value('select count(*) from modeledef where '. 'mod_name=$1 and mod_id !=$2', array(trim($name),$m)) == 0 ) { - ExecSqlParam($cn,"update modeledef set mod_name=$1, ". + $cn->exec_sql("update modeledef set mod_name=$1, ". " mod_desc=$2 where mod_id=$3 ", array(trim($name),trim($desc),$m)); @@ -51,79 +52,79 @@ if ( isset ($_POST['upd']) && } echo JS_CONFIRM; -$cn=DbConnect(); +$cn=new Database(); // IF FMOD_NAME is posted then must add a template if ( isset ($_POST["FMOD_NAME"]) ) { - $encoding=getDbValue($cn,"select encoding from pg_database where ". + $encoding=$cn->get_value("select encoding from pg_database where ". " datname='".domaine.'dossier'.FormatString($_POST["FMOD_DBID"])."'"); if ( $encoding != 6 ) { - echo "<script> alert('Désolé vous devez migrer ce modèle en unicode')</script>"; + alert('Désolé vous devez migrer ce modèle en unicode'); echo '<span class="error">la base de donnée '. domaine.'mod'.$_POST["FMOD_DBID"]." doit être migrée en unicode</span>"; echo '<span class="error"> Pour le passer en unicode, faites-en un backup puis restaurez le fichier reçu</span>'; - echo widget::button_href('Retour','admin_repo.php?action=dossier_mgt'); + echo HtmlInput::button_anchor('Retour','admin_repo.php?action=dossier_mgt'); exit(); } $mod_name=FormatString($_POST["FMOD_NAME"]); $mod_desc=FormatString($_POST["FMOD_DESC"]); if ( $mod_name != null) { - $Res=ExecSql($cn,"insert into modeledef(mod_name,mod_desc) + $Res=$cn->exec_sql("insert into modeledef(mod_name,mod_desc) values ('".$mod_name."',". "'".$mod_desc."')"); // get the mod_id - $l_id=GetSequence($cn,'s_modid'); + $l_id=$cn->get_current_seq('s_modid'); if ( $l_id != 0 ) { $Sql=sprintf("CREATE DATABASE %sMOD%d encoding='UTF8' TEMPLATE %sDOSSIER%s",domaine,$l_id,domaine,$_POST["FMOD_DBID"]); ob_start(); - if ( pg_query($cn,$Sql)==false) { + if ( $cn->exec_sql($Sql)==false) { ob_end_clean(); echo "<h2 class=\"error\"> Base de donnée ".domaine."dossier".$_POST['FMOD_DBID']." est accèdée, déconnectez-vous en d'abord</h2>"; - $Res=ExecSql($cn,"delete from modeledef where mod_id=".$l_id); + $Res=$cn->exec_sql("delete from modeledef where mod_id=".$l_id); exit; } } }// if $mod_name != null - $cn_mod=dbconnect($l_id,'mod'); + $cn_mod=new Database($l_id,'mod'); // Clean some tables - $Res=ExecSql($cn_mod,"select distinct jr_pj from jrn where jr_pj is not null "); - if ( pg_NumRows($Res) != 0 ) + $Res=$cn_mod->exec_sql("select distinct jr_pj from jrn where jr_pj is not null "); + if ( Database::num_row($Res) != 0 ) { - $a_lob=pg_fetch_all($Res); - foreach ($a_lob as $lob) - @pg_lo_unlink($cn_mod,$lob['loid']); + $a_lob=Database::fetch_all($Res); + for($i=0;$i<count($a_lob);$i++) + $cn_mod->lo_unlink($a_lob[$i]['jr_pj']); } - $Res=ExecSql($cn_mod,"truncate table quant_sold"); - $Res=ExecSql($cn_mod,"truncate table quant_purchase"); - $Res=ExecSql($cn_mod,"truncate table centralized"); - $Res=ExecSql($cn_mod,"truncate table stock_goods"); - $Res=ExecSql($cn_mod,"truncate jrn cascade"); - $Res=ExecSql($cn_mod,"delete from jrnx"); - $Res=ExecSql($cn_mod,"delete from del_jrn"); - $Res=ExecSql($cn_mod,"delete from del_jrnx"); - $Res=ExecSql($cn_mod,"delete from del_action"); + $Res=$cn_mod->exec_sql("truncate table quant_sold"); + $Res=$cn_mod->exec_sql("truncate table quant_purchase"); + $Res=$cn_mod->exec_sql("truncate table centralized"); + $Res=$cn_mod->exec_sql("truncate table stock_goods"); + $Res=$cn_mod->exec_sql("truncate jrn cascade"); + $Res=$cn_mod->exec_sql("delete from jrnx"); + $Res=$cn_mod->exec_sql("delete from del_jrn"); + $Res=$cn_mod->exec_sql("delete from del_jrnx"); + $Res=$cn_mod->exec_sql("delete from del_action"); - $Res=ExecSql($cn_mod,'delete from operation_analytique'); + $Res=$cn_mod->exec_sql('delete from operation_analytique'); // TODO // Nettoyage table quant_* - $Res=ExecSql($cn_mod,"truncate table jrn_rapt"); - $Res=ExecSql($cn_mod,"truncate table import_tmp"); + $Res=$cn_mod->exec_sql("truncate table jrn_rapt"); + $Res=$cn_mod->exec_sql("truncate table import_tmp"); // Reset the closed periode - $Res=ExecSql($cn_mod,"update parm_periode set p_closed='f'"); - $Res=ExecSql($cn_mod,'delete from jrn_periode'); - $Res=ExecSql($cn_mod,' insert into jrn_periode(p_id,jrn_def_id,status) '. + $Res=$cn_mod->exec_sql("update parm_periode set p_closed='f'"); + $Res=$cn_mod->exec_sql('delete from jrn_periode'); + $Res=$cn_mod->exec_sql(' insert into jrn_periode(p_id,jrn_def_id,status) '. ' select p_id,jrn_def_id,\'OP\' '. ' from '. ' parm_periode cross join jrn_def'); @@ -132,72 +133,72 @@ if ( isset ($_POST["FMOD_NAME"]) ) { $a_seq=array('s_jrn','s_jrn_op','s_centralized','s_stock_goods','s_internal'); foreach ($a_seq as $seq ) { $sql=sprintf("select setval('%s',1,false)",$seq); - $Res=ExecSql($cn_mod,$sql); + $Res=$cn_mod->exec_sql($sql); } $sql="select jrn_def_id from jrn_def "; - $Res=ExecSql($cn_mod,$sql); - $Max=pg_NumRows($Res); + $Res=$cn_mod->exec_sql($sql); + $Max=Database::num_row($Res); for ($seq=0;$seq<$Max;$seq++) { - $row=pg_fetch_array($Res,$seq); + $row=Database::fetch_array($Res,$seq); /* if seq doesn't exist create it */ - if ( exist_sequence($cn_mod,'s_jrn_'.$row['jrn_def_id']) == false ) { - create_sequence($cn_mod,'s_jrn_'.$row['jrn_def_id']); + if ( $cn_mod->exist_sequence('s_jrn_'.$row['jrn_def_id']) == false ) { + $cn_mod->create_sequence('s_jrn_'.$row['jrn_def_id']); } $sql=sprintf ("select setval('s_jrn_%d',1,false)",$row['jrn_def_id']); $sql=sprintf ("select setval('s_jrn_pj%d',1,false)",$row['jrn_def_id']); - ExecSql($cn_mod,$sql); + $cn_mod->exec_sql($sql); } //--- // Cleaning Action //-- if ( isset($_POST['DOC'] )) { - $Res=ExecSql($cn_mod,"delete from action_gestion"); - $Res=ExecSql($cn_mod,"delete from document"); + $Res=$cn_mod->exec_sql("delete from action_gestion"); + $Res=$cn_mod->exec_sql("delete from document"); // Remove lob file - $Res=ExecSql($cn_mod,"select distinct loid from pg_largeobject"); - if ( pg_NumRows($Res) != 0 ) + $Res=$cn_mod->exec_sql("select distinct loid from pg_largeobject"); + if ( Database::num_row($Res) != 0 ) { - $a_lob=pg_fetch_all($Res); + $a_lob=Database::fetch_all($Res); //var_dump($a_lob); foreach ($a_lob as $lob) { - pg_lo_unlink($cn_mod,$lob['loid']); + $cn_mod->lo_unlink($lob['loid']); } } } if ( isset($_POST['CARD'])) { - $Res=ExecSql($cn_mod,"delete from attr_value"); - $Res=ExecSql($cn_mod,"delete from jnt_fic_att_value"); - $Res=ExecSql($cn_mod,"delete from fiche"); - $Res=ExecSql($cn_mod,"delete from action_gestion"); - $Res=ExecSql($cn_mod,"delete from document"); - $Res=ExecSql($cn_mod,"delete from op_predef"); + $Res=$cn_mod->exec_sql("delete from attr_value"); + $Res=$cn_mod->exec_sql("delete from jnt_fic_att_value"); + $Res=$cn_mod->exec_sql("delete from fiche"); + $Res=$cn_mod->exec_sql("delete from action_gestion"); + $Res=$cn_mod->exec_sql("delete from document"); + $Res=$cn_mod->exec_sql("delete from op_predef"); // Remove lob file - $Res=ExecSql($cn_mod,"select distinct loid from pg_largeobject"); - if ( pg_NumRows($Res) != 0 ) + $Res=$cn_mod->exec_sql("select distinct loid from pg_largeobject"); + if ( Database::num_row($Res) != 0 ) { - $a_lob=pg_fetch_all($Res); + $a_lob=Database::fetch_all($Res); foreach ($a_lob as $lob) - pg_lo_unlink($cn_mod,$lob['loid']); + $cn_mod->lo_unlink($lob['loid']); } } if ( isset($_POST['CANAL'])) { - $Res=ExecSql($cn_mod,'delete from poste_analytique'); - $Res=ExecSql($cn_mod,'delete from plan_analytique'); + $Res=$cn_mod->exec_sql('delete from poste_analytique'); + $Res=$cn_mod->exec_sql('delete from plan_analytique'); } } // Show all available templates -$Res=ExecSql($cn,"select mod_id,mod_name,mod_desc from +$Res=$cn->exec_sql("select mod_id,mod_name,mod_desc from modeledef order by mod_name"); -$count=pg_NumRows($Res); +$count=Database::num_row($Res); echo '<div class="content">'; echo "<H2>Modèles</H2>"; if ( $sa=='list') { @@ -206,8 +207,8 @@ if ( $sa=='list') { } else { - echo widget::button_href('Rafraîchir','admin_repo.php?action=modele_mgt'); - echo widget::button_href('Ajouter','admin_repo.php?action=modele_mgt&sa=add'); + echo HtmlInput::button_anchor('Rafraîchir','admin_repo.php?action=modele_mgt'); + echo HtmlInput::button_anchor('Ajouter','admin_repo.php?action=modele_mgt&sa=add'); echo '<table width="100%" >'; echo "<TR><TH>Nom</TH>". @@ -216,16 +217,16 @@ if ( $sa=='list') { "</TR>"; for ($i=0;$i<$count;$i++) { - $mod=pg_fetch_array($Res,$i); + $mod=Database::fetch_array($Res,$i); printf('<TR>'. '<TD>%d <b> %s</b> </TD>'. '<TD><I> %s </I></TD>'. '<td> '. - widget::button_href('Effacer','?action=modele_mgt&sa=del&m='.$mod['mod_id']).'</td>'. + HtmlInput::button_anchor('Effacer','?action=modele_mgt&sa=del&m='.$mod['mod_id']).'</td>'. '</td>'. - '<td>'.widget::button_href('Modifie','?action=modele_mgt&sa=mod&m='.$mod['mod_id']).'</td>'. + '<td>'.HtmlInput::button_anchor('Modifie','?action=modele_mgt&sa=mod&m='.$mod['mod_id']).'</td>'. '</td>'. - '<td>'.widget::button_href('Backup','backup.php?action=backup&sa=b&t=m&d=' + '<td>'.HtmlInput::button_anchor('Backup','backup.php?action=backup&sa=b&t=m&d=' .$mod['mod_id']).'</td>'. '</TR>', $mod['mod_id'], @@ -245,14 +246,14 @@ echo "Si vous voulez récupérer toutes les adaptations d'un dossier //--------------------------------------------------------------------------- if ( $sa == 'add') { // Show All available folder -$Res=ExecSql($cn,"select dos_id, dos_name,dos_description from ac_dossier +$Res=$cn->exec_sql("select dos_id, dos_name,dos_description from ac_dossier order by dos_name"); -$count=pg_NumRows($Res); +$count=Database::num_row($Res); $available=""; if ( $count != 0 ) { $available='<SELECT NAME="FMOD_DBID">'; for ($i=0;$i<$count;$i++) { - $db=pg_fetch_array($Res,$i); + $db=Database::fetch_array($Res,$i); $available.='<OPTION VALUE="'.$db['dos_id'].'">'.$db['dos_name'].':'.$db['dos_description']; }//for i $available.='</SELECT>'; @@ -282,7 +283,7 @@ if ( $count != 0 ) { <INPUT TYPE="SUBMIT" VALUE="Ajout d'un modele"> <?php -echo widget::button_href('Retour','?action=modele_mgt'); +echo HtmlInput::button_anchor('Retour','?action=modele_mgt'); ?> </form> @@ -291,29 +292,29 @@ echo widget::button_href('Retour','?action=modele_mgt'); //--------------------------------------------------------------------------- // Modify if ( $sa == 'mod' && isset($_GET['m']) ){ - $cn=DbConnect(); + $cn=new Database(); echo '<form method="post">'; - $name=getDbValue($cn, + $name=$cn->get_value( "select mod_name from modeledef where ". " mod_id=$1", array($_GET['m'])); - $desc=getDbValue($cn, + $desc=$cn->get_value( "select mod_desc from modeledef where ". " mod_id=$1", array($_GET['m'])); - $wText=new widget('text'); - echo 'Nom : '.$wText->IOValue('name',$name); - $wDesc=new widget('textarea'); + $wText=new IText(); + echo 'Nom : '.$wText->input('name',$name); + $wDesc=new ITextArea(); $wDesc->heigh=5; echo '<br>Description :<br>'; - echo $wDesc->IOValue('desc',$desc); - echo widget::hidden('m',$_GET['m']); - echo widget::hidden('action','modele_mgt'); + echo $wDesc->input('desc',$desc); + echo HtmlInput::hidden('m',$_GET['m']); + echo HtmlInput::hidden('action','modele_mgt'); echo '<br>'; - echo widget::button_href('Retour','?action=modele_mgt'); - echo widget::submit('upd','Modifie'); + echo HtmlInput::button_anchor('Retour','?action=modele_mgt'); + echo HtmlInput::submit('upd','Modifie'); echo '</form>'; } @@ -321,18 +322,18 @@ echo widget::button_href('Retour','?action=modele_mgt'); // action = del //--------------------------------------------------------------------------- if ( $sa == 'del' ) { - $cn=DbConnect(); - $name=getDbValue($cn,'select mod_name from modeledef where mod_id=$1',array($_REQUEST['m'])); + $cn=new Database(); + $name=$cn->get_value('select mod_name from modeledef where mod_id=$1',array($_REQUEST['m'])); echo '<form method="post">'; - echo widget::hidden('d',$_REQUEST['m']); - echo widget::hidden('sa','remove'); + echo HtmlInput::hidden('d',$_REQUEST['m']); + echo HtmlInput::hidden('sa','remove'); echo '<h2 class="error">Etes vous sure et certain de vouloir effacer '.$name.' ???</h2>'; - $confirm=new widget('checkbox'); + $confirm=new ICheckBox(); $confirm->name="p_confirm"; echo 'Cochez la case si vous êtes sûr de vouloir effacer ce modèle'; - echo $confirm->IOValue(); - echo widget::submit('remove','Effacer'); - echo widget::button_href('Retour','?action=modele_mgt'); + echo $confirm->input(); + echo HtmlInput::submit('remove','Effacer'); + echo HtmlInput::button_anchor('Retour','?action=modele_mgt'); echo '</form>'; } //--------------------------------------------------------------------------- @@ -341,13 +342,13 @@ if ( $sa == 'del' ) { if ( $sa == 'remove' ) { if ( ! isset ($_REQUEST['p_confirm'])) { echo('Désolé, vous n\'avez pas coché la case'); - echo widget::button_href('Retour','?action=modele_mgt'); + echo HtmlInput::button_anchor('Retour','?action=modele_mgt'); exit(); } - $cn=DbConnect(); + $cn=new Database(); $msg="dossier"; - $name=getDbValue($cn,"select mod_name from modeledef where mod_id=$1",array($_REQUEST['m'])); + $name=$cn->get_value("select mod_name from modeledef where mod_id=$1",array($_REQUEST['m'])); if ( strlen(trim($name)) == 0 ) { echo "<h2 class=\"error\"> $msg inexistant</h2>"; @@ -355,7 +356,7 @@ if ( $sa == 'remove' ) { } $sql="drop database ".domaine."mod".FormatString($_REQUEST['m']); ob_start(); - if ( pg_query($cn,$sql)==false) { + if ( $cn->exec_sql($sql)==false) { ob_end_clean(); echo "<h2 class=\"error\"> @@ -364,10 +365,10 @@ if ( $sa == 'remove' ) { } ob_flush(); $sql="delete from modeledef where mod_id=$1"; - ExecSqlParam($cn,$sql,array($_REQUEST['m'])); + $cn->exec_sql($sql,array($_REQUEST['m'])); print '<h2 class="info">'; print "Voilà le modèle $name est effacé</H2>"; - echo widget::button_href('Retour','?action=modele_mgt'); + echo HtmlInput::button_anchor('Retour','?action=modele_mgt'); } echo '</div>'; ?> diff --git a/include/opening.inc.php b/include/opening.inc.php index 2934b5bec..93799c27b 100644 --- a/include/opening.inc.php +++ b/include/opening.inc.php @@ -26,9 +26,10 @@ * current folder */ $sa=(isset($_REQUEST['sa']))?$_REQUEST['sa']:''; -$User=new User(DbConnect(dossier::id())); +$User=new User(new Database(dossier::id())); $User->Check(); $User->can_request(PAREO,1); +require_once("class_iselect.php"); require_once('class_acc_ledger.php'); /* -------------------------------------------------- * step 1 if nothing is asked we show the available folders @@ -42,10 +43,10 @@ if ($sa == '') { if ( empty( $avail) ) { echo '*** Aucun dossier ***';exit();} echo '<form method="post">'; - echo widget::hidden('p_action','ouv'); - echo widget::hidden('sa','step2'); + echo HtmlInput::hidden('p_action','ouv'); + echo HtmlInput::hidden('sa','step2'); echo dossier::hidden(); - $wAvail=new widget('select'); + $wAvail=new ISelect(); /* compute select list */ $array=array(); $i=0; @@ -56,8 +57,8 @@ if ($sa == '') { } $wAvail->value=$array; - echo 'Choix du dossier :'.$wAvail->IOValue('f'); - echo widget::submit('ok','Continuer'); + echo 'Choix du dossier :'.$wAvail->input('f'); + echo HtmlInput::submit('ok','Continuer'); echo '</form>'; echo '</fieldset>'; @@ -75,22 +76,22 @@ if ( $sa=='step2') { '<form method="post">'. ' Choississez l\'exercice du dossier '; echo dossier::hidden(); - echo widget::hidden('p_action','ouv'); - echo widget::hidden('sa','step3'); - echo widget::hidden('f',$_REQUEST['f']); - $cn=DbConnect($_REQUEST['f']); - $periode=make_array($cn,"select distinct p_exercice,p_exercice from parm_periode order by p_exercice"); - $w=new widget('select'); + echo HtmlInput::hidden('p_action','ouv'); + echo HtmlInput::hidden('sa','step3'); + echo HtmlInput::hidden('f',$_REQUEST['f']); + $cn=new Database($_REQUEST['f']); + $periode=$cn->make_array("select distinct p_exercice,p_exercice from parm_periode order by p_exercice"); + $w=new ISelect(); $w->table=0; $w->label='Periode'; $w->readonly=false; $w->value=$periode; $w->name="p_periode"; - echo 'Période : '.$w->IOValue(); - echo widget::submit('ok','Continuer'); + echo 'Période : '.$w->input(); + echo HtmlInput::submit('ok','Continuer'); echo dossier::hidden(); echo "</form>"; - echo widget::button_href('Retour',$back); + echo HtmlInput::button_anchor('Retour',$back); exit(0); } /* -------------------------------------------------- @@ -103,12 +104,12 @@ if ( $sa == 'step3') { '<form method="post">'. ' Choississez le journal qui contiendra l\'opération d\'ouverture '; echo dossier::hidden(); - echo widget::hidden('p_action','ouv'); - echo widget::hidden('sa','step4'); - echo widget::hidden('f',$_REQUEST['f']); - echo widget::hidden('p_periode',$_REQUEST['p_periode']); - $wLedger=new widget("select"); - $User=new User(DbConnect(dossier::id())); + echo HtmlInput::hidden('p_action','ouv'); + echo HtmlInput::hidden('sa','step4'); + echo HtmlInput::hidden('f',$_REQUEST['f']); + echo HtmlInput::hidden('p_periode',$_REQUEST['p_periode']); + $wLedger=new ISelect(); + $User=new User(new Database(dossier::id())); $avail=$User->get_ledger('ODS'); /* compute select list */ $array=array(); @@ -119,11 +120,11 @@ if ( $sa == 'step3') { $i++; } $wLedger->value=$array; - echo $wLedger->IOValue('p_jrn'); - echo widget::submit('ok','Continuer'); + echo $wLedger->input('p_jrn'); + echo HtmlInput::submit('ok','Continuer'); echo dossier::hidden(); echo "</form>"; - echo widget::button_href('Retour',$back); + echo HtmlInput::button_anchor('Retour',$back); exit(0); } @@ -134,7 +135,7 @@ if ( $sa == 'step3') { if ( $sa=='step4') { echo '<div class="content">'; echo '<fieldset><legend> Dernière étape</legend>'; - $cn_target=DbConnect($_REQUEST['f']); + $cn_target=new Database($_REQUEST['f']); $saldo=new Acc_Ledger($cn_target,0); $array=$saldo->get_saldo_exercice($_REQUEST['p_periode']); /* we need to transform the array into a Acc_Ledger array */ @@ -150,25 +151,25 @@ if ( $sa=='step4') { $amount='amount'.$idx; $ck='ck'.$idx; $result[$qcode] = $row['j_qcode']; - if ( $row['j_qcode']=='') + if ( trim($row['j_qcode'])=='') $result[$poste] = $row['j_poste']; $result[$amount] = abs($row['solde']); if ( $row['solde'] > 0 ) $result[$ck]='on'; $idx++; } - $cn=DbConnect(dossier::id()); + $cn=new Database(dossier::id()); $User=new User($cn); $jrn=new Acc_Ledger($cn,$_REQUEST['p_jrn']); echo '<form method="post" action="compta.php">'; - echo widget::hidden('p_action','quick_writing'); + echo HtmlInput::hidden('p_action','quick_writing'); echo dossier::hidden(); - echo widget::hidden('p_jrn',$_REQUEST['p_jrn']); + echo HtmlInput::hidden('p_jrn',$_REQUEST['p_jrn']); echo $jrn->show_form($result,0); echo '<hr>'; echo '<h2 class="notice">Ne corrigez pas encore, cliquez continuer pour passer à l\'étape suivante</h2>'; - echo widget::submit('correct_it','Continuer'); + echo HtmlInput::submit('correct_it','Continuer'); echo '</form>'; - echo widget::button_href('Retour',$back); + echo HtmlInput::button_anchor('Retour',$back); echo '</div>'; } diff --git a/include/operation_adm.inc.php b/include/operation_adm.inc.php new file mode 100644 index 000000000..8466ff801 --- /dev/null +++ b/include/operation_adm.inc.php @@ -0,0 +1,39 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief show all the operation for a customer + * the variable inherited are + * - $cn database connexion + * - $_REQUEST['f_id'] the f_id of the card + * - $p_action + * - $sub_action + * - $ss_action + */ +require_once('class_acc_ledger.php'); +$f=new fiche($cn,$_REQUEST['f_id']); +$qcode=$f->get_quick_code(); +$_GET['qcode']=$qcode; +$_REQUEST['qcode']=$qcode; +require_once ('user_action_gl.php'); +echo $sql; + diff --git a/html/js/update_pcmn.js b/include/operation_client.inc.php similarity index 67% rename from html/js/update_pcmn.js rename to include/operation_client.inc.php index 1fe128002..92e01a432 100644 --- a/html/js/update_pcmn.js +++ b/include/operation_client.inc.php @@ -1,3 +1,4 @@ +<?php /* * This file is part of PhpCompta. * @@ -19,18 +20,19 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*! \file - * \brief Open a window to update the pcmn - * +/*!\file + * \brief show all the operation for a customer + * the variable inherited are + * - $cn database connexion + * - $_REQUEST['f_id'] the f_id of the card + * - $p_action + * - $sub_action + * - $ss_action */ +require_once('class_acc_ledger.php'); +$f=new fiche($cn,$_REQUEST['f_id']); +$qcode=$f->get_quick_code(); +$_GET['qcode']=$qcode; +$_REQUEST['qcode']=$qcode; +require_once ('user_action_gl.php'); -function PcmnUpdate(p_value,p_lib,p_parent,p_type,p_sessid,p_dossier) - { - var win=window.open('line_update.php?l='+p_value+'&n='+p_lib+'&p='+p_parent+'&m'+p_type+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier,'Modifie','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes'); - } - -function RefreshMe() { - window.location.reload(); -} - - \ No newline at end of file diff --git a/html/js/cancel_op.js b/include/operation_supplier.inc.php similarity index 67% rename from html/js/cancel_op.js rename to include/operation_supplier.inc.php index da338e88b..92e01a432 100644 --- a/html/js/cancel_op.js +++ b/include/operation_supplier.inc.php @@ -1,3 +1,4 @@ +<?php /* * This file is part of PhpCompta. * @@ -19,16 +20,19 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*! \file - * \brief - * open a windows to confirm and cancel an operation +/*!\file + * \brief show all the operation for a customer + * the variable inherited are + * - $cn database connexion + * - $_REQUEST['f_id'] the f_id of the card + * - $p_action + * - $sub_action + * - $ss_action */ +require_once('class_acc_ledger.php'); +$f=new fiche($cn,$_REQUEST['f_id']); +$qcode=$f->get_quick_code(); +$_GET['qcode']=$qcode; +$_REQUEST['qcode']=$qcode; +require_once ('user_action_gl.php'); - -function cancelOperation(p_value,p_sessid,p_dossier,p_jrn) - { - var win=window.open('annulation.php?p_jrn='+p_jrn+'&jrn_op='+p_value+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier,'Annule','toolbar=no,width=400,height=400,scrollbars=yes,resizable=yes'); - } -function RefreshMe() { -window.location.reload(); -} \ No newline at end of file diff --git a/include/param_jrn.inc.php b/include/param_jrn.inc.php index 52b1e78a6..c0b026889 100644 --- a/include/param_jrn.inc.php +++ b/include/param_jrn.inc.php @@ -26,13 +26,12 @@ $gDossier=dossier::id(); include_once ("ac_common.php"); -include_once ("postgres.php"); +require_once('class_database.php'); include_once ("class_user.php"); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $User=new User($cn); $User->Check(); $User->check_dossier($gDossier); -include_once ("check_priv.php"); include_once ("user_menu.php"); diff --git a/include/param_jrn_add.inc.php b/include/param_jrn_add.inc.php index 922cd1ae3..51fca07eb 100644 --- a/include/param_jrn_add.inc.php +++ b/include/param_jrn_add.inc.php @@ -25,40 +25,46 @@ include_once ("ac_common.php"); include_once("jrn.php"); +require_once("class_itext.php"); +require_once("class_iselect.php"); require_once ('class_acc_ledger.php'); +/* javascript for the search poste */ +require_once('class_ipopup.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); + +/* ipopup for search poste */ +echo IPoste::ipopup('ipop_account'); html_page_start($_SESSION['g_theme']); require_once('class_dossier.php'); $gDossier=dossier::id(); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ include_once ("class_user.php"); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $User=new User($cn); $User->Check(); $User->check_dossier($gDossier); -include_once("check_priv.php"); include_once ("user_menu.php"); - - - $User->can_request(PARJRN); - -echo JS_SEARCH_POSTE; - if ( isset ($_POST["add"]) ) { if ( !isset($_POST["p_jrn_name"]) || ! isset($_POST["p_jrn_type"] )) { - echo '<H2 CLASS="error"> Un paramètre manque</H2>'; + echo '<H2 CLASS="error">'._('Un paramètre manque').'</H2>'; } else { /* if name already use we stop */ - if ( CountSql($cn,"select * from jrn_def where jrn_def_name=$1",array($_POST['p_jrn_name'])) >0 ) { + if ( $cn->count_sql("select * from jrn_def where upper(jrn_def_name)=upper($1)",array($_POST['p_jrn_name'])) >0 ) { - alert ('Un journal de ce nom existe déjà'); + alert (_('Un journal de ce nom existe déjà')); } else { if (strlen(trim($_POST['p_jrn_deb_max_line'])) == 0 || @@ -84,7 +90,7 @@ if ( isset ($_POST["add"]) ) { $p_jrn_fiche_cred=join(",",$_POST["FICHEDEB"]); } $l_cred_max_line=$l_deb_max_line; - StartSql($cn); + $cn->start(); $Sql="insert into jrn_def(jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_deb_max_line,jrn_cred_max_line, jrn_def_type,jrn_def_fiche_deb,jrn_def_fiche_cred,jrn_def_code,jrn_def_pj_pref) values ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10)"; @@ -93,11 +99,10 @@ if ( isset ($_POST["add"]) ) { $l_deb_max_line,$l_cred_max_line,$_POST['p_jrn_type'], $p_jrn_fiche_deb,$p_jrn_fiche_cred, $p_code,$_POST['jrn_def_pj_pref']); - $Res=ExecSqlParam($cn,$Sql,$sql_array); - $ledger_id=GetSequence($cn,'s_jrn_def'); - $Res=create_sequence($cn,'s_jrn_pj'.$ledger_id); - AlterSequence($cn,'s_jrn_pj'.$ledger_id,$_POST['jrn_def_pj_seq']); - Commit($cn); + $Res=$cn->exec_sql($Sql,$sql_array); + $ledger_id=$cn->get_current_seq('s_jrn_def'); + $Res=$cn->create_sequence('s_jrn_pj'.$ledger_id); + $cn->commit(); } } echo '<div class="lmenu">'; @@ -115,46 +120,48 @@ $sessid=$_REQUEST['PHPSESSID']; echo '<DIV CLASS="u_redcontent">'; /* widget for searching an account */ -$wSearch=new widget('js_search_poste_only'); -$wSearch->extra="p_jrn_class_deb"; -$wSearch->extra2='jrn'; -$wJrn=new widget('text'); -$wJrn->name='p_jrn_class_deb'; -$wJrn->size=40; -$wJrn->value=''; -$search=$wJrn->IOValue().$wSearch->IOValue(); +$wSearch=new IPoste(); +$wSearch->set_attribute('ipopup','ipop_account'); +$wSearch->set_attribute('account','p_jrn_class_deb'); +$wSearch->set_attribute('no_overwrite','1'); +$wSearch->set_attribute('noquery','1'); + +$wSearch->name="p_jrn_class_deb"; +$wSearch->size=40; + +$search=$wSearch->input(); /* construct all the hidden */ -$hidden= widget::hidden('p_jrn',0); -$hidden.= widget::hidden('p_action','jrn'); -$hidden.= widget::hidden('sa','add'); +$hidden= HtmlInput::hidden('p_jrn',0); +$hidden.= HtmlInput::hidden('p_action','jrn'); +$hidden.= HtmlInput::hidden('sa','add'); $hidden.= dossier::hidden(); -$hidden.=widget::hidden('p_jrn_deb_max_line',10); -$hidden.=widget::hidden('p_ech_lib','echeance'); +$hidden.=HtmlInput::hidden('p_jrn_deb_max_line',10); +$hidden.=HtmlInput::hidden('p_ech_lib','echeance'); /* properties of the ledger */ $name=""; $code=""; -$wType=new widget('select'); -$wType->value=make_array($cn,'select jrn_type_id,jrn_desc from jrn_type'); +$wType=new ISelect(); +$wType->value=$cn->make_array('select jrn_type_id,jrn_desc from jrn_type'); $wType->name="p_jrn_type"; -$type=$wType->IOValue(); +$type=$wType->input(); $rcred=$rdeb=array(); -$wPjPref=new widget('text'); +$wPjPref=new IText(); $wPjPref->name='jrn_def_pj_pref'; -$pj_pref=$wPjPref->IOValue(); -$wPjSeq=new widget('text'); +$pj_pref=$wPjPref->input(); +$wPjSeq=new IText(); $wPjSeq->value=0; $wPjSeq->name='jrn_def_pj_seq'; -$pj_seq=$wPjSeq->IOValue(); +$pj_seq=$wPjSeq->input(); echo '<FORM METHOD="POST">'; -echo dossier::hidden(); -echo widget::hidden('p_action','jrn'); -echo widget::hidden('sa','add'); +echo dossier::hidden().HtmlInput::phpsessid(); +echo HtmlInput::hidden('p_action','jrn'); +echo HtmlInput::hidden('sa','add'); require_once('template/param_jrn.php'); - -echo '<INPUT TYPE="SUBMIT" name="add" VALUE="Sauve"><INPUT TYPE="RESET" VALUE="Reset">'; +echo HtmlInput::submit('add','Sauver'); +echo '<INPUT TYPE="RESET" VALUE="Reset">'; echo '</FORM>'; echo "</DIV>"; html_page_stop(); diff --git a/include/param_jrn_detail.inc.php b/include/param_jrn_detail.inc.php index 1fa2b2fc0..0994062eb 100644 --- a/include/param_jrn_detail.inc.php +++ b/include/param_jrn_detail.inc.php @@ -21,45 +21,51 @@ /*! \file * \brief Show and let modify ledger parameter */ +require_once("class_itext.php"); require_once('class_dossier.php'); require_once('class_acc_ledger.php'); +/* javascript for the search poste */ +require_once('class_ipopup.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); + +/* ipopup for search poste */ +echo IPoste::ipopup('ipop_account'); $gDossier=dossier::id(); include_once ("ac_common.php"); html_page_start($_SESSION['g_theme']); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include_once ("class_user.php"); $User=new User($cn); $User->Check(); $User->check_dossier($gDossier); -include_once("check_priv.php"); $User->can_request(PARJRN); -// Javascript -echo JS_SEARCH_POSTE; if ( isset( $_REQUEST['p_jrn'] )) { $p_jrn=$_REQUEST['p_jrn']; } else { - echo '<h2 class="error">Journal inexistant</h2>'; + echo '<h2 class="error">'._('Journal inexistant').'</h2>'; exit(); } //-------------------------------------------------- // remove ledger //-------------------------------------------------- if ( isset($_POST["efface"])) { - if ( CountSql($cn,"select * from jrn where jr_def_id=".$_POST['p_jrn']." limit 3") == 0 ) + if ( $cn->count_sql("select * from jrn where jr_def_id=".$_POST['p_jrn']." limit 3") == 0 ) { - ExecSqlParam($cn,"delete from jrn_def where jrn_def_id=$1",array($_POST['p_jrn'])); - } else { echo ' -<script language="javascript"> - alert("Impossible d\'effacer ce journal.\n Il est utilisé\n"); -</script> -'; + $cn->exec_sql("delete from jrn_def where jrn_def_id=$1",array($_POST['p_jrn'])); + } else { + alert(_("Impossible d\'effacer ce journal.\n Il est utilisé\n")); } } @@ -68,7 +74,7 @@ if ( isset($_POST["efface"])) { // Update ledger If ( isset ($_POST["update"] )) { if ( !isset($_POST["p_jrn_name"]) ) { - echo '<H2 CLASS="error"> Un paramètre manque</H2>'; + echo '<H2 CLASS="error">'._('Un paramètre manque').'</H2>'; } else { if ( isset ($_POST['p_ech']) && $_POST['p_ech'] == 'no' ) { @@ -114,8 +120,8 @@ If ( isset ($_POST["update"] )) { $_GET['p_jrn'] ); echo_debug($Sql); - $Res=ExecSqlParam($cn,$Sql,$sql_array); - $Res=AlterSequence($cn,"s_jrn_pj".$_GET['p_jrn'],$_POST['jrn_def_pj_seq']); + $Res=$cn->exec_sql($Sql,$sql_array); + $Res=$cn->alter_seq("s_jrn_pj".$_GET['p_jrn'],$_POST['jrn_def_pj_seq']); } } echo '<div class="lmenu">'; @@ -129,15 +135,15 @@ echo '</div>'; </script> <?php -$Res=ExecSql($cn,"select jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,". +$Res=$cn->exec_sql("select jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,". "jrn_deb_max_line,jrn_cred_max_line,jrn_def_code". ",jrn_def_type,jrn_def_ech, jrn_def_ech_lib,jrn_def_fiche_deb,jrn_def_fiche_cred". " from jrn_def where". " jrn_def_id=".$_REQUEST['p_jrn']); -if ( pg_NumRows($Res) == 0 ) exit(); +if ( Database::num_row($Res) == 0 ) exit(); -$l_line=pg_fetch_array($Res,0); +$l_line=Database::fetch_array($Res,0); $sessid = $_REQUEST['PHPSESSID']; /* Load all the properties of the ledger */ @@ -147,33 +153,36 @@ $type=$prop['jrn_def_type']; $name=$prop['jrn_def_name']; $code=$prop['jrn_def_code']; /* widget for searching an account */ -$wSearch=new widget('js_search_poste_only'); -$wSearch->extra="p_jrn_class_deb"; -$wSearch->extra2='jrn'; -$wJrn=new widget('text'); -$wJrn->name='p_jrn_class_deb'; -$wJrn->size=40; -$wJrn->value=$prop['jrn_def_class_deb']; -$search=$wJrn->IOValue().$wSearch->IOValue(); -$wPjPref=new widget('text'); +$wSearch=new IPoste(); +$wSearch->set_attribute('ipopup','ipop_account'); +$wSearch->set_attribute('account','p_jrn_class_deb'); +$wSearch->set_attribute('no_overwrite','1'); +$wSearch->set_attribute('noquery','1'); +$wSearch->name="p_jrn_class_deb"; +$wSearch->size=40; +$wSearch->value=$prop['jrn_def_class_deb']; +$search=$wSearch->input(); + + +$wPjPref=new IText(); $wPjPref->name='jrn_def_pj_pref'; $wPjPref->value=$prop['jrn_def_pj_pref']; -$pj_pref=$wPjPref->IOValue(); -$wPjSeq=new widget('text'); +$pj_pref=$wPjPref->input(); +$wPjSeq=new IText(); $wPjSeq->value=$Ledger->get_last_pj(); $wPjSeq->name='jrn_def_pj_seq'; -$pj_seq=$wPjSeq->IOValue(); +$pj_seq=$wPjSeq->input(); $name=$l_line['jrn_def_name']; /* construct all the hidden */ -$hidden= widget::hidden('p_jrn',$_GET['p_jrn']); -$hidden.= widget::hidden('p_action','jrn'); -$hidden.= widget::hidden('sa','detail'); +$hidden= HtmlInput::hidden('p_jrn',$_GET['p_jrn']); +$hidden.= HtmlInput::hidden('p_action','jrn'); +$hidden.= HtmlInput::hidden('sa','detail'); $hidden.= dossier::hidden(); -$hidden.=widget::hidden('p_jrn_deb_max_line',10); -$hidden.=widget::hidden('p_ech_lib','echeance'); - +$hidden.=HtmlInput::hidden('p_jrn_deb_max_line',10); +$hidden.=HtmlInput::hidden('p_ech_lib','echeance'); +$hidden.=HtmlInput::phpsessid(); /* Load the card */ $card=$Ledger->get_fiche_def(); diff --git a/include/param_pcmn.inc.php b/include/param_pcmn.inc.php index c6a7c2e1e..33a9441eb 100644 --- a/include/param_pcmn.inc.php +++ b/include/param_pcmn.inc.php @@ -27,10 +27,10 @@ require_once("constant.php"); require_once('class_dossier.php'); $gDossier=dossier::id(); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include_once ("class_user.php"); $User=new User($cn); @@ -38,12 +38,11 @@ $User->Check(); $User->check_dossier($gDossier); include_once ("user_menu.php"); -include_once ("check_priv.php"); -echo JS_UPDATE_PCMN; +echo JS_ACCOUNTING_ITEM; /* Store the p_start parameter */ if ( ! isset ( $_SESSION['g_start']) ) { $_SESSION['g_start']=""; @@ -73,19 +72,19 @@ if (isset ($_GET['action'])) { if ( $_GET['action']=="del" ) { if ( isset ($_GET['l']) ) { /* Ligne a enfant*/ - $R=ExecSqlParam($cn,"select pcm_val from tmp_pcmn where pcm_val_parent=$1",array($_GET['l'])); - if ( pg_NumRows($R) != 0 ) { - echo "<SCRIPT> alert(\"Ne peut pas effacer le poste: d'autres postes en dépendent\");</SCRIPT>"; + $R=$cn->exec_sql("select pcm_val from tmp_pcmn where pcm_val_parent=$1",array($_GET['l'])); + if ( Database::num_row($R) != 0 ) { + alert("Ne peut pas effacer le poste: d'autres postes en dépendent"); } else { /* Vérifier que le poste n'est pas utilisé qq part dans les journaux */ - $Res=ExecSqlParam($cn,"select * from jrnx where j_poste=$1",array($_GET['l'])); - if ( pg_NumRows($Res) != 0 ) { - echo "<SCRIPT> alert(\"Ne peut pas effacer le poste: il est utilisé dans les journaux\");</SCRIPT>"; + $Res=$cn->exec_sql("select * from jrnx where j_poste=$1",array($_GET['l'])); + if ( Database::num_row($Res) != 0 ) { + alert("Ne peut pas effacer le poste: il est utilisé dans les journaux"); } else { - $Del=ExecSqlParam($cn,"delete from tmp_pcmn where pcm_val=$1",array($_GET['l'])); - } // if pg_NumRows - } // if pg_NumRows + $Del=$cn->exec_sql("delete from tmp_pcmn where pcm_val=$1",array($_GET['l'])); + } // if Database::num_row + } // if Database::num_row } // isset ($l) } //$action == del } // isset action @@ -111,21 +110,21 @@ if ( isset ( $_POST["Ajout"] ) ) { echo_debug('pcmn_update.php',__LINE__,"Ajout valeur = $p_val parent = $p_parent"); } /* Parent existe */ - $Ret=ExecSqlParam($cn,"select pcm_val from tmp_pcmn where pcm_val=$1",array($p_parent)); - if ( $p_parent != 0 && pg_NumRows($Ret) == 0 ) { - echo '<SCRIPT> alert(" Ne peut pas modifier; aucun poste parent"); </SCRIPT>'; + $Ret=$cn->exec_sql("select pcm_val from tmp_pcmn where pcm_val=$1",array($p_parent)); + if ( $p_parent != 0 && Database::num_row($Ret) == 0 ) { + alert(" Ne peut pas modifier; aucun poste parent"); } else { // Check if the account already exists - $Count=CountSql($cn,"select * from tmp_pcmn where pcm_val='".$p_val."'"); + $Count=$cn->count_sql("select * from tmp_pcmn where pcm_val='".$p_val."'"); if ( $Count != 0 ) { // Alert message account already exists - echo '<SCRIPT> alert(" Ce poste existe déjà "); </SCRIPT>'; + alert(" Ce poste existe déjà "); } else { - $Ret=ExecSqlParam($cn,"insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values ($1,$2,$3,$4)",array($p_val,$p_lib,$p_parent,$p_type)); + $Ret=$cn->exec_sql("insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values ($1,$2,$3,$4)",array($p_val,$p_lib,$p_parent,$p_type)); } } } else { @@ -134,15 +133,15 @@ if ( isset ( $_POST["Ajout"] ) ) { } } -$Ret=ExecSql($cn,"select pcm_val,pcm_lib,pcm_val_parent,pcm_type from tmp_pcmn where substr(pcm_val::text,1,1)='".$_SESSION['g_start']."' order by pcm_val::text"); -$MaxRow=pg_NumRows($Ret); +$Ret=$cn->exec_sql("select pcm_val,pcm_lib,pcm_val_parent,pcm_type from tmp_pcmn where substr(pcm_val::text,1,1)='".$_SESSION['g_start']."' order by pcm_val::text"); +$MaxRow=Database::num_row($Ret); ?> <FORM METHOD="POST"> <?php -echo widget::hidden('p_action','pcmn'); -//echo widget::hidden('sa','detail'); +echo HtmlInput::hidden('p_action','pcmn'); +//echo HtmlInput::hidden('sa','detail'); echo dossier::hidden(); ?> <TABLE ALIGN="center" BORDER=0 CELLPADDING=0 CELLSPACING=0> @@ -163,7 +162,7 @@ echo dossier::hidden(); <?php $str_dossier=dossier::get(); for ($i=0; $i <$MaxRow; $i++) { - $A=pg_fetch_array($Ret,$i); + $A=Database::fetch_array($Ret,$i); if ( $i%2 == 0 ) { $td ='<TD class="odd">'; diff --git a/include/param_sec.inc.php b/include/param_sec.inc.php index ce70efb2f..451eaa491 100644 --- a/include/param_sec.inc.php +++ b/include/param_sec.inc.php @@ -25,21 +25,21 @@ */ include_once ("ac_common.php"); -include_once("check_priv.php"); +require_once("class_iselect.php"); require_once('class_dossier.php'); $gDossier=dossier::id(); $str_dossier=dossier::get(); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include_once ("class_user.php"); $User=new User($cn); $User->Check(); $User->check_dossier($gDossier); include_once ("user_menu.php"); -$cn_dossier=DbConnect($gDossier); +$cn_dossier=new Database($gDossier); if ( $User->check_action(PARSEC) == 0 ) { @@ -48,17 +48,17 @@ if ( $User->check_action(PARSEC) == 0 ) { exit -1; } -$cn=DbConnect(); +$cn=new Database(); /* Show all the users, included local admin */ -$user_sql=ExecSql($cn,"select use_id,use_first_name,use_name,use_login,use_admin,priv_priv from ac_users natural join jnt_use_dos ". +$user_sql=$cn->exec_sql("select use_id,use_first_name,use_name,use_login,use_admin,priv_priv from ac_users natural join jnt_use_dos ". " join priv_user on (jnt_id=priv_jnt) where use_login != 'phpcompta' and dos_id=".$gDossier); -$MaxUser=pg_NumRows($user_sql); +$MaxUser=Database::num_row($user_sql); echo '<DIV class="content" >'; echo '<TABLE CELLSPACING="20" ALIGN="CENTER">'; for ($i = 0;$i < $MaxUser;$i++) { - $l_line=pg_fetch_array($user_sql,$i); + $l_line=Database::fetch_array($user_sql,$i); // echo '<TR>'; if ( $i % 3 == 0 && $i != 0) echo "</TR><TR>"; @@ -89,41 +89,41 @@ if ( isset($_POST['ok'])) { $sec_User=new User($cn_dossier,$_POST['user_id']); /* Save first the ledger */ - $cn_dossier=DbConnect(dossier::id()); - $a=get_array($cn_dossier,'select jrn_def_id from jrn_def'); + $cn_dossier=new Database(dossier::id()); + $a=$cn_dossier->get_array('select jrn_def_id from jrn_def'); foreach ($a as $key) { $id=$key['jrn_def_id']; $priv=sprintf("jrn_act%d",$id); - $count=getDbValue($cn_dossier,'select count(*) from user_sec_jrn where uj_login=$1 '. + $count=$cn_dossier->get_value('select count(*) from user_sec_jrn where uj_login=$1 '. ' and uj_jrn_id=$2',array($sec_User->login,$id)); if ( $count == 0 ) { - ExecSqlParam($cn_dossier,'insert into user_sec_jrn (uj_login,uj_jrn_id,uj_priv)'. + $cn_dossier->exec_sql('insert into user_sec_jrn (uj_login,uj_jrn_id,uj_priv)'. ' values ($1,$2,$3)', array($sec_User->login,$id,$_POST[$priv])); } else { - ExecSqlParam($cn_dossier,'update user_sec_jrn set uj_priv=$1 where uj_login=$2 and uj_jrn_id=$3', + $cn_dossier->exec_sql('update user_sec_jrn set uj_priv=$1 where uj_login=$2 and uj_jrn_id=$3', array($_POST[$priv],$sec_User->login,$id)); } } /* now save all the actions */ - $a=get_array($cn_dossier,'select ac_id from action'); + $a=$cn_dossier->get_array('select ac_id from action'); foreach ($a as $key) { $id=$key['ac_id']; $priv=sprintf("action%d",$id); - $count=getDbValue($cn_dossier,'select count(*) from user_sec_act where ua_login=$1 '. + $count=$cn_dossier->get_value('select count(*) from user_sec_act where ua_login=$1 '. ' and ua_act_id=$2',array($sec_User->login,$id)); if ( $_POST[$priv] == 1 && $count == 0) { - ExecSqlParam($cn_dossier,'insert into user_sec_act (ua_login,ua_act_id)'. + $cn_dossier->exec_sql('insert into user_sec_act (ua_login,ua_act_id)'. ' values ($1,$2)', array($sec_User->login,$id)); } if ($_POST[$priv] == 0 ){ - ExecSqlParam($cn_dossier,'delete from user_sec_act where ua_login=$1 and ua_act_id=$2', + $cn_dossier->exec_sql('delete from user_sec_act where ua_login=$1 and ua_act_id=$2', array($sec_User->login,$id)); } } @@ -140,7 +140,7 @@ if ( isset($_POST['ok'])) { if ( $action == "view" ) { $l_Db=sprintf("dossier%d",$gDossier); - $cn=DbConnect(); + $cn=new Database(); $User=new User($cn,$_GET['user_id']); echo '<h2>'.h($User->first_name).' '.h($User->name).' '.hi($User->login); @@ -171,7 +171,7 @@ if ( $action == "view" ) { // Show access for journal //-------------------------------------------------------------------------------- - $Res=ExecSql($cn_dossier,"select jrn_def_id,jrn_def_name from jrn_def ". + $Res=$cn_dossier->exec_sql("select jrn_def_id,jrn_def_name from jrn_def ". " order by jrn_def_name"); $sec_User=new User($cn_dossier,$_GET['user_id']); @@ -180,17 +180,17 @@ if ( $action == "view" ) { $_GET ['user_id'] ); - echo widget::button('Imprime','imprime',"onclick=\"window.open('".$sHref."');\""); - echo widget::submit('ok','Sauve'); - echo widget::reset('Annule'); + echo HtmlInput::button('Imprime','imprime',"onclick=\"window.open('".$sHref."');\""); + echo HtmlInput::submit('ok','Sauve'); + echo HtmlInput::reset('Annule'); echo dossier::hidden(); - echo widget::hidden('action','sec'); - echo widget::hidden('user_id',$_GET['user_id']); + echo HtmlInput::hidden('action','sec'); + echo HtmlInput::hidden('user_id',$_GET['user_id']); echo '<Fieldset><legend>Journaux </legend>'; echo '<table align="CENTER" width="100%">'; - $MaxJrn=pg_NumRows($Res); - $jrn_priv=new widget ('select'); + $MaxJrn=Database::num_row($Res); + $jrn_priv=new ISelect(); $array=array( array ('value'=>'R','label'=>'Uniquement lecture'), array ('value'=>'W','label'=>'Lecture et écriture'), @@ -200,7 +200,7 @@ if ( $action == "view" ) { for ( $i =0 ; $i < $MaxJrn; $i++ ) { /* set the widget */ - $l_line=pg_fetch_array($Res,$i); + $l_line=Database::fetch_array($Res,$i); echo '<TR> '; if ( $i == 0 ) echo '<TD> <B> Journal </B> </TD>';else echo "<TD></TD>"; @@ -211,7 +211,7 @@ if ( $action == "view" ) { $jrn_priv->selected=$sec_User->get_ledger_access($l_line['jrn_def_id']); echo '<td>'; - echo $jrn_priv->IOValue(); + echo $jrn_priv->input(); echo '</td>'; echo '</tr>'; } @@ -224,9 +224,9 @@ if ( $action == "view" ) { echo '<fieldset> <legend>Actions </legend>'; include('template/security_list_action.php'); echo '</fieldset>'; - echo widget::button('Imprime','imprime',"onclick=\"window.open('".$sHref."');\""); - echo widget::submit('ok','Sauve'); - echo widget::reset('Annule'); + echo HtmlInput::button('Imprime','imprime',"onclick=\"window.open('".$sHref."');\""); + echo HtmlInput::submit('ok','Sauve'); + echo HtmlInput::reset('Annule'); echo '</form>'; } // end of the form echo "</DIV>"; diff --git a/include/payment_middle.inc.php b/include/payment_middle.inc.php index b8f4bda02..e61aa849d 100644 --- a/include/payment_middle.inc.php +++ b/include/payment_middle.inc.php @@ -20,6 +20,14 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr require_once('class_acc_payment.php'); +echo JS_LEDGER; +echo JS_AJAX_FICHE; +echo JS_PROTOTYPE; +echo JS_CARD; +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); + //--------------------------------------------------------------------------- // Common variable $td='<TD>';$etd='</td>';$tr='<tr>';$etr='</tr>';$th='<th>';$eth='</th>'; @@ -33,24 +41,21 @@ echo '<div class="content">'; //---------------------------------------------------------------------- // change if ( $sb=='change') { - echo JS_SEARCH_CARD; - echo JS_AJAX_FICHE; - echo JS_PROTOTYPE; if ( !isset($_GET['id'])) exit; $row=new Acc_Payment($cn,$_GET['id']); $row->load(); echo '<form method="post" action="parametre.php">'; echo dossier::hidden(); - echo widget::hidden('p_jrn',0); - echo widget::hidden('p_action','divers'); - echo widget::hidden('sa','mp'); - echo widget::hidden('sb','save'); - echo widget::hidden('mp_type',$row->get_parameter('type')); - echo widget::hidden('mp_lib',$row->get_parameter('lib')); + echo HtmlInput::hidden('p_jrn',0); + echo HtmlInput::hidden('p_action','divers'); + echo HtmlInput::hidden('sa','mp'); + echo HtmlInput::hidden('sb','save'); + echo HtmlInput::hidden('mp_type',$row->get_parameter('type')); + echo HtmlInput::hidden('mp_lib',$row->get_parameter('lib')); echo $row->form(); - echo widget::submit('save','Sauve'); - echo widget::button_href('Retour sans sauvez', + echo HtmlInput::submit('save',_('Sauve')); + echo HtmlInput::button_anchor(_('Retour sans sauvez'), '?p_action=divers&sa=mp&'.dossier::get() ); echo '</form>'; @@ -79,13 +84,13 @@ $array=$mp->get_all(); /* if there are data show them in a table */ if ( ! empty ($array)) { echo '<table style="border: 2px outset blue; width: 100%;" >'; - echo $tr.$th.'Libellé'.$eth.$th.'Type de fiche' - .$eth.$th.'enregistré dans le journal'.$eth. - $th.' Avec la fiche'.$eth.$th.'Action'.$eth.$etr; + echo $tr.$th._('Libellé').$eth.$th._('Type de fiche') + .$eth.$th._('enregistré dans le journal').$eth. + $th._(' Avec la fiche').$eth.$th.'Action'.$eth.$etr; foreach ($array as $row) { echo $tr; echo $row->row(); - echo $td.widget::button_href('Modifie','?p_action=divers&sa=mp&sb=change&'.dossier::get(). + echo $td.HtmlInput::button_anchor(_('Modifie'),'?p_action=divers&sa=mp&sb=change&'.dossier::get(). '&id='.$row->get_parameter('id')); echo $etr; @@ -112,7 +117,7 @@ if ( ! empty ($array)) { foreach ($array as $row) { echo $tr; echo $row->row(); - echo $td.widget::button_href('Modifie','?p_action=divers&sa=mp&sb=change&'.dossier::get(). + echo $td.HtmlInput::button_anchor('Modifie','?p_action=divers&sa=mp&sb=change&'.dossier::get(). '&id='.$row->get_parameter('id')); echo $etr; diff --git a/include/periode.inc.php b/include/periode.inc.php index db25ed476..2d01601d2 100644 --- a/include/periode.inc.php +++ b/include/periode.inc.php @@ -22,11 +22,10 @@ * \brief add, modify, close or delete a period */ $gDossier=dossier::id(); -require_once ('class_widget.php'); -require_once("preference.php"); +require_once("class_iselect.php"); require_once ('class_periode.php'); echo '<div class="content">'; -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); //----------------------------------------------------- // Periode //----------------------------------------------------- @@ -65,7 +64,7 @@ if ( isset ($_POST["conf_chg_per"] ) ) { echo "<H2 class=\"error\"> Valeurs invalides</H2>"; return; } - $Res=ExecSql($cn," update parm_periode ". + $Res=$cn->exec_sql(" update parm_periode ". "set p_start=to_date('". $p_date_start."','DD.MM.YYYY'),". " p_end=to_date('". $p_date_end."','DD.MM.YYYY'),". " p_exercice='".$p_exercice."'". @@ -103,16 +102,16 @@ if ( $action== "delete_per" ) { $User->can_request(PARPER); $p_per=$_GET["p_per"]; // Check if the periode is not used - if ( CountSql($cn,"select * from jrnx where j_tech_per=$p_per") != 0 ) { + if ( $cn->count_sql("select * from jrnx where j_tech_per=$p_per") != 0 ) { echo '<h2 class="error"> Désolé mais cette période est utilisée</h2>'; } else { - $Res=ExecSql($cn,"delete from parm_periode where p_id=$p_per"); + $Res=$cn->exec_sql("delete from parm_periode where p_id=$p_per"); } $choose="yes"; } if ( $choose=="yes" ) { - echo widget::button_href('Autre Journal ?','?choose=no&p_action=periode&gDossier='.dossier::id()); + echo HtmlInput::button_anchor('Autre Journal ?','?choose=no&p_action=periode&gDossier='.dossier::id()); $per=new Periode($cn); $jrn=(isset($_GET['jrn_def_id']))?$_GET['jrn_def_id']:0; $per->set_jrn($jrn); @@ -121,15 +120,15 @@ if ( $choose=="yes" ) { } else { echo '<form method="GET" action="?">'; echo dossier::hidden(); - $sel_jrn=make_array($cn,"select jrn_def_id, jrn_def_name from ". + $sel_jrn=$cn->make_array("select jrn_def_id, jrn_def_name from ". " jrn_def order by jrn_def_name"); $sel_jrn[]=array('value'=>0,'label'=>'Global : periode pour tous les journaux'); - $wSel=new widget("select"); + $wSel=new ISelect(); $wSel->value=$sel_jrn; $wSel->name='jrn_def_id'; - echo "Choississez global ou uniquement le journal à fermer".$wSel->IOValue(); - echo widget::submit('choose','Valider'); - echo widget::hidden('p_action','periode'); + echo "Choississez global ou uniquement le journal à fermer".$wSel->input(); + echo HtmlInput::submit('choose','Valider'); + echo HtmlInput::hidden('p_action','periode'); echo "</form>"; echo '<p class="info"> Pour ajouter, effacer ou modifier une période, il faut choisir global</p>'; } diff --git a/include/poste.inc.php b/include/poste.inc.php index 9db48878e..5d137b5bc 100644 --- a/include/poste.inc.php +++ b/include/poste.inc.php @@ -22,7 +22,11 @@ * \brief p_action contains the main action (always poste here) * action contains the sub action */ +require_once("class_ihidden.php"); require_once("class_acc_parm_code.php"); +echo '<div class="content">'; + +$gDossier=dossier::id(); //----------------------------------------------------- // confirm mod @@ -43,11 +47,11 @@ for ($i=0;$i<sizeof($all);$i++) { echo '<TR>'; echo $all[$i]->display(); echo '<TD><FORM method="POST">'; - $w=new widget('hidden'); + $w=new IHidden(); $w->name='id'; $w->value=$i; - echo $w->IOValue(); - echo widget::submit('mod','modifie'); + echo $w->input(); + echo HtmlInput::submit('mod','modifie'); echo '</FORM>'; echo '</TD>'; echo "</TR>"; @@ -59,6 +63,7 @@ echo "</div>"; if ( isset ($_POST['mod'] )) { echo '<div style="float:left;">'; + echo IPoste::ipopup('ipop_account'); echo '<fieldset>'; echo "<legend>Voulez-vous vraiment modifier ?</legend>"; echo '<FORM METHOD="POST">'; @@ -67,14 +72,16 @@ if ( isset ($_POST['mod'] )) $id=$_POST['id']; echo $all[$id]->form(); echo "</TABLE>"; - $h=new widget('hidden'); + $h=new IHidden(); $h->name='p_action'; - $h->value='poste'; - echo $h->IOValue(); - echo widget::submit('confirm_mod','Confirme'); - echo widget::submit('no','Cancel'); + $h->value='divers';; + echo $h->input(); + echo HtmlInput::hidden('sa','poste'); + echo HtmlInput::submit('confirm_mod','Confirme'); + echo HtmlInput::submit('no','Cancel'); echo "</FORM>"; echo '</fieldset>'; echo "</div>"; } +echo '</div>'; diff --git a/include/poste.php b/include/poste.php deleted file mode 100644 index f36dcc03b..000000000 --- a/include/poste.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/* $Revision$ */ -/*!\file - * \brief contains several function for Account, will be removed - * \todo remove these files and move those function to class_acc_account -*/ -/*! - * \brief Return the label of a poste - * - * - * \param $p_dossier - * \param $p_id tmp_pcmn (pcm_val) - * \param $is_cn conneciton - * - * \return string - * - * - */ -function GetPosteLibelle($p_dossier,$p_id,$is_cn=0) -{ - include_once("postgres.php"); - if ( ! isset($is_cn) ) $is_cn=0; - if ( $is_cn == 0) { - $cn=DbConnect($p_dossier); - } else { - $cn=$p_dossier; - } - $Res=ExecSql($cn,"select pcm_lib from tmp_pcmn where pcm_val=$p_id"); - if ( pg_NumRows($Res) == 0) { return "non existing poste";} - $l_poste=pg_fetch_row($Res,0); - return $l_poste[0]; -} -/*! - * \brief give the balance of an account - * - * - * \param $p_cn connection - * \param $p_account account - * \param $p_cond sql condition - * - * \return balance of the account - * - */ -function get_solde($p_cn,$p_account,$p_cond="") { - $Res=ExecSql($p_cn,"select j_poste,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, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx join tmp_pcmn on j_poste=pcm_val - where - j_poste=$p_account - $p_cond - ) as m group by j_poste "); - $Max=pg_NumRows($Res); - if ($Max==0) return 0; - $r=pg_fetch_array($Res,0); - - return $r['sum_deb']-$r['sum_cred']; -} -?> diff --git a/include/postgres.php b/include/postgres.php deleted file mode 100644 index a3a5866a3..000000000 --- a/include/postgres.php +++ /dev/null @@ -1,622 +0,0 @@ -<?php -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - - //$Revision$ -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*! \file - * \brief Contains the procedure for connecting to postgresql - */ - -/*! - * \param 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 -++*/ -function ShowDossier($p_type,$p_first=0,$p_max=10,$p_Num=0) { - $l_user=$_SESSION['g_user']; - if ( $p_max == 0 ) { - $l_step=""; - } else { - $l_step="LIMIT $p_max OFFSET $p_first"; - } - $cn=DbConnect(); - if ( $p_type == "all") { - $l_sql="select *, 'W' as priv_priv from ac_dossier ORDER BY dos_name "; - $p_Num=CountSql($cn,$l_sql); - } else { - $l_sql="select * from jnt_use_dos - natural join ac_dossier - natural join ac_users - inner join priv_user on priv_jnt=jnt_id where - use_login='".$l_user."' and priv_priv !='NO' - order by dos_name "; - $p_Num=CountSql($cn,$l_sql); - } - $l_sql=$l_sql.$l_step; - $p_res=ExecSql($cn,$l_sql); - - echo_debug('postgres.php',__LINE__,"ShowDossier:".$p_res." Line = $p_Num"); - - $Max=pg_NumRows($p_res); - if ( $Max == 0 ) return null; - for ( $i=0;$i<$Max; $i++) { - // echo_debug ("i = $i"); - $row[]=pg_fetch_array($p_res,$i); - //echo $row[dossier]; - } - return $row; -} - -/*! - * \brief connect to the database - * <br>example - * <ul> - * <li> DbConnect () connects to account_repository</li> - * <li> DbConnect(1) connects to dossier1</li> - * <li> DbConnect(1,'mod') connects to mod1</li> - * <li> DbConnect(-2,'postgres') connects to the db postgres</li> - *</ul> - * - * \param p_db : db_name id (or -1 for account_repository or -2 if p_type contains the full name of a database - * - * \param p_type = dossier, mod or the name of a datase - * \return the connection - */ -function DbConnect($p_db=-1,$p_type='dossier') { - if ( IsNumber($p_db) == false || strlen($p_db) > 5 ) - die ("Dossier invalide"); - - if ( $p_db==-1) - $l_dossier=sprintf("%saccount_repository",domaine); - else { - if ( $p_db == -2 ) - $l_dossier=$p_type; - else - switch ($p_type) { - case 'dossier': - $l_dossier=sprintf("%sdossier%d",domaine,$p_db); - break; - case 'mod': - $l_dossier=sprintf("%smod%d",domaine,$p_db); - break; - } - } - $phpcompta_user=phpcompta_user; - $password=phpcompta_password; - $port=phpcompta_psql_port; - $host=( ! defined ("phpcompta_psql_host"))?'127.0.0.1':phpcompta_psql_host; - ob_start(); - $a=pg_connect("dbname=$l_dossier host='$host' user='$phpcompta_user' -password='$password' port=$port"); - - if ( $a == false ) - { - ob_end_clean(); - echo '<h2 class="error">Impossible de se connecter à postgreSql !</h2>'; - echo "Vos paramètres sont incorrectes : <br>"; - echo "<br>"; - echo "base de donnée : $l_dossier<br>"; - echo "Domaine : ".domaine."<br>"; - echo "Port $port <br>"; - echo "Utilisateur : $phpcompta_user <br>"; - echo "host : $host <br>"; - - exit ("Connection impossible : vérifiez vos paramètres de base -de données"); - - } - ob_end_clean(); - echo_debug ('postgres.php',__LINE__,"connect to $p_db dbname $l_dossier"); - return $a; -} -/*! - * \brief send a sql string to the database - * \param $p_connection db connection - * \param $p_string sql string - * \return false if error otherwise true - */ -function ExecSql($p_connection, $p_string,$p_encoding='utf8') { - echo_debug('postgres.php',__LINE__,"SQL = $p_string"); - // probl. with Ubuntu & UTF8 - //---- - try { - pg_set_client_encoding($p_connection,$p_encoding); - $ret=pg_query($p_connection,$p_string); - if ( ! $ret ) throw new Exception (" SQL ERROR $p_string ",1); - } catch (Exception $a) { - echo $p_string; - $a->getMessage(); - $a->getTrace(); - return $ret; - } - return $ret; - -} -/*! - * \brief send a sql string to the database using the function - * pg_query_params. Useful for avoiding the problem with the quotes - * and to execute several times the same command - * \param $p_connection db connection - * \param $p_string sql string - * \param $p_array array containing the value - * \return false if error otherwise true - */ -function ExecSqlParam($p_connection, $p_string,$p_array) { - echo_debug('postgres.php',__LINE__,"SQL = $p_string"); - echo_debug('postgres.php',__LINE__,$p_array); - // probl. with Ubuntu & UTF8 - //---- - - pg_set_client_encoding($p_connection,'utf8'); - //ob_start(); - $ret=pg_query_params($p_connection,$p_string,$p_array); - if ( ! $ret ) { - //ob_end_clean(); - $r=$p_string."array ".var_export($p_array,TRUE); - throw new Exception (" SQL ERROR $r",1); - } - //ob_end_clean(); - return $ret; - -} - -/*! - * \brief Return all the users - * as an array - */ -function GetAllUser() { - echo_debug('postgres.php',__LINE__,"GetUser"); - $cn=DbConnect(); - $sql="select * from ac_users where use_login!='phpcompta'"; - echo_debug('postgres.php',__LINE__,"ExecSql"); - $Res=ExecSql($cn,$sql); - $Num=pg_NumRows($Res); - if ( $Num == 0 ) return null; - for ($i=0;$i < $Num; $i++) { - $User[]=pg_fetch_array($Res,$i); - } - return $User; -} - -/*! - * \brief Get the number of rows - * from table jnt_use_dos where $p_dossier = dos_id and - * use_id=$p_user. - */ -function ExisteJnt($p_dossier,$p_user) -{ - $cn=DbConnect(); - $Res=ExecSql($cn,"select * from jnt_use_dos where dos_id=".$p_dossier." and use_id=".$p_user); - return pg_NumRows($Res); -} -/* ExistePriv - * - * - * - */ -function ExistePriv($p_jntid) -{ - $cn=DbConnect(); - $Res=ExecSql($cn,"select * from priv_user where priv_jnt=".$p_jntid); - return pg_NumRows($Res); -} -/* GetJnt - * Get the jnt - * - * - */ -function GetJnt($p_dossier,$p_user) -{ - $cn=DbConnect(); - $Res=ExecSql($cn,"select jnt_id from jnt_use_dos where dos_id=".$p_dossier." and use_id=".$p_user); - $R=pg_fetch_array($Res,0); - return $R['jnt_id']; -} -/*! \brief Count the number of row - * - * \param $p_conn connection handler - * \param $p_sql sql string - * \param $array if not null we use the safer ExecSqlParam - */ - -function CountSql($p_conn,$p_sql,$array=null) -{ - if ( $array == null ) - $r_sql=ExecSql($p_conn,$p_sql); - else - $r_sql=ExecSqlParam($p_conn,$p_sql,$array); - return pg_NumRows($r_sql); - -} -/*! - * \param id of a dossier - * \return Name of the dossier - */ -function GetDossierName($p_dossier) -{ - $cn=DbConnect(); - $Ret=ExecSql($cn,"select dos_name from ac_dossier where dos_id=".$p_dossier); - $r= pg_fetch_array($Ret,0); - return $r['dos_name']; -} - -/*!\brief get the current sequence - */ -function GetSequence($p_cn,$p_seq) -{ - $Res=ExecSql($p_cn,"select currval('$p_seq') as seq"); - $seq=pg_fetch_array($Res,0); - return $seq['seq']; -} - -/*!\brief get the current sequence - */ -function NextSequence($p_cn,$p_seq) -{ - $Res=ExecSql($p_cn,"select nextval('$p_seq') as seq"); - $seq=pg_fetch_array($Res,0); - return $seq['seq']; -} -function StartSql($p_cn) { - $Res=ExecSql($p_cn,"start transaction"); -} -function EndSql($p_cn) { - $Res=ExecSql($p_cn,"end transaction"); -} -function Commit($p_cn) { - $Res=ExecSql($p_cn,"commit"); -} -function Rollback($p_cn) { - $Res=ExecSql($p_cn,"rollback"); -} -function AlterSequence($p_cn,$p_name,$p_value) { - if ( $p_value <= 0 ) $p_value=1; - $Res=ExecSql($p_cn,"alter sequence $p_name restart $p_value"); -} -/*! - * \brief Get the properties of an user - * it means theme, profile, admin... - * - * \param $p_user user login - * \param $p_cn connection - * - * \return an array containing - * - use_admin - * - use_usertype - * - g_theme - * - use_name - * - use_login - */ -function GetUserProperty($p_cn,$p_user) -{ - $sql="select use_login,use_first_name,use_name,use_admin,use_usertype,g_theme - from ac_users where use_login='$p_user'"; - $Ret=ExecSql($p_cn,$sql); - if ( pg_NumRows($Ret) == 0) - return array('use_first_name'=>'?', - 'use_name'=>'Unknown', - 'use_admin'=>0, - 'use_usertype'=>'user', - 'g_theme'=>'classic', - 'use_login'=>$p_user); - - $a=pg_fetch_array($Ret,0); - return $a; -} -/*! - * \brief Give the mod_id from modeledef - * - * - * \param $p_cn database connection (repository) - * \param $p_modname template name - * \return template id or 0 if not found - * - */ -function GetModeleId($p_cn,$p_modname) { - $Res=ExecSql($p_cn,"select mod_id from modeledef where mod_name='$p_modname'"); - if (pg_NumRows($Res) == 0) return 0; - $name=pg_fetch_array($Res,0); - return $name['mod_id']; -} - - - /*!\brief purpose return the result of a sql statment - * in a array - * \param $p_cn database connection - * \param $p_sql sql query - * \param $p_array if not null we use ExecSqlParam - */ -function get_array($p_cn,$p_sql,$p_array=null) { - echo_debug('postgres.php',__LINE__,"get_array"); - if ( $p_array == null ) { - - $r=ExecSql($p_cn,$p_sql); - } else { - $r=ExecSqlParam($p_cn,$p_sql,$p_array); - } - if ( ($Max= pg_NumRows($r)) == 0 ) return null; - $array=pg_fetch_all($r); - echo_debug('postgres.php',__LINE__,var_export($array,true)); - return $array; -} -/*! save_upload_document - * \brief Save a "piece justificative" - * - * \param $cn database connection - * \param $seq jr_grpt_id - * \return $oid of the lob file if success - * null if a error occurs - - * - */ -function save_upload_document ($cn,$seq) { - - $new_name=tempnam($_ENV['TMP'],'pj'); - echo_debug('postgres.php',__LINE__,"new name=".$new_name); - echo_debug(__FILE__.":".__LINE__.$_FILES); - if ($_FILES["pj"]["error"] > 0) - { - echo_error(__FILE__.":".__LINE__."Error: " . $_FILES["pj"]["error"] ); - } - if ( strlen ($_FILES['pj']['tmp_name']) != 0 ) { - echo_debug(__FILE__.":".__LINE__.'_FILE is'.$_FILES['pj']['tmp_name']); - if (move_uploaded_file($_FILES['pj']['tmp_name'], - $new_name)) { - // echo "Image saved"; - echo_debug(__FILE__.":".__LINE__."Doc saved"); - $oid= pg_lo_import($cn,$new_name); - if ( $oid == false ) { - echo_error('postgres.php',__LINE__,"cannot upload document"); - Rollback($cn); - return; - } - echo_debug('postgres.php',__LINE__,"Loading document"); - // Remove old document - $ret=ExecSql($cn,"select jr_pj from jrn where jr_grpt_id=$seq"); - if (pg_num_rows($ret) != 0) { - $r=pg_fetch_array($ret,0); - $old_oid=$r['jr_pj']; - if (strlen($old_oid) != 0) - pg_lo_unlink($cn,$old_oid); - } - // Load new document - ExecSql($cn,"update jrn set jr_pj=".$oid.", jr_pj_name='".$_FILES['pj']['name']."', ". - "jr_pj_type='".$_FILES['pj']['type']."' where jr_grpt_id=$seq"); - return $oid; - - } else { - echo "<H1>Error</H1>"; - Rollback($cn); - - } - } - return 0; - } -/*!\brief return the value of the sql, the sql will return only one value - * with the value - * \param $p_cn database connection - * \param $p_sql the sql stmt example :select s_value from - document_state where s_id=2 - *\param $p_array if array is not null we use the ExecSqlParm (safer) - *\see ExecSqlParm - * \return only the first value or an empty string if nothing is found - */ -function getDbValue($p_cn,$p_sql,$p_array=null) -{ - - if ( $p_array == null) { - $ret=ExecSql($p_cn,$p_sql); - } else { - $ret=ExecSqlParam($p_cn,$p_sql,$p_array); - } - if ( pg_NumRows($ret) == 0 ) return ""; - $r=pg_fetch_row($ret,0); - return $r[0]; - -} -/*!\brief test if a sequence exist */ -/* \return true if the seq. exist otherwise false - */ -function exist_sequence($p_cn,$p_name) { - $r=CountSql($p_cn,"select relname from pg_class where relname=lower('".$p_name."')"); - if ( $r==0) - return false; - return true; -} -function create_sequence($p_cn,$p_name) { - $sql="create sequence ".$p_name; - ExecSql($p_cn,$sql); -} - -/*! - ************************************************** - * \brief Get version of a database, the content of the - * table version - * - * \param $p_cn database connection - * - * \return version number - * - */ -function get_version($p_cn) { - $Res=ExecSql($p_cn,"select val from version"); - $a=pg_fetch_array($Res,0); - return $a['val']; -} -/*! execute_script - ************************************************** - * \brief Execute a sql script - * - * \param $p_cn database - * \param $script script name - */ -function execute_script($p_cn,$script) { - - if ( DEBUG=='false' ) ob_start(); - $hf=fopen($script,'r'); - if ( $hf == false ) { - echo 'Ne peut ouvrir '.$script; - exit(); - } - $sql=""; - $flag_function=false; - while (!feof($hf)) { - $buffer=fgets($hf); - $buffer=str_replace ("$","\$",$buffer); - print $buffer."<br>"; - // comment are not execute - if ( substr($buffer,0,2) == "--" ) { - //echo "comment $buffer"; - continue; - } - // Blank Lines Are Skipped - If ( Strlen($buffer)==0) { - //echo "Blank $buffer"; - Continue; - } - if ( strpos(strtolower($buffer),"create function")===0 ) { - echo "found a function"; - $flag_function=true; - $sql=$buffer; - continue; - } - if ( strpos(strtolower($buffer),"create or replace function")===0 ) { - echo "found a function"; - $flag_function=true; - $sql=$buffer; - continue; - } - // No semi colon -> multiline command - if ( $flag_function== false && strpos($buffer,';') == false ) { - $sql.=$buffer; - continue; - } - if ( $flag_function ) { - if ( strpos(strtolower($buffer), "language plpgsql") === false && - strpos(strtolower($buffer), "language 'plpgsql'") === false ) { - $sql.=$buffer; - continue; - } - } else { - // cut the semi colon - $buffer=str_replace (';','',$buffer); - } - $sql.=$buffer; -echo_debug('setup.php',__LINE__,"Execute sql $sql"); - if ( ExecSql($p_cn,$sql) == false ) { - Rollback($p_cn); - if ( DEBUG=='false' ) ob_end_clean(); - print "ERROR : $sql"; - exit(); - } - $sql=""; - $flag_function=false; - print "<hr>"; - } // while (feof) - fclose($hf); - if ( DEBUG=='false' ) ob_end_clean(); -} -/*!\brief loop to apply all the path to a folder or - * a template - * \param $p_cn database connexion - * \param $p_name database name - * - */ -function apply_patch($p_cn,$p_name,$from_setup=1) -{ - $MaxVersion=DBVERSION-1; - echo '<ul>'; - $add=($from_setup==0)?'admin/':''; - for ( $i = 4;$i <= $MaxVersion;$i++) - { - $to=$i+1; - if ( get_version($p_cn) <= $i ) { - echo "<li>Patching ".$p_name. - " from the version ".get_version($p_cn)." to $to</h3> </li>"; - - execute_script($p_cn,$add.'sql/patch/upgrade'.$i.'.sql'); - if ( DEBUG=='false' ) ob_start(); - // specific for version 4 - if ( $i == 4 ) - { - $sql="select jrn_def_id from jrn_def "; - $Res=ExecSql($p_cn,$sql); - $Max=pg_NumRows($Res); - for ($seq=0;$seq<$Max;$seq++) { - $row=pg_fetch_array($Res,$seq); - $sql=sprintf ("create sequence s_jrn_%d",$row['jrn_def_id']); - ExecSql($p_cn,$sql); - } - } - // specific to version 7 - if ( $i == 7 ) - { - // now we use sequence instead of computing a max - // - $Res2=ExecSql($p_cn,'select coalesce(max(jr_grpt_id),1) as l from jrn'); - $Max2= pg_NumRows($Res2) ; - if ( $Max2 == 1) { - $Row=pg_fetch_array($Res2,0); - var_dump($Row); - $M=$Row['l']; - ExecSql($p_cn,"select setval('s_grpt',$M,true)"); - } - } - // specific to version 17 - if ( $i == 17 ) - { - execute_script($p_cn,$add.'sql/patch/upgrade17.sql'); - $max=getDbValue($p_cn,'select last_value from s_jnt_fic_att_value'); - AlterSequence($p_cn,'s_jnt_fic_att_value',$max+1); - } // version - - // reset sequence in the modele - //-- - if ( $i == 30 && $p_name=="mod" ) - { - $a_seq=array('s_jrn','s_jrn_op','s_centralized', - 's_stock_goods','c_order','s_central'); - foreach ($a_seq as $seq ) { - $sql=sprintf("select setval('%s',1,false)",$seq); - $Res=ExecSql($p_cn,$sql); - } - $sql="select jrn_def_id from jrn_def "; - $Res=ExecSql($p_cn,$sql); - $Max=pg_NumRows($Res); - for ($seq=0;$seq<$Max;$seq++) { - $row=pg_fetch_array($Res,$seq); - $sql=sprintf ("select setval('s_jrn_%d',1,false)",$row['jrn_def_id']); - ExecSql($p_cn,$sql); - } - - } - if ( $i == 36 ) { - /* check the country and apply the path */ - $res=ExecSql($p_cn,"select pr_value from parameter where pr_id='MY_COUNTRY'"); - $country=pg_fetch_result($res,0,0); - execute_script($p_cn,$add."sql/patch/upgrade36.".$country.".sql"); - ExecSql($p_cn,'update tmp_pcmn set pcm_type=find_pcm_type(pcm_val)'); - } - if ( DEBUG == 'false') ob_end_clean(); - } - } - echo '</ul>'; -} -?> diff --git a/include/pref.inc.php b/include/pref.inc.php index e16a4550a..911356ad2 100644 --- a/include/pref.inc.php +++ b/include/pref.inc.php @@ -21,10 +21,14 @@ /*!\file * \brief this file is always included and then executed * it permits to change the user preferences + *\see user_pref.php */ -require_once('class_widget.php'); + require_once('class_user.php'); +require_once("class_iselect.php"); +require_once("class_iperiod.php"); require_once('class_acc_report.php'); +require_once('class_periode.php'); echo '<DIV class="content">'; //---------------------------------------------------------------------- // Change password @@ -34,18 +38,18 @@ if ( isset($_POST['pass_1']) if ($_POST['pass_1'] != $_POST['pass_2'] ) { ?> <script> - alert("Les mots de passe ne correspondent pas. Mot de passe inchangé"); + alert(_("Les mots de passe ne correspondent pas. Mot de passe inchangé")); </script> <?php } else { - $Rep=DbConnect(); + $Rep=new Database(); $l_pass=md5($_POST['pass_1']); - $Res=ExecSql($Rep,"update ac_users set use_pass='$l_pass' where use_login='".$_SESSION['g_user']."'"); + $Res=$Rep->exec_sql("update ac_users set use_pass='$l_pass' where use_login='".$_SESSION['g_user']."'"); $pass=$_POST['pass_1']; $_SESSION['g_pass']=$_POST['pass_1']; $g_pass=$_POST['pass_1']; - echo "<i>Mot de passe est modifié</i>"; + echo "<i>"._('Mot de passe est modifiée')."</i>"; } } @@ -54,7 +58,7 @@ if ( ! isset ($_REQUEST['gDossier']) ) { echo '<A class="mtitle" href="user_login.php"><input type="button" value="Retour"></a>'; } else { - echo '<h2 class="info">Changez vos préférences</h2>'; + echo '<h2 class="info">'._('Changez vos préférences').'</h2>'; } ?> @@ -62,7 +66,7 @@ if ( ! isset ($_REQUEST['gDossier']) ) <div class="content"> <FORM ACTION="<?php echo $url;?>" METHOD="POST"> -<fieldset><legend> Options Générales</legend> + <fieldset><legend><?php echo _('Options Générales')?></legend> <table> <tr><td> Mot de passe : @@ -71,12 +75,12 @@ Mot de passe : </td> </tr> <?php -$Rep=DbConnect(); +$Rep=new Database(); // charge tous les styles -$res=ExecSql($Rep,"select the_name from theme +$res=$Rep->exec_sql("select the_name from theme order by the_name"); -for ($i=0;$i < pg_NumRows($res);$i++){ - $st=pg_fetch_array($res,$i); +for ($i=0;$i < Database::num_row($res);$i++){ + $st=Database::fetch_array($res,$i); $style[]=$st['the_name']; } // Formatte le display @@ -93,7 +97,7 @@ $disp_style.="</SELECT>"; <p> <tr> <td> -Thème +<?php echo _('Thème'); ?> </td> <td> <?php print $disp_style;?> @@ -101,60 +105,48 @@ Thème </tr> <?php -/*!\todo Not used anymore to be removed ? -$topmenu=new widget('select'); -$topmenu->name='topmenu'; -$topmenu->selected=$_SESSION['g_topmenu']; -$array=array( - array('value'=>'TEXT','label'=>'Texte'), - array('value'=>'SELECT','label'=>'Menu deroulant') - ); -$topmenu->value=$array; -?> -<tr><td> -Style de menu -</td> -<td> -<?php echo $topmenu->IOValue();?> -</td> -</tr> - -<?php -*/ $inside_dossier=false; // Si utilise un dossier alors propose de changer // la periode par defaut if ( isset ($_REQUEST['gDossier'])) { $inside_dossier=true; - include_once("preference.php"); $msg=""; - $cn=DbConnect($_REQUEST['gDossier']); + $cn=new Database($_REQUEST['gDossier']); $User->cn=$cn; - if ( isset ($_POST['periode'])) + if ( isset ($_POST['period'])) { - $periode=$_POST["periode"]; + $periode=$_POST["period"]; $User->set_periode($periode); - echo_debug('pref.inc',__LINE__,"Periode returns ".PeriodeClosed($cn,$periode)); - } $l_user_per=$User->get_periode(); if ( $l_user_per=="") - $l_user_per=getDbValue($cn,"select min(p_id) from parm_periode where p_closed='f'"); + $l_user_per=$cn->get_value("select min(p_id) from parm_periode where p_closed='f'"); // if periode is closed then warns the users - if ( PeriodeClosed($cn,$l_user_per)=='t') + $period=new Periode($cn,$l_user_per); + $period->p_id=$l_user_per; + $period->jrn_def_id=0; + if ( $period->is_closed($l_user_per)==1) { - $msg= '<h2 class="notice">Attention cette période est fermée, vous ne pourrez rien modifier dans le module comptable</h2>'; + $msg=_('Attention cette période est fermée, vous ne pourrez rien modifier dans le module comptable'); + $msg= '<h2 class="notice">'.$msg.'</h2>'; } - + - $l_form_per=FormPeriode($cn,$l_user_per,ALL); + $period=new IPeriod("period"); + $period->user=$User; + $period->cn=$cn; + $period->value=$l_user_per; + $period->type=ALL; + $l_form_per=$period->input(); + + ?> -<tr><td> Période</td> + <tr><td><?php echo _('Période');?></td> <td> <?php printf(' %s ',$l_form_per); ?> </td> @@ -165,7 +157,7 @@ if ( isset ($_REQUEST['gDossier'])) ?> <tr> -<td>Taille des pages</td> +<td><? echo _('Taille des pages');?></td> <td> <SELECT NAME="p_size"> <option value="15">15 @@ -174,9 +166,9 @@ if ( isset ($_REQUEST['gDossier'])) <option value="100">100 <option value="150">150 <option value="200">200 -<option value="-1">Illimité + <option value="-1"><?php echo _('Illimité'); ?> <?php - $label=($_SESSION['g_pagesize'] == -1)?'Illimité':$_SESSION['g_pagesize']; + $label=($_SESSION['g_pagesize'] == -1)?_('Illimité'):$_SESSION['g_pagesize']; echo '<option value="'.$_SESSION['g_pagesize'].'" selected>'.$label; ?> </SELECT> @@ -189,27 +181,48 @@ if ( isset ($_REQUEST['gDossier'])) if ( $inside_dossier ) { /* Pref for welcome page */ echo '<fieldset>'; - echo '<legend> Options pour la page d\'accueil</legend>'; - echo 'Mini-Rapport : '; + echo '<legend>'._('Options pour la page d\'accueil').'</legend>'; + echo _('Mini-Rapport : '); $rapport=new Acc_Report($cn); $aRapport=$rapport->make_array(); - $aRapport[]=array("value"=>0,"label"=>'Aucun mini rapport'); - $wRapport=new widget("select"); + $aRapport[]=array("value"=>0,"label"=>_('Aucun mini rapport')); + $wRapport=new ISelect(); $wRapport->name="minirap"; $wRapport->selected=$User->get_mini_report(); $wRapport->value=$aRapport; - echo $wRapport->IOValue(); - echo '<span class="notice">Le mini rapport est un rapport qui s\'affiche sur votre page d\'accueil</span>'; + echo $wRapport->input(); + echo '<span class="notice">'._('Le mini rapport est un rapport qui s\'affiche sur votre page d\'accueil').'</span>'; echo '</fieldset>'; } +echo '<fieldset>'; +echo '<legend>'._('Langue').'</legend>'; +echo _('Selectionnez votre langue'); +$aLang=array(array(_('Français'),'fr_FR.utf8'), + array(_('Anglais'),'en_US.utf8'), + array(_('Néerlandais'),'nl_NL.utf8'), + ); +echo '<select name="lang" id="l">'; +for ($i =0;$i < count($aLang);$i++) { + $sel=""; + if ( $aLang[$i][1]==$_SESSION['g_lang']) $sel=" selected "; + printf('<option value="%s" %s>%s</option>', + $aLang[$i][1],$sel,$aLang[$i][0]); + +} +echo '</select>'; +echo '</fieldset>'; -echo widget::submit("val","Valider"); +echo HtmlInput::submit("val",_("Valider")); echo '</form>'; + + + + if ( ! $inside_dossier ) { - echo '<A class="mtitle" href="user_login.php"><input type="button" value="Retour"></a>'; + echo '<A class="mtitle" href="user_login.php"><input type="button" value="'._('Retour').'"></a>'; } diff --git a/include/preference.php b/include/preference.php deleted file mode 100644 index c940510d5..000000000 --- a/include/preference.php +++ /dev/null @@ -1,221 +0,0 @@ -<?php - -/* - * This file is part of PhpCompta. - * - * PhpCompta is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpCompta is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/* $Revision$ */ -/*! \file - * \brief include file for the periode form, currency,... - * - */ -/*! FormPeriodeMult - * \brief Generate the form for the periode - * - * - * \param $p_cn connexion - * - * \return string containing html code for the - * form - * - */ -function FormPeriodeMult($p_cn) -{ - $sql="select p_id,to_char(p_start,'DD.MM.YYYY') as p_start, - to_char(p_end,'DD.MM.YYYY') as p_end - from parm_periode - order by p_exercice,p_start"; - $Res=ExecSql($p_cn,$sql); - $Max=pg_NumRows($Res); - $ret='<SELECT NAME="periode[]" SIZE="12" multiple>'; - for ( $i = 0; $i < $Max;$i++) { - $l_line=pg_fetch_array($Res,$i); - $ret.=sprintf('<OPTION VALUE="%s">%s - %s',$l_line['p_id'] - ,$l_line['p_start'] - ,$l_line['p_end']); - - } - $ret.="</SELECT>"; - return $ret; -} - -/*! - * \brief Generate the form for the periode - * - * - * \param $p_cn connexion - * \param $p_default default periode - * \param $p_type the type of the periode OPEN CLOSE NOTCENTRALIZED or ALL - * \param $p_suff the suffix of the name - * - * \return string containing html code for the HTML - * - * - * - */ -function FormPeriode($p_cn,$l_default=0,$p_type=OPEN,$p_suff="") -{ - switch ($p_type) { - case CLOSED: - $sql_closed="where p_closed=true and p_central = false "; - break; - case OPEN: - $sql_closed="where p_closed=false"; - break; - case NOTCENTRALIZED: - $sql_closed="where p_closed=true and p_central = false "; - break; - case ALL: - $sql_closed=""; - break; - default: - error("invalide p_type in 'preference.php'#__LINE__"); - } - $sql="select p_id,to_char(p_start,'DD.MM.YYYY') as p_start_string, - to_char(p_end,'DD.MM.YYYY') as p_end_string - from parm_periode - $sql_closed - order by p_start,p_end"; - - $Res=ExecSql($p_cn,$sql); - $Max=pg_NumRows($Res); - if ( $Max == 0 ) return null; - $ret='<SELECT NAME="periode'.$p_suff.'">'; - for ( $i = 0; $i < $Max;$i++) { - $l_line=pg_fetch_array($Res,$i); - if ( $l_default == $l_line['p_id'] ) - $sel="SELECTED"; - else - $sel=""; - - $ret.=sprintf('<OPTION VALUE="%s" %s>%s - %s',$l_line['p_id'] - ,$sel - ,$l_line['p_start_string'] - ,$l_line['p_end_string']); - - } - $ret.="</SELECT>"; - return $ret; -} -/*! get_periode - * \brief Give the start & end date of a periode - * - * \param p_connection - * \param p_periode - * - * \return array containing the start date & the end date - * \todo the function get_periode@preference.php must be replaced - * by Periode::get_limit - * - */ -function get_periode($p_cn,$p_periode) -{ - $sql="select to_char(p_start,'DD.MM.YYYY') as p_start, - to_char(p_end,'DD.MM.YYYY') as p_end - from parm_periode - where p_id=".$p_periode; - $Res=ExecSql($p_cn,$sql); - if ( pg_NumRows($Res) == 0) return null; - return pg_fetch_array($Res,0); - -} -/*! - * \brief get the status of a periode - * - * \param $p_cn database connex - * \param periode id - * - * \return 't' if closed otherwise 'f' - * - * - */ -function PeriodeClosed($p_cn,$p_periode) -{ - $sql="select p_closed - from parm_periode - where p_id=".$p_periode; - $Res=ExecSql($p_cn,$sql); - if ( pg_NumRows($Res) == 0) return null; - $l_line=pg_fetch_array($Res,0); - return $l_line['p_closed']; - -} -/*! - * \brief get the exercice of a periode - * - * - * \param $p_cn connection - * \param $p_periode periode - * - * \return Exercice of the periode - * - * - */ -function get_exercice($p_cn,$p_periode) -{ - $Res=ExecSql($p_cn,"select p_exercice from parm_periode". - " where p_id=$p_periode"); - if ( pg_NumRows($Res) == 0 ) return ""; - $line=pg_fetch_array($Res,0); - return $line['p_exercice']; -} -/*! - * \brief Show all the currency encoded - * - * \param $p_cn database connextion - * - * \return nothing - * - * - */ -function ShowDevise($p_cn) -{ - echo "<h2 class=\"info\"> Devises </H2>"; - echo '<TABLE ALIGN="CENTER">'; - echo "<TR>"; - echo '<TH> CODE </TH>'; - echo '<TH> Valeur <BR>(par rapport à l\'euro) </TH>'; - echo "</TR>"; - - $Res=ExecSql($p_cn,"select pm_id,pm_code,pm_rate from parm_money order by pm_code"); - $Max=pg_NumRows($Res); - $link='parametre.php?p_action=divers&sa=devise&'.dossier::get(); - for ($i=0;$i<$Max;$i++) { - $l_line=pg_fetch_array($Res,$i); - echo '<TR>'; - echo '<TD>'.$l_line['pm_code'].'</TD>'; - $l_rate=sprintf("% 10.6f",$l_line['pm_rate']); - echo '<TD ALIGN="RIGHT">'.$l_rate.'</TD>'; - echo "<TD class=\"mtitle\"> <A class=\"mtitle\" HREF=\"$link&p_id=$l_line[pm_id]&sb=ch&p_code=$l_line[pm_code]&p_rate=$l_line[pm_rate]\">Change</A></TD>"; - echo "<TD class=\"mtitle\"> <A class=\"mtitle\" HREF=\"$link&p_id=$l_line[pm_id]&sb=d&p_code=$l_line[pm_code]\">Efface</A></TD>"; - echo '</TR>'; - - } - echo '<TR> <FORM ACTION="parametre.php" METHOD="POST">'; -echo '<TD> <INPUT TYPE="text" NAME="p_devise"></TD>'; - echo '<TD> <INPUT TYPE="text" NAME="p_rate"></TD>'; - echo dossier::hidden(); -echo '<input type="hidden" name="p_action" value="divers">'; -echo '<input type="hidden" name="sa" value="devise">'; -echo '<input type="hidden" name="sb" value="a">'; - echo '<TD> <INPUT TYPE="SUBMIT" NAME="action" Value="Ajout"</TD>'; - echo '</FORM></TR>'; - echo '</TABLE>'; -} - -?> diff --git a/include/preod.inc.php b/include/preod.inc.php index cf6da8157..66fc7793d 100644 --- a/include/preod.inc.php +++ b/include/preod.inc.php @@ -23,34 +23,36 @@ /*!\file * \brief included file for managing the predefined operation */ -require_once('class_widget.php'); -require_once('postgres.php'); +require_once("class_iselect.php"); +require_once("class_icheckbox.php"); +require_once("class_ihidden.php"); +require_once('class_database.php'); require_once('ac_common.php'); require_once('class_pre_operation.php'); -$user=new User(DbConnect(dossier::id())); +$user=new User(new Database(dossier::id())); $user->can_request(PARPREDE,1); echo '<div class="content">'; echo '<form method="GET">'; - $sel=new widget('select'); + $sel=new ISelect(); $sel->name="jrn"; - $sel->value=make_array($cn,"select jrn_def_id,jrn_def_name from ". + $sel->value=$cn->make_array("select jrn_def_id,jrn_def_name from ". " jrn_def order by jrn_def_name"); // Show a list of ledger $sa=(isset($_REQUEST['sa']))?$_REQUEST['sa']:""; $sel->selected=$sa; - echo 'Choississez un journal '.$sel->IOValue(); - $wCheck=new widget("checkbox"); + echo 'Choississez un journal '.$sel->input(); + $wCheck=new ICheckBox(); if ( isset($_REQUEST['direct'])) { $wCheck->selected=true; } - echo 'Ecriture directe'.$wCheck->IOValue('direct'); + echo 'Ecriture directe'.$wCheck->input('direct'); echo dossier::hidden(); - $hid=new widget("hidden"); - echo $hid->IOValue("sa","jrn"); - echo $hid->IOValue("p_action","preod"); + $hid=new IHidden(); + echo $hid->input("sa","jrn"); + echo $hid->input("p_action","preod"); echo '<hr>'; - echo widget::submit('Accepter','Accepter'); + echo HtmlInput::submit('Accepter','Accepter'); echo '</form>'; // if $_REQUEST[sa] == del delete the predefined operation @@ -91,11 +93,11 @@ $user->can_request(PARPREDE,1); echo '<td>'; echo '<form method="POST">'; echo dossier::hidden(); - echo $hid->IOValue("sa","del"); - echo $hid->IOValue("p_action","preod"); - echo $hid->IOValue("del",""); - echo $hid->IOValue("od_id",$row['od_id']); - echo $hid->IOValue("jrn",$_GET['jrn']); + echo $hid->input("sa","del"); + echo $hid->input("p_action","preod"); + echo $hid->input("del",""); + echo $hid->input("od_id",$row['od_id']); + echo $hid->input("jrn",$_GET['jrn']); $b='<input type="submit" value="Effacer" '. ' onClick="return confirm(\'Voulez-vous vraiment effacer cette operation ?\');" >'; diff --git a/include/quick_writing.inc.php b/include/quick_writing.inc.php index ee1c70bdb..7f4acf82d 100644 --- a/include/quick_writing.inc.php +++ b/include/quick_writing.inc.php @@ -27,13 +27,35 @@ * quant_purchase and quant_sold are not changed by this * */ +require_once("class_icheckbox.php"); require_once ('class_acc_ledger.php'); require_once ('class_acc_reconciliation.php'); +require_once('ac_common.php'); +require_once('class_periode.php'); +require_once('function_javascript.php'); +require_once('class_ipopup.php'); +/* Load all the needed javascript */ +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('scripts.js'); +echo js_include('acc_ledger.js'); +echo js_include('card.js'); +echo js_include('accounting_item.js'); +echo JS_INFOBULLE; +echo js_include('ajax_fiche.js'); +echo js_include('dragdrop.js'); -require_once('check_priv.php'); +echo ICard::ipopup('ipopcard'); +echo ICard::ipopup('ipop_newcard'); +echo IPoste::ipopup('ipop_account'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); - -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $id=(isset ($_REQUEST['p_jrn']))?$_REQUEST['p_jrn']:-1; /*!\brief show a form for quick_writing */ function show_qw_menu($def=0) { @@ -41,20 +63,19 @@ function show_qw_menu($def=0) { $id=(isset ($_REQUEST['p_jrn']))?$_REQUEST['p_jrn']:-1; echo ShowItem( array( - array('?p_action='.$_REQUEST['p_action'].'&'.dossier::get().'&p_jrn='.$id.'&show_form','Encoder une Operation', - ' Encoder une operation dans ce journal',0), - array('?p_action='.$_REQUEST['p_action'].'&'.dossier::get().'&p_jrn='.$id.'&sa=l','Voir Operation', - ' Voir les operations de ce journal',1), + array('?p_action='.$_REQUEST['p_action'].'&'.dossier::get().'&p_jrn='.$id.'&show_form',_('Encoder une Operation'), + _('Encoder une operation dans ce journal'),0), + array('?p_action='.$_REQUEST['p_action'].'&'.dossier::get().'&p_jrn='.$id.'&sa=l',_('Voir Operation'), + _('Voir les operations de ce journal'),1), array('?p_action='.$_REQUEST['p_action'].'&'.dossier::get(), - 'Autre journal', - 'Choisir un autre journal') - ), + _('Autre journal'), + _('Choisir un autre journal') + )), 'H',"mtitle","mtitle",$def,' width="100%"' ); echo '</div>'; } - /*!\brief show a form for quick_writing */ function show_direct_form($cn,$ledger,$p_array) { echo '<div class="content">'; @@ -66,16 +87,16 @@ function show_direct_form($cn,$ledger,$p_array) { // Show the predef operation // Don't forget the p_jrn echo '<form method="get">'; - echo widget::hidden('p_action',$_REQUEST['p_action']); + echo HtmlInput::hidden('p_action',$_REQUEST['p_action']); echo dossier::hidden(); - echo widget::hidden('p_jrn',$_REQUEST['p_jrn']); + echo HtmlInput::hidden('p_jrn',$_REQUEST['p_jrn']); $op=new Pre_operation($cn); $op->p_jrn=$_REQUEST['p_jrn']; $op->od_direct='t'; if ( $op->count() > 0 ) { - echo "Utilisez une operation "; + echo _("Utilisez une operation "); echo $op->show_button(); - echo widget::submit('use_opd','Utilisez une operation'); + echo HtmlInput::submit('use_opd',_('Utilisez une operation')); } echo '</form>'; @@ -83,28 +104,28 @@ function show_direct_form($cn,$ledger,$p_array) { echo '<form method="post" action="?">'; echo dossier::hidden(); - echo widget::hidden('p_action',$_REQUEST['p_action']); + echo HtmlInput::hidden('p_action',$_REQUEST['p_action']); echo $ledger->show_form($p_array); - echo widget::button('add','Ajout d\'une ligne','onClick="quick_writing_add_row()"'); + echo HtmlInput::button('add',_('Ajout d\'une ligne'),'onClick="quick_writing_add_row()"'); - echo widget::submit('summary','Sauvez'); - echo '<div class="info"> - Débit = <span id="totalDeb"></span> - Crédit = <span id="totalCred"></span> - Difference = <span id="totalDiff"></span> -</div> - '; + echo HtmlInput::submit('summary',_('Sauvez')); + echo '<div class="info">'. + _('Débit').' = <span id="totalDeb"></span>'. + _('Crédit').' = <span id="totalCred"></span>'. + _('Difference').' = <span id="totalDiff"></span></div> '; echo '</form>'; + echo "<script>checkTotalDirect();</script>"; echo "<div>".JS_CALC_LINE."</div>"; echo '</div>'; + } $ledger=new Acc_Ledger($cn,$id); @@ -118,20 +139,19 @@ if ($id == -1 ) // Vide echo '<FORM method="get" action="?">'; echo dossier::hidden(); - echo widget::hidden('p_action',$_REQUEST['p_action']); - echo $ledger->select_ledger()->IOValue(); - echo widget::submit('show_form','Choix du journal'); + echo HtmlInput::hidden('p_action',$_REQUEST['p_action']); + echo $ledger->select_ledger()->input(); + echo HtmlInput::submit('show_form',_('Choix du journal')); echo '</form>'; echo '</div>'; exit(); } if ( $User->check_jrn($id) == 'X' ) { - echo " -<script> alert(\"L'acces a ce journal est interdit, contactez votre responsable\");</script>"; + alert(_("L'acces a ce journal est interdit, \n contactez votre responsable")); exit(); } echo '<div class="content">'; -echo '<h2 class="info"> Journal : '.$ledger->get_name().'</h2>'; +echo '<h2 class="info"> '._('Journal').' : '.$ledger->get_name().'</h2>'; $sa=( isset ($_REQUEST['sa']))?$_REQUEST['sa']:''; //====================================================================== // See the ledger listing @@ -145,20 +165,36 @@ if ($sa == 'l' && $id != -1) { show_qw_menu(1); echo '<div class="content">'; $Ledger=new Acc_Ledger($cn,$id); + $type=$Ledger->get_type(); $href=basename($_SERVER['PHP_SELF']); echo '<form method="GET" action="'.$href.'">'; - echo widget::hidden("sa","l"); - echo widget::hidden("p_jrn",$id); - echo widget::hidden("p_action","quick_writing"); + echo HtmlInput::hidden("sa","l"); + echo HtmlInput::hidden("p_jrn",$id); + echo HtmlInput::hidden("p_action","quick_writing"); echo dossier::hidden(); - $Ledger->show_ledger(); + echo $Ledger->search_form($type,0); + echo HtmlInput::submit("qwlist",_("Recherche")); echo '</form>'; + $array=$_GET; + $array["type"]=$type; + $array["p_jrn"]=$Ledger->id; + list($sql,$where)=$Ledger->build_search_sql($array); + $max_line=$cn->count_sql($sql); + + $step=$_SESSION['g_pagesize']; + $page=(isset($_GET['offset']))?$_GET['page']:1; + $offset=(isset($_GET['offset']))?$_GET['offset']:0; + $bar=jrn_navigation_bar($offset,$max_line,$step,$page); + + + echo $bar; + list($count,$html)= $Ledger->list_operation($sql,$offset,0); + echo $html; + echo $bar; echo '</div>'; exit(); - - exit(0); } //====================================================================== @@ -166,8 +202,7 @@ if ($sa == 'l' && $id != -1) { // Write into the ledger if ( $User->check_jrn($id) == 'X' ) { - echo " -<script> alert(\"Vous ne pouvez pas accéder à ce journal, contactez votre responsable\");</script>"; + alert(_("Vous ne pouvez pas accèder à ce journal, contactez votre responsable")); exit -1; } @@ -177,10 +212,11 @@ if ( $User->check_jrn($id)=='W' ) { $default_periode=$User->get_periode(); /* check if the ledger is closed */ if ( $ledger->is_closed($default_periode)==1) { - echo '<h2 class="error"> Desole mais cette periode est fermee pour ce journal</h2>'; + echo '<h2 class="error">'._('Désolé mais cette periode est fermee pour ce journal').'</h2>'; exit(); } - list($date,$devnull)=get_periode($cn,$default_periode); + $periode=new Periode($cn); + list($date,$devnull)=$periode->first_day($default_periode); $array['date']=$date; show_qw_menu(); show_direct_form($cn,$ledger,$array); @@ -207,8 +243,8 @@ if ( isset ($_GET['use_opd'])) { if ( isset($_POST['summary'])) { try { $ledger->verify($_POST ); - } catch (AcException $e) { - echo '<script>alert (\''.$e->getMessage()."'); </script>"; + } catch (Exception $e) { + alert($e->getMessage()); show_qw_menu(); show_direct_form($cn,$ledger,$_POST); exit(); @@ -217,15 +253,15 @@ if ( isset($_POST['summary'])) { echo '<form method="post" action="?">'; echo $ledger->show_form($_POST,1); echo dossier::hidden(); - echo widget::hidden('p_action',$_REQUEST['p_action']); + echo HtmlInput::hidden('p_action',$_REQUEST['p_action']); - echo widget::submit('save_it',"Sauver"); - echo widget::submit('correct_it','Corriger'); + echo HtmlInput::submit('save_it',"Sauver"); + echo HtmlInput::submit('correct_it','Corriger'); - $chk=new widget('checkbox'); + $chk=new ICheckBox(); $chk->selected=false; echo "Sauvez l'opération ?"; - echo $chk->IOValue('save_opd'); + echo $chk->input('save_opd'); echo '</form>'; exit(); @@ -237,17 +273,17 @@ if ( isset($_POST['save_it' ])) { $ledger->save($array); echo '<h2> Opération enregistrée '.$ledger->jr_internal.' Piece '.h($ledger->pj).'</h2>'; if ( strcmp($ledger->pj,$_POST['e_pj']) != 0 ) { - echo '<h3 class="notice"> Attention numéro pièce existante, elle a du être adaptée</h3>'; + echo '<h3 class="notice">'._('Attention numéro pièce existante, elle a du être adaptée').'</h3>'; } - echo widget::button_href('Autre opération dans ce journal', + echo HtmlInput::button_anchor(_('Autre opération dans ce journal'), "?".dossier::get(). '&show_form'. '&p_action=quick_writing&p_jrn='. $_REQUEST['p_jrn']); - } catch (AcException $e) { - echo '<script>alert (\''.$e->getMessage()."'); </script>"; + } catch (Exception $e) { + alert ($e->getMessage()); show_qw_menu(); show_direct_form($cn,$ledger,$_POST); } @@ -256,4 +292,4 @@ if ( isset($_POST['save_it' ])) { } // if check_jrn=='W' else { show_qw_menu(); -} \ No newline at end of file +} diff --git a/include/report.inc.php b/include/report.inc.php index 893609687..a503b422b 100644 --- a/include/report.inc.php +++ b/include/report.inc.php @@ -14,7 +14,7 @@ * * You should have received a copy of the GNU General Public License * along with PhpCompta; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ /* $Revision: 1937 $ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr @@ -23,11 +23,36 @@ */ include_once ("ac_common.php"); include_once ("user_menu.php"); +require_once("class_ifile.php"); +require_once("class_ibutton.php"); require_once('class_acc_report.php'); require_once('class_dossier.php'); -include_once ("postgres.php"); +require_once('class_database.php'); include_once ("class_user.php"); include_once ("user_menu.php"); +require_once('class_ipopup.php'); + +/* Load all the needed javascript */ +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('scripts.js'); +echo js_include('acc_ledger.js'); +echo js_include('card.js'); +echo js_include('accounting_item.js'); +echo JS_INFOBULLE; +echo js_include('ajax_fiche.js'); +echo js_include('dragdrop.js'); +echo js_include('acc_report.js'); + +echo ICard::ipopup('ipopcard'); +echo ICard::ipopup('ipop_newcard'); +echo IPoste::ipopup('ipop_account'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); @@ -35,14 +60,14 @@ $gDossier=dossier::id(); $str_dossier=dossier::get(); /* Admin. Dossier */ -$rep=DbConnect($gDossier); +$rep=new Database($gDossier); $User=new User($rep); $User->Check(); $User->can_request(PARRAP,1); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); $nocookie='&PHPSESSID='.$_REQUEST['PHPSESSID']; $rap=new Acc_Report($cn); @@ -50,12 +75,10 @@ $rap=new Acc_Report($cn); if ( isset ($_POST["del_form"]) ) { $rap->id=$_POST['fr_id']; $rap->delete(); - // header('Location:'.$_SERVER["SCRIPT_URI"].'?'.$str_dossier.$nocookie); } if ( isset ($_POST["record"] )) { $rap->from_array($_POST); $rap->save(); - // header('Location:'.$_SERVER["SCRIPT_URI"].'?'.$str_dossier.$nocookie); } if ( isset($_POST['update'])) { $rap->from_array($_POST); @@ -79,8 +102,6 @@ foreach ( $lis as $row) { } echo "</TABLE>"; echo '</div>'; - echo JS_SEARCH_POSTE; - echo JS_PROTOTYPE; if ( isset($_POST['upload'])) { exit(); } @@ -93,15 +114,15 @@ if ( isset ($_REQUEST["action"]) ) { { echo '<DIV class="u_redcontent">'; - echo '<h1> Définition</h1>'; + echo '<h1>'._('Définition').'</h1>'; echo '<form method="post" >'; echo dossier::hidden(); $rap->id=0; echo $rap->form(15); - echo widget::submit("record","Sauve"); + echo HtmlInput::submit("record",_("Sauve")); echo '</form>'; - echo '<span class="notice">Les lignes vides seront effacées</span>'; + echo '<span class="notice">'._("Les lignes vides seront effacées").'</span>'; echo "</DIV>"; echo '<DIV class="u_redcontent">'; @@ -109,14 +130,14 @@ if ( isset ($_REQUEST["action"]) ) { echo '<h1> Importation</h1>'; echo dossier::hidden(); $rap->id=0; - $wUpload=new widget('file'); + $wUpload=new IFile(); $wUpload->name='report'; $wUpload->value='report_value'; - echo 'Importer ce rapport '; - echo $wUpload->IOValue(); - echo widget::submit("upload","Sauve"); + echo _('Importer ce rapport').' '; + echo $wUpload->input(); + echo HtmlInput::submit("upload",_("Sauve")); echo '</form>'; - echo '<span class="notice">Les lignes vides seront effacées</span>'; + echo '<span class="notice">'._("Les lignes vides seront effacées").'</span>'; echo "</DIV>"; } @@ -127,18 +148,18 @@ if ( isset ($_REQUEST["action"]) ) { echo '<form method="post">'; $rap->load(); echo $rap->form(); - echo widget::hidden("fr_id",$rap->id); - echo widget::hidden("action","record"); - echo widget::submit("update","Mise a jour"); - echo widget::submit("del_form","Effacement"); - $w=new widget('button'); + echo HtmlInput::hidden("fr_id",$rap->id); + echo HtmlInput::hidden("action","record"); + echo HtmlInput::submit("update",_("Mise a jour")); + echo HtmlInput::submit("del_form",_("Effacement")); + $w=new IButton(); $w->name="export"; $w->javascript="report_export('".$_REQUEST['PHPSESSID']."','".$gDossier."','".$rap->id."')"; $w->label='Export'; - echo $w->IOValue(); + echo $w->input(); echo '<span id="export_link"></span>'; echo '</form>'; - echo '<span class="notice">Les lignes vides seront effacées</span>'; + echo '<span class="notice">'._("Les lignes vides seront effacées").'</span>'; echo "</DIV>"; } diff --git a/include/restore.inc.php b/include/restore.inc.php index fcc7d91c1..ec36733e5 100644 --- a/include/restore.inc.php +++ b/include/restore.inc.php @@ -20,10 +20,12 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr +require_once('class_iradio.php'); +require_once('class_ifile.php'); + /*!\file * \brief restaure a database */ - if ( isset ($_REQUEST['sa'] )) { if ( defined ('PG_PATH') ) putenv("PATH=".PG_PATH); @@ -32,7 +34,7 @@ if ( isset ($_REQUEST['sa'] )) { putenv("PGPASSWORD=".phpcompta_password); putenv("PGUSER=".phpcompta_user); putenv("PGPORT=".phpcompta_psql_port); - $retour='<hr>'.widget::button_href("Retour","?action=restore&PHPSESSID=".$_REQUEST['PHPSESSID']); + $retour='<hr>'.HtmlInput::button_anchor("Retour","?action=restore&PHPSESSID=".$_REQUEST['PHPSESSID']); if ( ! isset($_REQUEST['t'])) { echo '<div class="content">'; echo ("<span class=\"error\">Vous devez préciser s'il s'agit d'un modèle ou d'un dossier</span>"); @@ -53,11 +55,12 @@ if ( isset ($_REQUEST['sa'] )) { //--------------------------------------------------------------------------- // Restore a folder (dossier) if ( $_REQUEST['t']=='d') { - ini_set('upload_max_filesize','5M'); + ini_set('upload_max_filesize','25M'); + ini_set('post_max_size','25M'); echo '<div class="content">'; - $cn=DbConnect(); - $id=NextSequence($cn,'dossier_id'); + $cn=new Database(); + $id=$cn->get_next_seq('dossier_id'); if ( strlen(trim($_REQUEST['database'])) == 0 ) $lname=$id." Restauration :".FormatString($_FILES['file']['name']); @@ -66,29 +69,28 @@ if ( isset ($_REQUEST['sa'] )) { $sql="insert into ac_dossier (dos_id,dos_name) values (".$id.",'".$lname."') "; - StartSql($cn); + $cn->start(); try{ - getDbValue($cn,$sql); + $cn->get_value($sql); } catch ( Exception $e) { echo '<span class="error">'."Echec de la restauration ".'</span>'; - print_r($e); - Rollback($cn); + $cn->rollback(); exit(); } - Commit($cn); + $cn->commit(); $name=domaine."dossier".$id; echo $name; - ExecSql($cn,"create database ".$name." encoding='utf8'"); - $args=" -d $name ".$_FILES['file']['tmp_name']; + $cn->exec_sql("create database ".$name." encoding='utf8'"); + $args=" --no-owner -d $name ".$_FILES['file']['tmp_name']; $status=passthru(PG_RESTORE.$args); echo '<h2 class="info"> Restauration réussie du dossier '.$lname.'</h2>'; - $new_cn=DbConnect($id); + $new_cn=new Database($id); - apply_patch($new_cn,$name,0); + $new_cn->apply_patch($name,0); echo '<span class="error">'.'Ne pas recharger la page, sinon votre base de données sera restaurée une fois de plus'.'</span>'; echo $retour; @@ -98,11 +100,13 @@ if ( isset ($_REQUEST['sa'] )) { // Restore a modele if ( $_REQUEST['t']=='m') { - ini_set('upload_max_filesize','5M'); + ini_set('upload_max_filesize','25M'); + ini_set('post_max_size','25M'); + echo '<div class="content">'; - $cn=DbConnect(); - $id=NextSequence($cn,'s_modid'); + $cn=new Database(); + $id=$cn->get_next_seq('s_modid'); if ( strlen(trim($_REQUEST['database'])) == 0 ) $lname=$id." Restauration :".FormatString($_FILES['file']['name']); @@ -111,25 +115,24 @@ if ( isset ($_REQUEST['sa'] )) { $sql="insert into modeledef (mod_id,mod_name) values (".$id.",'Restauration".$lname."') "; - StartSql($cn); + $cn->start(); try{ - getDbValue($cn,$sql); + $cn->get_value($sql); } catch ( Exception $e) { echo '<span class="error">'."Echec de la restauration ".'</span>'; - print_r($e); - Rollback($cn); + $cn->rollback(); exit(); } - Commit($cn); + $cn->commit(); $name=domaine."mod".$id; - ExecSql($cn,"create database ".$name." encoding='utf8'"); + $cn->exec_sql("create database ".$name." encoding='utf8'"); $args=" -d $name ".$_FILES['file']['tmp_name']; $status=exec(PG_RESTORE.$args); echo '<h2 class="info"> Restauration réussie du modèle '.$lname.'</h2>'; - $new_cn=DbConnect($id,'mod'); + $new_cn=new Database($id,'mod'); apply_patch($new_cn,$name,0); @@ -140,35 +143,33 @@ if ( isset ($_REQUEST['sa'] )) { } } else { echo '<div class="content">'; - ini_set('upload_max_filesize','5M'); - echo '<form method="POST" enctype="multipart/form-data" >'; - echo widget::hidden('action','restore'); - echo widget::hidden('sa','r'); + echo '<form method="POST" action="admin_repo.php" enctype="multipart/form-data" >'; + echo HtmlInput::hidden('action','restore'); + echo HtmlInput::hidden('sa','r'); echo '<table>'; echo '<tr><td>'."Nom de la base de donnée".'</td>'; - $wNom=new widget("text"); + $wNom=new IText(); $wNom->name="database"; $wNom->size=12; - echo '<td>'.$wNom->IOValue().'</td></tr>'; + echo '<td>'.$wNom->input().'</td></tr>'; echo '<tr><td>'."Type de backup :".'</td>'; - $chk=new widget("radio"); + $chk=new IRadio(); $chk->name="t"; $chk->value="d"; - echo '<td>'.$chk->IOValue()."Dossier".'</td>'; + echo '<td> '.$chk->input()."Dossier".'</td>'; echo '</tr><tr><td></td>'; $chk->name="t"; $chk->value="m"; - echo '<td>'.$chk->IOValue()."Modele".'</td>'; + echo '<td>'.$chk->input()."Modele".'</td>'; echo '<tr>'; - $file=new widget("file"); + $file=new IFile(); $file->name="file"; $file->value="mod"; - $file->label="Fichier"; - $file->table=1; - echo $file->IOValue(); + echo td('Fichier '). + td($file->input()); echo '</tr>'; echo '</table>'; - echo widget::submit("","Restauration"); + echo HtmlInput::submit("","Restauration"); echo '</form>'; echo '</div>'; } diff --git a/include/stock.inc.php b/include/stock.inc.php index 08e4a8d92..c85dc86d6 100644 --- a/include/stock.inc.php +++ b/include/stock.inc.php @@ -25,21 +25,20 @@ * \brief Manage the stock by year */ require_once('class_dossier.php'); -include_once("preference.php"); include_once ("ac_common.php"); -include_once("postgres.php"); +require_once('class_database.php'); include_once("stock_inc.php"); -include_once("check_priv.php"); require_once('class_dossier.php'); +require_once('class_periode.php'); $gDossier=dossier::id(); html_page_start($_SESSION['g_theme']); -include_once ("postgres.php"); +require_once('class_database.php'); /* Admin. Dossier */ $gDossier=dossier::id(); -$cn=DbConnect($gDossier); +$cn=new Database($gDossier); include_once ("class_user.php"); $User=new User($cn); $User->Check(); @@ -78,7 +77,7 @@ if ( isset ($_POST['sub_change'])) or isNumber($year) == 0 ) { $msg="Stock données non conformes"; - echo "<script> alert('$msg');</script>"; + alert('$msg'); echo_error($msg); } else { @@ -93,7 +92,7 @@ if ( isset ($_POST['sub_change'])) if ( $change != 0) { $comment=FormatString($comment); - $Res=ExecSql($cn,"insert into stock_goods + $Res=$cn->exec_sql("insert into stock_goods ( j_id, f_id, sg_code, @@ -119,7 +118,7 @@ if ( isset ($_POST['sub_change'])) $action="detail"; } } -echo JS_VIEW_JRN_MODIFY; +echo JS_LEDGER; // View the summary // if year is not set then use the year of the user's periode @@ -127,7 +126,9 @@ if ( ! isset ($_GET['year']) ) { // get defaut periode $a=$User->get_periode(); // get exercice of periode - $year=get_exercice($cn,$a); + $periode=new Periode($cn,$a); + $year=$periode->get_exercice(); + } else { $year=$_GET['year']; @@ -152,7 +153,7 @@ if ( $action == 'detail' ) { echo 'Entrer la valeur qui doit augmenter ou diminuer le stock'; echo '<form action="?p_action=stock" method="POST">'; echo ChangeStock($sg_code,$year); - echo '<input type="submit" name="sub_change" value="Ok">'; + echo HtmlInput::submit("sub_change" ,"Ok"); echo dossier::hidden(); echo '</form>'; } @@ -165,10 +166,10 @@ if ( $action == 'detail' ) { // Show the possible years $sql="select distinct (p_exercice) as exercice from parm_periode "; -$Res=ExecSql($cn,$sql); +$Res=$cn->exec_sql($sql); $r=""; -for ( $i = 0; $i < pg_NumRows($Res);$i++) { - $l=pg_fetch_array($Res,$i); +for ( $i = 0; $i < Database::num_row($Res);$i++) { + $l=Database::fetch_array($Res,$i); $r.=sprintf('<A class="mtitle" HREF="?p_action=stock&year=%d&'.dossier::get().'">%d</a> - ', $l['exercice'], $l['exercice']); diff --git a/include/stock_inc.php b/include/stock_inc.php index 57137cfb8..cc444d488 100644 --- a/include/stock_inc.php +++ b/include/stock_inc.php @@ -52,10 +52,10 @@ where // send the sql - $Res=ExecSql($p_cn,$sql); + $Res=$p_cn->exec_sql($sql); - if ( ( $M = pg_NumRows($Res)) == 0 ) return null; + if ( ( $M = Database::num_row($Res)) == 0 ) return null; // store it in a HTLM table $result='<table style="width:100%;border:solid blue 2px ;border-style:outset;">'; $result.="<tr>"; @@ -68,7 +68,7 @@ where // Sql result => table for ($i = 0; $i < $M ; $i++ ) { - $r=pg_fetch_array($Res,$i); + $r=Database::fetch_array($Res,$i); $result.="<TR>"; // sg_code and link to details @@ -127,12 +127,12 @@ $sql="select distinct f_id,av_text and sg_code='$p_sg_code' "; // Execute - $Res=ExecSql($p_cn,$sql); - if ( ( $M=pg_NumRows($Res)) == 0 ) return null; + $Res=$p_cn->exec_sql($sql); + if ( ( $M=Database::num_row($Res)) == 0 ) return null; // Store in an array for ( $i=0; $i<$M;$i++) { - $r=pg_fetch_array($Res,$i); + $r=Database::fetch_array($Res,$i); $a['f_id']=$r['f_id']; $fiche=new Fiche($p_cn,$r['f_id']); $a['av_text']=$fiche->getName(); @@ -190,8 +190,8 @@ $sql="select sg_code, $r.='<H2 class="info">'.$p_sg_code." Noms : ".$name.'</H2>'; - $Res=ExecSql($p_cn,$sql); - if ( ($M=pg_NumRows($Res)) == 0 ) return "no rows"; + $Res=$p_cn->exec_sql($sql); + if ( ($M=Database::num_row($Res)) == 0 ) return "no rows"; $r.='<table style="width:100%;border:solid blue 2px ;border-style:outset;">'; $r.="<TR>"; $r.="<th>Date </th>"; @@ -206,7 +206,7 @@ $sql="select sg_code, $l_sessid=$_REQUEST['PHPSESSID']; for ( $i=0; $i < $M;$i++) { - $l=pg_fetch_array($Res,$i); + $l=Database::fetch_array($Res,$i); $r.="<tR>"; // date @@ -299,9 +299,9 @@ function GetQuantity($p_cn,$p_sg_code,$p_year,$p_type) { sg_code='$p_sg_code' and (p_exercice = '$p_year' or to_char(sg_date::timestamp,'YYYY')='$p_year') and sg_type='$p_type'"; - $Res=ExecSql($p_cn,$sql); - if ( pg_NumRows($Res)== 0) return null; - $value=pg_fetch_array($Res,0); + $Res=$p_cn->exec_sql($sql); + if ( Database::num_row($Res)== 0) return null; + $value=Database::fetch_array($Res,0); return $value['result']; } diff --git a/include/suivi_adm.inc.php b/include/suivi_adm.inc.php new file mode 100644 index 000000000..74d77500f --- /dev/null +++ b/include/suivi_adm.inc.php @@ -0,0 +1,58 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file is used for the follow up of the customer (mail, meeting...) + * - p_action = adm + * - sb = detail + * - sc = sv + * - sd = this parameter is used here + * - $cn = database connection + */ +require_once('class_action.php'); +$User->can_request(GECOUR); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('infobulle.js'); +echo js_include('acc_ledger.js'); +echo js_include('ajax_fiche.js'); +echo JS_CARD; + +/** + *\note fix problem with ShowActionList, this function is local + * to the file action.inc.php. And this function must different for each + * follow-up (suivi) + */ +$sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"list"; +$ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0; +$p_action=$_REQUEST['p_action']; +$base="p_action=$p_action&sc=sv&sb=detail&f_id=".$_REQUEST['f_id']; +$retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base); +$fiche=new Fiche($cn,$_REQUEST['f_id']); + +$_GET['qcode']=$fiche->get_quick_code(); +$_REQUEST['qcode']=$fiche->get_quick_code(); +echo '<div class="content">'; +require_once('action.common.inc.php'); +echo '</div>'; diff --git a/include/suivi_client.inc.php b/include/suivi_client.inc.php new file mode 100644 index 000000000..925deb728 --- /dev/null +++ b/include/suivi_client.inc.php @@ -0,0 +1,58 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file is used for the follow up of the customer (mail, meeting...) + * - p_action = client + * - sb = detail + * - sc = sv + * - sd = this parameter is used here + * - $cn = database connection + */ +require_once('class_action.php'); +$User->can_request(GECOUR); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('infobulle.js'); +echo js_include('acc_ledger.js'); +echo js_include('ajax_fiche.js'); +echo JS_CARD; + +/** + *\note problem with ShowActionList, this function is local + * to the file action.inc.php. And this function must different for each + * suivi + */ +$sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"list"; +$ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0; +$p_action=$_REQUEST['p_action']; +$base="p_action=$p_action&sc=sv&sb=detail&f_id=".$_REQUEST['f_id']; +$retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base); +$fiche=new Fiche($cn,$_REQUEST['f_id']); + +$_GET['qcode']=$fiche->get_quick_code(); +$_REQUEST['qcode']=$fiche->get_quick_code(); +echo '<div class="content">'; +require_once('action.common.inc.php'); +echo '</div>'; diff --git a/include/suivi_supplier.inc.php b/include/suivi_supplier.inc.php new file mode 100644 index 000000000..7d7dc46cc --- /dev/null +++ b/include/suivi_supplier.inc.php @@ -0,0 +1,58 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file is used for the follow up of the customer (mail, meeting...) + * - p_action = supplier + * - sb = detail + * - sc = sv + * - sd = this parameter is used here + * - $cn = database connection + */ +require_once('class_action.php'); +$User->can_request(GECOUR); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('infobulle.js'); +echo js_include('acc_ledger.js'); +echo js_include('ajax_fiche.js'); +echo JS_CARD; + +/** + *\note problem with ShowActionList, this function is local + * to the file action.inc.php. And this function must different for each + * suivi + */ +$sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"list"; +$ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0; +$p_action=$_REQUEST['p_action']; +$base="p_action=$p_action&sc=sv&sb=detail&f_id=".$_REQUEST['f_id']; +$retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base); +$fiche=new Fiche($cn,$_REQUEST['f_id']); + +$_GET['qcode']=$fiche->get_quick_code(); +$_REQUEST['qcode']=$fiche->get_quick_code(); +echo '<div class="content">'; +require_once('action.common.inc.php'); +echo '</div>'; diff --git a/include/supplier.inc.php b/include/supplier.inc.php index ff31a1201..21c7eafc7 100644 --- a/include/supplier.inc.php +++ b/include/supplier.inc.php @@ -16,159 +16,154 @@ * along with PhpCompta; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - /* $Revision$ */ - // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + /*!\brief include from supplier.inc.php and concerned only the supplier card and + * the supplier category + */ +require_once("class_iselect.php"); +require_once("class_ihidden.php"); require_once("class_supplier.php"); -$sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:""; +require_once("class_ibutton.php"); +require_once('class_iaction.php'); +require_once('class_fiche_def.php'); +require_once('class_iaction.php'); +require_once('class_fiche_def.php'); +require_once('class_ipopup.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo JS_CARD; +echo JS_AJAX_FICHE; +echo HtmlInput::phpsessid(); +echo ICard::ipopup('ipop_newcard'); +$ip_cat=new IPopup('ipop_cat'); +$ip_cat->title=_('Ajout d\'une catégorie'); +$ip_cat->value=''; +echo $ip_cat->input(); +echo IPoste::ipopup('ipop_account'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); +echo ICard::ipopup('ipopcard'); +$low_action=(isset($_REQUEST['sb']))?$_REQUEST['sb']:"list"; /*! \file - * \brief Called from the module "Gestion" to manage the customer + * \brief Called from the module "Gestion" to manage the supplier */ +$User->can_request(GECUST); +$href=basename($_SERVER['PHP_SELF']); -$User->can_request(GESUPPL); -$script=basename($_SERVER['PHP_SELF']); -?> +// by default open liste +if ( $low_action == "" ) + $low_action="list"; -<?php -// Menu + +//----------------------------------------------------- // Remove a card -if ( isset ($_POST['delete']) ) +//----------------------------------------------------- +if ( isset($_POST['delete'] ) ) { + if ( $User->check_action(FICADD) == 0 ) { + alert('Vous ne pouvez pas enlever de fiche'); + return; + } $f_id=$_REQUEST['f_id']; $fiche=new Supplier($cn,$f_id); $fiche->remove(); - $sub_action="list"; + $low_action="list"; + } + //----------------------------------------------------- -// Add card -if ( $sub_action=="insert" ) -{ - echo '<div class="content">'; - - $retour=widget::button_href("Retour", urldecode($_REQUEST['url'])); - - $supplier=new Supplier($cn); - $supplier->Save($_REQUEST['fd_id']); - echo $retour; - echo "<table>"; - echo $supplier->Display(true); - echo "</table>"; - echo $retour; - echo '</div>'; -} +// list of supplier //----------------------------------------------------- -// Save modification -if ( isset ($_POST['mod'])) +if ( $low_action == "list" ) { - // modification is asked - $f_id=$_REQUEST['f_id']; - $sup=new Supplier($cn,$f_id); - $sup->Save(); -} -// by default open liste -if ( $sub_action == "" ) - $sub_action="list"; -//----------------------------------------------------- -//Display a blank card -if ( $sub_action=="blank") -{ - $retour=widget::button_href('Retour','?p_action=fournisseur&'.dossier::get()); - echo '<div class="content">'; - - echo $retour; - $c=new Supplier($cn); - echo '<form method="post" '; - echo '<input type="hidden" name="p_action" value="fournisseur">'; - echo '<input type="hidden" name="sa" value="insert">'; - echo '<input type="hidden" name="fd_id" value="'.$_GET['fd_id'].'">'; - echo dossier::hidden(); - echo $c->blank($_GET['fd_id']); - echo '<input type="Submit" value="Sauve">'; - echo '<input type="hidden" name="url" value="'.$_GET['url'].'">'; - - echo '</form>'; - echo $retour; - echo '</div>'; -} -//----------------------------------------------------- -// list -if ( $sub_action == "list" ) -{ ?> <div class="content"> -<span style="position:float;float:left"> -<form method="get" action=""> -<?php - echo dossier::hidden(); - +<span style="position:float;float:left"> +<form method="get" action="<?php echo $href; ?>"> +<?php + echo dossier::hidden(); $a=(isset($_GET['query']))?$_GET['query']:""; - printf ('<input type="text" name="query" value="%s">', + printf ('Recherche <input type="text" name="query" value="%s">', $a); ?> <input type="submit" name="submit_query" value="recherche"> -<input type="hidden" name="p_action" value="fournisseur"> -</form> -</span> -<span style="position:float;float:left"> -<form method="get" > -<input type="hidden" name="p_action" value="fournisseur"> - -<?php - $w=new widget("select"); - $w->name="fd_id"; - $w->value= make_array($cn,"select fd_id,fd_label from fiche_def where ". - " frd_id=".FICHE_TYPE_FOURNISSEUR); - echo $w->IOValue(); - echo dossier::hidden(); - -?> -<input type="hidden" name="sa" value="blank"> -<input type="submit" name="submit_query" value="Ajout Sup"> -<input type="hidden" name="url" <?php $url=urlencode($_SERVER['REQUEST_URI']);echo 'value="'.$url.'"'; ?> - +<input type="hidden" name="p_action" value="supplier"> </form> </span> <?php - $sup=new Supplier($cn); + $supplier=new Supplier($cn); $search=(isset($_GET['query']))?$_GET['query']:""; - // echo '<div style="position:absolute;left:15%;width:67%;margin-top:20px;">'; + echo '<div class="content">'; - echo $sup->Summary($search); + echo $supplier->Summary($search,'supplier'); + + + echo '<br>'; + echo '<br>'; + echo '<br>'; + /* Add button */ + $f_add_button=new IButton('add_card'); + $f_add_button->label=_('Créer une nouvelle fiche'); + $f_add_button->set_attribute('ipopup','ipop_newcard'); + $f_add_button->set_attribute('win_refresh','yes'); + + $f_add_button->set_attribute('type_cat',FICHE_TYPE_FOURNISSEUR); + $f_add_button->javascript=" select_card_type(this);"; + echo $f_add_button->input(); + + $f_cat_button=new IButton('add_cat'); + $f_cat_button->set_attribute('ipopup','ipop_cat'); + $f_cat_button->set_attribute('type_cat',FICHE_TYPE_FOURNISSEUR); + $f_cat_button->label=_('Ajout d\'une catégorie'); + $f_cat_button->javascript='add_category(this)'; + echo $f_cat_button->input(); echo '</div>'; echo '</div>'; + } -//----------------------------------------------------- -// Show Detail -if ( $sub_action == 'detail' ) +/*---------------------------------------------------------------------- + * Detail for a card, Suivi, Contact, Operation,... * + * cc stands for supplier card + *----------------------------------------------------------------------*/ +if ( $low_action == 'detail') { + /* Menu */ + require_once('supplier_card.inc.php'); + exit(); +} + +if ( $low_action=="insert" ) { - $f_id=$_REQUEST['f_id']; + /* security : check if user can add card */ + if ( $User->check_action(FICADD) == 0 ) { + alert('Vous ne pouvez pas ajouter de fiche'); + return; + } + + $supplier=new Supplier($cn); + $supplier->Save($_REQUEST['fd_id']); echo '<div class="content">'; - $sup=new Supplier($cn,$f_id); - $retour=widget::button_href("Retour", urldecode($_REQUEST['url'])); + echo "<table>"; + echo $supplier->Display(true); + echo "</table>"; + $retour=new IAction(); + $retour->label="Retour"; + $retour->value="?p_action=supplier&".dossier::get(); + echo $retour->input(); + echo '</div>'; - echo $retour; - echo '<form action="'.$_REQUEST['url'].'" method="post">'; - echo $sup->Display(false); - $w=new widget("hidden"); - $w->name="p_action"; - $w->value="fournisseur"; - echo $w->IOValue(); - $w->name="f_id"; - $w->value=$f_id; - echo $w->IOValue(); - - echo widget::submit('mod','Sauver les modifications'); - echo widget::reset("Annuler"); - echo widget::submit('delete','Effacer cette fiche','onclick="return confirm(\'Confirmer effacement ?\');"'); - echo '</form>'; - echo $retour; - echo '<div>'; } + html_page_stop(); ?> diff --git a/include/supplier_card.inc.php b/include/supplier_card.inc.php new file mode 100644 index 000000000..b6f9de823 --- /dev/null +++ b/include/supplier_card.inc.php @@ -0,0 +1,130 @@ +<?php +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/*!\file + * \brief this file will handle all the actions for a specific customer ( + * contact,operation,invoice and financial) + * include from client.inc.php and concerned only the customer card and + * the customer category + */ +require_once('class_contact.php'); +require_once('class_ipopup.php'); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo js_include('card.js'); + +echo ICard::ipopup('ipopcard'); + + /* $sub_action = sb = detail */ + /* $cn database conx */ +$return=new IAction(); +$return->name='retour'; +$return->label='Retour'; +$return->value='?p_action=supplier&'.$str_dossier; +$root="?p_action=supplier&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier; +$ss_action=( isset ($_REQUEST['sc'] ))? $_REQUEST['sc']: ''; +switch ($ss_action) { +case 'dc': + $def=1; + break; +case 'sv': /* all the actions (mail,meeting...) */ + $def=2; + break; +case 'cn': + $def=3; + break; +case 'op': + $def=4; + break; +default: + $def=1; + $ss_action='dc'; +} +$f=new fiche($cn,$_REQUEST['f_id']); +echo '<span style="padding:2px"><h2 class="info2" style="display:inline">'.$f->get_quick_code()." ".$f->strAttribut(ATTR_DEF_NAME).'</span></h2>'; +echo '<div class="u_subtmenu">'; +echo ShowItem(array( + array($root."&sc=dc",_('Fiche'),_('Détail de la fiche'),1), + array($root.'&sc=sv',_('Suivi'),_('Suivi Fournisseur, devis, bon de commande, courrier'),2), + array($root.'&sc=cn',_('Contact'),_('Liste de contacts de ce fournisseur'),3), + array($root.'&sc=op',_('Opérations'),_('Toutes les opérations'),4), + array('?p_action=supplier&'.dossier::get(),_('Retour liste'),_('Retour à la liste des fournisseurs'),5) + ), + 'H',"mtitle","mtitle",$def,' width="100%"'); +echo '</div>'; + +//--------------------------------------------------------------------------- +// Show Detail of a card and category +//--------------------------------------------------------------------------- +if ( $ss_action == 'dc' ) +{ + require_once('detail_supplier.inc.php'); +} +//--------------------------------------------------------------------------- +// Follow up : mail, bons de commande, livraison, rendez-vous... +//--------------------------------------------------------------------------- +if ( $ss_action == 'sv' ) { + require_once('suivi_supplier.inc.php'); +} +/*---------------------------------------------------------------------- + * Operation all the operation of this customer + * + * ----------------------------------------------------------------------*/ +if ( $ss_action == 'op') { + require_once('operation_supplier.inc.php'); +} +/*---------------------------------------------------------------------- + * All the contact + * + *----------------------------------------------------------------------*/ +if ( $ss_action == 'cn') { + echo '<div class="content">'; + echo dossier::hidden(); + echo HtmlInput::phpsessid(); + $f=new fiche($cn,$_REQUEST['f_id']); + $contact=new Contact($cn); + $contact->company=$f->get_quick_code(); + echo $contact->summary(""); + + $sql=' select fd_id from fiche_def where frd_id='.FICHE_TYPE_CONTACT; + $filter=$cn->make_list($sql); + if ( empty ($filter)) { + echo '<span class="notice">'; + echo _("Vous devez aller dans fiche et créer une catégorie pour les contacts"); + echo '</span>'; + exit(); + } + /* Add button */ + $f_add_button=new IButton('add_card'); + $f_add_button->label=_('Créer une nouvelle fiche'); + $f_add_button->set_attribute('ipopup','ipopcard'); + + $f_add_button->set_attribute('filter',$filter); + $f_add_button->javascript=" select_card_type(this);"; + + echo $f_add_button->input(); + echo '</div>'; +} diff --git a/include/template/account_result.php b/include/template/account_result.php new file mode 100644 index 000000000..48f940e88 --- /dev/null +++ b/include/template/account_result.php @@ -0,0 +1,25 @@ +<fieldset id="asearch" style="height:88%"> +<legend><? echo _('Résultats')?></legend> +<div style="height:88%;overflow:auto;"> +<ul class="select_table"> +<? for ($i=0;$i<sizeof($array);$i++) : ?> +<li> +<a href="javascript:void(0)" onclick="<?=$array[$i]['javascript']?>"> +<span> +<?=$array[$i]['pcm_val']?> +</span> +<span> +<?=$array[$i]['pcm_lib']?> +</span> +</a> +</li> + + +<? endfor; ?> +</ul> +<span style="background-color:#9FFFF1;border:1px solid black"> +<? echo _("Nombre d'enregistrements").$i;?> +</span> + +</div> +</fieldset> \ No newline at end of file diff --git a/include/template/account_search.php b/include/template/account_search.php new file mode 100644 index 000000000..1186c28a2 --- /dev/null +++ b/include/template/account_search.php @@ -0,0 +1,3 @@ +<? echo _('Partie du poste comptable ou du libellé'); ?> +<?=$str_poste?> +<?=$str_submit?> \ No newline at end of file diff --git a/include/template/calendar.php b/include/template/calendar.php new file mode 100644 index 000000000..fe5053c89 --- /dev/null +++ b/include/template/calendar.php @@ -0,0 +1,39 @@ +<div class="pc_calendar" id="user_cal"> +<?=$month_year?> +<table width="100%"> +<tr> +<?php +for ($i=0;$i<=6;$i++){ + echo "<th>"; + echo $week[$i]; + echo "</th>"; +} +?> +</tr> +<?php +$ind=1; +$week=0; +while ($ind <= $this->day) { +if ( $week == 0 ) echo "<tr>"; +$class="workday"; +if ( $week == 0 || $week == 6) $class="weekend"; +// compute the date +$timestamp_date=mktime(0,0,0,$this->month,$ind,$this->year); +$date_calendar=date('w',$timestamp_date); +if ( $date_calendar == $week ) { + echo '<td class="'.$class.'">'.'<span class="day">'.$ind."</span>"; + echo $cell[$ind]; + echo '</td>'; + $ind++;$week++; +} else { + echo "<td></td>"; + $week++; +} +//if ( $ind > $this->day ) exit(); +if ( $week == 7 ) { echo "</tr>";$week=0;} +} +if ( $week != 7 ) { echo "</tr>";} +?> + +</table> +</div> diff --git a/include/template/card_result.php b/include/template/card_result.php new file mode 100644 index 000000000..33e219ad0 --- /dev/null +++ b/include/template/card_result.php @@ -0,0 +1,29 @@ +<fieldset id="asearch" style="height:88%"> + <legend><? echo _('Résultats'); ?></legend> +<div style="height:88%;overflow:auto;"> +<table width="100%"> +<? for ($i=0;$i<sizeof($array);$i++) : ?> +<tr> +<td> +<a href="javascript:void(0)" class="one" onclick="<?=$array[$i]['javascript']?>"> +<?=$array[$i]['quick_code']?> +</a> +</td> +<td> +<?=$array[$i]['name']?> +</td> +<td> +<?=$array[$i]['description']?> +</td> + +</tr> + + +<? endfor; ?> +</table> +<span style="background-color:#9FFFF1;border:1px solid black"> + <? echo _("Nombre d'enregistrements:$i"); ?> +</span> + +</div> +</fieldset> diff --git a/include/template/category_of_card.php b/include/template/category_of_card.php new file mode 100644 index 000000000..6e8793a56 --- /dev/null +++ b/include/template/category_of_card.php @@ -0,0 +1,25 @@ +<TABLE BORDER="0" CELLSPACING="0"> +<TR> + <TD><?=_('Nom de la catégorie de fiche')?> </TD> +<TD><INPUT TYPE="INPUT" NAME="nom_mod"></TD> +</TR> +<TR> + <TD> <?=_('Classe de base')?> </TD> +<TD> +<?=$str_poste?> +</TD> +<td><span id="class_base_label"></span></td> +</TR> +<TR> + <TD> <INPUT TYPE="CHECKBOX" NAME="create" UNCHECKED><?=_('Création automatique du poste comptable')?></TD> +</TR> +</TABLE> +<p class="info"> + <?=_('Si vous utilisez la création automatique de poste, chaque nouvelle fiche de cette catégorie aura son propre poste comptable. Ce poste comptable sera la classe de base augmenté de 1.')?> +</p> +<p class="info"> + <?=_('Si vous n\'utilisez pas la création automatique, toutes les nouvelles fiches auront par défaut le même poste comptable. Ce poste comptable par défaut est la classe de base.')?> +</p> +<p class="info"> +<?=_(' A moins qu\'en créant la fiche, vous forcez un autre poste comptable')?> +</p> diff --git a/include/template/dashboard.php b/include/template/dashboard.php new file mode 100644 index 000000000..f336d806a --- /dev/null +++ b/include/template/dashboard.php @@ -0,0 +1,67 @@ +<div> +<fieldset> +<legend><?=_('Calendrier')?> +</legend> +<?php echo $cal->display(); ?> +</fieldset> +</div> +<div style="float:left;width:50%"> +<fieldset> +<legend><?=_('Dernières opérations')?> +</legend> +<table width="100%"> +<?php +for($i=0;$i<count($last_ledger);$i++): +?> +<tr> +<td> +<?=$last_ledger[$i]['jr_date_fmt']?> +</td> +<td> + <?=h(substr($last_ledger[$i]['jr_comment'],0,20))?> +</td> +<td> +<?=$last_ledger[$i]['jr_montant']?> +</td> +<td> +<?=$last_ledger[$i]['jr_internal']?> +</td> + +</tr> +<? endfor;?> +</table> + +</fieldset> +</div> + + +<div style="float:left;width:50%"> +<fieldset> +<legend><?=_('Dernières actions')?> +</legend> +<table width="100%"> +<?php +for($i=0;$i<count($last_operation);$i++): +?> +<tr> +<td> + <?=h($last_operation[$i]['ag_timestamp_fmt'])?> +</td> +<td> + <?=h($last_operation[$i]['vw_name'])?> +</td> + +<td> +<? echo '<A HREF="commercial.php?'.dossier::get().'&p_action=suivi_courrier&sa=detail&ag_id='.$last_operation[$i]['ag_id'].'">'; ?> +<?=h(substr($last_operation[$i]['ag_title'],0,40))?> +</a> +</td> +<td> +<?=$last_operation[$i]['dt_value']?> +</tr> + +<? endfor;?> +</table> +</fieldset> +</div> + diff --git a/include/template/detail-action.php b/include/template/detail-action.php new file mode 100644 index 000000000..e01a310d3 --- /dev/null +++ b/include/template/detail-action.php @@ -0,0 +1,261 @@ +<fieldset> + <legend> +<?=_('Informations générales')?> + </legend> + <div style="float:right"> + <?echo $retour; + ?> + </div> +<div style="float:left;width:50%"> +<em> <strong><?php echo $sp->input(); ?></strong></em> + + <table width="50%"> + <TR> + <TD> + <?=_('Date')?> + </TD> + <TD> + <?php echo $date->input(); + ?> + </TD> + </TR> + <TR> + <TD> + <?=_('Heure')?> + </TD> + <TD> + <?php echo $str_ag_hour; + ?> + </TD> + </TR> + <tr> + <TD> + <?=_('Reference')?> + </TD> + <TD> + <?php echo $str_ag_ref; + ?> + </TD> + </TR> + <tr> + <TD> + <?=_('Destinataire')?> + </TD> + <TD> + <?php echo $w->search().$w->input(); + ?> + </td> + </Tr> + <tr> + <TD> + <?=_('Contact')?> + </TD> + <TD> + <?php echo $ag_contact->search().$ag_contact->input(); + ?> + </td> + </Tr> + <tr> + <TD colspan="2"> + <?php echo $spcontact->input(); ?> + </td> + </Tr> + </table> +</div> +<div style="float:left;width:50%"> + <table> + <tr> + <td> + <?=_('Concerne')?> + </td> + <td> + <?php echo $lag_ref_ag_id; + ?> + </td> + </tr> + <tr> + <TD> + <?=_('Type')?> + </TD> + <TD> + <?php echo $str_doc_type; + ?> + </TD> + </tr> + + <tr> + <TD> + <?=_('Calendrier')?> + </TD> + <TD> + <?php echo $str_ag_cal; + ?> + </TD> + </tr> + <tr> + <TD> + <?=_('Etat')?> + </TD> + <td> + <?php echo $str_state; + ?> + <TD> + </TD> + </TR> + <tr> + <TD> + <?=_('Priorité')?> + </TD> + <td> + <?php echo $str_ag_priority; + ?> + <TD> + </TD> + </TR> + <tr> + <TD> + <?=_('Affecté')?> + </TD> + <td> + <?php echo $str_ag_dest;?> + <TD> + </TD> + </TR> + </table> +</div> +</fieldset> +<fieldset> + <legend> + <?=_('Description')?> + </legend> + <p> + <?=_('Titre')?> + <br> + <?php echo $title->input(); + ?> + <br> + <?=_('Commentaire')?> + <br> + <?php echo $desc->input(); + ?> + </p> +</fieldset> +<input type='button' value='Montrer articles' id="toggleButton" onclick='toggleShowDetail()'> +<fieldset id="fldDetail" style='display:block'> + <LEGEND> <?=_('Détail des articles')?> +</LEGEND> +<?php // hidden fields +for ($i=0;$i<count($aArticle);$i++) : + echo $aArticle[$i]['ad_id']; + echo $aArticle[$i]['hidden_tva']; + echo $aArticle[$i]['hidden_htva']; +endfor; +?> +<table id="art" > +<tr> + <th><?=_('Fiche')?></th> + <th><?=_('Description')?></th> + <th><?=_('prix unitaire')?></th> +<th><?=_('quantité')?></th> +<th><?=_('Code TVA')?></th> +<th><?=_('Montant TVA')?></th> +<th><?=_('Montant TVAC')?></th> +<!-- <th>Montant TVAC</th> --> +</tr> +<?for ($i=0;$i<count($aArticle);$i++): ?> +<TR> +<TD><?php echo $aArticle[$i]['fid'] ?></TD> +<TD><?php echo $aArticle[$i]['desc'] ?></TD> +<TD class="num"><?php echo $aArticle[$i]['pu'] ?></TD> +<TD class="num"><?php echo $aArticle[$i]['quant'] ?></TD> +<TD class="num"><?php echo $aArticle[$i]['tvaid'] ?></TD> +<TD class="num"><?php echo $aArticle[$i]['tva'] ?></TD> +<TD class="num"><?php echo $aArticle[$i]['tvac'] ?></TD> + +<!-- <TD class="num"><?php echo $aArticle[$i]['ctva'] ?></TD> +<TD class="num"><?php echo $aArticle[$i]['htva'] ?></TD> +<TD class="num"><?php echo $aArticle[$i]['atva'] ?></TD> +<TD class="num"><?php echo $aArticle[$i]['totaltvac'] ?></TD> +--> +</TR> +<?php endfor; ?> +</table> +<script language="JavaScript"> +toggleShowDetail(); +function toggleShowDetail() { + try {var detail=g('fldDetail'); + var but=g('toggleButton'); + if (detail.style.display=='block' ) { but.value="<?=_("Montrer les détails")?>";detail.style.display='none';} + else { but.value="<?=_("Cacher les détails")?>";detail.style.display='block';} } + catch (error) {alert(error);} + } + +</script> +<div style="float: left; text-align: right; padding-right: 5px; font-size: 1.2em; font-weight: bold; color: blue;"> + <input name="act" id="act" value="<?=_('Actualiser')?>" onclick="compute_all_purchase();" type="button"> + + <div style="float: right; text-align: left; font-size: 1.2em; font-weight: bold; color: blue;" id="sum"> + <br><span id="htva">0.0</span> + <br><span id="tva">0.0</span> + <br><span id="tvac">0.0</span> + </div> + +<div style="float: left; text-align: right; padding-right: 5px; font-size: 1.2em; font-weight: bold; color: blue;"> + <br>Total HTVA + <br>Total TVA + <br>Total TVAC + </div> +</div> + +</fieldset> +<fieldset > + <legend> + <?=_('Document à générer')?> + </legend> + <?php echo $str_select_doc; +echo $str_submit_generate; + ?> +</fieldset> +<fieldset> + <legend> + <?=_('Pièces attachées')?> + </legend> + <?php +for ($i=0;$i<sizeof($aAttachedFile);$i++) : + ?> + <p> + <A class="mtitle" id="<?php echo "doc".$aAttachedFile[$i]['d_id'];?>" href="<?php echo $aAttachedFile[$i]['link']?>"><?php echo $aAttachedFile[$i]['d_filename'];?> + </A> +<?php $rmDoc=sprintf("javascript:if ( confirm('"._('Voulez-vous effacer le document')." %s')==true ) {remove_document('%s','%s','%s');}", + $aAttachedFile[$i]['d_filename'], + $_REQUEST['PHPSESSID'], + dossier::id(), + $aAttachedFile[$i]['d_id']); + ?> + <a class="mtitle" id="<?php echo "ac".$aAttachedFile[$i]['d_id'];?>" href="<?php echo $rmDoc;?>">Effacer</a> + </p> + <?php +endfor; + ?> + <script language="javascript"> +function addFiles() { +try { + docAdded=document.getElementById('add_file'); + new_element=document.createElement('li'); + new_element.innerHTML='<input class="inp" type="file" value="" name="file_upload[]"/>'; + docAdded.appendChild(new_element); +} +catch(exception) { alert('<?=j(_('Je ne peux pas ajouter de fichier'))?>'); alert(exception);} +} +</script> + <p> + <strong>Fichiers à ajouter: </strong> + <ol id='add_file'> + <li> + <?php echo $upload->input(); + ?> + </li> + </ol> + </p> + <input type="button" onclick="addFiles();" value="Ajouter un fichier"> +</fieldset> diff --git a/include/template/extension-detail.php b/include/template/extension-detail.php new file mode 100644 index 000000000..89a9a4f75 --- /dev/null +++ b/include/template/extension-detail.php @@ -0,0 +1,47 @@ +<div> +<?=$str_hidden?> +<fieldset> +<legend><?=_('Détail extension')?></legend> +<table> +<tr> +<td style="text-align:right"> +<?=_('Nom')?> +</td> +<td> +<?=$str_name?> +</td> +</TR> +<tr> +<td style="text-align:right"> +<?=_('Code')?></td> +<td> +<?=$str_code?> +</td> +</tr> +<tr> +<td style="text-align:right"> +<?=_('description')?> +</td> +<td> +<?=$str_desc?> +</td> +</tr> +<tr> +<td style="text-align:right"> +<?=_('chemin et nom de fichier')?> +</td> +<td> +<?=$str_file?> +</td> +</tr> +<tr> +<td style="text-align:right"> +<?=_('Actif')?> +</td> +<td> +<?=$str_enable?> +</td> +</tr> +</table> +</fieldset> +</div> \ No newline at end of file diff --git a/include/template/extension-sec.php b/include/template/extension-sec.php new file mode 100644 index 000000000..7c232450f --- /dev/null +++ b/include/template/extension-sec.php @@ -0,0 +1,31 @@ +<div style="overflow:auto"> +<fieldset> +<legend><?=_('Sécurité')?></legend> +<table class="result"> +<tr > +<th><?=_('login')?></th> +<th><?=_('Prénom')?></th> +<th><?=_('Nom')?></th> +<th><?=_('Accès')?></th> +</tr> +<? for ($i = 0 ; $i < sizeof($array);$i++) : ?> +<? if ( $i % 2 == 0 ) $class="even"; else $class="odd"; ?> +<tr> +<td > +<?=$array[$i]['use_login']?> +</td> +<td> +<?=$array[$i]['use_first_name']?> +</td> +<td> +<?=$array[$i]['use_name']?> +</td> +<td> +<?=$array[$i]['access']?> +</td> +</tr> +<? endfor;?> + +</table> +</fieldset> +</div> \ No newline at end of file diff --git a/include/template/extension.php b/include/template/extension.php new file mode 100644 index 000000000..15a11a3f2 --- /dev/null +++ b/include/template/extension.php @@ -0,0 +1,33 @@ +<?=$str_new?> +<table width="100%"> +<? for ($i=0;$i < count($ext);$i++) : ?> +<? $idx=$ext[$i]['ex_id']; ?> +<tr id="<? echo 'tr_'.$idx;?>" > +<td> +<a href="javascript:detail_extension('<?=$idx?>')"> +<?=$ext[$i]['ex_code']?> +</a> +</td> +<td> +<?=$ext[$i]['ex_name']?> +</td> +<td> +<?=$ext[$i]['ex_desc']?> +</td> +<td> + <?if ($ext[$i]['ex_enable'] == 'Y' ) echo _('Activé'); else echo _('Désactivé');?> +</td> +<td> +<?php + $bt=new IButton('remove'); +$bt->label=_('Effacer extension'); +$bt->javascript='if (confirm(\''.j(_("Confirmez effacement de l'extension ??")).'\')) { '; +$bt->javascript.='extension_remove(\''.$ext[$i]['ex_id'].'\')}'; +echo $bt->input(); +?> +</td> +</tr> + + +<? endfor; ?> +</table> \ No newline at end of file diff --git a/include/template/fiche_def_input.php b/include/template/fiche_def_input.php new file mode 100644 index 000000000..f0d894c2d --- /dev/null +++ b/include/template/fiche_def_input.php @@ -0,0 +1,29 @@ +<TABLE BORDER="0" CELLSPACING="0"> +<TR> +<TD><?=('Catégorie de fiche')?> </TD> +<TD><INPUT TYPE="INPUT" NAME="nom_mod"></TD> +</TR> +<TR> + <TD> <?=_('Classe de base')?> </TD> +<TD><INPUT TYPE="INPUT" id="class_base" NAME="class_base"> <INPUT TYPE="BUTTON" VALUE="<?=_('Cherche')?>" OnClick="<?php echo $p_js;?>"></TD> +<td><span id="class_base_label"></span></td> +</TR> +<TR> +<TD> <INPUT TYPE="CHECKBOX" NAME="create" CHECKED><?=_('Création automatique du poste comptable')?></TD> +</TR> +<?php + if ( sizeof($ref) ) { + foreach ($ref as $i=>$v) { ?> +<TR><TD COLSPAN="2"> +<? echo $iradio->input("FICHE_REF",$v['frd_id']); + echo $v['frd_text']; + if ( sizeof ($v['frd_class_base']) != 0 ) + echo "  <I>Class base = ".$v['frd_class_base']."</I>"; + echo "</TD></TR>"; + + } + + } +?> + +</TABLE> diff --git a/include/template/forecast-detail.php b/include/template/forecast-detail.php new file mode 100644 index 000000000..c27e17358 --- /dev/null +++ b/include/template/forecast-detail.php @@ -0,0 +1,29 @@ +<h2><?php echo $str_name;?></h2> +<fieldset> +<legend><?php echo $str_action;?></legend> + +<table> +<tr> +<th><?php echo _('Catégorie');?></th> +<th><?php echo _('Poste Comptable');?></th> +<th><?php echo _('QuickCode');?></th> +<th><?php echo _('Libellé');?></th> +<th><?php echo _('Montant');?></th> +<th><?php echo _('Débit ou Crédit');?></th> +</tr> +<?php for ($i=0;$i<count($aCat);$i++):?> +<tr> +<td><?php echo $aCat[$i]['cat'];?></td> +<td><?php echo $aCat[$i]['account'];?></td> +<td><?php echo $aCat[$i]['qc'];?></td> +<td><?php echo $aCat[$i]['name'];?></td> +<td><?php echo $aCat[$i]['per'];?></td> + +<td><?php echo $aCat[$i]['amount'];?></td> +<td><?php echo $aCat[$i]['deb'];?></td> +</tr> +<?php endfor;?> +</table> +</fieldset> + + diff --git a/include/template/forecast_cat.php b/include/template/forecast_cat.php new file mode 100644 index 000000000..f71d55e64 --- /dev/null +++ b/include/template/forecast_cat.php @@ -0,0 +1,24 @@ +<fieldset> +<legend> +<?php echo $str_action;?></legend> +<?php echo $str_name;?> +<h2> <?php echo _('Catégories');?></h2> +<table> +<tr> +<th><?php echo _('Ordre');?></th> +<th><?php echo _('Nom');?></th> +</tr> +<?php for ($i=0;$i<count($aCat);$i++):?> +<tr> +<td> +<?php echo $aCat[$i]['order'];?> +</td> +<td> +<?php echo $aCat[$i]['name'];?> +</td> +</tr> +<?php endfor;?> +</table> + + +</fieldset> \ No newline at end of file diff --git a/include/template/forecast_result.php b/include/template/forecast_result.php new file mode 100644 index 000000000..77d77dc7e --- /dev/null +++ b/include/template/forecast_result.php @@ -0,0 +1,131 @@ +<h1><?php echo $str_name;?></h1> +<?php for ($i=0;$i<count($aCat);$i++): // foreach category ?> +<?php if (count($aItem[$i])==0) continue;?> +<fieldset> +<legend> +<?php echo $aCat[$i]['fc_desc'];$tot_cat_estm=0;$tot_cat_real=0;?> +</legend> + +<?php for ($e=0;$e<count($aItem[$i]);$e++):?> +<table class="result" style="margin-bottom:3px"> +<tr> +<td> + <?php echo '<h2>'.h($aItem[$i][$e]['fi_text']).'</h2>';?> +</td> +</tr> +<tr> +<td> +<table width="100%"> +<tr > +<td style="font-weight:bold;border:1px solid black"> +<?php echo _('Période')?></td> +<?php for ($h=0;$h<count($aPeriode);$h++):?> +<td style="text-align:center;font-weight:bold;border:1px solid black"> +<?php echo $aPeriode[$h]['myear'];?> +</td> +<?php endfor;?> +<td style="text-align:center;font-weight:bold;border:1px solid black;"><?php echo _('Totaux');?></td> +</tr> + +<tr> +<td> +<?php echo _('Estimé');$tot_estm=0;?> +</td> +<?php for ($h=0;$h<count($aPeriode);$h++):?> +<td style="text-align:right;"> +<?php +$amount=$aItem[$i][$e]['fi_amount']; +if (count($aPerMonth[$i]) != 0 ){ + for ($x=0;$x<count($aPerMonth[$i]);$x++) { + $amount=$aItem[$i][$e]['fi_amount']; + if ($aPeriode[$h]['p_id']==$aPerMonth[$i][$x]['fi_pid'] && + $aItem[$i][$e]['fi_card']==$aPerMonth[$i][$x]['fi_card'] && + $aItem[$i][$e]['fi_account']==$aPerMonth[$i][$x]['fi_account'] + ) + { + $amount=$aPerMonth[$i][$x]['fi_amount']; + break; + } + } +} +$estm[$i][$e][$h]=$amount; +printf("%10.2f", $amount); + +$tot_estm+=$amount; +$tot_cat_estm+=$amount; +?> + +</td> +<?php endfor;?> +<td style="text-align:right"> +<?php printf("%10.2f", $tot_estm);?> +</td> +</tr> + +<tr> +<td> +<?php echo _('Réel');$tot=0;?> +</td> +<?php for ($h=0;$h<count($aPeriode);$h++):?> +<td align="right"> +<?php printf("%10.2f", $aReal[$i][$e][$h]);$tot_cat_real+=$aReal[$i][$e][$h];$tot+=$aReal[$i][$e][$h];?> +</td> +<?php endfor;?> +<td align="right"> +<?php printf("%10.2f", $tot);?> +</td> +</tr> + +<tr> +<td> +<?php echo _('Différence');?> +</td> +<?php for ($h=0;$h<count($aPeriode);$h++):?> +<td align="right"> +<?php $diff= $aReal[$i][$e][$h]-$estm[$i][$e][$h]; +printf("%10.2f", $diff); +?> +</td> +<?php endfor;?> +</tr> +<tr> +<td> +<?php echo _('Diff. cumul.'); $cum=0.0; ?> +</td> +<?php for ($h=0;$h<count($aPeriode);$h++):?> +<td align="right"> +<?php +$diff= $aReal[$i][$e][$h]-$estm[$i][$e][$h]; +$cum+=$diff; +printf("%10.2f", $cum); +?> +</td> +<?php endfor;?> +<td align="right"> +<?php printf("%10.2f", $cum); +?> +</td> +</tr> + + +</table> +</td> +</tr> +<?php endfor;?> +</table> + +<table> +<tr> +<?php echo td(_('Total Catégorie estimé'));echo td(sprintf('% 10.2f',$tot_cat_estm),'num');?> +</tr> +<tr> +<?php echo td(_('Total Catégorie réel'));echo td(sprintf('% 10.2f',$tot_cat_real),'num');?> +</tr> +<tr> +<?php echo td(_('Différence'));echo td(sprintf('% 10.2f',$tot_cat_real-$tot_cat_estm),'num');?> +</tr> +</table> +</fieldset> + + +<?php endfor;?> \ No newline at end of file diff --git a/include/template/form_ledger_detail.php b/include/template/form_ledger_detail.php new file mode 100644 index 000000000..bbc4b7e96 --- /dev/null +++ b/include/template/form_ledger_detail.php @@ -0,0 +1,90 @@ +<?php + + echo JS_INFOBULLE; + echo JS_LEDGER; + echo JS_SHOW_TVA; + echo JS_TVA; + echo JS_AJAX_FICHE; + +?> +<fieldset> +<legend><?=$f_legend ?> +</legend> + <?=_('Date').':'?> <?=$f_date ?> <?=_('Echeance')?> : <?=$f_echeance?> +<?=$f_periode?><br> + <?=_('Journal')?> <?=$f_jrn?><br><hr> +<?=$f_type?><?=$f_client_qcode?><?=$f_client_bt?> <?=$f_client?><br> + <?=_('Description')?> <?=$f_desc?> + <?=_('Num Pj')?> <?=$f_pj?><br> +<?=$str_add_button?> +</fieldset> + +<fieldset> +<legend><?=$f_legend_detail?></legend> +<table id="sold_item" width="100%" border="0"> +<tr> +<th colspan="2">Code <?=HtmlInput::infobulle(0)?></th> + <th><?=_('Dénomination')?></th> + <th><?=_('prix/unité htva')?><?=HtmlInput::infobulle(6)?></th> + <th><?=_('quantité')?></th> + <th><?=_('Total HTVA')?></th> +<? if ($flag_tva =='Y') : ?> + <th><?=_('tva')?></th> + <th><?=_('tot.tva')?></th> +<th><?=_('tvac')?></th> +<? endif;?> + + + +</tr> +<? foreach ($array as $item) { +echo '<tr>'; +echo '<td>'.$item['bt'].'</td>'; +echo $item['quick_code']; +?> +<td style="border-bottom: 1px dotted grey; width: 75%;"><?=$item['denom'] ?></td> +<? +echo td($item['pu']); +echo td($item['quantity' ]); +echo td($item['htva']); +if ($flag_tva=='Y') { + echo td($item['tva']); + echo td($item['amount_tva'].$item['hidden']); + +} +echo td($item['tvac']); +echo '</tr>'; +} + +?> +</table> +<?=$str_add_button2?> +<div style="position:float;float:right;text-align:right;padding-right:5px;font-size:1.2em;font-weight:bold;color:blue"> + <?=HtmlInput::button('act',_('Actualiser'),'onClick="compute_all_ledger();"'); ?> + </div> + + <div style="position:float;float:right;text-align:left;font-size:1.2em;font-weight:bold;color:blue" id="sum"> + <br><span id="htva">0.0</span> +<?php + if ( $flag_tva=='Y' ) : ?> + <br><span id="tva">0.0</span> + <br><span id="tvac">0.0</span> +<?php endif; ?> + + </div> + +<div style="position:float;float:right;text-align:right;padding-right:5px;font-size:1.2em;font-weight:bold;color:blue"> +<?php + if ( $flag_tva =='Y') : + ?> + <br><?=_('Total HTVA')?> + <br><?=_('Total TVA')?> + <br><?=_('Total TVAC')?> + <?php else: ?> + <br><?=_('Total')?> +<?php endif; ?> +</div> + +</fieldset> + + diff --git a/include/template/form_ledger_fin.php b/include/template/form_ledger_fin.php new file mode 100644 index 000000000..7307041fc --- /dev/null +++ b/include/template/form_ledger_fin.php @@ -0,0 +1,40 @@ +<fieldset> +<legend><?=$f_legend ?> </legend> + <?=_('Date').' '.$f_date ?> +<?=$f_period?><br> +<?=$f_jrn?><br> +<?=_('Banque')?><?=$ibank->input(); ?><?=$ibank->search()?> <span id='e_bank_account_label'><?$f_bank_label?></span> +</fieldset> + +<fieldset> +<legend><?=$f_legend_detail?></legend> + <fieldset><legend><?=_('Extrait de compte')?></legend> + <?=_('Numéro extrait')?> <?=$f_extrait?> + <?=_('Solde début') ?> <?=$wFirst->input();?> +<?=_('Solde Fin')?> <?=$wLast->input();?> +</fieldset> +<?=$str_add_button?> + <fieldset><legend><?=_('Opérations')?></legend> +<table id="fin_item" width="100%" border="0"> +<tr> +<th colspan="2">code<?HtmlInput::infobulle(0)?></TH> + <th><?=_('Commentaire')?></TH> + <th><?=_('Montant')?></TH> + <th colspan="2"> <?=_('Op. Concernée(s)')?></th> +</tr> + +<? foreach ($array as $item) { +echo '<tr>'; +echo td($item['search'].$item['qcode']); +echo td($item['span']); +echo td($item['comment']); +echo td($item['amount']); +echo td($item['concerned']); +echo '</tr>'; +} +?> +</table> +</fieldset> +</fieldset> + + diff --git a/include/template/form_ledger_ven.php b/include/template/form_ledger_ven.php new file mode 100644 index 000000000..5a40e1bb2 --- /dev/null +++ b/include/template/form_ledger_ven.php @@ -0,0 +1,80 @@ +<?php + + echo JS_INFOBULLE; + echo JS_SEARCH_CARD; + echo JS_SHOW_TVA; + echo JS_TVA; + echo JS_AJAX_FICHE; + +?> +<fieldset> +<legend><?=$f_legend ?> +</legend> +Date : <?=$f_date ?> Echeance : <?=$f_echeance?> +<?=$f_periode?><br> +Journal <?=$f_jrn?><br><hr> +Description <?=$f_desc?> +Num Pj <?=$f_pj?><br> +Client <?=$f_client_qcode?> <?=$f_client?> +</fieldset> + +<fieldset> +<legend><?=$f_legend_detail?></legend> +<table id="sold_item" width="100%" border="0"> +<tr> +<th colspan="2">Code <?=HtmlInput::infobulle(0)?></th> +<th>Dénomination</th> +<th>prix/unité htva<?=HtmlInput::infobulle(6)?></th> +<? if ($flag_tva =='Y') : ?> +<th>tva</th> +<th>montant htva</th> +<? endif;?> +<th>quantité</th> + +</tr> +<? foreach ($array as $item) { +echo '<tr>'; +echo $item['quick_code']; +?> +<td style="border-bottom: 1px dotted grey; width: 75%;"><?=$item['denom'] ?></td> +<? +echo td($item['pu']); +if ($flag_tva=='Y') { + echo td($item['tva']); + echo td($item['amount_tva'].$item['hidden']); +} +echo td($item['quantity' ]); +echo '</tr>'; +} + +?> +</table> + +<div style="position:float;float:right;text-align:right;padding-right:5px;font-size:1.2em;font-weight:bold;color:blue"> + <?=HtmlInput::button('act','Actualiser','onClick="compute_all_sold();"'); ?> + </div> + + <div style="position:float;float:right;text-align:left;font-size:1.2em;font-weight:bold;color:blue" id="sum"> + <br><span id="htva">0.0</span> +<?php + if ( $flag_tva=='Y' ) : ?> + <br><span id="tva">0.0</span> + <br><span id="tvac">0.0</span> +<?php endif; ?> + </div> + +<div style="position:float;float:right;text-align:right;padding-right:5px;font-size:1.2em;font-weight:bold;color:blue"> +<?php + if ( $flag_tva =='Y') : + ?> + <br>Total HTVA + <br>Total TVA + <br>Total TVAC + <?php else: ?> + <br>Total +<?php endif; ?> +</div> + +</fieldset> + + diff --git a/include/template/ledger_search.php b/include/template/ledger_search.php new file mode 100644 index 000000000..7ec2c6956 --- /dev/null +++ b/include/template/ledger_search.php @@ -0,0 +1,67 @@ +<fieldset><legend><?=_('Critères de Recherche')?></legend> +<ul class="select_table"> +<li> +<span style='text-align:right;width:30em'> +<?=_('Dans le journal')?> +</span> +<span> +<?php echo $f_ledger->input() ?> +</span> +</li> + +<li> +<span style='text-align:right;width:30em'> +<?=_('Et Compris entre les date')?> +</span> +<span> +<?php echo $f_date_start->input(); ?> <?=_('et')?> <?php echo $f_date_end->input(); ?> +</span> +</li> + +<li> +<span style='text-align:right;width:30em'> +<?=_('Et contenant dans la description, pièce justificative ou n° interne')?> +</span> + +<span> +<?php echo $f_descript->input(); ?> +</span> +</li> +<li> +<span style='text-align:right;width:30em'> +<?=_('Et compris entre les montants')?> +</span> +<span > +<?php echo $f_amount_min->input(); ?> <?=_('et')?> <?php echo $f_amount_max->input(); ; ?> +</span> +</li> +<li> +<span style='text-align:right;width:30em'> + <?=_('Et utilisant la fiche (quick code)')?> +</span> +<span> + <?php echo $f_qcode->search();echo $f_txt_qcode->input(); ?> +</span> +</li> +<li> +<span style='text-align:right;width:30em'> + <?php echo _('Et utilisant le poste comptable').$info?> +</span> + +<span> +<?php echo $f_accounting->input(); ?> +</span> +</li> + +<li> +<span style='text-align:right';width:30em> + <?=_('Et uniquement non payées')?> +</span> + +<span> +<?php echo $f_paid->input(); ?> +</span> +</li> + +</ul> +</fieldset> diff --git a/include/template/param_jrn.php b/include/template/param_jrn.php index 95c0b1d8b..ea8110d65 100644 --- a/include/template/param_jrn.php +++ b/include/template/param_jrn.php @@ -1,12 +1,12 @@ <TABLE> <TR> - - <TD> Nom journal </TD> + + <TD><?=_('Nom journal')?> </TD> <TD> <INPUT TYPE="text" NAME="p_jrn_name" VALUE="<?php echo $name; ?>"></TD> </TR> <TR> -<TD> Postes utilisables journal (débit/crédit) </TD> -<TD> +<TD><?=_('Postes utilisables journal (débit/crédit)')?> </TD> +<TD> <?php echo $search;?> </TD> </TR> @@ -19,29 +19,29 @@ <tr><td><INPUT TYPE="hidden" id="p_ech_lib" NAME="p_ech_lib" VALUE="echeance"></td> </tr> <TR> -<TD> Type de journal </TD> +<TD><?=_('Type de journal')?> </TD> <TD> <?php echo $type;?> </TD> </TR> <TR> -<TD> Préfixe code interne </TD><TD> +<TD><?=_('Préfixe code interne')?> </TD><TD> <?php echo $code?> </TD> </TR> <TR> -<TD>Préfixe pièce justificative +<TD><?=_('Préfixe pièce justificative')?> </TD> <TD> <?php echo $pj_pref; ?> -<span class="notice">Le préfixe des pièces peut être différent pour chaque journal</span> +<span class="notice"><?=_('Le préfixe des pièces peut être différent pour chaque journal')?></span> </TD> </TR> <tr> -<TD>N° pièce justificative +<TD><?=_('N° pièce justificative')?> </TD> <TD> <?php echo $pj_seq; ?> -<span class="notice">La numérotation est propre à chaque journal</span> +<span class="notice"><?=_('La numérotation est propre à chaque journal')?></span> </TD> </TR> @@ -50,18 +50,18 @@ <TABLE width="100%"> <TR> -<th> Fiches Débit</TH> -<th> Fiches Crédit</TH> +<th><?=_('Fiches Débit')?></TH> +<th><?=_('Fiches Crédit')?></TH> </TR> <?php // Show the fiche in deb section -$Res=ExecSql($cn,"select fd_id,fd_label from fiche_def order by fd_label"); -$num=pg_NumRows($Res); +$Res=$cn->exec_sql("select fd_id,fd_label from fiche_def order by fd_label"); +$num=$cn->size(); for ($i=0;$i<$num;$i++) { - $res=pg_fetch_array($Res,$i); + $res=$cn->fetch($i); $CHECKED=" unchecked"; - foreach ( $rdeb as $element) { + foreach ( $rdeb as $element) { if ( $element == $res['fd_id'] ) { $CHECKED="CHECKED"; break; @@ -71,13 +71,13 @@ for ($i=0;$i<$num;$i++) { printf ('<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="FICHEDEB[]" %s>%s</TD>', $res['fd_id'],$CHECKED,$res['fd_label']); $CHECKED=" unchecked"; - foreach ( $rcred as $element) { + foreach ( $rcred as $element) { if ( $element == $res['fd_id'] ) { $CHECKED="CHECKED"; break; } } - + printf ('<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="FICHECRED[]" %s>%s</TD>', $res['fd_id'],$CHECKED,$res['fd_label']); echo '</TR>'; diff --git a/include/template/security_list_action.php b/include/template/security_list_action.php index c2f00545c..c75eaa96f 100644 --- a/include/template/security_list_action.php +++ b/include/template/security_list_action.php @@ -1,15 +1,15 @@ <?php - - function display_security_fieldset($p_legend,$p_array,$sec_User) { - $array=array(array('value'=>0,'label'=>"Pas d'accès"), - array('value'=>1,'label'=>'Accès'), + + function display_security_fieldset($p_legend,$p_array,$sec_User) { + $array=array(array('value'=>0,'label'=>_("Pas d'accès")), + array('value'=>1,'label'=>_('Accès')), ); - + $gDossier=dossier::id(); ?> <fieldset><legend><?php echo $p_legend;?></legend> <TABLE align="right"> - + <?php foreach ( $p_array as $l_line){ ?> @@ -17,90 +17,84 @@ <td align="right"> <?php echo $l_line['ac_description'];?> </td> - - <?php + + <?php $right=$sec_User->check_action($l_line['ac_id']); - - $a=new widget('select'); + + $a=new ISelect(); $a->name=sprintf('action%d',$l_line['ac_id']); $a->value=$array; $a->selected=$right; - if ( $right==1) { + if ( $right==1) { ?> <td style="border:lightgreen 2px solid; "> <?php } else { ?> <td style="border:red 2px solid; " align="right"> <?php }?> - - <?php echo $a->IOValue(); ?> + + <?php echo $a->input(); ?> </td> </tr> <?php } - - + + ?> </table> </fieldset> <?php } ?> -<table> - <tr valign="top"> - <td> - <?php $array=get_array($cn_dossier, - "select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", - array(100,199)); - display_security_fieldset('Budget',$array,$sec_User); ?> - </td> - <td> - <?php $array=get_array($cn_dossier, - "select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", - array(800,1000)); - display_security_fieldset('Fiche',$array,$sec_User); ?> - </td> - </tr><tr> - <td> - <?php $array=get_array($cn_dossier, - "select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", - array(200,299)); - display_security_fieldset('Comptabilité Analytique',$array,$sec_User); ?> - </td> - - <td> - <?php $array=get_array($cn_dossier, - "select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", - array(700,799)); - display_security_fieldset('Impression',$array,$sec_User); ?> - </td> - </tr> - <tr valign="top"> - - <td rowspan="3"> - <?php $array=get_array($cn_dossier, +<div style="float:left;width:33%"> +<div style="float:top"> + <?php $array=$cn_dossier->get_array( "select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", array(1100,1400)); - display_security_fieldset('Paramètre',$array,$sec_User); ?> - </td> - - - </tr> - <tr valign="top"> - <td> - <?php $array=get_array($cn_dossier, + display_security_fieldset(_('Paramètre'),$array,$sec_User); ?> + +</div> +</div> +<div style="float:left;width:33%"> +<div style="float:top"> + <?php $array=$cn_dossier->get_array("select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", + array(800,1000)); + display_security_fieldset(_('Fiche'),$array,$sec_User); ?> +</div> + <div style="float:top"> + <?php $array=$cn_dossier->get_array( + "select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", + array(200,299)); + display_security_fieldset(_('Comptabilité Analytique'),$array,$sec_User); ?> +</div> + +<div style="float:top"> + + <?php $array=$cn_dossier->get_array( + "select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", + array(700,799)); + display_security_fieldset(_('Impression'),$array,$sec_User); ?> +</div> +</div> +<div style="float:left;"> +<div style="float:top"> + <?php $array=$cn_dossier->get_array( + "select ac_id, ac_description from action where ac_id >=$1 and ac_id <$2 order by ac_id ", + array(1500,1600)); + display_security_fieldset(_('Stock'),$array,$sec_User); ?> +</div> +<div style="float:top"> + <?php $array=$cn_dossier->get_array( + "select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", + array(1700,1799)); + display_security_fieldset(_('Prévision'),$array,$sec_User); ?> +<div style="float:top"> + <?php $array=$cn_dossier->get_array( + "select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", + array(1600,1699)); + display_security_fieldset(_('Extension'),$array,$sec_User); ?> +</div> +<div style="float:top"> + <?php $array=$cn_dossier->get_array( "select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", array(300,400)); - display_security_fieldset('Gestion',$array,$sec_User); ?> - </td> - </tr><tr> - <td> - <?php $array=get_array($cn_dossier, - "select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", - array(1500,1600)); - display_security_fieldset('Stock',$array,$sec_User); ?> - </td> - - - - - </tr> -</table> - + display_security_fieldset(_('Gestion'),$array,$sec_User); ?> +</div> +</div> \ No newline at end of file diff --git a/include/tva.inc.php b/include/tva.inc.php index 41661d865..03bb96c40 100644 --- a/include/tva.inc.php +++ b/include/tva.inc.php @@ -22,13 +22,15 @@ * \brief included file for customizing with the vat (account,rate...) */ require_once('class_own.php'); - +require_once('class_html_input.php'); +require_once('class_ihidden.php'); +require_once('class_itextarea.php'); echo '<div class="content">'; // Confirm remove if ( isset ($_POST['confirm_rm'])) { - if ( CountSql($cn,'select * from tva_rate') > 1 ) - ExecSqlParam($cn,'select tva_delete($1)',array($_POST['tva_id'])); + if ( $cn->count_sql('select * from tva_rate') > 1 ) + $cn->exec_sql('select tva_delete($1)',array($_POST['tva_id'])); else echo '<p class="notice">Vous ne pouvez pas effacer tous taux'. ' Si votre société n\'utilise pas la TVA, changer dans le menu société</p>'; @@ -58,23 +60,21 @@ echo '<div class="content">'; { $sql="select tva_insert($1,$2,$3,$4)"; - $res=ExecSqlParam($cn, + $res=$cn->exec_sql( $sql, array($tva_label, $tva_rate, $tva_comment, $tva_poste) ); - $ret_sql=pg_fetch_row($res); - $err=$ret_sql[0]; + $err=Database::fetch_result($res); } if ( isset ($_POST['confirm_mod']) ) { - $Res=ExecSql($cn, + $Res=$cn->exec_sql( "select tva_modify($tva_id,'$tva_label', '$tva_rate','$tva_comment','$tva_poste')"); - $ret_sql=pg_fetch_row($Res); - $err=$ret_sql[0]; + $err=Database::fetch_result($Res); } } @@ -97,8 +97,8 @@ if ( $own->MY_TVA_USE=='N' ){ } //----------------------------------------------------- // Display - $sql="select tva_id,tva_label,tva_rate,tva_comment,tva_poste from tva_rate order by tva_rate"; - $Res=ExecSql($cn,$sql); + $sql="select tva_id,tva_label,tva_rate,tva_comment,tva_poste from tva_rate order by tva_label"; + $Res=$cn->exec_sql($sql); ?> <TABLE> <TR> @@ -108,7 +108,7 @@ if ( $own->MY_TVA_USE=='N' ){ <th>Poste</th> </tr> <?php - $val=pg_fetch_all($Res); + $val=Database::fetch_all($Res); echo_debug('parametre',__LINE__,$val); foreach ( $val as $row) { @@ -127,7 +127,7 @@ if ( $own->MY_TVA_USE=='N' ){ echo "<TD>"; - echo widget::hidden('tva_id',$row['tva_id']); + echo HtmlInput::hidden('tva_id',$row['tva_id']); echo h($row['tva_label']); echo "</TD>"; @@ -144,16 +144,20 @@ if ( $own->MY_TVA_USE=='N' ){ echo "</TD>"; echo "<TD>"; - echo '<input type="submit" name="rm" value="Efface">'; - echo '<input type="submit" name="mod" value="Modifie">'; - $w=new widget("hidden"); + echo HtmlInput::submit("rm" ,"Efface"); + echo HtmlInput::submit("mod","Modifie"); + $w=new IHidden(); $w->name="tva_id"; $w->value=$row['tva_id']; - echo $w->IOValue(); - $w=new widget("hidden"); + echo $w->input(); + $w=new IHidden(); $w->name="p_action"; + $w->value="divers"; + echo $w->input(); + $w=new IHidden(); + $w->name="sa"; $w->value="tva"; - echo $w->IOValue(); + echo $w->input(); echo "</TD>"; @@ -170,7 +174,8 @@ if ( ! isset ($_POST['add']) ) { ?> <form method="post"> <input type="submit" name="add" value="Ajouter un taux de tva"> - <input type="hidden" name="p_action" value="tva"> + <input type="hidden" name="p_action" value="divers"> + <input type="hidden" name="sa" value="tva"> </form> <?php } @@ -202,8 +207,8 @@ if ( ! isset ($_POST['add']) <?php echo '<FORM method="post">'; echo '<input type="hidden" name="tva_id" value="'.$index.'">'; - echo '<input type="submit" name="confirm_rm" value="Confirme">'; - echo '<input type="submit" value="Cancel" name="no">'; + echo HtmlInput::submit("confirm_rm" ,"Confirme"); + echo HtmlInput::submit("Cancel" ,"no"); echo "</form>"; } @@ -219,18 +224,18 @@ if ( ! isset ($_POST['add']) ?> <table > <tr> <td align="right"> Label (ce que vous verrez dans les journaux)</td> - <td> <?php $w=new widget("text");$w->size=20; echo $w->IOValue('tva_label','') ?></td> + <td> <?php $w=new IText();$w->size=20; echo $w->input('tva_label','') ?></td> </tr> <tr><td align="right"> Taux de tva </td> - <td> <?php $w=new widget("text");$w->size=5; echo $w->IOValue('tva_rate','') ?></td> + <td> <?php $w=new IText();$w->size=5; echo $w->input('tva_rate','') ?></td> </tr> <tr> <td align="right"> Commentaire </td> - <td> <?php $w=new widget("textarea"); $w->heigh=2;$w->width=20;echo $w->IOValue('tva_comment','') ?></td> + <td> <?php $w=new ITextarea; $w->heigh=2;$w->width=20;echo $w->input('tva_comment','') ?></td> </tr> <tr> <td align="right">Poste comptable utilisés format :debit,credit</td> - <td> <?php $w=new widget("text"); $w->size=10;echo $w->IOValue('tva_poste','') ?></td> + <td> <?php $w=new IText(); $w->size=10;echo $w->input('tva_poste','') ?></td> </Tr> </table> <input type="submit" value="Confirme" name="confirm_add"> @@ -254,21 +259,21 @@ if ( ! isset ($_POST['add']) ?> <table> <tr> <td align="right"> Label (ce que vous verrez dans les journaux)</td> - <td> <?php $w=new widget("text");$w->size=20; echo $w->IOValue('tva_label',$tva_array[$index]['tva_label']) ?></td> + <td> <?php $w=new Itext();$w->size=20; echo $w->input('tva_label',$tva_array[$index]['tva_label']) ?></td> </tr> <tr><td align="right"> Taux de tva </td> - <td> <?php $w=new widget("text");$w->size=5; echo $w->IOValue('tva_rate',$tva_array[$index]['tva_rate']) ?></td> + <td> <?php $w=new Itext();$w->size=5; echo $w->input('tva_rate',$tva_array[$index]['tva_rate']) ?></td> </tr> <tr> <td align="right"> Commentaire </td> - <td> <?php $w=new widget("textarea"); $w->heigh=2;$w->width=20; - echo $w->IOValue('tva_comment',$tva_array[$index]['tva_comment']) ?></td> + <td> <?php $w=new ITextarea(); $w->heigh=2;$w->width=20; + echo $w->input('tva_comment',$tva_array[$index]['tva_comment']) ?></td> </tr> <tr> <td align="right">Poste comptable utilisés format :debit,credit</td> - <td> <?php $w=new widget("text");$w->size=5; echo $w->IOValue('tva_poste',$tva_array[$index]['tva_poste']) ?></td> + <td> <?php $w=new IText();$w->size=5; echo $w->input('tva_poste',$tva_array[$index]['tva_poste']) ?></td> </Tr> </table> <input type="submit" value="Confirme" name="confirm_mod"> diff --git a/include/user.inc.php b/include/user.inc.php index d50761d16..818af47ed 100644 --- a/include/user.inc.php +++ b/include/user.inc.php @@ -29,23 +29,25 @@ // Add user if ( isset ($_POST["LOGIN"]) ) { - $cn=DbConnect(); + $cn=new Database(); $pass5=md5($_POST['PASS']); - $first_name=pg_escape_string($_POST['FNAME']); - $last_name=pg_escape_string($_POST['LNAME']); + $first_name=Database::escape_string($_POST['FNAME']); + $last_name=Database::escape_string($_POST['LNAME']); $login=$_POST['LOGIN']; $login=str_replace("'","",$login); $login=str_replace('"',"",$login); $login=str_replace(" ","",$login); $login=strtolower($login); - $Res=ExecSql($cn,"insert into ac_users(use_first_name,use_name,use_login,use_active,use_pass) - values ('".$first_name."','".$last_name."','".$login."',1,'$pass5')"); + $Res=$cn->exec_sql("insert into ac_users(use_first_name,use_name,use_login,use_active,use_pass) + values ($1,$2,$3,1,$4)", + array($first_name,$last_name,$login,$pass5)); } //SET login // Show all the existing user on 7 columns -$cn=GetAllUser(); +$repo=new Dossier(0); +$cn=$repo->get_user(); echo_debug('admin_repo.php',__LINE__,"Array = $cn"); $compteur=0; ?> @@ -74,14 +76,16 @@ $compteur=0; </TABLE> <TABLE> <TR> <form action="admin_repo.php?action=user_mgt" method="POST"> -<TD><H3>Ajout d'utilisateur<H3></TD></TR> -<?php //' - echo '<TR><TD> First Name </TD><TD><INPUT TYPE="TEXT" NAME="FNAME"></TD>'; - echo '<TD> Last Name </TD><TD><INPUT TYPE="TEXT" NAME="LNAME"></TD></TR>'; - echo '<TR><TD> login </TD><TD><INPUT TYPE="TEXT" NAME="LOGIN"></TD>'; - echo '<TD> password </TD><TD> <INPUT TYPE="TEXT" NAME="PASS"></TD></TR>'; - echo '<TD> <INPUT TYPE="SUBMIT" Value="Create user" NAME="ADD"></TD>'; - echo '</TABLE>'; +<TD><H3> +<?php + echo _("Ajout d'utilisateur"); +echo '<H3></TD></TR>'; +echo '<TR><TD> First Name </TD><TD><INPUT TYPE="TEXT" NAME="FNAME"></TD>'; +echo '<TD> Last Name </TD><TD><INPUT TYPE="TEXT" NAME="LNAME"></TD></TR>'; +echo '<TR><TD> login </TD><TD><INPUT TYPE="TEXT" NAME="LOGIN"></TD>'; +echo '<TD> password </TD><TD> <INPUT TYPE="TEXT" NAME="PASS"></TD></TR>'; +echo '<TD> <INPUT TYPE="SUBMIT" Value="Create user" NAME="ADD"></TD>'; +echo '</TABLE>'; ?> </FORM> diff --git a/include/user_action_gl.php b/include/user_action_gl.php index 0704d112f..90e58ac1a 100644 --- a/include/user_action_gl.php +++ b/include/user_action_gl.php @@ -1,4 +1,4 @@ -<?php +<?php /* * This file is part of PhpCompta. * @@ -20,54 +20,67 @@ /* $Revision$ */ /*! \file - * \brief included file for the great ledger + * \brief included file for the great ledger */ -include_once ("preference.php"); include_once ("user_common.php"); -include_once ("class_widget.php"); include_once("class_user.php"); +require_once("class_iselect.php"); require_once("jrn.php"); +require_once('class_acc_ledger.php'); +$cn=new Database($gDossier); +echo js_include('accounting_item.js'); +echo js_include('prototype.js'); +echo js_include('scriptaculous.js'); +echo js_include('effects.js'); +echo js_include('controls.js'); +echo js_include('dragdrop.js'); +echo js_include('acc_ledger.js'); +echo js_include('scripts.js'); +echo JS_INFOBULLE; +require_once('class_iposte.php'); +require_once('class_ipopup.php'); +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); +echo JS_CARD; +echo IPoste::ipopup('ipop_account'); -$cn=DbConnect($gDossier); +echo '<div class="content">'; -echo '<div class="u_content"> - <form method="GET">'; -echo dossier::hidden(); -echo widget::hidden('p_action','gl'); +$Ledger=new Acc_Ledger($cn,0); +if ( !isset($_REQUEST['p_jrn'])) { + $Ledger->id=-1; +} else + $Ledger->id=$_REQUEST['p_jrn']; +echo $Ledger->display_search_form(); -$w=new widget("select"); -// filter on the current year -$filter_year=" where p_exercice='".$User->get_exercice()."'"; +/* compute the sql stmt */ +list($sql,$where)=$Ledger->build_search_sql($_GET); -$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); -$current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); -$w->selected=$current; -echo 'Période '.$w->IOValue("p_periode",$periode_start).widget::submit('gl_submit','Valider'); +$max_line=$cn->count_sql($sql); -echo '</form>'; - -if ( $current == -1) { - $cond=" and jr_tech_per in (select p_id from parm_periode where p_exercice='".$User->get_exercice()."')"; - } else { - $cond=" and jr_tech_per=".$current; - } -/* security filter on the ledger */ -$sql_ledger=''; -if ( $User->Admin() == 0 && $User->is_local_admin()==0) { $sql_ledger=' and '.$User->get_ledger_sql();} -$sql=SQL_LIST_ALL_INVOICE.$cond.$sql_ledger; -// Nav. bar $step=$_SESSION['g_pagesize']; $page=(isset($_GET['offset']))?$_GET['page']:1; $offset=(isset($_GET['offset']))?$_GET['offset']:0; - -list ($max_line,$list)=ListJrn($cn,0,$sql,null,$offset); - $bar=jrn_navigation_bar($offset,$max_line,$step,$page); + +echo HtmlInput::hidden("p_action",$_REQUEST['p_action']); +if (isset($_REQUEST['sa'])) echo HtmlInput::hidden("sa",$_REQUEST['sa']); +if (isset($_REQUEST['sb'])) echo HtmlInput::hidden("sb",$_REQUEST['sb']); +if (isset($_REQUEST['sc'])) echo HtmlInput::hidden("sc",$_REQUEST['sc']); +if (isset($_REQUEST['f_id'])) echo HtmlInput::hidden("f_id",$_REQUEST['f_id']); + + +echo dossier::hidden(); echo $bar; -echo $list; +list($count,$html)= $Ledger->list_operation($sql,$offset); +echo $html; echo $bar; + ?> + </div> diff --git a/include/user_common.php b/include/user_common.php index 4c0ac9558..85e6bd153 100644 --- a/include/user_common.php +++ b/include/user_common.php @@ -18,501 +18,29 @@ */ -/*!\todo remove the function - - GetTvaRate - */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -include_once("postgres.php"); +require_once('class_database.php'); +require_once("class_icheckbox.php"); +require_once("class_ihidden.php"); require_once("class_document.php"); require_once("class_acc_operation.php"); /*! \file * \brief Common functions */ -/*! - ************************************************** - *\brief Return the rate of the p_tva_id - * - * - * \param $p_cn database connection - * \param $p_tva_id tva.tva_id - * - * \return - * an array containing the rate and the label - * the tva rate or null if a problem occured - */ -function GetTvaRate($p_cn,$p_tva_id) { - // $p_tva_id is an empty string, returns 0 - if (strlen(trim($p_tva_id))==0) return 0; - // Get vat info from the database - $Res=ExecSql($p_cn,"select tva_id,tva_rate,tva_label from tva_rate where tva_id=".$p_tva_id); - if (pg_NumRows($Res) == 0 ) return null; - $r=pg_fetch_array($Res,0); - return $r; -} /*! - *\brief show all the lines of the asked jrn, uses also the $_GET['o'] for the sort - * - * - * \param $p_cn database connection - * \param $p_jrn jrn_id jrn.jrn_def_id - * \param $p_where the sql query where clause - * \param $p_array param. for a search - * \param $p_value offset - * \param $p_paid value : 0 nothing is shown, 1 check box; 2 check_box disable - * \return array (entryCount,generatedHTML); - * - */ -function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null,$p_value=0,$p_paid=0) -{ - $user=new User($p_cn); - // print_r("function ListJrn($p_cn,$p_jrn,$p_where='',$p_array=null,$p_value=0,$p_paid=0)"); - echo_debug(__FILE__,__LINE__,"Entering into function ListJrn($p_cn,$p_jrn,$p_where='',$p_array=null,$p_value=0,$p_paid=0)"); - $gDossier=dossier::id(); - $amount_paid=0.0; - $amount_unpaid=0.0; - include_once("central_inc.php"); - $limit=($_SESSION['g_pagesize']!=-1)?" LIMIT ".$_SESSION['g_pagesize']:""; - $offset=($_SESSION['g_pagesize']!=-1)?" OFFSET ".pg_escape_string($p_value):""; - $order=" order by jr_date_order asc,jr_internal asc"; - // Sort - $url=CleanUrl(); - $str_dossier=dossier::get(); - $image_asc='<IMAGE SRC="image/down.png" border="0" >'; - $image_desc='<IMAGE SRC="image/up.png" border="0">'; - $image_sel_desc='<IMAGE SRC="image/select1.png">'; - $image_sel_asc='<IMAGE SRC="image/select2.png">'; - - $sort_date="<th> <A class=\"mtitle\" HREF=\"?$url&o=da\">$image_asc</A>Date <A class=\"mtitle\" HREF=\"?$url&o=dd\">$image_desc</A></th>"; - $sort_description="<th> <A class=\"mtitle\" HREF=\"?$url&o=ca\">$image_asc</A>Description <A class=\"mtitle\" HREF=\"?$url&o=cd\">$image_desc</A></th>"; - $sort_amount="<th> <A class=\"mtitle\" HREF=\"?$url&o=ma\">$image_asc</A>Montant <A class=\"mtitle\" HREF=\"?$url&o=md\">$image_desc</A></th>"; -$sort_echeance="<th> <A class=\"mtitle\" HREF=\"?$url&o=ea\">$image_asc</A>Echéance <A class=\"mtitle\" HREF=\"?$url&o=ed\">$image_desc</A> </th>"; - -$own=new Own($p_cn); - // if an order is asked - if ( isset ($_GET['o']) ) - { - switch ($_GET['o']) - { - case 'da': - // date asc - $sort_date="<th>$image_sel_asc Date <A class=\"mtitle\" HREF=\"?$url&o=dd\">$image_desc</A></th>"; - $order=" order by jr_date_order asc "; - break; - case 'dd': - $sort_date="<th> <A class=\"mtitle\" HREF=\"?$url&o=da\">$image_asc</A> Date $image_sel_desc</th>"; - // date desc - $order=" order by jr_date_order desc "; - break; - case 'ma': - // montant asc - $sort_amount="<th> $image_sel_asc Montant <A class=\"mtitle\" HREF=\"?$url&o=md\">$image_desc</A></th>"; - $order=" order by jr_montant asc "; - break; - case 'md': - // montant desc - $sort_amount="<th> <A class=\"mtitle\" HREF=\"?$url&o=ma\">$image_asc</A>Montant $image_sel_desc</th>"; - $order=" order by jr_montant desc "; - break; - case 'ca': - // jr_comment asc - $sort_description="<th> $image_sel_asc Description <A class=\"mtitle\" HREF=\"?$url&o=cd\">$image_desc</A></th>"; - $order=" order by jr_comment asc "; - break; - case 'cd': - // jr_comment desc - $sort_description="<th> <A class=\"mtitle\" HREF=\"?$url&o=ca\">$image_asc</A>Description $image_sel_desc</th>"; - $order=" order by jr_comment desc "; - break; - case 'ea': - // jr_comment asc - $sort_echeance="<th> $image_sel_asc Echeance <A class=\"mtitle\" HREF=\"?$url&o=ed\">$image_desc</A></th>"; - $order=" order by jr_ech asc "; - break; - case 'ed': - // jr_comment desc - $sort_echeance="<th> <A class=\"mtitle\" HREF=\"?$url&o=ea\">$image_asc</A> Echeance $image_sel_desc</th>"; - $order=" order by jr_ech desc "; - break; - - } - } - // set a filter for the FIN - $a_parm_code=get_array($p_cn,"select p_value from parm_code where p_code in ('BANQUE','COMPTE_COURANT','CAISSE')"); - $sql_fin="("; - $or=""; - foreach ($a_parm_code as $code) { - $sql_fin.="$or j_poste::text like '".$code['p_value']."%'"; - $or=" or "; - } - $sql_fin.=")"; - - if ( $p_array == null ) { - $sql="select jr_id , - jr_montant, - case when jr_pj_number is not null and jr_pj_number !='' - then '('||jr_pj_number||')' - else '' end ||' '||substr(jr_comment,1,60) as jr_comment, - to_char(jr_ech,'DD.MM.YYYY') as jr_ech, - to_char(jr_date,'DD.MM.YYYY') as jr_date, - jr_date as jr_date_order, - jr_grpt_id, - jr_rapt, - jr_internal, - jrn_def_id, - jrn_def_name, - jrn_def_ech, - jrn_def_type, - jr_valid, - jr_tech_per, - jr_pj_name, - p_closed - from - jrn - join jrn_def on jrn_def_id=jr_def_id - join parm_periode on p_id=jr_tech_per - $p_where - $order"; - } - if ( $p_array != null ) { - // Construction Query - foreach ( $p_array as $key=>$element) { - ${"l_$key"}=$element; - } - $sql="select jr_id , - jr_montant, - case when jr_pj_number is not null and jr_pj_number !='' - then '('||jr_pj_number||')' - else '' end ||' '||substr(jr_comment,1,60) as jr_comment, - jr_ech, - to_char(jr_date,'DD.MM.YYYY') as jr_date, - jr_date as jr_date_order, - jr_grpt_id, - jr_rapt, - jr_internal, - jrn_def_id, - jrn_def_name, - jrn_def_ech, - jrn_def_type, - jr_valid, - jr_tech_per, - jr_pj_name, - p_closed - from - jrn join jrn_def on jrn_def_id=jr_def_id - join parm_periode on p_id=jr_tech_per - "; - $jrn_sql=($p_jrn =0)?"1=1":"jrn_def_id=$p_jrn "; - $l_and=" where "; - // amount - // remove space - $l_s_montant=trim($l_s_montant); - // replace comma by dot - $l_s_montant=str_replace(',','.',$l_s_montant); - $l_st_montant=trim($l_st_montant); - // replace comma by dot - $l_st_montant=str_replace(',','.',$l_st_montant); - $done_comp=0; - echo_debug('user_common',__LINE__,"l_s_montant $l_s_montant"); - /* -------------------------------------------------------------------------- */ - /* if both amount are the same then we need to search into the detail - */ - /* -------------------------------------------------------------------------- */ - if ( ( ereg("^[0-9]+$", $l_s_montant) || ereg ("^[0-9]+\.[0-9]+$", $l_s_montant)) && - ( ereg("^[0-9]+$", $l_st_montant) || ereg ("^[0-9]+\.[0-9]+$", $l_st_montant) ) - ) - { - if ( bccomp($l_s_montant,$l_st_montant,2) == 0 ) { - $sql .= $l_and. 'jr_grpt_id in ( select distinct j_grpt from jrnx where j_montant = '.$l_s_montant.')'; - $l_and=" and "; - $done_comp=1; - - } - - } - /*------------------------------------------------------------------------------* - * If amount are different the range is about the total of the operation - *------------------------------------------------------------------------------*/ - if ( $done_comp==0 && (ereg("^[0-9]+$", $l_s_montant) || ereg ("^[0-9]+\.[0-9]+$", $l_s_montant) )) - { - $sql.=$l_and." jr_montant >= $l_s_montant"; - $l_and=" and "; - } - if ( $done_comp==0 && (ereg("^[0-9]+$", $l_st_montant) || ereg ("^[0-9]+\.[0-9]+$", $l_st_montant) )) - { - $sql.=$l_and." jr_montant <= $l_st_montant"; - $l_and=" and "; - } - - // date - if ( isDate($l_date_start) != null ) - { - $sql.=$l_and." jr_date >= to_date('".$l_date_start."','DD.MM.YYYY')"; - $l_and=" and "; - } - if ( isDate($l_date_end) != null ) { - $sql.=$l_and." jr_date <= to_date('".$l_date_end."','DD.MM.YYYY')"; - $l_and=" and "; - } - // comment - $l_s_comment=FormatString($l_s_comment); - if ( $l_s_comment != null ) - { - $sql.=$l_and." ( upper(jr_comment) like upper('%".$l_s_comment."%') or upper(jr_pj_number) like upper('%".$l_s_comment."%') )"; - $l_and=" and "; - } - // internal - $l_s_internal=FormatString($l_s_internal); - if ( $l_s_internal != null ) { - $sql.=$l_and." jr_internal like upper('%$l_s_internal%') "; - $l_and=" and "; - } - // Poste - $l_poste=FormatString($l_poste); - if ( $l_poste != null ) { - $sql.=$l_and." jr_grpt_id in (select j_grpt - from jrnx where j_poste::text like '$l_poste' ) "; - $l_and=" and "; - } - // Quick Code - if ( $l_qcode != null ) - { - $l_qcode=FormatString($l_qcode); - $sql.=$l_and." jr_grpt_id in ( select j_grpt from - jrnx where trim(j_qcode) = upper(trim('$l_qcode')))"; - $l_and=" and "; - } - // if not admin check filter - $User=new User(DbConnect()); - $User->Check(); - $User->check_dossier(dossier::id()); - - if ( $User->admin == 0 && $User->is_local_admin()==0 ) - { - $sql.=$l_and." jr_def_id in ( select uj_jrn_id ". - " from user_sec_jrn where ". - " uj_login='".$_SESSION['g_user']."'". - " and uj_priv in ('R','W'))"; - } - $sql.=$order; - }// p_array != null - // Count - $count=CountSql($p_cn,$sql); - // Add the limit - $sql.=$limit.$offset; - - // Execute SQL stmt - $Res=ExecSql($p_cn,$sql); - - //starting from here we can refactor, so that instead of returning the generated HTML, - //this function returns a tree structure. - - $r=""; - - $r.=JS_VIEW_JRN_CANCEL; - $r.=JS_VIEW_JRN_MODIFY; - - $Max=pg_NumRows($Res); - - if ($Max==0) return array(0,"Aucun enregistrement trouvé"); - - $r.='<table style="width:100%;border:solid blue 2px ;border-style:outset;">'; - $l_sessid=$_REQUEST['PHPSESSID']; - - $r.="<tr class=\"even\">"; - $r.="<th> Internal</th>"; - $r.=$sort_date; - $r.=$sort_echeance; - $r.=$sort_description; - $r.=$sort_amount; - // if $p_paid is not equal to 0 then we have a paid column - if ( $p_paid != 0 ) - { - $r.="<th> Payé</th>"; - } - $r.="<th>Op. Concernée</th>"; - $r.="<th>Document</th>"; - $r.="</tr>"; - // Total Amount - $tot=0.0; - $gDossier=dossier::id(); - for ($i=0; $i < $Max;$i++) { - - - $row=pg_fetch_array($Res,$i); - - if ( $i % 2 == 0 ) $tr='<TR class="odd">'; - else $tr='<TR class="even">'; - $r.=$tr; - //internal code - // button modify - $r.="<TD>"; - // If url contains - // - - $href=basename($_SERVER['PHP_SELF']); - echo_debug(__FILE__,__LINE__,"href = $href"); - switch ($href) - { - // user_jrn.php - case 'compta.php': - $vue="E"; //Expert View - break; - case 'commercial.php': - $vue="S"; //Simple View - break; - case 'recherche.php': - $vue=(isset($_GET['expert']))?'E':'S'; - break; - default: - echo_error('user_form_ach.php',__LINE__,'Erreur invalid request uri'); - exit (-1); - } - //DEBUG - // $r.=$l_sessid; - $r.=sprintf('<A class="detail" HREF="javascript:modifyOperation(\'%s\',\'%s\',\'%s\',\'%s\',\'%s\')" >%s</A>', - $row['jr_id'], $l_sessid,$gDossier, $p_jrn,$vue, $row['jr_internal']); - $r.="</TD>"; - // date - $r.="<TD>"; - $r.=$row['jr_date']; - $r.="</TD>"; - // echeance - $r.="<TD>"; - $r.=$row['jr_ech']; - $r.="</TD>"; - - // comment - $r.="<TD>"; - $tmp_jr_comment=h($row['jr_comment']); - $r.=$tmp_jr_comment; - $r.="</TD>"; - - // Amount - // If the ledger is financial : - // the credit must be negative and written in red - $positive=0; - - // Check ledger type : - if ( $row['jrn_def_type'] == 'FIN' ) - { - $positive = CountSql($p_cn,"select * from jrn inner join jrnx on jr_grpt_id=j_grpt ". - " where jr_id=".$row['jr_id']." and $sql_fin ". - " and j_debit='f'"); - } - $r.="<TD align=\"right\">"; - - $tot=($positive != 0)?$tot-$row['jr_montant']:$tot+$row['jr_montant']; - //STAN $positive always == 0 - $r.=( $positive != 0 )?"<font color=\"red\"> - ".sprintf("%8.2f",$row['jr_montant'])."</font>":sprintf("%8.2f",$row['jr_montant']); - $r.="</TD>"; - - - // Show the paid column if p_paid is not null - if ( $p_paid !=0 ) - { - $w=new widget("checkbox"); - $w->name="rd_paid".$row['jr_id']; - $w->selected=($row['jr_rapt']=='paid')?true:false; - // if p_paid == 2 then readonly - $w->readonly=( $p_paid == 2)?true:false; - $h=new widget("hidden"); - $h->name="set_jr_id".$row['jr_id']; - $r.='<TD>'.$w->IOValue().$h->IOValue().'</TD>'; - if ( $row['jr_rapt']=='paid') - $amount_paid+=$row['jr_montant']; - else - $amount_unpaid+=$row['jr_montant']; - } - - // Rapprochement - $rec=new Acc_Reconciliation($p_cn); - $rec->set_jr_id($row['jr_id']); - $a=$rec->get(); - $r.="<TD>"; - if ( $a != null ) { - - foreach ($a as $key => $element) - { - $operation=new Acc_Operation($p_cn); - $operation->jr_id=$element; - $l_amount=getDbValue($p_cn,"select jr_montant from jrn ". - " where jr_id=$element"); - $r.= "<A class=\"detail\" HREF=\"javascript:modifyOperation('".$element."','".$l_sessid."',".$gDossier.")\" > ".$operation->get_internal()." [ $l_amount € ]</A>"; - }//for - }// if ( $a != null ) { - $r.="</TD>"; - - if ( $row['jr_valid'] == 'f' ) { - $r.="<TD> Opération annulée</TD>"; - } else if ( $own->MY_STRICT=='N' ) { - // all operations can be removed either by setting to 0 the amount - // or by writing the opposite operation if the period is closed - $r.="<TD>"; - // cancel operation - if ( $user->check_action(GEOP)==1) - $r.=sprintf('<input TYPE="BUTTON" VALUE="%s" onClick="cancelOperation(\'%s\',\'%s\',%d,\'%s\')">', - "Annuler",$row['jr_grpt_id'],$l_sessid,$gDossier,$p_jrn); - $r.="</TD>"; - } // else - //document - if ( $row['jr_pj_name'] != "") - { - $image='<IMG SRC="image/insert_table.gif" title="'.$row['jr_pj_name'].'" border="0">'; - $r.="<TD>".sprintf('<A class="detail" HREF="show_pj.php?jrn=%s&jr_grpt_id=%s&%s&PHPSESSID=%s">%s</A>', - $p_jrn, - $row['jr_grpt_id'], - $str_dossier, - $_REQUEST['PHPSESSID'], - $image) - ."</TD>"; - } - else - $r.="<TD></TD>"; - - // end row - $r.="</tr>"; - - } - $amount_paid=round($amount_paid,4); - $amount_unpaid=round($amount_unpaid,4); - $tot=round($tot,4); - $r.="<TR>"; - $r.='<TD COLSPAN="4">Total</TD>'; - $r.='<TD ALIGN="RIGHT">'.$tot."</TD>"; - $r.="</tr>"; - if ( $p_paid != 0 ) { - $r.="<TR>"; - $r.='<TD COLSPAN="4">Payé</TD>'; - $r.='<TD ALIGN="RIGHT">'.$amount_paid."</TD>"; - $r.="</tr>"; - $r.="<TR>"; - $r.='<TD COLSPAN="4">Non payé</TD>'; - $r.='<TD ALIGN="RIGHT">'.$amount_unpaid."</TD>"; - $r.="</tr>"; - } - $r.="</table>"; - - return array ($count,$r); -} - - - -/*! InsertStockGoods($p_cn,$j_id,$a_good[$i],$a_quant[$i],'c'); - ************************************************** *\brief Insert data into stock_goods, * - * \param $p_cn database connection - * + * \param $p_cn Database object * \param $p_j_id the j_id * \param $p_good the goods * \param $p_quant quantity @@ -523,22 +51,22 @@ $own=new Own($p_cn); */ function InsertStockGoods($p_cn,$p_j_id,$p_good,$p_quant,$p_type) { - echo_debug('user_common.php',__LINE__,"function InsertStockGoods($p_cn,$p_j_id,$p_good,$p_quant,$p_type)"); + // Retrieve the good account for stock $code=new fiche($p_cn); $code->get_by_qcode($p_good); $code_marchandise=$code->strAttribut(ATTR_DEF_STOCK); $p_good=FormatString($p_good); $sql="select f_id from vw_poste_qcode where j_qcode=upper('$p_good')"; - $Res=ExecSql($p_cn,$sql); - $r=pg_fetch_array($Res,0); + $Res=$p_cn->exec_sql($sql); + $r=Database::fetch_array($Res,0); $f_id=$r['f_id']; $user=new User($p_cn); $exercice=$user->get_exercice(); - if ( $exercice == 0 ) throw Exception ('Annee invalide erreur'); + if ( $exercice == 0 ) throw new Exception ('Annee invalide erreur'); - $Res=ExecSql($p_cn,"insert into stock_goods ( + $Res=$p_cn->exec_sql("insert into stock_goods ( j_id, f_id, sg_code, @@ -564,11 +92,11 @@ function InsertStockGoods($p_cn,$p_j_id,$p_good,$p_quant,$p_type) * - 0 is not valid */ function isValid ($p_cn,$p_grpt_id) { - $Res=ExecSql($p_cn,"select jr_valid from jrn where jr_grpt_id=$p_grpt_id"); + $Res=$p_cn->exec_sql("select jr_valid from jrn where jr_grpt_id=$p_grpt_id"); - if ( ( $M = pg_NumRows($Res)) == 0 ) return 0; + if ( ( $M = Database::num_row($Res)) == 0 ) return 0; - $a=pg_fetch_array($Res,0); + $a=Database::fetch_array($Res,0); if ( $a['jr_valid'] == 't') return 1; if ( $a['jr_valid'] == 'f') return 0; @@ -706,7 +234,18 @@ function CleanUrl() }// if return $url; } -function get_redirect($p_string) { - echo '<HTML><head><META HTTP-EQUIV="REFRESH" content="0;url='.$p_string.'"></head><body> Connecting... </body></html>'; +function redirect($p_string,$p_time=0) { + echo '<HTML><head><META HTTP-EQUIV="REFRESH" content="'.$p_time.';url='.$p_string.'"></head><body> Connecting... </body></html>'; +} +/*!\brief remove the useless space, change comma by period and try to return + * a number + *\param $p_num number to format + *\return the formatted number + */ +function toNumber($p_num) { + $p_num=trim($p_num); + if ($p_num=='') return 0; + $p_num=str_replace(',','.',$p_num); + return $p_num; } ?> diff --git a/include/user_menu.php b/include/user_menu.php index 5974a7c8e..cb41705e1 100644 --- a/include/user_menu.php +++ b/include/user_menu.php @@ -1,4 +1,4 @@ -<?php +<?php /* * This file is part of PhpCompta. @@ -25,21 +25,23 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ -require_once ('class_widget.php'); +require_once("class_idate.php"); +require_once("class_icard.php"); +require_once("class_ispan.php"); /*! * \brief Show all the available folder for the users * at the login page - * \param $p_user user + * \param $p_user user * \param $p_admin 1 if admin - * + * * \return table in HTML - * - */ + * + */ function u_ShowDossier($p_user,$p_admin,$p_filtre="") { - $p_array=GetAvailableFolder($p_user,$p_admin,$p_filtre); + $p_array=GetAvailableFolder($p_user,$p_admin,$p_filtre); $result=""; if ( $p_array == 0 ) return $result." * Aucun dossier *"; @@ -48,10 +50,10 @@ function u_ShowDossier($p_user,$p_admin,$p_filtre="") $id=$p_array[$i]['dos_id']; $name= $p_array[$i]['dos_name']; $desc=$p_array[$i]['dos_description']; - if ( $i%2 == 0) + if ( $i%2 == 0) $tr="odd"; else $tr="even"; - + $result.="<TR class=\"$tr\">"; @@ -73,15 +75,15 @@ function u_ShowDossier($p_user,$p_admin,$p_filtre="") /*! * \brief Get all the available folders * for the users, checked with the security - * + * * \param $p_user user login * \param $p_admin 1 if admin - * \return array containing + * \return array containing * - ac_dossier.dos_id * - ac_dossier.dos_name * - ac_dossier.dos_description * - */ + */ function GetAvailableFolder($p_user,$p_admin,$p_filter="") { @@ -89,32 +91,32 @@ function GetAvailableFolder($p_user,$p_admin,$p_filter="") if ($p_admin==0) { // show only available folders // if user is not an admin - $sql="select distinct dos_id,dos_name,dos_description from ac_users - natural join jnt_use_dos - natural join ac_dossier + $sql="select distinct dos_id,dos_name,dos_description from ac_users + natural join jnt_use_dos + natural join ac_dossier join priv_user on ( priv_jnt=jnt_id) - where use_active=1 - and use_login='$p_user' + where use_active=1 + and use_login='$p_user' and priv_priv != 'X' and dos_name ilike '%$p_filter%' order by dos_name"; } else { - $sql="select distinct dos_id,dos_name,dos_description from ac_dossier + $sql="select distinct dos_id,dos_name,dos_description from ac_dossier where dos_name ilike '%$p_filter%' order by dos_name"; } - include_once("postgres.php"); - $cn=DbConnect(); + require_once('class_database.php'); + $cn=new Database(); - $Res=ExecSql($cn,$sql); - $max=pg_numRows($Res); + $Res=$cn->exec_sql($sql); + $max=Database::num_row($Res); if ( $max == 0 ) return 0; for ($i=0;$i<$max;$i++) { - $array[]=pg_fetch_array($Res,$i); + $array[]=Database::fetch_array($Res,$i); } return $array; } -/*! +/*! * \brief show the top menu for the user profile * and highight the selected one * \param p_high what to hightlight, by default it is autodetected @@ -125,21 +127,17 @@ function GetAvailableFolder($p_user,$p_admin,$p_filter="") */ function ShowMenuCompta($p_high="") { - include_once("postgres.php"); + require_once('class_database.php'); // find our current menu $default=basename($_SERVER['PHP_SELF']); + switch ($default) { case "user_jrn.php": $default.="?show&".dossier::get(); break; - case "recherche.php": - $default.="?".dossier::get(); - break; - case "fiche.php": - $default.="?".dossier::get(); - break; } + if ( $p_high !== "" ) $default=$p_high; if ( isset($_REQUEST['p_action'])) @@ -167,7 +165,7 @@ function ShowMenuCompta($p_high="") case 'fournisseur': $default=2; break; - case 'bank': + case 'fin': $default=3; break; @@ -177,15 +175,15 @@ function ShowMenuCompta($p_high="") $str_dossier=dossier::get(); $p_array=array( - array("compta.php?p_action=gl&".$str_dossier ,"Grand Livre","Grand livre : toutes les opérations",0), - array("compta.php?p_action=ven&".$str_dossier ,"Vente","Journal de vente / produit",1), - array("compta.php?p_action=ach&".$str_dossier,"Dépense","Journaux de dépense, d'achat",2 ), - array("compta.php?p_action=bank&".$str_dossier,"Financier","Journaux financiers: les banques, la caisse",3), - array('compta.php?p_action=quick_writing&'.$str_dossier,'Ecriture directe','Ecriture directe dans les journaux',4), - - array("compta.php?p_action=impress&".$str_dossier,"Impression","Impression",5), - array("compta.php?p_action=fiche&".$str_dossier,"Fiche","Ajouter, modifier ou effacer des fiches",6), - array("user_advanced.php?".$str_dossier,"Avancé","Opérations délicates",7), + array("compta.php?p_action=gl&".$str_dossier ,_("Grand Livre"),_("Grand livre : toutes les opérations"),0), + array("compta.php?p_action=ven&".$str_dossier ,_("Vente"),_("Journal de vente / produit"),1), + array("compta.php?p_action=ach&".$str_dossier,_("Dépense"),_("Journaux de dépense, d'achat"),2 ), + array("compta.php?p_action=fin&".$str_dossier,_("Financier"),_("Journaux financiers: les banques, la caisse"),3), + array('compta.php?p_action=quick_writing&'.$str_dossier,_('Ecriture directe'),_('Ecriture directe dans les journaux'),4), + + array("compta.php?p_action=impress&".$str_dossier,_("Impression"),_("Impression"),5), + array("compta.php?p_action=fiche&".$str_dossier,_("Fiche"),_("Ajouter, modifier ou effacer des fiches"),6), + array("user_advanced.php?".$str_dossier,_("Avancé"),_("Opérations délicates"),7), ); $result=ShowItem($p_array,'H',"mtitle","mtitle",$default,' width="100%"'); @@ -195,177 +193,16 @@ function ShowMenuCompta($p_high="") $r.='<div style="float:left;background-color:#879ED4;width:100%;">'; $r.=$result; $r.='</div>'; - // $r.='</div>'; - - return $r; - - - - -} -/*! - * \brief Open the first legder automaticaly - * \param $p_dossier dossier::id - * \param $p_type type of the ledger (VEN,ACH,FIN,ODS) - * - * - * - * \return the first jrn_def_id - */ - -function GetFirstJrnIdForJrnType($p_dossier,$p_type) -{ - include_once("postgres.php"); - - //get db connection - $Cn=DbConnect($p_dossier); - //execute query - $Ret=ExecSql($Cn,"select min(jrn_def_id) from jrn_def ". - "where jrn_def_type='".$p_type."';"); - $l_line=pg_fetch_array($Ret,0); - return $l_line[0]; - //return 0; -} - - - - - -/*! - * \brief Returns the form for the search (module accountancy) - * - * \param : - * \param $p_cn database connection - * \param $p_jrn jrn id - * \param $p_array=null previous search - * - * - * \return HTML Code - * - * - */ - -function u_ShowMenuRecherche($p_cn,$p_jrn,$p_sessid,$p_array=null) -{ - echo_debug('user_menu.php',__LINE__,"u_ShowMenuRecherche($p_cn,$p_array)"); - if ( $p_array != null ) { - foreach ( $p_array as $key=> $element) { - ${"p_$key"}=$element; - echo_debug('user_menu.php',__LINE__,"p_$key =$element;"); - } - } - - // Find the journal property - /* - $opt='<OPTION VALUE="="> ='; - $opt.='<OPTION VALUE="<="> <='; - $opt.='<OPTION VALUE="<"> <'; - $opt.='<OPTION VALUE=">"> >'; - $opt.='<OPTION VALUE=">="> >='; - */ - if ( ! isset ($p_date_start)) $p_date_start=""; - if ( ! isset ($p_date_end)) $p_date_end=""; - if ( ! isset ($p_mont_sel))$p_mont_sel=""; - if ( ! isset ($p_s_comment))$p_s_comment=""; - if ( ! isset ($p_s_montant)) $p_s_montant=""; - if ( ! isset ($p_st_montant)) $p_st_montant=""; - if ( ! isset ($p_s_internal)) $p_s_internal=""; - if ( ! isset ($p_poste)) $p_poste=""; - if ( ! isset ($p_qcode)) $p_qcode=""; - - - // if ( $p_mont_sel != "" ) $opt.='<OPTION value="'.$p_mont_sel.'" SELECTED> '.$p_mont_sel; - $r=""; - - // $r.= '<div style="border-style:outset;border-width:1pt;">'; - - $r.=JS_SEARCH_POSTE; - $r.=JS_SEARCH_CARD; - $r.= '<h2><IMG SRC="image/search.png" width="48" border="0" > Recherche</h2>'; - $r.= '<FORM ACTION="recherche.php" METHOD="GET">'; - $r.=dossier::hidden(); - $r.="<table><tr><TD>"; - $r.= '<TABLE>'; - $r.= "<TR>"; - $r.= '<TD COLSPAN="3"> Date comprise entre</TD> '; - $r.= "</TR> <TR>"; - $date_start=new widget('js_date'); - $date_start->name="date_start"; - $date_start->value=$p_date_start; - $date_start->table=0; - - $date_end=new widget('js_date'); - $date_end->name="date_end"; - $date_end->value=$p_date_end; - $date_end->table=0; - - // $r.= '<TD> <INPUT TYPE="TEXT" NAME="date_start" SIZE="10" VALUE="'.$p_date_start.'"></TD>'; - //$r.= '<TD>et <INPUT TYPE="TEXT" NAME="date_end" size="10" - //Value="'.$p_date_end.'"></TD>'; - $r.='<td>'.$date_start->IOValue(); - $r.=" et "; - $r.=$date_end->IOValue().'</td>'; - $r.= '</TD><TD>'; - $r.= "</TR> <TR>"; - $r.= "<TD> Montant compris entre "; - // $r.= ' <SELECT NAME="mont_sel">'.$opt.' </SELECT></TD><TD>'; - $r.= ' <INPUT TYPE="TEXT" style="border:groove 1px blue;" NAME="s_montant" SIZE="10" VALUE="'.$p_s_montant.'">'; - $r.= ' et <INPUT TYPE="TEXT" style="border:groove 1px blue;" NAME="st_montant" SIZE="10" VALUE="'.$p_st_montant.'"></TD>'; - - $r.= '</TR><TR valigne="top">'; - $r.='<TD > Internal code '; - $r.='<input type="text" style="border:groove 1px blue;"name="s_internal" value="'.$p_s_internal.'"></td>'; - $r.='</TR><TR><TD colspan="2"><i>vous pouvez spécifier uniquement <br>une partie (VEN, numéro d\'opération...)</i></td>'; - - - $r.="</TD></TR></TABLE></td><TD><table>"; - - $r.= "</TR>"; - $r.= "<TR>"; - $W=new widget("js_search_poste"); - $W->label="Numéro de poste<br> <i>Vous pouvez utilisez le %</i>"; - $W->name="poste"; - $W->value=$p_poste; - $r.="<TR>".$W->IOValue(); - $r.= "</TR>"; - $r.= "<TR>"; - - $A=new widget('js_search_only'); - $A->name='qcode'; - $A->value=$p_qcode; - $A->extra=""; - $A->table=1; - $A->label="Quick Code"; - $A->extra='all'; - $A->extra2='Recherche'; - - $sp= new widget("span"); - $sp->table=0; - $r.=$A->IOValue().'</TD>'.$sp->IOValue("qcode_label"); - $r.= "</TR>"; - echo_debug('user_menu.php',__LINE__,"<TD>".$A->IOValue().'</TD><TD>'.$sp->IOValue("p_qcode_label")."</TD>"); - - $r.= '<TD colspan="3"> Le commentaire contient( ou numéro de pièce) </TD>'; - $r.= "</TR><TR>"; - $r.= '<TD COLSPAN="3"> <INPUT TYPE="TEXT" style="border:groove 1px blue;" NAME="s_comment" VALUE="'.$p_s_comment.'"></TD>'; - $r.= "</TR><TR>"; - $r.= '<TD COLSPAN="3"><INPUT TYPE="SUBMIT" VALUE="Recherche" NAME="viewsearch"></TD>'; - $r.= "</TR>"; - $r.= "</TABLE>"; - $r.="</TR></TABLE>"; - if ( isset($p_expert)) - $r.='<input type="hidden" name="expert" value="on">'; - $r.= "</FORM>"; - return $r; - } -/*! + + +/*! ************************************************** * \brief build the menu of user_advanced.php - * - * \param $default + * + * \param $default * * \return the menu */ @@ -375,66 +212,44 @@ function ShowMenuAdvanced($default="") { $left_menu=ShowItem(array( //('rapprt.php','Rapprochement'), - array('user_advanced.php?'.$str_dossier.'&p_action=preod','Ecritures definies',"",9), - array('user_advanced.php?p_action=periode&'.$str_dossier,'Periode',"Gestion des periodes",2), - array('user_advanced.php?p_action=central&'.$str_dossier,'Centralise',"Centralisation",3), + array('user_advanced.php?'.$str_dossier.'&p_action=preod',_('Ecritures definies'),"",9), + array('user_advanced.php?p_action=periode&'.$str_dossier,_('Periode'),_("Gestion des periodes"),2), + array('user_advanced.php?p_action=central&'.$str_dossier,_('Centralise'),_("Centralisation"),3), - array('compta.php?p_action=stock&'.$str_dossier,'Stock',"Gestion des stocks",5), - array('user_advanced.php?p_action=defreport&'.$str_dossier,'Rapport',"Rapport",6), - array('import.php?'.$str_dossier,'Import Banque',"Banque",7), - array('user_advanced.php?p_action=ouv&'.$str_dossier,'Ecriture ouverture',"",8), - array('user_advanced.php?p_action=verif&'.$str_dossier,'Vérification',"",10) + array('compta.php?p_action=stock&'.$str_dossier,'Stock',_("Gestion des stocks"),5), + array('user_advanced.php?p_action=defreport&'.$str_dossier,_('Rapport'),_("Rapport"),6), + array('import.php?'.$str_dossier,_('Import Banque'),_("Banque"),7), + array('user_advanced.php?p_action=ouv&'.$str_dossier,_('Ecriture ouverture'),"",8), + array('user_advanced.php?p_action=verif&'.$str_dossier,_('Vérification'),"",10) ), 'H',"mtitle","mtitle",$default); $r='<div class="u_subtmenu">'.$left_menu."</div>"; return $r; } -/*! - ************************************************** - * \brief Return a string containing the menu - * main menu when you click on Journaux - * \param $p_menu the current menu (selected) - * - * \return HTML Code - */ -function ShowJrn($p_menu="") -{ - - $p_array=array( - array("user_jrn.php?jrn_type=NONE" ,"Grand Livre"), - array("user_jrn.php?jrn_type=VEN" ,"Entrée"), - array("user_jrn.php?jrn_type=ACH","Dépense"), - array("user_jrn.php?jrn_type=FIN","Financier"), - array("user_jrn.php?jrn_type=ODS","Op. Diverses") - ); - $result=ShowItem($p_array,'H',"cell","mtitle",$p_menu); - return $result; -} - -/*! +/*! * \brief Show the menu for the card management - * + * * \param $p_dossier dossier 1 - * - * - * + * + * + * * \return nothing */ function ShowMenuFiche($p_dossier) { - $cn=DbConnect($p_dossier); + $cn=new Database($p_dossier); $str_dossier=dossier::get(); echo '<div class="lmenu">'; echo '<TABLE>'; echo '<TR><TD colspan="1" class="mtitle"> - <A class="mtitle" HREF="?p_action=fiche&action=add_modele&fiche=modele&'.$str_dossier.'">Creation</A></TD> - <TD><A class="mtitle" HREF="?p_action=fiche&'.$str_dossier.'">Recherche</A></TD> + <A class="mtitle" HREF="?p_action=fiche&action=add_modele&fiche=modele&'.$str_dossier.'">'._('Création').'</A></TD> + <TD><A class="mtitle" HREF="?p_action=fiche&'.$str_dossier.'">'._('Recherche').'</A></TD> </TR>'; - $Res=ExecSql($cn,"select fd_id,fd_label from fiche_def order by fd_label"); - $Max=pg_NumRows($Res); + $Res=$cn->exec_sql("select fd_id,fd_label from fiche_def order by fd_label"); + $Max=Database::num_row($Res); for ( $i=0; $i < $Max;$i++) { - $l_line=pg_fetch_array($Res,$i); + $l_line=Database::fetch_array($Res,$i); printf('<TR><TD class="cell"> <A class="mtitle" HREF="?p_action=fiche&action=modifier&fiche=%d&%s">%s</A></TD> <TD class="mshort"> @@ -453,7 +268,7 @@ function ShowMenuFiche($p_dossier) echo '</div>'; } /*! MenuAdmin */ -/* \brief show the menu for user/database management +/* \brief show the menu for user/database management /* /* \return HTML code with the menu */ @@ -479,90 +294,71 @@ function MenuAdmin() break; } } - $item=array (array("admin_repo.php?action=user_mgt","Utilisateurs",'Gestion des utilisateurs',0), - array("admin_repo.php?action=dossier_mgt","Dossiers",'Gestion des dossiers',1), - array("admin_repo.php?action=modele_mgt","Modèles",'Gestion des modèles',2), - array("admin_repo.php?action=restore","Restaure","Restaure une base de données",3), - array("login.php","Accueil"), - array("logout.php","Logout") + $item=array (array("admin_repo.php?action=user_mgt",_("Utilisateurs"),_('Gestion des utilisateurs'),0), + array("admin_repo.php?action=dossier_mgt",_("Dossiers"),_('Gestion des dossiers'),1), + array("admin_repo.php?action=modele_mgt",_("Modèles"),_('Gestion des modèles'),2), + array("admin_repo.php?action=restore",_("Restaure"),_("Restaure une base de données"),3), + array("login.php",_("Accueil")), + array("logout.php",_("Sortie")) ); $menu=ShowItem($item,'H',"mtitle","mtitle",$def,' width="100%" '); return $menu; } -/*! - * \brief : Display Document's menu - * - * \param none - * \return string - * - * - */ -function ShowMenuDocument() -{ - $base="parametre.php?p_action=document&sa="; - $sub_menu=ShowItem( - array(array($base."add_document","Ajout")) - ,'V',"cell","mtitle"); - return $sub_menu; - -} -/*! +/*! * \brief Show the parameter menu - * - * \param $p_action the last action choosed - * - * + * + * \param $p_action the last action choosed + * + * * * \return HTML Code - * * - */ + * + */ function ShowMenuParam($p_action="") { // The phpsessid is set manually to avoid problem when the server is // misconfigured and the cookies are not sent (or accepted) $s=dossier::get().'&PHPSESSID='.$_REQUEST['PHPSESSID']; $sub_menu=ShowItem(array( - - array('parametre.php?p_action=company&'.$s,'Sociétés','Parametre societe',1), - array('parametre.php?p_action=divers&'.$s,'Divers','Devise, moyen de paiement',2), - array('parametre.php?p_action=tva&'.$s,'Tva','Taux & poste pour la TVA',3), - array('parametre.php?p_action=poste&'.$s,'Poste Comptable','Poste comptable constant',4), - array('parametre.php?p_action=pcmn&'.$s,'Plan Comptable','Modification du plan comptable',11), - array('parametre.php?p_action=fiche&'.$s,'Fiche','Modifie les classe de base',5), - array('parametre.php?p_action=sec&'.$s,'Sécurité','securite',8), - array('parametre.php?p_action=preod&'.$s,'Ecritures définies','Ecritures définies ',12), - array('parametre.php?p_action=document&'.$s,'Document','Facture, lettre de rappel, proposition...',7), - array('parametre.php?p_action=jrn&'.$s,'Journaux','Creation et modification de journaux',10) - + + array('parametre.php?p_action=company&'.$s,_('Sociétés'),_('Parametre societe'),1), + array('parametre.php?p_action=divers&'.$s,_('Divers'),_('Devise, moyen de paiement'),2), + array('parametre.php?p_action=pcmn&'.$s,_('Plan Comptable'),_('Modification du plan comptable'),11), + array('parametre.php?p_action=ext&'.$s,_('Extension'),_('Extension'),3), + array('parametre.php?p_action=sec&'.$s,_('Sécurité'),_('securite'),8), + array('parametre.php?p_action=preod&'.$s,_('Ecritures définies'),_('Ecritures définies'),12), + array('parametre.php?p_action=document&'.$s,_('Document'),_('Facture, lettre de rappel, proposition...'),7), + array('parametre.php?p_action=jrn&'.$s,_('Journaux'),_('Creation et modification de journaux'),10) + ), 'H',"mtitle","mtitle",$p_action,' width="100%"'); return $sub_menu; } -/*! +/*! * \brief display the html the menu in the jrn page - * - * \return nothing - * * - */ + * \return nothing + * + * + */ function MenuJrn() { $str_dossier=dossier::get(); echo '<TABLE>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=jrn&sa=add&'.$str_dossier.'">Création </A></TD></TR>'; - include_once("postgres.php"); - $Cn=DbConnect(dossier::id()); - $Ret=ExecSql($Cn,"select jrn_def_id,jrn_def_name, - jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=jrn&sa=add&'.$str_dossier.'">'._('Création').' </A></TD></TR>'; + require_once('class_database.php'); + $Cn=new Database(dossier::id()); + $Ret=$Cn->exec_sql("select jrn_def_id,jrn_def_name, + jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc from jrn_def join jrn_type on jrn_def_type=jrn_type_id order by jrn_def_name"); - $Max=pg_NumRows($Ret); + $Max=Database::num_row($Ret); for ($i=0;$i<$Max;$i++) { - $l_line=pg_fetch_array($Ret,$i); + $l_line=Database::fetch_array($Ret,$i); printf ('<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=jrn&sa=detail&p_jrn=%s&'.$str_dossier.'">%s</A></TD></TR>', $l_line['jrn_def_id'],$l_line['jrn_def_name']); @@ -571,65 +367,58 @@ function MenuJrn() } /*! * \brief Show the menu from the pcmn page - * + * * \param $p_start class start default=1 * * * - * \return nothing - * + * \return nothing * - */ + * + */ function ShowMenuPcmn($p_start=1) { $str_dossier="&".dossier::get(); echo '<TABLE>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=1'.$str_dossier.'">1 Immobilisé </A></TD></TR>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=2'.$str_dossier.'">2 Actif a un an au plus</A></TD></TR>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=3'.$str_dossier.'">3 Stock et commande</A></TD></TR>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=4'.$str_dossier.'">4 Compte tiers</A></TD></TR>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=5'.$str_dossier.'">5 Actif</A></TD></TR>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=6'.$str_dossier.'">6 Charges</A></TD></TR>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=7'.$str_dossier.'">7 Produits</A></TD></TR>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=8'.$str_dossier.'">8 Hors Comptabilité</A></TD></TR>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=9'.$str_dossier.'">9 Hors Comptabilité</A></TD></TR>'; + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=1'.$str_dossier.'">1'._(' Immobilisé').' </A></TD></TR>'; + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=2'.$str_dossier.'">2 '._('Actif a un an au plus').'</A></TD></TR>'; + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=3'.$str_dossier.'">3 '._('Stock et commande').'</A></TD></TR>'; + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=4'.$str_dossier.'">4 '._('Compte tiers').'</A></TD></TR>'; + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=5'.$str_dossier.'">5'._('Actif').'</A></TD></TR>'; + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=6'.$str_dossier.'">6'._('Charges').'</A></TD></TR>'; + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=7'.$str_dossier.'">7'._('Produits').'</A></TD></TR>'; + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=8'.$str_dossier.'">8'._('Hors Comptabilité').'</A></TD></TR>'; + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=9'.$str_dossier.'">9 '._('Hors Comptabilité').'</A></TD></TR>'; echo "</TABLE>"; } -/*! +/*! * \brief Show the menu for importing, verify and transfert Bank CSV * * \return nothing */ function ShowMenuImport(){ $str_dossier=dossier::get(); - + echo '<TABLE>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=import&'.$str_dossier.'">Importer CSV</A></TD></TR>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=verif&'.$str_dossier.'">Verif CSV</A></TD></TR>'; - echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=transfer&'.$str_dossier.'">Transfert CSV</A></TD></TR>'; - + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=import&'.$str_dossier.'">'._('Importer CSV').'</A></TD></TR>'; + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=verif&'.$str_dossier.'">'._('Verif CSV').'</A></TD></TR>'; + echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=transfer&'.$str_dossier.'">'._('Transfert CSV').'</A></TD></TR>'; + echo "</TABLE>"; } /*!\brief show the top menu to access the different modules in top * \param $p_from from which module this function is called - * \return string + * \note must include javascript : acc_ledger.js + * \return string */ function menu_tool($p_from) { if ( ! isset ($_REQUEST['gDossier'])) return "" ; $r=""; -$r.='<script language="javascript"> - function openRecherche(p_sessid,p_dossier,p_style) { - if ( p_style == \'E\' ) { p_style="expert";} - var w=window.open("recherche.php?gDossier="+p_dossier+"&PHPSESSID="+p_sessid+\'&\'+p_style,\'\',\'statusbar=no,scrollbars=yes,toolbar=no\'); - w.focus(); -} -</script>'; - $r.= '<div class="u_tool">'; $r.= '<div class="name">'; @@ -641,17 +430,17 @@ $r.='<script language="javascript"> $agent=$_SERVER['HTTP_USER_AGENT']; $amodule=array( - array('value'=>'access.php','label'=>'Accueil'), - array('value'=>'user_pref.php','label'=>'Preference'), - array('value'=>'parametre.php','label'=>'Paramètre'), - array('value'=>'user_login.php','label'=>'Autre Dossier'), - array('value'=>'logout.php','label'=>'Deconnexion'), + array('value'=>'access.php','label'=>_('Tableau de bord')), + array('value'=>'user_pref.php','label'=>_('Preference')), + array('value'=>'parametre.php','label'=>_('Paramètre')), + array('value'=>'user_login.php','label'=>_('Autre Dossier')), + array('value'=>'logout.php','label'=>_('Deconnexion')), array('value'=>'new_line'), - array('value'=>'user_compta.php','label'=>'Compta Générale'), - array('value'=>'commercial.php','label'=>'Gestion'), - array('value'=>'comptanalytic.php','label'=>'Compt. Analytique'), - array('value'=>'budget.php','label'=>'Budget') - ); + array('value'=>'user_compta.php','label'=>_('Compta Générale')), + array('value'=>'commercial.php','label'=>_('Gestion')), + array('value'=>'comptanalytic.php','label'=>_('Compt. Analytique')), + array('value'=>'extension.php','label'=>_('Extension')) + ) ; $gDossier=dossier::id(); $r.= '<table>'; @@ -675,12 +464,12 @@ $r.='<script language="javascript"> } $r.='<td class="mtitle2">'; $r.= '<A class="cell" HREF="javascript:openRecherche(\''.$_REQUEST['PHPSESSID'].'\','.$gDossier.')">'. - 'Recherche</a></td>'; + _('Recherche').'</a></td>'; $r.='</tr>'; $r.= '</table>'; $r.= '</div>'; - + $r.= '</div>'; return $r; } diff --git a/include/verif_bilan.inc.php b/include/verif_bilan.inc.php index 4e9fbe579..faeb8b72a 100644 --- a/include/verif_bilan.inc.php +++ b/include/verif_bilan.inc.php @@ -26,7 +26,7 @@ require_once ('class_user.php'); -$cn=DbConnect(dossier::id()); +$cn=new Database(dossier::id()); $User=new User($cn); echo '<div class="content">'; @@ -34,8 +34,8 @@ $User=new User($cn); $sql_year=" and c_periode in (select p_id from parm_periode where p_exercice='".$User->get_exercice()."')"; echo '<ol>'; - $deb=getDbValue($cn,"select sum (c_montant) from centralized where c_debit='t' $sql_year "); - $cred=getDbValue($cn,"select sum (c_montant) from centralized where c_debit='f' $sql_year "); + $deb=$cn->get_value("select sum (c_montant) from centralized where c_debit='t' $sql_year "); + $cred=$cn->get_value("select sum (c_montant) from centralized where c_debit='f' $sql_year "); if ( $cred == $deb ) { $result ='<span style="color:green;font-size:120%;font-weight:bold;"> OK </span>';} @@ -45,13 +45,13 @@ $User=new User($cn); printf ('<li> Solde Grand Livre centralisé: debit %f credit %f %s</li>',$deb,$cred,$result); $sql="select jrn_def_id,jrn_def_name from jrn_def"; - $res=ExecSql($cn,$sql); - $jrn=pg_fetch_all($res); + $res=$cn->exec_sql($sql); + $jrn=Database::fetch_all($res); foreach ($jrn as $l) { $id=$l['jrn_def_id']; $name=$l['jrn_def_name']; - $deb=getDbValue($cn,"select sum (c_montant) from centralized where c_debit='t' and c_jrn_def=$id $sql_year "); - $cred=getDbValue($cn,"select sum (c_montant) from centralized where c_debit='f' and c_jrn_def=$id $sql_year "); + $deb=$cn->get_value("select sum (c_montant) from centralized where c_debit='t' and c_jrn_def=$id $sql_year "); + $cred=$cn->get_value("select sum (c_montant) from centralized where c_debit='f' and c_jrn_def=$id $sql_year "); if ( $cred == $deb ) { $result ='<span style="color:green;font-size:120%;font-weight:bold;"> OK </span>';} @@ -65,8 +65,8 @@ $User=new User($cn); echo '<ol>'; $sql_year=" and j_tech_per in (select p_id from parm_periode where p_exercice='".$User->get_exercice()."')"; - $deb=getDbValue($cn,"select sum (j_montant) from jrnx where j_debit='t' $sql_year "); - $cred=getDbValue($cn,"select sum (j_montant) from jrnx where j_debit='f' $sql_year "); + $deb=$cn->get_value("select sum (j_montant) from jrnx where j_debit='t' $sql_year "); + $cred=$cn->get_value("select sum (j_montant) from jrnx where j_debit='f' $sql_year "); if ( $cred == $deb ) { $result ='<span style="color:green;font-size:120%;font-weight:bold;"> OK </span>';} @@ -75,13 +75,13 @@ $User=new User($cn); printf ('<li> Total solde Grand Livre : debit %f credit %f %s</li>',$deb,$cred,$result); $sql="select jrn_def_id,jrn_def_name from jrn_def"; - $res=ExecSql($cn,$sql); - $jrn=pg_fetch_all($res); + $res=$cn->exec_sql($sql); + $jrn=Database::fetch_all($res); foreach ($jrn as $l) { $id=$l['jrn_def_id']; $name=$l['jrn_def_name']; - $deb=getDbValue($cn,"select sum (j_montant) from jrnx where j_debit='t' and j_jrn_def=$id $sql_year "); - $cred=getDbValue($cn,"select sum (j_montant) from jrnx where j_debit='f' and j_jrn_def=$id $sql_year "); + $deb=$cn->get_value("select sum (j_montant) from jrnx where j_debit='t' and j_jrn_def=$id $sql_year "); + $cred=$cn->get_value("select sum (j_montant) from jrnx where j_debit='f' and j_jrn_def=$id $sql_year "); if ( $cred == $deb ) { $result ='<span style="color:green;font-size:120%;font-weight:bold;"> OK </span>';} diff --git a/sql/upgrade.sql b/sql/upgrade.sql index e69de29bb..d97ec5bd2 100644 --- a/sql/upgrade.sql +++ b/sql/upgrade.sql @@ -0,0 +1,421 @@ +begin; + insert into parameter(pr_id,pr_value) values ('MY_CHECK_PERIODE','Y'); + alter table jrn add jr_mt text ; + update jrn set jr_mt= extract (microseconds from jr_tech_date); + create index x_mt on jrn(jr_mt); + DROP FUNCTION insert_quant_purchase(text, numeric, character varying, numeric, numeric,numeric, integer, numeric, numeric, numeric, character varying); + DROP FUNCTION insert_quant_sold(text, character varying, numeric, numeric, numeric, integer, character varying); +alter table groupe_analytique add constraint fk_pa_id foreign key(pa_id) references plan_analytique(pa_id) on delete cascade; +alter table stock_goods add constraint fk_stock_good_f_id foreign key(f_id) references fiche(f_id) ; +-- for belgium +insert into parm_code values ('SUPPLIER',440,'Poste par défaut pour les fournisseurs'); +-- for french +-- insert into parm_code values ('SUPPLIER',400,'Poste par défaut pour les fournisseurs'); +drop table invoice; + +-- IMPORTANT FOR LANG +-- for account_repository +-- insert into user_global_pref(user_id,parameter_type,parameter_value ) select use_login,'LANG','fr_FR.utf8' from ac_users ; +-- + +-- Function: account_parent(poste_comptable) + +DROP FUNCTION account_parent(poste_comptable); + +CREATE FUNCTION account_parent(p_account poste_comptable) + RETURNS poste_comptable AS +$BODY$ +declare + nParent tmp_pcmn.pcm_val_parent%type; + sParent varchar; + nCount integer; +begin + sParent:=to_char(p_account,'9999999999999999'); + sParent:=trim(sParent::text); + 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'); + exit; + 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; + raise notice 'account_parent : Parent is %',nParent; + return nParent; +end; +$BODY$ +LANGUAGE 'plpgsql'; + +alter table document drop column d_state; + +--alter table action_gestion set ag_title type text; +ALTER TABLE action_gestion ADD COLUMN ag_hour text default null; +ALTER TABLE action_gestion ADD COLUMN ag_priority integer; +ALTER TABLE action_gestion ALTER COLUMN ag_priority SET DEFAULT 2; +ALTER TABLE action_gestion ADD COLUMN ag_dest text; +ALTER TABLE action_gestion ADD COLUMN ag_owner text; +ALTER TABLE action_gestion ADD COLUMN ag_contact int8; + +CREATE OR REPLACE FUNCTION action_gestion_ins_upd() + RETURNS trigger AS +$BODY$ +begin +NEW.ag_title := substr(trim(NEW.ag_title),1,70); +NEW.ag_hour := substr(trim(NEW.ag_hour),1,5); +return NEW; +end; +$BODY$ +LANGUAGE 'plpgsql' VOLATILE; + +CREATE TRIGGER action_gestion_t_insert_update + BEFORE INSERT OR UPDATE + ON action_gestion + FOR EACH ROW + EXECUTE PROCEDURE action_gestion_ins_upd(); + +COMMENT ON TRIGGER action_gestion_t_insert_update ON action_gestion IS 'Truncate the column ag_title to 70 char'; + +ALTER TABLE action_gestion ADD COLUMN ag_state integer; +update action_gestion set f_id_dest=f_id_exp where f_id_exp != 0; +alter table action_gestion drop column f_id_exp; +UPDATE document_state SET s_value= 'Clôturé' WHERE s_id=1; +UPDATE document_state SET s_value= 'A suivre' WHERE s_id=2; +UPDATE document_state SET s_value= 'A faire' WHERE s_id=3; +UPDATE document_state SET s_value= 'Abandonné' WHERE s_id=4; + + +CREATE TABLE action_detail +( + ad_id serial, + f_id int8, + ad_text text, + ad_pu numeric(20,4) DEFAULT 0, + ad_quant numeric(20,4) DEFAULT 0, + ad_tva_id integer DEFAULT 0, + ad_tva_amount numeric(20,4) DEFAULT 0, + ad_total_amount numeric(20,4) DEFAULT 0, + ag_id integer NOT NULL DEFAULT 0, + CONSTRAINT action_detail_pkey PRIMARY KEY (ad_id), + CONSTRAINT action_detail_ag_id_fkey FOREIGN KEY (ag_id) + REFERENCES action_gestion (ag_id) MATCH SIMPLE + ON UPDATE CASCADE ON DELETE CASCADE +); + +COMMENT ON TABLE action_detail IS 'Detail of action_gestion, see class Action_Detail'; +-- trim the qcode +CREATE OR REPLACE FUNCTION insert_quant_purchase(p_internal text, p_j_id numeric, p_fiche character varying, p_quant numeric, p_price numeric, p_vat numeric, p_vat_code integer, p_nd_amount numeric, p_nd_tva numeric, p_nd_tva_recup numeric, p_dep_priv numeric, p_client character varying) + RETURNS void AS +$BODY$ +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=upper(trim(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=upper(trim(p_fiche)); + insert into quant_purchase + (qp_internal, + j_id, + qp_fiche, + qp_quantite, + qp_price, + qp_vat, + qp_vat_code, + qp_nd_amount, + qp_nd_tva, + qp_nd_tva_recup, + qp_supplier, + qp_dep_priv) + values + (p_internal, + p_j_id, + fid_good, + p_quant, + p_price, + p_vat, + p_vat_code, + p_nd_amount, + p_nd_tva, + p_nd_tva_recup, + fid_client, + p_dep_priv); + return; +end; + $BODY$ +LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION insert_quant_sold(p_internal text, p_jid numeric, p_fiche character varying, p_quant numeric, p_price numeric, p_vat numeric, p_vat_code integer, p_client character varying) + RETURNS void AS +$BODY$ +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=upper(trim(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=upper(trim(p_fiche)); + insert into quant_sold + (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client,qs_valid) + values + (p_internal,p_jid,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client,'Y'); + return; +end; + $BODY$ +LANGUAGE 'plpgsql'; +drop view vw_fiche_attr; + +create view vw_fiche_attr +as 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, h.av_text as vw_description,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 ( 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 = 9) h ON a.f_id = h.f_id + LEFT JOIN tva_rate ON d.av_text = tva_rate.tva_id::text + JOIN fiche_def USING (fd_id); + +-- ajout n client dans attr_min +insert into attr_min values (2,30); +update attr_def set ad_text='Dépense à charge du gérant (partie privée)' where ad_id=31; + +CREATE OR REPLACE FUNCTION update_account_item_card() + RETURNS void AS +$BODY$ +declare +cCard cursor for select jft_id,fd_class_base from fiche join fiche_def using (fd_id) +join jnt_fic_att_value using (f_id) +join attr_value using (jft_id) +where +ad_id=5 and +fd_create_account=false +and av_text = ''; +njft_id integer; +sClass_base text; +begin +open cCard; +loop + fetch cCard into njft_id,sClass_base; + if NOT FOUND then + exit; + end if; + update attr_value set av_text=sClass_base where jft_id=njft_id; +end loop; + +end; +$BODY$ +LANGUAGE 'plpgsql'; + +select update_account_item_card(); + +drop function update_account_item_card(); + +delete from action where ac_module='budget'; + +drop table bud_hypothese cascade; +drop table bud_detail_periode cascade; +drop table bud_detail cascade; +drop table bud_card cascade; +-- drop sequence bud_card_bc_id_seq; +-- drop sequence bud_detail_bd_id_seq +-- drop sequence bud_detail_bdp_id_seq; +-- drop sequence bud_detail_periode_bdp_id_seq; +comment on column action.ac_code is 'this code will be used in the code with the function User::check_action '; +comment on column action_detail.f_id is 'the concerned card'; +comment on column action_detail.ad_text is ' Description '; +comment on column action_detail.ad_pu is ' price per unit '; +comment on column action_detail.ad_quant is 'quantity '; +comment on column action_detail.ad_tva_id is ' tva_id '; +comment on column action_detail.ad_tva_amount is ' tva_amount '; +comment on column action_detail.ad_total_amount is ' total amount'; +comment on column action_gestion.ag_type is ' type of action: see document_type '; +comment on column action_gestion.f_id_dest is ' third party '; +comment on column action_gestion.ag_title is ' title '; +comment on column action_gestion.ag_timestamp is ' '; +comment on column action_gestion.ag_cal is ' visible in the calendar if = C'; +comment on column action_gestion.ag_ref_ag_id is ' concerning the action '; +comment on column action_gestion.ag_comment is ' comment of the action'; +comment on column action_gestion.ag_ref is 'its reference '; +comment on column action_gestion.ag_priority is 'Low, medium, important '; +comment on column action_gestion.ag_dest is ' is the person who has to take care of this action '; +comment on column action_gestion.ag_owner is ' is the owner of this action '; +comment on column action_gestion.ag_contact is ' contact of the third part '; +comment on column action_gestion.ag_state is 'state of the action same as document_state '; +comment on table action_gestion is 'Contains the details for the follow-up of customer, supplier, administration'; +-- clean the bud part +delete from document where ag_id=0; + +INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (313, 'Administration', 'gestion', 'GEADM'); +INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (1600, 'Gestion des extensions', 'extension', 'EXTENSION'); +INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (1701, 'Consultation', 'prévision', 'PREVCON'); +INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (1702, 'Modification et création', 'prévision', 'PREVMOD'); +update action_gestion set ag_state=2,ag_priority=2,ag_owner='phpcompta'; +-- Function: extension_ins_upd() + +-- DROP FUNCTION extension_ins_upd(); + +CREATE OR REPLACE FUNCTION extension_ins_upd() + RETURNS trigger AS +$BODY$ +declare + sCode text; +begin +sCode:=trim(upper(NEW.ex_code)); +sCode:=replace(sCode,' ','_'); +sCode:=substr(sCode,1,15); +sCode=upper(sCode); +NEW.ex_code:=sCode; +return NEW; + +end; + +$BODY$ +LANGUAGE 'plpgsql'; +-- Table: extension + +-- DROP TABLE extension; + +CREATE TABLE extension +( + ex_id serial NOT NULL, + ex_name character varying(30) NOT NULL, + ex_code character varying(15) NOT NULL, + ex_desc character varying(250), + ex_file character varying NOT NULL, + ex_enable "char" NOT NULL DEFAULT 'Y'::"char", + CONSTRAINT pk_extension PRIMARY KEY (ex_id), + CONSTRAINT idx_ex_code UNIQUE (ex_code) +); +COMMENT ON TABLE extension IS 'Content the needed information for the extension'; +COMMENT ON COLUMN extension.ex_id IS 'Primary key'; +COMMENT ON COLUMN extension.ex_code IS 'code of the extension '; +COMMENT ON COLUMN extension.ex_name IS 'code of the extension '; +COMMENT ON COLUMN extension.ex_desc IS 'Description of the extension '; +COMMENT ON COLUMN extension.ex_file IS 'path to the extension to include'; +COMMENT ON COLUMN extension.ex_enable IS 'Y : enabled; N : disabled '; + +CREATE TRIGGER trg_extension_ins_upd + BEFORE INSERT OR UPDATE + ON extension + FOR EACH ROW + EXECUTE PROCEDURE extension_ins_upd(); + +CREATE TABLE user_sec_extension +( + use_id serial NOT NULL, + ex_id integer NOT NULL, + use_login text NOT NULL, + use_access character(1) NOT NULL DEFAULT 0, + CONSTRAINT user_sec_extension_pkey PRIMARY KEY (use_id), + CONSTRAINT user_sec_extension_ex_id_key UNIQUE (ex_id, use_login) +); +COMMENT ON TABLE user_sec_extension IS 'Security for extension'; + +CREATE TABLE forecast +( + f_id serial NOT NULL, + f_name text NOT NULL, + CONSTRAINT forecast_pk PRIMARY KEY (f_id) +); + +COMMENT ON TABLE forecast IS 'contains the name of the forecast'; + + +CREATE TABLE forecast_cat +( + fc_id serial NOT NULL, -- primary key + fc_desc text NOT NULL, -- text of the category + f_id bigint, -- Foreign key, it is the parent from the table forecast + fc_order integer NOT NULL DEFAULT 0, -- Order of the category, used when displaid + CONSTRAINT forecast_cat_pk PRIMARY KEY (fc_id), + CONSTRAINT forecast_child FOREIGN KEY (f_id) + REFERENCES forecast (f_id) MATCH SIMPLE + ON UPDATE CASCADE ON DELETE CASCADE +); +COMMENT ON COLUMN forecast_cat.fc_id IS 'primary key'; +COMMENT ON COLUMN forecast_cat.fc_desc IS 'text of the category'; +COMMENT ON COLUMN forecast_cat.f_id IS 'Foreign key, it is the parent from the table forecast'; +COMMENT ON COLUMN forecast_cat.fc_order IS 'Order of the category, used when displaid'; + +CREATE TABLE forecast_item +( + fi_id serial NOT NULL, + fi_text text, + fi_account text, + fi_card integer, + fi_order integer, + fc_id integer, + fi_amount numeric(20,4) DEFAULT 0, + fi_debit "char" NOT NULL DEFAULT 'd'::"char", + fi_pid integer, + CONSTRAINT forecast_item_pkey PRIMARY KEY (fi_id), + CONSTRAINT card FOREIGN KEY (fi_card) + REFERENCES fiche (f_id) MATCH SIMPLE + ON UPDATE CASCADE ON DELETE CASCADE, + CONSTRAINT fk_forecast FOREIGN KEY (fc_id) + REFERENCES forecast_cat (fc_id) MATCH SIMPLE + ON UPDATE CASCADE ON DELETE CASCADE +); +COMMENT ON COLUMN forecast_item.fi_id IS 'Primary key'; +COMMENT ON COLUMN forecast_item.fi_text IS 'Label of the i tem'; +COMMENT ON COLUMN forecast_item.fi_account IS 'Accountancy entry'; +COMMENT ON COLUMN forecast_item.fi_card IS 'Card (fiche.f_id)'; +COMMENT ON COLUMN forecast_item.fi_amount IS 'Amount'; +COMMENT ON COLUMN forecast_item.fi_debit IS 'possible values are D or C'; +COMMENT ON COLUMN forecast_item.fi_order IS 'Order of showing (not used)'; +COMMENT ON COLUMN forecast_item.fi_pid IS '0 for every month, or the value parm_periode.p_id '; + + +rollback;